EditSubtitlesForm: Added rows now have default values.
This commit is contained in:
parent
4e3188e091
commit
b4d065869e
|
@ -32,13 +32,13 @@
|
|||
this.Cancel = new System.Windows.Forms.Button();
|
||||
this.OK = new System.Windows.Forms.Button();
|
||||
this.SubGrid = new System.Windows.Forms.DataGridView();
|
||||
this.Export = new System.Windows.Forms.Button();
|
||||
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.DispColor = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.Message = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.Export = new System.Windows.Forms.Button();
|
||||
((System.ComponentModel.ISupportInitialize)(this.SubGrid)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
|
@ -47,7 +47,7 @@
|
|||
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(647, 266);
|
||||
this.Cancel.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.Cancel.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.Cancel.Name = "Cancel";
|
||||
this.Cancel.Size = new System.Drawing.Size(100, 28);
|
||||
this.Cancel.TabIndex = 0;
|
||||
|
@ -59,7 +59,7 @@
|
|||
//
|
||||
this.OK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.OK.Location = new System.Drawing.Point(539, 266);
|
||||
this.OK.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.OK.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.OK.Name = "OK";
|
||||
this.OK.Size = new System.Drawing.Size(100, 28);
|
||||
this.OK.TabIndex = 1;
|
||||
|
@ -82,12 +82,24 @@
|
|||
this.DispColor,
|
||||
this.Message});
|
||||
this.SubGrid.Location = new System.Drawing.Point(16, 15);
|
||||
this.SubGrid.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.SubGrid.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.SubGrid.Name = "SubGrid";
|
||||
this.SubGrid.Size = new System.Drawing.Size(731, 244);
|
||||
this.SubGrid.TabIndex = 2;
|
||||
this.SubGrid.DefaultValuesNeeded += new System.Windows.Forms.DataGridViewRowEventHandler(this.SubGrid_DefaultValuesNeeded);
|
||||
this.SubGrid.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.SubGrid_MouseDoubleClick);
|
||||
//
|
||||
// Export
|
||||
//
|
||||
this.Export.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.Export.Location = new System.Drawing.Point(16, 266);
|
||||
this.Export.Name = "Export";
|
||||
this.Export.Size = new System.Drawing.Size(125, 28);
|
||||
this.Export.TabIndex = 3;
|
||||
this.Export.Text = "&Export to SubRip";
|
||||
this.Export.UseVisualStyleBackColor = true;
|
||||
this.Export.Click += new System.EventHandler(this.Export_Click);
|
||||
//
|
||||
// Frame
|
||||
//
|
||||
this.Frame.HeaderText = "Frame";
|
||||
|
@ -137,16 +149,6 @@
|
|||
this.Message.Name = "Message";
|
||||
this.Message.ToolTipText = "What will be displayed";
|
||||
//
|
||||
// Export
|
||||
//
|
||||
this.Export.Location = new System.Drawing.Point(16, 266);
|
||||
this.Export.Name = "Export";
|
||||
this.Export.Size = new System.Drawing.Size(125, 28);
|
||||
this.Export.TabIndex = 3;
|
||||
this.Export.Text = "&Export to SubRip";
|
||||
this.Export.UseVisualStyleBackColor = true;
|
||||
this.Export.Click += new System.EventHandler(this.Export_Click);
|
||||
//
|
||||
// EditSubtitlesForm
|
||||
//
|
||||
this.AcceptButton = this.OK;
|
||||
|
@ -159,7 +161,7 @@
|
|||
this.Controls.Add(this.OK);
|
||||
this.Controls.Add(this.Cancel);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
|
||||
this.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.MinimumSize = new System.Drawing.Size(245, 139);
|
||||
this.Name = "EditSubtitlesForm";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
|
@ -175,12 +177,12 @@
|
|||
private System.Windows.Forms.Button Cancel;
|
||||
private System.Windows.Forms.Button OK;
|
||||
private System.Windows.Forms.DataGridView SubGrid;
|
||||
private System.Windows.Forms.Button Export;
|
||||
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 DispColor;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn Message;
|
||||
private System.Windows.Forms.Button Export;
|
||||
}
|
||||
}
|
|
@ -217,5 +217,14 @@ namespace BizHawk.Client.EmuHawk
|
|||
"Success"
|
||||
);
|
||||
}
|
||||
|
||||
private void SubGrid_DefaultValuesNeeded(object sender, DataGridViewRowEventArgs e)
|
||||
{
|
||||
e.Row.Cells["Frame"].Value = 0;
|
||||
e.Row.Cells["X"].Value = 0;
|
||||
e.Row.Cells["Y"].Value = 0;
|
||||
e.Row.Cells["Length"].Value = 0;
|
||||
e.Row.Cells["DispColor"].Value = "FFFFFFFF";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue