aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlempamo <[email protected]>2017-07-31 21:37:59 -0500
committerGitHub <[email protected]>2017-07-31 21:37:59 -0500
commit92fedc467a77c709b157a0ec1666bd902ad8d27e (patch)
tree671d4f2ac21e087d7b0db9599990cc5f2bd23f75
parent570717cf5ea87518ba2c5a483050dd518e970958 (diff)
parent312cd741458d2cb3a9274b671ce7b55bcd680849 (diff)
downloadhistacom2-92fedc467a77c709b157a0ec1666bd902ad8d27e.tar.gz
histacom2-92fedc467a77c709b157a0ec1666bd902ad8d27e.tar.bz2
histacom2-92fedc467a77c709b157a0ec1666bd902ad8d27e.zip
Merge pull request #143 from jtsshieh/master
WIndow Resize
-rw-r--r--TimeHACK.Engine/Template/WinClassic.Designer.cs3
-rw-r--r--TimeHACK.Engine/Template/WinClassic.cs24
2 files changed, 27 insertions, 0 deletions
diff --git a/TimeHACK.Engine/Template/WinClassic.Designer.cs b/TimeHACK.Engine/Template/WinClassic.Designer.cs
index 8f7540c..7801b96 100644
--- a/TimeHACK.Engine/Template/WinClassic.Designer.cs
+++ b/TimeHACK.Engine/Template/WinClassic.Designer.cs
@@ -200,6 +200,7 @@
this.left.Size = new System.Drawing.Size(4, 292);
this.left.TabIndex = 3;
this.left.MouseDown += new System.Windows.Forms.MouseEventHandler(this.border_MouseDown);
+ this.left.MouseMove += new System.Windows.Forms.MouseEventHandler(this.left_MouseMove);
//
// bottom
//
@@ -212,6 +213,7 @@
this.bottom.Size = new System.Drawing.Size(296, 4);
this.bottom.TabIndex = 5;
this.bottom.MouseDown += new System.Windows.Forms.MouseEventHandler(this.border_MouseDown);
+ this.bottom.MouseMove += new System.Windows.Forms.MouseEventHandler(this.bottom_MouseMove);
//
// right
//
@@ -223,6 +225,7 @@
this.right.Size = new System.Drawing.Size(4, 296);
this.right.TabIndex = 7;
this.right.MouseDown += new System.Windows.Forms.MouseEventHandler(this.border_MouseDown);
+ this.right.MouseMove += new System.Windows.Forms.MouseEventHandler(this.right_MouseMove);
//
// top
//
diff --git a/TimeHACK.Engine/Template/WinClassic.cs b/TimeHACK.Engine/Template/WinClassic.cs
index 3f69115..ca55c59 100644
--- a/TimeHACK.Engine/Template/WinClassic.cs
+++ b/TimeHACK.Engine/Template/WinClassic.cs
@@ -66,6 +66,30 @@ namespace TimeHACK.Engine.Template
Title.ForeColor = SaveSystem.currentTheme.inactiveTitleTextColor;
}
+ private void right_MouseMove(object sender, MouseEventArgs e)
+ {
+ if (e.Button == MouseButtons.Left)
+ {
+ this.Size = new Size(MousePosition.X - this.Location.X, this.Size.Height);
+ }
+ }
+
+ private void left_MouseMove(object sender, MouseEventArgs e)
+ {
+ if (e.Button == MouseButtons.Left)
+ {
+ this.Size = new Size(this.Size.Width + (this.Location.X - MousePosition.X), this.Size.Height);
+ this.Location = new Point(MousePosition.X, this.Location.Y);
+ }
+ }
+
+ private void bottom_MouseMove(object sender, MouseEventArgs e)
+ {
+ if (e.Button == MouseButtons.Left) {
+ this.Size = new Size(this.Size.Width, MousePosition.Y - this.Location.Y);
+ }
+ }
+
public bool max = false;
private void maximizebutton_Click(object sender, EventArgs e)