C# Class LitDev.LDDialogs

Mostrar archivo Open project: litdev1/LitDev

Public Properties

Property Type Description
_Waiting bool

Public Methods

Method Description
AddRightClickMenu ( Primitive items, Primitive images ) : void

Add a right click context menu for the GraphicsWindow.

Calendar ( Primitive start ) : Primitive

A popup calendar date chooser - double click a date or press return to select a date.

Colour ( ) : Primitive

Choose a colour from a dialog.

Confirm ( Primitive text, Primitive title ) : Primitive

A message dialog with Yes, No and Cancel options.

EndWait ( ) : void

Close the waiting popup window.

Font ( Primitive font ) : Primitive

Use the font dialog to select a font.

GetFolder ( Primitive InitialFolder ) : Primitive

A Dialog to get a folder (directory).

OpenFile ( Primitive extension, Primitive folder ) : Primitive

Open File Dialogue (get an existing file).

SaveFile ( Primitive extension, Primitive folder ) : Primitive

Save File Dialogue (get a new file).

SetStartupPosition ( Primitive x, Primitive y, Primitive mode ) : void

Set the startup coordinates (top left) for most dialoges. This should be set before the dialog is called.

ToolTip ( Primitive shapeName, Primitive tip ) : void

Set a tooltip popup for common shapes and controls.

Wait ( Primitive text, Primitive colour ) : void

Create a waiting popup window with a text message.

getMenu ( BitmapSource>.Dictionary _savedImages, Primitive items, Primitive images, int iconSize ) : System.Windows.Controls.ContextMenu

Private Methods

Method Description
ShowWait ( ) : void
StartPosition ( System form, string title ) : void
_MenuClickEvent ( Object sender, EventArgs e ) : void
getFilter ( Primitive extension ) : string

Method Details

AddRightClickMenu() public static method

Add a right click context menu for the GraphicsWindow.
public static AddRightClickMenu ( Primitive items, Primitive images ) : void
items Primitive An array of context menu item selection texts.
images Primitive Optional array of image icons, any or all may be "". /// They may be the result of ImageList.LoadImage or local or network image file.
return void

Calendar() public static method

A popup calendar date chooser - double click a date or press return to select a date.
public static Calendar ( Primitive start ) : Primitive
start Primitive The initial date in the control, may be "" for today.
return Primitive

Colour() public static method

Choose a colour from a dialog.
public static Colour ( ) : Primitive
return Primitive

Confirm() public static method

A message dialog with Yes, No and Cancel options.
public static Confirm ( Primitive text, Primitive title ) : Primitive
text Primitive Text question for the dialog.
title Primitive Title for the dialog.
return Primitive

EndWait() public static method

Close the waiting popup window.
public static EndWait ( ) : void
return void

Font() public static method

Use the font dialog to select a font.
public static Font ( Primitive font ) : Primitive
font Primitive /// An array with the initial font selected. /// It has the same format as the return array, and can be an empty array "". ///
return Primitive

GetFolder() public static method

A Dialog to get a folder (directory).
public static GetFolder ( Primitive InitialFolder ) : Primitive
InitialFolder Primitive The initial folder or "" for the last folder selected.
return Primitive

OpenFile() public static method

Open File Dialogue (get an existing file).
public static OpenFile ( Primitive extension, Primitive folder ) : Primitive
extension Primitive /// The file type extension, e.g. "sb". /// This may also be an array of extension types such as "1=png;2=jpg;". /// If the extension contains a "|" character then it will be used directly such as "Images|*.bmp;*.jpg;*.gif;*.png|All files (*.*)|*.*". ///
folder Primitive /// The initial folder to open dialog with, can be "". ///
return Primitive

SaveFile() public static method

Save File Dialogue (get a new file).
public static SaveFile ( Primitive extension, Primitive folder ) : Primitive
extension Primitive /// The file type extension, e.g. "sb". /// This may also be an array of extension types such as "1=png;2=jpg;". /// If the extension contains a "|" character then it will be used directly such as "Images|*.bmp;*.jpg;*.gif;*.png|All files (*.*)|*.*". ///
folder Primitive /// The initial folder to open dialog with, can be "". ///
return Primitive

SetStartupPosition() public static method

Set the startup coordinates (top left) for most dialoges. This should be set before the dialog is called.
public static SetStartupPosition ( Primitive x, Primitive y, Primitive mode ) : void
x Primitive The X coordinate.
y Primitive The X coordinate.
mode Primitive The mode which is one of the following /// 0 : Off (default) /// 1 : The coordinates are relative to the graphics window, equivalent to GraphicsWindow.MouseX/Y. /// 2 : The coordinates are relative to the display window, equivalent to Desktop.MouseX/Y
return void

ToolTip() public static method

Set a tooltip popup for common shapes and controls.
public static ToolTip ( Primitive shapeName, Primitive tip ) : void
shapeName Primitive The shape or control.
tip Primitive The text content of the tooltip.
return void

Wait() public static method

Create a waiting popup window with a text message.
public static Wait ( Primitive text, Primitive colour ) : void
text Primitive The text to display in the popup window.
colour Primitive The colour of the popup window border, may be "" for default.
return void

getMenu() public static method

public static getMenu ( BitmapSource>.Dictionary _savedImages, Primitive items, Primitive images, int iconSize ) : System.Windows.Controls.ContextMenu
_savedImages BitmapSource>.Dictionary
items Primitive
images Primitive
iconSize int
return System.Windows.Controls.ContextMenu

Property Details

_Waiting public_oe static_oe property

public static bool _Waiting
return bool