protected override void OnStartup(StartupEventArgs e)
        {
            base.OnStartup(e);

            Config config = new Config();
            try
            {
                config.LoadWithoutEvent();
            }
            catch
            {

            }

            if (config.FirstTimeStarted)
            {
                SplashView splash = new SplashView();
                splash.IsVisibleChanged += splash_IsVisibleChanged;
                splash.Show();
            }
            else
            {
                StartMain(config.IsTradingPostDataProvider);
            }
        }
 void Config_Loading(object sender, EventArgs e)
 {
     this.Config = (Config)sender;
     LoadColumns();
 }
        public void LoadConfig(Config config)
        {
            BuyGemsRules.Rules = config.RulesBuyGems;
            BuyGoldRules.Rules = config.RulesBuyGold;

            BuyGemsRules.ActivateEventHandler();
            BuyGoldRules.ActivateEventHandler();
        }
        private void LoadConfig()
        {
            Config = new Config();
            try
            {
                Config.Load();
            }
            catch
            {
                Config.Save();
            }

            foreach (HotItem item in Config.Items)
            {
                AddItemInternal(item);
                item.BuyContext.Item = item; // XML Loading
                item.SellContext.Item = item;// XML Loading
                foreach (NotifierRule r in item.BuyContext.Rules)
                {
                    r.Item = item;
                    item.BuyContext.ActivateEventHandler(r);

                }
                foreach (NotifierRule r in item.SellContext.Rules)
                {
                    r.Item = item;
                    item.SellContext.ActivateEventHandler(r);
                }
            }

            HotItemController.Gem.LoadConfig(Config);
            SettingsViewModel.ChangeLanguage(Config.LanguageKey);
        }