@@ -34,6 +34,12 @@ | ||
34 | 34 | this.buttonOK = new System.Windows.Forms.Button(); |
35 | 35 | this.textBox1 = new System.Windows.Forms.TextBox(); |
36 | 36 | this.dgv割り当て一覧 = new System.Windows.Forms.DataGridView(); |
37 | + this.Assign_MIDI_Key = new System.Windows.Forms.DataGridViewTextBoxColumn(); | |
38 | + this.Assign_Key = new System.Windows.Forms.DataGridViewTextBoxColumn(); | |
39 | + this.Assign_DTX_Lane = new System.Windows.Forms.DataGridViewComboBoxColumn(); | |
40 | + this.Assign_BackCh = new System.Windows.Forms.DataGridViewCheckBoxColumn(); | |
41 | + this.Assign_Notes = new System.Windows.Forms.DataGridViewTextBoxColumn(); | |
42 | + this.Assign_Comment = new System.Windows.Forms.DataGridViewTextBoxColumn(); | |
37 | 43 | this.groupBox1 = new System.Windows.Forms.GroupBox(); |
38 | 44 | this.labelMIDIImportSettingsFile = new System.Windows.Forms.Label(); |
39 | 45 | this.buttonSaveSettings = new System.Windows.Forms.Button(); |
@@ -48,12 +54,6 @@ | ||
48 | 54 | this.checkBoxベロシティカーブ調整 = new System.Windows.Forms.CheckBox(); |
49 | 55 | this.groupbox4 = new System.Windows.Forms.GroupBox(); |
50 | 56 | this.dgvチャンネル一覧 = new System.Windows.Forms.DataGridView(); |
51 | - this.Assign_MIDI_Key = new System.Windows.Forms.DataGridViewTextBoxColumn(); | |
52 | - this.Assign_Key = new System.Windows.Forms.DataGridViewTextBoxColumn(); | |
53 | - this.Assign_DTX_Lane = new System.Windows.Forms.DataGridViewComboBoxColumn(); | |
54 | - this.Assign_BackCh = new System.Windows.Forms.DataGridViewCheckBoxColumn(); | |
55 | - this.Assign_Notes = new System.Windows.Forms.DataGridViewTextBoxColumn(); | |
56 | - this.Assign_Comment = new System.Windows.Forms.DataGridViewTextBoxColumn(); | |
57 | 57 | this.Channel_Ch = new System.Windows.Forms.DataGridViewTextBoxColumn(); |
58 | 58 | this.Channel_Notes = new System.Windows.Forms.DataGridViewTextBoxColumn(); |
59 | 59 | this.Channel_Load = new System.Windows.Forms.DataGridViewCheckBoxColumn(); |
@@ -116,6 +116,57 @@ | ||
116 | 116 | this.dgv割り当て一覧.CellEndEdit += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgv割り当て一覧_CellEndEdit); |
117 | 117 | this.dgv割り当て一覧.CellEnter += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgv割り当て一覧_CellEnter); |
118 | 118 | // |
119 | + // Assign_MIDI_Key | |
120 | + // | |
121 | + resources.ApplyResources(this.Assign_MIDI_Key, "Assign_MIDI_Key"); | |
122 | + this.Assign_MIDI_Key.MaxInputLength = 4; | |
123 | + this.Assign_MIDI_Key.Name = "Assign_MIDI_Key"; | |
124 | + this.Assign_MIDI_Key.ReadOnly = true; | |
125 | + this.Assign_MIDI_Key.Resizable = System.Windows.Forms.DataGridViewTriState.False; | |
126 | + this.Assign_MIDI_Key.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; | |
127 | + // | |
128 | + // Assign_Key | |
129 | + // | |
130 | + resources.ApplyResources(this.Assign_Key, "Assign_Key"); | |
131 | + this.Assign_Key.MaxInputLength = 64; | |
132 | + this.Assign_Key.Name = "Assign_Key"; | |
133 | + this.Assign_Key.ReadOnly = true; | |
134 | + this.Assign_Key.Resizable = System.Windows.Forms.DataGridViewTriState.False; | |
135 | + this.Assign_Key.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; | |
136 | + // | |
137 | + // Assign_DTX_Lane | |
138 | + // | |
139 | + this.Assign_DTX_Lane.AutoComplete = false; | |
140 | + this.Assign_DTX_Lane.DisplayStyle = System.Windows.Forms.DataGridViewComboBoxDisplayStyle.ComboBox; | |
141 | + this.Assign_DTX_Lane.FlatStyle = System.Windows.Forms.FlatStyle.Flat; | |
142 | + resources.ApplyResources(this.Assign_DTX_Lane, "Assign_DTX_Lane"); | |
143 | + this.Assign_DTX_Lane.MaxDropDownItems = 4; | |
144 | + this.Assign_DTX_Lane.Name = "Assign_DTX_Lane"; | |
145 | + this.Assign_DTX_Lane.Resizable = System.Windows.Forms.DataGridViewTriState.False; | |
146 | + // | |
147 | + // Assign_BackCh | |
148 | + // | |
149 | + resources.ApplyResources(this.Assign_BackCh, "Assign_BackCh"); | |
150 | + this.Assign_BackCh.Name = "Assign_BackCh"; | |
151 | + this.Assign_BackCh.Resizable = System.Windows.Forms.DataGridViewTriState.False; | |
152 | + // | |
153 | + // Assign_Notes | |
154 | + // | |
155 | + resources.ApplyResources(this.Assign_Notes, "Assign_Notes"); | |
156 | + this.Assign_Notes.MaxInputLength = 4; | |
157 | + this.Assign_Notes.Name = "Assign_Notes"; | |
158 | + this.Assign_Notes.ReadOnly = true; | |
159 | + this.Assign_Notes.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; | |
160 | + // | |
161 | + // Assign_Comment | |
162 | + // | |
163 | + this.Assign_Comment.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; | |
164 | + resources.ApplyResources(this.Assign_Comment, "Assign_Comment"); | |
165 | + this.Assign_Comment.MaxInputLength = 128; | |
166 | + this.Assign_Comment.Name = "Assign_Comment"; | |
167 | + this.Assign_Comment.Resizable = System.Windows.Forms.DataGridViewTriState.False; | |
168 | + this.Assign_Comment.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; | |
169 | + // | |
119 | 170 | // groupBox1 |
120 | 171 | // |
121 | 172 | this.groupBox1.Controls.Add(this.labelMIDIImportSettingsFile); |
@@ -240,57 +291,6 @@ | ||
240 | 291 | this.dgvチャンネル一覧.CellValueChanged += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvチャンネル一覧_CellValueChanged); |
241 | 292 | this.dgvチャンネル一覧.CurrentCellDirtyStateChanged += new System.EventHandler(this.dgvチャンネル一覧_CurrentCellDirtyStateChanged); |
242 | 293 | // |
243 | - // Assign_MIDI_Key | |
244 | - // | |
245 | - resources.ApplyResources(this.Assign_MIDI_Key, "Assign_MIDI_Key"); | |
246 | - this.Assign_MIDI_Key.MaxInputLength = 4; | |
247 | - this.Assign_MIDI_Key.Name = "Assign_MIDI_Key"; | |
248 | - this.Assign_MIDI_Key.ReadOnly = true; | |
249 | - this.Assign_MIDI_Key.Resizable = System.Windows.Forms.DataGridViewTriState.False; | |
250 | - this.Assign_MIDI_Key.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; | |
251 | - // | |
252 | - // Assign_Key | |
253 | - // | |
254 | - resources.ApplyResources(this.Assign_Key, "Assign_Key"); | |
255 | - this.Assign_Key.MaxInputLength = 64; | |
256 | - this.Assign_Key.Name = "Assign_Key"; | |
257 | - this.Assign_Key.ReadOnly = true; | |
258 | - this.Assign_Key.Resizable = System.Windows.Forms.DataGridViewTriState.False; | |
259 | - this.Assign_Key.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; | |
260 | - // | |
261 | - // Assign_DTX_Lane | |
262 | - // | |
263 | - this.Assign_DTX_Lane.AutoComplete = false; | |
264 | - this.Assign_DTX_Lane.DisplayStyle = System.Windows.Forms.DataGridViewComboBoxDisplayStyle.ComboBox; | |
265 | - this.Assign_DTX_Lane.FlatStyle = System.Windows.Forms.FlatStyle.Flat; | |
266 | - resources.ApplyResources(this.Assign_DTX_Lane, "Assign_DTX_Lane"); | |
267 | - this.Assign_DTX_Lane.MaxDropDownItems = 4; | |
268 | - this.Assign_DTX_Lane.Name = "Assign_DTX_Lane"; | |
269 | - this.Assign_DTX_Lane.Resizable = System.Windows.Forms.DataGridViewTriState.False; | |
270 | - // | |
271 | - // Assign_BackCh | |
272 | - // | |
273 | - resources.ApplyResources(this.Assign_BackCh, "Assign_BackCh"); | |
274 | - this.Assign_BackCh.Name = "Assign_BackCh"; | |
275 | - this.Assign_BackCh.Resizable = System.Windows.Forms.DataGridViewTriState.False; | |
276 | - // | |
277 | - // Assign_Notes | |
278 | - // | |
279 | - resources.ApplyResources(this.Assign_Notes, "Assign_Notes"); | |
280 | - this.Assign_Notes.MaxInputLength = 4; | |
281 | - this.Assign_Notes.Name = "Assign_Notes"; | |
282 | - this.Assign_Notes.ReadOnly = true; | |
283 | - this.Assign_Notes.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; | |
284 | - // | |
285 | - // Assign_Comment | |
286 | - // | |
287 | - this.Assign_Comment.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; | |
288 | - resources.ApplyResources(this.Assign_Comment, "Assign_Comment"); | |
289 | - this.Assign_Comment.MaxInputLength = 128; | |
290 | - this.Assign_Comment.Name = "Assign_Comment"; | |
291 | - this.Assign_Comment.Resizable = System.Windows.Forms.DataGridViewTriState.False; | |
292 | - this.Assign_Comment.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; | |
293 | - // | |
294 | 294 | // Channel_Ch |
295 | 295 | // |
296 | 296 | this.Channel_Ch.Frozen = true; |
@@ -793,7 +793,19 @@ | ||
793 | 793 | using ( var stream = new FileStream( this.formメインフォーム.strMIDIインポート設定ファイル, FileMode.Open ) ) |
794 | 794 | { |
795 | 795 | var serializer = new System.Xml.Serialization.XmlSerializer( typeof( DTXC_MIDIConvSetting ) ); |
796 | + try | |
797 | + { | |
796 | 798 | mcs = (DTXC_MIDIConvSetting) serializer.Deserialize( stream ); |
799 | + } | |
800 | + catch ( System.InvalidOperationException e ) | |
801 | + { | |
802 | + // 読み込みエラー発生時は、xmlを新規作成する | |
803 | + stream.Close(); // Closeしないとこの際のファイル保存でファイルハンドルが重複してしまう | |
804 | + Trace.TraceError( "MIDIインポート設定をファイルから読み込む際に、エラーが発生しました: " + e.Message ); | |
805 | + this.formメインフォーム.strMIDIインポート設定ファイル = Directory.GetCurrentDirectory() + @"\" + "DTXCreatorSMFSettings.xml"; | |
806 | + tMIDIインポート設定をファイルに保存する(); | |
807 | + return; | |
808 | + } | |
797 | 809 | } |
798 | 810 | #endregion |
799 | 811 |