Exemplo n.º 1
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;
        }
Exemplo n.º 2
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);
        }
Exemplo n.º 3
0
        private void FirstRunSaveOptions(IceChatOptions options, IceChatFontSetting fonts)
        {
            this.iceChatOptions = options;
            this.iceChatFonts = fonts;

            SaveFonts();
            SaveOptions();
        }
Exemplo n.º 4
0
 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();
     }
 }