private void ButtonClearFont_Click(object sender, EventArgs e) { if (MessageBox.Show("フォントをデフォルト設定に戻します。\r\nよろしいですか?", "クリア確認", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == System.Windows.Forms.DialogResult.Yes) { if (GeneralFont != null) { GeneralFont.Dispose(); } GeneralFont = null; TextGeneralFont.Text = ""; var defaultFonts = FleetImageArgument.GetDefaultFonts(); for (int i = 0; i < TextFontList.Length; i++) { TextFontList[i].Text = SerializableFont.FontToString(defaultFonts[i]); defaultFonts[i].Dispose(); } } }
private void ButtonClearFont_Click(object sender, EventArgs e) { if (MessageBox.Show("Are you sure you want to reset font\r\nsettings to the default values?", "Clear Confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == System.Windows.Forms.DialogResult.Yes) { if (GeneralFont != null) { GeneralFont.Dispose(); } GeneralFont = null; TextGeneralFont.Text = ""; var defaultFonts = FleetImageArgument.GetDefaultFonts(); for (int i = 0; i < TextFontList.Length; i++) { TextFontList[i].Text = SerializableFont.FontToString(defaultFonts[i]); defaultFonts[i].Dispose(); } } }