Get notifications about Kanzi Studio events and get access to the core Kanzi Studio operations, such as access to the Kanzi Studio project, get input from the user, and show notifications. More...
Public Member Functions | |
void | BeginEmphasize (EmphasizeFlag target) |
Starts emphasizing an ongoing operation. More... | |
bool | CanExecutePluginCommand (PluginCommand command, IEnumerable< ProjectItem > items) |
bool | CanExecutePluginCommand (string commandName, IEnumerable< ProjectItem > items) |
void | ExecutePluginCommand (PluginCommand command, IEnumerable< ProjectItem > items) |
void | ExecutePluginCommand (string commandName, IEnumerable< ProjectItem > items) |
void | FinishEmphasize (EmphasizeFlag type) |
Ends emphasizing an ongoing operation and allows Kanzi Studio to return to the normal state. More... | |
string | GetFolderPathFromUser (string dialogTitle, string initialPath) |
string | GetFolderPathFromUser (string dialogTitle, string initialDirectory, string userPreferencesSetting) |
Prompts the user to provide a path to a directory. More... | |
string | GetPathFromUser (string dialogTitle, string initialDirectory, string userPreferencesSetting, string defaultExtension, string filter, PathDialogType pathDialogType, bool multiselect) |
Opens a Windows dialog that allows the user to browse their computer to select a path. More... | |
string | GetUserInput (string title, string prompt) |
Creates a dialog box which prompts the user to provide input. More... | |
string | GetUserInput (string title, string prompt, string initialValue) |
Creates a dialog box which prompts the user to provide input. More... | |
string | GetUserInput (string title, string prompt, IEnumerable< string > options, string initialValue) |
Displays a dialog box which prompts the user to select a value from one of the predefined options using a drop-down menu. More... | |
MessageBoxResult | GetUserInput (string title, string prompt, MessageBoxButton messageBoxButton) |
string | GetUserInput (string title, string prompt, MessageBoxButton messageBoxButton, string extraOptionText) |
void | Log (string message, LogLevel logLevel) |
Writes to the Kanzi Studio Log window. More... | |
void | Log (string message, Exception exception) |
Writes information about an exception to the Kanzi Studio Log window. More... | |
void | Log (string message) |
Writes to the Kanzi Studio Log window. More... | |
void | Redo () |
bool | RegisterPropertyRouter (PropertyRouter router) |
Registers a property router. More... | |
void | SendPreviewCommand (string name, object[] args) |
Sends commands to the Kanzi Studio Preview. More... | |
void | ShowMessageBox (string text, bool isModal) |
Creates a window with a message. More... | |
void | ShowMessageBox (string text, string caption, bool isModal) |
Displays a window with a title and a message. More... | |
void | SubscribeToPropertyValueChanges (string projectItemPath, string propertyName) |
Tracks property changes in the Kanzi Studio Preview for the project item you set in this function. More... | |
void | Undo () |
bool | UnregisterPropertyRouter (PropertyRouter router) |
Unregisters a property router. More... | |
void | UnsubscribeFromPropertyValueChanges (string projectItemPath, string propertyName) |
Stops tracking the property changes in the Kanzi Studio Preview for the project item you set in this function. More... | |
Properties | |
IEnumerable< ProjectItem > | ClipboardItems [get] |
Commands | Commands [get] |
DirectoryInfo | KanziWorkspaceDirectory [get] |
Project | Project [get] |
IEnumerable< ProjectItem > | SelectedItems [get] |
string | StatusBarText [get, set] |
IGenericUtilities | Utilities [get] |
Version | Version [get] |
Gets the version of Kanzi Studio where you run the plugin. More... | |
Events | |
EventHandler | BinaryExported |
Occurs when the .kzb binary of the project is exported. More... | |
EventHandler | PreviewExited |
Occurs when the Kanzi Studio Preview closes. More... | |
EventHandler< PreviewPropertyChangedEventArgs > | PreviewPropertyChanged |
EventHandler | PreviewStarted |
Occurs when the Kanzi Studio Preview starts. More... | |
EventHandler | ProjectClosed |
Occurs when the project is closed. More... | |
EventHandler< ProjectEventArgs > | ProjectOpened |
Occurs when the project is opened. More... | |
EventHandler | ProjectSaved |
Occurs when the project is saved. More... | |
EventHandler | SelectionChanged |
Occurs when the selection of a node or a resource in Kanzi Studio changes. More... | |
EventHandler< StatusEventArgs > | StatusChanged |
Get notifications about Kanzi Studio events and get access to the core Kanzi Studio operations, such as access to the Kanzi Studio project, get input from the user, and show notifications.
void BeginEmphasize | ( | EmphasizeFlag | target | ) |
Starts emphasizing an ongoing operation.
target | Target location, for example a preview window. |
void FinishEmphasize | ( | EmphasizeFlag | type | ) |
Ends emphasizing an ongoing operation and allows Kanzi Studio to return to the normal state.
type | Target location, for example a preview window. |
string GetFolderPathFromUser | ( | string | dialogTitle, |
string | initialDirectory, | ||
string | userPreferencesSetting | ||
) |
Prompts the user to provide a path to a directory.
dialogTitle | The title of the dialog box. |
initialDirectory | Initial directory where the folder dialog is opened. |
userPreferencesSetting | A key to be used for storing the last selected folder in the user preferences. Set as null not to save the path. If an existing value is found from user preferences, that is used over the value supplied in initialDirectory parameter. |
string GetPathFromUser | ( | string | dialogTitle, |
string | initialDirectory, | ||
string | userPreferencesSetting, | ||
string | defaultExtension, | ||
string | filter, | ||
PathDialogType | pathDialogType, | ||
bool | multiselect | ||
) |
Opens a Windows dialog that allows the user to browse their computer to select a path.
You can use this function to get a path to either open or save a file.
dialogTitle | The title of the dialog box. |
initialDirectory | The initial directory where to open the dialog. |
userPreferencesSetting | The user preferences key to use to store the last selected directory. Set as null not to save the path. If an existing value is found from user preferences, that is used over the value supplied in initialDirectory parameter. |
defaultExtension | The default file extension to use to open or save the file. |
filter | The filter definition that sets which file extensions the dialog allows the user to select. |
pathDialogType | The type of the dialog. Use PathDialogType.OPEN for the open file dialog and PathDialogType.SAVE for the save file dialog. |
multiselect | When opening files, sets whether the user is allowed to select multiple files. |
Examples
To open a Windows dialog which allows the user to browse their computer and select a path:
string GetUserInput | ( | string | title, |
string | prompt | ||
) |
Creates a dialog box which prompts the user to provide input.
For example, you can use this function to get the path of a node where you want your plugin to start executing its commands.
title | The title of the dialog box. |
prompt | The message you want to show in the dialog box. |
Examples
To create a dialog box with a title and prompt:
string GetUserInput | ( | string | title, |
string | prompt, | ||
string | initialValue | ||
) |
Creates a dialog box which prompts the user to provide input.
For example, you can use this function to get the path of a node where you want your plugin to start executing its commands.
title | The title of the dialog box. |
prompt | The message you want to show in the dialog box. |
initialValue | The predefined value entered in the prompt. |
Examples
To create a dialog box with a title, a prompt, and a text box with a predefined value:
string GetUserInput | ( | string | title, |
string | prompt, | ||
IEnumerable< string > | options, | ||
string | initialValue | ||
) |
Displays a dialog box which prompts the user to select a value from one of the predefined options using a drop-down menu.
title | The title of the dialog box. |
prompt | The message you want to show in the dialog box. |
options | The options shown in a drop-down box from which the user can select. |
initialValue | The value preselected in the drop-down menu. |
void Log | ( | string | message, |
LogLevel | logLevel | ||
) |
Writes to the Kanzi Studio Log window.
For example, you can use this function to inform the user about the plugin progress in the Log window.
message | The message you want to print to the Log window. |
logLevel | The level of the message you want to print to the Log window. |
Examples
To print a message to the Log window as a regular notification:
To print a message to the Log window as a warning:
void Log | ( | string | message, |
Exception | exception | ||
) |
Writes information about an exception to the Kanzi Studio Log window.
message | The message you want to print to the Log window before the exception information. |
exception | The exception to be logged. |
void Log | ( | string | message | ) |
Writes to the Kanzi Studio Log window.
For example, you can use this function to inform the user about the plugin progress in the Log window.
message | The message you want to print to the Log window. |
Examples
To print a message to the Kanzi Studio Log window:
bool RegisterPropertyRouter | ( | PropertyRouter | router | ) |
Registers a property router.
A property router can interfere when a user edits properties in Kanzi Studio.
router | The router to register. |
void SendPreviewCommand | ( | string | name, |
object[] | args | ||
) |
Sends commands to the Kanzi Studio Preview.
name | The name of the command you want to send to the Preview. |
args | The command arguments you want to send (must be serializable.) |
void ShowMessageBox | ( | string | text, |
bool | isModal | ||
) |
Creates a window with a message.
For example, you can use this function to show a message to the user.
text | The message you want to show in the window. |
isModal | Whether the window is modal. When set to true you cannot use the main Kanzi Studio window until you confirm the message in this window. |
Examples
To create a modal window which displays a message:
void ShowMessageBox | ( | string | text, |
string | caption, | ||
bool | isModal | ||
) |
Displays a window with a title and a message.
For example, you can use this function to show a message to the user.
text | The message you want to show in the window. |
caption | The title of the window. |
isModal | Whether the window is modal. When set to true you cannot use the main Kanzi Studio window until you confirm the message in this window. |
Examples
To create a modal window with a title and which displays a message:
void SubscribeToPropertyValueChanges | ( | string | projectItemPath, |
string | propertyName | ||
) |
Tracks property changes in the Kanzi Studio Preview for the project item you set in this function.
Triggers change events in project item and in this class.
projectItemPath | The path to the project item for which you want to track property changes. |
propertyName | The name of the property the changes of which you want to track. |
bool UnregisterPropertyRouter | ( | PropertyRouter | router | ) |
Unregisters a property router.
A property router can interfere when a user edits properties in Kanzi Studio.
router | The router to unregister. |
void UnsubscribeFromPropertyValueChanges | ( | string | projectItemPath, |
string | propertyName | ||
) |
Stops tracking the property changes in the Kanzi Studio Preview for the project item you set in this function.
projectItemPath | The path to the project item for which you want to stop tracking property changes. |
propertyName | The name of the property the changes of which you want to stop tracking. |
|
get |
Gets the version of Kanzi Studio where you run the plugin.
The version of Kanzi Studio.
Examples
To get the major, minor, revision, and build numbers of the Kanzi Studio where you run the plugin:
EventHandler BinaryExported |
Occurs when the .kzb binary of the project is exported.
Examples
To subscribe to the BinaryExported event:
EventHandler PreviewExited |
Occurs when the Kanzi Studio Preview closes.
Examples
To subscribe to the PreviewExited event:
EventHandler PreviewStarted |
Occurs when the Kanzi Studio Preview starts.
Examples
To subscribe to the PreviewStarted event:
EventHandler ProjectClosed |
Occurs when the project is closed.
Examples
To subscribe to the ProjectClosed event:
EventHandler<ProjectEventArgs> ProjectOpened |
Occurs when the project is opened.
Examples
To subscribe to the ProjectOpened event:
EventHandler ProjectSaved |
Occurs when the project is saved.
Examples
To subscribe to the ProjectSaved event:
EventHandler SelectionChanged |
Occurs when the selection of a node or a resource in Kanzi Studio changes.
For example, Kanzi Studio sets off this event when you select a node in a Project or Nodes windows, when you select a library, a directory, or a resource in the Library, or any of the resource windows.
Examples
To subscribe to the SelectionChanged event: