C# Class ClearCanvas.Desktop.View.WinForms.DesktopWindowView

WinForms implementation of IDesktopWindowView.

This class may subclassed if customization is desired. In this case, the ApplicationView class must also be subclassed in order to instantiate the subclass from its ApplicationView.CreateDesktopWindowView method.

Reasons for subclassing may include: overriding the CreateDesktopForm factory method to supply a custom subclass of the DesktopForm class, overriding the CreateWorkspaceView, CreateShelfView, or CreateDialogBoxView factory methods to supply custom subclasses of these view classes, overriding SetMenuModel or SetToolbarModel to customize the menu/toolbar display, and overriding ShowMessageBox to customize the display of message boxes.

Inheritance: ClearCanvas.Desktop.View.WinForms.DesktopObjectView, IDesktopWindowView
Show file Open project: jasper-yeh/ClearCanvas Class Usage Examples

Private Properties

Property Type Description
ActivateShelfView void
AddShelfView Content
AddWorkspaceView void
AlertDialogOpenLogClicked void
AlertLinkHandler System.Action
DockingManagerContentAutoHideClosedEventHandler void
DockingManagerContentAutoHideOpeningEventHandler void
DockingManagerContentHidingEventHandler void
DockingManagerContentShownEventHandler void
DockingManagerWindowActivatedEventHandler void
ErrorDialogDismissed void
FindTabPageCollection bool
FormActivatedEventHandler void
FormDeactivateEventHandler void
FormDockingManagerWindowDeactivatedEventHandler void
FormFormClosingEventHandler void
FormVisibleChangedEventHandler void
HideShelfView void
HideShelvesOnWorkspaceOpen void
LoadWindowSettings void
PrepareFileDialog void
RemoveShelfView void
RemoveWorkspaceView void
SaveWindowSettings void
ShowShelfView void
TabbedGroupPageChangedEventHandler void
TabbedGroupPageClosePressedEventHandler void
ValidateFileSavePath bool

Public Methods

Method Description
Activate ( ) : void

Activates the view, activating the form on the screen.

CreateDialogBoxView ( DialogBox dialogBox ) : IDialogBoxView

Creates a new view for the specified DialogBox.

Override this method if you want to return a custom implementation of IDialogBoxView. In practice, it is preferable to subclass DialogBoxView rather than implement IDialogBoxView directly.

CreateShelfView ( Shelf shelf ) : IShelfView

Creates a new view for the specified Shelf.

Override this method if you want to return a custom implementation of IShelfView. In practice, it is preferable to subclass ShelfView rather than implement IShelfView directly.

CreateWorkspaceView ( Workspace workspace ) : IWorkspaceView

Creates a new view for the specified Workspace.

Override this method if you want to return a custom implementation of IWorkspaceView. In practice, it is preferable to subclass WorkspaceView rather than implement IWorkspaceView directly.

Hide ( ) : void

Hides the view, hiding the form on the screen.

Open ( ) : void

Opens this view, showing the form on the screen.

SetAlertContext ( IDesktopAlertContext alertContext ) : void

Sets the alert context.

SetMenuModel ( ClearCanvas.Desktop.Actions.ActionModelNode model ) : void

Sets the menu model, causing the menu displayed on the screen to be updated.

The default implementation just sets the DesktopForm.MenuModel property. Override this method if you need to perform custom processing.

SetTitle ( string title ) : void

Sets the title that is displayed in the form's title bar.

Override this method if you need to customize the title that is displayed on the form.

SetToolbarModel ( ClearCanvas.Desktop.Actions.ActionModelNode model ) : void

Sets the toolbar model, causing the toolbar displayed on the screen to be updated.

The default implementation just sets the DesktopForm.ToolbarModel property. Override this method if you need to perform custom processing.

Show ( ) : void

Shows the view, making the form visible on the screen.

ShowAlert ( AlertNotificationArgs args ) : void

Shows an alert notification in front of this window.

