diff --git a/Remontor/.vs/Remontor/v17/.suo b/Remontor/.vs/Remontor/v17/.suo index 3ca3e99..b004875 100644 Binary files a/Remontor/.vs/Remontor/v17/.suo and b/Remontor/.vs/Remontor/v17/.suo differ diff --git a/Remontor/BarSessionControl.cs b/Remontor/BarSessionControl.cs index 4b1ac8a..25a5ca2 100644 --- a/Remontor/BarSessionControl.cs +++ b/Remontor/BarSessionControl.cs @@ -83,7 +83,7 @@ namespace Remontor hideTabWords(barShow); hideTabHistory(barShow); - if(SConnector.ActionConnect != null)SConnector.ActionConnect.Resize(); + } diff --git a/Remontor/Connector/DobleMonFull.cs b/Remontor/Connector/DobleMonFull.cs index 327889b..8a0ca7e 100644 --- a/Remontor/Connector/DobleMonFull.cs +++ b/Remontor/Connector/DobleMonFull.cs @@ -20,6 +20,7 @@ namespace Remontor.Connector public int OldWidth, OldHeight; public Point OldPoint; public FormWindowState OldState; + private int over = 0; public DobleMonFull() { OldWidth = SConnector.FormMain.Bounds.Width; @@ -29,6 +30,14 @@ namespace Remontor.Connector } public override void Resize(Process Proc, Control View) { + if (over == 0) + { + over = 1; + } + else + { + over = 0; + } if (Chanded) return; Chanded = true; SConnector.FormMain.WindowState = FormWindowState.Normal; @@ -36,7 +45,7 @@ namespace Remontor.Connector SConnector.FormMain.Width = SGlobalSetting.settingApp.WidthDoble; SConnector.FormMain.Height = SGlobalSetting.settingApp.HeightDoble; SConnector.FormMain.Location = new System.Drawing.Point(SGlobalSetting.settingApp.xPosDoble, SGlobalSetting.settingApp.yPosDoble); - MoveWindow(Proc.MainWindowHandle, View.Bounds.X, View.Bounds.Y + 9, View.Bounds.Width, View.Bounds.Height - 9, true); + MoveWindow(Proc.MainWindowHandle, View.Bounds.X, View.Bounds.Y + 9, View.Bounds.Width, View.Bounds.Height - 9 + over, true); } public override IModeMon Change(IModeMon Mode) diff --git a/Remontor/Connector/DobleMonOne.cs b/Remontor/Connector/DobleMonOne.cs index 37222ce..adf89e8 100644 --- a/Remontor/Connector/DobleMonOne.cs +++ b/Remontor/Connector/DobleMonOne.cs @@ -14,10 +14,19 @@ namespace Remontor.Connector { [DllImport("user32.dll")] static extern bool MoveWindow(IntPtr Handle, int x, int y, int w, int h, bool repaint); + private int over = 0; public DobleMonOne() { } public override void Resize(Process Proc, Control View) { - MoveWindow(Proc.MainWindowHandle, View.Bounds.X, View.Bounds.Y + 9, View.Bounds.Width * 2, View.Bounds.Height - 9, true); + if (over == 0) + { + over = 1; + } + else + { + over = 0; + } + MoveWindow(Proc.MainWindowHandle, View.Bounds.X, View.Bounds.Y + 9, View.Bounds.Width * 2, View.Bounds.Height - 9 + over, true); } public override IModeMon Change(IModeMon Mode) { diff --git a/Remontor/Connector/DobleMonTwo.cs b/Remontor/Connector/DobleMonTwo.cs index 421b415..9b9133b 100644 --- a/Remontor/Connector/DobleMonTwo.cs +++ b/Remontor/Connector/DobleMonTwo.cs @@ -13,10 +13,19 @@ namespace Remontor.Connector { [DllImport("user32.dll")] static extern bool MoveWindow(IntPtr Handle, int x, int y, int w, int h, bool repaint); + private int over = 0; public DobleMonTwo() { } public override void Resize(Process Proc, Control View) { - MoveWindow(Proc.MainWindowHandle, View.Bounds.X - View.Bounds.Width, View.Bounds.Y + 9, View.Bounds.Width * 2, View.Bounds.Height - 9, true); + if (over == 0) + { + over = 1; + } + else + { + over = 0; + } + MoveWindow(Proc.MainWindowHandle, View.Bounds.X - View.Bounds.Width, View.Bounds.Y + 9, View.Bounds.Width * 2, View.Bounds.Height - 9 + over, true); } public override IModeMon Change(IModeMon Mode) { diff --git a/Remontor/Connector/OneMon.cs b/Remontor/Connector/OneMon.cs index d805cd0..4f592ec 100644 --- a/Remontor/Connector/OneMon.cs +++ b/Remontor/Connector/OneMon.cs @@ -13,10 +13,20 @@ namespace Remontor.Connector { [DllImport("user32.dll")] static extern bool MoveWindow(IntPtr Handle, int x, int y, int w, int h, bool repaint); + private int over = 0; + public OneMon() { } public override void Resize(Process Proc, Control View) { - MoveWindow(Proc.MainWindowHandle, View.Bounds.X, View.Bounds.Y + 9, View.Bounds.Width, View.Bounds.Height - 9, true); + if(over == 0) + { + over = 1; + } + else + { + over = 0; + } + MoveWindow(Proc.MainWindowHandle, View.Bounds.X, View.Bounds.Y + 9, View.Bounds.Width, View.Bounds.Height - 9 + over, true); } public override IModeMon Change(IModeMon Mode) { diff --git a/Remontor/Form1.Designer.cs b/Remontor/Form1.Designer.cs index 8ffa86a..c32d9b3 100644 --- a/Remontor/Form1.Designer.cs +++ b/Remontor/Form1.Designer.cs @@ -110,12 +110,14 @@ // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoValidate = System.Windows.Forms.AutoValidate.EnableAllowFocusChange; this.ClientSize = new System.Drawing.Size(1094, 718); this.Controls.Add(this.barSessionControl1); this.Controls.Add(this.flowContainer1); this.Controls.Add(this.flowContainerWords1); this.Controls.Add(this.flowConteinerSetting1); this.Controls.Add(this.panel3); + this.DoubleBuffered = true; this.Name = "Form1"; this.Text = "Form1"; this.Deactivate += new System.EventHandler(this.Form1_Deactivate); diff --git a/Remontor/Form1.cs b/Remontor/Form1.cs index 0bbdd6f..bd0edeb 100644 --- a/Remontor/Form1.cs +++ b/Remontor/Form1.cs @@ -11,6 +11,7 @@ using System.Drawing; using System.Linq; using System.Runtime.InteropServices; using System.Text; +using System.Threading; using System.Threading.Tasks; using System.Windows.Forms; using static Remontor.Setting.SettingWordsControl; @@ -63,6 +64,7 @@ namespace Remontor if (!flowContainerWords1.Bounds.Contains(clickPoint)) { barSessionControl1.ShowBarSet(BarShow.HideBar); + } } @@ -84,6 +86,8 @@ namespace Remontor private void Form1_Deactivate(object sender, EventArgs e) { barSessionControl1.ShowBarSet(BarShow.HideBar); + + if (SConnector.ActionConnect != null) SConnector.ActionConnect.Resize(); } private void Form1_FormClosing(object sender, FormClosingEventArgs e) diff --git a/Remontor/bin/Debug/Remontor.exe b/Remontor/bin/Debug/Remontor.exe index 5b6b3f4..eb43290 100644 Binary files a/Remontor/bin/Debug/Remontor.exe and b/Remontor/bin/Debug/Remontor.exe differ diff --git a/Remontor/bin/Debug/Remontor.pdb b/Remontor/bin/Debug/Remontor.pdb index e027727..57e111c 100644 Binary files a/Remontor/bin/Debug/Remontor.pdb and b/Remontor/bin/Debug/Remontor.pdb differ diff --git a/Remontor/bin/Debug/res.dat b/Remontor/bin/Debug/res.dat index b407f1b..9855f72 100644 Binary files a/Remontor/bin/Debug/res.dat and b/Remontor/bin/Debug/res.dat differ diff --git a/Remontor/obj/Debug/DesignTimeResolveAssemblyReferences.cache b/Remontor/obj/Debug/DesignTimeResolveAssemblyReferences.cache index 798cbfc..87ac6f9 100644 Binary files a/Remontor/obj/Debug/DesignTimeResolveAssemblyReferences.cache and b/Remontor/obj/Debug/DesignTimeResolveAssemblyReferences.cache differ diff --git a/Remontor/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Remontor/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache index de8a43a..674cc3d 100644 Binary files a/Remontor/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/Remontor/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Remontor/obj/Debug/Remontor.csproj.GenerateResource.cache b/Remontor/obj/Debug/Remontor.csproj.GenerateResource.cache index b28703b..918991e 100644 Binary files a/Remontor/obj/Debug/Remontor.csproj.GenerateResource.cache and b/Remontor/obj/Debug/Remontor.csproj.GenerateResource.cache differ diff --git a/Remontor/obj/Debug/Remontor.exe b/Remontor/obj/Debug/Remontor.exe index 5b6b3f4..eb43290 100644 Binary files a/Remontor/obj/Debug/Remontor.exe and b/Remontor/obj/Debug/Remontor.exe differ diff --git a/Remontor/obj/Debug/Remontor.pdb b/Remontor/obj/Debug/Remontor.pdb index e027727..57e111c 100644 Binary files a/Remontor/obj/Debug/Remontor.pdb and b/Remontor/obj/Debug/Remontor.pdb differ