コード例 #1
0
ファイル: frmMain.cs プロジェクト: leadscloud/lx
        /// <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);
            }
        }
コード例 #2
0
ファイル: frmMain.cs プロジェクト: leadscloud/lx
        /// <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);
                }
            }
        }
コード例 #3
0
ファイル: frmMain.cs プロジェクト: hkiaipc/lx
 /// <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);
         }
     }
 }
コード例 #4
0
ファイル: frmMain.cs プロジェクト: hkiaipc/lx
 /// <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);
     }
 }