FirmwaresConfig: Stop indescriminate importing (and some other things) - #314
This commit is contained in:
parent
afc5d516b8
commit
a04ad91b2c
|
@ -126,7 +126,38 @@ namespace BizHawk.Client.Common
|
||||||
public Dictionary<string, RealFirmwareFile> Dict { get; } = new Dictionary<string, RealFirmwareFile>();
|
public Dictionary<string, RealFirmwareFile> Dict { get; } = new Dictionary<string, RealFirmwareFile>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void DoScanAndResolve()
|
/// <summary>
|
||||||
|
/// Test to determine whether the supplied firmware file matches something in the firmware database
|
||||||
|
/// For customization overrides then perhaps the user can copy into the firmware directory manually?
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="f"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public bool CanFileBeImported(string f)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var fi = new FileInfo(f);
|
||||||
|
if (!fi.Exists)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
// weed out filesizes first to reduce the unnecessary overhead of a hashing operation
|
||||||
|
if (FirmwareDatabase.FirmwareFiles.Where(a => a.Size == fi.Length).FirstOrDefault() == null)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
// check the hash
|
||||||
|
using (var reader = new RealFirmwareReader())
|
||||||
|
{
|
||||||
|
reader.Read(fi);
|
||||||
|
if (FirmwareDatabase.FirmwareFiles.Where(a => a.Hash == reader.Dict.FirstOrDefault().Value.Hash).FirstOrDefault() != null)
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch { }
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void DoScanAndResolve()
|
||||||
{
|
{
|
||||||
// build a list of file sizes. Only those will be checked during scanning
|
// build a list of file sizes. Only those will be checked during scanning
|
||||||
HashSet<long> sizes = new HashSet<long>();
|
HashSet<long> sizes = new HashSet<long>();
|
||||||
|
|
|
@ -28,56 +28,57 @@
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
this.components = new System.ComponentModel.Container();
|
this.components = new System.ComponentModel.Container();
|
||||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FirmwaresConfig));
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FirmwaresConfig));
|
||||||
this.imageList1 = new System.Windows.Forms.ImageList(this.components);
|
this.imageList1 = new System.Windows.Forms.ImageList(this.components);
|
||||||
this.lvFirmwares = new System.Windows.Forms.ListView();
|
this.lvFirmwares = new System.Windows.Forms.ListView();
|
||||||
this.columnHeader5 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
this.columnHeader5 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||||
this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||||
this.columnHeader6 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
this.columnHeader6 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||||
this.columnHeader4 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
this.columnHeader4 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||||
this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||||
this.columnHeader3 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
this.columnHeader3 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||||
this.columnHeader8 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
this.columnHeader8 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||||
this.columnHeader7 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
this.columnHeader7 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||||
this.lvFirmwaresContextMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components);
|
this.lvFirmwaresContextMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||||
this.tsmiSetCustomization = new System.Windows.Forms.ToolStripMenuItem();
|
this.tsmiSetCustomization = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.tsmiClearCustomization = new System.Windows.Forms.ToolStripMenuItem();
|
this.tsmiClearCustomization = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.tsmiInfo = new System.Windows.Forms.ToolStripMenuItem();
|
this.tsmiInfo = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.tsmiCopy = new System.Windows.Forms.ToolStripMenuItem();
|
this.tsmiCopy = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.panel1 = new System.Windows.Forms.Panel();
|
this.panel1 = new System.Windows.Forms.Panel();
|
||||||
this.toolStrip1 = new ToolStripEx();
|
this.toolStrip1 = new ToolStripEx();
|
||||||
this.tbbGroup = new System.Windows.Forms.ToolStripButton();
|
this.tbbGroup = new System.Windows.Forms.ToolStripButton();
|
||||||
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
|
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
|
||||||
this.tbbScan = new System.Windows.Forms.ToolStripButton();
|
this.tbbScan = new System.Windows.Forms.ToolStripButton();
|
||||||
this.tbbOrganize = new System.Windows.Forms.ToolStripButton();
|
this.tbbOrganize = new System.Windows.Forms.ToolStripButton();
|
||||||
this.tbbImport = new System.Windows.Forms.ToolStripButton();
|
this.tbbImport = new System.Windows.Forms.ToolStripButton();
|
||||||
this.tbbClose = new System.Windows.Forms.ToolStripButton();
|
this.tbbClose = new System.Windows.Forms.ToolStripButton();
|
||||||
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
|
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
|
||||||
this.tbbCloseReload = new System.Windows.Forms.ToolStripButton();
|
this.tbbCloseReload = new System.Windows.Forms.ToolStripButton();
|
||||||
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
|
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||||
this.panel2 = new System.Windows.Forms.Panel();
|
this.panel2 = new System.Windows.Forms.Panel();
|
||||||
this.linkBasePath = new System.Windows.Forms.LinkLabel();
|
this.linkBasePath = new System.Windows.Forms.LinkLabel();
|
||||||
this.label1 = new System.Windows.Forms.Label();
|
this.label1 = new System.Windows.Forms.Label();
|
||||||
this.label2 = new System.Windows.Forms.Label();
|
this.label2 = new System.Windows.Forms.Label();
|
||||||
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
|
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
|
||||||
this.lvFirmwaresContextMenuStrip.SuspendLayout();
|
this.tbbOpenFolder = new System.Windows.Forms.ToolStripButton();
|
||||||
this.panel1.SuspendLayout();
|
this.lvFirmwaresContextMenuStrip.SuspendLayout();
|
||||||
this.toolStrip1.SuspendLayout();
|
this.panel1.SuspendLayout();
|
||||||
this.tableLayoutPanel1.SuspendLayout();
|
this.toolStrip1.SuspendLayout();
|
||||||
this.panel2.SuspendLayout();
|
this.tableLayoutPanel1.SuspendLayout();
|
||||||
this.SuspendLayout();
|
this.panel2.SuspendLayout();
|
||||||
//
|
this.SuspendLayout();
|
||||||
// imageList1
|
//
|
||||||
//
|
// imageList1
|
||||||
this.imageList1.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit;
|
//
|
||||||
this.imageList1.ImageSize = new System.Drawing.Size(16, 16);
|
this.imageList1.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit;
|
||||||
this.imageList1.TransparentColor = System.Drawing.Color.Transparent;
|
this.imageList1.ImageSize = new System.Drawing.Size(16, 16);
|
||||||
//
|
this.imageList1.TransparentColor = System.Drawing.Color.Transparent;
|
||||||
// lvFirmwares
|
//
|
||||||
//
|
// lvFirmwares
|
||||||
this.lvFirmwares.AllowDrop = true;
|
//
|
||||||
this.lvFirmwares.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
|
this.lvFirmwares.AllowDrop = true;
|
||||||
|
this.lvFirmwares.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
|
||||||
this.columnHeader5,
|
this.columnHeader5,
|
||||||
this.columnHeader1,
|
this.columnHeader1,
|
||||||
this.columnHeader6,
|
this.columnHeader6,
|
||||||
|
@ -86,114 +87,114 @@
|
||||||
this.columnHeader3,
|
this.columnHeader3,
|
||||||
this.columnHeader8,
|
this.columnHeader8,
|
||||||
this.columnHeader7});
|
this.columnHeader7});
|
||||||
this.lvFirmwares.ContextMenuStrip = this.lvFirmwaresContextMenuStrip;
|
this.lvFirmwares.ContextMenuStrip = this.lvFirmwaresContextMenuStrip;
|
||||||
this.lvFirmwares.Dock = System.Windows.Forms.DockStyle.Fill;
|
this.lvFirmwares.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
this.lvFirmwares.FullRowSelect = true;
|
this.lvFirmwares.FullRowSelect = true;
|
||||||
this.lvFirmwares.GridLines = true;
|
this.lvFirmwares.GridLines = true;
|
||||||
this.lvFirmwares.Location = new System.Drawing.Point(0, 25);
|
this.lvFirmwares.Location = new System.Drawing.Point(0, 25);
|
||||||
this.lvFirmwares.Name = "lvFirmwares";
|
this.lvFirmwares.Name = "lvFirmwares";
|
||||||
this.lvFirmwares.ShowItemToolTips = true;
|
this.lvFirmwares.ShowItemToolTips = true;
|
||||||
this.lvFirmwares.Size = new System.Drawing.Size(824, 404);
|
this.lvFirmwares.Size = new System.Drawing.Size(824, 404);
|
||||||
this.lvFirmwares.SmallImageList = this.imageList1;
|
this.lvFirmwares.SmallImageList = this.imageList1;
|
||||||
this.lvFirmwares.TabIndex = 24;
|
this.lvFirmwares.TabIndex = 24;
|
||||||
this.lvFirmwares.UseCompatibleStateImageBehavior = false;
|
this.lvFirmwares.UseCompatibleStateImageBehavior = false;
|
||||||
this.lvFirmwares.View = System.Windows.Forms.View.Details;
|
this.lvFirmwares.View = System.Windows.Forms.View.Details;
|
||||||
this.lvFirmwares.ColumnClick += new System.Windows.Forms.ColumnClickEventHandler(this.lvFirmwares_ColumnClick);
|
this.lvFirmwares.ColumnClick += new System.Windows.Forms.ColumnClickEventHandler(this.lvFirmwares_ColumnClick);
|
||||||
this.lvFirmwares.DragDrop += new System.Windows.Forms.DragEventHandler(this.lvFirmwares_DragDrop);
|
this.lvFirmwares.DragDrop += new System.Windows.Forms.DragEventHandler(this.lvFirmwares_DragDrop);
|
||||||
this.lvFirmwares.DragEnter += new System.Windows.Forms.DragEventHandler(this.lvFirmwares_DragEnter);
|
this.lvFirmwares.DragEnter += new System.Windows.Forms.DragEventHandler(this.lvFirmwares_DragEnter);
|
||||||
this.lvFirmwares.KeyDown += new System.Windows.Forms.KeyEventHandler(this.lvFirmwares_KeyDown);
|
this.lvFirmwares.KeyDown += new System.Windows.Forms.KeyEventHandler(this.lvFirmwares_KeyDown);
|
||||||
this.lvFirmwares.MouseClick += new System.Windows.Forms.MouseEventHandler(this.lvFirmwares_MouseClick);
|
this.lvFirmwares.MouseClick += new System.Windows.Forms.MouseEventHandler(this.lvFirmwares_MouseClick);
|
||||||
//
|
//
|
||||||
// columnHeader5
|
// columnHeader5
|
||||||
//
|
//
|
||||||
this.columnHeader5.Text = "";
|
this.columnHeader5.Text = "";
|
||||||
this.columnHeader5.Width = 31;
|
this.columnHeader5.Width = 31;
|
||||||
//
|
//
|
||||||
// columnHeader1
|
// columnHeader1
|
||||||
//
|
//
|
||||||
this.columnHeader1.Text = "System";
|
this.columnHeader1.Text = "System";
|
||||||
//
|
//
|
||||||
// columnHeader6
|
// columnHeader6
|
||||||
//
|
//
|
||||||
this.columnHeader6.Text = "Id";
|
this.columnHeader6.Text = "Id";
|
||||||
//
|
//
|
||||||
// columnHeader4
|
// columnHeader4
|
||||||
//
|
//
|
||||||
this.columnHeader4.Text = "Description";
|
this.columnHeader4.Text = "Description";
|
||||||
this.columnHeader4.Width = 165;
|
this.columnHeader4.Width = 165;
|
||||||
//
|
//
|
||||||
// columnHeader2
|
// columnHeader2
|
||||||
//
|
//
|
||||||
this.columnHeader2.Text = "Resolved With";
|
this.columnHeader2.Text = "Resolved With";
|
||||||
this.columnHeader2.Width = 116;
|
this.columnHeader2.Width = 116;
|
||||||
//
|
//
|
||||||
// columnHeader3
|
// columnHeader3
|
||||||
//
|
//
|
||||||
this.columnHeader3.Text = "Location";
|
this.columnHeader3.Text = "Location";
|
||||||
this.columnHeader3.Width = 252;
|
this.columnHeader3.Width = 252;
|
||||||
//
|
//
|
||||||
// columnHeader8
|
// columnHeader8
|
||||||
//
|
//
|
||||||
this.columnHeader8.Text = "Size";
|
this.columnHeader8.Text = "Size";
|
||||||
//
|
//
|
||||||
// columnHeader7
|
// columnHeader7
|
||||||
//
|
//
|
||||||
this.columnHeader7.Text = "Hash";
|
this.columnHeader7.Text = "Hash";
|
||||||
this.columnHeader7.Width = 250;
|
this.columnHeader7.Width = 250;
|
||||||
//
|
//
|
||||||
// lvFirmwaresContextMenuStrip
|
// lvFirmwaresContextMenuStrip
|
||||||
//
|
//
|
||||||
this.lvFirmwaresContextMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
this.lvFirmwaresContextMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
this.tsmiSetCustomization,
|
this.tsmiSetCustomization,
|
||||||
this.tsmiClearCustomization,
|
this.tsmiClearCustomization,
|
||||||
this.tsmiInfo,
|
this.tsmiInfo,
|
||||||
this.tsmiCopy});
|
this.tsmiCopy});
|
||||||
this.lvFirmwaresContextMenuStrip.Name = "lvFirmwaresContextMenuStrip";
|
this.lvFirmwaresContextMenuStrip.Name = "lvFirmwaresContextMenuStrip";
|
||||||
this.lvFirmwaresContextMenuStrip.Size = new System.Drawing.Size(182, 92);
|
this.lvFirmwaresContextMenuStrip.Size = new System.Drawing.Size(182, 92);
|
||||||
this.lvFirmwaresContextMenuStrip.Opening += new System.ComponentModel.CancelEventHandler(this.lvFirmwaresContextMenuStrip_Opening);
|
this.lvFirmwaresContextMenuStrip.Opening += new System.ComponentModel.CancelEventHandler(this.lvFirmwaresContextMenuStrip_Opening);
|
||||||
//
|
//
|
||||||
// tsmiSetCustomization
|
// tsmiSetCustomization
|
||||||
//
|
//
|
||||||
this.tsmiSetCustomization.Name = "tsmiSetCustomization";
|
this.tsmiSetCustomization.Name = "tsmiSetCustomization";
|
||||||
this.tsmiSetCustomization.Size = new System.Drawing.Size(181, 22);
|
this.tsmiSetCustomization.Size = new System.Drawing.Size(181, 22);
|
||||||
this.tsmiSetCustomization.Text = "&Set Customization";
|
this.tsmiSetCustomization.Text = "&Set Customization";
|
||||||
this.tsmiSetCustomization.Click += new System.EventHandler(this.tsmiSetCustomization_Click);
|
this.tsmiSetCustomization.Click += new System.EventHandler(this.tsmiSetCustomization_Click);
|
||||||
//
|
//
|
||||||
// tsmiClearCustomization
|
// tsmiClearCustomization
|
||||||
//
|
//
|
||||||
this.tsmiClearCustomization.Name = "tsmiClearCustomization";
|
this.tsmiClearCustomization.Name = "tsmiClearCustomization";
|
||||||
this.tsmiClearCustomization.Size = new System.Drawing.Size(181, 22);
|
this.tsmiClearCustomization.Size = new System.Drawing.Size(181, 22);
|
||||||
this.tsmiClearCustomization.Text = "C&lear Customization";
|
this.tsmiClearCustomization.Text = "C&lear Customization";
|
||||||
this.tsmiClearCustomization.Click += new System.EventHandler(this.tsmiClearCustomization_Click);
|
this.tsmiClearCustomization.Click += new System.EventHandler(this.tsmiClearCustomization_Click);
|
||||||
//
|
//
|
||||||
// tsmiInfo
|
// tsmiInfo
|
||||||
//
|
//
|
||||||
this.tsmiInfo.Name = "tsmiInfo";
|
this.tsmiInfo.Name = "tsmiInfo";
|
||||||
this.tsmiInfo.Size = new System.Drawing.Size(181, 22);
|
this.tsmiInfo.Size = new System.Drawing.Size(181, 22);
|
||||||
this.tsmiInfo.Text = "&Info";
|
this.tsmiInfo.Text = "&Info";
|
||||||
this.tsmiInfo.Click += new System.EventHandler(this.tsmiInfo_Click);
|
this.tsmiInfo.Click += new System.EventHandler(this.tsmiInfo_Click);
|
||||||
//
|
//
|
||||||
// tsmiCopy
|
// tsmiCopy
|
||||||
//
|
//
|
||||||
this.tsmiCopy.Name = "tsmiCopy";
|
this.tsmiCopy.Name = "tsmiCopy";
|
||||||
this.tsmiCopy.Size = new System.Drawing.Size(181, 22);
|
this.tsmiCopy.Size = new System.Drawing.Size(181, 22);
|
||||||
this.tsmiCopy.Text = "&Copy";
|
this.tsmiCopy.Text = "&Copy";
|
||||||
this.tsmiCopy.Click += new System.EventHandler(this.tsmiCopy_Click);
|
this.tsmiCopy.Click += new System.EventHandler(this.tsmiCopy_Click);
|
||||||
//
|
//
|
||||||
// panel1
|
// panel1
|
||||||
//
|
//
|
||||||
this.panel1.Controls.Add(this.lvFirmwares);
|
this.panel1.Controls.Add(this.lvFirmwares);
|
||||||
this.panel1.Controls.Add(this.toolStrip1);
|
this.panel1.Controls.Add(this.toolStrip1);
|
||||||
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
this.panel1.Location = new System.Drawing.Point(3, 23);
|
this.panel1.Location = new System.Drawing.Point(3, 23);
|
||||||
this.panel1.Name = "panel1";
|
this.panel1.Name = "panel1";
|
||||||
this.panel1.Size = new System.Drawing.Size(824, 429);
|
this.panel1.Size = new System.Drawing.Size(824, 429);
|
||||||
this.panel1.TabIndex = 24;
|
this.panel1.TabIndex = 24;
|
||||||
//
|
//
|
||||||
// toolStrip1
|
// toolStrip1
|
||||||
//
|
//
|
||||||
this.toolStrip1.ClickThrough = true;
|
this.toolStrip1.ClickThrough = true;
|
||||||
this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
this.tbbGroup,
|
this.tbbGroup,
|
||||||
this.toolStripSeparator2,
|
this.toolStripSeparator2,
|
||||||
this.tbbScan,
|
this.tbbScan,
|
||||||
|
@ -201,176 +202,187 @@
|
||||||
this.tbbImport,
|
this.tbbImport,
|
||||||
this.tbbClose,
|
this.tbbClose,
|
||||||
this.toolStripSeparator1,
|
this.toolStripSeparator1,
|
||||||
this.tbbCloseReload});
|
this.tbbCloseReload,
|
||||||
this.toolStrip1.Location = new System.Drawing.Point(0, 0);
|
this.tbbOpenFolder});
|
||||||
this.toolStrip1.Name = "toolStrip1";
|
this.toolStrip1.Location = new System.Drawing.Point(0, 0);
|
||||||
this.toolStrip1.Size = new System.Drawing.Size(824, 25);
|
this.toolStrip1.Name = "toolStrip1";
|
||||||
this.toolStrip1.TabIndex = 23;
|
this.toolStrip1.Size = new System.Drawing.Size(824, 25);
|
||||||
this.toolStrip1.Text = "toolStrip1";
|
this.toolStrip1.TabIndex = 23;
|
||||||
//
|
this.toolStrip1.Text = "toolStrip1";
|
||||||
// tbbGroup
|
//
|
||||||
//
|
// tbbGroup
|
||||||
this.tbbGroup.Checked = true;
|
//
|
||||||
this.tbbGroup.CheckOnClick = true;
|
this.tbbGroup.Checked = true;
|
||||||
this.tbbGroup.CheckState = System.Windows.Forms.CheckState.Checked;
|
this.tbbGroup.CheckOnClick = true;
|
||||||
this.tbbGroup.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
|
this.tbbGroup.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||||
this.tbbGroup.Image = ((System.Drawing.Image)(resources.GetObject("tbbGroup.Image")));
|
this.tbbGroup.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
|
||||||
this.tbbGroup.ImageTransparentColor = System.Drawing.Color.Magenta;
|
this.tbbGroup.Image = ((System.Drawing.Image)(resources.GetObject("tbbGroup.Image")));
|
||||||
this.tbbGroup.Name = "tbbGroup";
|
this.tbbGroup.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||||
this.tbbGroup.Size = new System.Drawing.Size(44, 22);
|
this.tbbGroup.Name = "tbbGroup";
|
||||||
this.tbbGroup.Text = "Group";
|
this.tbbGroup.Size = new System.Drawing.Size(44, 22);
|
||||||
this.tbbGroup.Click += new System.EventHandler(this.tbbGroup_Click);
|
this.tbbGroup.Text = "Group";
|
||||||
//
|
this.tbbGroup.Click += new System.EventHandler(this.tbbGroup_Click);
|
||||||
// toolStripSeparator2
|
//
|
||||||
//
|
// toolStripSeparator2
|
||||||
this.toolStripSeparator2.Name = "toolStripSeparator2";
|
//
|
||||||
this.toolStripSeparator2.Size = new System.Drawing.Size(6, 25);
|
this.toolStripSeparator2.Name = "toolStripSeparator2";
|
||||||
//
|
this.toolStripSeparator2.Size = new System.Drawing.Size(6, 25);
|
||||||
// tbbScan
|
//
|
||||||
//
|
// tbbScan
|
||||||
this.tbbScan.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
|
//
|
||||||
this.tbbScan.Image = ((System.Drawing.Image)(resources.GetObject("tbbScan.Image")));
|
this.tbbScan.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
|
||||||
this.tbbScan.ImageTransparentColor = System.Drawing.Color.Magenta;
|
this.tbbScan.Image = ((System.Drawing.Image)(resources.GetObject("tbbScan.Image")));
|
||||||
this.tbbScan.Name = "tbbScan";
|
this.tbbScan.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||||
this.tbbScan.Size = new System.Drawing.Size(36, 22);
|
this.tbbScan.Name = "tbbScan";
|
||||||
this.tbbScan.Text = "Scan";
|
this.tbbScan.Size = new System.Drawing.Size(36, 22);
|
||||||
this.tbbScan.Click += new System.EventHandler(this.tbbScan_Click);
|
this.tbbScan.Text = "Scan";
|
||||||
//
|
this.tbbScan.Click += new System.EventHandler(this.tbbScan_Click);
|
||||||
// tbbOrganize
|
//
|
||||||
//
|
// tbbOrganize
|
||||||
this.tbbOrganize.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
|
//
|
||||||
this.tbbOrganize.Image = ((System.Drawing.Image)(resources.GetObject("tbbOrganize.Image")));
|
this.tbbOrganize.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
|
||||||
this.tbbOrganize.ImageTransparentColor = System.Drawing.Color.Magenta;
|
this.tbbOrganize.Image = ((System.Drawing.Image)(resources.GetObject("tbbOrganize.Image")));
|
||||||
this.tbbOrganize.Name = "tbbOrganize";
|
this.tbbOrganize.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||||
this.tbbOrganize.Size = new System.Drawing.Size(58, 22);
|
this.tbbOrganize.Name = "tbbOrganize";
|
||||||
this.tbbOrganize.Text = "Organize";
|
this.tbbOrganize.Size = new System.Drawing.Size(58, 22);
|
||||||
this.tbbOrganize.Click += new System.EventHandler(this.tbbOrganize_Click);
|
this.tbbOrganize.Text = "Organize";
|
||||||
//
|
this.tbbOrganize.Click += new System.EventHandler(this.tbbOrganize_Click);
|
||||||
// tbbImport
|
//
|
||||||
//
|
// tbbImport
|
||||||
this.tbbImport.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
|
//
|
||||||
this.tbbImport.Image = ((System.Drawing.Image)(resources.GetObject("tbbImport.Image")));
|
this.tbbImport.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
|
||||||
this.tbbImport.ImageTransparentColor = System.Drawing.Color.Magenta;
|
this.tbbImport.Image = ((System.Drawing.Image)(resources.GetObject("tbbImport.Image")));
|
||||||
this.tbbImport.Name = "tbbImport";
|
this.tbbImport.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||||
this.tbbImport.Size = new System.Drawing.Size(47, 22);
|
this.tbbImport.Name = "tbbImport";
|
||||||
this.tbbImport.Text = "Import";
|
this.tbbImport.Size = new System.Drawing.Size(47, 22);
|
||||||
this.tbbImport.Click += new System.EventHandler(this.tbbImport_Click);
|
this.tbbImport.Text = "Import";
|
||||||
//
|
this.tbbImport.Click += new System.EventHandler(this.tbbImport_Click);
|
||||||
// tbbClose
|
//
|
||||||
//
|
// tbbClose
|
||||||
this.tbbClose.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;
|
//
|
||||||
this.tbbClose.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
|
this.tbbClose.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;
|
||||||
this.tbbClose.Image = ((System.Drawing.Image)(resources.GetObject("tbbClose.Image")));
|
this.tbbClose.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
|
||||||
this.tbbClose.ImageTransparentColor = System.Drawing.Color.Magenta;
|
this.tbbClose.Image = ((System.Drawing.Image)(resources.GetObject("tbbClose.Image")));
|
||||||
this.tbbClose.Margin = new System.Windows.Forms.Padding(0, 1, 2, 2);
|
this.tbbClose.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||||
this.tbbClose.Name = "tbbClose";
|
this.tbbClose.Margin = new System.Windows.Forms.Padding(0, 1, 2, 2);
|
||||||
this.tbbClose.Size = new System.Drawing.Size(40, 22);
|
this.tbbClose.Name = "tbbClose";
|
||||||
this.tbbClose.Text = "Close";
|
this.tbbClose.Size = new System.Drawing.Size(40, 22);
|
||||||
this.tbbClose.Click += new System.EventHandler(this.tbbClose_Click);
|
this.tbbClose.Text = "Close";
|
||||||
//
|
this.tbbClose.Click += new System.EventHandler(this.tbbClose_Click);
|
||||||
// toolStripSeparator1
|
//
|
||||||
//
|
// toolStripSeparator1
|
||||||
this.toolStripSeparator1.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;
|
//
|
||||||
this.toolStripSeparator1.Name = "toolStripSeparator1";
|
this.toolStripSeparator1.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;
|
||||||
this.toolStripSeparator1.Size = new System.Drawing.Size(6, 25);
|
this.toolStripSeparator1.Name = "toolStripSeparator1";
|
||||||
this.toolStripSeparator1.Visible = false;
|
this.toolStripSeparator1.Size = new System.Drawing.Size(6, 25);
|
||||||
//
|
this.toolStripSeparator1.Visible = false;
|
||||||
// tbbCloseReload
|
//
|
||||||
//
|
// tbbCloseReload
|
||||||
this.tbbCloseReload.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;
|
//
|
||||||
this.tbbCloseReload.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
|
this.tbbCloseReload.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;
|
||||||
this.tbbCloseReload.Enabled = false;
|
this.tbbCloseReload.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
|
||||||
this.tbbCloseReload.Image = ((System.Drawing.Image)(resources.GetObject("tbbCloseReload.Image")));
|
this.tbbCloseReload.Enabled = false;
|
||||||
this.tbbCloseReload.ImageTransparentColor = System.Drawing.Color.Magenta;
|
this.tbbCloseReload.Image = ((System.Drawing.Image)(resources.GetObject("tbbCloseReload.Image")));
|
||||||
this.tbbCloseReload.Name = "tbbCloseReload";
|
this.tbbCloseReload.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||||
this.tbbCloseReload.Size = new System.Drawing.Size(129, 22);
|
this.tbbCloseReload.Name = "tbbCloseReload";
|
||||||
this.tbbCloseReload.Text = "Close and reload ROM";
|
this.tbbCloseReload.Size = new System.Drawing.Size(129, 22);
|
||||||
this.tbbCloseReload.ToolTipText = "Close and reload ROM";
|
this.tbbCloseReload.Text = "Close and reload ROM";
|
||||||
this.tbbCloseReload.Visible = false;
|
this.tbbCloseReload.ToolTipText = "Close and reload ROM";
|
||||||
this.tbbCloseReload.Click += new System.EventHandler(this.tbbCloseReload_Click);
|
this.tbbCloseReload.Visible = false;
|
||||||
//
|
this.tbbCloseReload.Click += new System.EventHandler(this.tbbCloseReload_Click);
|
||||||
// tableLayoutPanel1
|
//
|
||||||
//
|
// tableLayoutPanel1
|
||||||
this.tableLayoutPanel1.ColumnCount = 1;
|
//
|
||||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
this.tableLayoutPanel1.ColumnCount = 1;
|
||||||
this.tableLayoutPanel1.Controls.Add(this.panel1, 0, 1);
|
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||||
this.tableLayoutPanel1.Controls.Add(this.panel2, 0, 2);
|
this.tableLayoutPanel1.Controls.Add(this.panel1, 0, 1);
|
||||||
this.tableLayoutPanel1.Controls.Add(this.label2, 0, 0);
|
this.tableLayoutPanel1.Controls.Add(this.panel2, 0, 2);
|
||||||
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
this.tableLayoutPanel1.Controls.Add(this.label2, 0, 0);
|
||||||
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
|
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
|
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
|
||||||
this.tableLayoutPanel1.RowCount = 3;
|
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
|
||||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
|
this.tableLayoutPanel1.RowCount = 3;
|
||||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
|
||||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||||
this.tableLayoutPanel1.Size = new System.Drawing.Size(830, 478);
|
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||||
this.tableLayoutPanel1.TabIndex = 25;
|
this.tableLayoutPanel1.Size = new System.Drawing.Size(830, 478);
|
||||||
//
|
this.tableLayoutPanel1.TabIndex = 25;
|
||||||
// panel2
|
//
|
||||||
//
|
// panel2
|
||||||
this.panel2.AutoSize = true;
|
//
|
||||||
this.panel2.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
this.panel2.AutoSize = true;
|
||||||
this.panel2.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
this.panel2.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||||
this.panel2.Controls.Add(this.linkBasePath);
|
this.panel2.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||||
this.panel2.Controls.Add(this.label1);
|
this.panel2.Controls.Add(this.linkBasePath);
|
||||||
this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
|
this.panel2.Controls.Add(this.label1);
|
||||||
this.panel2.Location = new System.Drawing.Point(3, 458);
|
this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
this.panel2.Name = "panel2";
|
this.panel2.Location = new System.Drawing.Point(3, 458);
|
||||||
this.panel2.Size = new System.Drawing.Size(824, 17);
|
this.panel2.Name = "panel2";
|
||||||
this.panel2.TabIndex = 26;
|
this.panel2.Size = new System.Drawing.Size(824, 17);
|
||||||
//
|
this.panel2.TabIndex = 26;
|
||||||
// linkBasePath
|
//
|
||||||
//
|
// linkBasePath
|
||||||
this.linkBasePath.AutoSize = true;
|
//
|
||||||
this.linkBasePath.Location = new System.Drawing.Point(125, 0);
|
this.linkBasePath.AutoSize = true;
|
||||||
this.linkBasePath.Name = "linkBasePath";
|
this.linkBasePath.Location = new System.Drawing.Point(125, 0);
|
||||||
this.linkBasePath.Size = new System.Drawing.Size(55, 13);
|
this.linkBasePath.Name = "linkBasePath";
|
||||||
this.linkBasePath.TabIndex = 27;
|
this.linkBasePath.Size = new System.Drawing.Size(55, 13);
|
||||||
this.linkBasePath.TabStop = true;
|
this.linkBasePath.TabIndex = 27;
|
||||||
this.linkBasePath.Text = "linkLabel1";
|
this.linkBasePath.TabStop = true;
|
||||||
this.linkBasePath.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkBasePath_LinkClicked);
|
this.linkBasePath.Text = "linkLabel1";
|
||||||
//
|
this.linkBasePath.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkBasePath_LinkClicked);
|
||||||
// label1
|
//
|
||||||
//
|
// label1
|
||||||
this.label1.AutoSize = true;
|
//
|
||||||
this.label1.Location = new System.Drawing.Point(3, 0);
|
this.label1.AutoSize = true;
|
||||||
this.label1.Name = "label1";
|
this.label1.Location = new System.Drawing.Point(3, 0);
|
||||||
this.label1.Size = new System.Drawing.Size(119, 13);
|
this.label1.Name = "label1";
|
||||||
this.label1.TabIndex = 25;
|
this.label1.Size = new System.Drawing.Size(119, 13);
|
||||||
this.label1.Text = "Firmwares Search Path:";
|
this.label1.TabIndex = 25;
|
||||||
//
|
this.label1.Text = "Firmwares Search Path:";
|
||||||
// label2
|
//
|
||||||
//
|
// label2
|
||||||
this.label2.AutoSize = true;
|
//
|
||||||
this.label2.Location = new System.Drawing.Point(5, 5);
|
this.label2.AutoSize = true;
|
||||||
this.label2.Margin = new System.Windows.Forms.Padding(5, 5, 3, 0);
|
this.label2.Location = new System.Drawing.Point(5, 5);
|
||||||
this.label2.Name = "label2";
|
this.label2.Margin = new System.Windows.Forms.Padding(5, 5, 3, 0);
|
||||||
this.label2.Size = new System.Drawing.Size(383, 13);
|
this.label2.Name = "label2";
|
||||||
this.label2.TabIndex = 27;
|
this.label2.Size = new System.Drawing.Size(395, 13);
|
||||||
this.label2.Text = "Firmware such as BIOS files are copyrighted material and not provided by BizHawk";
|
this.label2.TabIndex = 27;
|
||||||
//
|
this.label2.Text = "Firmware such as BIOS files are copyrighted material and not provided by BizHawk";
|
||||||
// FirmwaresConfig
|
//
|
||||||
//
|
// tbbOpenFolder
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
//
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.tbbOpenFolder.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
|
||||||
this.ClientSize = new System.Drawing.Size(830, 478);
|
this.tbbOpenFolder.Image = ((System.Drawing.Image)(resources.GetObject("tbbOpenFolder.Image")));
|
||||||
this.Controls.Add(this.tableLayoutPanel1);
|
this.tbbOpenFolder.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||||
this.Name = "FirmwaresConfig";
|
this.tbbOpenFolder.Name = "tbbOpenFolder";
|
||||||
this.ShowIcon = false;
|
this.tbbOpenFolder.Size = new System.Drawing.Size(128, 22);
|
||||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
this.tbbOpenFolder.Text = "Open Firmware Folder";
|
||||||
this.Text = "Firmwares";
|
this.tbbOpenFolder.Click += new System.EventHandler(this.tbbOpenFolder_Click);
|
||||||
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.FirmwaresConfig_FormClosed);
|
//
|
||||||
this.Load += new System.EventHandler(this.FirmwaresConfig_Load);
|
// FirmwaresConfig
|
||||||
this.lvFirmwaresContextMenuStrip.ResumeLayout(false);
|
//
|
||||||
this.panel1.ResumeLayout(false);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
this.panel1.PerformLayout();
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
this.toolStrip1.ResumeLayout(false);
|
this.ClientSize = new System.Drawing.Size(830, 478);
|
||||||
this.toolStrip1.PerformLayout();
|
this.Controls.Add(this.tableLayoutPanel1);
|
||||||
this.tableLayoutPanel1.ResumeLayout(false);
|
this.Name = "FirmwaresConfig";
|
||||||
this.tableLayoutPanel1.PerformLayout();
|
this.ShowIcon = false;
|
||||||
this.panel2.ResumeLayout(false);
|
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||||
this.panel2.PerformLayout();
|
this.Text = "Firmwares";
|
||||||
this.ResumeLayout(false);
|
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.FirmwaresConfig_FormClosed);
|
||||||
|
this.Load += new System.EventHandler(this.FirmwaresConfig_Load);
|
||||||
|
this.lvFirmwaresContextMenuStrip.ResumeLayout(false);
|
||||||
|
this.panel1.ResumeLayout(false);
|
||||||
|
this.panel1.PerformLayout();
|
||||||
|
this.toolStrip1.ResumeLayout(false);
|
||||||
|
this.toolStrip1.PerformLayout();
|
||||||
|
this.tableLayoutPanel1.ResumeLayout(false);
|
||||||
|
this.tableLayoutPanel1.PerformLayout();
|
||||||
|
this.panel2.ResumeLayout(false);
|
||||||
|
this.panel2.PerformLayout();
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -407,5 +419,6 @@
|
||||||
private System.Windows.Forms.ToolStripButton tbbCloseReload;
|
private System.Windows.Forms.ToolStripButton tbbCloseReload;
|
||||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
|
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
|
||||||
private System.Windows.Forms.Label label2;
|
private System.Windows.Forms.Label label2;
|
||||||
}
|
private System.Windows.Forms.ToolStripButton tbbOpenFolder;
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -341,7 +341,13 @@ namespace BizHawk.Client.EmuHawk
|
||||||
DoScan();
|
DoScan();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void lvFirmwares_KeyDown(object sender, KeyEventArgs e)
|
private void tbbOpenFolder_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
var frmWares = PathManager.MakeAbsolutePath(Global.Config.PathEntries.FirmwaresPathFragment, null);
|
||||||
|
System.Diagnostics.Process.Start(frmWares);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void lvFirmwares_KeyDown(object sender, KeyEventArgs e)
|
||||||
{
|
{
|
||||||
if (e.KeyCode == Keys.C && e.Control && !e.Alt && !e.Shift)
|
if (e.KeyCode == Keys.C && e.Control && !e.Alt && !e.Shift)
|
||||||
{
|
{
|
||||||
|
@ -367,8 +373,9 @@ namespace BizHawk.Client.EmuHawk
|
||||||
{
|
{
|
||||||
ofd.InitialDirectory = currSelectorDir;
|
ofd.InitialDirectory = currSelectorDir;
|
||||||
ofd.RestoreDirectory = true;
|
ofd.RestoreDirectory = true;
|
||||||
|
string frmwarePath = PathManager.MakeAbsolutePath(Global.Config.PathEntries.FirmwaresPathFragment, null);
|
||||||
|
|
||||||
if (ofd.ShowDialog() == DialogResult.OK)
|
if (ofd.ShowDialog() == DialogResult.OK)
|
||||||
{
|
{
|
||||||
// remember the location we selected this firmware from, maybe there are others
|
// remember the location we selected this firmware from, maybe there are others
|
||||||
currSelectorDir = Path.GetDirectoryName(ofd.FileName);
|
currSelectorDir = Path.GetDirectoryName(ofd.FileName);
|
||||||
|
@ -377,7 +384,29 @@ namespace BizHawk.Client.EmuHawk
|
||||||
foreach (ListViewItem lvi in lvFirmwares.SelectedItems)
|
foreach (ListViewItem lvi in lvFirmwares.SelectedItems)
|
||||||
{
|
{
|
||||||
var fr = lvi.Tag as FirmwareDatabase.FirmwareRecord;
|
var fr = lvi.Tag as FirmwareDatabase.FirmwareRecord;
|
||||||
Global.Config.FirmwareUserSpecifications[fr.ConfigKey] = ofd.FileName;
|
string filePath = ofd.FileName;
|
||||||
|
|
||||||
|
// check whether this file is currently outside of the global firmware directory
|
||||||
|
if (currSelectorDir != frmwarePath)
|
||||||
|
{
|
||||||
|
var askMoveResult = MessageBox.Show(this, "The selected custom firmware does not reside in the root of the global firmware directory.\nDo you want to copy it there?", "Import Custom Firmware", MessageBoxButtons.YesNo);
|
||||||
|
if (askMoveResult == DialogResult.Yes)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
FileInfo fi = new FileInfo(filePath);
|
||||||
|
filePath = Path.Combine(frmwarePath, fi.Name);
|
||||||
|
File.Copy(ofd.FileName, filePath);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
MessageBox.Show(this, "There was an issue copying the file. The customization has NOT been set.\n\n" + ex.StackTrace);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Global.Config.FirmwareUserSpecifications[fr.ConfigKey] = filePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
DoScan();
|
DoScan();
|
||||||
|
@ -584,7 +613,11 @@ namespace BizHawk.Client.EmuHawk
|
||||||
outfile = Path.Combine(extractpath, myname);
|
outfile = Path.Combine(extractpath, myname);
|
||||||
File.WriteAllBytes(outfile, ms.ToArray());
|
File.WriteAllBytes(outfile, ms.ToArray());
|
||||||
hf.Unbind();
|
hf.Unbind();
|
||||||
didSomething |= RunImportJobSingle(basepath, outfile, ref errors);
|
|
||||||
|
if (Manager.CanFileBeImported(outfile))
|
||||||
|
{
|
||||||
|
didSomething |= RunImportJobSingle(basepath, outfile, ref errors);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
|
@ -594,7 +627,10 @@ namespace BizHawk.Client.EmuHawk
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
didSomething |= RunImportJobSingle(basepath, f, ref errors);
|
if (Manager.CanFileBeImported(hf.CanonicalFullPath))
|
||||||
|
{
|
||||||
|
didSomething |= RunImportJobSingle(basepath, f, ref errors);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -621,7 +657,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
return base.ProcessCmdKey(ref msg, keyData);
|
return base.ProcessCmdKey(ref msg, keyData);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void lvFirmwares_DragEnter(object sender, DragEventArgs e)
|
private void lvFirmwares_DragEnter(object sender, DragEventArgs e)
|
||||||
{
|
{
|
||||||
e.Effect = e.Data.GetDataPresent(DataFormats.FileDrop) ? DragDropEffects.Copy : DragDropEffects.None;
|
e.Effect = e.Data.GetDataPresent(DataFormats.FileDrop) ? DragDropEffects.Copy : DragDropEffects.None;
|
||||||
}
|
}
|
||||||
|
|
|
@ -215,6 +215,21 @@
|
||||||
mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+
|
mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+
|
||||||
kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D
|
kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D
|
||||||
TgDQASA1MVpwzwAAAABJRU5ErkJggg==
|
TgDQASA1MVpwzwAAAABJRU5ErkJggg==
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
|
<data name="tbbOpenFolder.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>
|
||||||
|
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||||
|
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
|
||||||
|
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
|
||||||
|
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
|
||||||
|
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
|
||||||
|
VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9
|
||||||
|
c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32
|
||||||
|
Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo
|
||||||
|
mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+
|
||||||
|
kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D
|
||||||
|
TgDQASA1MVpwzwAAAABJRU5ErkJggg==
|
||||||
</value>
|
</value>
|
||||||
</data>
|
</data>
|
||||||
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
|
Loading…
Reference in New Issue