コード例 #1
0
        private void AddServer_Click(object sender, EventArgs e)
        {
            AddServer AddServerForm = new AddServer();

            if (AddServerForm.ShowDialog() == DialogResult.OK)
            {
                ServerObj Server = new ServerObj();

                Server.ID = _ServerList.Count + 1;
                Server.ServerAddress = AddServerForm.ServerAddress;
                Server.ApiPath = AddServerForm.ApiPath;
                Server.Username = AddServerForm.Username;
                Server.ApiKey = AddServerForm.ApiKey;
                Server.Selected = false;
                ServerList.Add(Server);

                this.comboBox1.Items.AddRange(new object[] { Server.ServerAddress.ToString().Replace("https://", "").Replace("http://", "") });
            }
            this.DialogResult = DialogResult.None;
        }
コード例 #2
0
        private void AddServer_Click(object sender, EventArgs e)
        {
            AddServer AddServerForm = new AddServer();

            if (AddServerForm.ShowDialog() == DialogResult.OK)
            {
                ServerObj Server = new ServerObj();

                Server.ID            = _ServerList.Count + 1;
                Server.ServerAddress = AddServerForm.ServerAddress;
                Server.ApiPath       = AddServerForm.ApiPath;
                Server.Username      = AddServerForm.Username;
                Server.ApiKey        = AddServerForm.ApiKey;
                Server.Selected      = false;
                ServerList.Add(Server);

                this.comboBox1.Items.AddRange(new object[] { Server.ServerAddress.ToString().Replace("https://", "").Replace("http://", "") });
            }
            this.DialogResult = DialogResult.None;
        }