Path config progress
This commit is contained in:
parent
0a1dc8c06e
commit
65499148d4
|
@ -254,6 +254,7 @@
|
|||
this.BrowseMovies.TabIndex = 11;
|
||||
this.BrowseMovies.Text = "Browse";
|
||||
this.BrowseMovies.UseVisualStyleBackColor = true;
|
||||
this.BrowseMovies.Click += new System.EventHandler(this.BrowseMovies_Click);
|
||||
//
|
||||
// LuaBox
|
||||
//
|
||||
|
@ -283,6 +284,7 @@
|
|||
this.BrowseLua.TabIndex = 7;
|
||||
this.BrowseLua.Text = "Browse";
|
||||
this.BrowseLua.UseVisualStyleBackColor = true;
|
||||
this.BrowseLua.Click += new System.EventHandler(this.BrowseLua_Click);
|
||||
//
|
||||
// NESScreenshotsBox
|
||||
//
|
||||
|
@ -312,6 +314,7 @@
|
|||
this.BrowseNESScreenshots.TabIndex = 15;
|
||||
this.BrowseNESScreenshots.Text = "Browse";
|
||||
this.BrowseNESScreenshots.UseVisualStyleBackColor = true;
|
||||
this.BrowseNESScreenshots.Click += new System.EventHandler(this.BrowseNESScreenshots_Click);
|
||||
//
|
||||
// NESROMsBox
|
||||
//
|
||||
|
@ -341,6 +344,7 @@
|
|||
this.BrowseNESROMs.TabIndex = 11;
|
||||
this.BrowseNESROMs.Text = "Browse";
|
||||
this.BrowseNESROMs.UseVisualStyleBackColor = true;
|
||||
this.BrowseNESROMs.Click += new System.EventHandler(this.BrowseNESROMs_Click);
|
||||
//
|
||||
// NESSaveRAMBox
|
||||
//
|
||||
|
@ -370,6 +374,7 @@
|
|||
this.BrowseNESSaveRAM.TabIndex = 7;
|
||||
this.BrowseNESSaveRAM.Text = "Browse";
|
||||
this.BrowseNESSaveRAM.UseVisualStyleBackColor = true;
|
||||
this.BrowseNESSaveRAM.Click += new System.EventHandler(this.BrowseNESSaveRAM_Click);
|
||||
//
|
||||
// NESSavestatesBox
|
||||
//
|
||||
|
@ -399,6 +404,7 @@
|
|||
this.BrowseNESSavestates.TabIndex = 3;
|
||||
this.BrowseNESSavestates.Text = "Browse";
|
||||
this.BrowseNESSavestates.UseVisualStyleBackColor = true;
|
||||
this.BrowseNESSavestates.Click += new System.EventHandler(this.BrowseNESSavestates_Click);
|
||||
//
|
||||
// Sega8ScreenshotsBox
|
||||
//
|
||||
|
@ -546,6 +552,7 @@
|
|||
this.BrowseAVI.TabIndex = 20;
|
||||
this.BrowseAVI.Text = "Browse";
|
||||
this.BrowseAVI.UseVisualStyleBackColor = true;
|
||||
this.BrowseAVI.Click += new System.EventHandler(this.BrowseAVI_Click);
|
||||
//
|
||||
// tabControl1
|
||||
//
|
||||
|
@ -613,6 +620,7 @@
|
|||
this.NESBrowseCheats.TabIndex = 22;
|
||||
this.NESBrowseCheats.Text = "Browse";
|
||||
this.NESBrowseCheats.UseVisualStyleBackColor = true;
|
||||
this.NESBrowseCheats.Click += new System.EventHandler(this.NESBrowseCheats_Click);
|
||||
//
|
||||
// NESCheatsBox
|
||||
//
|
||||
|
@ -652,6 +660,7 @@
|
|||
this.BrowseNESBase.TabIndex = 19;
|
||||
this.BrowseNESBase.Text = "Browse";
|
||||
this.BrowseNESBase.UseVisualStyleBackColor = true;
|
||||
this.BrowseNESBase.Click += new System.EventHandler(this.BrowseNESBase_Click);
|
||||
//
|
||||
// tabPage2
|
||||
//
|
||||
|
|
|
@ -24,12 +24,18 @@ namespace BizHawk.MultiClient
|
|||
//Make all base path text boxes not allow %recent%
|
||||
//All path text boxes should do some kind of error checking
|
||||
//Paths should default to their platform specific base before the main base! This will have to be done by specifically calling methods for each platform type
|
||||
//TODO config path under base, config will default to %exe%
|
||||
|
||||
public PathConfig()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void SaveButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
SaveSettings();
|
||||
}
|
||||
|
||||
private void PathConfig_Load(object sender, EventArgs e)
|
||||
{
|
||||
BasePathBox.Text = Global.Config.BasePath;
|
||||
|
@ -143,13 +149,23 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
FolderBrowserDialog f = new FolderBrowserDialog();
|
||||
f.Description = "Set the directory for " + Name;
|
||||
//TODO: figure out how to send system parameter
|
||||
f.SelectedPath = PathManager.MakeAbsolutePath(box.Text, "");
|
||||
DialogResult result = f.ShowDialog();
|
||||
if (result == DialogResult.OK)
|
||||
box.Text = f.SelectedPath;
|
||||
}
|
||||
|
||||
private void BrowseFolder(TextBox box, string Name, string System)
|
||||
{
|
||||
FolderBrowserDialog f = new FolderBrowserDialog();
|
||||
f.Description = "Set the directory for " + Name;
|
||||
//f.SelectedPath = PathManager.MakeAbsolutePath(box.Text, System);
|
||||
f.SelectedPath = Global.Config.LastRomPath;
|
||||
DialogResult result = f.ShowDialog();
|
||||
if (result == DialogResult.OK)
|
||||
box.Text = f.SelectedPath;
|
||||
}
|
||||
|
||||
private void BrowseWatch_Click(object sender, EventArgs e)
|
||||
{
|
||||
BrowseFolder(WatchBox, WatchDescription.Text);
|
||||
|
@ -159,10 +175,50 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
BrowseFolder(BasePathBox, BaseDescription.Text);
|
||||
}
|
||||
|
||||
private void SaveButton_Click(object sender, EventArgs e)
|
||||
|
||||
private void BrowseAVI_Click(object sender, EventArgs e)
|
||||
{
|
||||
SaveSettings();
|
||||
BrowseFolder(AVIBox, AVIDescription.Text);
|
||||
}
|
||||
|
||||
private void BrowseLua_Click(object sender, EventArgs e)
|
||||
{
|
||||
BrowseFolder(LuaBox, LuaDescription.Text);
|
||||
}
|
||||
|
||||
private void BrowseMovies_Click(object sender, EventArgs e)
|
||||
{
|
||||
BrowseFolder(MoviesBox, MoviesDescription.Text);
|
||||
}
|
||||
|
||||
private void BrowseNESBase_Click(object sender, EventArgs e)
|
||||
{
|
||||
BrowseFolder(NESBaseBox, NESBaseDescription.Text);
|
||||
}
|
||||
|
||||
private void BrowseNESROMs_Click(object sender, EventArgs e)
|
||||
{
|
||||
BrowseFolder(NESROMsBox, NESROMsDescription.Text, "NES");
|
||||
}
|
||||
|
||||
private void BrowseNESSavestates_Click(object sender, EventArgs e)
|
||||
{
|
||||
BrowseFolder(NESSavestatesBox, NESSavestatesDescription.Text, "NES");
|
||||
}
|
||||
|
||||
private void BrowseNESSaveRAM_Click(object sender, EventArgs e)
|
||||
{
|
||||
BrowseFolder(NESSaveRAMBox, NESSaveRAMDescription.Text, "NES");
|
||||
}
|
||||
|
||||
private void BrowseNESScreenshots_Click(object sender, EventArgs e)
|
||||
{
|
||||
BrowseFolder(NESScreenshotsBox, NESScreenshotsDescription.Text, "NES");
|
||||
}
|
||||
|
||||
private void NESBrowseCheats_Click(object sender, EventArgs e)
|
||||
{
|
||||
BrowseFolder(NESCheatsBox, NESCheatsDescription.Text, "NES");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue