diff --git a/BizHawk.MultiClient/BizHawk.MultiClient.csproj b/BizHawk.MultiClient/BizHawk.MultiClient.csproj index 2b97d3fe1d..96edcdea23 100644 --- a/BizHawk.MultiClient/BizHawk.MultiClient.csproj +++ b/BizHawk.MultiClient/BizHawk.MultiClient.csproj @@ -150,6 +150,12 @@ MainForm.cs Form + + Form + + + EditSubtitlesForm.cs + @@ -399,6 +405,9 @@ + + EditSubtitlesForm.cs + NESDebugger.cs Designer diff --git a/BizHawk.MultiClient/PlayMovie.cs b/BizHawk.MultiClient/PlayMovie.cs index f351c53a02..e0735259fc 100644 --- a/BizHawk.MultiClient/PlayMovie.cs +++ b/BizHawk.MultiClient/PlayMovie.cs @@ -167,7 +167,9 @@ namespace BizHawk.MultiClient private void button2_Click(object sender, EventArgs e) { - //TODO: a subtitle viewer/editor + EditSubtitlesForm s = new EditSubtitlesForm(); + s.ReadOnly = true; + s.Show(); } private void MovieView_DoubleClick(object sender, EventArgs e) diff --git a/BizHawk.MultiClient/movie/EditSubtitlesForm.Designer.cs b/BizHawk.MultiClient/movie/EditSubtitlesForm.Designer.cs new file mode 100644 index 0000000000..e70bfc2565 --- /dev/null +++ b/BizHawk.MultiClient/movie/EditSubtitlesForm.Designer.cs @@ -0,0 +1,159 @@ +namespace BizHawk.MultiClient +{ + partial class EditSubtitlesForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(EditSubtitlesForm)); + this.Cancel = new System.Windows.Forms.Button(); + this.OK = new System.Windows.Forms.Button(); + this.dataGridView1 = new System.Windows.Forms.DataGridView(); + this.Frame = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.X = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Y = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Length = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Color = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Message = new System.Windows.Forms.DataGridViewTextBoxColumn(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); + this.SuspendLayout(); + // + // Cancel + // + 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.Location = new System.Drawing.Point(439, 216); + this.Cancel.Name = "Cancel"; + this.Cancel.Size = new System.Drawing.Size(75, 23); + this.Cancel.TabIndex = 0; + this.Cancel.Text = "&Cancel"; + this.Cancel.UseVisualStyleBackColor = true; + this.Cancel.Click += new System.EventHandler(this.Cancel_Click); + // + // OK + // + this.OK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); + this.OK.Location = new System.Drawing.Point(358, 216); + this.OK.Name = "OK"; + this.OK.Size = new System.Drawing.Size(75, 23); + this.OK.TabIndex = 1; + this.OK.Text = "&Ok"; + this.OK.UseVisualStyleBackColor = true; + this.OK.Click += new System.EventHandler(this.OK_Click); + // + // dataGridView1 + // + this.dataGridView1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.dataGridView1.BackgroundColor = System.Drawing.SystemColors.ControlLight; + this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.Frame, + this.X, + this.Y, + this.Length, + this.Color, + this.Message}); + this.dataGridView1.Location = new System.Drawing.Point(12, 12); + this.dataGridView1.Name = "dataGridView1"; + this.dataGridView1.Size = new System.Drawing.Size(502, 198); + this.dataGridView1.TabIndex = 2; + // + // Frame + // + this.Frame.HeaderText = "Frame"; + this.Frame.MaxInputLength = 7; + this.Frame.Name = "Frame"; + this.Frame.Width = 75; + // + // X + // + this.X.HeaderText = "X"; + this.X.MaxInputLength = 3; + this.X.Name = "X"; + this.X.Width = 30; + // + // Y + // + this.Y.HeaderText = "Y"; + this.Y.MaxInputLength = 3; + this.Y.Name = "Y"; + this.Y.Width = 30; + // + // Length + // + this.Length.HeaderText = "Length"; + this.Length.MaxInputLength = 5; + this.Length.Name = "Length"; + this.Length.Width = 33; + // + // Color + // + this.Color.HeaderText = "Color"; + this.Color.MaxInputLength = 8; + this.Color.Name = "Color"; + this.Color.Width = 40; + // + // Message + // + this.Message.HeaderText = "Message"; + this.Message.MaxInputLength = 255; + this.Message.Name = "Message"; + this.Message.Width = 250; + // + // EditSubtitlesForm + // + this.AcceptButton = this.OK; + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.CancelButton = this.Cancel; + this.ClientSize = new System.Drawing.Size(526, 251); + this.Controls.Add(this.dataGridView1); + this.Controls.Add(this.OK); + this.Controls.Add(this.Cancel); + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.Name = "EditSubtitlesForm"; + this.Text = "Edit Subtitles"; + this.Load += new System.EventHandler(this.EditSubtitlesForm_Load); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Button Cancel; + private System.Windows.Forms.Button OK; + private System.Windows.Forms.DataGridView dataGridView1; + private System.Windows.Forms.DataGridViewTextBoxColumn Frame; + private System.Windows.Forms.DataGridViewTextBoxColumn X; + private System.Windows.Forms.DataGridViewTextBoxColumn Y; + private System.Windows.Forms.DataGridViewTextBoxColumn Length; + private System.Windows.Forms.DataGridViewTextBoxColumn Color; + private System.Windows.Forms.DataGridViewTextBoxColumn Message; + } +} \ No newline at end of file diff --git a/BizHawk.MultiClient/movie/EditSubtitlesForm.cs b/BizHawk.MultiClient/movie/EditSubtitlesForm.cs new file mode 100644 index 0000000000..c398d6548d --- /dev/null +++ b/BizHawk.MultiClient/movie/EditSubtitlesForm.cs @@ -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.Windows.Forms; + +namespace BizHawk.MultiClient +{ + public partial class EditSubtitlesForm : Form + { + public bool ReadOnly; + + public EditSubtitlesForm() + { + InitializeComponent(); + } + + private void EditSubtitlesForm_Load(object sender, EventArgs e) + { + if (ReadOnly) + { + //Set all columns to read only + } + } + + private void Cancel_Click(object sender, EventArgs e) + { + this.Close(); + } + + private void OK_Click(object sender, EventArgs e) + { + if (!ReadOnly) + { + //Save subtitles to movie object & write to disk + } + this.Close(); + } + } +} diff --git a/BizHawk.MultiClient/movie/EditSubtitlesForm.resx b/BizHawk.MultiClient/movie/EditSubtitlesForm.resx new file mode 100644 index 0000000000..2b04ed0989 --- /dev/null +++ b/BizHawk.MultiClient/movie/EditSubtitlesForm.resx @@ -0,0 +1,167 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + True + + + True + + + True + + + True + + + True + + + True + + + + + AAABAAEAEBAAAAAAAABoBQAAFgAAACgAAAAQAAAAIAAAAAEACAAAAAAAQAEAAAAAAAAAAA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