From: yyagi Date: Mon, 29 Aug 2011 17:06:54 +0000 (+0000) Subject: #26005 レーンの表示/非表示状態をDTXC終了時にDTXCreatorSetting.configに保持し、次回起動時に同設定を反映するようにした。 X-Git-Tag: Release099f~294 X-Git-Url: http://git.sourceforge.jp/view?a=commitdiff_plain;ds=sidebyside;h=d4cd78851059876c38e02ca5b55b83c2210a4771;p=dtxmania%2Fdtxmania.git #26005 レーンの表示/非表示状態をDTXC終了時にDTXCreatorSetting.configに保持し、次回起動時に同設定を反映するようにした。 git-svn-id: http://svn.osdn.jp/svnroot/dtxmania/trunk@247 16f42ceb-6dc6-49c8-ba94-f2d53467949d --- diff --git a/DTXCreatorプロジェクト/コード/00.全体/AppSetting.cs b/DTXCreatorプロジェクト/コード/00.全体/AppSetting.cs index e8a0b985..433a5a08 100644 --- a/DTXCreatorプロジェクト/コード/00.全体/AppSetting.cs +++ b/DTXCreatorプロジェクト/コード/00.全体/AppSetting.cs @@ -84,6 +84,23 @@ namespace DTXCreator } } } + + #region [ List LanesInfo - レーンの表示/非表示 ] + //----------------- + public List LanesInfo + { + get { return _LanesInfo; } + set { _LanesInfo = value; } + } + private List _LanesInfo = new List(); + //----------------- + #endregion + + public void AddLanesInfo( string Name, bool Checked ) + { + this._LanesInfo.Add( new Lanes( Name, Checked ) ); + } + public bool bSameVersion() { return ( this._ConfigVersion == _ConfigSchemaVersion ); @@ -343,6 +360,27 @@ namespace DTXCreator public string PlayStopOption = "-S"; } + /// + /// レーン名と表示/非表示の状態の保持/復元 + /// + public class Lanes + { + public string Name; + public bool Checked; + + // 引数無しのコンストラクタがないとSerializeできないのでダミー定義する + public Lanes() + { + Name = ""; + Checked = false; + } + public Lanes( string Name_, bool Checked_ ) + { + Name = Name_; + Checked = Checked_; + } + } + #region [ private ] //----------------- private bool _AutoFocus = true; diff --git a/DTXCreatorプロジェクト/コード/00.全体/Cメインフォーム.cs b/DTXCreatorプロジェクト/コード/00.全体/Cメインフォーム.cs index cbf67661..29c935e7 100644 --- a/DTXCreatorプロジェクト/コード/00.全体/Cメインフォーム.cs +++ b/DTXCreatorプロジェクト/コード/00.全体/Cメインフォーム.cs @@ -368,6 +368,19 @@ namespace DTXCreator } //----------------- #endregion + #region [ レーン表示/非表示の反映 #26005 2011.8.29 yyagi; added ] + for ( int i = 0; i < this.appアプリ設定.LanesInfo.Count; i++ ) + { + for ( int j = 0; j < this.mgr譜面管理者.listレーン.Count; j++ ) + { + if ( this.mgr譜面管理者.listレーン[ j ].strレーン名 == this.appアプリ設定.LanesInfo[ i ].Name ) + { + this.mgr譜面管理者.listレーン[ j ].bIsVisible = this.appアプリ設定.LanesInfo[ i ].Checked; + } + } + } + this.mgr譜面管理者.tRefreshDisplayLanes(); + #endregion } private void tアプリ設定の保存() { @@ -433,6 +446,13 @@ namespace DTXCreator this.str作業フォルダ名; //----------------- #endregion + #region [ レーン表示/非表示 #26005 2011.8.29 yyagi; added ] + this.appアプリ設定.LanesInfo.Clear(); + foreach ( DTXCreator.譜面.Cレーン c in this.mgr譜面管理者.listレーン ) + { + this.appアプリ設定.AddLanesInfo( c.strレーン名, c.bIsVisible ); + } + #endregion // 保存する。 @@ -2176,7 +2196,7 @@ namespace DTXCreator private void Cメインフォーム_Load( object sender, EventArgs e ) { this.tアプリ起動時に一度だけ行う初期化処理(); - this.t譜面を初期化する(); + // this.t譜面を初期化する(); // 2011.8.29 yyagi; removed this.t譜面を初期化する() because it has already done in this.tアプリ起動時に一度だけ行う初期化処理(). } //----------------- #endregion diff --git a/DTXCreatorプロジェクト/コード/03.オプション関連/Cオプションダイアログ.Designer.cs b/DTXCreatorプロジェクト/コード/03.オプション関連/Cオプションダイアログ.Designer.cs index 1c3fceb5..177b6df4 100644 --- a/DTXCreatorプロジェクト/コード/03.オプション関連/Cオプションダイアログ.Designer.cs +++ b/DTXCreatorプロジェクト/コード/03.オプション関連/Cオプションダイアログ.Designer.cs @@ -132,6 +132,7 @@ // // checkedListBoxLaneSelectList // + this.checkedListBoxLaneSelectList.CheckOnClick = true; this.checkedListBoxLaneSelectList.FormattingEnabled = true; resources.ApplyResources( this.checkedListBoxLaneSelectList, "checkedListBoxLaneSelectList" ); this.checkedListBoxLaneSelectList.Name = "checkedListBoxLaneSelectList"; diff --git a/DTXCreatorプロジェクト/コード/03.オプション関連/Cオプションダイアログ.cs b/DTXCreatorプロジェクト/コード/03.オプション関連/Cオプションダイアログ.cs index 2385a0bf..902c7050 100644 --- a/DTXCreatorプロジェクト/コード/03.オプション関連/Cオプションダイアログ.cs +++ b/DTXCreatorプロジェクト/コード/03.オプション関連/Cオプションダイアログ.cs @@ -23,6 +23,7 @@ namespace DTXCreator.オプション関連 { DTXCreator.譜面.Cレーン.ELaneType eLastLaneType = DTXCreator.譜面.Cレーン.ELaneType.END; + this.checkedListBoxLaneSelectList.BeginUpdate(); foreach ( DTXCreator.譜面.Cレーン c in listCLane) { if ( eLastLaneType != c.eLaneType ) @@ -31,6 +32,7 @@ namespace DTXCreator.オプション関連 this.checkedListBoxLaneSelectList.Items.Add( eLastLaneType.ToString(), c.bIsVisible ); } } + this.checkedListBoxLaneSelectList.EndUpdate(); bレーンリストの内訳が生成済みである = true; } } diff --git a/DTXCreatorプロジェクト/コード/03.オプション関連/Cオプションダイアログ.resx b/DTXCreatorプロジェクト/コード/03.オプション関連/Cオプションダイアログ.resx index 6ae714d4..779d5828 100644 --- a/DTXCreatorプロジェクト/コード/03.オプション関連/Cオプションダイアログ.resx +++ b/DTXCreatorプロジェクト/コード/03.オプション関連/Cオプションダイアログ.resx @@ -117,111 +117,11 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - checkBoxPlaySoundOnChip - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage全般 - - - 0 - - - checkBoxPreviewBGM - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage全般 - - - 1 - - - checkBoxオートフォーカス - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage全般 - - - 2 - - - label個まで表示する - - - System.Windows.Forms.Label, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage全般 - - - 3 - - - checkBox最近使用したファイル - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage全般 - - - 4 - - - numericUpDown最近使用したファイルの最大表示個数 - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage全般 - - - 5 - - - - 4, 22 - - - - 3, 3, 3, 3 - - - 359, 144 - - - 0 - - - General - - - tabPage全般 - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabControlオプション - - - 0 - True + 6, 73 @@ -375,6 +275,34 @@ 5 + + 4, 22 + + + + 3, 3, 3, 3 + + + 359, 144 + + + 0 + + + General + + + tabPage全般 + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabControlオプション + + + 0 + Top, Bottom, Left, Right diff --git a/DTXCreatorプロジェクト/コード/05.譜面/C譜面管理.cs b/DTXCreatorプロジェクト/コード/05.譜面/C譜面管理.cs index 669295fe..074ff9e4 100644 --- a/DTXCreatorプロジェクト/コード/05.譜面/C譜面管理.cs +++ b/DTXCreatorプロジェクト/コード/05.譜面/C譜面管理.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Text; +using System.Diagnostics; using System.Drawing; using System.Drawing.Drawing2D; using System.Windows.Forms; @@ -748,7 +749,7 @@ namespace DTXCreator.譜面 int width = Cレーン.LANEWIDTH; int alpha = 0x19; - this.listレーン.Add( new Cレーン( Cレーン.E種別.BPM, "BPM", 0x08, 0x03, true, Color.FromArgb( alpha, 160, 160, 160 ), 0, width, Cレーン.ELaneType.BPM, true ) ); + this.listレーン.Add( new Cレーン( Cレーン.E種別.BPM, "BPM", 0x08, 0x03, true, Color.FromArgb( alpha, 160, 160, 160 ), 0, width, Cレーン.ELaneType.BPM, true ) ); this.listレーン.Add( new Cレーン( Cレーン.E種別.WAV, "LC", 0x1a, 0x1a, true, Color.FromArgb( alpha, 0, 0xff, 0xff ), 0, width, Cレーン.ELaneType.Drums, true ) ); this.listレーン.Add( new Cレーン( Cレーン.E種別.WAV, "HH", 0x11, 0x18, false, Color.FromArgb( alpha, 0, 0xff, 0xff ), 0, width, Cレーン.ELaneType.Drums, true ) );