From c33f44f1dcade9505406cf40cded92c210cd6d18 Mon Sep 17 00:00:00 2001 From: Louis Lam Date: Sat, 29 Oct 2022 04:31:08 +0800 Subject: [PATCH] Add double click connect --- rdp-portal.csproj | 2 +- src/MainForm.Designer.cs | 1 + src/MainForm.cs | 4 ++++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/rdp-portal.csproj b/rdp-portal.csproj index 76efc04..9fc3acf 100644 --- a/rdp-portal.csproj +++ b/rdp-portal.csproj @@ -210,4 +210,4 @@ - \ No newline at end of file + diff --git a/src/MainForm.Designer.cs b/src/MainForm.Designer.cs index e744a80..8f408ff 100644 --- a/src/MainForm.Designer.cs +++ b/src/MainForm.Designer.cs @@ -280,6 +280,7 @@ this.listBox.Size = new System.Drawing.Size(211, 276); this.listBox.TabIndex = 0; this.listBox.SelectedValueChanged += new System.EventHandler(this.listBox_SelectedValueChanged); + this.listBox.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.listBox_MouseDoubleClick); // // MainForm // diff --git a/src/MainForm.cs b/src/MainForm.cs index a207a4f..033fd1a 100644 --- a/src/MainForm.cs +++ b/src/MainForm.cs @@ -184,5 +184,9 @@ namespace RDP_Portal { About about = new About(); about.ShowDialog(this); } + + private void listBox_MouseDoubleClick(object sender, MouseEventArgs e) { + buttonConnect_Click(sender, e); + } } }