示例#1
0
        private static void Main()
        {
            try
            {
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
                var frmSplash = new FrmSplash();

                //Keep application context
                ApplicationContext = new ApplicationContext(frmSplash);
                Application.Run(ApplicationContext);
            }
            catch (Exception)
            {
                const string briefMsg = "អំពីការចូលទៅក្នុងប្រព័ន្ឋ";
                var detailMsg = Resources.MsgConnectionLost;
                using (var frmMessageBox = new FrmExtendedMessageBox())
                {
                    frmMessageBox.BriefMsgStr = briefMsg;
                    frmMessageBox.DetailMsgStr = detailMsg;
                    frmMessageBox.IsCanceledOnly = true;
                    frmMessageBox.ShowDialog();
                }
            }
        }
示例#2
0
 private static void Main()
 {
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     var frmSplash = new FrmSplash();
     Application.Run(frmSplash);
 }
示例#3
0
        private static void Main()
        {
            try
            {
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
                var frmSplash = new FrmSplash();

                //Keep application context
                ApplicationContext = new ApplicationContext(frmSplash);
                Application.Run(ApplicationContext);
            }
            catch (Exception)
            {
                const string briefMsg  = "អំពីការចូលទៅក្នុងប្រព័ន្ឋ";
                var          detailMsg = Resources.MsgConnectionLost;
                using (var frmMessageBox = new FrmExtendedMessageBox())
                {
                    frmMessageBox.BriefMsgStr    = briefMsg;
                    frmMessageBox.DetailMsgStr   = detailMsg;
                    frmMessageBox.IsCanceledOnly = true;
                    frmMessageBox.ShowDialog();
                }
            }
        }