Esempio n. 1
0
 private void button2_Click(object sender, EventArgs e)
 {
     if (this.checkFields())
     {
         IsoEntryPadding padding = new IsoEntryPadding {
             Type     = (IsoEntryPaddingRemoval)((byte)this.cmbPaddingMode.SelectedIndex),
             TempPath = Path.GetTempPath(),
             IsoPath  = this.txtRebuiltIso.Text,
             KeepIso  = this.cbSaveRebuilt.Checked
         };
         if (!padding.TempPath.EndsWith(Path.DirectorySeparatorChar.ToString()))
         {
             padding.TempPath = padding.TempPath + Path.DirectorySeparatorChar;
         }
         if (!padding.IsoPath.EndsWith(Path.DirectorySeparatorChar.ToString()))
         {
             padding.IsoPath = padding.IsoPath + Path.DirectorySeparatorChar;
         }
         IsoEntryID iD    = new IsoEntryID(this.txtTitleID.Text, this.txtMediaID.Text, byte.Parse(this.txtDiscNum.Text), byte.Parse(this.txtDiscCount.Text), byte.Parse(this.txtPlatform.Text), byte.Parse(this.txtExType.Text));
         FileInfo   info  = new FileInfo(this.txtISO.Text);
         IsoEntry   entry = new IsoEntry(this.platform, this.txtISO.Text, this.txtDest.Text, info.Length, this.txtName.Text, iD, (byte[])this.pbThumb.Tag, padding);
         if (this.edit)
         {
             (base.Owner as Main).UpdateISOEntry(this.entryIndex, entry);
         }
         else
         {
             (base.Owner as Main).AddISOEntry(entry);
         }
         GC.Collect();
         base.Close();
     }
 }
Esempio n. 2
0
 public IsoEntry(IsoEntryPlatform Platform, string Path, string Destination, long Size, string TitleName, IsoEntryID ID, byte[] Thumb, IsoEntryPadding Padding)
 {
     this.Platform = Platform;
     this.Path = Path;
     this.Destination = Destination;
     this.Size = Size;
     this.TitleName = TitleName;
     this.Parts = 0;
     this.ID = ID;
     this.Status = IsoEntryStatus.Idle;
     this.Thumb = Thumb;
     this.Padding = Padding;
 }
Esempio n. 3
0
 public IsoEntry(IsoEntryPlatform Platform, string Path, string Destination, long Size, string TitleName, IsoEntryID ID, byte[] Thumb, IsoEntryPadding Padding)
 {
     this.Platform    = Platform;
     this.Path        = Path;
     this.Destination = Destination;
     this.Size        = Size;
     this.TitleName   = TitleName;
     this.Parts       = 0;
     this.ID          = ID;
     this.Status      = IsoEntryStatus.Idle;
     this.Thumb       = Thumb;
     this.Padding     = Padding;
 }
Esempio n. 4
0
 private void button2_Click(object sender, EventArgs e)
 {
     if (this.checkFields())
     {
         IsoEntryPadding padding = new IsoEntryPadding {
             Type = (IsoEntryPaddingRemoval) ((byte) this.cmbPaddingMode.SelectedIndex),
             TempPath = Path.GetTempPath(),
             IsoPath = this.txtRebuiltIso.Text,
             KeepIso = this.cbSaveRebuilt.Checked
         };
         if (!padding.TempPath.EndsWith(Path.DirectorySeparatorChar.ToString()))
         {
             padding.TempPath = padding.TempPath + Path.DirectorySeparatorChar;
         }
         if (!padding.IsoPath.EndsWith(Path.DirectorySeparatorChar.ToString()))
         {
             padding.IsoPath = padding.IsoPath + Path.DirectorySeparatorChar;
         }
         IsoEntryID iD = new IsoEntryID(this.txtTitleID.Text, this.txtMediaID.Text, byte.Parse(this.txtDiscNum.Text), byte.Parse(this.txtDiscCount.Text), byte.Parse(this.txtPlatform.Text), byte.Parse(this.txtExType.Text));
         FileInfo info = new FileInfo(this.txtISO.Text);
         IsoEntry entry = new IsoEntry(this.platform, this.txtISO.Text, this.txtDest.Text, info.Length, this.txtName.Text, iD, (byte[]) this.pbThumb.Tag, padding);
         if (this.edit)
         {
             (base.Owner as Main).UpdateISOEntry(this.entryIndex, entry);
         }
         else
         {
             (base.Owner as Main).AddISOEntry(entry);
         }
         GC.Collect();
         base.Close();
     }
 }