private void BtnStart_Click(object sender, EventArgs e) { IPAddress ip; if (ipTextBox1.CanGetIP(out ip)) { string cn = @"Data Source = (LocalDB)\MSSQLLocalDB; AttachDbFilename = " + GetDataBaseDirectory.Get() + "; Integrated Security = True"; IPEndPoint endPoint = new IPEndPoint(ip, (int)Port.Value); string smtp = SmtpTextBox.Text; int port = (int)MailPort.Value; bool ssl = SSLCheckBox.Checked; string username = UserNameTextBox.Text; string password = PasswordTextBox.Text; ServerForm form; if (MailCheckBox.Checked) { form = new ServerForm((int)UserAmount.Value, cn, endPoint, smtp, port, ssl, username, password); } else { form = new ServerForm((int)UserAmount.Value, endPoint, cn); } form.Show(); Hide(); form.FormClosed += (o, arg) => Show(); } }
public CreateRoomScriptServerForm(ServerForm Owner) : base(Owner.OnlineServer) { this.Owner = Owner; }