public HistoryDialog(tHeader objectHeader) { this.objectHeader = objectHeader; this.objectHitem = new tHitem(); this.objectManagement = new ObjectManagement(); InitializeComponent(); this.OkButton.DialogResult = DialogResult.OK; this.AcceptButton = this.OkButton; this.tHitemPropertyGrid.SelectedObject = objectHitem; }
/// <summary> /// This event adds an item to the history class for the header used to show this window. /// </summary> /// <param name="sender"> /// Name of the object. /// </param> /// <param name="e"> /// This class contains no event data; it is used by events that do not pass state information to an event /// handler when an event is raised. If the event handler requires state information, the application must /// derive a class from this class to hold the data. /// </param> void OkButtonClick(object sender, EventArgs e) { this.objectHitem = (tHitem)this.tHitemPropertyGrid.SelectedObject; this.objectManagement.AddObjectToArrayObjectOfParentObject(this.objectHitem, this.objectHeader); }