2017-12-22 15:08:58 -05:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.ComponentModel;
|
|
|
|
|
using System.Data;
|
|
|
|
|
using System.Drawing;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using System.Windows.Forms;
|
|
|
|
|
using Mesen.GUI.Config;
|
|
|
|
|
|
|
|
|
|
namespace Mesen.GUI.Forms
|
|
|
|
|
{
|
|
|
|
|
public partial class frmRecordMovie : BaseConfigForm
|
|
|
|
|
{
|
|
|
|
|
public frmRecordMovie()
|
|
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
|
|
|
|
|
Entity = ConfigManager.Config.MovieRecordInfo;
|
|
|
|
|
AddBinding("Author", txtAuthor);
|
|
|
|
|
AddBinding("Description", txtDescription);
|
|
|
|
|
AddBinding("RecordFrom", cboRecordFrom);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override bool ValidateInput()
|
|
|
|
|
{
|
|
|
|
|
return !string.IsNullOrWhiteSpace(txtFilename.Text);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected override void OnFormClosed(FormClosedEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
base.OnFormClosed(e);
|
|
|
|
|
if(this.DialogResult == DialogResult.OK) {
|
2017-12-28 13:15:01 -05:00
|
|
|
|
RecordMovieOptions options = new RecordMovieOptions(
|
2017-12-22 15:08:58 -05:00
|
|
|
|
this.txtFilename.Text,
|
|
|
|
|
this.txtAuthor.Text,
|
|
|
|
|
this.txtDescription.Text,
|
|
|
|
|
this.cboRecordFrom.GetEnumValue<RecordMovieFrom>()
|
2017-12-28 13:15:01 -05:00
|
|
|
|
);
|
|
|
|
|
InteropEmu.MovieRecord(ref options);
|
2017-12-22 15:08:58 -05:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void btnBrowse_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
SaveFileDialog sfd = new SaveFileDialog();
|
|
|
|
|
sfd.SetFilter(ResourceHelper.GetMessage("FilterMovie"));
|
|
|
|
|
sfd.InitialDirectory = ConfigManager.MovieFolder;
|
|
|
|
|
sfd.FileName = InteropEmu.GetRomInfo().GetRomName() + ".mmo";
|
|
|
|
|
if(sfd.ShowDialog() == DialogResult.OK) {
|
|
|
|
|
txtFilename.Text = sfd.FileName;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|