Hook up Movies path to OpenFileDialog in the Play Movie winform. Doesn't actually do anything yet but I wanted to go ahead and get the path config calls in there

This commit is contained in:
andres.delikat 2011-05-05 19:55:43 +00:00
parent b37052693c
commit e85326d340
2 changed files with 26 additions and 0 deletions

View File

@ -30,6 +30,7 @@
{
this.Cancel = new System.Windows.Forms.Button();
this.OK = new System.Windows.Forms.Button();
this.BrowseMovies = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// Cancel
@ -55,6 +56,16 @@
this.OK.UseVisualStyleBackColor = true;
this.OK.Click += new System.EventHandler(this.OK_Click);
//
// BrowseMovies
//
this.BrowseMovies.Location = new System.Drawing.Point(234, 34);
this.BrowseMovies.Name = "BrowseMovies";
this.BrowseMovies.Size = new System.Drawing.Size(75, 23);
this.BrowseMovies.TabIndex = 2;
this.BrowseMovies.Text = "Browse...";
this.BrowseMovies.UseVisualStyleBackColor = true;
this.BrowseMovies.Click += new System.EventHandler(this.BrowseMovies_Click);
//
// PlayMovie
//
this.AcceptButton = this.OK;
@ -62,6 +73,7 @@
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.Cancel;
this.ClientSize = new System.Drawing.Size(321, 290);
this.Controls.Add(this.BrowseMovies);
this.Controls.Add(this.OK);
this.Controls.Add(this.Cancel);
this.MaximizeBox = false;
@ -76,5 +88,6 @@
private System.Windows.Forms.Button Cancel;
private System.Windows.Forms.Button OK;
private System.Windows.Forms.Button BrowseMovies;
}
}

View File

@ -11,6 +11,9 @@ namespace BizHawk.MultiClient
{
public partial class PlayMovie : Form
{
//TODO: Think about this: .\Movies is the default folder, when shoudl this be created? On load (no platform specific folders do this)
//Upon open file dialog? that's weird, record movie? more often people will use play movie first
//Never? then the path default must be .\ not .\movies
public PlayMovie()
{
InitializeComponent();
@ -25,5 +28,15 @@ namespace BizHawk.MultiClient
{
this.Close();
}
private void BrowseMovies_Click(object sender, EventArgs e)
{
OpenFileDialog o = new OpenFileDialog();
o.InitialDirectory = PathManager.MakeAbsolutePath(Global.Config.MoviesPath);
if (o.ShowDialog() == DialogResult.OK)
{
}
}
}
}