public FormMain() { InitializeComponent(); Text = "GetOrderInfo by(c)Kandakov Dmitry v" + Application.ProductVersion; tokenId = statusStripMain.Items[1].Text = Properties.Settings.Default.TokenId; tLogin = textLogin.Text = Properties.Settings.Default.Login; tPass = textPassword.Text = Properties.Settings.Default.Password; this.Height = Properties.Settings.Default.WinHeight; Location = new Point(Properties.Settings.Default.WinX, Properties.Settings.Default.WinY); orders = new List <Order>(); if (Properties.Settings.Default.ConnetcionLocal == "локальный") { strGetId = WebHTTP.getStrId("10.10.10.4"); strGetOrder = WebHTTP.getStrOrder("10.10.10.4"); remoteToolStripMenuItem.Checked = true; } else { strGetId = WebHTTP.getStrId("109.73.38.93:61079"); strGetOrder = WebHTTP.getStrOrder("109.73.38.93:61079"); editGETRequset.Text = strGetOrder; localToolStripMenuItem.Checked = true; } editGETRequset.Text = strGetOrder; toolStripDropDownButton1.Text = Properties.Settings.Default.ConnetcionLocal; }
private void localToolStripMenuItem_Click(object sender, EventArgs e) { if (!localToolStripMenuItem.Checked) { strGetId = WebHTTP.getStrId("109.73.38.93:61079"); strGetOrder = WebHTTP.getStrOrder("109.73.38.93:61079"); editGETRequset.Text = strGetOrder; localToolStripMenuItem.Checked = true; remoteToolStripMenuItem.Checked = false; toolStripDropDownButton1.Text = "удаленный"; Properties.Settings.Default.ConnetcionLocal = "удаленный"; Properties.Settings.Default.Save(); } }