C# 클래스 MATLABfromCSharp.MainForm

상속: System.Windows.Forms.Form
파일 보기 프로젝트 열기: osisoft/PI-to-MATLAB-Utility 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
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