Exemple #1
0
 void plcReconnected(DetectedPLC plc, bool newIP)
 {
     if (newIP)
     {
         plc.IP = plc.InternalIP;
     }
     DiscoverPLC.PLCbs.ResetBindings(false);
     PLCGrid.ClearSelection();
 }
Exemple #2
0
 private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
 {
     if (lastSelectedRow == e.RowIndex)
     {
         PLCGrid.ClearSelection();
         lastSelectedRow = -1;
     }
     else
     {
         lastSelectedRow = e.RowIndex;
     }
 }
Exemple #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;
        }
Exemple #4
0
 void plcDisconnected(DetectedPLC plc)
 {
     DiscoverPLC.PLCbs.ResetBindings(false);
     PLCGrid.ClearSelection();
 }