/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void mnuStationAdd_Click(object sender, EventArgs e) { StationCollection ss = YeHeCommuniServerApp.Default.CommuniSoft.HardwareManager.Stations; frmStationItem f = new frmStationItem(ss); DialogResult dr = f.ShowDialog(); if (dr == DialogResult.OK) { AddStationToTreeView(this.tvStation, f.Station); } }
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void mnuStationEdit_Click(object sender, EventArgs e) { TreeNode selectedTN = this.tvStation.SelectedNode; if (selectedTN != null) { Station st = selectedTN.Tag as Station; if (st != null) { StationCollection ss = YeHeCommuniServerApp.Default.CommuniSoft.HardwareManager.Stations; frmStationItem f = new frmStationItem(ss, st); DialogResult dr = f.ShowDialog(this); if (dr == DialogResult.OK) { selectedTN.Text = st.Name; } } else { NUnit.UiKit.UserMessage.DisplayFailure(strings.PleaseSelectStation); } } }