Archive Chooser - restore double-click selection (weird that I had to do it this way), and resize some things

This commit is contained in:
adelikat 2014-01-16 02:38:27 +00:00
parent f669279cae
commit dcde99d1e1
2 changed files with 253 additions and 248 deletions

View File

@ -55,7 +55,7 @@
this.flowLayoutPanel1.Controls.Add(this.btnOK); this.flowLayoutPanel1.Controls.Add(this.btnOK);
this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Bottom; this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Bottom;
this.flowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.RightToLeft; this.flowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.RightToLeft;
this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 276); this.flowLayoutPanel1.Location = new System.Drawing.Point(0, 317);
this.flowLayoutPanel1.Name = "flowLayoutPanel1"; this.flowLayoutPanel1.Name = "flowLayoutPanel1";
this.flowLayoutPanel1.Size = new System.Drawing.Size(472, 29); this.flowLayoutPanel1.Size = new System.Drawing.Size(472, 29);
this.flowLayoutPanel1.TabIndex = 1; this.flowLayoutPanel1.TabIndex = 1;
@ -93,7 +93,7 @@
this.tableLayoutPanel1.RowCount = 2; this.tableLayoutPanel1.RowCount = 2;
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.Percent, 100F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.Size = new System.Drawing.Size(472, 276); this.tableLayoutPanel1.Size = new System.Drawing.Size(472, 317);
this.tableLayoutPanel1.TabIndex = 0; this.tableLayoutPanel1.TabIndex = 0;
// //
// lvMembers // lvMembers
@ -107,10 +107,11 @@
this.lvMembers.Location = new System.Drawing.Point(3, 3); this.lvMembers.Location = new System.Drawing.Point(3, 3);
this.lvMembers.MultiSelect = false; this.lvMembers.MultiSelect = false;
this.lvMembers.Name = "lvMembers"; this.lvMembers.Name = "lvMembers";
this.lvMembers.Size = new System.Drawing.Size(466, 164); this.lvMembers.Size = new System.Drawing.Size(466, 229);
this.lvMembers.TabIndex = 0; this.lvMembers.TabIndex = 0;
this.lvMembers.UseCompatibleStateImageBehavior = false; this.lvMembers.UseCompatibleStateImageBehavior = false;
this.lvMembers.View = System.Windows.Forms.View.Details; this.lvMembers.View = System.Windows.Forms.View.Details;
this.lvMembers.DoubleClick += new System.EventHandler(this.lvMembers_ItemActivate);
// //
// colName // colName
// //
@ -133,9 +134,9 @@
this.panel1.Controls.Add(this.tbFilter); this.panel1.Controls.Add(this.tbFilter);
this.panel1.Controls.Add(this.tbSearch); this.panel1.Controls.Add(this.tbSearch);
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(3, 173); this.panel1.Location = new System.Drawing.Point(3, 238);
this.panel1.Name = "panel1"; this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(466, 100); this.panel1.Size = new System.Drawing.Size(466, 76);
this.panel1.TabIndex = 4; this.panel1.TabIndex = 4;
// //
// cbInstantFilter // cbInstantFilter
@ -215,7 +216,7 @@
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.btnCancel; this.CancelButton = this.btnCancel;
this.ClientSize = new System.Drawing.Size(472, 305); this.ClientSize = new System.Drawing.Size(472, 346);
this.Controls.Add(this.tableLayoutPanel1); this.Controls.Add(this.tableLayoutPanel1);
this.Controls.Add(this.flowLayoutPanel1); this.Controls.Add(this.flowLayoutPanel1);
this.MaximizeBox = false; this.MaximizeBox = false;

View File

@ -31,10 +31,10 @@ namespace BizHawk.Client.EmuHawk
cbInstantFilter.Checked = matchWhileTyping; cbInstantFilter.Checked = matchWhileTyping;
var items = hawkfile.ArchiveItems; var items = hawkfile.ArchiveItems;
for (int i=0;i<items.Count;i++) for (int i = 0; i < items.Count; i++)
{ {
var item = items[i]; var item = items[i];
var lvi = new ListViewItem {Tag = i}; var lvi = new ListViewItem { Tag = i };
lvi.SubItems.Add(new ListViewItem.ListViewSubItem()); lvi.SubItems.Add(new ListViewItem.ListViewSubItem());
lvi.Text = item.name; lvi.Text = item.name;
long size = item.size; long size = item.size;
@ -143,6 +143,7 @@ namespace BizHawk.Client.EmuHawk
{ {
string errMsg = ex.Message; string errMsg = ex.Message;
errMsg = errMsg.Substring(errMsg.IndexOf('-') + 2); errMsg = errMsg.Substring(errMsg.IndexOf('-') + 2);
// Balloon is bugged on first invocation // Balloon is bugged on first invocation
errorBalloon.Show("Error parsing RegEx: " + errMsg, tb); errorBalloon.Show("Error parsing RegEx: " + errMsg, tb);
errorBalloon.Show("Error parsing RegEx: " + errMsg, tb); errorBalloon.Show("Error parsing RegEx: " + errMsg, tb);
@ -219,6 +220,7 @@ namespace BizHawk.Client.EmuHawk
return false; return false;
} }
} }
return true; return true;
} }
}; };
@ -236,9 +238,11 @@ namespace BizHawk.Client.EmuHawk
{ {
if (radSimple.Checked) if (radSimple.Checked)
{ {
return new SimpleMatcher { return new SimpleMatcher
{
Keys = searchKey.ToLower().Split(new char[0], Keys = searchKey.ToLower().Split(new char[0],
StringSplitOptions.RemoveEmptyEntries)}; StringSplitOptions.RemoveEmptyEntries)
};
} }
else else
{ {