private void btnChangeServer_Click(object sender, EventArgs e) { Choose_url url = new Choose_url(); url.ShowDialog(); if (url.DialogResult == System.Windows.Forms.DialogResult.OK) { Properties.Settings.Default.Prefix = url.Url; Properties.Settings.Default.Save(); prefix = url.Url; } }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); if (Properties.Settings.Default.Prefix == "") { Choose_url url = new Choose_url(); url.ShowDialog(); string prefix = url.Url; Properties.Settings.Default.Prefix = prefix; Properties.Settings.Default.Save(); } Application.Run(new Main(Properties.Settings.Default.Prefix)); }