aboutsummaryrefslogtreecommitdiff
path: root/TimeHACK.Engine/Template/WinClassic.cs
diff options
context:
space:
mode:
authorlempamo <[email protected]>2017-08-03 10:45:51 -0400
committerlempamo <[email protected]>2017-08-03 10:45:51 -0400
commit75d4f6c762aa5582c6c95518eb226a840559cf74 (patch)
treeb4ec927bd7967b545b38a27ddc4411213b588cc0 /TimeHACK.Engine/Template/WinClassic.cs
parent92410f8e3825950746c1d8d7230074c8a100c9cf (diff)
parent970dabaa90a39623c7a8271239861a09af7b2b54 (diff)
downloadhistacom2-75d4f6c762aa5582c6c95518eb226a840559cf74.tar.gz
histacom2-75d4f6c762aa5582c6c95518eb226a840559cf74.tar.bz2
histacom2-75d4f6c762aa5582c6c95518eb226a840559cf74.zip
Merge branch 'master' of https://github.com/TimeHACKDevs/TimeHACK.git
Diffstat (limited to 'TimeHACK.Engine/Template/WinClassic.cs')
-rw-r--r--TimeHACK.Engine/Template/WinClassic.cs56
1 files changed, 53 insertions, 3 deletions
diff --git a/TimeHACK.Engine/Template/WinClassic.cs b/TimeHACK.Engine/Template/WinClassic.cs
index ec80fcc..75398dd 100644
--- a/TimeHACK.Engine/Template/WinClassic.cs
+++ b/TimeHACK.Engine/Template/WinClassic.cs
@@ -67,6 +67,7 @@ namespace TimeHACK.Engine.Template
Title.ForeColor = SaveSystem.currentTheme.inactiveTitleTextColor;
}
+
private void right_MouseMove(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
@@ -79,18 +80,67 @@ namespace TimeHACK.Engine.Template
{
if (e.Button == MouseButtons.Left)
{
- if (resizable) this.Size = new Size(this.Size.Width + (this.Location.X - MousePosition.X), this.Size.Height);
- if (resizable) this.Location = new Point(MousePosition.X, this.Location.Y);
+ if (resizable) this.Width = ((this.Width + this.Location.X) - Cursor.Position.X);
+ if (resizable)this.Location = new Point(Cursor.Position.X, this.Location.Y);
}
}
private void bottom_MouseMove(object sender, MouseEventArgs e)
{
- if (e.Button == MouseButtons.Left) {
+ if (e.Button == MouseButtons.Left)
+ {
if (resizable) this.Size = new Size(this.Size.Width, MousePosition.Y - this.Location.Y);
}
}
+ private void bottomrightcorner_MouseMove(object sender, MouseEventArgs e)
+ {
+ if (e.Button == MouseButtons.Left)
+ {
+ if (resizable) this.Size = new Size(MousePosition.X - this.Location.X, MousePosition.Y - this.Location.Y);
+ }
+ }
+
+ private void bottomleftcorner_MouseMove(object sender, MouseEventArgs e)
+ {
+ if (e.Button == MouseButtons.Left)
+ {
+ if (resizable) this.Width = ((this.Width + this.Location.X) - Cursor.Position.X);
+ if (resizable) this.Height = (Cursor.Position.Y - this.Location.Y);
+ if (resizable) this.Location = new Point(Cursor.Position.X, this.Location.Y);
+ }
+ }
+
+ private void topleftcorner_MouseMove(object sender, MouseEventArgs e)
+ {
+ if (e.Button == MouseButtons.Left)
+ {
+ if (resizable) this.Width = ((this.Width + this.Location.X) - Cursor.Position.X);
+ if (resizable) this.Location = new Point(Cursor.Position.X, this.Location.Y);
+ if (resizable) this.Height = ((this.Height + this.Location.Y) - Cursor.Position.Y);
+ if (resizable) this.Location = new Point(this.Location.X, Cursor.Position.Y);
+ }
+ }
+
+ private void top_MouseMove(object sender, MouseEventArgs e)
+ {
+ if(e.Button == MouseButtons.Left)
+ {
+ if(resizable) this.Height = ((this.Height + this.Location.Y) - Cursor.Position.Y);
+ if(resizable) this.Location = new Point(this.Location.X, Cursor.Position.Y);
+ }
+ }
+
+ private void toprightcorner_MouseMove(object sender, MouseEventArgs e)
+ {
+ if (e.Button == MouseButtons.Left)
+ {
+ if (resizable) this.Width = (Cursor.Position.X - this.Location.X);
+ if (resizable) this.Height = ((this.Location.Y - Cursor.Position.Y) + this.Height);
+ if (resizable) this.Location = new Point(this.Location.X, Cursor.Position.Y);
+ }
+ }
+
public bool max = false;
private void maximizebutton_Click(object sender, EventArgs e)