예제 #1
0
        private void FrmMain_Load(object sender, EventArgs e)
        {
            this.Text = "E车通同步工具 (" + Application.ProductVersion + ")";
            Console.WriteLine(AppSettings.CurrentSetting.ParkConnect);
            if (string.IsNullOrEmpty(AppSettings.CurrentSetting.ParkConnect) || !CheckConnect(AppSettings.CurrentSetting.ParkConnect))
            {
                FrmConnect frm = new FrmConnect();
                if (frm.ShowDialog() != DialogResult.OK)
                {
                    mnu_Exit_Click(this.mnu_Exit, EventArgs.Empty);
                    return;
                }
            }

            Mysetting.Current = (new SysParaSettingsBll(AppSettings.CurrentSetting.ParkConnect)).GetOrCreateSetting <Mysetting>();
            ShowMessage("软件启动");

            //Thread t1 = new Thread(new ThreadStart(SyncCardEventThread));
            //t1.IsBackground = true;
            //t1.Start();


            Thread t2 = new Thread(new ThreadStart(ParkfullCheckThread));

            t2.IsBackground = true;
            t2.Start();
        }
예제 #2
0
        private void mnu_Connect_Click(object sender, EventArgs e)
        {
            FrmConnect frm = new FrmConnect();

            if (frm.ShowDialog() != DialogResult.OK)
            {
                mnu_Exit_Click(this.mnu_Exit, EventArgs.Empty);
                return;
            }
        }