示例#1
0
        public SAV_Trainer7()
        {
            Loading = true;
            InitializeComponent();
            if (Main.unicode)
            {
                try { TB_OTName.Font = FontUtil.getPKXFont(11); }
                catch (Exception e) { WinFormsUtil.Alert("Font loading failed...", e.ToString()); }
            }

            WinFormsUtil.TranslateInterface(this, Main.curlanguage);
            B_MaxCash.Click += (sender, e) => MT_Money.Text = "9,999,999";

            CB_Gender.Items.Clear();
            CB_Gender.Items.AddRange(Main.gendersymbols.Take(2).ToArray()); // m/f depending on unicode selection

            getComboBoxes();
            getTextBoxes();

            CB_Stats.Items.Clear();
            for (int i = 0; i < 200; i++)
            {
                string name;
                if (!RecordList.TryGetValue(i, out name))
                {
                    name = i.ToString("D3");
                }

                CB_Stats.Items.Add(name);
            }
            CB_Stats.SelectedIndex   = RecordList.First().Key;
            CB_Fashion.SelectedIndex = 1;

            Loading = false;
        }
示例#2
0
        private void updateTip(int index, bool updateStats)
        {
            switch (index)
            {
            case 2:     // Storyline Completed Time
                int seconds = (int)(CAL_AdventureStartDate.Value - new DateTime(2000, 1, 1)).TotalSeconds;
                seconds -= seconds % 86400;
                seconds += (int)(CAL_AdventureStartTime.Value - new DateTime(2000, 1, 1)).TotalSeconds;
                Tip3.SetToolTip(NUD_Stat, dateval2str(SAV.getRecord(index), seconds));
                break;

            default:
                Tip3.RemoveAll();
                break;
            }
            if (!updateStats)
            {
                return;
            }

            string tip;

            if (RecordList.TryGetValue(index, out tip))
            {
                Tip3.SetToolTip(CB_Stats, tip);
            }
        }
示例#3
0
        public SAV_Trainer7(SaveFile sav)
        {
            SAV     = (SAV7)(Origin = sav).Clone();
            Loading = true;
            InitializeComponent();
            if (Main.Unicode)
            {
                try { TB_OTName.Font = FontUtil.GetPKXFont(11); }
                catch (Exception e) { WinFormsUtil.Alert("Font loading failed...", e.ToString()); }
            }

            WinFormsUtil.TranslateInterface(this, Main.CurrentLanguage);
            B_MaxCash.Click += (sender, e) => MT_Money.Text = "9,999,999";

            CB_Gender.Items.Clear();
            CB_Gender.Items.AddRange(Main.GenderSymbols.Take(2).ToArray()); // m/f depending on unicode selection

            GetComboBoxes();
            GetTextBoxes();

            CB_Stats.Items.Clear();
            for (int i = 0; i < 200; i++)
            {
                if (!RecordList.TryGetValue(i, out string name))
                {
                    name = $"{i:D3}";
                }

                CB_Stats.Items.Add(name);
            }
            CB_Stats.SelectedIndex   = RecordList.First().Key;
            CB_Fashion.SelectedIndex = 1;

            if (SAV.USUM)
            {
                LoadUltraData();
            }
            else
            {
                TC_Editor.TabPages.Remove(Tab_Ultra);
            }

            Loading = false;
        }