Пример #1
0
        private void initConfig()
        {
            try
            {
                this.StartPosition = FormStartPosition.CenterScreen;
                //MessageBox.Show("FrmLabLIS 111 ", "");
                notifyIcon1 = new NotifyIcon();
                //MessageBox.Show("FrmLabLIS 111.1 ", "");
                notifyIcon1.Icon = Resources.ivf_lis;
                //MessageBox.Show("FrmLabLIS 111.2 ", "");
                notifyIcon1.BalloonTipText  = "";
                notifyIcon1.BalloonTipTitle = "LIS";
                notifyIcon1.Visible         = true;
                //MessageBox.Show("FrmLabLIS 111.3 ", "");
                ic.setCboPORT(cboPORT);
                //MessageBox.Show("333", "");
                ic.setCboBAUDRATE(cboBAUDRATE);
                //MessageBox.Show("444", "");
                ic.setCboDATABIT(cboDATABIT);
                ic.setCboStopBIT(cboSTOPBIT);
                ic.setCboParity(cboParity);
                ic.setCboHandShaking(cboHandshake);
                ic.setCboPrinter(cboPrinter);
                BtnConnect.Text = "Connect";

                //SerialPinChangedEventHandler1 = new SerialPinChangedEventHandler(PinChanged);
                ComPort.DataReceived += ComPort_DataReceived;

                this.Resize += FrmLabLIS_Resize;
                //MessageBox.Show("33333", "");
                menuShow.Click += MenuShow_Click;
                notifyIcon1.MouseDoubleClick += NotifyIcon1_MouseDoubleClick;
                this.FormClosing             += FrmLabLIS_FormClosing;
                BtnConnect.Click             += BtnConnect_Click;
                btnPrnSticker.Click          += BtnPrnSticker_Click;
                //MessageBox.Show("2222", "");
            }
            catch (Exception ex)
            {
                MessageBox.Show("error " + ex.Message, "");
            }
        }