C# Класс MATLABfromCSharp.MainForm

Наследование: System.Windows.Forms.Form
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
dataPrefDialog DataPreferences

Открытые методы

Метод Описание
ImportFileMenuItem_Click ( object sender, EventArgs e ) : void
MainForm ( MainControl main ) : System
SaveFileMenuItem_Click ( object sender, EventArgs e ) : void
Status ( string status ) : void

Sets the string to the Status Strip at the bottom of the application.

afmenu_Opening ( object sender, CancelEventArgs e ) : void

Event raised the menu control is opening. Handles the opening of the AFTreeView ContextMenuStrip to override visibility of menu items. TODO: could vary between admin and non-admin users.

getUserVariableName ( string objectName ) : string

Checks Matlab Variable Name textbox for a variable name

importSavedLog ( string path ) : void

Pass the file path from the MainForm to MainControl

passDataPrefChanges ( bool ts, int datapref, string format ) : void

Passes the Data Preferences changed to the Main Control.

Защищенные методы

Метод Описание
Dispose ( bool disposing ) : void

Clean up any resources being used.

Приватные методы

Метод Описание
AFTreeViewNode_Selected ( object sender, TreeViewEventArgs e ) : void

When a node is selected, the attribute box updates and the path is saved.

AdvancedDataClick ( object sender, EventArgs e ) : void

Shows the Data Preferences Dialog for user changes.

EnterPressed ( object sender, KeyEventArgs e ) : void
ExportToMatlab_Click ( object sender, EventArgs e ) : void

Evaluates based on the tabPage, which export method to call.

InitializeAttributeListBox ( AFAttributes atts ) : void

Shows the list of Attributes and their values in the AFViewControl.

InitializeComponent ( ) : void

Required method for Designer support - do not modify the contents of this method with the code editor.

MainHasFocus ( object sender, EventArgs e ) : void

Assures that the secondary Forms are hidden when the Main Form is focused on.

MatlabNameCheckedChanged ( object sender, EventArgs e ) : void
PItoMatlabForm_Closing ( object sender, FormClosingEventArgs e ) : void
PItoMatlabForm_Load ( object sender, EventArgs e ) : void
SaveFileDialog ( string filter ) : string

Brings up a SaveFileDialog.

TabIndex_Changed ( object sender, EventArgs e ) : void
afDatabasePicker1_SelectionChange ( object sender, SelectionChangeEventArgs e ) : void

Updates the current AFDatabase and the AFTreeView to match. Clears the AFViewControl of the Event Frames. (Not sure if we want to do this).

afEventFrameFindCtrl_AFEventFrameUpdated ( object sender, CancelEventArgs e ) : void

The FindEventFrameCriteria Dialog updates the event frame to one EventFrame, which is shown in the AFViewController

afEventFrameFindCtrl_DialogButtonPressing ( object sender, CancelEventArgs e ) : void

Uses the AFEventFrameFindControl, but overrides the EventFrameBrowser to FindEventFrames (AFOperations). Opens dialog to select eventframes to be shown in the AFViewControl

afServerPicker_ConnectionChange ( object sender, SelectionChangeEventArgs e ) : void
afTreeViewElements_MenuItemClicked ( object sender, MenuItemClickedEventArgs e ) : void

Handles the afTreeView Menu Item calls, brings up the FindElements Dialog and EventFrame Dialog

avcEventFrames_ItemSelected ( object sender, SelectionChangeEventArgs e ) : void

Updates the Event Attibutes AFViewControl and set the Date Time to that of the EventFrame.

bEFSearch_Click ( object sender, EventArgs e ) : void

Starts a simple Name search using the text from the textbox. Updates the AFViewControl of elements that match the criteria.

bSearchElements_Click ( object sender, EventArgs e ) : void

If it is a new search, the elements that fit the criteria are collected and the first is selected. Else it iterates through the collection of elements and expands to the node.

exportAFData ( ) : void

Export AF Data. Gets the Attribute from the AFViewControl of Element Attributes.

exportEventFrameData ( ) : void

Exports the Event Frame Data, using the AFViewControl to select an EventFrame and EventFrame Attribute.

exportPIData ( ) : void

Export PI Data. Gets items from the AFViewControl of PIPoints.

findTreeNode ( TreeNode node, AFElement element ) : bool

Expands the TreeView along the element path. Iterative process that stops when node is found.

importAFData ( ) : void

Import AF Data into the Asset Framework.

initializeAfServerPicker ( ) : void

Multiple steps. 1) gets PIPoints fo the Server 2) Checks AFSecurity, for admin access and removes ability to import. 3) Initializes Database and EventFrameFindCtrl.

openMatlabMenuItem_Click ( object sender, EventArgs e ) : void
passPIDataRequest ( string server, string pipoint ) : void

Sends a PIData request to MainControl. Uses AFSDK.

radioInformationDirectionChanged ( object sender, EventArgs e ) : void
saveExports ( ) : void

Saves the Exports to a user-specified .txt File.

saveMatlab ( ) : void

TODO: Not Finished. Writes the Matlab code that produces the same data calls.

saveMatlabMenuItem_Click ( object sender, EventArgs e ) : void
tb_MatlabName_Click ( object sender, EventArgs e ) : void
tb_MatlabName_Leave ( object sender, EventArgs e ) : void
viewLogToolStripMenuItem_Click ( object sender, EventArgs e ) : void

Описание методов

Dispose() защищенный Метод

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool true if managed resources should be disposed; otherwise, false.
Результат void

ImportFileMenuItem_Click() публичный Метод

public ImportFileMenuItem_Click ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
Результат void

MainForm() публичный Метод

public MainForm ( MainControl main ) : System
main MainControl
Результат System

SaveFileMenuItem_Click() публичный Метод

public SaveFileMenuItem_Click ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
Результат void

Status() публичный Метод

Sets the string to the Status Strip at the bottom of the application.
public Status ( string status ) : void
status string The string shown
Результат void

afmenu_Opening() публичный Метод

Event raised the menu control is opening. Handles the opening of the AFTreeView ContextMenuStrip to override visibility of menu items. TODO: could vary between admin and non-admin users.
public afmenu_Opening ( object sender, CancelEventArgs e ) : void
sender object
e CancelEventArgs
Результат void

getUserVariableName() публичный Метод

Checks Matlab Variable Name textbox for a variable name
public getUserVariableName ( string objectName ) : string
objectName string The attribute name
Результат string

importSavedLog() публичный Метод

Pass the file path from the MainForm to MainControl
public importSavedLog ( string path ) : void
path string The path to the file.
Результат void

passDataPrefChanges() публичный Метод

Passes the Data Preferences changed to the Main Control.
public passDataPrefChanges ( bool ts, int datapref, string format ) : void
ts bool true: provides timestamps along with data
datapref int Based on the GetValues, 0(raw), negative(sampling), positive(profiled sampling)
format string string version of passed data.
Результат void

Описание свойств

dataPrefDialog публичное свойство

public DataPreferences,MATLABfromCSharp dataPrefDialog
Результат DataPreferences