/// <summary> /// エクスポートメニュー項目がクリックされた時に通を受け取る。 /// </summary> /// <param name="sender">送信元オブジェクト</param> /// <param name="e">イベントオブジェクト</param> private void OnMenuItemExportClick(object sender, EventArgs e) { if (saveFileDialog.ShowDialog(this) != DialogResult.OK) { return; } try { string path = saveFileDialog.FileName; GeneratorSetting setting = new GeneratorSetting(1, 1); setting.ExportSetting.ExportFilePath = saveFileDialog.FileName; setting.ExportSetting.CharaChipSize = AppData.Instance.GeneratorSetting.ExportSetting.CharaChipSize; Character.CopyTo(setting.GetCharacter(0)); CharaChipExporter.ExportCharaChip(setting); MessageBox.Show(this, Resources.MessageExported, Resources.DialogTitleInformation); } catch (Exception ex) { MessageBox.Show(this, ex.Message, Resources.DialogTitleError); } }
/// <summary> /// ファイル出力モード /// </summary> private static void RunGenerate() { try { GeneratorSettingReader reader = new GeneratorSettingReader(); foreach (string path in filePaths) { GeneratorSetting setting = reader.Read(path); CharaChipExporter.ExportCharaChip(setting); } MessageBox.Show(Properties.Resources.MessageExported, Properties.Resources.DialogTitleInformation); } catch (Exception e) { MessageBox.Show(e.Message, Properties.Resources.DialogTitleError); } }