private void addActive_Click(object sender, EventArgs e) { var type = new ActiveType(); var dialog = new AddEditType(type); dialog.Owner = this; dialog.Show(); dialog.FormClosed += delegate(object senderClosed, FormClosedEventArgs eClosed) { if (!dialog.IsSuccess) { return; } if (!Program.m_activeTypes.Contains(type)) { Program.m_activeTypes.Add(type); } SyncData(); }; }
public AddEditType(ActiveType type) { editableType = type; InitializeComponent(); UpdateInputs(); }