OSDN Git Service

#30675 Windowモードでの表示位置の記憶・再現に対応。
authorikanick <ikanick@16f42ceb-6dc6-49c8-ba94-f2d53467949d>
Mon, 4 Feb 2013 10:51:10 +0000 (10:51 +0000)
committerikanick <ikanick@16f42ceb-6dc6-49c8-ba94-f2d53467949d>
Mon, 4 Feb 2013 10:51:10 +0000 (10:51 +0000)
git-svn-id: http://svn.osdn.jp/svnroot/dtxmania/trunk@518 16f42ceb-6dc6-49c8-ba94-f2d53467949d

DTXManiaプロジェクト/コード/全体/CConfigIni.cs
DTXManiaプロジェクト/コード/全体/CDTXMania.cs
実行時フォルダ/DTXManiaGR.exe
実行時フォルダ/FDK.dll

index f3d76c6..c7233cb 100644 (file)
@@ -446,6 +446,8 @@ namespace DTXMania
                public bool b選曲リストフォントを斜体にする;\r
                public bool b選曲リストフォントを太字にする;\r
                public bool b全画面モード;\r
+               public int n初期ウィンドウ開始位置X;         // #30675 2013.02.04 ikanick add\r
+               public int n初期ウィンドウ開始位置Y;\r
                public int nウインドウwidth;                               // #23510 2010.10.31 yyagi add\r
                public int nウインドウheight;                              // #23510 2010.10.31 yyagi add\r
                public Dictionary<int, string> dicJoystick;\r
@@ -1012,6 +1014,8 @@ namespace DTXMania
                        this.str曲データ検索パス = @".\";\r
                        this.b全画面モード = false;\r
                        this.b垂直帰線待ちを行う = true;\r
+                       this.n初期ウィンドウ開始位置X = 0;                   // #30675 2013.02.04 ikanick add\r
+                       this.n初期ウィンドウ開始位置Y = 0;\r
                        this.nウインドウwidth = SampleFramework.GameWindowSize.Width;                      // #23510 2010.10.31 yyagi add\r
                        this.nウインドウheight = SampleFramework.GameWindowSize.Height;                    // \r
                        this.nフレーム毎スリープms = -1;                       // #xxxxx 2011.11.27 yyagi add\r
@@ -1215,6 +1219,14 @@ namespace DTXMania
                        sw.WriteLine("; A height size in the window mode.");            //\r
                        sw.WriteLine("WindowHeight={0}", this.nウインドウheight);  //\r
                        sw.WriteLine();                                                                                         //\r
+                       sw.WriteLine("; ウィンドウモード時の位置X");                                            // #30675 2013.02.04 ikanick add\r
+                       sw.WriteLine("; X position in the window mode.");                                   //\r
+                       sw.WriteLine("WindowX={0}", this.n初期ウィンドウ開始位置X );         //\r
+                       sw.WriteLine();                                                                                                 //\r
+                       sw.WriteLine("; ウィンドウモード時の位置Y");                                        //\r
+                       sw.WriteLine("; Y position in the window mode.");                           //\r
+                       sw.WriteLine("WindowY={0}", this.n初期ウィンドウ開始位置Y );         //\r
+                       sw.WriteLine();                                                                                                     //\r
 \r
                        sw.WriteLine( "; ウインドウをダブルクリックした時にフルスクリーンに移行するか(0:移行しない,1:移行する)" );       // #26752 2011.11.27 yyagi\r
                        sw.WriteLine( "; Whether double click to go full screen mode or not." );                                        //\r
@@ -1869,6 +1881,16 @@ namespace DTXMania
                                                                                        {\r
                                                                                                this.b全画面モード = C変換.bONorOFF( str4[ 0 ] );\r
                                                                                        }\r
+                                                                                       else if ( str3.Equals( "WindowX" ) )            // #30675 2013.02.04 ikanick add\r
+                                                                                       {\r
+                                                                                               this.n初期ウィンドウ開始位置X = C変換.n値を文字列から取得して範囲内に丸めて返す(\r
+                                                    str4, 0,  System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width - 1 , this.n初期ウィンドウ開始位置X );\r
+                                                                                       }\r
+                                                                                       else if ( str3.Equals( "WindowY" ) )            // #30675 2013.02.04 ikanick add\r
+                                                                                       {\r
+                                                                                               this.n初期ウィンドウ開始位置Y = C変換.n値を文字列から取得して範囲内に丸めて返す(\r
+                                                    str4, 0,  System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height - 1 , this.n初期ウィンドウ開始位置Y );\r
+                                                                                       }\r
                                                                                        else if ( str3.Equals( "WindowWidth" ) )                // #23510 2010.10.31 yyagi add\r
                                                                                        {\r
                                                                                                this.nウインドウwidth = C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 1, 65535, this.nウインドウwidth );\r
index 3a2046e..b6836de 100644 (file)
@@ -1468,6 +1468,10 @@ for (int i = 0; i < 3; i++) {
                        #region [ ウィンドウ初期化 ]\r
                        //---------------------\r
                        base.Window.Text = "DTXMania .NET style release " + VERSION;\r
+\r
+                       base.Window.StartPosition = FormStartPosition.Manual;                                                       // #30675 2013.02.04 ikanick add\r
+            base.Window.Location = new Point(ConfigIni.n初期ウィンドウ開始位置X, ConfigIni.n初期ウィンドウ開始位置Y);   // #30675 2013.02.04 ikanick add\r
+\r
                        base.Window.ClientSize = new Size(ConfigIni.nウインドウwidth, ConfigIni.nウインドウheight);   // #34510 yyagi 2010.10.31 to change window size got from Config.ini\r
                        if (!ConfigIni.bウィンドウモード)                                               // #23510 2010.11.02 yyagi: add; to recover window size in case bootup with fullscreen mode\r
                        {\r
@@ -2292,6 +2296,12 @@ for (int i = 0; i < 3; i++) {
                }\r
                private void Window_ResizeEnd(object sender, EventArgs e)                               // #23510 2010.11.20 yyagi: to get resized window size\r
                {\r
+            if (ConfigIni.bウィンドウモード)\r
+            {\r
+                ConfigIni.n初期ウィンドウ開始位置X = base.Window.Location.X;        // #30675 2013.02.04 ikanick add\r
+                ConfigIni.n初期ウィンドウ開始位置Y = base.Window.Location.Y;        //\r
+            }\r
+\r
                        ConfigIni.nウインドウwidth = (ConfigIni.bウィンドウモード) ? base.Window.ClientSize.Width : currentClientSize.Width;       // #23510 2010.10.31 yyagi add\r
                        ConfigIni.nウインドウheight = (ConfigIni.bウィンドウモード) ? base.Window.ClientSize.Height : currentClientSize.Height;\r
                }\r
index 30241c9..c506a42 100644 (file)
Binary files a/実行時フォルダ/DTXManiaGR.exe and b/実行時フォルダ/DTXManiaGR.exe differ
index 8b6d948..7fa71d5 100644 (file)
Binary files a/実行時フォルダ/FDK.dll and b/実行時フォルダ/FDK.dll differ