Path Config - when in non-interim mode, lock down unreleased cores
This commit is contained in:
parent
705617566f
commit
da451381c6
|
@ -28,162 +28,162 @@
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
this.OK = new System.Windows.Forms.Button();
|
this.OK = new System.Windows.Forms.Button();
|
||||||
this.Cancel = new System.Windows.Forms.Button();
|
this.Cancel = new System.Windows.Forms.Button();
|
||||||
this.PathTabControl = new System.Windows.Forms.TabControl();
|
this.PathTabControl = new System.Windows.Forms.TabControl();
|
||||||
this.SaveBtn = new System.Windows.Forms.Button();
|
this.SaveBtn = new System.Windows.Forms.Button();
|
||||||
this.label1 = new System.Windows.Forms.Label();
|
this.label1 = new System.Windows.Forms.Label();
|
||||||
this.button1 = new System.Windows.Forms.Button();
|
this.button1 = new System.Windows.Forms.Button();
|
||||||
this.RecentForROMs = new System.Windows.Forms.CheckBox();
|
this.RecentForROMs = new System.Windows.Forms.CheckBox();
|
||||||
this.BasePathBox = new System.Windows.Forms.TextBox();
|
this.BasePathBox = new System.Windows.Forms.TextBox();
|
||||||
this.BrowseBase = new System.Windows.Forms.Button();
|
this.BrowseBase = new System.Windows.Forms.Button();
|
||||||
this.BaseDescription = new System.Windows.Forms.Label();
|
this.BaseDescription = new System.Windows.Forms.Label();
|
||||||
this.DefaultsBtn = new System.Windows.Forms.Button();
|
this.DefaultsBtn = new System.Windows.Forms.Button();
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
//
|
//
|
||||||
// OK
|
// OK
|
||||||
//
|
//
|
||||||
this.OK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
this.OK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.OK.Location = new System.Drawing.Point(450, 411);
|
this.OK.Location = new System.Drawing.Point(471, 411);
|
||||||
this.OK.Name = "OK";
|
this.OK.Name = "OK";
|
||||||
this.OK.Size = new System.Drawing.Size(75, 23);
|
this.OK.Size = new System.Drawing.Size(75, 23);
|
||||||
this.OK.TabIndex = 0;
|
this.OK.TabIndex = 0;
|
||||||
this.OK.Text = "&Ok";
|
this.OK.Text = "&Ok";
|
||||||
this.OK.UseVisualStyleBackColor = true;
|
this.OK.UseVisualStyleBackColor = true;
|
||||||
this.OK.Click += new System.EventHandler(this.OK_Click);
|
this.OK.Click += new System.EventHandler(this.OK_Click);
|
||||||
//
|
//
|
||||||
// Cancel
|
// Cancel
|
||||||
//
|
//
|
||||||
this.Cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
this.Cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.Cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
this.Cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||||
this.Cancel.Location = new System.Drawing.Point(531, 411);
|
this.Cancel.Location = new System.Drawing.Point(552, 411);
|
||||||
this.Cancel.Name = "Cancel";
|
this.Cancel.Name = "Cancel";
|
||||||
this.Cancel.Size = new System.Drawing.Size(75, 23);
|
this.Cancel.Size = new System.Drawing.Size(75, 23);
|
||||||
this.Cancel.TabIndex = 1;
|
this.Cancel.TabIndex = 1;
|
||||||
this.Cancel.Text = "&Cancel";
|
this.Cancel.Text = "&Cancel";
|
||||||
this.Cancel.UseVisualStyleBackColor = true;
|
this.Cancel.UseVisualStyleBackColor = true;
|
||||||
this.Cancel.Click += new System.EventHandler(this.Cancel_Click);
|
this.Cancel.Click += new System.EventHandler(this.Cancel_Click);
|
||||||
//
|
//
|
||||||
// PathTabControl
|
// PathTabControl
|
||||||
//
|
//
|
||||||
this.PathTabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
this.PathTabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||||
| System.Windows.Forms.AnchorStyles.Left)
|
| System.Windows.Forms.AnchorStyles.Left)
|
||||||
| System.Windows.Forms.AnchorStyles.Right)));
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.PathTabControl.Location = new System.Drawing.Point(12, 84);
|
this.PathTabControl.Location = new System.Drawing.Point(12, 84);
|
||||||
this.PathTabControl.Multiline = true;
|
this.PathTabControl.Multiline = true;
|
||||||
this.PathTabControl.Name = "PathTabControl";
|
this.PathTabControl.Name = "PathTabControl";
|
||||||
this.PathTabControl.SelectedIndex = 0;
|
this.PathTabControl.SelectedIndex = 0;
|
||||||
this.PathTabControl.Size = new System.Drawing.Size(594, 321);
|
this.PathTabControl.Size = new System.Drawing.Size(615, 321);
|
||||||
this.PathTabControl.TabIndex = 2;
|
this.PathTabControl.TabIndex = 2;
|
||||||
//
|
//
|
||||||
// SaveBtn
|
// SaveBtn
|
||||||
//
|
//
|
||||||
this.SaveBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
this.SaveBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||||
this.SaveBtn.Location = new System.Drawing.Point(12, 411);
|
this.SaveBtn.Location = new System.Drawing.Point(12, 411);
|
||||||
this.SaveBtn.Name = "SaveBtn";
|
this.SaveBtn.Name = "SaveBtn";
|
||||||
this.SaveBtn.Size = new System.Drawing.Size(75, 23);
|
this.SaveBtn.Size = new System.Drawing.Size(75, 23);
|
||||||
this.SaveBtn.TabIndex = 3;
|
this.SaveBtn.TabIndex = 3;
|
||||||
this.SaveBtn.Text = "&Save";
|
this.SaveBtn.Text = "&Save";
|
||||||
this.SaveBtn.UseVisualStyleBackColor = true;
|
this.SaveBtn.UseVisualStyleBackColor = true;
|
||||||
this.SaveBtn.Click += new System.EventHandler(this.SaveBtn_Click);
|
this.SaveBtn.Click += new System.EventHandler(this.SaveBtn_Click);
|
||||||
//
|
//
|
||||||
// label1
|
// label1
|
||||||
//
|
//
|
||||||
this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.label1.AutoSize = true;
|
this.label1.AutoSize = true;
|
||||||
this.label1.Location = new System.Drawing.Point(506, 52);
|
this.label1.Location = new System.Drawing.Point(527, 52);
|
||||||
this.label1.Name = "label1";
|
this.label1.Name = "label1";
|
||||||
this.label1.Size = new System.Drawing.Size(97, 13);
|
this.label1.Size = new System.Drawing.Size(97, 13);
|
||||||
this.label1.TabIndex = 210;
|
this.label1.TabIndex = 210;
|
||||||
this.label1.Text = "Special Commands";
|
this.label1.Text = "Special Commands";
|
||||||
//
|
//
|
||||||
// button1
|
// button1
|
||||||
//
|
//
|
||||||
this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
this.button1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.button1.Image = global::BizHawk.MultiClient.Properties.Resources.Help;
|
this.button1.Image = global::BizHawk.MultiClient.Properties.Resources.Help;
|
||||||
this.button1.Location = new System.Drawing.Point(475, 47);
|
this.button1.Location = new System.Drawing.Point(496, 47);
|
||||||
this.button1.Name = "button1";
|
this.button1.Name = "button1";
|
||||||
this.button1.Size = new System.Drawing.Size(26, 23);
|
this.button1.Size = new System.Drawing.Size(26, 23);
|
||||||
this.button1.TabIndex = 209;
|
this.button1.TabIndex = 209;
|
||||||
this.button1.UseVisualStyleBackColor = true;
|
this.button1.UseVisualStyleBackColor = true;
|
||||||
this.button1.Click += new System.EventHandler(this.button1_Click);
|
this.button1.Click += new System.EventHandler(this.button1_Click);
|
||||||
//
|
//
|
||||||
// RecentForROMs
|
// RecentForROMs
|
||||||
//
|
//
|
||||||
this.RecentForROMs.AutoSize = true;
|
this.RecentForROMs.AutoSize = true;
|
||||||
this.RecentForROMs.Location = new System.Drawing.Point(12, 51);
|
this.RecentForROMs.Location = new System.Drawing.Point(12, 51);
|
||||||
this.RecentForROMs.Name = "RecentForROMs";
|
this.RecentForROMs.Name = "RecentForROMs";
|
||||||
this.RecentForROMs.Size = new System.Drawing.Size(184, 17);
|
this.RecentForROMs.Size = new System.Drawing.Size(184, 17);
|
||||||
this.RecentForROMs.TabIndex = 207;
|
this.RecentForROMs.TabIndex = 207;
|
||||||
this.RecentForROMs.Text = "Always use recent path for ROMs";
|
this.RecentForROMs.Text = "Always use recent path for ROMs";
|
||||||
this.RecentForROMs.UseVisualStyleBackColor = true;
|
this.RecentForROMs.UseVisualStyleBackColor = true;
|
||||||
this.RecentForROMs.CheckedChanged += new System.EventHandler(this.RecentForROMs_CheckedChanged);
|
this.RecentForROMs.CheckedChanged += new System.EventHandler(this.RecentForROMs_CheckedChanged);
|
||||||
//
|
//
|
||||||
// BasePathBox
|
// BasePathBox
|
||||||
//
|
//
|
||||||
this.BasePathBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
this.BasePathBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||||
| System.Windows.Forms.AnchorStyles.Right)));
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.BasePathBox.Location = new System.Drawing.Point(12, 15);
|
this.BasePathBox.Location = new System.Drawing.Point(12, 15);
|
||||||
this.BasePathBox.Name = "BasePathBox";
|
this.BasePathBox.Name = "BasePathBox";
|
||||||
this.BasePathBox.Size = new System.Drawing.Size(489, 20);
|
this.BasePathBox.Size = new System.Drawing.Size(510, 20);
|
||||||
this.BasePathBox.TabIndex = 205;
|
this.BasePathBox.TabIndex = 205;
|
||||||
//
|
//
|
||||||
// BrowseBase
|
// BrowseBase
|
||||||
//
|
//
|
||||||
this.BrowseBase.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
this.BrowseBase.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.BrowseBase.Image = global::BizHawk.MultiClient.Properties.Resources.OpenFile;
|
this.BrowseBase.Image = global::BizHawk.MultiClient.Properties.Resources.OpenFile;
|
||||||
this.BrowseBase.Location = new System.Drawing.Point(509, 14);
|
this.BrowseBase.Location = new System.Drawing.Point(530, 14);
|
||||||
this.BrowseBase.Name = "BrowseBase";
|
this.BrowseBase.Name = "BrowseBase";
|
||||||
this.BrowseBase.Size = new System.Drawing.Size(26, 23);
|
this.BrowseBase.Size = new System.Drawing.Size(26, 23);
|
||||||
this.BrowseBase.TabIndex = 206;
|
this.BrowseBase.TabIndex = 206;
|
||||||
this.BrowseBase.UseVisualStyleBackColor = true;
|
this.BrowseBase.UseVisualStyleBackColor = true;
|
||||||
this.BrowseBase.Click += new System.EventHandler(this.BrowseBase_Click);
|
this.BrowseBase.Click += new System.EventHandler(this.BrowseBase_Click);
|
||||||
//
|
//
|
||||||
// BaseDescription
|
// BaseDescription
|
||||||
//
|
//
|
||||||
this.BaseDescription.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
this.BaseDescription.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.BaseDescription.AutoSize = true;
|
this.BaseDescription.AutoSize = true;
|
||||||
this.BaseDescription.Location = new System.Drawing.Point(542, 19);
|
this.BaseDescription.Location = new System.Drawing.Point(563, 19);
|
||||||
this.BaseDescription.Name = "BaseDescription";
|
this.BaseDescription.Name = "BaseDescription";
|
||||||
this.BaseDescription.Size = new System.Drawing.Size(64, 13);
|
this.BaseDescription.Size = new System.Drawing.Size(64, 13);
|
||||||
this.BaseDescription.TabIndex = 208;
|
this.BaseDescription.TabIndex = 208;
|
||||||
this.BaseDescription.Text = "Global Base";
|
this.BaseDescription.Text = "Global Base";
|
||||||
//
|
//
|
||||||
// DefaultsBtn
|
// DefaultsBtn
|
||||||
//
|
//
|
||||||
this.DefaultsBtn.Location = new System.Drawing.Point(93, 411);
|
this.DefaultsBtn.Location = new System.Drawing.Point(93, 411);
|
||||||
this.DefaultsBtn.Name = "DefaultsBtn";
|
this.DefaultsBtn.Name = "DefaultsBtn";
|
||||||
this.DefaultsBtn.Size = new System.Drawing.Size(75, 23);
|
this.DefaultsBtn.Size = new System.Drawing.Size(75, 23);
|
||||||
this.DefaultsBtn.TabIndex = 211;
|
this.DefaultsBtn.TabIndex = 211;
|
||||||
this.DefaultsBtn.Text = "&Defaults";
|
this.DefaultsBtn.Text = "&Defaults";
|
||||||
this.DefaultsBtn.UseVisualStyleBackColor = true;
|
this.DefaultsBtn.UseVisualStyleBackColor = true;
|
||||||
this.DefaultsBtn.Click += new System.EventHandler(this.DefaultsBtn_Click);
|
this.DefaultsBtn.Click += new System.EventHandler(this.DefaultsBtn_Click);
|
||||||
//
|
//
|
||||||
// NewPathConfig
|
// NewPathConfig
|
||||||
//
|
//
|
||||||
this.AcceptButton = this.OK;
|
this.AcceptButton = this.OK;
|
||||||
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.Cancel;
|
this.CancelButton = this.Cancel;
|
||||||
this.ClientSize = new System.Drawing.Size(618, 446);
|
this.ClientSize = new System.Drawing.Size(639, 446);
|
||||||
this.Controls.Add(this.DefaultsBtn);
|
this.Controls.Add(this.DefaultsBtn);
|
||||||
this.Controls.Add(this.label1);
|
this.Controls.Add(this.label1);
|
||||||
this.Controls.Add(this.button1);
|
this.Controls.Add(this.button1);
|
||||||
this.Controls.Add(this.RecentForROMs);
|
this.Controls.Add(this.RecentForROMs);
|
||||||
this.Controls.Add(this.BasePathBox);
|
this.Controls.Add(this.BasePathBox);
|
||||||
this.Controls.Add(this.BrowseBase);
|
this.Controls.Add(this.BrowseBase);
|
||||||
this.Controls.Add(this.BaseDescription);
|
this.Controls.Add(this.BaseDescription);
|
||||||
this.Controls.Add(this.SaveBtn);
|
this.Controls.Add(this.SaveBtn);
|
||||||
this.Controls.Add(this.PathTabControl);
|
this.Controls.Add(this.PathTabControl);
|
||||||
this.Controls.Add(this.Cancel);
|
this.Controls.Add(this.Cancel);
|
||||||
this.Controls.Add(this.OK);
|
this.Controls.Add(this.OK);
|
||||||
this.MinimumSize = new System.Drawing.Size(360, 250);
|
this.MinimumSize = new System.Drawing.Size(360, 250);
|
||||||
this.Name = "NewPathConfig";
|
this.Name = "NewPathConfig";
|
||||||
this.ShowIcon = false;
|
this.ShowIcon = false;
|
||||||
this.Text = "Path Configuration";
|
this.Text = "Path Configuration";
|
||||||
this.Load += new System.EventHandler(this.NewPathConfig_Load);
|
this.Load += new System.EventHandler(this.NewPathConfig_Load);
|
||||||
this.ResumeLayout(false);
|
this.ResumeLayout(false);
|
||||||
this.PerformLayout();
|
this.PerformLayout();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,20 @@ namespace BizHawk.MultiClient
|
||||||
{
|
{
|
||||||
public partial class NewPathConfig : Form
|
public partial class NewPathConfig : Form
|
||||||
{
|
{
|
||||||
|
private void LockDownCores()
|
||||||
|
{
|
||||||
|
if (!MainForm.INTERIM)
|
||||||
|
{
|
||||||
|
string[] coresToHide = { "PSX", "GBA", "INTV", "C64", "GEN" };
|
||||||
|
|
||||||
|
foreach(string core in coresToHide)
|
||||||
|
{
|
||||||
|
TabPage tp = AllTabPages.FirstOrDefault(x => x.Name == core);
|
||||||
|
PathTabControl.TabPages.Remove(tp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private AutoCompleteStringCollection AutoCompleteOptions
|
private AutoCompleteStringCollection AutoCompleteOptions
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
@ -33,6 +47,7 @@ namespace BizHawk.MultiClient
|
||||||
private void NewPathConfig_Load(object sender, EventArgs e)
|
private void NewPathConfig_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
LoadSettings();
|
LoadSettings();
|
||||||
|
LockDownCores();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OK_Click(object sender, EventArgs e)
|
private void OK_Click(object sender, EventArgs e)
|
||||||
|
@ -119,7 +134,7 @@ namespace BizHawk.MultiClient
|
||||||
{
|
{
|
||||||
TabPage t = new TabPage()
|
TabPage t = new TabPage()
|
||||||
{
|
{
|
||||||
Text = systemId,
|
Text = systemId == "SG" ? "SG-1000" : systemId == "GEN" ? "Genesis" : systemId, //TODO: don't be hacky
|
||||||
Name = systemId,
|
Name = systemId,
|
||||||
};
|
};
|
||||||
List<PathEntry> paths = PathCollection.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();
|
||||||
|
@ -330,6 +345,19 @@ namespace BizHawk.MultiClient
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private List<TabPage> AllTabPages
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
List<TabPage> _AllTabPages = new List<TabPage>();
|
||||||
|
foreach (TabPage tp in PathTabControl.TabPages)
|
||||||
|
{
|
||||||
|
_AllTabPages.Add(tp);
|
||||||
|
}
|
||||||
|
return _AllTabPages;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void DefaultsBtn_Click(object sender, EventArgs e)
|
private void DefaultsBtn_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
DoTabs(PathEntryCollection.DefaultValues);
|
DoTabs(PathEntryCollection.DefaultValues);
|
||||||
|
|
Loading…
Reference in New Issue