OSDN Git Service

最大化した状態でタスクバーに格納し、通知領域のアイコンクリックから復帰した場合に最大化が解除されている問題を修正
authorANIKITI <brotherwood@users.sourceforge.jp>
Fri, 27 Apr 2012 01:48:19 +0000 (10:48 +0900)
committerANIKITI <brotherwood@users.sourceforge.jp>
Fri, 27 Apr 2012 01:48:19 +0000 (10:48 +0900)
OpenTween/Tween.cs

index 4ec2eba..f5465f6 100644 (file)
@@ -84,6 +84,7 @@ namespace OpenTween
         private bool _myStatusOnline = false;
         private bool soundfileListup = false;
         private SpaceKeyCanceler _spaceKeyCanceler;
+               private FormWindowState _formWindowState = FormWindowState.Normal; // フォームの状態保存用 通知領域からアイコンをクリックして復帰した際に使用する
 
         //設定ファイル関連
         //private SettingToConfig _cfg; //旧
@@ -3272,7 +3273,7 @@ namespace OpenTween
                 this.Visible = true;
                 if (this.WindowState == FormWindowState.Minimized)
                 {
-                    this.WindowState = FormWindowState.Normal;
+                                       this.WindowState = _formWindowState;
                 }
                 this.Activate();
                 this.BringToFront();
@@ -9551,6 +9552,10 @@ namespace OpenTween
                 }
                 _initialLayout = false;
             }
+                       if (this.WindowState != FormWindowState.Minimized)
+                       {
+                               _formWindowState = this.WindowState;
+                       }
         }
 
         private void PlaySoundMenuItem_CheckedChanged(object sender, EventArgs e)