public void SetText(int index, string name, string desc)
 {
     if (index < 0 || index >= SkillNames.Count)
     {
         throw new Exception("id out of range!");
     }
     Extensions.SetTextToControl(SkillNames[index], name);
     Extensions.SetTextToControl(SkillDesc[index], desc);
 }
 public void SetText(int index, Int64 skId, string name, string nameTrans, string desc, Image icon)
 {
     if (index < 0 || index >= SkillNames.Count)
     {
         throw new Exception("id out of range!");
     }
     Extensions.SetTextToControl(SkillNames[index], name);
     Extensions.SetTextToControl(SkillTransNames[index], nameTrans);
     Extensions.SetTextToControl(SkillDesc[index], desc);
     Extensions.SetImageToPicBox(Icons[index], icon);
     SkillId[index] = skId;
 }
Пример #3
0
        private void SetTextToControls()
        {
            if (currentDialogData == null)
            {
                return;
            }
            if (!showOriginal)
            {
                Extensions.SetTextToControl(textBox3, currentDialogData.NameTrans);
                Extensions.SetTextToControl(textBox4, currentDialogData.TextTrans);
            }
            else
            {
                Extensions.SetTextToControl(textBox3, currentDialogData.Name);
                Extensions.SetTextToControl(textBox4, currentDialogData.Text);
            }

            if (currentDialogData.ChoiceDataList.Count > 0)
            {
                Extensions.SetControlVisible(listBox1, true);
                Extensions.ClearListBox(listBox1);
                foreach (var item in currentDialogData.ChoiceDataList)
                {
                    Extensions.AddTextToList(listBox1, showOriginal ? item.Text : item.TransText);
                }
                Extensions.SetControlHeight(listBox1, currentDialogData.ChoiceDataList.Count * 22);
            }
            else
            {
                if (listBox1.Visible)
                {
                    Extensions.SetControlVisible(listBox1, false);
                    Extensions.ClearListBox(listBox1);
                }
            }
        }
 public void SetEventName(string text)
 {
     Extensions.SetTextToControl(EventName, text);
 }
 public void SetText(int OptionIndex, string optionText, string effectText)
 {
     Extensions.SetTextToControl(Options[OptionIndex], optionText);
     Extensions.SetTextToControl(Effects[OptionIndex], effectText);
 }
        private void GameReader_DataChanged(object sender, GameReader.GameDataArgs gameDataArgs)
        {
            switch (gameDataArgs.DataType)
            {
            case GameReader.GameDataType.GameNotFound:
            {
                Extensions.SetTextToControl(label1, (string)gameDataArgs.DataClass);
                IsReaderStarted(false);
                SelectTab(tabPage1);
                break;
            }

            case GameReader.GameDataType.NotFound:
            {
                if (Program.IsDebug)
                {
                    Extensions.SetTextToControl(label1, (string)gameDataArgs.DataClass);
                }
                else
                {
                    Extensions.SetTextToControl(label1, "");
                }
                break;
            }

            case GameReader.GameDataType.MainTraining:
            {
                Extensions.SetTextToControl(label1, (string)gameDataArgs.DataClass);
                break;
            }

            case GameReader.GameDataType.TrainingEvent:
            {
                SelectTab(tabPage2);
                if (gameDataArgs.DataClass != null)
                {
                    Extensions.SetTextToControl(label1, "Event found: " + ((EventManager.EventData)gameDataArgs.DataClass).EventName);
                    ShowEventData((EventManager.EventData)gameDataArgs.DataClass);
                }
                else
                {
                    Extensions.SetTextToControl(label1, "EVENT NOT FOUND!");
                }
                break;
            }

            case GameReader.GameDataType.DebugImage:
            {
                pictureBox1.Image = (Bitmap)gameDataArgs.DataClass;
                break;
            }

            case GameReader.GameDataType.UmaSkillList:
            {
                SelectTab(tabPage4);
                SetSkills((List <SkillManager.SkillData>)gameDataArgs.DataClass);
                Extensions.SetTextToControl(label1, "Skill list");
                break;
            }

            case GameReader.GameDataType.GenWindow:
            {
                SelectTab(tabPage6);
                SetFactors((List <FactorManager.FactorData>)gameDataArgs.DataClass);
                Extensions.SetTextToControl(label1, "Щелкните дважды на ячейку для открытия описания умения (если оно есть в тексте).");
                break;
            }

            case GameReader.GameDataType.MissionBtn:
            {
                SelectTab(tabPage7);
                SetMissions((List <MissionManager.MissionData>)gameDataArgs.DataClass);
                Extensions.SetTextToControl(label1, "Mission list");
                break;
            }

            case GameReader.GameDataType.FreeShopItemWindow:
            {
                SelectTab(tabPage8);
                SetFreeShopItems((List <FreeShopManager.FreeShopItemData>)gameDataArgs.DataClass);
                Extensions.SetTextToControl(label1, "FreeShopItem list");
                break;
            }

            case GameReader.GameDataType.TazunaAfterHelp:
            {
                SelectTab(tabPage5);
                var data = (GameReader.TazunaHelpRelult)gameDataArgs.DataClass;
                if (!string.IsNullOrWhiteSpace(data.Warning))
                {
                    Extensions.SetTextToControl(textBox19, data.Warning);
                }
                else
                {
                    Extensions.SetTextToControl(textBox19, "");
                }
                if (!string.IsNullOrWhiteSpace(data.Desc))
                {
                    Extensions.SetTextToControl(textBox20, data.Desc);
                }
                else
                {
                    Extensions.SetTextToControl(textBox20, "HELP TEXT NOT FOUND IN LIBRARY");
                }
                break;
            }
            }
            //throw new NotImplementedException();
        }