示例#1
0
 public void initialize_advanced_add_group_textbox(TextBox textbox)
 {
     textbox.Font     = new Font("Calibri", 10);
     textbox.Location = DPIAwareScaling.ScalePoint(100, 45);
     textbox.Size     = DPIAwareScaling.ScaleSize(100, 27);
     textbox.Name     = "advanced_add_group_textbox";
 }
示例#2
0
        /// <summary>
        /// Initialize DataGridView with devices from sessions configuration.
        /// </summary>
        private void InitializeDataGridView()
        {
            this.dataGridView1.DefaultCellStyle.Font = new Font("Courier new", 10);
            this.dataGridView1.Size                  = DPIAwareScaling.ScaleSize(1200, 500);
            this.dataGridView1.AutoScrollOffset      = DPIAwareScaling.ScalePoint(200, 300);
            this.dataGridView1.Columns[0].Width      = 98;
            this.dataGridView1.CellMouseDoubleClick += new DataGridViewCellMouseEventHandler(OnDataGridViewCellMouseDoubleClick);

            for (int i = 0; i < containers_list.Count; i++)
            {
                Control[] hostname_textbox = containers_list[i].Controls.Find("hostname_textbox", true);

                if (!(hostname_textbox[0].Text == null || hostname_textbox[0].Text == ""))
                {
                    DataGridViewRow row = (DataGridViewRow)dataGridView1.Rows[0].Clone();
                    row.Cells[0].Value = i + 1;
                    row.Cells[2].Value = hostname_textbox[0].Text;
                    dataGridView1.Rows.Add(row);
                }
            }

            foreach (DataGridViewRow row in dataGridView1.Rows)
            {
                if (row.Index % 2 == 0)
                {
                    row.DefaultCellStyle.BackColor = Color.Gainsboro;
                }
            }

            this.dataGridView1.AllowUserToAddRows = false;
        }
示例#3
0
 public void initialize_new_connect_username_textbox(TextBox textbox)
 {
     textbox.Font     = new Font("Calibri", DPIAwareScaling.NewConnectUsernameTextboxFont);
     textbox.Location = DPIAwareScaling.ScalePoint(300, 2);
     textbox.Size     = DPIAwareScaling.ScaleSize(60, 27);
     textbox.Name     = "new_connect_username_textbox";
 }
示例#4
0
        public void initialize_sub_groups_combobox(ComboBox combobox, EventHandler combobox_SelectedIndexChanged,
                                                   EventHandler sub_groups_combobox_PKGroupChanged)
        {
            if (File.Exists(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments),
                                         "PuTTYStorm", "groups.xml")))
            {
                SavedGroupInfo groups = saved_groups.get_Groups();

                combobox.Items.Add("");

                foreach (string name in groups.names)
                {
                    combobox.Items.Add(name);
                }

                combobox.DropDownWidth = DropDownWidth(combobox);
            }
            combobox.Font                  = new Font("Calibri", 10);
            combobox.Location              = DPIAwareScaling.ScalePoint(147, 182);
            combobox.Size                  = DPIAwareScaling.ScaleSize(120, 32);
            combobox.Name                  = "sub_groups_combobox";
            combobox.DropDownStyle         = ComboBoxStyle.DropDownList;
            combobox.SelectedIndexChanged += new EventHandler(combobox_SelectedIndexChanged);
            combobox.SelectedIndexChanged += new EventHandler(sub_groups_combobox_PKGroupChanged);
        }
示例#5
0
 public void initialize_new_connect_host_textbox(TextBox textbox)
 {
     textbox.Font     = new Font("Calibri", DPIAwareScaling.NewConnectHostTextboxFont);
     textbox.Location = DPIAwareScaling.ScalePoint(43, 2);
     textbox.Size     = DPIAwareScaling.ScaleSize(200, 27);
     textbox.Name     = "new_connect_host_textbox";
 }
