Пример #1
0
        public FrmSecondDMain()
        {
            InitializeComponent();
            this.Text = "AGV调度系统实时显示";
            bool isSucc = true;

            try
            {
                ConnectConfigTool.setDBase();
            }
            catch (Exception ex)
            {
                MsgBox.ShowError(ex.Message + "请检查...");
                isSucc = false;
            }
            if (ConnectConfigTool.DBase == null || !isSucc)
            {
                //弹出维护数据库维护界面
                using (FrmSysConnSet frm = new FrmSysConnSet())
                {
                    if (frm.ShowDialog() != DialogResult.OK)
                    {
                        Application.ExitThread();
                        Application.Exit();
                        return;
                    }
                }
            }
            using (WaitDialogForm dialog = new WaitDialogForm("正在启动,请稍后...", "提示"))
            {
                InitCanvas("", false);
            }
        }
Пример #2
0
 /// <summary>
 /// 连接参数设置
 /// </summary>
 private void btnConnetSet_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
 {
     try
     {
         //弹出维护数据库维护界面
         using (FrmSysConnSet frm = new FrmSysConnSet())
         {
             if (frm.ShowDialog() == DialogResult.OK)
             {
                 if (MsgBox.ShowQuestion("需要重启生效,是否重新启动?") != DialogResult.Yes)
                 {
                     Application.Restart();
                 }
             }
         }
     }
     catch (Exception ex)
     { MsgBox.ShowError(ex.Message); }
 }