LIBS/DotNetUtils/Phoenix.ModelCenter.PlugIn/SModelCenterHost.cs (line 35)
This class acts as a host between a plug-in and the ModelCenter desktop API. It provides common utilities and helpers as well as a simplified API that is focused on what is needed to to write a plug-in.
The preferred way to use this is to make your plug-in extend AbstractModelCenterPlugIn, which will manage the lifetime of this object.
To use it directly, create an instance in IComponentPlugIn.construct() and pass it the arguments from the function call. Do not keep around the original arguments to construct(). Lastly, be sure to call Dispose() on this object from IComponentPlugIn.onEnd() for component plug-ins and when your UI is closed for trade study plug-ins.
?> It is recommended that your plug-in extends AbsractModelCenterPlugIn, which handles creation and destruction of this class.
Inherits from:
- AbstractDisposable
Members
- _dataCollector
- AddIconToModelCenter
- AddToModel
- AddVariable
- BringModelCenterToTop
- BringWindowToTop
- CheckOutLicenseFeature
- CheckOutLicenseFeature
- CommitVariableChanges
- CreateNewDataCollector
- createPlugInFrame
- CreatePlugInFrame
- createPlugInFrame2
- CurrentVariables
- DataCollector
- DataCollectorCreated
- DATE_EPOCH_SECONDS
- DATE_UTCG
- DATE_YEAR_MONTH_DAY
- Dispose
- GetAssociatedFiles
- GetHasChanged
- GetRawValue
- GetValue
- getVariableInternal
- init
- IsAddedToModel
- Log
- mcVars
- ModelCenter
- ModelCenterDirectory
- ModelCenterWindow
- ModelCenterWindowHandle
- ModelDirectory
- MyComponent
- NumCurrentVariables
- RefreshFromModelCenter
- releaseMCVars
- ReleasePlugInFrame
- ResetHasChanged
- RetrieveAllVariables
- RootName
- SetAssociatedFiles
- SetAssociatedFiles
- SetGroupIcon
- SetValue
- SetValue
- setValueInternal
- ShowPlugInFrame
- SModelCenterHost
- SModelCenterHost
- variables
Private static attributes
Variable DATE_EPOCH_SECONDS
LIBS/DotNetUtils/Phoenix.ModelCenter.PlugIn/SModelCenterHost.cs (line 39)
Variable DATE_YEAR_MONTH_DAY
LIBS/DotNetUtils/Phoenix.ModelCenter.PlugIn/SModelCenterHost.cs (line 40)
Variable DATE_UTCG
LIBS/DotNetUtils/Phoenix.ModelCenter.PlugIn/SModelCenterHost.cs (line 41)
Private attributes
Variable mcVars
LIBS/DotNetUtils/Phoenix.ModelCenter.PlugIn/SModelCenterHost.cs (line 43)
Variable variables
LIBS/DotNetUtils/Phoenix.ModelCenter.PlugIn/SModelCenterHost.cs (line 44)
Variable _dataCollector
LIBS/DotNetUtils/Phoenix.ModelCenter.PlugIn/SModelCenterHost.cs (line 46)
Properties
Property ModelCenter
LIBS/DotNetUtils/Phoenix.ModelCenter.PlugIn/SModelCenterHost.cs (line 57)
Property DataCollector
LIBS/DotNetUtils/Phoenix.ModelCenter.PlugIn/SModelCenterHost.cs (line 64)
Property AddToModel
LIBS/DotNetUtils/Phoenix.ModelCenter.PlugIn/SModelCenterHost.cs (line 82)
Property MyComponent
LIBS/DotNetUtils/Phoenix.ModelCenter.PlugIn/SModelCenterHost.cs (line 89)
Property Log
LIBS/DotNetUtils/Phoenix.ModelCenter.PlugIn/SModelCenterHost.cs (line 94)
Property IsAddedToModel
LIBS/DotNetUtils/Phoenix.ModelCenter.PlugIn/SModelCenterHost.cs (line 248)
Property ModelDirectory
LIBS/DotNetUtils/Phoenix.ModelCenter.PlugIn/SModelCenterHost.cs (line 286)
Property RootName
LIBS/DotNetUtils/Phoenix.ModelCenter.PlugIn/SModelCenterHost.cs (line 346)
Property ModelCenterDirectory
LIBS/DotNetUtils/Phoenix.ModelCenter.PlugIn/SModelCenterHost.cs (line 354)
Property NumCurrentVariables
LIBS/DotNetUtils/Phoenix.ModelCenter.PlugIn/SModelCenterHost.cs (line 525)
Property CurrentVariables
LIBS/DotNetUtils/Phoenix.ModelCenter.PlugIn/SModelCenterHost.cs (line 538)
Property ModelCenterWindowHandle
LIBS/DotNetUtils/Phoenix.ModelCenter.PlugIn/SModelCenterHost.cs (line 791)
Property ModelCenterWindow
LIBS/DotNetUtils/Phoenix.ModelCenter.PlugIn/SModelCenterHost.cs (line 810)
Events
Event DataCollectorCreated
LIBS/DotNetUtils/Phoenix.ModelCenter.PlugIn/SModelCenterHost.cs (line 220)
Public functions
Function SModelCenterHost
- mc: The ModelCenter COM instance.
- atm: The AddToModel COM instance.
- IModelCenter mc
- IAddToModel atm
Function SModelCenterHost
- mc: The ModelCenter COM instance.
- atm: The AddToModel COM instance.
- dc: The DataCollector COM instance.
- IModelCenter mc
- IAddToModel atm
- IDataCollector dc
Function CreateNewDataCollector
- analysisType: The type of trade study or analysis.
- configuration: The configuration string.
- string analysisType
- string configuration
Function GetAssociatedFiles
Function SetAssociatedFiles
- files: The list of files.
- params string[] files
Function SetAssociatedFiles
- files: The sequence of files.
- ICollection< string > files
Function CheckOutLicenseFeature
- featureName: The name of the feature.
- string featureName
Function CheckOutLicenseFeature
- featureName: The name of the feature.
- releaseDate: The release date of the feature in yyyy.MMdd format.
- string featureName
- string releaseDate
Function RefreshFromModelCenter
Function CommitVariableChanges
Function AddVariable
- v: The variable
- PHXVariable v
Function GetValue
- name: The name of the variable.
- string name
Function GetRawValue
- name: The name of the variable.
- string name
Function SetValue
- v: The variable to set the value for.
- value: The value to set.
- PHXVariable v
- string value
Function SetValue
- name: The name of the variable.
- value: The value to set.
- string name
- string value
Function GetHasChanged
- name: The name of the variable.
- reset: Whether the flag should be reset.
- string name
- bool reset = false
Function ResetHasChanged
- name: The name of the variable.
- string name
Function BringWindowToTop
- hWnd: The window handle.
- IntPtr hWnd
Function BringModelCenterToTop
Function AddIconToModelCenter
- icon: The icon to load.
- Icon icon
Function SetGroupIcon
- groupName: The name of the group.
- iconID: The icon ID, returned from AddIconToModelCenter.
- string groupName
- short iconID
Function CreatePlugInFrame
- name: The name of the plugin.
- title: The window title.
- showFavorites: Whether to show favorites.
- plugin: The plugin object.
- initialSize: The initial size of the frame.
- minSize: The minimum size of the frame.
- string name
- string title
- bool showFavorites
- IComponentPlugIn plugin
- Size initialSize
- Size minSize
Function ShowPlugInFrame
- hwnd: The frame to show.
- IntPtr hwnd
Function ReleasePlugInFrame
- hWnd: The frame window handle.
- IntPtr hWnd
Private functions
Function init
Function releaseMCVars
Function RetrieveAllVariables
- prefix: The name prefix (previously-seen groups).
- mcObject: The component or group to search.
- string prefix
- object mcObject
Function getVariableInternal
- string name
Function setValueInternal
- IVariable var
- PHXDataType type
- string value
Function createPlugInFrame2
- string name
- string title
- object plugin
- bool showFavorites
- Size initialSize
- Size minSize
Function createPlugInFrame
- string name
- string title
- object plugin
- bool showFavorites
- Size initialSize
Protected functions
Function Dispose
- disposing: Whether we are in the disposing phase.
- bool disposing