void UpdateControlsFromId(string id)
{
if (id == null)
return;
Symbol symbol = symbolDB[id];
if (TextIsCustomized(id)) {
// Uses custom text.
labelCustomizedText.Visible = true;
labelStandardText.Visible = false;
buttonDefault.Enabled = true;
SetTextBox(customSymbolText[id]);
checkBoxShowKey.Enabled = true;
checkBoxShowKey.Checked = customSymbolKey.ContainsKey(id) ? customSymbolKey[id] : false;
}
else {
// Just uses standard text.
labelCustomizedText.Visible = false;
labelStandardText.Visible = true;
buttonDefault.Enabled = false;
SetTextBox(symbolDB[id].SymbolTexts);
checkBoxShowKey.Checked = false;
checkBoxShowKey.Enabled = false;
}
if (useAsLocalizeTool) {
if (NameIsCustomized(id)) {
// uses custom name
textBoxSymbolName.Text = symbolNames[id].Find(symtext => (symtext.Lang == LangId)).Text;
}
else {
// uses standard text.
textBoxSymbolName.Text = symbolDB[id].GetName(LangId);
}
}
}