ShowMessageBox ( string message, string title, MessageBoxActions buttons ) : DialogBoxAction

Displays a message box.

Override this method if you need to customize the display of message boxes.

ShowOpenFileDialogBox ( FileDialogCreationArgs args ) : FileDialogResult

Shows a 'Open file' dialog in front of this window.

ShowSaveFileDialogBox ( FileDialogCreationArgs args ) : FileDialogResult

Shows a 'Save file' dialog in front of this window.

ShowSelectFolderDialogBox ( SelectFolderDialogCreationArgs args ) : FileDialogResult

Shows a 'Select folder' dialog in front of this window.

Protected Methods

Method Description
CreateDesktopForm ( ) : ClearCanvas.Desktop.View.WinForms.DesktopForm

Called to create an instance of a DesktopForm for use by this view.

DesktopWindowView ( DesktopWindow window ) : System

Constructor

Dispose ( bool disposing ) : void

Disposes of this object, closing the form.

Private Methods

Method Description
ActivateShelfView ( ShelfView shelfView ) : void
AddShelfView ( ShelfView shelfView, Control control, string title, ShelfDisplayHint hint, MemoryStream shelfRestoreStream ) : Content
AddWorkspaceView ( WorkspaceView workspaceView ) : void
AlertDialogOpenLogClicked ( object sender, EventArgs e ) : void
AlertLinkHandler ( Action linkAction ) : System.Action
DockingManagerContentAutoHideClosedEventHandler ( Content c, EventArgs cea ) : void
DockingManagerContentAutoHideOpeningEventHandler ( Content c, EventArgs cea ) : void
DockingManagerContentHidingEventHandler ( Content c, CancelEventArgs cea ) : void
DockingManagerContentShownEventHandler ( Content c, EventArgs cea ) : void
DockingManagerWindowActivatedEventHandler ( DockingManager dm, Window wd ) : void
ErrorDialogDismissed ( object sender, ClearCanvas.Desktop.View.WinForms.AlertNotificationForm e ) : void
FindTabPageCollection ( TabGroupSequence nodeGroup, Crownwood tabPage, TabPageCollection &containingCollection ) : bool
FormActivatedEventHandler ( object sender, EventArgs e ) : void

Handles the forms Activated event in order to track the currently active window.

FormDeactivateEventHandler ( object sender, EventArgs e ) : void
FormDockingManagerWindowDeactivatedEventHandler ( DockingManager dm, Window wd ) : void
FormFormClosingEventHandler ( object sender, FormClosingEventArgs e ) : void

Cancels the forms closing event, and raises our IDesktopObjectView.CloseRequested event instead.

FormVisibleChangedEventHandler ( object sender, EventArgs e ) : void

Handles the forms visible event in order to track our visible status.

HideShelfView ( ShelfView shelfView ) : void
HideShelvesOnWorkspaceOpen ( ) : void
LoadWindowSettings ( ) : void
PrepareFileDialog ( FileDialog dialog, FileDialogCreationArgs args ) : void
RemoveShelfView ( ShelfView shelfView ) : void
RemoveWorkspaceView ( WorkspaceView workspaceView ) : void
SaveWindowSettings ( ) : void
ShowShelfView ( ShelfView shelfView ) : void
TabbedGroupPageChangedEventHandler ( TabbedGroups tg, Crownwood tp ) : void
TabbedGroupPageClosePressedEventHandler ( TabbedGroups groups, TGCloseRequestEventArgs e ) : void
ValidateFileSavePath ( string filePath, FileDialogCreationArgs args ) : bool

Method Details

Activate() public method

Activates the view, activating the form on the screen.
public Activate ( ) : void
return void

CreateDesktopForm() protected method

Called to create an instance of a DesktopForm for use by this view.
protected CreateDesktopForm ( ) : ClearCanvas.Desktop.View.WinForms.DesktopForm
return ClearCanvas.Desktop.View.WinForms.DesktopForm

