FirmwareConfig: Added 'allow unknown import' checkbox
This commit is contained in:
parent
35afeb2b3d
commit
84eea580c2
|
@ -55,13 +55,13 @@
|
|||
this.tbbClose = new System.Windows.Forms.ToolStripButton();
|
||||
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.tbbCloseReload = new System.Windows.Forms.ToolStripButton();
|
||||
this.tbbOpenFolder = new System.Windows.Forms.ToolStripButton();
|
||||
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.panel2 = new System.Windows.Forms.Panel();
|
||||
this.linkBasePath = new System.Windows.Forms.LinkLabel();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
|
||||
this.tbbOpenFolder = new System.Windows.Forms.ToolStripButton();
|
||||
this.lvFirmwaresContextMenuStrip.SuspendLayout();
|
||||
this.panel1.SuspendLayout();
|
||||
this.toolStrip1.SuspendLayout();
|
||||
|
@ -291,6 +291,16 @@
|
|||
this.tbbCloseReload.Visible = false;
|
||||
this.tbbCloseReload.Click += new System.EventHandler(this.tbbCloseReload_Click);
|
||||
//
|
||||
// tbbOpenFolder
|
||||
//
|
||||
this.tbbOpenFolder.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
|
||||
this.tbbOpenFolder.Image = ((System.Drawing.Image)(resources.GetObject("tbbOpenFolder.Image")));
|
||||
this.tbbOpenFolder.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.tbbOpenFolder.Name = "tbbOpenFolder";
|
||||
this.tbbOpenFolder.Size = new System.Drawing.Size(128, 22);
|
||||
this.tbbOpenFolder.Text = "Open Firmware Folder";
|
||||
this.tbbOpenFolder.Click += new System.EventHandler(this.tbbOpenFolder_Click);
|
||||
//
|
||||
// tableLayoutPanel1
|
||||
//
|
||||
this.tableLayoutPanel1.ColumnCount = 1;
|
||||
|
@ -351,16 +361,6 @@
|
|||
this.label2.TabIndex = 27;
|
||||
this.label2.Text = "Firmware such as BIOS files are copyrighted material and not provided by BizHawk";
|
||||
//
|
||||
// tbbOpenFolder
|
||||
//
|
||||
this.tbbOpenFolder.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
|
||||
this.tbbOpenFolder.Image = ((System.Drawing.Image)(resources.GetObject("tbbOpenFolder.Image")));
|
||||
this.tbbOpenFolder.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.tbbOpenFolder.Name = "tbbOpenFolder";
|
||||
this.tbbOpenFolder.Size = new System.Drawing.Size(128, 22);
|
||||
this.tbbOpenFolder.Text = "Open Firmware Folder";
|
||||
this.tbbOpenFolder.Click += new System.EventHandler(this.tbbOpenFolder_Click);
|
||||
//
|
||||
// FirmwaresConfig
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
|
|
|
@ -57,6 +57,8 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
public string TargetSystem = null;
|
||||
|
||||
private CheckBox cbAllowImport;
|
||||
|
||||
private const int idUnsure = 0;
|
||||
private const int idMissing = 1;
|
||||
private const int idOk = 2;
|
||||
|
@ -178,6 +180,18 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
|
||||
RefreshBasePath();
|
||||
|
||||
cbAllowImport = new CheckBox();
|
||||
cbAllowImport.Text = "Allow Importing of Unknown Files";
|
||||
//cbAllowImport.CheckStateChanged += (s, ex) => this.Text = cbAllowImport.CheckState.ToString();
|
||||
cbAllowImport.BackColor = Color.Transparent;
|
||||
cbAllowImport.CheckAlign = ContentAlignment.MiddleLeft;
|
||||
cbAllowImport.TextAlign = ContentAlignment.MiddleLeft;
|
||||
cbAllowImport.Font = new Font("Segeo UI", 9, FontStyle.Regular, GraphicsUnit.Point, 1, false);
|
||||
//cbAllowImport.AutoSize = false;
|
||||
ToolStripControlHost host = new ToolStripControlHost(cbAllowImport);
|
||||
var iCount = toolStrip1.Items.Count;
|
||||
toolStrip1.Items.Insert(iCount - 2, host);
|
||||
}
|
||||
|
||||
|
||||
|
@ -652,7 +666,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
File.WriteAllBytes(outfile, ms.ToArray());
|
||||
hf.Unbind();
|
||||
|
||||
if (Manager.CanFileBeImported(outfile))
|
||||
if (cbAllowImport.Checked || Manager.CanFileBeImported(outfile))
|
||||
{
|
||||
didSomething |= RunImportJobSingle(basepath, outfile, ref errors);
|
||||
}
|
||||
|
@ -665,7 +679,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
}
|
||||
else
|
||||
{
|
||||
if (Manager.CanFileBeImported(hf.CanonicalFullPath))
|
||||
if (cbAllowImport.Checked || Manager.CanFileBeImported(hf.CanonicalFullPath))
|
||||
{
|
||||
didSomething |= RunImportJobSingle(basepath, f, ref errors);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue