|
@@ -4,6 +4,7 @@ using System.ComponentModel;
|
|
|
using System.Data;
|
|
|
using System.Drawing;
|
|
|
using System.Linq;
|
|
|
+using System.Runtime.InteropServices;
|
|
|
using System.Text;
|
|
|
using System.Threading.Tasks;
|
|
|
using System.Windows.Forms;
|
|
@@ -58,7 +59,7 @@ namespace ShareWifi
|
|
|
|
|
|
private void btnMini_Click(object sender, EventArgs e)
|
|
|
{
|
|
|
-
|
|
|
+ Hide();
|
|
|
}
|
|
|
|
|
|
private void btnClose_Click(object sender, EventArgs e)
|
|
@@ -70,5 +71,31 @@ namespace ShareWifi
|
|
|
{
|
|
|
interHome();
|
|
|
}
|
|
|
+ private static bool IsDrag = false;
|
|
|
+ private int enterX;
|
|
|
+ private int enterY;
|
|
|
+
|
|
|
+ private void plTitle_MouseDown(object sender, MouseEventArgs e)
|
|
|
+ {
|
|
|
+ IsDrag = true;
|
|
|
+ enterX = e.Location.X;
|
|
|
+ enterY = e.Location.Y;
|
|
|
+ }
|
|
|
+
|
|
|
+ private void plTitle_MouseUp(object sender, MouseEventArgs e)
|
|
|
+ {
|
|
|
+ IsDrag = false;
|
|
|
+ enterX = 0;
|
|
|
+ enterY = 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ private void plTitle_MouseMove(object sender, MouseEventArgs e)
|
|
|
+ {
|
|
|
+ if (IsDrag)
|
|
|
+ {
|
|
|
+ this.Left += e.Location.X - enterX;
|
|
|
+ this.Top += e.Location.Y - enterY;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|