Class CadControl
- Namespace
- CADability.Forms
- Assembly
- CADability.Forms.dll
This class is an UserControl which allow us to use the cad in a custom form. The idea is not to force the user to use a form derived from CadForm. If the CreateMainMenu property is true, it creates the MainMenu in the parent form. The ProgressAction property allow us to use a custom progress ui.
public class CadControl : UserControl, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable, IContainerControl, ICommandHandler
- Inheritance
-
CadControl
- Implements
- Inherited Members
Constructors
CadControl()
Default constructor
public CadControl()
Fields
CommandRequest
Func that allow to listen (and eventually handle) the commands
public Func<string, bool> CommandRequest
Field Value
Properties
CadCanvas
public CadCanvas CadCanvas { get; }
Property Value
CadFrame
public CadFrame CadFrame { get; }
Property Value
CreateMainMenu
Indicates to create the menu on the parent form
public bool CreateMainMenu { get; set; }
Property Value
ProgressAction
Action that delegate the progress. In this way we can use a custom progress ui.
public Action<bool, double, string> ProgressAction { get; set; }
Property Value
PropertiesExplorer
public PropertiesExplorer PropertiesExplorer { get; }
Property Value
PropertiesExplorerVisible
Get or set a value indicating whether the ProperiesExplorer is displayed
public bool PropertiesExplorerVisible { get; set; }
Property Value
ToolbarsVisible
Get or set a value indicating whether the toolbars are displayed
public bool ToolbarsVisible { get; set; }
Property Value
Methods
Dispose(bool)
Clean up any resources being used.
protected override void Dispose(bool disposing)
Parameters
disposingbooltrue if managed resources should be disposed; otherwise, false.
OnCommand(string)
Process the command with the given MenuId. Return true if handled, false otherwise.
public virtual bool OnCommand(string MenuId)
Parameters
MenuIdstring
Returns
- bool
true, if handled, false otherwise
OnHandleCreated(EventArgs)
protected override void OnHandleCreated(EventArgs e)
Parameters
OnSelected(MenuWithHandler, bool)
Notify that the menu item is being selected. No need to react on this notification
public virtual void OnSelected(MenuWithHandler selectedMenuItem, bool selected)
Parameters
selectedMenuItemMenuWithHandlerselectedbooltrue, if selected, false if deselected
OnUpdateCommand(string, CommandState)
Update the command user interface of the given command. Return true if handled, false otherwise.
public virtual bool OnUpdateCommand(string MenuId, CommandState CommandState)
Parameters
MenuIdstringCommandStateCommandState
Returns
- bool
true, if handled, false otherwise
ProcessCmdKey(ref Message, Keys)
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)