Beispiel #1
0
        private Boolean createROM()
        {
            // Make sure everything is filled out properly
            if (checkHash(downloadStationTextBox.Text) == false)
            {
                MessageBox.Show("You aren't using the correct DS Download Station ROM!", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
                return(false);
            }
            if (outputTextBox.Text == "")
            {
                MessageBox.Show("You did not assign a location for the patched ROM to be saved to!", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
                return(false);
            }
            if (romListBox.HasItems == false)
            {
                MessageBox.Show("You did not add any ROMs to include in the patched DS Download Station!", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
                return(false);
            }
            if (romListBox.Items.Count > 3)
            {
                MessageBox.Show("You added too many ROMs to include in the patched DS Download Station!", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
                return(false);
            }
            byte[] dsdata            = File.ReadAllBytes(downloadStationTextBox.Text);
            DownloadStationPatcher p = new DownloadStationPatcher(new NDS(dsdata));

            foreach (var r in romListBox.Items)
            {
                p.AddRom(new NDS(File.ReadAllBytes(r.ToString())));
            }
            byte[] finalResult = p.ProduceRom().Write();
            File.Create(outputTextBox.Text).Close();
            File.WriteAllBytes(outputTextBox.Text, finalResult);
            return(true);
        }
Beispiel #2
0
 private void HaxxStationBannerSave_click(object sender, RoutedEventArgs e)
 {
     DownloadStationPatcher.HaxxStationBanner(haxxStationTextBox.Text, haxxStationTextBox2.Text, haxxStationTextBox3.Text);
     if (!DownloadStationPatcher.title.Equals("HaxxStation") || !DownloadStationPatcher.subTitle1.Equals("By Gericom, shutterbug2000") || !DownloadStationPatcher.subTitle2.Equals("and Apache Thunder"))
     {
         MessageBox.Show("You have successfully changed the banner!", "Success", MessageBoxButton.OK, MessageBoxImage.Information);
     }
     else
     {
         MessageBox.Show("Something went wrong with changing the banner!", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
     }
 }
Beispiel #3
0
 private void HaxxStationTopSave_click(object sender, RoutedEventArgs e)
 {
     DownloadStationPatcher.HaxxStationTop(haxxStationTextBox.Text, haxxStationTextBox2.Text);
     if (!DownloadStationPatcher.cat.Equals("HaxxStation by Gericom,") || !DownloadStationPatcher.cat1.Equals("shutterbug2000, Apache Thunder"))
     {
         MessageBox.Show("You have successfully changed the Top Screen!", "Success", MessageBoxButton.OK, MessageBoxImage.Information);
     }
     else
     {
         MessageBox.Show("Something went wrong with changing the Top Screen!", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
     }
 }
Beispiel #4
0
        private void HaxxStationBannerSave_click(object sender, RoutedEventArgs e)
        {
            DownloadStationPatcher.HaxxStationBanner(haxxStationTextBox.Text, haxxStationTextBox2.Text, haxxStationTextBox3.Text);

            //Checks if characters were changed, far from fool-proof and would need to be made better. But it works for now.
            if (!DownloadStationPatcher.title.Equals("HaxxStation") || !DownloadStationPatcher.subTitle1.Equals("By Gericom, shutterbug2000") || !DownloadStationPatcher.subTitle2.Equals("and Apache Thunder"))
            {
                MessageBox.Show("You have successfully changed the banner!", "Success", MessageBoxButton.OK, MessageBoxImage.Information);
            }
            else
            {
                MessageBox.Show("Something went wrong with changing the banner!", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
            }
        }
Beispiel #5
0
 private void HaxxStationTopSave_click(object sender, RoutedEventArgs e)
 {
     // This is for checking if the change went through to the main code.
     //Terribly coded, but still functions. Might be leading to some part being inefficient.
     DownloadStationPatcher.HaxxStationTop(haxxStationTextBox.Text, haxxStationTextBox2.Text);
     if (!DownloadStationPatcher.top.Equals("HaxxStation by Gericom,") || !DownloadStationPatcher.top1.Equals("shutterbug2000, Apache Thunder"))
     {
         MessageBox.Show("You have successfully changed the Top Screen!", "Success", MessageBoxButton.OK, MessageBoxImage.Information);
     }
     else
     {
         MessageBox.Show("Something went wrong with changing the Top Screen!", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
     }
 }
 private void haxxStationhaxxStationNameSave_click(object sender, RoutedEventArgs e)
 {
     if (haxxStationTextBox.Equals("RC1 2006 01 25                  Gericom   HaxxStation                                                                                     By Gericom, shutterbug2000                                                                      and Apache Thunder          .                                                                   "))
     {
         DownloadStationPatcher.HaxxStationServerName(DownloadStationPatcher.haxxStationServer);
     }
     else
     {
         byte[] test = DownloadStationPatcher.haxxStationServer;
         DownloadStationPatcher.HaxxStationServerName(haxxStationTextBox.Text);
         if (!DownloadStationPatcher.haxxStationServer.Equals(test))
         {
             MessageBox.Show("You have successfully changed the internal name!", "Success", MessageBoxButton.OK, MessageBoxImage.Information);
         }
         else
         {
             MessageBox.Show("Something went wrong with changing the internal name!", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
         }
     }
 }