CreateDialogBoxView() public method

Creates a new view for the specified DialogBox.
Override this method if you want to return a custom implementation of IDialogBoxView. In practice, it is preferable to subclass DialogBoxView rather than implement IDialogBoxView directly.
public CreateDialogBoxView ( DialogBox dialogBox ) : IDialogBoxView
dialogBox DialogBox
return IDialogBoxView

CreateShelfView() public method

Creates a new view for the specified Shelf.
Override this method if you want to return a custom implementation of IShelfView. In practice, it is preferable to subclass ShelfView rather than implement IShelfView directly.
public CreateShelfView ( Shelf shelf ) : IShelfView
shelf Shelf
return IShelfView

CreateWorkspaceView() public method

Creates a new view for the specified Workspace.
Override this method if you want to return a custom implementation of IWorkspaceView. In practice, it is preferable to subclass WorkspaceView rather than implement IWorkspaceView directly.
public CreateWorkspaceView ( Workspace workspace ) : IWorkspaceView
workspace Workspace
return IWorkspaceView

DesktopWindowView() protected method

Constructor
protected DesktopWindowView ( DesktopWindow window ) : System
window DesktopWindow
return System

Dispose() protected method

Disposes of this object, closing the form.
protected Dispose ( bool disposing ) : void
disposing bool
return void

Hide() public method

Hides the view, hiding the form on the screen.
public Hide ( ) : void
return void

Open() public method

Opens this view, showing the form on the screen.
public Open ( ) : void
return void

SetAlertContext() public method

Sets the alert context.
public SetAlertContext ( IDesktopAlertContext alertContext ) : void
alertContext IDesktopAlertContext
return void

SetMenuModel() public method

Sets the menu model, causing the menu displayed on the screen to be updated.
The default implementation just sets the DesktopForm.MenuModel property. Override this method if you need to perform custom processing.
public SetMenuModel ( ClearCanvas.Desktop.Actions.ActionModelNode model ) : void
model ClearCanvas.Desktop.Actions.ActionModelNode
return void

SetTitle() public method

Sets the title that is displayed in the form's title bar.
Override this method if you need to customize the title that is displayed on the form.
public SetTitle ( string title ) : void
title string
return void

SetToolbarModel() public method

Sets the toolbar model, causing the toolbar displayed on the screen to be updated.
The default implementation just sets the DesktopForm.ToolbarModel property. Override this method if you need to perform custom processing.
public SetToolbarModel ( ClearCanvas.Desktop.Actions.ActionModelNode model ) : void
model ClearCanvas.Desktop.Actions.ActionModelNode
return void

Show() public method

Shows the view, making the form visible on the screen.
public Show ( ) : void
return void

ShowAlert() public method

Shows an alert notification in front of this window.
public ShowAlert ( AlertNotificationArgs args ) : void
args AlertNotificationArgs
return void

ShowMessageBox() public method

Displays a message box.
Override this method if you need to customize the display of message boxes.
public ShowMessageBox ( string message, string title, MessageBoxActions buttons ) : DialogBoxAction
message string
title string
buttons MessageBoxActions
return DialogBoxAction

ShowOpenFileDialogBox() public method

Shows a 'Open file' dialog in front of this window.
public ShowOpenFileDialogBox ( FileDialogCreationArgs args ) : FileDialogResult
args FileDialogCreationArgs
return FileDialogResult

ShowSaveFileDialogBox() public method

Shows a 'Save file' dialog in front of this window.
public ShowSaveFileDialogBox ( FileDialogCreationArgs args ) : FileDialogResult
args FileDialogCreationArgs
return FileDialogResult

ShowSelectFolderDialogBox() public method

Shows a 'Select folder' dialog in front of this window.
public ShowSelectFolderDialogBox ( SelectFolderDialogCreationArgs args ) : FileDialogResult
args SelectFolderDialogCreationArgs
return FileDialogResult