Beispiel #1
0
 private void buttonOk_Click(object sender, EventArgs e)
 {
     try
     {
         header2.PresetID = textBoxPresetID.UnsignedValue;
         header2.Chip     = textBoxExtra.UnsignedValue;
         game.WriteSfromHeader2(header2);
         Close();
     }
     catch (Exception ex)
     {
         Tasks.ErrorForm.Show(this, ex);
         Close();
     }
 }
 private void buttonOk_Click(object sender, EventArgs e)
 {
     try
     {
         var presetID = Convert.ToInt32(textBoxPresetID.Text, 16);
         presetID = ((presetID & 0xFF) << 8) | ((presetID >> 8) & 0xFF);
         var chip = Convert.ToInt32(textBoxExtra.Text, 16);
         header2.PresetID = (ushort)presetID;
         header2.Chip     = (uint)chip;
         game.WriteSfromHeader2(header2);
         Close();
     }
     catch (Exception ex)
     {
         Debug.WriteLine(ex.Message + ex.StackTrace);
         MessageBox.Show(this, ex.Message, Resources.Error, MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Beispiel #3
0
 private void buttonOk_Click(object sender, EventArgs e)
 {
     try
     {
         var presetID = Convert.ToInt32(textBoxPresetID.Text, 16);
         presetID = ((presetID & 0xFF) << 8) | ((presetID >> 8) & 0xFF);
         var chip = Convert.ToInt32(textBoxExtra.Text, 16);
         header2.PresetID = (ushort)presetID;
         header2.Chip     = (uint)chip;
         game.WriteSfromHeader2(header2);
         Close();
     }
     catch (Exception ex)
     {
         Tasks.ErrorForm.Show(this, ex);
         Close();
     }
 }