示例#1
0
 void plcReconnected(DetectedPLC plc, bool newIP)
 {
     if (newIP)
     {
         plc.IP = plc.InternalIP;
     }
     DiscoverPLC.PLCbs.ResetBindings(false);
     PLCGrid.ClearSelection();
 }
示例#2
0
 private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
 {
     if (lastSelectedRow == e.RowIndex)
     {
         PLCGrid.ClearSelection();
         lastSelectedRow = -1;
     }
     else
     {
         lastSelectedRow = e.RowIndex;
     }
 }
示例#3
0
        private void FindPLCs()
        {
            Thread t = new Thread(delegate()
            {
                this.BeginInvoke(new Action(delegate()
                {
                    PingTimer.Stop();
                    changeCursor(Cursors.WaitCursor);
                    EnableButtons(false);
                    DiscoverPLC.PLCbs.Clear();
                    DiscoverPLC.DiscoverPLCs();
                    changeCursor(Cursors.Default);
                    EnableButtons(true);
                    DiscoverPLC.PLCbs.ResetBindings(false);
                    PLCGrid.ClearSelection();
                    PingTimer.Start();
                }));
                lastSelectedRow = -1;
            });

            t.Start();
            this.ActiveControl = Discoverbtn;
            this.ActiveControl = null;
        }
示例#4
0
 void plcDisconnected(DetectedPLC plc)
 {
     DiscoverPLC.PLCbs.ResetBindings(false);
     PLCGrid.ClearSelection();
 }