C# Class OSAE.UI.Controls.AddNewObject

Interaction logic for AddNewObject control
Inheritance: System.Windows.Controls.UserControl
Mostra file Open project: opensourceautomation/Open-Source-Automation

Public Methods

Method Description
AddNewObject ( ) : System.Collections.Generic

Default constructor

Private Methods

Method Description
LoadContainers ( ) : void

Load the available containers into the containers combo box

LoadObjectTypes ( ) : void

Load the object types from the DB into the combo box

NotifyParentFinished ( ) : void

Let the hosting contol know that we are done

At present it tells the parent to close, this could later be altered to have a event that fires to the parent allowing them to decide what to do when the control is finished. If the control is being hosted in an element host this will have no affect as the parent is the element host and not the form.

ValidateForm ( ) : bool

Validates if the user has filled in all the required fields

addButton_Click ( object sender, System e ) : void

Add the new object to the system

cancelbutton_Click ( object sender, RoutedEventArgs e ) : void

Close the form as user has cancelled

nameTextBox_LostFocus ( object sender, RoutedEventArgs e ) : void

Gives a default value to the description field when the focus to the name text box is lost

Method Details

AddNewObject() public method

Default constructor
public AddNewObject ( ) : System.Collections.Generic
return System.Collections.Generic