private void customizeDescriptionsMenu_Click(object sender, EventArgs e)
{
Dictionary<string, List<SymbolText>> customSymbolText;
Dictionary<string, bool> customSymbolKey;
// Initialize the dialog
CustomSymbolText dialog = new CustomSymbolText(symbolDB, false);
controller.GetCustomSymbolText(out customSymbolText, out customSymbolKey);
dialog.SetCustomSymbolDictionaries(customSymbolText, customSymbolKey);
dialog.LangId = controller.GetDescriptionLanguage();
// Show the dialog.
DialogResult result = dialog.ShowDialog(this);
// Apply the changes
if (result == DialogResult.OK) {
// dialog changes the dictionaries, so we don't need to retrieve tham.
controller.SetCustomSymbolText(customSymbolText, customSymbolKey, dialog.LangId);
if (dialog.UseAsDefaultLanguage)
controller.DefaultDescriptionLanguage = dialog.LangId;
}
dialog.Dispose();
}