Beispiel #1
0
 private void ValueSaving(object sender, SettingValueCancelEventArgs e)
 {
     if (AllowMinimized == false && m_window.WindowState == WindowState.Minimized)
     {
         e.Cancel = true;
     }
 }
Beispiel #2
0
 private void UserSettingLoading(object sender, SettingValueCancelEventArgs e)
 {
     if (SettingLoading != null)
     {
         SettingLoading(sender, e);
     }
 }
        protected virtual object OnValueLoading(string name, object value)
        {
            if (ValueLoading == null)
            {
                return(value);
            }

            SettingValueCancelEventArgs _e = new SettingValueCancelEventArgs(this, name, value);

            ValueLoading(this, _e);
            return(_e.Cancel ? null : _e.TargetValue);
        }