Beispiel #1
0
        }         // CreateSetting

        // ----------------------------------------------------------------------
        private void ValueSaving(object sender, SettingValueCancelEventArgs e)
        {
            if (AllowMinimized == false && form.WindowState == FormWindowState.Minimized)
            {
                e.Cancel = true;
            }
        }         // ValueSaving
Beispiel #2
0
        }         // UserSettingSaving

        // ----------------------------------------------------------------------
        private void UserSettingLoading(object sender, SettingValueCancelEventArgs e)
        {
            if (SettingLoading != null)
            {
                SettingLoading(sender, e);
            }
        }         // UserSettingLoading
Beispiel #3
0
        }         // OnValueSaving

        // ----------------------------------------------------------------------
        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);
        }         // OnValueLoading