History Viewer: Add option to export part of a segment
This commit is contained in:
parent
52c4dbc3a0
commit
fb616cd612
14 changed files with 420 additions and 12 deletions
|
@ -611,6 +611,12 @@
|
|||
<Control ID="mnuResumeGameplay">Resume Gameplay</Control>
|
||||
<Control ID="mnuClose">Close</Control>
|
||||
</Form>
|
||||
<Form ID="frmSelectExportRange" Title="Export specific range...">
|
||||
<Control ID="lblStartTime">Start time:</Control>
|
||||
<Control ID="lblEndTime">End time:</Control>
|
||||
<Control ID="btnOK">D'acord</Control>
|
||||
<Control ID="btnCancel">Cancel·la</Control>
|
||||
</Form>
|
||||
<Form ID="frmHelp" Title="Opcions de la línia d'ordres">
|
||||
<Control ID="grpExample">Exemple d'ús</Control>
|
||||
<Control ID="tpgGeneralOptions">General</Control>
|
||||
|
@ -734,6 +740,8 @@
|
|||
<Message ID="SaveToFile">Desa al fitxer...</Message>
|
||||
|
||||
<Message ID="MovieSegment">Segment #{0}</Message>
|
||||
<Message ID="MovieExportEntireSegment">Export entire segment</Message>
|
||||
<Message ID="MovieExportSpecificRange">Export specific range...</Message>
|
||||
<Message ID="MovieSaveError">An error occurred while trying to save the movie file.</Message>
|
||||
<Message ID="FileSaveError">An error occurred while trying to save the file.</Message>
|
||||
|
||||
|
|
|
@ -621,6 +621,12 @@
|
|||
<Control ID="mnuResumeGameplay">Resume Gameplay</Control>
|
||||
<Control ID="mnuClose">Close</Control>
|
||||
</Form>
|
||||
<Form ID="frmSelectExportRange" Title="Export specific range...">
|
||||
<Control ID="lblStartTime">Start time:</Control>
|
||||
<Control ID="lblEndTime">End time:</Control>
|
||||
<Control ID="btnOK">OK</Control>
|
||||
<Control ID="btnCancel">Cancel</Control>
|
||||
</Form>
|
||||
<Form ID="frmHelp" Title="Command-line options">
|
||||
<Control ID="grpExample">Usage Example</Control>
|
||||
<Control ID="tpgGeneralOptions">General</Control>
|
||||
|
@ -764,6 +770,8 @@
|
|||
<Message ID="SaveToFile">Save to file...</Message>
|
||||
|
||||
<Message ID="MovieSegment">Segment #{0}</Message>
|
||||
<Message ID="MovieExportEntireSegment">Export entire segment</Message>
|
||||
<Message ID="MovieExportSpecificRange">Export specific range...</Message>
|
||||
<Message ID="MovieSaveError">An error occurred while trying to save the movie file.</Message>
|
||||
<Message ID="FileSaveError">An error occurred while trying to save the file.</Message>
|
||||
|
||||
|
|
|
@ -609,6 +609,12 @@
|
|||
<Control ID="mnuResumeGameplay">Continuar el juego</Control>
|
||||
<Control ID="mnuClose">Cerrar</Control>
|
||||
</Form>
|
||||
<Form ID="frmSelectExportRange" Title="Export specific range...">
|
||||
<Control ID="lblStartTime">Start time:</Control>
|
||||
<Control ID="lblEndTime">End time:</Control>
|
||||
<Control ID="btnOK">Ok</Control>
|
||||
<Control ID="btnCancel">Cancelar</Control>
|
||||
</Form>
|
||||
<Form ID="frmHelp" Title="Opciones de linea de comandos">
|
||||
<Control ID="grpExample">Ejemplo de uso</Control>
|
||||
<Control ID="tpgGeneralOptions">General</Control>
|
||||
|
@ -751,6 +757,8 @@
|
|||
<Message ID="SaveToFile">Guardar en archivo...</Message>
|
||||
|
||||
<Message ID="MovieSegment">Parte #{0}</Message>
|
||||
<Message ID="MovieExportEntireSegment">Export entire segment</Message>
|
||||
<Message ID="MovieExportSpecificRange">Export specific range...</Message>
|
||||
<Message ID="MovieSaveError">Se produjo un error al intentar guardar el archivo de película.</Message>
|
||||
<Message ID="FileSaveError">An error occurred while trying to save the file.</Message>
|
||||
|
||||
|
|
|
@ -621,6 +621,12 @@
|
|||
<Control ID="mnuResumeGameplay">Reprendre le jeu</Control>
|
||||
<Control ID="mnuClose">Fermer</Control>
|
||||
</Form>
|
||||
<Form ID="frmSelectExportRange" Title="Exporter une portion...">
|
||||
<Control ID="lblStartTime">Début:</Control>
|
||||
<Control ID="lblEndTime">Fin:</Control>
|
||||
<Control ID="btnOK">OK</Control>
|
||||
<Control ID="btnCancel">Annuler</Control>
|
||||
</Form>
|
||||
<Form ID="frmHelp" Title="Options de ligne de commande">
|
||||
<Control ID="grpExample">Exemple d'utilisation</Control>
|
||||
<Control ID="tpgGeneralOptions">Général</Control>
|
||||
|
@ -764,6 +770,8 @@
|
|||
<Message ID="SaveToFile">Sauvegarder dans un fichier...</Message>
|
||||
|
||||
<Message ID="MovieSegment">Segment #{0}</Message>
|
||||
<Message ID="MovieExportEntireSegment">Exporter le segment entier</Message>
|
||||
<Message ID="MovieExportSpecificRange">Exporter une portion du segment...</Message>
|
||||
<Message ID="MovieSaveError">Une erreur est survenue pendant la sauvegarde du film.</Message>
|
||||
<Message ID="FileSaveError">Une erreur est survenue pendant la sauvegarde du fichier.</Message>
|
||||
|
||||
|
|
|
@ -611,6 +611,12 @@
|
|||
<Control ID="mnuResumeGameplay">ここからゲームを再開する</Control>
|
||||
<Control ID="mnuClose">終了</Control>
|
||||
</Form>
|
||||
<Form ID="frmSelectExportRange" Title="エクスポート範囲を指定する...">
|
||||
<Control ID="lblStartTime">開始時点:</Control>
|
||||
<Control ID="lblEndTime">終了時点:</Control>
|
||||
<Control ID="btnOK">OK</Control>
|
||||
<Control ID="btnCancel">キャンセル</Control>
|
||||
</Form>
|
||||
<Form ID="frmHelp" Title="コマンドラインオプション">
|
||||
<Control ID="grpExample">使い方</Control>
|
||||
<Control ID="tpgGeneralOptions">全般</Control>
|
||||
|
@ -754,6 +760,8 @@
|
|||
<Message ID="SaveToFile">ファイルに保存する…</Message>
|
||||
|
||||
<Message ID="MovieSegment">パート {0}</Message>
|
||||
<Message ID="MovieExportEntireSegment">全部エクスポートする</Message>
|
||||
<Message ID="MovieExportSpecificRange">範囲を指定してエクスポートする...</Message>
|
||||
<Message ID="MovieSaveError">動画エクスポートは失敗しました。</Message>
|
||||
<Message ID="FileSaveError">ファイルの保存に失敗しました。</Message>
|
||||
|
||||
|
|
|
@ -621,6 +621,12 @@
|
|||
<Control ID="mnuResumeGameplay">Continuar jogo</Control>
|
||||
<Control ID="mnuClose">Fechar</Control>
|
||||
</Form>
|
||||
<Form ID="frmSelectExportRange" Title="Export specific range...">
|
||||
<Control ID="lblStartTime">Start time:</Control>
|
||||
<Control ID="lblEndTime">End time:</Control>
|
||||
<Control ID="btnOK">OK</Control>
|
||||
<Control ID="btnCancel">Cancelar</Control>
|
||||
</Form>
|
||||
<Form ID="frmHelp" Title="Opções de linha de comando">
|
||||
<Control ID="grpExample">Exemplo de uso</Control>
|
||||
<Control ID="tpgGeneralOptions">Geral</Control>
|
||||
|
@ -764,6 +770,8 @@
|
|||
<Message ID="SaveToFile">Salvar para arquivo...</Message>
|
||||
|
||||
<Message ID="MovieSegment">Segmento #{0}</Message>
|
||||
<Message ID="MovieExportEntireSegment">Export entire segment</Message>
|
||||
<Message ID="MovieExportSpecificRange">Export specific range...</Message>
|
||||
<Message ID="MovieSaveError">Ocorreu um erro ao tentar salvar o vídeo.</Message>
|
||||
<Message ID="FileSaveError">An error occurred while trying to save the file.</Message>
|
||||
|
||||
|
|
|
@ -609,6 +609,12 @@
|
|||
<Control ID="mnuResumeGameplay">Resume Gameplay</Control>
|
||||
<Control ID="mnuClose">Close</Control>
|
||||
</Form>
|
||||
<Form ID="frmSelectExportRange" Title="Export specific range...">
|
||||
<Control ID="lblStartTime">Start time:</Control>
|
||||
<Control ID="lblEndTime">End time:</Control>
|
||||
<Control ID="btnOK">ОК</Control>
|
||||
<Control ID="btnCancel">Отмена</Control>
|
||||
</Form>
|
||||
<Form ID="frmHelp" Title="Command-line Options">
|
||||
<Control ID="grpExample">Usage example</Control>
|
||||
<Control ID="tpgGeneralOptions">General</Control>
|
||||
|
@ -752,6 +758,8 @@
|
|||
<Message ID="SaveToFile">Save to file...</Message>
|
||||
|
||||
<Message ID="MovieSegment">Segment #{0}</Message>
|
||||
<Message ID="MovieExportEntireSegment">Export entire segment</Message>
|
||||
<Message ID="MovieExportSpecificRange">Export specific range...</Message>
|
||||
<Message ID="MovieSaveError">An error occurred while trying to save the movie file.</Message>
|
||||
<Message ID="FileSaveError">An error occurred while trying to save the file.</Message>
|
||||
|
||||
|
|
|
@ -609,6 +609,12 @@
|
|||
<Control ID="mnuResumeGameplay">Відновити геймплей</Control>
|
||||
<Control ID="mnuClose">Закрити</Control>
|
||||
</Form>
|
||||
<Form ID="frmSelectExportRange" Title="Export specific range...">
|
||||
<Control ID="lblStartTime">Start time:</Control>
|
||||
<Control ID="lblEndTime">End time:</Control>
|
||||
<Control ID="btnOK">ОК</Control>
|
||||
<Control ID="btnCancel">Вiдмiна</Control>
|
||||
</Form>
|
||||
<Form ID="frmHelp" Title="Параметри командного рядка">
|
||||
<Control ID="grpExample">Приклад використання</Control>
|
||||
<Control ID="tpgGeneralOptions">Загальний</Control>
|
||||
|
@ -752,6 +758,8 @@
|
|||
<Message ID="SaveToFile">Зберегти в файл...</Message>
|
||||
|
||||
<Message ID="MovieSegment">Сегмент #{0}</Message>
|
||||
<Message ID="MovieExportEntireSegment">Export entire segment</Message>
|
||||
<Message ID="MovieExportSpecificRange">Export specific range...</Message>
|
||||
<Message ID="MovieSaveError">Сталася помилка під час спроби зберегти відео файл.</Message>
|
||||
<Message ID="FileSaveError">An error occurred while trying to save the file.</Message>
|
||||
|
||||
|
|
|
@ -635,6 +635,12 @@
|
|||
<Control ID="mnuResumeGameplay">继续播放</Control>
|
||||
<Control ID="mnuClose">关闭</Control>
|
||||
</Form>
|
||||
<Form ID="frmSelectExportRange" Title="Export specific range...">
|
||||
<Control ID="lblStartTime">Start time:</Control>
|
||||
<Control ID="lblEndTime">End time:</Control>
|
||||
<Control ID="btnOK">确定</Control>
|
||||
<Control ID="btnCancel">取消</Control>
|
||||
</Form>
|
||||
<Form ID="frmHelp" Title="命令行选项">
|
||||
<Control ID="grpExample">用法示例</Control>
|
||||
<Control ID="tpgGeneralOptions">常规</Control>
|
||||
|
@ -776,7 +782,10 @@
|
|||
|
||||
<Message ID="LoadFromFile">从文件载入...</Message>
|
||||
<Message ID="SaveToFile">保存到文件...</Message>
|
||||
|
||||
<Message ID="MovieSegment">第 #{0} 段</Message>
|
||||
<Message ID="MovieExportEntireSegment">Export entire segment</Message>
|
||||
<Message ID="MovieExportSpecificRange">Export specific range...</Message>
|
||||
<Message ID="MovieSaveError">导出电影失败.</Message>
|
||||
<Message ID="FileSaveError">保存文件失败.</Message>
|
||||
|
||||
|
|
|
@ -184,20 +184,25 @@ namespace Mesen.GUI.Forms
|
|||
TimeSpan end = new TimeSpan(0, 0, (int)(segEnd / 2));
|
||||
|
||||
string segmentName = ResourceHelper.GetMessage("MovieSegment", (mnuExportMovie.DropDownItems.Count + 1).ToString());
|
||||
ToolStripMenuItem item = new ToolStripMenuItem(segmentName + ", " + start.ToString() + " - " + end.ToString());
|
||||
item.Click += (s, evt) => {
|
||||
using(SaveFileDialog sfd = new SaveFileDialog()) {
|
||||
sfd.SetFilter(ResourceHelper.GetMessage("FilterMovie"));
|
||||
sfd.InitialDirectory = ConfigManager.MovieFolder;
|
||||
sfd.FileName = InteropEmu.GetRomInfo().GetRomName() + ".mmo";
|
||||
if(sfd.ShowDialog() == DialogResult.OK) {
|
||||
if(!InteropEmu.HistoryViewerSaveMovie(sfd.FileName, segStart, segEnd)) {
|
||||
MesenMsgBox.Show("MovieSaveError", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
ToolStripMenuItem segmentItem = new ToolStripMenuItem(segmentName + ", " + start.ToString() + " - " + end.ToString());
|
||||
|
||||
ToolStripMenuItem exportFull = new ToolStripMenuItem(ResourceHelper.GetMessage("MovieExportEntireSegment"));
|
||||
exportFull.Click += (s, evt) => {
|
||||
ExportMovie(segStart, segEnd);
|
||||
};
|
||||
|
||||
ToolStripMenuItem exportCustomRange = new ToolStripMenuItem(ResourceHelper.GetMessage("MovieExportSpecificRange"));
|
||||
exportCustomRange.Click += (s, evt) => {
|
||||
using(frmSelectExportRange frm = new frmSelectExportRange(segStart, segEnd)) {
|
||||
if(frm.ShowDialog(this) == DialogResult.OK) {
|
||||
ExportMovie(frm.ExportStart, frm.ExportEnd);
|
||||
}
|
||||
}
|
||||
};
|
||||
mnuExportMovie.DropDownItems.Add(item);
|
||||
|
||||
segmentItem.DropDown.Items.Add(exportFull);
|
||||
segmentItem.DropDown.Items.Add(exportCustomRange);
|
||||
mnuExportMovie.DropDownItems.Add(segmentItem);
|
||||
}
|
||||
segmentStart = segments[i] + 1;
|
||||
}
|
||||
|
@ -205,7 +210,21 @@ namespace Mesen.GUI.Forms
|
|||
mnuImportMovie.Visible = false;
|
||||
mnuExportMovie.Enabled = mnuExportMovie.HasDropDownItems && !_isNsf;
|
||||
}
|
||||
|
||||
|
||||
private void ExportMovie(UInt32 segStart, UInt32 segEnd)
|
||||
{
|
||||
using(SaveFileDialog sfd = new SaveFileDialog()) {
|
||||
sfd.SetFilter(ResourceHelper.GetMessage("FilterMovie"));
|
||||
sfd.InitialDirectory = ConfigManager.MovieFolder;
|
||||
sfd.FileName = InteropEmu.GetRomInfo().GetRomName() + ".mmo";
|
||||
if(sfd.ShowDialog() == DialogResult.OK) {
|
||||
if(!InteropEmu.HistoryViewerSaveMovie(sfd.FileName, segStart, segEnd)) {
|
||||
MesenMsgBox.Show("MovieSaveError", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void mnuCreateSaveState_Click(object sender, EventArgs e)
|
||||
{
|
||||
using(SaveFileDialog sfd = new SaveFileDialog()) {
|
||||
|
|
141
GUI.NET/Forms/frmSelectExportRange.Designer.cs
generated
Normal file
141
GUI.NET/Forms/frmSelectExportRange.Designer.cs
generated
Normal file
|
@ -0,0 +1,141 @@
|
|||
using Mesen.GUI.Controls;
|
||||
|
||||
namespace Mesen.GUI.Forms
|
||||
{
|
||||
partial class frmSelectExportRange
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if(disposing && (components != null)) {
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.dtpStart = new System.Windows.Forms.DateTimePicker();
|
||||
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.lblStartTime = new System.Windows.Forms.Label();
|
||||
this.lblEndTime = new System.Windows.Forms.Label();
|
||||
this.dtpEnd = new System.Windows.Forms.DateTimePicker();
|
||||
this.tableLayoutPanel1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// baseConfigPanel
|
||||
//
|
||||
this.baseConfigPanel.Location = new System.Drawing.Point(0, 61);
|
||||
this.baseConfigPanel.Size = new System.Drawing.Size(198, 29);
|
||||
//
|
||||
// dtpStart
|
||||
//
|
||||
this.dtpStart.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||
this.dtpStart.CustomFormat = "HH:mm:ss";
|
||||
this.dtpStart.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
|
||||
this.dtpStart.Location = new System.Drawing.Point(63, 3);
|
||||
this.dtpStart.MaxDate = new System.DateTime(3000, 1, 1, 0, 0, 0, 0);
|
||||
this.dtpStart.MinDate = new System.DateTime(2000, 1, 1, 0, 0, 0, 0);
|
||||
this.dtpStart.Name = "dtpStart";
|
||||
this.dtpStart.ShowUpDown = true;
|
||||
this.dtpStart.Size = new System.Drawing.Size(69, 20);
|
||||
this.dtpStart.TabIndex = 0;
|
||||
this.dtpStart.Value = new System.DateTime(2000, 1, 1, 0, 0, 0, 0);
|
||||
//
|
||||
// tableLayoutPanel1
|
||||
//
|
||||
this.tableLayoutPanel1.ColumnCount = 3;
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||
this.tableLayoutPanel1.Controls.Add(this.dtpStart, 1, 0);
|
||||
this.tableLayoutPanel1.Controls.Add(this.lblStartTime, 0, 0);
|
||||
this.tableLayoutPanel1.Controls.Add(this.lblEndTime, 0, 1);
|
||||
this.tableLayoutPanel1.Controls.Add(this.dtpEnd, 1, 1);
|
||||
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
|
||||
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
|
||||
this.tableLayoutPanel1.RowCount = 3;
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||
this.tableLayoutPanel1.Size = new System.Drawing.Size(198, 61);
|
||||
this.tableLayoutPanel1.TabIndex = 1;
|
||||
//
|
||||
// lblStartTime
|
||||
//
|
||||
this.lblStartTime.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||
this.lblStartTime.AutoSize = true;
|
||||
this.lblStartTime.Location = new System.Drawing.Point(3, 6);
|
||||
this.lblStartTime.Name = "lblStartTime";
|
||||
this.lblStartTime.Size = new System.Drawing.Size(54, 13);
|
||||
this.lblStartTime.TabIndex = 2;
|
||||
this.lblStartTime.Text = "Start time:";
|
||||
//
|
||||
// lblEndTime
|
||||
//
|
||||
this.lblEndTime.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||
this.lblEndTime.AutoSize = true;
|
||||
this.lblEndTime.Location = new System.Drawing.Point(3, 32);
|
||||
this.lblEndTime.Name = "lblEndTime";
|
||||
this.lblEndTime.Size = new System.Drawing.Size(51, 13);
|
||||
this.lblEndTime.TabIndex = 3;
|
||||
this.lblEndTime.Text = "End time:";
|
||||
//
|
||||
// dtpEnd
|
||||
//
|
||||
this.dtpEnd.Anchor = System.Windows.Forms.AnchorStyles.Left;
|
||||
this.dtpEnd.CustomFormat = "HH:mm:ss";
|
||||
this.dtpEnd.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
|
||||
this.dtpEnd.Location = new System.Drawing.Point(63, 29);
|
||||
this.dtpEnd.MaxDate = new System.DateTime(3000, 1, 1, 0, 0, 0, 0);
|
||||
this.dtpEnd.MinDate = new System.DateTime(2000, 1, 1, 0, 0, 0, 0);
|
||||
this.dtpEnd.Name = "dtpEnd";
|
||||
this.dtpEnd.ShowUpDown = true;
|
||||
this.dtpEnd.Size = new System.Drawing.Size(69, 20);
|
||||
this.dtpEnd.TabIndex = 1;
|
||||
this.dtpEnd.Value = new System.DateTime(2000, 1, 1, 0, 0, 0, 0);
|
||||
//
|
||||
// frmSelectExportRange
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(198, 90);
|
||||
this.Controls.Add(this.tableLayoutPanel1);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "frmSelectExportRange";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "Custom range...";
|
||||
this.Controls.SetChildIndex(this.baseConfigPanel, 0);
|
||||
this.Controls.SetChildIndex(this.tableLayoutPanel1, 0);
|
||||
this.tableLayoutPanel1.ResumeLayout(false);
|
||||
this.tableLayoutPanel1.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.DateTimePicker dtpStart;
|
||||
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
|
||||
private System.Windows.Forms.Label lblEndTime;
|
||||
private System.Windows.Forms.DateTimePicker dtpEnd;
|
||||
private System.Windows.Forms.Label lblStartTime;
|
||||
}
|
||||
}
|
43
GUI.NET/Forms/frmSelectExportRange.cs
Normal file
43
GUI.NET/Forms/frmSelectExportRange.cs
Normal file
|
@ -0,0 +1,43 @@
|
|||
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;
|
||||
|
||||
namespace Mesen.GUI.Forms
|
||||
{
|
||||
public partial class frmSelectExportRange : BaseConfigForm
|
||||
{
|
||||
public UInt32 ExportStart { get; private set; }
|
||||
public UInt32 ExportEnd { get; private set; }
|
||||
|
||||
public frmSelectExportRange(UInt32 segStart, UInt32 segEnd)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
dtpStart.Value = new DateTime(2000, 1, 1, 0, 0, 0).AddSeconds((int)(Math.Ceiling((decimal)segStart / 2)));
|
||||
dtpEnd.Value = new DateTime(2000, 1, 1, 0, 0, 0).AddSeconds(segEnd / 2);
|
||||
|
||||
dtpStart.MinDate = dtpStart.Value;
|
||||
dtpStart.MaxDate = dtpEnd.Value;
|
||||
dtpEnd.MinDate = dtpStart.Value;
|
||||
dtpEnd.MaxDate = dtpEnd.Value;
|
||||
}
|
||||
|
||||
protected override bool ValidateInput()
|
||||
{
|
||||
return dtpStart.Value < dtpEnd.Value;
|
||||
}
|
||||
|
||||
protected override void OnFormClosing(FormClosingEventArgs e)
|
||||
{
|
||||
base.OnFormClosing(e);
|
||||
ExportStart = (UInt32)(dtpStart.Value.TimeOfDay.TotalSeconds * 2);
|
||||
ExportEnd = (UInt32)(dtpEnd.Value.TimeOfDay.TotalSeconds * 2);
|
||||
}
|
||||
}
|
||||
}
|
123
GUI.NET/Forms/frmSelectExportRange.resx
Normal file
123
GUI.NET/Forms/frmSelectExportRange.resx
Normal file
|
@ -0,0 +1,123 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
|
@ -1209,6 +1209,12 @@
|
|||
<Compile Include="Forms\frmRecordAvi.Designer.cs">
|
||||
<DependentUpon>frmRecordAvi.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\frmSelectExportRange.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\frmSelectExportRange.Designer.cs">
|
||||
<DependentUpon>frmSelectExportRange.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\frmSelectRom.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
|
@ -1772,6 +1778,9 @@
|
|||
<EmbeddedResource Include="Forms\frmRecordAvi.resx">
|
||||
<DependentUpon>frmRecordAvi.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\frmSelectExportRange.resx">
|
||||
<DependentUpon>frmSelectExportRange.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\frmSelectRom.resx">
|
||||
<DependentUpon>frmSelectRom.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
|
Loading…
Add table
Reference in a new issue