Esempio n. 1
0
        private void generateTimesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (dataGridViewCapValues.SelectedRows[0] != null)
            {
                var frame = (IFrameCapture) dataGridViewCapValues.SelectedRows[0].DataBoundItem;

                // This is a bit of a strange hack, because this window
                //  needs to be hidden before we load the seed to time
                //  form or it wont be able to be focused.
                bool showMap = HgSsRoamerSW.Window.Map.Visible;
                HgSsRoamerSW.Window.Hide();

                var seedToTime = new SeedToTime();

                //  Get the currently selected frame here so we can
                //  pull out some of the values that we are going to
                //  need to use.

                seedToTime.setBW();

                seedToTime.AutoGenerate = true;
                seedToTime.ShowMap = showMap;
                seedToTime.Seed = (uint) frame.Seed;
                seedToTime.MAC_Address = ((Profile) comboBoxProfiles.SelectedItem).MAC_Address;

                //  Grab this from what the user had searched on
                seedToTime.Year = (uint) DateTime.Now.Year;
                if (maskedTextBoxCapYear.Text != "")
                    seedToTime.Year = uint.Parse(maskedTextBoxCapYear.Text);

                seedToTime.Show();
            }
        }
Esempio n. 2
0
        private void generateTimesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (dgvResults.SelectedRows[0] != null)
            {
                var frame = (IDList) dgvResults.SelectedRows[0].DataBoundItem;

                // This is a bit of a strange hack, because this window
                //  needs to be hidden before we load the seed to time
                //  form or it wont be able to be focused.
                bool showMap = HgSsRoamerSW.Window.Map.Visible;
                HgSsRoamerSW.Window.Hide();

                var seedToTime = new SeedToTime();
                seedToTime.setDPPt();

                seedToTime.AutoGenerate = true;
                seedToTime.ShowMap = showMap;
                seedToTime.Seed = frame.Seed;

                //  Grab this from what the user had searched on
                seedToTime.Year = (uint) DateTime.Now.Year;

                seedToTime.Show();
            }
        }
Esempio n. 3
0
        private void generateTimeToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (dataGridViewShinyResults.SelectedRows[0] != null)
            {
                var frame = (IFrameEggPID) dataGridViewShinyResults.SelectedRows[0].DataBoundItem;

                // This is a bit of a strange hack, because this window
                //  needs to be hidden before we load the seed to time
                //  form or it wont be able to be focused.
                bool showMap = HgSsRoamerSW.Window.Map.Visible;
                HgSsRoamerSW.Window.Hide();

                var seedToTime = new SeedToTime();

                //  Get the currently selected frame here so we can
                //  pull out some of the values that we are going to
                //  need to use.

                seedToTime.setDPPt();
                seedToTime.AutoGenerate = true;
                seedToTime.ShowMap = showMap;
                seedToTime.Seed = frame.Seed;

                //  Grab this from what the user had searched on
                seedToTime.Year = uint.Parse(maskedTextBoxShinyYear.Text);

                seedToTime.Show();
            }
        }
Esempio n. 4
0
        private void toolStripSeparator2_Click(object sender, EventArgs e)
        {
            // This is a bit of a strange hack, because this window
            //  needs to be hidden before we load the seed to time
            //  form or it wont be able to be focused.
            bool showMap = HgSsRoamerSW.Window.Map.Visible;
            HgSsRoamerSW.Window.Hide();

            var seedToTime = new SeedToTime {sekrit = true, AutoGenerate = false, ShowMap = showMap, Seed = 0};

            if (textBoxSeed.Text != "")
            {
                string seedText = textBoxSeed.Text.Length > 8
                                      ? textBoxSeed.Text.Substring(0, textBoxSeed.Text.Length - 8)
                                      : textBoxSeed.Text;

                seedToTime.Seed = uint.Parse(seedText, NumberStyles.HexNumber);
            }

            //  Grab this from what the user had searched on
            seedToTime.Year = (uint) DateTime.Now.Year;

            seedToTime.ShowDialog();
        }