public Form1() { InitializeComponent(); Start.ToggleActive(); Stop.ToggleActive(); mainThreadContext = SynchronizationContext.Current; accountFactory = new AccountFactory(); itemFactory = new Factory <Item>(); images.Add("bonusbox", Image.FromFile( @"C:\Users\DecaPod\Documents\visual studio 2017\Projects\WindowsFormsApp1\WindowsFormsApp1\Resources\box.bmp")); //images.Add("jump", Image.FromFile( // @"C:\Users\DecaPod\Documents\visual studio 2017\Projects\WindowsFormsApp1\WindowsFormsApp1\Resources\jump.bmp")); images.Add("minimap", Image.FromFile( @"C:\Users\DecaPod\Documents\visual studio 2017\Projects\WindowsFormsApp1\WindowsFormsApp1\Resources\minimap.bmp")); cs = new CaptureScreen(); http = new Http { Factory = accountFactory }; http.OnHttpResponseErrorEvent += () => { Console.WriteLine(@"Logged Of"); }; io = new FileIO("Test.json"); io.Initialize(); var accounts = io.GetAccounts("account"); if (accounts != null) { foreach (var account in accounts) { accountFactory.AddData(account); } } io.AddDataGroup("info"); io.AddDataGroup("account"); SavedAccountsComboBox.SelectionChangeCommitted += (sender, args) => { var selected = (Account)SavedAccountsComboBox.SelectedItem; UsernameText.Text = selected.Nick; PassText.Text = selected.Password; }; SavedAccountsComboBox.Items.AddRange(accountFactory.GetAllDataValuesAsArray()); Closing += (sender, args) => { io.WriteAsync(); }; itemFactory.AddData(new Ammo("lcb-10", 10, CurrencyTypes.Credits, ItemSubTypes.laser, Category.battery)); itemFactory.AddData(new Ammo("eco-10", 1500, CurrencyTypes.Credits, ItemSubTypes.rocketlauncher, Category.rocket)); SetupDataGridView(); galaxyGates.Add(new GalaxyGate("Alpha", 1, 34, 0)); galaxyGates.Add(new GalaxyGate("Beta", 2, 48, 0)); galaxyGates.Add(new GalaxyGate("Gamma", 3, 82, 0)); galaxyGates.Add(new GalaxyGate("Delta", 4, 128, 0)); galaxyGates.Add(new GalaxyGate("Epsilon", 5, 99, 0)); galaxyGates.Add(new GalaxyGate("Zeta", 6, 11, 0)); galaxyGates.Add(new GalaxyGate("Kappa", 7, 120, 0)); galaxyGates.Add(new GalaxyGate("Lambda", 8, 45, 0)); galaxyGates.Add(new GalaxyGate("Hades", 13, 45, 0)); galaxyGates.Add(new GalaxyGate("Kuiper", 19, 100, 0)); GatesComboBox.Items.AddRange(items: galaxyGates.ToArray()); spinAmmountCb.Items.AddRange(new object[] { 1, 5, 10, 100 }); LabelPremium.ForeColor = Color.Red; LabelPremium.Text = @"Not Logged"; pictureBox1.SizeMode = PictureBoxSizeMode.StretchImage; WebBrowserExtensions.ClearCache(); webBrowser1.Navigate("https://www.darkorbit.bigpoint.com"); }