示例#6
0
 public void initialize_hostname_textbox(TextBox textbox)
 {
     textbox.Font     = new Font("Calibri", 12);
     textbox.Location = DPIAwareScaling.ScalePoint(70, 60);
     textbox.Size     = DPIAwareScaling.ScaleSize(260, 27);
     textbox.Name     = "hostname_textbox";
 }
示例#7
0
 public void initialize_username_textbox(TextBox textbox)
 {
     textbox.Font     = new Font("Calibri", 12);
     textbox.Location = DPIAwareScaling.ScalePoint(124, 98);
     textbox.Size     = DPIAwareScaling.ScaleSize(140, 27);
     textbox.Name     = "username_textbox";
 }
示例#8
0
 public void initialize_password_textbox(TextBox textbox)
 {
     textbox.Font     = new Font("Calibri", 12);
     textbox.Location = DPIAwareScaling.ScalePoint(124, 137);
     textbox.Size     = DPIAwareScaling.ScaleSize(140, 27);
     textbox.Name     = "password_textbox";
     textbox.UseSystemPasswordChar = true;
 }
示例#9
0
 public void initialize_new_connect_password_textbox(TextBox textbox)
 {
     textbox.Font     = new Font("Calibri", DPIAwareScaling.NewConnectPasswordTextboxFont);
     textbox.Location = DPIAwareScaling.ScalePoint(455, 2);
     textbox.Size     = DPIAwareScaling.ScaleSize(60, 27);
     textbox.Name     = "new_connect_password_textbox";
     textbox.UseSystemPasswordChar = true;
 }
示例#10
0
 public void initialize_new_connect_numbericupdown(NumericUpDown numericupdown)
 {
     numericupdown.Font     = new Font("Calibri", DPIAwareScaling.NewConnectNumericUpDownFont);
     numericupdown.Location = DPIAwareScaling.ScalePoint(550, 2);
     numericupdown.Size     = DPIAwareScaling.ScaleSize(43, 30);
     numericupdown.Value    = 0;
     numericupdown.Name     = "new_connect_numericupdown";
 }
示例#11
0
 public void initialize_panel2_advanced_login_confirm_new_passwd_textbox(TextBox textbox)
 {
     textbox.Font     = new Font("Calibri", 10);
     textbox.Location = DPIAwareScaling.ScalePoint(200, 380);
     textbox.Size     = DPIAwareScaling.ScaleSize(150, 25);
     textbox.Name     = "panel2_advanced_login_confirm_new_passwd_textbox";
     textbox.UseSystemPasswordChar = true;
 }
示例#12
0
 public void initialize_advanced_new_password_textbox(TextBox textbox)
 {
     textbox.Font     = new Font("Calibri", 10);
     textbox.Location = DPIAwareScaling.ScalePoint(130, 45);
     textbox.Size     = DPIAwareScaling.ScaleSize(130, 27);
     textbox.Name     = "advanced_new_password_textbox";
     textbox.UseSystemPasswordChar = true;
 }
示例#13
0
 public void initialize_hostname_label(Label label)
 {
     label.Font      = new Font("Calibri", 20);
     label.BackColor = Color.SlateGray;
     label.ForeColor = Color.White;
     label.Text      = "Hostname or IP Address";
     label.Location  = DPIAwareScaling.ScalePoint(63, 24);
     label.Size      = DPIAwareScaling.ScaleSize(278, 33);
 }
示例#14
0
 public void initialize_password_label(Label label)
 {
     label.Font      = new Font("Calibri", 18);
     label.BackColor = Color.SlateGray;
     label.ForeColor = Color.White;
     label.Text      = "Password";
     label.Location  = DPIAwareScaling.ScalePoint(11, 134);
     label.Size      = DPIAwareScaling.ScaleSize(105, 29);
 }
