public virtual void Form_Load(object sender, EventArgs e) { if (!this.DesignMode) { // 设置鼠标繁忙状态,并保留原先的状态 var holdCursor = this.Cursor; this.Cursor = Cursors.WaitCursor; this.FormLoaded = false; try { if (!this.DesignMode) { // 是否记录访问日志 if (SystemInfo.EnableRecordLog && (SystemInfo.LogOned && this.RecordFormLog)) { // 调用服务事件 //this.LogId = RDIFrameworkService.Instance.LogService.WriteLog(UserInfo, this.Name, this.Text, "FormLoad"); var platFormService = new RDIFrameworkService(); platFormService.LogService.WriteLog(UserInfo, this.Name, RDIFrameworkMessage.GetMessage(this.Name), "FormLoad", RDIFrameworkMessage.LoadWindow); this.CloseCommunicationObject(platFormService.LogService); } } // 必须放在初始化组件之前 this.GetIcon(); // 获得页面的权限 this.GetPermission(); // 加载窗体 this.FormOnLoad(); // 设置按钮状态 this.SetControlState(); if (SystemInfo.MultiLanguage) { try { // 多语言国际化加载 if (ResourceManagerWrapper.Instance.GetLanguages() != null) { this.Localization(this); } } catch (Exception ex) { MessageBoxHelper.ShowErrorMsg(ex.Message); } } if (this.LoadUserParameters) { // 客户端页面配置加载 this.LoadUserParameter(this); } // 设置帮助 this.SetHelp(); } catch (Exception ex) { this.ProcessException(ex); } finally { this.FormLoaded = true; // 设置鼠标默认状态,原来的光标状态 this.Cursor = holdCursor; } } }