コード例 #1
0
        private void SavePoketch()
        {
            byte count = 0;

            for (int i = 0; i < CLB_Poketch.Items.Count; i++)
            {
                if (CLB_Poketch.GetItemChecked(i))
                {
                    count++;
                    if (!oldPoketchVal[i])
                    {
                        SAV.Data[ofsPoketch + i] = 1;
                    }
                }
                else if (oldPoketchVal[i])
                {
                    SAV.Data[ofsPoketch + i] = 0;
                }
            }
            SAV.Data[ofsPoketch - 2] = count;
            byte current = SAV.Data[ofsPoketch - 1];

            if (current >= CLB_Poketch.Items.Count || !CLB_Poketch.GetItemChecked(current))
            {
                SAV.Data[ofsPoketch - 1] = 0;
            }
            DotArtistByte.CopyTo(SAV.Data, ofsPoketch + 0x27);
            SAV.Data[ofsPoketch - 3] |= 0x04; // "Touch!"
            SAV.CurrentPoketchApp     = CB_CurrentApp.SelectedIndex - 1;
        }
コード例 #2
0
ファイル: SAV_Misc4.cs プロジェクト: Rocci1212/PKHeX
        private void readPoketch()
        {
            string[] PoketchTitle = new[] {
                "01 Digital Watch", "02 Calculator", "03 Memo Pad", "04 Pedometer", "05 Pokemon List",
                "06 Friendship Checker", "07 Dowsing Machine", "08 Berry Searcher", "09 Day Care Checker", "10 Pokemon History",
                "11 Counter", "12 Analog Watch", "13 Marking Map", "14 Link Searcher", "15 Coin Toss",
                "16 Move Tester", "17 Calendar", "18 Dot Artist", "19 Roulette", "20 Trainer Counter",
                "21 Kitchen Timer", "22 Color Changer", "23 Matchup Checker", "24 Stopwatch", "25 Alarm Clock"
            };
            CLB_Poketch.Items.Clear();
            CLB_Poketch.Items.AddRange(PoketchTitle);

            int ret = SAV.PoketchApps;

            for (int i = 0; i < CLB_Poketch.Items.Count; i++)
            {
                CLB_Poketch.SetItemChecked(i, (ret & 1 << i) != 0);
            }

            DotArtistByte = SAV.PoketchDotArtist;
            ColorTable    = new byte[] { 248, 168, 88, 8 };
            setPictureBoxFromFlags(DotArtistByte);
            string tip = "Guide about D&D ImageFile Format";

            tip += Environment.NewLine + " width = 24px";
            tip += Environment.NewLine + " height = 20px";
            tip += Environment.NewLine + " used color count <= 4";
            tip += Environment.NewLine + " file size < 2058byte";
            tip1.SetToolTip(PB_DotArtist, tip);
            TAB_Main.AllowDrop = true;
        }
コード例 #3
0
 private void B_GiveAll_Click(object sender, EventArgs e)
 {
     // foreach (CheckBox c in Apps) c.Checked = true;
     for (int i = 0; i < CLB_Poketch.Items.Count; i++)
     {
         CLB_Poketch.SetItemChecked(i, true);
     }
 }
コード例 #4
0
ファイル: SAV_Misc4.cs プロジェクト: sutiam/PKHeX
 private void SavePoketch(SAV4Sinnoh s)
 {
     s.CurrentPoketchApp = (sbyte)CB_CurrentApp.SelectedIndex;
     for (int i = 0; i < CLB_Poketch.Items.Count; i++)
     {
         var b = CLB_Poketch.GetItemChecked(i);
         s.SetPoketchAppUnlocked((PoketchApp)i, b);
     }
     s.SetPoketchDotArtistData(DotArtistByte);
 }
コード例 #5
0
ファイル: SAV_Misc4.cs プロジェクト: Rocci1212/PKHeX
        private void savePoketch()
        {
            int ret = 0;

            for (int i = 0; i < CLB_Poketch.Items.Count; i++)
            {
                if (CLB_Poketch.GetItemChecked(i))
                {
                    ret |= 1 << i;
                }
            }

            SAV.PoketchApps      = ret;
            SAV.PoketchDotArtist = DotArtistByte;
        }