Example #1
0
        private void init()
        {
            InitializeComponent();
            Size sizeScreen = Screen.PrimaryScreen.WorkingArea.Size;

            this.Bounds           = new Rectangle(new Point(sizeScreen.Width - this.Size.Width, sizeScreen.Height - this.Size.Height), this.Size);
            ComPort.DataReceived += new System.IO.Ports.SerialDataReceivedEventHandler(port_DataReceived_1);
            plcState.Show();
            PCLCommunication plc = new PCLCommunication(plcState, microToPLC);

            plc.start();
            Thread polling = new Thread(new ThreadStart(executePolling));

            polling.Start();
        }
 private void init()
 {
     InitializeComponent();
     Size sizeScreen = Screen.PrimaryScreen.WorkingArea.Size;
     this.Bounds = new Rectangle(new Point(sizeScreen.Width - this.Size.Width, sizeScreen.Height - this.Size.Height), this.Size);
     ComPort.DataReceived += new System.IO.Ports.SerialDataReceivedEventHandler(port_DataReceived_1);
     plcState.Show();
     PCLCommunication plc = new PCLCommunication(plcState,microToPLC);
     plc.start();
     Thread polling = new Thread(new ThreadStart(executePolling));
     polling.Start();
 }