public FormSettings(IceChatOptions Options, IceChatFontSetting Fonts, IceChatEmoticon Emoticons, IceChatSounds Sounds, bool showFonts) { InitializeComponent(); this.iceChatOptions = Options; this.iceChatFonts = Fonts; this.iceChatEmoticons = Emoticons; this.iceChatSounds = Sounds; LoadSettings(); this.Activated += new EventHandler(OnActivated); if (showFonts == true) tabControlOptions.SelectedTab = tabFonts; }
public FormSettings(IceChatOptions Options, IceChatFontSetting Fonts, IceChatEmoticon Emoticons, IceChatSounds Sounds) { InitializeComponent(); this.iceChatOptions = Options; this.iceChatFonts = Fonts; this.iceChatEmoticons = Emoticons; this.iceChatSounds = Sounds; LoadSettings(); this.Activated += new EventHandler(OnActivated); this.textNickComplete.KeyDown += new KeyEventHandler(OnKeyDown); pictureTSHelp.Image = StaticMethods.LoadResourceImage("help.png"); pictureTSHelp.Click += new EventHandler(pictureTSHelp_Click); }
private void FirstRunSaveOptions(IceChatOptions options, IceChatFontSetting fonts) { this.iceChatOptions = options; this.iceChatFonts = fonts; SaveFonts(); SaveOptions(); }
private void LoadOptions() { if (File.Exists(optionsFile)) { XmlTextReader textReader = null; try { XmlSerializer deserializer = new XmlSerializer(typeof(IceChatOptions)); textReader = new XmlTextReader(optionsFile); iceChatOptions = (IceChatOptions)deserializer.Deserialize(textReader); textReader.Close(); } catch (Exception) { textReader.Close(); errorMessages.Add("There was a problem loading IceChatOptions.xml. Default options loaded"); iceChatOptions = new IceChatOptions(); SaveOptions(); } } else { //create default settings iceChatOptions = new IceChatOptions(); SaveOptions(); } }