コード例 #1
0
ファイル: sTDTMainForm.cs プロジェクト: babaq/NeuSys
 private void on_Click(object sender, EventArgs e)
 {
     if (TDTDev.ConnectDevice(axServerSelect1.ActiveServer))
     {
         if ((int)TDTDev.DeviceState >= 2)
         {
             if (axTankSelect1.ActiveTank != "")
             {
                 if (TDTDev.HotBlock != "")
                 {
                     if (axBlockSelect1.ActiveBlock == TDTDev.HotBlock)
                     {
                         string nsfile = TDTDev.nsFile(axServerSelect1.ActiveServer, axTankSelect1.ActiveTank.Remove(0, axTankSelect1.ActiveTank.LastIndexOf("\\") + 1), TDTDev.HotBlock);
                         if (nsfile != null)
                         {
                             nsFile = nsfile;
                             var a = NeuSysConsole.CurrentModule("Analysis");
                             if (a == null)
                             {
                                 var t = new Analysis.AMainForm(NeuSysConsole);
                                 NeuSysConsole.SubscribeModule(t);
                                 t.Show();
                             }
                         }
                     }
                     else
                     {
                         MessageBox.Show("Selected Block Not the Active one, Reselect !", "Block Not Active !");
                     }
                 }
                 else
                 {
                     MessageBox.Show("Selected Tank Not the Active one, Reselect !", "Tank Not Active !");
                 }
             }
             else
             {
                 MessageBox.Show("Select the Online Tank to begin !", "No Tank Selected !");
             }
         }
         else
         {
             MessageBox.Show("TDT OpenWorkbench Not Running !", "Not Active !");
         }
     }
     else
     {
         MessageBox.Show("TDT OpenWorkbench Not Ready !", "No Connection !");
     }
 }
コード例 #2
0
ファイル: sTDTMainForm.cs プロジェクト: babaq/NeuSys
 private void off_Click(object sender, EventArgs e)
 {
     string nsfile = TDTDev.nsFile(axServerSelect1.ActiveServer, axTankSelect1.ActiveTank.Remove(0, axTankSelect1.ActiveTank.LastIndexOf("\\") + 1), axBlockSelect1.ActiveBlock);
     if (nsfile !=null)
     {
         nsFile = nsfile;
         var a = NeuSysConsole.CurrentModule("Analysis");
         if (a == null)
         {
             var t = new Analysis.AMainForm(NeuSysConsole);
             NeuSysConsole.SubscribeModule(t);
             t.Show();
         }
     }
 }