Table of Contents

Class CadFrame

Namespace
CADability.Forms
Assembly
CADability.Forms.dll

Implementation of the abstract FrameImpl, doing things, you cannot do in .NET Core

public class CadFrame : FrameImpl, IFrame, ICommandHandler, IUIService
Inheritance
CadFrame
Implements
Inherited Members

Constructors

CadFrame(CadCanvas, ICommandHandler)

Constructor without form dependency.

public CadFrame(CadCanvas cadCanvas, ICommandHandler commandHandler)

Parameters

cadCanvas CadCanvas
commandHandler ICommandHandler

CadFrame(PropertiesExplorer, CadCanvas, ICommandHandler)

Constructor without form dependency.

public CadFrame(PropertiesExplorer propertiesExplorer, CadCanvas cadCanvas, ICommandHandler commandHandler)

Parameters

propertiesExplorer PropertiesExplorer
cadCanvas CadCanvas
commandHandler ICommandHandler

Properties

FormMenu

The parent form menu

public MenuStrip FormMenu { set; }

Property Value

MenuStrip

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

Action<bool, double, string>

UIService

The user interface services (see UIService). Must be provided by the derived class, which usually implements IUIService itself and returns this.

public override IUIService UIService { get; }

Property Value

IUIService

Methods

OnCommand(string)

Executes a menu command. The command is offered in this order to the ProcessCommandEvent handlers, the commands handled by the frame itself (file, view, snap mode and similar commands), the Project, the actions on the action stack (topmost first) and finally the active view. CurrentMenuId is set to the command before it is executed. Override it to handle additional commands of the application.

public override bool OnCommand(string MenuId)

Parameters

MenuId string

The id of the menu command (see MenuResource.xml)

Returns

bool

true if the command was handled, false otherwise

OnUpdateCommand(string, CommandState)

Determines the state (enabled, checked) of a menu item or toolbar button. The request is offered in the same order as in OnCommand(string): the UpdateCommandEvent handlers, the frame itself, the project, the actions on the action stack and finally the active view.

public override bool OnUpdateCommand(string MenuId, CommandState CommandState)

Parameters

MenuId string

The id of the menu command (see MenuResource.xml)

CommandState CommandState

The state to fill in

Returns

bool

true if the state was determined, false otherwise

UpdateMRUMenu(string[])

Updates the list of most recently used files in the file menu (see UpdateMRUMenu(string[])). Does nothing in this class; the application overrides it to fill its menu.

public override void UpdateMRUMenu(string[] mruFiles)

Parameters

mruFiles string[]

The full names of the most recently used files