//! Конструктор, заполняем поля формы русскими текстами и локализированными public LocaleQuestForm(MainForm parent, int questID) { InitializeComponent(); this.parent = parent; CQuest locale_quest = parent.getLocaleQuest(questID); CQuest quest = parent.getQuestOnQuestID(questID); pub_version = quest.Version; lViewNpcName.Text = quest.Additional.Holder; lViewQuestID.Text = quest.QuestID.ToString(); if (locale_quest == null) { // если нет локализации совсем - берем за основу русский квест и обнуляем данные с полями текста locale_quest = (CQuest)quest.Clone(); locale_quest.QuestInformation.Description = ""; locale_quest.QuestInformation.onFailed = ""; locale_quest.QuestInformation.onWin = ""; locale_quest.QuestInformation.Title = ""; foreach (var key in locale_quest.QuestInformation.Items.Keys) { locale_quest.QuestInformation.Items[key].description = ""; locale_quest.QuestInformation.Items[key].title = ""; locale_quest.QuestInformation.Items[key].activation = ""; } } cur_locale_quest = (CQuest)locale_quest.Clone(); pub_quest = (CQuest)quest.Clone(); titleTextBox.Text = quest.QuestInformation.Title; descriptionTextBox.Text = quest.QuestInformation.Description; onWonTextBox.Text = quest.QuestInformation.onWin; onFailedTextBox.Text = quest.QuestInformation.onFailed; localeLitleTextBox.Text = locale_quest.QuestInformation.Title; localeDescriptionTextBox.Text = locale_quest.QuestInformation.Description; localeOnWonTextBox.Text = locale_quest.QuestInformation.onWin; localeOnFailedTextBox.Text = locale_quest.QuestInformation.onFailed; }