/// <summary> /// The main method point for the application. /// </summary> public void Execute() { try { InitApplicationExecptionBehavior(); InitDevApplicationSkins(); FanRibbonFormContainer form = new FanRibbonFormContainer(); BeforeApplicationRun(form); Application.Run(form); BeforeApplicationEnd(); } catch (Exception ex) { string str = GetExceptionMsg(ex, string.Empty); MessageBox.Show(str, "系统错误", MessageBoxButtons.OK, MessageBoxIcon.Error); logger.Error(str); try { ApplicationException(ex); } catch (Exception exx) { string strr = GetExceptionMsg(ex, "系统崩溃调用处理方法时"); logger.Error(str); } } }
/// <summary> /// 在窗体创建后执行 /// </summary> public virtual void BeforeApplicationRun(FanRibbonFormContainer mainForm) { logger.Info("BeforeApplicationRun"); }