Esempio n. 1
0
 public void LoadSounds()
 {
     if (File.Exists(soundsFile))
     {
         XmlTextReader textReader = null;
         try
         {
             XmlSerializer deserializer = new XmlSerializer(typeof(IceChatSounds));
             textReader = new XmlTextReader(soundsFile);
             iceChatSounds = (IceChatSounds)deserializer.Deserialize(textReader);
             textReader.Close();
         }
         catch (Exception)
         {
             textReader.Close();
             errorMessages.Add("There was a problem loading IceChatSounds.xml. Default sounds loaded");
             iceChatSounds = new IceChatSounds();
             iceChatSounds.AddDefaultSounds();
         }
     }
     else
     {
         iceChatSounds = new IceChatSounds();
         iceChatSounds.AddDefaultSounds();
     }
 }
Esempio n. 2
0
        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;
        }
Esempio n. 3
0
        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);
        }