Beispiel #1
0
 private void ApplyConfig(Config config)
 {
     if (config.InterfaceStyle == 0) //System
         tstMain.RenderMode = ToolStripRenderMode.System;
     else if (config.InterfaceStyle == 1) //Office 2003
         tstMain.RenderMode = ToolStripRenderMode.ManagerRenderMode;
 }
Beispiel #2
0
        public void Reset()
        {
            Config config = new Config();
            config.Save(defaultConfigPath);

            Apply(config);
        }
Beispiel #3
0
        private void ApplyConfig(Config config, bool doingInit)
        {
            if (doingInit)
                this.WindowState = (FormWindowState)config.MainWindowState;

            if (config.InterfaceStyle == 0) //System
                toolStrip1.RenderMode = ToolStripRenderMode.System;
            else if (config.InterfaceStyle == 1) //Office 2003
                toolStrip1.RenderMode = ToolStripRenderMode.ManagerRenderMode;
        }
Beispiel #4
0
        public void ApplyDefault()
        {
            Config config;

            if (File.Exists(defaultConfigPath))
            {
                config = Config.LoadFrom(defaultConfigPath);
            }
            else
            {
                config = new Config();
                config.Save(defaultConfigPath);
            }

            Apply(config);
        }
Beispiel #5
0
 private void ApplyConfig(Config config)
 {
     if (config.InterfaceStyle == 0)
         tstInventory.RenderMode = ToolStripRenderMode.System;
     else if (config.InterfaceStyle == 1)
         tstInventory.RenderMode = ToolStripRenderMode.ManagerRenderMode;
 }
Beispiel #6
0
 public void Apply(Config config)
 {
     currentConfig = config;
     OnConfigApplied(new ConfigAppliedEventArgs(currentConfig));
 }
Beispiel #7
0
        public static Config LoadFrom(string filename)
        {
            Config config = new Config();
            IConfigSource conf = new IniConfigSource(filename);

            config.Version = conf.Configs["General"].GetInt("Version");

            config.MainWindowState = conf.Configs["Interface"].GetInt("MainWindowState");
            config.InterfaceStyle = conf.Configs["Interface"].GetInt("Style");

            config.FirstName = conf.Configs["Login"].GetString("FirstName");
            config.LastName = conf.Configs["Login"].GetString("LastName");
            config.PasswordMD5 = conf.Configs["Login"].GetString("Password");
            config.LoginGrid = conf.Configs["Login"].GetInt("Grid");
            config.LoginUri = conf.Configs["Login"].GetString("Uri");
            config.LoginLocationType = conf.Configs["Login"].GetInt("LocationType");
            config.LoginLocation = conf.Configs["Login"].GetString("Location");

            config.ChatTimestamps = conf.Configs["Text"].GetBoolean("ChatTimestamps");
            config.IMTimestamps = conf.Configs["Text"].GetBoolean("IMTimestamps");

            return config;
        }
Beispiel #8
0
 public ConfigAppliedEventArgs(Config appliedConfig)
 {
     this.appliedConfig = appliedConfig;
 }