コード例 #1
0
 private void toolStripMenuItemAboutUs_Click(object sender, EventArgs e)
 {
     FrmStart form = new FrmStart();
     form.ShowDialog(this);
 }
コード例 #2
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            this.StartPosition = FormStartPosition.CenterParent;
            this.WindowState = FormWindowState.Maximized;
            this.KeyPreview = true;

            //UserUtils.ShowError(dbconnString);
            //FreightForwarder.Client.DBHelper.GetEntries();

            //(new FreightForwarder.Business.BusinessBase()).GetRouteInformationItems(null);

            if (Session.SOFT_VERSION_TYPE == SoftVersionType.Client)
            {
                //Thread validateThread = new Thread(new ParameterizedThreadStart(ValidateSoft));
                //validateThread.IsBackground = true;
                //validateThread.Start();

                toolStrip1.Visible = false;
                menuStrip1.Visible = false;
                _load = new FrmStart();
                _load.TopMost = true;
                _load.StatusInfo = "正在验证软件信息,请耐心等待。。。";
                _load.Show();

                ValidateSoftHandler vsh = new ValidateSoftHandler(ValidateSoft);
                vsh.BeginInvoke(new AsyncCallback(ValidateSoftComplete), null);

                //OpenProgressForm("正在验证软件信息,请耐心等待。", null);
            }

            if (Session.SOFT_VERSION_TYPE == SoftVersionType.Server)
            {
                this.Text = "代贸通物流平台-服务端";
                toolStripStatusLblCompanyInfo.Text = "服务端";
                toolStripMenuItemSoftInfo.Visible = false;
                ShowSingleWindow(typeof(FrmMain), FormWindowState.Maximized);
            }
        }