/// <summary>
 ///  Khởi tạo một đối tượng ConnectionManual
 /// </summary>
 public ConnectionManual()
 {
     InitializeComponent();
     Result       = ConnectionManualResult.Cancel;
     Invalid_Host = true;
     Invalid_Port = true;
 }
        private void btnSave_Click(object sender, EventArgs e)
        {
            if (Invalid_Host || Invalid_Port)
            {
                MessageBox.Show("Invalid information", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            Result = ConnectionManualResult.Save;
            this.Close();
        }
 private void btnCancel_Click(object sender, EventArgs e)
 {
     Result = ConnectionManualResult.Cancel;
     this.Close();
 }