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 LoadEmoticons() { if (File.Exists(emoticonsFile)) { XmlTextReader textReader = null; try { XmlSerializer deserializer = new XmlSerializer(typeof(IceChatEmoticon)); textReader = new XmlTextReader(emoticonsFile); iceChatEmoticons = (IceChatEmoticon)deserializer.Deserialize(textReader); textReader.Close(); } catch (Exception) { textReader.Close(); errorMessages.Add("There was a problem loading IceChatEmoticons.xml. No emoticons loaded"); iceChatEmoticons = new IceChatEmoticon(); SaveEmoticons(); } } else { iceChatEmoticons = new IceChatEmoticon(); SaveEmoticons(); } }