示例#15
0
 /// <summary>
 /// Initialize controls in ADVANCED OPTIONS PANEL2 (Passwords). This is the right panel of
 /// splitcontainer1 contained within the Form3. These are controls related to password change per
 /// group.
 /// </summary>
 public void initialize_advanced_passwords_label_header(Label label)
 {
     label.Font      = new Font("Calibri", 15, FontStyle.Bold);
     label.BackColor = Color.SlateGray;
     label.ForeColor = Color.White;
     label.Text      = "Passwords";
     label.Location  = DPIAwareScaling.ScalePoint(3, 3);
     label.Size      = DPIAwareScaling.ScaleSize(100, 33);
 }
示例#16
0
 public void initialize_numbericupdown(NumericUpDown numericupdown, EventHandler numericupdown_ValueChanged)
 {
     numericupdown.Font          = new Font("Calibri", 15);
     numericupdown.Location      = DPIAwareScaling.ScalePoint(284, 118);
     numericupdown.Size          = DPIAwareScaling.ScaleSize(43, 32);
     numericupdown.Value         = 0;
     numericupdown.Name          = "numericupdown";
     numericupdown.ValueChanged += new EventHandler(numericupdown_ValueChanged);
 }
示例#17
0
 public void initialize_new_connect_vertical_divide_label_1(Label label)
 {
     label.BackColor   = SystemColors.Control;
     label.ForeColor   = Color.Black;
     label.Text        = "";
     label.BorderStyle = BorderStyle.Fixed3D;
     label.Location    = DPIAwareScaling.ScalePoint(920, 2);
     label.Size        = DPIAwareScaling.ScaleSize(2, 25);
 }
示例#18
0
 public void initialize_new_connect_search_textbox(TextBox textbox, KeyEventHandler SearchTextbox_KeyDown)
 {
     textbox.Font          = new Font("Calibri", DPIAwareScaling.NewConnectSearchTextboxFont);
     textbox.Location      = DPIAwareScaling.ScalePoint(800, 2);
     textbox.Size          = DPIAwareScaling.ScaleSize(100, 27);
     textbox.Name          = "new_connect_search_textbox";
     textbox.AcceptsReturn = true;
     textbox.KeyDown      += new KeyEventHandler(SearchTextbox_KeyDown);
 }
示例#19
0
 public void initialize_new_connect_search_label(Label label)
 {
     label.Font      = new Font("Calibri", 12, FontStyle.Bold);
     label.BackColor = SystemColors.Control;
     label.ForeColor = Color.Black;
     label.Text      = "Search";
     label.Location  = DPIAwareScaling.ScalePoint(740, 3);
     label.Size      = DPIAwareScaling.ScaleSize(60, 33);
 }
示例#20
0
 /// <summary>
 /// Initialize controls in ADVANCED OPTIONS PANEL2 (Passwords). This is the right panel of
 /// splitcontainer1 contained within the Form3. These are controls related to Login password
 /// secret change.
 /// </summary>
 public void initialize_panel2_advanced_login_secret_divider(Label label)
 {
     label.BackColor   = Color.White;
     label.ForeColor   = Color.White;
     label.BorderStyle = BorderStyle.FixedSingle;
     label.Location    = DPIAwareScaling.ScalePoint(5, 250);
     label.Text        = "";
     label.Size        = DPIAwareScaling.ScaleSize(400, 4);
 }
示例#21
0
 public void initialize_username_label(Label label)
 {
     label.Font      = new Font("Calibri", 18);
     label.BackColor = Color.SlateGray;
     label.ForeColor = Color.White;
     label.Text      = "Username";
     label.Location  = DPIAwareScaling.ScalePoint(9, 95);
     label.Size      = DPIAwareScaling.ScaleSize(113, 29);
 }
示例#22
0
 public void initialize_advanced_private_keys_passphrase_textbox(TextBox textbox)
 {
     textbox.Font = new Font("Calibri", 10);
     //textbox.ForeColor = Color.White;
     textbox.Name     = "private_keys_passphrase_textbox";
     textbox.Location = DPIAwareScaling.ScalePoint(50, 380);
     textbox.Size     = DPIAwareScaling.ScaleSize(150, 20);
     textbox.UseSystemPasswordChar = true;
 }
