Develop and Download Open Source Software

Browse Subversion Repository

Contents of /trunk/DTXManiaプロジェクト/コード/全体/CDTXMania.cs

Parent Directory Parent Directory | Revision Log Revision Log


Revision 127 - (show annotations) (download)
Sat Jul 6 12:11:41 2013 UTC (10 years, 9 months ago) by kairera0467
File size: 96367 byte(s)


1 using System;
2 using System.Collections.Generic;
3 using System.Globalization;
4 using System.Text;
5 using System.Windows.Forms;
6 using System.Drawing;
7 using System.Diagnostics;
8 using System.Runtime.InteropServices;
9 using System.IO;
10 using System.Threading;
11 using System.Runtime.Serialization.Formatters.Binary;
12 using SlimDX;
13 using SlimDX.Direct3D9;
14 using FDK;
15 using SampleFramework;
16 using DTXMania.Properties;
17 using System.Reflection;
18 using DirectShowLib;
19
20 namespace DTXMania
21 {
22 internal class CDTXMania : Game
23 {
24 // プロパティ
25
26 public static readonly string VERSION = "Ver2.65(130706)";
27 public static readonly string SLIMDXDLL = "c_net20x86_Jun2010";
28 public static readonly string D3DXDLL = "d3dx9_43.dll"; // June 2010
29 //public static readonly string D3DXDLL = "d3dx9_42.dll"; // February 2010
30 //public static readonly string D3DXDLL = "d3dx9_41.dll"; // March 2009
31
32 public static CDTXMania app
33 {
34 get;
35 private set;
36 }
37 public static Folder Folder
38 {
39 get;
40 protected set;
41 }
42 public static CApp App
43 {
44 get;
45 private set;
46 }
47 public static C文字コンソ act文字コンソ
48 {
49 get;
50 private set;
51 }
52 public static bool bコンパクトモ
53 {
54 get;
55 private set;
56 }
57 public static CConfigIni ConfigIni
58 {
59 get;
60 private set;
61 }
62 public static CDTX DTX
63 {
64 get
65 {
66 return dtx;
67 }
68 set
69 {
70 if( ( dtx != null ) && ( app != null ) )
71 {
72 dtx.On非活性化();
73 app.listトップレベルActivities.Remove( dtx );
74 }
75 dtx = value;
76 if( ( dtx != null ) && ( app != null ) )
77 {
78 app.listトップレベルActivities.Add( dtx );
79 }
80 }
81 }
82 public static CFPS FPS
83 {
84 get;
85 private set;
86 }
87 public static CInput管理 Input管理
88 {
89 get;
90 private set;
91 }
92 public static int nSongDifficulty
93 {
94 get;
95 set;
96 }
97
98 public static string strSongDifficulyName
99 {
100 get;
101 set;
102 }
103 public static int nPerfect範囲ms
104 {
105 get
106 {
107 if( stage選曲.r確定された曲 != null )
108 {
109 C曲リストノ c曲リストノ = stage選曲.r確定された曲.r親ノ;
110 if( ( ( c曲リストノ != null ) && ( c曲リストノ.eド種別 == C曲リストノ.Eド種別.BOX ) ) && ( c曲リストノ.nPerfect範囲ms >= 0 ) )
111 {
112 return c曲リストノ.nPerfect範囲ms;
113 }
114 }
115 return ConfigIni.nヒット範囲ms.Perfect;
116 }
117 }
118 public static int nGreat範囲ms
119 {
120 get
121 {
122 if( stage選曲.r確定された曲 != null )
123 {
124 C曲リストノ c曲リストノ = stage選曲.r確定された曲.r親ノ;
125 if( ( ( c曲リストノ != null ) && ( c曲リストノ.eド種別 == C曲リストノ.Eド種別.BOX ) ) && ( c曲リストノ.nGreat範囲ms >= 0 ) )
126 {
127 return c曲リストノ.nGreat範囲ms;
128 }
129 }
130 return ConfigIni.nヒット範囲ms.Great;
131 }
132 }
133 public static int nGood範囲ms
134 {
135 get
136 {
137 if( stage選曲.r確定された曲 != null )
138 {
139 C曲リストノ c曲リストノ = stage選曲.r確定された曲.r親ノ;
140 if( ( ( c曲リストノ != null ) && ( c曲リストノ.eド種別 == C曲リストノ.Eド種別.BOX ) ) && ( c曲リストノ.nGood範囲ms >= 0 ) )
141 {
142 return c曲リストノ.nGood範囲ms;
143 }
144 }
145 return ConfigIni.nヒット範囲ms.Good;
146 }
147 }
148 public static int nPoor範囲ms
149 {
150 get
151 {
152 if( stage選曲.r確定された曲 != null )
153 {
154 C曲リストノ c曲リストノ = stage選曲.r確定された曲.r親ノ;
155 if( ( ( c曲リストノ != null ) && ( c曲リストノ.eド種別 == C曲リストノ.Eド種別.BOX ) ) && ( c曲リストノ.nPoor範囲ms >= 0 ) )
156 {
157 return c曲リストノ.nPoor範囲ms;
158 }
159 }
160 return ConfigIni.nヒット範囲ms.Poor;
161 }
162 }
163 public static CPad Pad
164 {
165 get;
166 private set;
167 }
168 public static Random Random
169 {
170 get;
171 private set;
172 }
173 public static CSkin Skin
174 {
175 get;
176 private set;
177 }
178 public static CSongs管理 Songs管理
179 {
180 get;
181 set; // 2012.1.26 yyagi private解除 CStage起動でのdesirialize読み込みのため
182 }
183 public static CEnumSongs EnumSongs
184 {
185 get;
186 private set;
187 }
188 public static CActEnumSongs actEnumSongs
189 {
190 get;
191 private set;
192 }
193 public static CActFlushGPU actFlushGPU
194 {
195 get;
196 private set;
197 }
198 public static CSound管理 Sound管理
199 {
200 get;
201 private set;
202 }
203 public static CStage起動 stage起動
204 {
205 get;
206 private set;
207 }
208 public static CStageタイトル stageタイトル
209 {
210 get;
211 private set;
212 }
213 public static CStageオプション stageオプション
214 {
215 get;
216 private set;
217 }
218 public static CStageコンフィグ stageコンフィグ
219 {
220 get;
221 private set;
222 }
223 public static CStage選曲 stage選曲
224 {
225 get;
226 private set;
227 }
228 public static CStage曲読み込み stage曲読み込み
229 {
230 get;
231 private set;
232 }
233 public static CStage演奏ギタ画面 stage演奏ギタ画面
234 {
235 get;
236 private set;
237 }
238 public static CStage演奏ドラム画面 stage演奏ドラム画面
239 {
240 get;
241 private set;
242 }
243 public static CStage演奏画面共通 stage演奏画面共通
244 {
245 get;
246 private set;
247 }
248 public static CStage結果 stage結果
249 {
250 get;
251 private set;
252 }
253 public static CStageChangeSkin stageChangeSkin
254 {
255 get;
256 private set;
257 }
258 public static CStage終了 stage終了
259 {
260 get;
261 private set;
262 }
263 public static CStage r現在のステ = null;
264 public static CStage r直前のステ = null;
265 public bool b汎用ムである = false;
266 public static string strEXEのあるフォルダ
267 {
268 get;
269 private set;
270 }
271 public static string strコンパクトモドファイル
272 {
273 get;
274 private set;
275 }
276 public static CTimer Timer
277 {
278 get;
279 private set;
280 }
281 public static Format TextureFormat = Format.A8R8G8B8;
282 internal static IPluginActivity act現在入力を占有中のプラグイン = null;
283 public bool bApplicationActive
284 {
285 get;
286 private set;
287 }
288 public bool b次のタイミングで垂直帰線同期切り替えを行う
289 {
290 get;
291 set;
292 }
293 public bool b次のタイミングで全画面・ウィンドウ切り替えを行う
294 {
295 get;
296 set;
297 }
298
299 public Device Device
300 {
301 get { return base.GraphicsDeviceManager.Direct3D9.Device; }
302 }
303 public CPluginHost PluginHost
304 {
305 get;
306 private set;
307 }
308 public List<STPlugin> listプラグイン = new List<STPlugin>();
309 public struct STPlugin
310 {
311 public IPluginActivity plugin;
312 public string strプラグインフォルダ;
313 public string strアセンブリ簡易名;
314 public Version Version;
315 }
316 private static Size currentClientSize // #23510 2010.10.27 add yyagi to keep current window size
317 {
318 get;
319 set;
320 }
321 // public static CTimer ct;
322 public IntPtr WindowHandle // 2012.10.24 yyagi; to add ASIO support
323 {
324 get { return base.Window.Handle; }
325 }
326
327 // コンストラクタ
328
329 public CDTXMania()
330 {
331 CDTXMania.app = this;
332 this.t起動処理();
333 }
334
335
336 // メソッド
337
338 public void t全画面・ウィンドウモド切り替え()
339 {
340 #if WindowedFullscreen
341 if ( ConfigIni != null )
342 #else
343 DeviceSettings settings = base.GraphicsDeviceManager.CurrentSettings.Clone();
344 if ((ConfigIni != null) && (ConfigIni.bウィンドウモ != settings.Windowed))
345 #endif
346 {
347 #if !WindowedFullscreen
348 settings.Windowed = ConfigIni.bウィンドウモ;
349 #endif
350 if (ConfigIni.bウィンドウモ == false) // #23510 2010.10.27 yyagi: backup current window size before going fullscreen mode
351 {
352 currentClientSize = this.Window.ClientSize;
353 ConfigIni.nウインドウwidth = this.Window.ClientSize.Width;
354 ConfigIni.nウインドウheight = this.Window.ClientSize.Height;
355 // FDK.CTaskBar.ShowTaskBar( false );
356 }
357 #if !WindowedFullscreen
358 base.GraphicsDeviceManager.ChangeDevice(settings);
359 #endif
360 if (ConfigIni.bウィンドウモ == true) // #23510 2010.10.27 yyagi: to resume window size from backuped value
361 {
362 #if WindowedFullscreen
363 base.Window.ClientSize =
364 new Size(currentClientSize.Width, currentClientSize.Height);
365 }
366 }
367 if ( ConfigIni.bウィンドウモ == true ) // #23510 2010.10.27 yyagi: to resume window size from backuped value
368 {
369 // #30666 2013.2.2 yyagi Don't use Fullscreen mode becasue NVIDIA GeForce is
370 // tend to delay drawing on Fullscreen mode. So DTXMania uses Maximized window
371 // in spite of using fullscreen mode.
372 app.Window.WindowState = FormWindowState.Normal;
373 app.Window.FormBorderStyle = FormBorderStyle.Sizable;
374 app.Window.WindowState = FormWindowState.Normal;
375 #endif
376 base.Window.ClientSize =
377 new Size(currentClientSize.Width, currentClientSize.Height);
378 // FDK.CTaskBar.ShowTaskBar( true );
379 }
380 #if WindowedFullscreen
381 else
382 {
383 app.Window.WindowState = FormWindowState.Normal;
384 app.Window.FormBorderStyle = FormBorderStyle.None;
385 app.Window.WindowState = FormWindowState.Maximized;
386 }
387 if ( ConfigIni.bウィンドウモ )
388 {
389 if ( !this.bマウスカソル表示中 )
390 {
391 Cursor.Show();
392 this.bマウスカソル表示中 = true;
393 }
394 }
395 else if ( this.bマウスカソル表示中 )
396 {
397 Cursor.Hide();
398 this.bマウスカソル表示中 = false;
399 }
400 #endif
401 }
402
403 }
404
405
406 #region [ #24609 リザルト画像をpngで保存する ] // #24609 2011.3.14 yyagi; to save result screen in case BestRank or HiSkill.
407 /// <summary>
408 /// リザルト画像のキャプチャと保存。
409 /// </summary>
410 /// <param name="strFilename">保存するファイル名(フルパス)</param>
411 public bool SaveResultScreen( string strFullPath )
412 {
413 string strSavePath = Path.GetDirectoryName( strFullPath );
414 if ( !Directory.Exists( strSavePath ) )
415 {
416 try
417 {
418 Directory.CreateDirectory( strSavePath );
419 }
420 catch
421 {
422 return false;
423 }
424 }
425
426 // http://www.gamedev.net/topic/594369-dx9slimdxati-incorrect-saving-surface-to-file/
427 using ( Surface pSurface = CDTXMania.app.Device.GetRenderTarget( 0 ) )
428 {
429 Surface.ToFile( pSurface, strFullPath, ImageFileFormat.Png );
430 }
431 return true;
432 }
433 #endregion
434
435 // Game 実装
436 protected override void Initialize()
437 {
438 // new GCBeep();
439 if( this.listトップレベルActivities != null )
440 {
441 foreach (CActivity activity in this.listトップレベルActivities)
442 {
443 activity.OnManagedリソスの作成();
444 }
445 }
446
447 foreach( STPlugin st in this.listプラグイン )
448 {
449 Directory.SetCurrentDirectory( st.strプラグインフォルダ );
450 st.plugin.OnManagedリソスの作成();
451 Directory.SetCurrentDirectory( CDTXMania.strEXEのあるフォルダ );
452 }
453 #if GPUFlushAfterPresent
454 FrameEnd += dtxmania_FrameEnd;
455 #endif
456 }
457 #if GPUFlushAfterPresent
458 void dtxmania_FrameEnd( object sender, EventArgs e ) // GraphicsDeviceManager.game_FrameEnd()後に実行される
459 { // → Present()直後にGPUをFlushする
460 // → 画面のカクツキが頻発したため、ここでのFlushは行わない
461 actFlushGPU.On進行描画(); // Flush GPU
462 }
463 #endif
464 protected override void LoadContent()
465 {
466 if ( ConfigIni.bウィンドウモ )
467 {
468 if( !this.bマウスカソル表示中 )
469 {
470 Cursor.Show();
471 this.bマウスカソル表示中 = true;
472 }
473 }
474 else if( this.bマウスカソル表示中 )
475 {
476 Cursor.Hide();
477 this.bマウスカソル表示中 = false;
478 }
479 this.Device.SetTransform(TransformState.View, Matrix.LookAtLH(new Vector3(0f, 0f, (float)(-SampleFramework.GameWindowSize.Height / 2 * Math.Sqrt(3.0))), new Vector3(0f, 0f, 0f), new Vector3(0f, 1f, 0f)));
480 this.Device.SetTransform(TransformState.Projection, Matrix.PerspectiveFovLH(C変換.DegreeToRadian((float)60f), ((float)this.Device.Viewport.Width) / ((float)this.Device.Viewport.Height), -100f, 100f));
481 this.Device.SetRenderState(RenderState.Lighting, false);
482 this.Device.SetRenderState(RenderState.ZEnable, false);
483 this.Device.SetRenderState(RenderState.AntialiasedLineEnable, false);
484 this.Device.SetRenderState(RenderState.AlphaTestEnable, true);
485 this.Device.SetRenderState(RenderState.AlphaRef, 10);
486
487 if (CDTXMania.ConfigIni.b縮小文字のアンチエイリアスを有効にする == true)
488 {
489 this.Device.SetRenderState(RenderState.MultisampleAntialias, true);
490 this.Device.SetSamplerState(0, SamplerState.MinFilter, TextureFilter.Linear);
491 this.Device.SetSamplerState(0, SamplerState.MagFilter, TextureFilter.Linear);
492 }
493
494 this.Device.SetRenderState<Compare>(RenderState.AlphaFunc, Compare.Greater);
495 this.Device.SetRenderState(RenderState.AlphaBlendEnable, true);
496 this.Device.SetRenderState<Blend>(RenderState.SourceBlend, Blend.SourceAlpha);
497 this.Device.SetRenderState<Blend>(RenderState.DestinationBlend, Blend.InverseSourceAlpha);
498 this.Device.SetTextureStageState(0, TextureStage.AlphaOperation, TextureOperation.Modulate);
499 this.Device.SetTextureStageState(0, TextureStage.AlphaArg1, 2);
500 this.Device.SetTextureStageState(0, TextureStage.AlphaArg2, 1);
501
502 if( this.listトップレベルActivities != null )
503 {
504 foreach( CActivity activity in this.listトップレベルActivities )
505 activity.OnUnmanagedリソスの作成();
506 }
507
508 foreach( STPlugin st in this.listプラグイン )
509 {
510 Directory.SetCurrentDirectory( st.strプラグインフォルダ );
511 st.plugin.OnUnmanagedリソスの作成();
512 Directory.SetCurrentDirectory( CDTXMania.strEXEのあるフォルダ );
513 }
514
515 #region[ クレジット表記 ]
516 if (ConfigIni.クレジットを表示する == true)
517 {
518 this.ftDeclaration = new System.Drawing.Font("Arial", 13f, FontStyle.Regular, GraphicsUnit.Pixel);
519 Bitmap image = new Bitmap(1, 1);
520 Graphics graphics = Graphics.FromImage(image);
521 graphics.PageUnit = GraphicsUnit.Pixel;
522 int width = (int)graphics.MeasureString("DTXManiaXG(verK) ver 2.60 based on DTXMania", this.ftDeclaration).Width;
523 graphics.Dispose();
524 Bitmap bitmap2 = new Bitmap(width, this.ftDeclaration.Height);
525 graphics = Graphics.FromImage(bitmap2);
526 graphics.DrawString("DTXManiaXG(verK) ver 2.60 based on DTXMania", this.ftDeclaration, Brushes.White, (float)0f, (float)0f);
527 graphics.Dispose();
528 this.txCredit = new CTexture(app.Device, bitmap2, TextureFormat);
529 bitmap2.Dispose();
530 graphics = Graphics.FromImage(image);
531 graphics.PageUnit = GraphicsUnit.Pixel;
532 width = (int)graphics.MeasureString("CREDIT 0", this.ftDeclaration).Width;
533 graphics.Dispose();
534 bitmap2 = new Bitmap(width, this.ftDeclaration.Height);
535 graphics = Graphics.FromImage(bitmap2);
536 graphics.DrawString("CREDIT 0", this.ftDeclaration, Brushes.White, (float)0f, (float)0f);
537 graphics.Dispose();
538 this.txDeclaration = new CTexture(app.Device, bitmap2, TextureFormat);
539 bitmap2.Dispose();
540 }
541 #endregion
542 }
543 protected override void UnloadContent()
544 {
545 if( this.listトップレベルActivities != null )
546 {
547 foreach( CActivity activity in this.listトップレベルActivities )
548 activity.OnUnmanagedリソスの解放();
549 }
550
551 foreach( STPlugin st in this.listプラグイン )
552 {
553 Directory.SetCurrentDirectory( st.strプラグインフォルダ );
554 st.plugin.OnUnmanagedリソスの解放();
555 Directory.SetCurrentDirectory( CDTXMania.strEXEのあるフォルダ );
556 }
557 }
558 protected override void OnExiting( EventArgs e )
559 {
560 CPowerManagement.tEnableMonitorSuspend(); // スリープ抑止状態を解除
561 this.t終了処理();
562 base.OnExiting( e );
563 }
564 protected override void Update( GameTime gameTime )
565 {
566 }
567 protected override void Draw( GameTime gameTime )
568 {
569 Sound管理.t再生中の処理をする();
570
571 if( Timer != null )
572 Timer.t更新();
573 if (CSound管理.rc演奏用タイマ != null)
574 CSound管理.rc演奏用タイマ.t更新();
575
576 if( Input管理 != null )
577 Input管理.tリング( this.bApplicationActive, CDTXMania.ConfigIni.bバッファ入力を行う );
578
579 if( FPS != null )
580 FPS.tカウンタ更新();
581
582 //if( Pad != null ) ポーリング時にクリアしたらダメ!曲の開始時に1回だけクリアする。(2010.9.11)
583 // Pad.st検知したデバイス.Clear();
584
585 if( this.Device == null )
586 return;
587
588 if (this.bApplicationActive) // DTXMania本体起動中の本体/モニタの省電力モード移行を抑止
589 CPowerManagement.tDisableMonitorSuspend();
590
591 // #xxxxx 2013.4.8 yyagi; sleepの挿入位置を、EndScnene~Present間から、BeginScene前に移動。描画遅延を小さくするため。
592 #region [ スリープ ]
593 if ( ConfigIni.nフレム毎スリms >= 0 ) // #xxxxx 2011.11.27 yyagi
594 {
595 Thread.Sleep( ConfigIni.nフレム毎スリms );
596 }
597 #endregion
598
599 this.Device.BeginScene();
600 this.Device.Clear(ClearFlags.ZBuffer | ClearFlags.Target, Color.Black, 1f, 0);
601
602 if( r現在のステ != null )
603 {
604 this.n進行描画の戻り値 = ( r現在のステ != null ) ? r現在のステ.On進行描画() : 0;
605
606 #region [ プラグインの進行描画 ]
607 //---------------------
608 foreach( STPlugin sp in this.listプラグイン )
609 {
610 Directory.SetCurrentDirectory( sp.strプラグインフォルダ );
611
612 if( CDTXMania.act現在入力を占有中のプラグイン == null || CDTXMania.act現在入力を占有中のプラグイン == sp.plugin )
613 sp.plugin.On進行描画( CDTXMania.Pad, CDTXMania.Input管理.Keyboard );
614 else
615 sp.plugin.On進行描画( null, null );
616
617 Directory.SetCurrentDirectory( CDTXMania.strEXEのあるフォルダ );
618 }
619 //---------------------
620 #endregion
621
622
623 CScoreIni scoreIni = null;
624
625 //if (Control.IsKeyLocked(Keys.CapsLock)) // #30925 2013.3.11 yyagi; capslock=ON時は、EnumSongsしないようにして、起動負荷とASIOの音切れの関係を確認する
626 //{ // → songs.db等の書き込み時だと音切れするっぽい
627 // CDTXMania.stage選曲.bIsEnumeratingSongs = false;
628 // actEnumSongs.On非活性化();
629 // EnumSongs.SongListEnumCompletelyDone();
630 //}
631 #region [ 曲検索スレッドの起動/終了 ] // ここに"Enumerating Songs..."表示を集約
632 if (!CDTXMania.bコンパクトモ)
633 {
634 actEnumSongs.On進行描画(); // "Enumerating Songs..."アイコンの描画
635 } // "Enumerating Songs..."アイコンの描画
636 switch ( r現在のステ.eステID )
637 {
638 case CStage.Eステ.タイトル:
639 case CStage.Eステ.コンフィグ:
640 case CStage.Eステ.オプション:
641 case CStage.Eステ.選曲:
642 case CStage.Eステ.曲読み込み:
643 if ( EnumSongs != null )
644 {
645 #region [ (特定条件時) 曲検索スレッドの起動・開始 ]
646 if ( r現在のステ.eステID == CStage.Eステ.タイトル &&
647 r直前のステ.eステID == CStage.Eステ.起動 &&
648 this.n進行描画の戻り値 == (int) CStageタイトル.E戻り値.継続 &&
649 !EnumSongs.IsSongListEnumStarted )
650 {
651 actEnumSongs.On活性化();
652 CDTXMania.stage選曲.bIsEnumeratingSongs = true;
653 EnumSongs.Init( CDTXMania.Songs管理.listSongsDB, CDTXMania.Songs管理.nSongsDBから取得できたスコア数 ); // songs.db情報と、取得した曲数を、新インスタンスにも与える
654 EnumSongs.StartEnumFromDisk(); // 曲検索スレッドの起動・開始
655 if ( CDTXMania.Songs管理.nSongsDBから取得できたスコア数 == 0 ) // もし初回起動なら、検索スレッドのプライオリティをLowestでなくNormalにする
656 {
657 EnumSongs.ChangeEnumeratePriority( ThreadPriority.Normal );
658 }
659 }
660 #endregion
661
662 #region [ 曲検索の中断と再開 ]
663 if ( r現在のステ.eステID == CStage.Eステ.選曲 && !EnumSongs.IsSongListEnumCompletelyDone )
664 {
665 switch ( this.n進行描画の戻り値 )
666 {
667 case 0: // 何もない
668 //if ( CDTXMania.stage選曲.bIsEnumeratingSongs )
669 if ( !CDTXMania.stage選曲.bIsPlayingPremovie )
670 {
671 EnumSongs.Resume(); // #27060 2012.2.6 yyagi 中止していたバックグランド曲検索を再開
672 EnumSongs.IsSlowdown = false;
673 }
674 else
675 {
676 // EnumSongs.Suspend(); // #27060 2012.3.2 yyagi #PREMOVIE再生中は曲検索を低速化
677 EnumSongs.IsSlowdown = true;
678 }
679 actEnumSongs.On活性化();
680 break;
681
682 case 2: // 曲決定
683 EnumSongs.Suspend(); // #27060 バックグラウンドの曲検索を一時停止
684 actEnumSongs.On非活性化();
685 break;
686 }
687 }
688 #endregion
689
690 #region [ 曲探索中断待ち待機 ]
691 if ( r現在のステ.eステID == CStage.Eステ.曲読み込み && !EnumSongs.IsSongListEnumCompletelyDone &&
692 EnumSongs.thDTXFileEnumerate != null ) // #28700 2012.6.12 yyagi; at Compact mode, enumerating thread does not exist.
693 {
694 EnumSongs.WaitUntilSuspended(); // 念のため、曲検索が一時中断されるまで待機
695 }
696 #endregion
697
698 #region [ 曲検索が完了したら、実際の曲リストに反映する ]
699 // CStage選曲.On活性化() に回した方がいいかな?
700 if ( EnumSongs.IsSongListEnumerated )
701 {
702 actEnumSongs.On非活性化();
703 CDTXMania.stage選曲.bIsEnumeratingSongs = false;
704
705 bool bRemakeSongTitleBar = ( r現在のステ.eステID == CStage.Eステ.選曲 ) ? true : false;
706 CDTXMania.stage選曲.Refresh( EnumSongs.Songs管理, bRemakeSongTitleBar );
707 EnumSongs.SongListEnumCompletelyDone();
708 }
709 #endregion
710 }
711 break;
712 }
713 #endregion
714
715 switch ( r現在のステ.eステID )
716 {
717 case CStage.Eステ.何もしない:
718 break;
719
720 case CStage.Eステ.起動:
721 #region [ *** ]
722 //-----------------------------
723 if( this.n進行描画の戻り値 != 0 )
724 {
725 if( !bコンパクトモ )
726 {
727 r現在のステ.On非活性化();
728 Trace.TraceInformation( "----------------------" );
729 Trace.TraceInformation( "■ タイトル" );
730 stageタイトル.On活性化();
731 r直前のステ = r現在のステ;
732 r現在のステ = stageタイトル;
733 }
734 else
735 {
736 r現在のステ.On非活性化();
737 Trace.TraceInformation( "----------------------" );
738 Trace.TraceInformation( "■ 曲読み込み" );
739 stage曲読み込み.On活性化();
740 r直前のステ = r現在のステ;
741 r現在のステ = stage曲読み込み;
742
743 }
744 foreach( STPlugin pg in this.listプラグイン )
745 {
746 Directory.SetCurrentDirectory( pg.strプラグインフォルダ );
747 pg.plugin.Onステジ変更();
748 Directory.SetCurrentDirectory( CDTXMania.strEXEのあるフォルダ );
749 }
750
751 this.tガベジコレクションを実行する();
752 }
753 //-----------------------------
754 #endregion
755 break;
756
757 case CStage.Eステ.タイトル:
758 #region [ *** ]
759 //-----------------------------
760 switch( this.n進行描画の戻り値 )
761 {
762 case (int)CStageタイトル.E戻り値.GAMESTART:
763 #region [ 選曲処理へ ]
764 //-----------------------------
765 r現在のステ.On非活性化();
766 Trace.TraceInformation( "----------------------" );
767 Trace.TraceInformation( "■ 選曲" );
768 stage選曲.On活性化();
769 r直前のステ = r現在のステ;
770 r現在のステ = stage選曲;
771 //-----------------------------
772 #endregion
773 break;
774
775 #region [ OPTION: 廃止済 ]
776 /*
777 case 2: // #24525 OPTIONとCONFIGの統合に伴い、OPTIONは廃止
778 #region [ *** ]
779 //-----------------------------
780 r現在のステージ.On非活性化();
781 Trace.TraceInformation( "----------------------" );
782 Trace.TraceInformation( "■ オプション" );
783 stageオプション.On活性化();
784 r直前のステージ = r現在のステージ;
785 r現在のステージ = stageオプション;
786 //-----------------------------
787 #endregion
788 break;
789 */
790 #endregion
791
792 case (int)CStageタイトル.E戻り値.CONFIG:
793 #region [ *** ]
794 //-----------------------------
795 r現在のステ.On非活性化();
796 Trace.TraceInformation( "----------------------" );
797 Trace.TraceInformation( "■ コンフィグ" );
798 stageコンフィグ.On活性化();
799 r直前のステ = r現在のステ;
800 r現在のステ = stageコンフィグ;
801 //-----------------------------
802 #endregion
803 break;
804
805 case (int)CStageタイトル.E戻り値.EXIT:
806 #region [ *** ]
807 //-----------------------------
808 r現在のステ.On非活性化();
809 Trace.TraceInformation( "----------------------" );
810 Trace.TraceInformation( "■ 終了" );
811 stage終了.On活性化();
812 r直前のステ = r現在のステ;
813 r現在のステ = stage終了;
814 //-----------------------------
815 #endregion
816 break;
817 }
818
819 foreach( STPlugin pg in this.listプラグイン )
820 {
821 Directory.SetCurrentDirectory( pg.strプラグインフォルダ );
822 pg.plugin.Onステジ変更();
823 Directory.SetCurrentDirectory( CDTXMania.strEXEのあるフォルダ );
824 }
825
826 this.tガベジコレクションを実行する();
827 //-----------------------------
828 #endregion
829 break;
830
831
832 case CStage.Eステ.オプション:
833 #region [ *** ]
834 //-----------------------------
835 if( this.n進行描画の戻り値 != 0 )
836 {
837 switch( r直前のステ.eステID )
838 {
839 case CStage.Eステ.タイトル:
840 #region [ *** ]
841 //-----------------------------
842 r現在のステ.On非活性化();
843 Trace.TraceInformation( "----------------------" );
844 Trace.TraceInformation( "■ タイトル" );
845 stageタイトル.On活性化();
846 r直前のステ = r現在のステ;
847 r現在のステ = stageタイトル;
848
849 foreach( STPlugin pg in this.listプラグイン )
850 {
851 Directory.SetCurrentDirectory( pg.strプラグインフォルダ );
852 pg.plugin.Onステジ変更();
853 Directory.SetCurrentDirectory( CDTXMania.strEXEのあるフォルダ );
854 }
855
856 this.tガベジコレクションを実行する();
857 break;
858 //-----------------------------
859 #endregion
860
861 case CStage.Eステ.選曲:
862 #region [ *** ]
863 //-----------------------------
864 r現在のステ.On非活性化();
865 Trace.TraceInformation( "----------------------" );
866 Trace.TraceInformation( "■ 選曲" );
867 stage選曲.On活性化();
868 r直前のステ = r現在のステ;
869 r現在のステ = stage選曲;
870
871 foreach( STPlugin pg in this.listプラグイン )
872 {
873 Directory.SetCurrentDirectory( pg.strプラグインフォルダ );
874 pg.plugin.Onステジ変更();
875 Directory.SetCurrentDirectory( CDTXMania.strEXEのあるフォルダ );
876 }
877
878 this.tガベジコレクションを実行する();
879 break;
880 //-----------------------------
881 #endregion
882 }
883 }
884 //-----------------------------
885 #endregion
886 break;
887
888
889 case CStage.Eステ.コンフィグ:
890 #region [ *** ]
891 //-----------------------------
892 if( this.n進行描画の戻り値 != 0 )
893 {
894 switch( r直前のステ.eステID )
895 {
896 case CStage.Eステ.タイトル:
897 #region [ *** ]
898 //-----------------------------
899 r現在のステ.On非活性化();
900 Trace.TraceInformation( "----------------------" );
901 Trace.TraceInformation( "■ タイトル" );
902 stageタイトル.On活性化();
903 r直前のステ = r現在のステ;
904 r現在のステ = stageタイトル;
905
906 foreach( STPlugin pg in this.listプラグイン )
907 {
908 Directory.SetCurrentDirectory( pg.strプラグインフォルダ );
909 pg.plugin.Onステジ変更();
910 Directory.SetCurrentDirectory( CDTXMania.strEXEのあるフォルダ );
911 }
912
913 this.tガベジコレクションを実行する();
914 break;
915 //-----------------------------
916 #endregion
917
918 case CStage.Eステ.選曲:
919 #region [ *** ]
920 //-----------------------------
921 r現在のステ.On非活性化();
922 Trace.TraceInformation( "----------------------" );
923 Trace.TraceInformation( "■ 選曲" );
924 stage選曲.On活性化();
925 r直前のステ = r現在のステ;
926 r現在のステ = stage選曲;
927
928 foreach( STPlugin pg in this.listプラグイン )
929 {
930 Directory.SetCurrentDirectory( pg.strプラグインフォルダ );
931 pg.plugin.Onステジ変更();
932 Directory.SetCurrentDirectory( CDTXMania.strEXEのあるフォルダ );
933 }
934
935 this.tガベジコレクションを実行する();
936 break;
937 //-----------------------------
938 #endregion
939 }
940 }
941 //-----------------------------
942 #endregion
943 break;
944
945 case CStage.Eステ.選曲:
946 #region [ *** ]
947 //-----------------------------
948 switch( this.n進行描画の戻り値 )
949 {
950 case (int) CStage選曲.E戻り値.タイトルに戻る:
951 #region [ *** ]
952 //-----------------------------
953 r現在のステ.On非活性化();
954 Trace.TraceInformation( "----------------------" );
955 Trace.TraceInformation( "■ タイトル" );
956 stageタイトル.On活性化();
957 r直前のステ = r現在のステ;
958 r現在のステ = stageタイトル;
959
960 foreach( STPlugin pg in this.listプラグイン )
961 {
962 Directory.SetCurrentDirectory( pg.strプラグインフォルダ );
963 pg.plugin.Onステジ変更();
964 Directory.SetCurrentDirectory( CDTXMania.strEXEのあるフォルダ );
965 }
966
967 this.tガベジコレクションを実行する();
968 break;
969 //-----------------------------
970 #endregion
971
972 case (int) CStage選曲.E戻り値.選曲した:
973 #region [ *** ]
974 //-----------------------------
975 r現在のステ.On非活性化();
976 Trace.TraceInformation( "----------------------" );
977 Trace.TraceInformation( "■ 曲読み込み" );
978 stage曲読み込み.On活性化();
979 r直前のステ = r現在のステ;
980 r現在のステ = stage曲読み込み;
981
982 foreach( STPlugin pg in this.listプラグイン )
983 {
984 Directory.SetCurrentDirectory( pg.strプラグインフォルダ );
985 pg.plugin.Onステジ変更();
986 Directory.SetCurrentDirectory( CDTXMania.strEXEのあるフォルダ );
987 }
988
989 this.tガベジコレクションを実行する();
990 break;
991 //-----------------------------
992 #endregion
993
994
995 case (int) CStage選曲.E戻り値.オプション呼び出し:
996 #region [ *** ]
997 //-----------------------------
998
999 r現在のステ.On非活性化();
1000 Trace.TraceInformation( "----------------------" );
1001 Trace.TraceInformation( "■ オプション" );
1002 stageオプション.On活性化();
1003 r直前のステ = r現在のステ;
1004 r現在のステ = stageオプション;
1005
1006 foreach( STPlugin pg in this.listプラグイン )
1007 {
1008 Directory.SetCurrentDirectory( pg.strプラグインフォルダ );
1009 pg.plugin.Onステジ変更();
1010 Directory.SetCurrentDirectory( CDTXMania.strEXEのあるフォルダ );
1011 }
1012
1013 this.tガベジコレクションを実行する();
1014 break;
1015 //-----------------------------
1016 #endregion
1017
1018 case (int) CStage選曲.E戻り値.コンフィグ呼び出し:
1019 #region [ *** ]
1020 //-----------------------------
1021 r現在のステ.On非活性化();
1022 Trace.TraceInformation( "----------------------" );
1023 Trace.TraceInformation( "■ コンフィグ" );
1024 stageコンフィグ.On活性化();
1025 r直前のステ = r現在のステ;
1026 r現在のステ = stageコンフィグ;
1027
1028 foreach( STPlugin pg in this.listプラグイン )
1029 {
1030 Directory.SetCurrentDirectory( pg.strプラグインフォルダ );
1031 pg.plugin.Onステジ変更();
1032 Directory.SetCurrentDirectory( CDTXMania.strEXEのあるフォルダ );
1033 }
1034
1035 this.tガベジコレクションを実行する();
1036 break;
1037 //-----------------------------
1038 #endregion
1039
1040 case (int) CStage選曲.E戻り値.スキン変更:
1041
1042 #region [ *** ]
1043 //-----------------------------
1044 r現在のステ.On非活性化();
1045 Trace.TraceInformation( "----------------------" );
1046 Trace.TraceInformation( "■ スキン切り替え" );
1047 stageChangeSkin.On活性化();
1048 r直前のステ = r現在のステ;
1049 r現在のステ = stageChangeSkin;
1050 break;
1051 //-----------------------------
1052 #endregion
1053 }
1054 //-----------------------------
1055 #endregion
1056 break;
1057
1058 case CStage.Eステ.曲読み込み:
1059 #region [ *** ]
1060 //-----------------------------
1061 if( this.n進行描画の戻り値 != 0 )
1062 {
1063 CDTXMania.Pad.st検知したデバイス.Clear(); // 入力デバイスフラグクリア(2010.9.11)
1064
1065 r現在のステ.On非活性化();
1066
1067 #region [ ESC押下時は、曲の読み込みを中止して選曲画面に戻る ]
1068 if ( this.n進行描画の戻り値 == (int) E曲読込画面の戻り値.読込中止 )
1069 {
1070 //DTX.t全チップの再生停止();
1071 DTX.On非活性化();
1072 Trace.TraceInformation( "曲の読み込みを中止しました。" );
1073 this.tガベジコレクションを実行する();
1074 Trace.TraceInformation( "----------------------" );
1075 Trace.TraceInformation( "■ 選曲" );
1076 stage選曲.On活性化();
1077 r直前のステ = r現在のステ;
1078 r現在のステ = stage選曲;
1079 foreach ( STPlugin pg in this.listプラグイン )
1080 {
1081 Directory.SetCurrentDirectory( pg.strプラグインフォルダ );
1082 pg.plugin.Onステジ変更();
1083 Directory.SetCurrentDirectory( CDTXMania.strEXEのあるフォルダ );
1084 }
1085 break;
1086 }
1087 #endregion
1088
1089
1090 if( !ConfigIni.bギタレボモ )
1091 {
1092 Trace.TraceInformation( "----------------------" );
1093 Trace.TraceInformation( "■ 演奏(ドラム画面)" );
1094 #if false // #23625 2011.1.11 Config.iniからダメージ/回復値の定数変更を行う場合はここを有効にする 087リリースに合わせ機能無効化
1095 for (int i = 0; i < 5; i++)
1096 {
1097 for (int j = 0; j < 2; j++)
1098 {
1099 stage演奏ドラム画面.fDamageGaugeDelta[i, j] = ConfigIni.fGaugeFactor[i, j];
1100 }
1101 }
1102 for (int i = 0; i < 3; i++) {
1103 stage演奏ドラム画面.fDamageLevelFactor[i] = ConfigIni.fDamageLevelFactor[i];
1104 }
1105 #endif
1106 r直前のステ = r現在のステ;
1107 r現在のステ = stage演奏ドラム画面;
1108 }
1109 else
1110 {
1111 Trace.TraceInformation( "----------------------" );
1112 Trace.TraceInformation( "■ 演奏(ギター画面)" );
1113 #if false // #23625 2011.1.11 Config.iniからダメージ/回復値の定数変更を行う場合はここを有効にする 087リリースに合わせ機能無効化
1114 for (int i = 0; i < 5; i++)
1115 {
1116 for (int j = 0; j < 2; j++)
1117 {
1118 stage演奏ギタ画面.fDamageGaugeDelta[i, j] = ConfigIni.fGaugeFactor[i, j];
1119 }
1120 }
1121 for (int i = 0; i < 3; i++) {
1122 stage演奏ギタ画面.fDamageLevelFactor[i] = ConfigIni.fDamageLevelFactor[i];
1123 }
1124 #endif
1125 r直前のステ = r現在のステ;
1126 r現在のステ = stage演奏ギタ画面;
1127 }
1128
1129 foreach( STPlugin pg in this.listプラグイン )
1130 {
1131 Directory.SetCurrentDirectory( pg.strプラグインフォルダ );
1132 pg.plugin.Onステジ変更();
1133 Directory.SetCurrentDirectory( CDTXMania.strEXEのあるフォルダ );
1134 }
1135
1136 this.tガベジコレクションを実行する();
1137 }
1138 //-----------------------------
1139 #endregion
1140 break;
1141
1142 case CStage.Eステ.演奏:
1143 #region [ *** ]
1144 //-----------------------------
1145 switch( this.n進行描画の戻り値 )
1146 {
1147 case (int) E演奏画面の戻り値.継続:
1148 break;
1149
1150 case (int) E演奏画面の戻り値.演奏中断:
1151 #region [ 演奏キャンセル ]
1152 //-----------------------------
1153 scoreIni = this.tScoreIniBGMAdjustHistoryPlayCountを更新( "Play canceled" );
1154
1155 #region [ プラグイン On演奏キャンセル() の呼び出し ]
1156 //---------------------
1157 foreach( STPlugin pg in this.listプラグイン )
1158 {
1159 Directory.SetCurrentDirectory( pg.strプラグインフォルダ );
1160 pg.plugin.On演奏キャンセル( scoreIni );
1161 Directory.SetCurrentDirectory( CDTXMania.strEXEのあるフォルダ );
1162 }
1163 //---------------------
1164 #endregion
1165
1166 DTX.t全チップの再生停止();
1167 DTX.On非活性化();
1168 r現在のステ.On非活性化();
1169 if( bコンパクトモ )
1170 {
1171 base.Window.Close();
1172 }
1173 else
1174 {
1175 Trace.TraceInformation( "----------------------" );
1176 Trace.TraceInformation( "■ 選曲" );
1177 stage選曲.On活性化();
1178 r直前のステ = r現在のステ;
1179 r現在のステ = stage選曲;
1180
1181 #region [ プラグイン Onステージ変更() の呼び出し ]
1182 //---------------------
1183 foreach( STPlugin pg in this.listプラグイン )
1184 {
1185 Directory.SetCurrentDirectory( pg.strプラグインフォルダ );
1186 pg.plugin.Onステジ変更();
1187 Directory.SetCurrentDirectory( CDTXMania.strEXEのあるフォルダ );
1188 }
1189 //---------------------
1190 #endregion
1191
1192 this.tガベジコレクションを実行する();
1193 }
1194 break;
1195 //-----------------------------
1196 #endregion
1197
1198 case (int) E演奏画面の戻り値.ステジ失敗:
1199 #region [ 演奏失敗(StageFailed) ]
1200 //-----------------------------
1201 scoreIni = this.tScoreIniBGMAdjustHistoryPlayCountを更新( "Stage failed" );
1202
1203 #region [ プラグイン On演奏失敗() の呼び出し ]
1204 //---------------------
1205 foreach( STPlugin pg in this.listプラグイン )
1206 {
1207 Directory.SetCurrentDirectory( pg.strプラグインフォルダ );
1208 pg.plugin.On演奏失敗( scoreIni );
1209 Directory.SetCurrentDirectory( CDTXMania.strEXEのあるフォルダ );
1210 }
1211 //---------------------
1212 #endregion
1213
1214 DTX.t全チップの再生停止();
1215 DTX.On非活性化();
1216 r現在のステ.On非活性化();
1217 if( bコンパクトモ )
1218 {
1219 base.Window.Close();
1220 }
1221 else
1222 {
1223 Trace.TraceInformation( "----------------------" );
1224 Trace.TraceInformation( "■ 選曲" );
1225 stage選曲.On活性化();
1226 r直前のステ = r現在のステ;
1227 r現在のステ = stage選曲;
1228
1229 #region [ プラグイン Onステージ変更() の呼び出し ]
1230 //---------------------
1231 foreach( STPlugin pg in this.listプラグイン )
1232 {
1233 Directory.SetCurrentDirectory( pg.strプラグインフォルダ );
1234 pg.plugin.Onステジ変更();
1235 Directory.SetCurrentDirectory( CDTXMania.strEXEのあるフォルダ );
1236 }
1237 //---------------------
1238 #endregion
1239
1240 this.tガベジコレクションを実行する();
1241 }
1242 break;
1243 //-----------------------------
1244 #endregion
1245
1246 case (int) E演奏画面の戻り値.ステジクリア:
1247 #region [ 演奏クリア ]
1248 //-----------------------------
1249 CScoreIni.C演奏記録 c演奏記録_Drums, c演奏記録_Guitar, c演奏記録_Bass;
1250 CDTX.CChip[] chipArray = new CDTX.CChip[10];
1251 if( ConfigIni.bギタレボモ )
1252 {
1253 stage演奏ギタ画面.t演奏結果を格納する( out c演奏記録_Drums, out c演奏記録_Guitar, out c演奏記録_Bass );
1254 }
1255 else
1256 {
1257 stage演奏ドラム画面.t演奏結果を格納する( out c演奏記録_Drums, out c演奏記録_Guitar, out c演奏記録_Bass, out chipArray );
1258 }
1259
1260 if ( CDTXMania.ConfigIni.bIsSwappedGuitarBass ) // #24063 2011.1.24 yyagi Gt/Bsを入れ替えていたなら、演奏結果も入れ替える
1261 {
1262 CScoreIni.C演奏記録 t;
1263 t = c演奏記録_Guitar;
1264 c演奏記録_Guitar = c演奏記録_Bass;
1265 c演奏記録_Bass = t;
1266
1267 CDTXMania.DTX.SwapGuitarBassInfos(); // 譜面情報も元に戻す
1268 CDTXMania.ConfigIni.SwapGuitarBassInfos_AutoFlags(); // #24415 2011.2.27 yyagi
1269 // リザルト集計時のみ、Auto系のフラグも元に戻す。
1270 // これを戻すのは、リザルト集計後。
1271 } // "case CStage.Eステージ.結果:"のところ。
1272
1273 double ps = 0.0, gs = 0.0;
1274 if ( !c演奏記録_Drums.bAUTOである && c演奏記録_Drums.n全チップ数 > 0) {
1275 ps = c演奏記録_Drums.db演奏型スキル値;
1276 gs = c演奏記録_Drums.dbム型スキル値;
1277 }
1278 else if ( !c演奏記録_Guitar.bAUTOである && c演奏記録_Guitar.n全チップ数 > 0) {
1279 ps = c演奏記録_Guitar.db演奏型スキル値;
1280 gs = c演奏記録_Guitar.dbム型スキル値;
1281 }
1282 else
1283 {
1284 ps = c演奏記録_Bass.db演奏型スキル値;
1285 gs = c演奏記録_Bass.dbム型スキル値;
1286 }
1287 string str = "Cleared";
1288 switch( CScoreIni.t総合ランク値を計算して返す( c演奏記録_Drums, c演奏記録_Guitar, c演奏記録_Bass ) )
1289 {
1290 case (int)CScoreIni.ERANK.SS:
1291 str = string.Format( "Cleared (SS: {0:F2})", ps );
1292 break;
1293
1294 case (int) CScoreIni.ERANK.S:
1295 str = string.Format( "Cleared (S: {0:F2})", ps );
1296 break;
1297
1298 case (int) CScoreIni.ERANK.A:
1299 str = string.Format( "Cleared (A: {0:F2})", ps );
1300 break;
1301
1302 case (int) CScoreIni.ERANK.B:
1303 str = string.Format( "Cleared (B: {0:F2})", ps );
1304 break;
1305
1306 case (int) CScoreIni.ERANK.C:
1307 str = string.Format( "Cleared (C: {0:F2})", ps );
1308 break;
1309
1310 case (int) CScoreIni.ERANK.D:
1311 str = string.Format( "Cleared (D: {0:F2})", ps );
1312 break;
1313
1314 case (int) CScoreIni.ERANK.E:
1315 str = string.Format( "Cleared (E: {0:F2})", ps );
1316 break;
1317
1318 case (int)CScoreIni.ERANK.UNKNOWN: // #23534 2010.10.28 yyagi add: 演奏チップが0個のとき
1319 str = "Cleared (No chips)";
1320 break;
1321 }
1322
1323 scoreIni = this.tScoreIniBGMAdjustHistoryPlayCountを更新( str );
1324
1325 #region [ プラグイン On演奏クリア() の呼び出し ]
1326 //---------------------
1327 foreach( STPlugin pg in this.listプラグイン )
1328 {
1329 Directory.SetCurrentDirectory( pg.strプラグインフォルダ );
1330 pg.plugin.On演奏クリア( scoreIni );
1331 Directory.SetCurrentDirectory( CDTXMania.strEXEのあるフォルダ );
1332 }
1333 //---------------------
1334 #endregion
1335
1336 r現在のステ.On非活性化();
1337 Trace.TraceInformation( "----------------------" );
1338 Trace.TraceInformation( "■ 結果" );
1339 stage結果.st演奏記録.Drums = c演奏記録_Drums;
1340 stage結果.st演奏記録.Guitar = c演奏記録_Guitar;
1341 stage結果.st演奏記録.Bass = c演奏記録_Bass;
1342 stage結果.r空うちドラムチップ = chipArray;
1343 stage結果.On活性化();
1344 r直前のステ = r現在のステ;
1345 r現在のステ = stage結果;
1346
1347 #region [ プラグイン Onステージ変更() の呼び出し ]
1348 //---------------------
1349 foreach( STPlugin pg in this.listプラグイン )
1350 {
1351 Directory.SetCurrentDirectory( pg.strプラグインフォルダ );
1352 pg.plugin.Onステジ変更();
1353 Directory.SetCurrentDirectory( CDTXMania.strEXEのあるフォルダ );
1354 }
1355 //---------------------
1356 #endregion
1357
1358 break;
1359 //-----------------------------
1360 #endregion
1361 }
1362 //-----------------------------
1363 #endregion
1364 break;
1365
1366 case CStage.Eステ.結果:
1367 #region [ *** ]
1368 //-----------------------------
1369 if( this.n進行描画の戻り値 != 0 )
1370 {
1371 if ( CDTXMania.ConfigIni.bIsSwappedGuitarBass ) // #24415 2011.2.27 yyagi Gt/Bsを入れ替えていたなら、Auto状態をリザルト画面終了後に元に戻す
1372 {
1373 CDTXMania.ConfigIni.SwapGuitarBassInfos_AutoFlags(); // Auto入れ替え
1374 }
1375
1376 DTX.t全チップの再生一時停止();
1377 DTX.On非活性化();
1378 r現在のステ.On非活性化();
1379 if( !bコンパクトモ )
1380 {
1381 Trace.TraceInformation( "----------------------" );
1382 Trace.TraceInformation( "■ 選曲" );
1383 stage選曲.On活性化();
1384 r直前のステ = r現在のステ;
1385 r現在のステ = stage選曲;
1386
1387 foreach( STPlugin pg in this.listプラグイン )
1388 {
1389 Directory.SetCurrentDirectory( pg.strプラグインフォルダ );
1390 pg.plugin.Onステジ変更();
1391 Directory.SetCurrentDirectory( CDTXMania.strEXEのあるフォルダ );
1392 }
1393
1394 this.tガベジコレクションを実行する();
1395 }
1396 else
1397 {
1398 base.Window.Close();
1399 }
1400 }
1401 //-----------------------------
1402 #endregion
1403 break;
1404
1405 case CStage.Eステ.ChangeSkin:
1406 #region [ *** ]
1407 //-----------------------------
1408 if ( this.n進行描画の戻り値 != 0 )
1409 {
1410 r現在のステ.On非活性化();
1411 Trace.TraceInformation( "----------------------" );
1412 Trace.TraceInformation( "■ 選曲" );
1413 stage選曲.On活性化();
1414 r直前のステ = r現在のステ;
1415 r現在のステ = stage選曲;
1416 this.tガベジコレクションを実行する();
1417 }
1418 //-----------------------------
1419 #endregion
1420 break;
1421
1422 case CStage.Eステ.終了:
1423 #region [ *** ]
1424 //-----------------------------
1425 if( this.n進行描画の戻り値 != 0 )
1426 {
1427 base.Exit();
1428 }
1429 //-----------------------------
1430 #endregion
1431 break;
1432 }
1433 }
1434 if (ConfigIni.クレジットを表示する == true)
1435 {
1436 this.txDeclaration.t2D描画(this.Device, 472, 694);
1437 if ((r現在のステ.eステID == CStage.Eステ.タイトル) || (r現在のステ.eステID == CStage.Eステ.終了))
1438 {
1439 this.txCredit.t2D描画(this.Device, (1280 - this.txCredit.sz画像サイズ.Width) - 20, 700);
1440 }
1441 }
1442 this.Device.EndScene(); // Present()は game.csのOnFrameEnd()に登録された、GraphicsDeviceManager.game_FrameEnd() 内で実行されるので不要
1443 // (つまり、Present()は、Draw()完了後に実行される)
1444 #if !GPUFlushAfterPresent
1445 actFlushGPU.On進行描画(); // Flush GPU // EndScene()~Present()間 (つまりVSync前) でFlush実行
1446 #endif
1447 #region [ 全画面・ウインドウ切り替え ]
1448 if ( this.b次のタイミングで全画面・ウィンドウ切り替えを行う )
1449 {
1450 ConfigIni.b全画面モ = !ConfigIni.b全画面モ;
1451 app.t全画面・ウィンドウモド切り替え();
1452 this.b次のタイミングで全画面・ウィンドウ切り替えを行う = false;
1453 }
1454 #endregion
1455 #region [ 垂直基線同期切り替え ]
1456 if ( this.b次のタイミングで垂直帰線同期切り替えを行う )
1457 {
1458 bool bIsMaximized = this.Window.IsMaximized; // #23510 2010.11.3 yyagi: to backup current window mode before changing VSyncWait
1459 currentClientSize = this.Window.ClientSize; // #23510 2010.11.3 yyagi: to backup current window size before changing VSyncWait
1460 DeviceSettings currentSettings = app.GraphicsDeviceManager.CurrentSettings;
1461 currentSettings.EnableVSync = ConfigIni.b垂直帰線待ちを行う;
1462 app.GraphicsDeviceManager.ChangeDevice( currentSettings );
1463 this.b次のタイミングで垂直帰線同期切り替えを行う = false;
1464 base.Window.ClientSize = new Size(currentClientSize.Width, currentClientSize.Height); // #23510 2010.11.3 yyagi: to resume window size after changing VSyncWait
1465 if (bIsMaximized)
1466 {
1467 this.Window.WindowState = FormWindowState.Maximized; // #23510 2010.11.3 yyagi: to resume window mode after changing VSyncWait
1468 }
1469 }
1470 #endregion
1471 }
1472
1473
1474 // その他
1475
1476 #region [ 汎用ヘルパー ]
1477 //-----------------
1478 public static CTexture tテクスチャの生成( string fileName )
1479 {
1480 return tテクスチャの生成( fileName, false );
1481 }
1482 public static CTexture tテクスチャの生成( string fileName, bool b黒を透過する )
1483 {
1484 if ( app == null )
1485 {
1486 return null;
1487 }
1488 try
1489 {
1490 return new CTexture( app.Device, fileName, TextureFormat, b黒を透過する );
1491 }
1492 catch ( CTextureCreateFailedException )
1493 {
1494 Trace.TraceError( "テクスチャの生成に失敗しました。({0})", fileName );
1495 return null;
1496 }
1497 catch ( FileNotFoundException )
1498 {
1499 Trace.TraceError( "テクスチャファイルが見つかりませんでした。({0})", fileName );
1500 return null;
1501 }
1502 }
1503 public static void tテクスチャの解放( ref CTexture tx )
1504 {
1505 if( tx != null )
1506 CDTXMania.t安全にDisposeする( ref tx );
1507 }
1508
1509 public static CTexture tテクスチャの生成( byte[] txData )
1510 {
1511 return tテクスチャの生成( txData, false );
1512 }
1513 public static CTexture tテクスチャの生成( byte[] txData, bool b黒を透過する )
1514 {
1515 if ( app == null )
1516 {
1517 return null;
1518 }
1519 try
1520 {
1521 return new CTexture( app.Device, txData, TextureFormat, b黒を透過する );
1522 }
1523 catch ( CTextureCreateFailedException )
1524 {
1525 Trace.TraceError( "テクスチャの生成に失敗しました。(txData)" );
1526 return null;
1527 }
1528 }
1529
1530 public static CTexture tテクスチャの生成( Bitmap bitmap )
1531 {
1532 return tテクスチャの生成( bitmap, false );
1533 }
1534 public static CTexture tテクスチャの生成( Bitmap bitmap, bool b黒を透過する )
1535 {
1536 if ( app == null )
1537 {
1538 return null;
1539 }
1540 try
1541 {
1542 return new CTexture( app.Device, bitmap, TextureFormat, b黒を透過する );
1543 }
1544 catch ( CTextureCreateFailedException )
1545 {
1546 Trace.TraceError( "テクスチャの生成に失敗しました。(txData)" );
1547 return null;
1548 }
1549 }
1550
1551 public static CTexture tテクスチャを生成する(int width, int height)
1552 {
1553 try
1554 {
1555 return new CTexture(CDTXMania.App.D3D9Device, width, height, CDTXMania.TextureFormat);
1556 }
1557 catch
1558 {
1559 Trace.TraceError("空のテクスチャ({0}x{1})の生成に失敗しました。", width, height);
1560 return null;
1561 }
1562 }
1563
1564
1565 public static CDirectShow t失敗してもスキップ可能なDirectShowを生成する(string fileName, IntPtr hWnd, bool bディオレンダラなし)
1566 {
1567 CDirectShow ds = null;
1568 try
1569 {
1570 ds = new CDirectShow(fileName, hWnd, bディオレンダラなし);
1571 }
1572 catch (FileNotFoundException)
1573 {
1574 Trace.TraceError("動画ファイルが見つかりませんでした。({0})", fileName);
1575 ds = null; // Dispose はコンストラクタ内で実施済み
1576 }
1577 catch
1578 {
1579 Trace.TraceError("DirectShow の生成に失敗しました。[{0}]", fileName);
1580 ds = null; // Dispose はコンストラクタ内で実施済み
1581 }
1582
1583 return ds;
1584 }
1585
1586 /// <summary>プロパティ、インデクサには ref は使用できないので注意。</summary>
1587 public static void t安全にDisposeする<T>( ref T obj )
1588 {
1589 if ( obj == null )
1590 return;
1591
1592 var d = obj as IDisposable;
1593
1594 if ( d != null )
1595 d.Dispose();
1596
1597 obj = default( T );
1598 }
1599 //-----------------
1600 #endregion
1601 #region [ private ]
1602 //-----------------
1603 private bool bマウスカソル表示中 = true;
1604 public bool bウィンドウがアクティブである = true;
1605 private bool b終了処理完了済み;
1606 private static CDTX dtx;
1607 private List<CActivity> listトップレベルActivities;
1608 public int n進行描画の戻り値;
1609 private CTexture txCredit;
1610 private CTexture txDeclaration;
1611 private System.Drawing.Font ftDeclaration;
1612 private MouseButtons mb = System.Windows.Forms.MouseButtons.Left;
1613 private string strWindowTitle = "";
1614
1615 private void t起動処理()
1616 {
1617 #region [ strEXEのあるフォルダを決定する ]
1618 //-----------------
1619 // BEGIN #23629 2010.11.13 from: デバッグ時は Application.ExecutablePath が ($SolutionDir)/bin/x86/Debug/ などになり System/ の読み込みに失敗するので、カレントディレクトリを採用する。(プロジェクトのプロパティ→デバッグ→作業ディレクトリが有効になる)
1620 #if DEBUG
1621 strEXEのあるフォルダ = Environment.CurrentDirectory + @"\";
1622 #else
1623 strEXEのあるフォルダ = Path.GetDirectoryName( Application.ExecutablePath ) + @"\"; // #23629 2010.11.9 yyagi: set correct pathname where DTXManiaGR.exe is.
1624 #endif
1625 // END #23629 2010.11.13 from
1626 //-----------------
1627 #endregion
1628
1629 #region [ Config.ini の読込み ]
1630 //---------------------
1631 ConfigIni = new CConfigIni();
1632 string path = strEXEのあるフォルダ + "Config.ini";
1633 if( File.Exists( path ) )
1634 {
1635 try
1636 {
1637 ConfigIni.tファイルから読み込み( path );
1638 }
1639 catch
1640 {
1641 //ConfigIni = new CConfigIni(); // 存在してなければ新規生成
1642 }
1643 }
1644 this.Window.EnableSystemMenu = CDTXMania.ConfigIni.bIsEnabledSystemMenu; // #28200 2011.5.1 yyagi
1645 // 2012.8.22 Config.iniが無いときに初期値が適用されるよう、この設定行をifブロック外に移動
1646
1647 //---------------------
1648 #endregion
1649 #region [ ログ出力開始 ]
1650 //---------------------
1651 Trace.AutoFlush = true;
1652 if( ConfigIni.bログ出力 )
1653 {
1654 try
1655 {
1656 Trace.Listeners.Add( new CTraceLogListener( new StreamWriter( "DTXManiaLog.txt", false, Encoding.GetEncoding( "shift-jis" ) ) ) );
1657 }
1658 catch ( System.UnauthorizedAccessException ) // #24481 2011.2.20 yyagi
1659 {
1660 int c = (CultureInfo.CurrentCulture.TwoLetterISOLanguageName == "ja")? 0 : 1;
1661 string[] mes_writeErr = {
1662 "DTXManiaLog.txtへの書き込みができませんでした。書き込みできるようにしてから、再度起動してください。",
1663 "Failed to write DTXManiaLog.txt. Please set it writable and try again."
1664 };
1665 MessageBox.Show( mes_writeErr[c], "DTXMania boot error", MessageBoxButtons.OK, MessageBoxIcon.Error );
1666 Environment.Exit(1);
1667 }
1668 }
1669 Trace.WriteLine("");
1670 Trace.WriteLine( "DTXMania powered by YAMAHA Silent Session Drums" );
1671 Trace.WriteLine( string.Format( "Release: {0}", VERSION ) );
1672 Trace.WriteLine( "" );
1673 Trace.TraceInformation( "----------------------" );
1674 Trace.TraceInformation( "■ アプリケーションの初期化" );
1675 Trace.TraceInformation( "OS Version: " + Environment.OSVersion );
1676 Trace.TraceInformation( "ProcessorCount: " + Environment.ProcessorCount.ToString() );
1677 Trace.TraceInformation( "CLR Version: " + Environment.Version.ToString() );
1678 //---------------------
1679 #endregion
1680 #region [ コンパクトモードスイッチの有無 ]
1681 //---------------------
1682 bコンパクトモ = false;
1683 strコンパクトモドファイル = "";
1684 string[] commandLineArgs = Environment.GetCommandLineArgs();
1685 if( ( commandLineArgs != null ) && ( commandLineArgs.Length > 1 ) )
1686 {
1687 bコンパクトモ = true;
1688 strコンパクトモドファイル = commandLineArgs[ 1 ];
1689 Trace.TraceInformation( "コンパクトモードで起動します。[{0}]", strコンパクトモドファイル );
1690 }
1691 //---------------------
1692 #endregion
1693
1694 #region [ ウィンドウ初期化 ]
1695 //---------------------
1696 this.strWindowTitle = "DTXMania .NET style release " + VERSION;
1697 base.Window.StartPosition = FormStartPosition.Manual; // #30675 2013.02.04 ikanick add
1698 base.Window.Location = new Point(ConfigIni.n初期ウィンドウ開始位置X, ConfigIni.n初期ウィンドウ開始位置Y); // #30675 2013.02.04 ikanick add
1699
1700 base.Window.Text = this.strWindowTitle;
1701 base.Window.ClientSize = new Size(ConfigIni.nウインドウwidth, ConfigIni.nウインドウheight); // #34510 yyagi 2010.10.31 to change window size got from Config.ini
1702 #if !WindowedFullscreen
1703 if (!ConfigIni.bウィンドウモ) // #23510 2010.11.02 yyagi: add; to recover window size in case bootup with fullscreen mode
1704 {
1705 #endif
1706 currentClientSize = new Size(ConfigIni.nウインドウwidth, ConfigIni.nウインドウheight);
1707 #if !WindowedFullscreen
1708 }
1709 #endif
1710 base.Window.MaximizeBox = true; // #23510 2010.11.04 yyagi: to support maximizing window
1711 base.Window.FormBorderStyle = FormBorderStyle.Sizable; // #23510 2010.10.27 yyagi: changed from FixedDialog to Sizable, to support window resize
1712 base.Window.ShowIcon = true;
1713 base.Window.Icon = Properties.Resources.dtx;
1714 base.Window.KeyDown += new KeyEventHandler( this.Window_KeyDown );
1715 base.Window.MouseUp +=new MouseEventHandler( this.Window_MouseUp);
1716 base.Window.MouseDoubleClick += new MouseEventHandler(this.Window_MouseDoubleClick); // #23510 2010.11.13 yyagi: to go fullscreen mode
1717 base.Window.ResizeEnd += new EventHandler(this.Window_ResizeEnd); // #23510 2010.11.20 yyagi: to set resized window size in Config.ini
1718 base.Window.ApplicationActivated += new EventHandler(this.Window_ApplicationActivated);
1719 base.Window.ApplicationDeactivated += new EventHandler( this.Window_ApplicationDeactivated );
1720 //---------------------
1721 #endregion
1722 #region [ Direct3D9Exを使うかどうか判定 ]
1723 #endregion
1724 #region [ Direct3D9 デバイスの生成 ]
1725 //---------------------
1726 DeviceSettings settings = new DeviceSettings();
1727 #if WindowedFullscreen
1728 settings.Windowed = true; // #30666 2013.2.2 yyagi: Fullscreenmode is "Maximized window" mode
1729 #else
1730 settings.Windowed = ConfigIni.bウィンドウモ;
1731 #endif
1732 settings.BackBufferWidth = SampleFramework.GameWindowSize.Width;
1733 settings.BackBufferHeight = SampleFramework.GameWindowSize.Height;
1734 // settings.BackBufferCount = 3;
1735 settings.EnableVSync = ConfigIni.b垂直帰線待ちを行う;
1736 // settings.BackBufferFormat = Format.A8R8G8B8;
1737 // settings.MultisampleType = MultisampleType.FourSamples;
1738 // settings.MultisampleQuality = 4;
1739 // settings.MultisampleType = MultisampleType.None;
1740 // settings.MultisampleQuality = 0;
1741
1742 try
1743 {
1744 base.GraphicsDeviceManager.ChangeDevice(settings);
1745 }
1746 catch (DeviceCreationException e)
1747 {
1748 Trace.TraceError(e.ToString());
1749 MessageBox.Show(e.Message + e.ToString(), "DTXMania failed to boot: DirectX9 Initialize Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
1750 Environment.Exit(-1);
1751 }
1752
1753 base.IsFixedTimeStep = false;
1754 // base.TargetElapsedTime = TimeSpan.FromTicks( 10000000 / 75 );
1755 base.Window.ClientSize = new Size(ConfigIni.nウインドウwidth, ConfigIni.nウインドウheight); // #23510 2010.10.31 yyagi: to recover window size. width and height are able to get from Config.ini.
1756 base.InactiveSleepTime = TimeSpan.FromMilliseconds((float)(ConfigIni.n非フォカス時スリms)); // #23568 2010.11.3 yyagi: to support valiable sleep value when !IsActive
1757 // #23568 2010.11.4 ikanick changed ( 1 -> ConfigIni )
1758 #if WindowedFullscreen
1759 this.t全画面・ウィンドウモド切り替え(); // #30666 2013.2.2 yyagi: finalize settings for "Maximized window mode"
1760 #endif
1761 actFlushGPU = new CActFlushGPU();
1762 //---------------------
1763 #endregion
1764
1765 DTX = null;
1766
1767 #region [ Skin の初期化 ]
1768 //---------------------
1769 Trace.TraceInformation( "スキンの初期化を行います。" );
1770 Trace.Indent();
1771 try
1772 {
1773 Skin = new CSkin( CDTXMania.ConfigIni.strSystemSkinSubfolderFullName, CDTXMania.ConfigIni.bUseBoxDefSkin );
1774 CDTXMania.ConfigIni.strSystemSkinSubfolderFullName = CDTXMania.Skin.GetCurrentSkinSubfolderFullName( true ); // 旧指定のSkinフォルダが消滅していた場合に備える
1775 Trace.TraceInformation( "スキンの初期化を完了しました。" );
1776 }
1777 catch
1778 {
1779 Trace.TraceInformation( "スキンの初期化に失敗しました。" );
1780 throw;
1781 }
1782 finally
1783 {
1784 Trace.Unindent();
1785 }
1786 //---------------------
1787 #endregion
1788 #region [ Timer の初期化 ]
1789 //---------------------
1790 Trace.TraceInformation( "タイマの初期化を行います。" );
1791 Trace.Indent();
1792 try
1793 {
1794 Timer = new CTimer( CTimer.E種別.MultiMedia );
1795 Trace.TraceInformation( "タイマの初期化を完了しました。" );
1796 }
1797 finally
1798 {
1799 Trace.Unindent();
1800 }
1801 //---------------------
1802 #endregion
1803 #region [ FPS カウンタの初期化 ]
1804 //---------------------
1805 Trace.TraceInformation( "FPSカウンタの初期化を行います。" );
1806 Trace.Indent();
1807 try
1808 {
1809 FPS = new CFPS();
1810 Trace.TraceInformation( "FPSカウンタを生成しました。" );
1811 }
1812 finally
1813 {
1814 Trace.Unindent();
1815 }
1816 //---------------------
1817 #endregion
1818 #region [ act文字コンソールの初期化 ]
1819 //---------------------
1820 Trace.TraceInformation( "文字コンソールの初期化を行います。" );
1821 Trace.Indent();
1822 try
1823 {
1824 act文字コンソ = new C文字コンソ();
1825 Trace.TraceInformation( "文字コンソールを生成しました。" );
1826 act文字コンソ.On活性化();
1827 Trace.TraceInformation( "文字コンソールを活性化しました。" );
1828 Trace.TraceInformation( "文字コンソールの初期化を完了しました。" );
1829 }
1830 catch( Exception exception )
1831 {
1832 Trace.TraceError( exception.Message );
1833 Trace.TraceError( "文字コンソールの初期化に失敗しました。" );
1834 }
1835 finally
1836 {
1837 Trace.Unindent();
1838 }
1839 //---------------------
1840 #endregion
1841 #region [ Input管理 の初期化 ]
1842 //---------------------
1843 Trace.TraceInformation( "DirectInput, MIDI入力の初期化を行います。" );
1844 Trace.Indent();
1845 try
1846 {
1847 Input管理 = new CInput管理( base.Window.Handle );
1848 foreach( IInputDevice device in Input管理.list入力デバイス )
1849 {
1850 if( ( device.e入力デバイス種別 == E入力デバイス種別.Joystick ) && !ConfigIni.dicJoystick.ContainsValue( device.GUID ) )
1851 {
1852 int key = 0;
1853 while( ConfigIni.dicJoystick.ContainsKey( key ) )
1854 {
1855 key++;
1856 }
1857 ConfigIni.dicJoystick.Add( key, device.GUID );
1858 }
1859 }
1860 foreach( IInputDevice device2 in Input管理.list入力デバイス )
1861 {
1862 if( device2.e入力デバイス種別 == E入力デバイス種別.Joystick )
1863 {
1864 foreach( KeyValuePair<int, string> pair in ConfigIni.dicJoystick )
1865 {
1866 if( device2.GUID.Equals( pair.Value ) )
1867 {
1868 ( (CInputJoystick) device2 ).SetID( pair.Key );
1869 break;
1870 }
1871 }
1872 continue;
1873 }
1874 }
1875 Trace.TraceInformation( "DirectInput の初期化を完了しました。" );
1876 }
1877 catch( Exception exception2 )
1878 {
1879 Trace.TraceError( exception2.Message );
1880 Trace.TraceError( "DirectInput, MIDI入力の初期化に失敗しました。" );
1881 throw;
1882 }
1883 finally
1884 {
1885 Trace.Unindent();
1886 }
1887 //---------------------
1888 #endregion
1889 #region [ Pad の初期化 ]
1890 //---------------------
1891 Trace.TraceInformation( "パッドの初期化を行います。" );
1892 Trace.Indent();
1893 try
1894 {
1895 Pad = new CPad( ConfigIni, Input管理 );
1896 Trace.TraceInformation( "パッドの初期化を完了しました。" );
1897 }
1898 catch( Exception exception3 )
1899 {
1900 Trace.TraceError( exception3.Message );
1901 Trace.TraceError( "パッドの初期化に失敗しました。" );
1902 }
1903 finally
1904 {
1905 Trace.Unindent();
1906 }
1907 //---------------------
1908 #endregion
1909 #region [ Sound管理 の初期化 ]
1910 //---------------------
1911 Trace.TraceInformation("サウンドデバイスの初期化を行います。");
1912 Trace.Indent();
1913 try
1914 {
1915 {
1916 ESoundDeviceType soundDeviceType;
1917 switch (CDTXMania.ConfigIni.nSoundDeviceType)
1918 {
1919 case 0:
1920 soundDeviceType = ESoundDeviceType.DirectSound;
1921 break;
1922 case 1:
1923 soundDeviceType = ESoundDeviceType.ASIO;
1924 break;
1925 case 2:
1926 soundDeviceType = ESoundDeviceType.ExclusiveWASAPI;
1927 break;
1928 default:
1929 soundDeviceType = ESoundDeviceType.Unknown;
1930 break;
1931 }
1932 Sound管理 = new CSound管理( base.Window.Handle,
1933 soundDeviceType,
1934 CDTXMania.ConfigIni.nWASAPIBufferSizeMs,
1935 //CDTXMania.ConfigIni.nASIOBufferSizeMs,
1936 0,
1937 CDTXMania.ConfigIni.nASIODevice
1938 );
1939 AddSoundTypeToWindowTitle();
1940 FDK.CSound管理.bIsTimeStretch = CDTXMania.ConfigIni.bTimeStretch;
1941 Trace.TraceInformation("サウンドデバイスの初期化を完了しました。");
1942 }
1943 }
1944 catch (Exception e)
1945 {
1946 Trace.TraceError(e.Message);
1947 throw;
1948 }
1949 finally
1950 {
1951 Trace.Unindent();
1952 }
1953 //---------------------
1954 #endregion
1955 #region [ Songs管理 の初期化 ]
1956 //---------------------
1957 Trace.TraceInformation( "曲リストの初期化を行います。" );
1958 Trace.Indent();
1959 try
1960 {
1961 Songs管理 = new CSongs管理();
1962 // Songs管理_裏読 = new CSongs管理();
1963 EnumSongs = new CEnumSongs();
1964 actEnumSongs = new CActEnumSongs();
1965 Trace.TraceInformation( "曲リストの初期化を完了しました。" );
1966 }
1967 catch( Exception e )
1968 {
1969 Trace.TraceError( e.Message );
1970 Trace.TraceError( "曲リストの初期化に失敗しました。" );
1971 }
1972 finally
1973 {
1974 Trace.Unindent();
1975 }
1976 //---------------------
1977 #endregion
1978 #region [ CAvi の初期化 ]
1979 //---------------------
1980 CAvi.t初期化();
1981 //---------------------
1982 #endregion
1983 #region [ Random の初期化 ]
1984 //---------------------
1985 Random = new Random( (int) Timer.nシステム時刻 );
1986 //---------------------
1987 #endregion
1988 #region [ ステージの初期化 ]
1989 //---------------------
1990 r現在のステ = null;
1991 r直前のステ = null;
1992 stage起動 = new CStage起動();
1993 stageタイトル = new CStageタイトル();
1994 stageオプション = new CStageオプション();
1995 stageコンフィグ = new CStageコンフィグ();
1996 stage選曲 = new CStage選曲();
1997 stage曲読み込み = new CStage曲読み込み();
1998 stage演奏ドラム画面 = new CStage演奏ドラム画面();
1999 stage演奏ギタ画面 = new CStage演奏ギタ画面();
2000 stage結果 = new CStage結果();
2001 stageChangeSkin = new CStageChangeSkin();
2002 stage終了 = new CStage終了();
2003 this.listトップレベルActivities = new List<CActivity>();
2004 this.listトップレベルActivities.Add( actEnumSongs );
2005 this.listトップレベルActivities.Add( act文字コンソ );
2006 this.listトップレベルActivities.Add( stage起動 );
2007 this.listトップレベルActivities.Add( stageタイトル );
2008 this.listトップレベルActivities.Add( stageオプション );
2009 this.listトップレベルActivities.Add( stageコンフィグ );
2010 this.listトップレベルActivities.Add( stage選曲 );
2011 this.listトップレベルActivities.Add( stage曲読み込み );
2012 this.listトップレベルActivities.Add( stage演奏ドラム画面 );
2013 this.listトップレベルActivities.Add( stage演奏ギタ画面 );
2014 this.listトップレベルActivities.Add( stage結果 );
2015 this.listトップレベルActivities.Add( stageChangeSkin );
2016 this.listトップレベルActivities.Add( stage終了 );
2017 this.listトップレベルActivities.Add( actFlushGPU);
2018 //---------------------
2019 #endregion
2020 #region [ プラグインの検索と生成 ]
2021 //---------------------
2022 PluginHost = new CPluginHost();
2023
2024 Trace.TraceInformation( "プラグインの検索と生成を行います。" );
2025 Trace.Indent();
2026 try
2027 {
2028 this.tプラグイン検索と生成();
2029 Trace.TraceInformation( "プラグインの検索と生成を完了しました。" );
2030 }
2031 finally
2032 {
2033 Trace.Unindent();
2034 }
2035 //---------------------
2036 #endregion
2037 #region [ プラグインの初期化 ]
2038 //---------------------
2039 if( this.listプラグイン != null && this.listプラグイン.Count > 0 )
2040 {
2041 Trace.TraceInformation( "プラグインの初期化を行います。" );
2042 Trace.Indent();
2043 try
2044 {
2045 foreach( STPlugin st in this.listプラグイン )
2046 {
2047 Directory.SetCurrentDirectory( st.strプラグインフォルダ );
2048 st.plugin.On初期化( this.PluginHost );
2049 st.plugin.OnManagedリソスの作成();
2050 st.plugin.OnUnmanagedリソスの作成();
2051 Directory.SetCurrentDirectory( CDTXMania.strEXEのあるフォルダ );
2052 }
2053 Trace.TraceInformation( "すべてのプラグインの初期化を完了しました。" );
2054 }
2055 catch
2056 {
2057 Trace.TraceError( "プラグインのどれかの初期化に失敗しました。" );
2058 throw;
2059 }
2060 finally
2061 {
2062 Trace.Unindent();
2063 }
2064 }
2065
2066 //---------------------
2067 #endregion
2068
2069
2070 Trace.TraceInformation( "アプリケーションの初期化を完了しました。" );
2071
2072 #region [ 最初のステージの起動 ]
2073 //---------------------
2074 Trace.TraceInformation("----------------------");
2075 Trace.TraceInformation("■ 起動");
2076
2077 if (CDTXMania.bコンパクトモ)
2078 {
2079 r現在のステ = stage曲読み込み;
2080 }
2081 else
2082 {
2083 r現在のステ = stage起動;
2084 }
2085 r現在のステ.On活性化();
2086 //---------------------
2087 #endregion
2088 }
2089 public void AddSoundTypeToWindowTitle()
2090 {
2091 string delay = "";
2092 if (Sound管理.GetCurrentSoundDeviceType() != "DirectSound")
2093 {
2094 delay = "(" + Sound管理.GetSoundDelay() + "ms)";
2095 }
2096 base.Window.Text = strWindowTitle + " (" + Sound管理.GetCurrentSoundDeviceType() + delay + ")";
2097 }
2098
2099 private void t終了処理()
2100 {
2101 if( !this.b終了処理完了済み )
2102 {
2103 Trace.TraceInformation( "----------------------" );
2104 Trace.TraceInformation( "■ アプリケーションの終了" );
2105 #region [ 曲検索の終了処理 ]
2106 //---------------------
2107 if ( actEnumSongs != null )
2108 {
2109 Trace.TraceInformation( "曲検索actの終了処理を行います。" );
2110 Trace.Indent();
2111 try
2112 {
2113 actEnumSongs.On非活性化();
2114 actEnumSongs= null;
2115 Trace.TraceInformation( "曲検索actの終了処理を完了しました。" );
2116 }
2117 catch ( Exception e )
2118 {
2119 Trace.TraceError( e.Message );
2120 Trace.TraceError( "曲検索actの終了処理に失敗しました。" );
2121 }
2122 finally
2123 {
2124 Trace.Unindent();
2125 }
2126 }
2127 //---------------------
2128 #endregion
2129 #region [ 現在のステージの終了処理 ]
2130 //---------------------
2131 if( CDTXMania.r現在のステ != null && CDTXMania.r現在のステ.b活性化してる ) // #25398 2011.06.07 MODIFY FROM
2132 {
2133 Trace.TraceInformation( "現在のステージを終了します。" );
2134 Trace.Indent();
2135 try
2136 {
2137 r現在のステ.On非活性化();
2138 Trace.TraceInformation( "現在のステージの終了処理を完了しました。" );
2139 }
2140 finally
2141 {
2142 Trace.Unindent();
2143 }
2144 }
2145 //---------------------
2146 #endregion
2147 #region [ プラグインの終了処理 ]
2148 //---------------------
2149 if (this.listプラグイン != null && this.listプラグイン.Count > 0)
2150 {
2151 Trace.TraceInformation( "すべてのプラグインを終了します。" );
2152 Trace.Indent();
2153 try
2154 {
2155 foreach( STPlugin st in this.listプラグイン )
2156 {
2157 Directory.SetCurrentDirectory( st.strプラグインフォルダ );
2158 st.plugin.OnUnmanagedリソスの解放();
2159 st.plugin.OnManagedリソスの解放();
2160 st.plugin.On終了();
2161 Directory.SetCurrentDirectory( CDTXMania.strEXEのあるフォルダ );
2162 }
2163 PluginHost = null;
2164 Trace.TraceInformation( "すべてのプラグインの終了処理を完了しました。" );
2165 }
2166 finally
2167 {
2168 Trace.Unindent();
2169 }
2170 }
2171 //---------------------
2172 #endregion
2173 #region [ 曲リストの終了処理 ]
2174 //---------------------
2175 if (Songs管理 != null)
2176 {
2177 Trace.TraceInformation( "曲リストの終了処理を行います。" );
2178 Trace.Indent();
2179 try
2180 {
2181 Songs管理 = null;
2182 Trace.TraceInformation( "曲リストの終了処理を完了しました。" );
2183 }
2184 catch( Exception exception )
2185 {
2186 Trace.TraceError( exception.Message );
2187 Trace.TraceError( "曲リストの終了処理に失敗しました。" );
2188 }
2189 finally
2190 {
2191 Trace.Unindent();
2192 }
2193 }
2194 CAvi.t終了();
2195 //---------------------
2196 #endregion
2197 #region [ スキンの終了処理 ]
2198 //---------------------
2199 if (Skin != null)
2200 {
2201 Trace.TraceInformation( "スキンの終了処理を行います。" );
2202 Trace.Indent();
2203 try
2204 {
2205 Skin.Dispose();
2206 Skin = null;
2207 Trace.TraceInformation( "スキンの終了処理を完了しました。" );
2208 }
2209 catch( Exception exception2 )
2210 {
2211 Trace.TraceError( exception2.Message );
2212 Trace.TraceError( "スキンの終了処理に失敗しました。" );
2213 }
2214 finally
2215 {
2216 Trace.Unindent();
2217 }
2218 }
2219 //---------------------
2220 #endregion
2221 #region [ DirectSoundの終了処理 ]
2222 //---------------------
2223 if (Sound管理 != null)
2224 {
2225 Trace.TraceInformation( "DirectSound の終了処理を行います。" );
2226 Trace.Indent();
2227 try
2228 {
2229 Sound管理.Dispose();
2230 Sound管理 = null;
2231 Trace.TraceInformation( "DirectSound の終了処理を完了しました。" );
2232 }
2233 catch( Exception exception3 )
2234 {
2235 Trace.TraceError( exception3.Message );
2236 Trace.TraceError( "DirectSound の終了処理に失敗しました。" );
2237 }
2238 finally
2239 {
2240 Trace.Unindent();
2241 }
2242 }
2243 //---------------------
2244 #endregion
2245 #region [ パッドの終了処理 ]
2246 //---------------------
2247 if (Pad != null)
2248 {
2249 Trace.TraceInformation( "パッドの終了処理を行います。" );
2250 Trace.Indent();
2251 try
2252 {
2253 Pad = null;
2254 Trace.TraceInformation( "パッドの終了処理を完了しました。" );
2255 }
2256 catch( Exception exception4 )
2257 {
2258 Trace.TraceError( exception4.Message );
2259 Trace.TraceError( "パッドの終了処理に失敗しました。" );
2260 }
2261 finally
2262 {
2263 Trace.Unindent();
2264 }
2265 }
2266 //---------------------
2267 #endregion
2268 #region [ DirectInput, MIDI入力の終了処理 ]
2269 //---------------------
2270 if (Input管理 != null)
2271 {
2272 Trace.TraceInformation( "DirectInput, MIDI入力の終了処理を行います。" );
2273 Trace.Indent();
2274 try
2275 {
2276 Input管理.Dispose();
2277 Input管理 = null;
2278 Trace.TraceInformation( "DirectInput, MIDI入力の終了処理を完了しました。" );
2279 }
2280 catch( Exception exception5 )
2281 {
2282 Trace.TraceError( exception5.Message );
2283 Trace.TraceError( "DirectInput, MIDI入力の終了処理に失敗しました。" );
2284 }
2285 finally
2286 {
2287 Trace.Unindent();
2288 }
2289 }
2290 //---------------------
2291 #endregion
2292 #region [ 文字コンソールの終了処理 ]
2293 //---------------------
2294 if (act文字コンソ != null)
2295 {
2296 Trace.TraceInformation( "文字コンソールの終了処理を行います。" );
2297 Trace.Indent();
2298 try
2299 {
2300 act文字コンソ.On非活性化();
2301 act文字コンソ = null;
2302 Trace.TraceInformation( "文字コンソールの終了処理を完了しました。" );
2303 }
2304 catch( Exception exception6 )
2305 {
2306 Trace.TraceError( exception6.Message );
2307 Trace.TraceError( "文字コンソールの終了処理に失敗しました。" );
2308 }
2309 finally
2310 {
2311 Trace.Unindent();
2312 }
2313 }
2314 //---------------------
2315 #endregion
2316 #region [ FPSカウンタの終了処理 ]
2317 //---------------------
2318 Trace.TraceInformation("FPSカウンタの終了処理を行います。");
2319 Trace.Indent();
2320 try
2321 {
2322 if( FPS != null )
2323 {
2324 FPS = null;
2325 }
2326 Trace.TraceInformation( "FPSカウンタの終了処理を完了しました。" );
2327 }
2328 finally
2329 {
2330 Trace.Unindent();
2331 }
2332 //---------------------
2333 #endregion
2334
2335 // ct.Dispose();
2336
2337 #region [ タイマの終了処理 ]
2338 //---------------------
2339 Trace.TraceInformation("タイマの終了処理を行います。");
2340 Trace.Indent();
2341 try
2342 {
2343 if( Timer != null )
2344 {
2345 Timer.Dispose();
2346 Timer = null;
2347 Trace.TraceInformation( "タイマの終了処理を完了しました。" );
2348 }
2349 else
2350 {
2351 Trace.TraceInformation( "タイマは使用されていません。" );
2352 }
2353 }
2354 finally
2355 {
2356 Trace.Unindent();
2357 }
2358 //---------------------
2359 #endregion
2360 #region [ Config.iniの出力 ]
2361 //---------------------
2362 Trace.TraceInformation("Config.ini を出力します。");
2363 // if ( ConfigIni.bIsSwappedGuitarBass ) // #24063 2011.1.16 yyagi ギターベースがスワップしているときは元に戻す
2364 if ( ConfigIni.bIsSwappedGuitarBass_AutoFlagsAreSwapped ) // #24415 2011.2.21 yyagi FLIP中かつ演奏中にalt-f4で終了したときは、AUTOのフラグをswapして戻す
2365 {
2366 ConfigIni.SwapGuitarBassInfos_AutoFlags();
2367 }
2368 string str = strEXEのあるフォルダ + "Config.ini";
2369 Trace.Indent();
2370 try
2371 {
2372 ConfigIni.t書き出し( str );
2373 Trace.TraceInformation( "保存しました。({0})", new object[] { str } );
2374 }
2375 catch( Exception e )
2376 {
2377 Trace.TraceError( e.Message );
2378 Trace.TraceError( "Config.ini の出力に失敗しました。({0})", new object[] { str } );
2379 }
2380 finally
2381 {
2382 Trace.Unindent();
2383 }
2384 //---------------------
2385 #endregion
2386 Trace.TraceInformation("アプリケーションの終了処理を完了しました。");
2387
2388
2389 this.b終了処理完了済み = true;
2390 }
2391 }
2392
2393 private CScoreIni tScoreIniBGMAdjustHistoryPlayCountを更新(string str新ヒストリ行)
2394 {
2395 bool bIsUpdatedDrums, bIsUpdatedGuitar, bIsUpdatedBass;
2396 string strFilename = DTX.strファイル名の絶対パス + ".score.ini";
2397 CScoreIni ini = new CScoreIni( strFilename );
2398 if( !File.Exists( strFilename ) )
2399 {
2400 ini.stファイル.Title = DTX.TITLE;
2401 ini.stファイル.Name = DTX.strファイル名;
2402 ini.stファイル.Hash = CScoreIni.tファイルのMD5を求めて返す( DTX.strファイル名の絶対パス );
2403 for( int i = 0; i < 6; i++ )
2404 {
2405 ini.stセクション[ i ].nPerfectになる範囲ms = nPerfect範囲ms;
2406 ini.stセクション[ i ].nGreatになる範囲ms = nGreat範囲ms;
2407 ini.stセクション[ i ].nGoodになる範囲ms = nGood範囲ms;
2408 ini.stセクション[ i ].nPoorになる範囲ms = nPoor範囲ms;
2409 }
2410 }
2411 ini.stファイル.BGMAdjust = DTX.nBGMAdjust;
2412 CScoreIni.t更新条件を取得する( out bIsUpdatedDrums, out bIsUpdatedGuitar, out bIsUpdatedBass );
2413 if( bIsUpdatedDrums || bIsUpdatedGuitar || bIsUpdatedBass )
2414 {
2415 if( bIsUpdatedDrums )
2416 {
2417 ini.stファイル.PlayCountDrums++;
2418 }
2419 if( bIsUpdatedGuitar )
2420 {
2421 ini.stファイル.PlayCountGuitar++;
2422 }
2423 if( bIsUpdatedBass )
2424 {
2425 ini.stファイル.PlayCountBass++;
2426 }
2427 ini.tヒストリを追加する( str新ヒストリ行 );
2428 if( !bコンパクトモ )
2429 {
2430 stage選曲.r現在選択中のスコア.譜面情報.演奏回数.Drums = ini.stファイル.PlayCountDrums;
2431 stage選曲.r現在選択中のスコア.譜面情報.演奏回数.Guitar = ini.stファイル.PlayCountGuitar;
2432 stage選曲.r現在選択中のスコア.譜面情報.演奏回数.Bass = ini.stファイル.PlayCountBass;
2433 for( int j = 0; j < ini.stファイル.History.Length; j++ )
2434 {
2435 stage選曲.r現在選択中のスコア.譜面情報.演奏履歴[ j ] = ini.stファイル.History[ j ];
2436 }
2437 }
2438 }
2439 if( ConfigIni.bScoreIniを出力する )
2440 {
2441 ini.t書き出し( strFilename );
2442 }
2443
2444 return ini;
2445 }
2446 private void tガベジコレクションを実行する()
2447 {
2448 GC.Collect();
2449 GC.WaitForPendingFinalizers();
2450 GC.Collect();
2451 GC.WaitForPendingFinalizers();
2452 }
2453 private void tプラグイン検索と生成()
2454 {
2455 this.listプラグイン = new List<STPlugin>();
2456
2457 string strIPluginActivityの名前 = typeof( IPluginActivity ).FullName;
2458 string strプラグインフォルダパス = strEXEのあるフォルダ + "Plugins\\";
2459
2460 this.t指定フォルダ内でのプラグイン検索と生成( strプラグインフォルダパス, strIPluginActivityの名前 );
2461
2462 if( this.listプラグイン.Count > 0 )
2463 Trace.TraceInformation( this.listプラグイン.Count + " 個のプラグインを読み込みました。" );
2464 }
2465 #region [ Windowイベント処理 ]
2466 private void t指定フォルダ内でのプラグイン検索と生成( string strプラグインフォルダパス, string strプラグイン型名 )
2467 {
2468 // 指定されたパスが存在しないとエラー
2469 if( !Directory.Exists( strプラグインフォルダパス ) )
2470 {
2471 Trace.TraceWarning( "プラグインフォルダが存在しません。(" + strプラグインフォルダパス + ")" );
2472 return;
2473 }
2474
2475 // (1) すべての *.dll について…
2476 string[] strDLLs = System.IO.Directory.GetFiles( strプラグインフォルダパス, "*.dll" );
2477 foreach( string dllName in strDLLs )
2478 {
2479 try
2480 {
2481 // (1-1) dll をアセンブリとして読み込む。
2482 System.Reflection.Assembly asm = System.Reflection.Assembly.LoadFrom( dllName );
2483
2484 // (1-2) アセンブリ内のすべての型について、プラグインとして有効か調べる
2485 foreach( Type t in asm.GetTypes() )
2486 {
2487 // (1-3) ↓クラスであり↓Publicであり↓抽象クラスでなく↓IPlugin型のインスタンスが作れる 型を持っていれば有効
2488 if( t.IsClass && t.IsPublic && !t.IsAbstract && t.GetInterface( strプラグイン型名 ) != null )
2489 {
2490 // (1-4) クラス名からインスタンスを作成する
2491 var st = new STPlugin() {
2492 plugin = (IPluginActivity) asm.CreateInstance( t.FullName ),
2493 strプラグインフォルダ = Path.GetDirectoryName( dllName ),
2494 strアセンブリ簡易名 = asm.GetName().Name,
2495 Version = asm.GetName().Version,
2496 };
2497
2498 // (1-5) プラグインリストへ登録
2499 this.listプラグイン.Add( st );
2500 Trace.TraceInformation( "プラグイン {0} ({1}, {2}, {3}) を読み込みました。", t.FullName, Path.GetFileName( dllName ), st.strアセンブリ簡易名, st.Version.ToString() );
2501 }
2502 }
2503 }
2504 catch
2505 {
2506 Trace.TraceInformation( dllName + " からプラグインを生成することに失敗しました。スキップします。" );
2507 }
2508 }
2509
2510 // (2) サブフォルダがあれば再帰する
2511 string[] strDirs = Directory.GetDirectories( strプラグインフォルダパス, "*" );
2512 foreach( string dir in strDirs )
2513 this.t指定フォルダ内でのプラグイン検索と生成( dir + "\\", strプラグイン型名 );
2514 }
2515 //-----------------
2516 private void Window_ApplicationActivated(object sender, EventArgs e)
2517 {
2518 this.bApplicationActive = true;
2519 }
2520 private void Window_ApplicationDeactivated(object sender, EventArgs e)
2521 {
2522 this.bApplicationActive = false;
2523 }
2524 private void Window_KeyDown(object sender, KeyEventArgs e)
2525 {
2526 if (e.KeyCode == Keys.Menu)
2527 {
2528 e.Handled = true;
2529 e.SuppressKeyPress = true;
2530 }
2531 else if ((e.KeyCode == Keys.Return) && e.Alt)
2532 {
2533 if (ConfigIni != null)
2534 {
2535 ConfigIni.bウィンドウモ = !ConfigIni.bウィンドウモ;
2536 this.t全画面・ウィンドウモド切り替え();
2537 }
2538 e.Handled = true;
2539 e.SuppressKeyPress = true;
2540 }
2541 else
2542 {
2543 for (int i = 0; i < 0x10; i++)
2544 {
2545 if (ConfigIni.KeyAssign.System.Capture[i]. > 0 &&
2546 e.KeyCode == DeviceConstantConverter.KeyToKeyCode((SlimDX.DirectInput.Key)ConfigIni.KeyAssign.System.Capture[i].))
2547 {
2548 // Debug.WriteLine( "capture: " + string.Format( "{0:2x}", (int) e.KeyCode ) + " " + (int) e.KeyCode );
2549 string strFullPath =
2550 Path.Combine(CDTXMania.strEXEのあるフォルダ, "Capture_img");
2551 strFullPath = Path.Combine(strFullPath, DateTime.Now.ToString("yyyyMMddHHmmss") + ".png");
2552 SaveResultScreen(strFullPath);
2553 }
2554 }
2555 }
2556 }
2557 private void Window_MouseUp(object sender, MouseEventArgs e)
2558 {
2559 mb = e.Button;
2560 }
2561
2562 private void Window_MouseDoubleClick(object sender, MouseEventArgs e) // #23510 2010.11.13 yyagi: to go full screen mode
2563 {
2564 if (mb.Equals(MouseButtons.Left) && ConfigIni.bIsAllowedDoubleClickFullscreen) // #26752 2011.11.27 yyagi
2565 {
2566 ConfigIni.bウィンドウモ = false;
2567 this.t全画面・ウィンドウモド切り替え();
2568 }
2569 }
2570 private void Window_ResizeEnd(object sender, EventArgs e) // #23510 2010.11.20 yyagi: to get resized window size
2571 {
2572 if (ConfigIni.bウィンドウモ)
2573 {
2574 ConfigIni.n初期ウィンドウ開始位置X = base.Window.Location.X; // #30675 2013.02.04 ikanick add
2575 ConfigIni.n初期ウィンドウ開始位置Y = base.Window.Location.Y; //
2576 }
2577
2578 ConfigIni.nウインドウwidth = (ConfigIni.bウィンドウモ) ? base.Window.ClientSize.Width : currentClientSize.Width; // #23510 2010.10.31 yyagi add
2579 ConfigIni.nウインドウheight = (ConfigIni.bウィンドウモ) ? base.Window.ClientSize.Height : currentClientSize.Height;
2580 }
2581 #endregion
2582
2583 //internal sealed class GCBeep // GC発生の度にbeep
2584 //{
2585 // ~GCBeep()
2586 // {
2587 // Console.Beep();
2588 // if ( !AppDomain.CurrentDomain.IsFinalizingForUnload()
2589 // && !Environment.HasShutdownStarted )
2590 // {
2591 // new GCBeep();
2592 // }
2593 // }
2594 //}
2595
2596 //-----------------
2597 #endregion
2598 }
2599 }

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26