From: yyagi Date: Sun, 10 Apr 2016 15:38:42 +0000 (+0000) Subject: #30333 MIDI読み込み設定のxmlファイル読み込み時にエラーが発生した場合は、設定のxmlを新規に作り直すよう修正。 X-Git-Tag: Release099f~3^2~85^2 X-Git-Url: http://git.osdn.net/view?p=dtxmania%2Fdtxmania.git;a=commitdiff_plain;h=28cb3b027c32843111746c9ba364f0c1ccbeb968 #30333 MIDI読み込み設定のxmlファイル読み込み時にエラーが発生した場合は、設定のxmlを新規に作り直すよう修正。 #30333 英語表示時に、重複チップ数を正しく表示てきていなかったのを修正。 git-svn-id: http://svn.osdn.jp/svnroot/dtxmania/branches/160321(DTXCreator%20with%20MIDI%20Import)@976 16f42ceb-6dc6-49c8-ba94-f2d53467949d --- diff --git a/DTXCreatorプロジェクト/DTXCreatorプロジェクト.csproj b/DTXCreatorプロジェクト/DTXCreatorプロジェクト.csproj index a930a147..d080d34f 100644 --- a/DTXCreatorプロジェクト/DTXCreatorプロジェクト.csproj +++ b/DTXCreatorプロジェクト/DTXCreatorプロジェクト.csproj @@ -56,6 +56,13 @@ 0219 false + + false + + + + + False @@ -204,9 +211,11 @@ CMIDIインポートダイアログ.cs + Designer CMIDIインポートダイアログ.cs + Designer Designer diff --git a/DTXCreatorプロジェクト/コード/07.MIDIインポート/CMIDIインポートダイアログ.Designer.cs b/DTXCreatorプロジェクト/コード/07.MIDIインポート/CMIDIインポートダイアログ.Designer.cs index f2686227..56a6327b 100644 --- a/DTXCreatorプロジェクト/コード/07.MIDIインポート/CMIDIインポートダイアログ.Designer.cs +++ b/DTXCreatorプロジェクト/コード/07.MIDIインポート/CMIDIインポートダイアログ.Designer.cs @@ -34,6 +34,12 @@ this.buttonOK = new System.Windows.Forms.Button(); this.textBox1 = new System.Windows.Forms.TextBox(); this.dgv割り当て一覧 = new System.Windows.Forms.DataGridView(); + this.Assign_MIDI_Key = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Assign_Key = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Assign_DTX_Lane = new System.Windows.Forms.DataGridViewComboBoxColumn(); + this.Assign_BackCh = new System.Windows.Forms.DataGridViewCheckBoxColumn(); + this.Assign_Notes = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Assign_Comment = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.labelMIDIImportSettingsFile = new System.Windows.Forms.Label(); this.buttonSaveSettings = new System.Windows.Forms.Button(); @@ -48,12 +54,6 @@ this.checkBoxベロシティカーブ調整 = new System.Windows.Forms.CheckBox(); this.groupbox4 = new System.Windows.Forms.GroupBox(); this.dgvチャンネル一覧 = new System.Windows.Forms.DataGridView(); - this.Assign_MIDI_Key = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.Assign_Key = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.Assign_DTX_Lane = new System.Windows.Forms.DataGridViewComboBoxColumn(); - this.Assign_BackCh = new System.Windows.Forms.DataGridViewCheckBoxColumn(); - this.Assign_Notes = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.Assign_Comment = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.Channel_Ch = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.Channel_Notes = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.Channel_Load = new System.Windows.Forms.DataGridViewCheckBoxColumn(); @@ -116,6 +116,57 @@ this.dgv割り当て一覧.CellEndEdit += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgv割り当て一覧_CellEndEdit); this.dgv割り当て一覧.CellEnter += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgv割り当て一覧_CellEnter); // + // Assign_MIDI_Key + // + resources.ApplyResources(this.Assign_MIDI_Key, "Assign_MIDI_Key"); + this.Assign_MIDI_Key.MaxInputLength = 4; + this.Assign_MIDI_Key.Name = "Assign_MIDI_Key"; + this.Assign_MIDI_Key.ReadOnly = true; + this.Assign_MIDI_Key.Resizable = System.Windows.Forms.DataGridViewTriState.False; + this.Assign_MIDI_Key.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; + // + // Assign_Key + // + resources.ApplyResources(this.Assign_Key, "Assign_Key"); + this.Assign_Key.MaxInputLength = 64; + this.Assign_Key.Name = "Assign_Key"; + this.Assign_Key.ReadOnly = true; + this.Assign_Key.Resizable = System.Windows.Forms.DataGridViewTriState.False; + this.Assign_Key.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; + // + // Assign_DTX_Lane + // + this.Assign_DTX_Lane.AutoComplete = false; + this.Assign_DTX_Lane.DisplayStyle = System.Windows.Forms.DataGridViewComboBoxDisplayStyle.ComboBox; + this.Assign_DTX_Lane.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + resources.ApplyResources(this.Assign_DTX_Lane, "Assign_DTX_Lane"); + this.Assign_DTX_Lane.MaxDropDownItems = 4; + this.Assign_DTX_Lane.Name = "Assign_DTX_Lane"; + this.Assign_DTX_Lane.Resizable = System.Windows.Forms.DataGridViewTriState.False; + // + // Assign_BackCh + // + resources.ApplyResources(this.Assign_BackCh, "Assign_BackCh"); + this.Assign_BackCh.Name = "Assign_BackCh"; + this.Assign_BackCh.Resizable = System.Windows.Forms.DataGridViewTriState.False; + // + // Assign_Notes + // + resources.ApplyResources(this.Assign_Notes, "Assign_Notes"); + this.Assign_Notes.MaxInputLength = 4; + this.Assign_Notes.Name = "Assign_Notes"; + this.Assign_Notes.ReadOnly = true; + this.Assign_Notes.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; + // + // Assign_Comment + // + this.Assign_Comment.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; + resources.ApplyResources(this.Assign_Comment, "Assign_Comment"); + this.Assign_Comment.MaxInputLength = 128; + this.Assign_Comment.Name = "Assign_Comment"; + this.Assign_Comment.Resizable = System.Windows.Forms.DataGridViewTriState.False; + this.Assign_Comment.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; + // // groupBox1 // this.groupBox1.Controls.Add(this.labelMIDIImportSettingsFile); @@ -240,57 +291,6 @@ this.dgvチャンネル一覧.CellValueChanged += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvチャンネル一覧_CellValueChanged); this.dgvチャンネル一覧.CurrentCellDirtyStateChanged += new System.EventHandler(this.dgvチャンネル一覧_CurrentCellDirtyStateChanged); // - // Assign_MIDI_Key - // - resources.ApplyResources(this.Assign_MIDI_Key, "Assign_MIDI_Key"); - this.Assign_MIDI_Key.MaxInputLength = 4; - this.Assign_MIDI_Key.Name = "Assign_MIDI_Key"; - this.Assign_MIDI_Key.ReadOnly = true; - this.Assign_MIDI_Key.Resizable = System.Windows.Forms.DataGridViewTriState.False; - this.Assign_MIDI_Key.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // Assign_Key - // - resources.ApplyResources(this.Assign_Key, "Assign_Key"); - this.Assign_Key.MaxInputLength = 64; - this.Assign_Key.Name = "Assign_Key"; - this.Assign_Key.ReadOnly = true; - this.Assign_Key.Resizable = System.Windows.Forms.DataGridViewTriState.False; - this.Assign_Key.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // Assign_DTX_Lane - // - this.Assign_DTX_Lane.AutoComplete = false; - this.Assign_DTX_Lane.DisplayStyle = System.Windows.Forms.DataGridViewComboBoxDisplayStyle.ComboBox; - this.Assign_DTX_Lane.FlatStyle = System.Windows.Forms.FlatStyle.Flat; - resources.ApplyResources(this.Assign_DTX_Lane, "Assign_DTX_Lane"); - this.Assign_DTX_Lane.MaxDropDownItems = 4; - this.Assign_DTX_Lane.Name = "Assign_DTX_Lane"; - this.Assign_DTX_Lane.Resizable = System.Windows.Forms.DataGridViewTriState.False; - // - // Assign_BackCh - // - resources.ApplyResources(this.Assign_BackCh, "Assign_BackCh"); - this.Assign_BackCh.Name = "Assign_BackCh"; - this.Assign_BackCh.Resizable = System.Windows.Forms.DataGridViewTriState.False; - // - // Assign_Notes - // - resources.ApplyResources(this.Assign_Notes, "Assign_Notes"); - this.Assign_Notes.MaxInputLength = 4; - this.Assign_Notes.Name = "Assign_Notes"; - this.Assign_Notes.ReadOnly = true; - this.Assign_Notes.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // - // Assign_Comment - // - this.Assign_Comment.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; - resources.ApplyResources(this.Assign_Comment, "Assign_Comment"); - this.Assign_Comment.MaxInputLength = 128; - this.Assign_Comment.Name = "Assign_Comment"; - this.Assign_Comment.Resizable = System.Windows.Forms.DataGridViewTriState.False; - this.Assign_Comment.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - // // Channel_Ch // this.Channel_Ch.Frozen = true; diff --git a/DTXCreatorプロジェクト/コード/07.MIDIインポート/CMIDIインポートダイアログ.cs b/DTXCreatorプロジェクト/コード/07.MIDIインポート/CMIDIインポートダイアログ.cs index a662b933..d0d5eff6 100644 --- a/DTXCreatorプロジェクト/コード/07.MIDIインポート/CMIDIインポートダイアログ.cs +++ b/DTXCreatorプロジェクト/コード/07.MIDIインポート/CMIDIインポートダイアログ.cs @@ -793,7 +793,19 @@ namespace DTXCreator.MIDIインポート using ( var stream = new FileStream( this.formメインフォーム.strMIDIインポート設定ファイル, FileMode.Open ) ) { var serializer = new System.Xml.Serialization.XmlSerializer( typeof( DTXC_MIDIConvSetting ) ); + try + { mcs = (DTXC_MIDIConvSetting) serializer.Deserialize( stream ); + } + catch ( System.InvalidOperationException e ) + { + // 読み込みエラー発生時は、xmlを新規作成する + stream.Close(); // Closeしないとこの際のファイル保存でファイルハンドルが重複してしまう + Trace.TraceError( "MIDIインポート設定をファイルから読み込む際に、エラーが発生しました: " + e.Message ); + this.formメインフォーム.strMIDIインポート設定ファイル = Directory.GetCurrentDirectory() + @"\" + "DTXCreatorSMFSettings.xml"; + tMIDIインポート設定をファイルに保存する(); + return; + } } #endregion diff --git a/DTXCreatorプロジェクト/コード/07.MIDIインポート/CMIDIインポートダイアログ.ja-JP.resx b/DTXCreatorプロジェクト/コード/07.MIDIインポート/CMIDIインポートダイアログ.ja-JP.resx index c72df0cd..453993eb 100644 --- a/DTXCreatorプロジェクト/コード/07.MIDIインポート/CMIDIインポートダイアログ.ja-JP.resx +++ b/DTXCreatorプロジェクト/コード/07.MIDIインポート/CMIDIインポートダイアログ.ja-JP.resx @@ -117,6 +117,36 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + MIDIを開く(&O) + + + キャンセル(&C) + + + MIDIï½·ï½° + + + ï½·ï½° + + + DTXレーン + + + 裏Ch + + + ノート + + + コメント + + + 設定を保存(&S) + + + 設定を開く(&P) + 重複チップ @@ -128,7 +158,13 @@ MIDIのノートの各キーが、DTXでどのレーンに割り当てられるか設定します * Disuse *を設定すると割り当てません - + + 割り当て一覧 + + + MIDI解析内容 + + 113, 17 @@ -148,51 +184,15 @@ ベロシティカーブを急にする (小さい音がDTXだと大きい場合) - - 裏Ch - - - コメント - - - DTXレーン - - - ï½·ï½° - - - MIDIï½·ï½° + + インポート設定 - + ノート - - キャンセル(&C) - - - MIDIを開く(&O) - - - 設定を開く(&P) - - - 設定を保存(&S) - 読込 - - ノート - - - 割り当て一覧 - - - MIDI解析内容 - - - インポート設定 - MIDIチャンネル一覧 diff --git a/DTXCreatorプロジェクト/コード/07.MIDIインポート/CMIDIインポートダイアログ.resx b/DTXCreatorプロジェクト/コード/07.MIDIインポート/CMIDIインポートダイアログ.resx index 29e662e2..5c09a4e3 100644 --- a/DTXCreatorプロジェクト/コード/07.MIDIインポート/CMIDIインポートダイアログ.resx +++ b/DTXCreatorプロジェクト/コード/07.MIDIインポート/CMIDIインポートダイアログ.resx @@ -237,6 +237,45 @@ True + + True + + + True + + + True + + + True + + + True + + + 6, 18 + + + 512, 258 + + + 4 + + + dgv割り当て一覧 + + + System.Windows.Forms.DataGridView, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox1 + + + 5 + + + True + MIDI_Key @@ -282,27 +321,6 @@ Comment - - 6, 18 - - - 512, 258 - - - 4 - - - dgv割り当て一覧 - - - System.Windows.Forms.DataGridView, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 - - - 5 - 259, 322 @@ -388,16 +406,16 @@ MiddleRight - 409, 279 + 374, 279 - 109, 23 + 144, 23 6 - (redundant chips) + redundant chips MiddleRight @@ -681,39 +699,6 @@ 3 - - True - - - Ch - - - 30 - - - True - - - Notes - - - True - - - Load - - - 40 - - - 7, 19 - - - 187, 256 - - - 0 - dgvチャンネル一覧 @@ -753,6 +738,60 @@ 0 + + True + + + True + + + True + + + 7, 19 + + + 187, 256 + + + 0 + + + dgvチャンネル一覧 + + + System.Windows.Forms.DataGridView, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupbox4 + + + 0 + + + True + + + Ch + + + 30 + + + True + + + Notes + + + True + + + Load + + + 40 + True diff --git a/実行時フォルダ(DTXCreator)/DTXCreator.exe b/実行時フォルダ(DTXCreator)/DTXCreator.exe index 627524ca..f8d47363 100644 Binary files a/実行時フォルダ(DTXCreator)/DTXCreator.exe and b/実行時フォルダ(DTXCreator)/DTXCreator.exe differ diff --git a/実行時フォルダ(DTXCreator)/ja-JP/DTXCreator.resources.dll b/実行時フォルダ(DTXCreator)/ja-JP/DTXCreator.resources.dll index 7e57a849..3e0494b8 100644 Binary files a/実行時フォルダ(DTXCreator)/ja-JP/DTXCreator.resources.dll and b/実行時フォルダ(DTXCreator)/ja-JP/DTXCreator.resources.dll differ