Exemplo n.º 1
0
 public SnesPresetEditor(SnesGame game)
 {
     InitializeComponent();
     try
     {
         wasCompressed = game.DecompressPossible().Count() > 0;
         if (wasCompressed)
         {
             game.Decompress();
         }
         this.game = game;
         header2   = game.ReadSfromHeader2();
         textBoxPresetID.UnsignedValue = header2.PresetID;
         textBoxExtra.UnsignedValue    = (byte)(header2.Chip);
     }
     catch (Exception ex)
     {
         Tasks.ErrorForm.Show(this, ex);
         Close();
     }
 }
Exemplo n.º 2
0
 public SnesPresetEditor(SnesGame game)
 {
     InitializeComponent();
     try
     {
         wasCompressed = game.DecompressPossible().Count() > 0;
         if (wasCompressed)
         {
             game.Decompress();
         }
         this.game            = game;
         header2              = game.ReadSfromHeader2();
         textBoxPresetID.Text = string.Format("{0:X2}{1:X2}", header2.PresetID & 0xFF, (header2.PresetID >> 8) & 0xFF);
         textBoxExtra.Text    = string.Format("{0:X2}", header2.Chip & 0xFF);
     }
     catch (Exception ex)
     {
         Tasks.ErrorForm.Show(this, ex);
         Close();
     }
 }
Exemplo n.º 3
0
 public SnesPresetEditor(SnesGame game)
 {
     InitializeComponent();
     try
     {
         wasCompressed = game.DecompressPossible().Count() > 0;
         if (wasCompressed)
         {
             game.Decompress();
         }
         this.game            = game;
         header2              = game.ReadSfromHeader2();
         textBoxPresetID.Text = string.Format("{0:X2}{1:X2}", header2.PresetID & 0xFF, (header2.PresetID >> 8) & 0xFF);
         textBoxExtra.Text    = string.Format("{0:X2}", header2.Chip & 0xFF);
     }
     catch (Exception ex)
     {
         Debug.WriteLine(ex.Message + ex.StackTrace);
         MessageBox.Show(this, ex.Message, Resources.Error, MessageBoxButtons.OK, MessageBoxIcon.Error);
         Close();
     }
 }