//************************************************************************************** private void butOK_Click(object sender, EventArgs e) { if (NameBox.Text.Trim() == string.Empty) { NameBox.ShowBalloon(ToolTipIcon.Warning, "Name", "must not be empty"); return; } if (HostBox.Text.Trim() == string.Empty) { HostBox.ShowBalloon(ToolTipIcon.Warning, "Host", "must not be empty"); return; } server.Name = NameBox.Text; server.Host = HostBox.Text; server.Username = UserBox.Text; server.Password = PassBox.Text; server.IsFavorite = IsFavorite.Checked; server.Port = PortBox.Text.ToIntOrDefault(3306); server.TabColor = tabColorBox.SelectedColor.ToArgb(); server.Notes = NotesBox.Text; Main.config.SaveServer(server); Close(); }
//************************************************************************************** private void btnOK_Click(object sender, EventArgs e) { if (NameBox.Text.Trim() == string.Empty) { NameBox.ShowBalloon(ToolTipIcon.Warning, "Name", "must not be empty"); return; } if (HostBox.Text.Trim() == string.Empty) { HostBox.ShowBalloon(ToolTipIcon.Warning, "Host", "must not be empty"); return; } server.Name = NameBox.Text; server.Host = HostBox.Text; server.Username = UserBox.Text; server.Password = PassBox.Text; server.IsFavorite = IsFavorite.Checked; server.UseHtmlLogin = checkUseHtml.Checked; server.HtmlUserBox = userIDbox.Text; server.HtmlPassBox = passIDbox.Text; server.HtmlLoginBtn = loginIDbox.Text; server.TabColor = tabColorBox.SelectedColor.ToArgb(); server.Notes = NotesBox.Text; Main.config.SaveServer(server); Close(); }
//************************************************************************************************************* private void butOK_Click(object sender, EventArgs e) { if (NameBox.Text.Trim() == string.Empty) { HostBox.ShowBalloon(ToolTipIcon.Warning, "Name", "must not be empty"); return; } server.Name = NameBox.Text; server.Host = HostBox.Text; server.Username = UserBox.Text; server.Password = PassBox.Text; server.IsFavorite = IsFavorite.Checked; server.Port = PortBox.Text.ToIntOrDefault(21); if (server.Type == ServerType.FTP) { server.FtpDataType = ((ListItem)FtpDataType.SelectedItem).ID; } server.TabColor = tabColorBox.SelectedColor.ToArgb(); server.Notes = NotesBox.Text; server.SshKey = SshKeyBox.Text; server.Encryption = UseTLS.Checked; Main.config.SaveServer(server); Close(); }
//************************************************************************************** private void btnOK_Click(object sender, EventArgs e) { if (NameBox.Text.Trim() == string.Empty) { NameBox.ShowBalloon(ToolTipIcon.Warning, "Name", "must not be empty"); return; } if (HostBox.Text.Trim() == string.Empty) { HostBox.ShowBalloon(ToolTipIcon.Warning, "Host", "must not be empty"); return; } if (ColorCombo.SelectedItem != null) { server.Color = ((ListItem)ColorCombo.SelectedItem).ID; } server.Name = NameBox.Text; server.Host = HostBox.Text; server.Username = UserBox.Text; server.Password = PassBox.Text; server.IsFavorite = IsFavorite.Checked; server.UseSound = UseSound.Checked; server.ConnectDrives = ConnectDrives.Checked; server.SendKeys = SendKeys.Checked; server.Port = PortBox.Text.ToIntOrDefault(3389); server.Themes = checkThemes.Checked; server.Certificates = Certificates.Checked; server.TabColor = tabColorBox.SelectedColor.ToArgb(); server.Encryption = Encryption.Checked; switch (SizeCombo.SelectedIndex) { case 0: server.Width = 0; server.Height = 0; break; case 1: server.Width = 800; server.Height = 600; break; case 2: server.Width = 1024; server.Height = 768; break; case 3: server.Width = 1280; server.Height = 1024; break; } server.Notes = NotesBox.Text; Main.config.SaveServer(server); Close(); }
//************************************************************************************** private void btnOK_Click(object sender, EventArgs e) { if (NameBox.Text.Trim() == string.Empty) { NameBox.ShowBalloon(ToolTipIcon.Warning, "Name", "must not be empty"); return; } if (HostBox.Text.Trim() == string.Empty) { HostBox.ShowBalloon(ToolTipIcon.Warning, "Host", "must not be empty"); return; } server.Name = NameBox.Text; server.Host = HostBox.Text; server.Username = UserBox.Text; server.Password = PassBox.Text; server.IsFavorite = IsFavorite.Checked; server.SSH1 = checkSSH1.Checked; server.Port = PortBox.Text.ToIntOrDefault(22); server.TabColor = tabColorBox.SelectedColor.ToArgb(); server.Notes = NotesBox.Text; server.SshKey = SshKeyBox.Text; if (radioPoderosa.Checked) { server.SshTerminal = 2; } else { server.SshTerminal = 1; } Main.config.SaveServer(server); Close(); }