예제 #1
0
        private void GrowlerSettingsPanel_Load(object sender, EventArgs e)
        {
            Dictionary <string, object> settings = this.GetSettings();
            object val;

            if (settings.TryGetValue(GrowlerSettingKeymap.GetKey(GrowlerSetting.Silent), out val) && (bool)val)
            {
                checkBoxSilent.Checked = true;
            }
            if (settings.TryGetValue(GrowlerSettingKeymap.GetKey(GrowlerSetting.IgnoreClose), out val) && (bool)val)
            {
                checkBoxIgnoreClose.Checked = true;
            }
            if (settings.TryGetValue(GrowlerSettingKeymap.GetKey(GrowlerSetting.ShowAppName), out val) && (bool)val)
            {
                checkBoxShowAppName.Checked = true;
            }
            if (settings.TryGetValue(GrowlerSettingKeymap.GetKey(GrowlerSetting.PersistNotifications), out val) && (bool)val)
            {
                checkBoxPersistNotifications.Checked = true;
            }
            if (settings.TryGetValue(GrowlerSettingKeymap.GetKey(GrowlerSetting.DebugLogging), out val) && (bool)val)
            {
                checkBoxDebugLogging.Checked = true;
            }
        }
예제 #2
0
        private T GetSettingOrDefault <T>(GrowlerSetting setting, T def)
        {
            string key = GrowlerSettingKeymap.GetKey(setting);

            if (!this.SettingsCollection.ContainsKey(key))
            {
                return(def);
            }
            return((T)this.SettingsCollection[key]);
        }
예제 #3
0
 private void checkBoxDebugLogging_CheckedChanged(object sender, EventArgs e)
 {
     this.SaveSetting(GrowlerSettingKeymap.GetKey(GrowlerSetting.DebugLogging), checkBoxDebugLogging.Checked);
 }
예제 #4
0
 private void checkBoxPersistNotifications_CheckedChanged(object sender, EventArgs e)
 {
     this.SaveSetting(GrowlerSettingKeymap.GetKey(GrowlerSetting.PersistNotifications), checkBoxPersistNotifications.Checked);
 }
예제 #5
0
 private void checkBoxShowAppName_CheckedChanged(object sender, EventArgs e)
 {
     this.SaveSetting(GrowlerSettingKeymap.GetKey(GrowlerSetting.ShowAppName), checkBoxShowAppName.Checked);
 }
예제 #6
0
 private void checkBoxIgnoreClose_CheckedChanged(object sender, EventArgs e)
 {
     this.SaveSetting(GrowlerSettingKeymap.GetKey(GrowlerSetting.IgnoreClose), checkBoxIgnoreClose.Checked);
 }
예제 #7
0
 private void checkBoxSilent_CheckedChanged(object sender, EventArgs e)
 {
     this.SaveSetting(GrowlerSettingKeymap.GetKey(GrowlerSetting.Silent), checkBoxSilent.Checked);
 }