Example #1
0
        private void buttonSave_Click(object sender, System.EventArgs e)
        {
            dbMgr.UpdateRS232Settings(commSettings.ToArray());

            dbMgr.SaveConfig();
            this.Close();
        }
Example #2
0
        public bool Init()
        {
            // if (dbMgr.OpenConfig(configFileName))
            Object[] settings;
            if ((settings = dbMgr.ReadRS232Config()) != null)
            {
                rs232CommSettings = new RS232Settings(settings);
                commMgr           = new RS232Connector();
                // commMgr.Init(rs232CommSettings.ToArray());
            }
            else
            {
                rs232CommSettings = new RS232Settings();
                commMgr           = new RS232Connector();
            }
            FillInitialPollingQ();
            if (running = commMgr.Init(rs232CommSettings.ToArray()))
            {
                commThread      = new Thread(new ThreadStart(MainProcess));
                commThread.Name = "Communication Thread";
                commThread.Start();
            }

            //commMgr.RecieveDataEvent += new RecieveDataDelegate(TreatRecievedData);
            return(running);
        }