public Form1() { InitializeComponent(); chatTextBox.ReadOnly = true; msgTextBox.Enabled = false; sndBtn.Enabled = false; try { var sr = new StreamReader(@"Client_info/data_info.txt"); string buffer = sr.ReadToEnd(); sr.Close(); string[] connect_info = buffer.Split(':'); ip = IPAddress.Parse(connect_info[1]); label4.ForeColor = Color.Green; label4.Text = "IP Сервера: " + connect_info[0] + " Порта сервера: " + connect_info[1]; } catch { label4.ForeColor = Color.Red; label4.Text = "Настройки не найдены!"; Settings stform = new Settings(); stform.Show(); } }
private void filterToolStripMenuItem_Click(object sender, EventArgs e) { Settings form = new Settings(this, chatBots.ToString(), delay.ToString(), msgCount.ToString()); form.Show(); }
private void settingsToolStripMenuItem_Click(object sender, EventArgs e) { Settings stn = new Settings(); stn.Show(); }