Ejemplo 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();
            }
        }
Ejemplo n.º 2
0
        private void seedToTimeCGearSeedsToolStripMenuItem_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 {AutoGenerate = false, ShowMap = showMap};

            seedToTime.setBW();

            seedToTime.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.Show();
        }