private string _localVersion;                                                                // version of the current h2vonline

        public MainWindow()                                                                          // Fire to start app opens (look at window_loaded event for finer tuning)
        {
            InitiateTrace();                                                                         // Starts our console/debug trace

            try
            {
                InitializeComponent(); // Try to load our pretty wpf
            }
            catch
            {
                Trace.WriteLine("Failed to load .Net components. Please make sure you have .Net 4.5.2 installed");
            }
            Trace.WriteLine(Cfg.Initial() ? @"Config loaded" : @"Config Defaulted"); // Grabs settings or defaults them
            if (Load())
            {
                Trace.WriteLine("Config values loaded");
            }
            else
            {
                Cfg.DefaultSettings();
                Load();
                Trace.WriteLine("Config values failed to load. Resetting...");
            }
            ButtonAction.Content = !CheckVersion() ? "Update" : "Play"; // Check version and change main button depending
        }
        public MainWindow()  //Fire to start app opens (look at window_loaded event for finer tuning)
        {
            InitiateTrace(); //Starts our console/debug trace
            try { InitializeComponent(); } //Try to load our pretty wpf
            catch { Trace.WriteLine("Failed to load .Net components. Please make sure you have .Net 4.5.2 installed"); }

            Trace.WriteLine(Cfg.Initial() ? @"Config loaded" : @"Config Defaulted"); //Grabs settings or defaults them

            GetLatestVersions();
            //CheckInstall(); //Checks if game is installed properly

            if (!Load())
            {
                Cfg.DefaultSettings();
                Load();
                Trace.WriteLine("Config values failed to load. Resetting...");
            }
            else
            {
                Trace.WriteLine("Config values loaded");
            }

            if (Cfg.GetConfigVariable("login_token =", null) != null)
            {
                UsernameBoxLabel.Content = "Name:  ";
                Setup();
            }
            else if (UsernameBox.Text != "")
            {
                StartTimer();
            }
        }