示例#23
0
 public void initialize_advanced_private_keys_divider(Label label)
 {
     label.BackColor   = Color.White;
     label.ForeColor   = Color.White;
     label.BorderStyle = BorderStyle.FixedSingle;
     label.Location    = DPIAwareScaling.ScalePoint(6, 420);
     label.Text        = "";
     label.Size        = DPIAwareScaling.ScaleSize(350, 4);
 }
示例#24
0
 public void initialize_advanced_private_keys_passphrase_label(Label label)
 {
     label.Font      = new Font("Calibri", 10, FontStyle.Bold);
     label.BackColor = Color.SlateGray;
     label.ForeColor = Color.White;
     label.Text      = "PWD";
     label.Location  = DPIAwareScaling.ScalePoint(6, 385);
     label.Size      = DPIAwareScaling.ScaleSize(40, 30);
 }
示例#25
0
 public void initialize_advanced_private_keys_label_group(Label label)
 {
     label.Font      = new Font("Calibri", 12, FontStyle.Bold);
     label.BackColor = Color.SlateGray;
     label.ForeColor = Color.White;
     label.Text      = "Group";
     label.Location  = DPIAwareScaling.ScalePoint(160, 340);
     label.Size      = DPIAwareScaling.ScaleSize(60, 30);
 }
示例#26
0
 /// <summary>
 /// Initialize controls in ADVANCED OPTIONS PANEL1 (Private Keys). This is the left Panel of
 /// splitcontainer1 contained within the Form3 - Controls for Private keys settings.
 /// </summary>
 public void initialize_advanced_private_keys_label_header(Label label)
 {
     label.Font      = new Font("Calibri", 15, FontStyle.Bold);
     label.BackColor = Color.SlateGray;
     label.ForeColor = Color.White;
     label.Text      = "Private Keys";
     label.Location  = DPIAwareScaling.ScalePoint(3, 260);
     label.Size      = DPIAwareScaling.ScaleSize(130, 30);
 }
示例#27
0
 /// <summary>
 /// Initialize controls in MainForm (PuTTY STORM main configuration form).
 /// </summary>
 public void initialize_container(GroupBox container)
 {
     container.BackColor = Color.SlateGray;
     container.ForeColor = Color.White;
     container.Font      = new Font("Calibri", 25);
     container.Text      = "1";
     container.Location  = DPIAwareScaling.ScalePoint(23, 91);
     container.Size      = DPIAwareScaling.ScaleSize(380, 225);
     container.Paint    += (sender, e) => ContainerRePaint(sender, e, new Font("Calibri", 25));
 }
示例#28
0
 public void initialize_advanced_for_password_label(Label label)
 {
     label.Font      = new Font("Calibri", 12, FontStyle.Bold);
     label.BackColor = Color.SlateGray;
     label.ForeColor = Color.White;
     label.Text      = "For Group:";
     label.Location  = DPIAwareScaling.ScalePoint(3, 86);
     label.Size      = DPIAwareScaling.ScaleSize(90, 35);
     label.AutoSize  = true;
 }
示例#29
0
 public void initialize_panel2_advanced_login_confirm_new_passwd_label(Label label)
 {
     label.Font      = new Font("Calibri", 12, FontStyle.Bold);
     label.BackColor = Color.SlateGray;
     label.ForeColor = Color.White;
     label.Text      = "Confirm new password";
     label.Location  = DPIAwareScaling.ScalePoint(3, 380);
     label.Size      = DPIAwareScaling.ScaleSize(90, 35);
     label.AutoSize  = true;
 }
示例#30
0
 public void initialize_panel2_advanced_login_main_label(Label label)
 {
     label.Font      = new Font("Calibri", 15, FontStyle.Bold);
     label.BackColor = Color.SlateGray;
     label.ForeColor = Color.White;
     label.Text      = "Change Login Password Secret";
     label.Location  = DPIAwareScaling.ScalePoint(3, 270);
     label.Size      = DPIAwareScaling.ScaleSize(90, 35);
     label.AutoSize  = true;
 }