aboutsummaryrefslogtreecommitdiff
path: root/Histacom2.Engine
diff options
context:
space:
mode:
authorjtsshieh <[email protected]>2017-08-30 06:39:51 -0400
committerjtsshieh <[email protected]>2017-08-30 06:39:51 -0400
commit880bc37d751d1ec96620396d4db44178f558df77 (patch)
tree815a93cb46fe6b2ecc7bce349ea504cc560ce5bd /Histacom2.Engine
parentf1e358854383925aaf471c368cb01fe049c65c07 (diff)
downloadhistacom2-880bc37d751d1ec96620396d4db44178f558df77.tar.gz
histacom2-880bc37d751d1ec96620396d4db44178f558df77.tar.bz2
histacom2-880bc37d751d1ec96620396d4db44178f558df77.zip
DId the maximize things
Diffstat (limited to 'Histacom2.Engine')
-rw-r--r--Histacom2.Engine/Template/WinClassic.cs12
1 files changed, 9 insertions, 3 deletions
diff --git a/Histacom2.Engine/Template/WinClassic.cs b/Histacom2.Engine/Template/WinClassic.cs
index 23ea562..5b72775 100644
--- a/Histacom2.Engine/Template/WinClassic.cs
+++ b/Histacom2.Engine/Template/WinClassic.cs
@@ -206,9 +206,11 @@ namespace Histacom2.Engine.Template
}
public bool max = false;
-
+ public Size prevSize;
+ public Point prevPoint;
private void maximizebutton_Click(object sender, EventArgs e)
{
+
if (max == false)
{
this.right.Hide();
@@ -220,7 +222,10 @@ namespace Histacom2.Engine.Template
this.topleftcorner.Hide();
this.toprightcorner.Hide();
this.Dock = DockStyle.Fill;
- this.WindowState = FormWindowState.Maximized;
+ prevSize = this.Size;
+ prevPoint = this.Location;
+ this.Size = new Size(Screen.PrimaryScreen.Bounds.Width, Screen.PrimaryScreen.Bounds.Height - 28);
+ this.Location = new Point(0, 0);
max = true;
maximizebutton.Image = Engine.Properties.Resources.WinClassicRestore;
}
@@ -235,7 +240,8 @@ namespace Histacom2.Engine.Template
this.topleftcorner.Show();
this.toprightcorner.Show();
this.Dock = DockStyle.None;
- this.WindowState = FormWindowState.Normal;
+ this.Size = prevSize;
+ this.Location = prevPoint;
max = false;
maximizebutton.Image = Engine.Properties.Resources.WinClassicMax;
}