Пример #1
0
 private void btn_start_Click(object sender, EventArgs e)
 {
     Secs4Net.SecsGem secsGem = new Secs4Net.SecsGem(this.rbtn_active.Checked, IPAddress.Parse(this.tb_ip.Text.Trim()), Int32.Parse(this.tb_port.Text));
     cimClient = new CIM4EQT(secsGem, 1000);
     cimClient.ConnectionChanged += CimClient_ConnectionChanged;
     cimClient.ScenarioInitialize(this, this, this, this, this, this, this);
 }
Пример #2
0
        private void Client_Load(object sender, EventArgs e)
        {
            Thread.CurrentThread.Name = "Main";

            secsGem = new SecsGem(true, IPAddress.Parse("192.168.0.145"), 1024);
            secsGem.ConnectionChanged      += SecsGem_ConnectionChanged;
            secsGem.PrimaryMessageReceived += SecsGem_PrimaryMessageReceived;
            secsGem.Start();
            cimClient = new CIM4EQT(secsGem);
            cimClient.ScenarioInitialize(this);


            Application.ThreadException += Application_ThreadException;
            AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
        }