protected override void OnBeforeClose(HiLand.Utility.Event.EventArgs<EventControlEntity> eventArgs) { base.OnBeforeClose(eventArgs); if (this.newDir != this.originalDir) { bool isEffectButtion= MessageBoxHelper.Show("您改变的路径尚未保存,是否要退出?", "警告", MessageBoxIcon.Question); eventArgs.Data.Token = isEffectButtion; } }
protected override void OnSave(HiLand.Utility.Event.EventArgs<EventControlEntity> eventArgs) { base.OnSave(eventArgs); this.originalDir = this.newDir; BasicSettingEntity entity = new BasicSettingEntity(); entity.CanUsable = Logics.True; entity.DisplayName = "监控目录"; entity.SettingID = 1; entity.SettingKey = adMonitorDIRName; entity.SettingValue = this.newDir; bool isSuccessful= BasicSettingBLL.Instance.Update(entity); eventArgs.Data.Token = isSuccessful; eventArgs.Data.DelayOperationSecond = 3; }