New Path Config - defaults button
This commit is contained in:
parent
b7fd907802
commit
fa8cbf650d
|
@ -38,6 +38,7 @@
|
|||
this.BasePathBox = new System.Windows.Forms.TextBox();
|
||||
this.BrowseBase = new System.Windows.Forms.Button();
|
||||
this.BaseDescription = new System.Windows.Forms.Label();
|
||||
this.DefaultsBtn = new System.Windows.Forms.Button();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// OK
|
||||
|
@ -148,6 +149,16 @@
|
|||
this.BaseDescription.TabIndex = 208;
|
||||
this.BaseDescription.Text = "Global Base";
|
||||
//
|
||||
// DefaultsBtn
|
||||
//
|
||||
this.DefaultsBtn.Location = new System.Drawing.Point(93, 411);
|
||||
this.DefaultsBtn.Name = "DefaultsBtn";
|
||||
this.DefaultsBtn.Size = new System.Drawing.Size(75, 23);
|
||||
this.DefaultsBtn.TabIndex = 211;
|
||||
this.DefaultsBtn.Text = "&Defaults";
|
||||
this.DefaultsBtn.UseVisualStyleBackColor = true;
|
||||
this.DefaultsBtn.Click += new System.EventHandler(this.DefaultsBtn_Click);
|
||||
//
|
||||
// NewPathConfig
|
||||
//
|
||||
this.AcceptButton = this.OK;
|
||||
|
@ -155,6 +166,7 @@
|
|||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.CancelButton = this.Cancel;
|
||||
this.ClientSize = new System.Drawing.Size(618, 446);
|
||||
this.Controls.Add(this.DefaultsBtn);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.button1);
|
||||
this.Controls.Add(this.RecentForROMs);
|
||||
|
@ -187,5 +199,6 @@
|
|||
private System.Windows.Forms.TextBox BasePathBox;
|
||||
private System.Windows.Forms.Button BrowseBase;
|
||||
private System.Windows.Forms.Label BaseDescription;
|
||||
private System.Windows.Forms.Button DefaultsBtn;
|
||||
}
|
||||
}
|
|
@ -43,7 +43,7 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
RecentForROMs.Checked = Global.Config.UseRecentForROMs;
|
||||
BasePathBox.Text = Global.Config.BasePath;
|
||||
DoTabs();
|
||||
DoTabs(Global.Config.PathEntries.Paths);
|
||||
SetDefaultFocusedTab();
|
||||
DoROMToggle();
|
||||
}
|
||||
|
@ -87,8 +87,11 @@ namespace BizHawk.MultiClient
|
|||
}
|
||||
}
|
||||
|
||||
private void DoTabs()
|
||||
private void DoTabs(List<PathEntry> PathCollection)
|
||||
{
|
||||
PathTabControl.SuspendLayout();
|
||||
PathTabControl.TabPages.Clear();
|
||||
|
||||
//Separate by system
|
||||
List<string> systems = Global.Config.PathEntries.Select(x => x.System).Distinct().ToList();
|
||||
systems.Sort();
|
||||
|
@ -105,7 +108,7 @@ namespace BizHawk.MultiClient
|
|||
Text = systemId,
|
||||
Name = systemId,
|
||||
};
|
||||
List<PathEntry> paths = Global.Config.PathEntries.Where(x => x.System == systemId).OrderBy(x => x.Ordinal).ThenBy(x => x.Type).ToList();
|
||||
List<PathEntry> paths = PathCollection.Where(x => x.System == systemId).OrderBy(x => x.Ordinal).ThenBy(x => x.Type).ToList();
|
||||
|
||||
int _x = 6;
|
||||
int _y = 14;
|
||||
|
@ -186,6 +189,8 @@ namespace BizHawk.MultiClient
|
|||
|
||||
PathTabControl.TabPages.Add(t);
|
||||
}
|
||||
|
||||
PathTabControl.ResumeLayout();
|
||||
}
|
||||
|
||||
private void BrowseFolder(TextBox box, string _Name, string System)
|
||||
|
@ -308,5 +313,10 @@ namespace BizHawk.MultiClient
|
|||
return _AllPathControls;
|
||||
}
|
||||
}
|
||||
|
||||
private void DefaultsBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
DoTabs(PathEntryCollection.DefaultValues);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue