TasView and MarkerView are now completely set up at runtime and display properly.
This commit is contained in:
parent
338dc124bd
commit
72eee2cc05
|
@ -324,26 +324,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
return string.Empty; // TODO
|
||||
}
|
||||
|
||||
// TODO: remove
|
||||
public void AddColumns(IEnumerable<RollColumn> columns)
|
||||
{
|
||||
_columns.AddRange(columns);
|
||||
ColumnChanged();
|
||||
}
|
||||
|
||||
// TODO: remove
|
||||
public void AddColumn(RollColumn column)
|
||||
{
|
||||
_columns.Add(column);
|
||||
ColumnChanged();
|
||||
}
|
||||
|
||||
// TODO: remove
|
||||
public RollColumn GetColumn(int index)
|
||||
{
|
||||
return _columns[index];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the first visiable row index, if scrolling is needed
|
||||
/// </summary>
|
||||
|
@ -1231,28 +1211,6 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
public class RollColumns : List<RollColumn>
|
||||
{
|
||||
// For legacy support
|
||||
public void Add(ColumnHeader column)
|
||||
{
|
||||
Add(new RollColumn
|
||||
{
|
||||
Group = "",
|
||||
Width = column.Width,
|
||||
Name = column.Name,
|
||||
Text = column.Text,
|
||||
Type = RollColumn.InputType.Text,
|
||||
});
|
||||
}
|
||||
|
||||
// For legacy support
|
||||
public void AddRange(ColumnHeader[] columns)
|
||||
{
|
||||
foreach (var column in columns)
|
||||
{
|
||||
Add(column); // TODO: this fires the change event each time, convert to an AddRange Call
|
||||
}
|
||||
}
|
||||
|
||||
public RollColumn this[string name]
|
||||
{
|
||||
get
|
||||
|
|
|
@ -30,9 +30,7 @@
|
|||
{
|
||||
this.AddBtn = new System.Windows.Forms.Button();
|
||||
this.RemoveBtn = new System.Windows.Forms.Button();
|
||||
this.MarkerView = new InputRoll();
|
||||
this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.columnHeader2 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.MarkerView = new BizHawk.Client.EmuHawk.InputRoll();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// AddBtn
|
||||
|
@ -60,33 +58,24 @@
|
|||
//
|
||||
// MarkerView
|
||||
//
|
||||
this.MarkerView.AllowColumnReorder = false;
|
||||
this.MarkerView.AllowColumnResize = false;
|
||||
this.MarkerView.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.MarkerView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
|
||||
this.columnHeader1,
|
||||
this.columnHeader2});
|
||||
this.MarkerView.Font = new System.Drawing.Font("Courier New", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.MarkerView.FullRowSelect = true;
|
||||
this.MarkerView.GridLines = true;
|
||||
this.MarkerView.HorizontalOrientation = false;
|
||||
this.MarkerView.ItemCount = 0;
|
||||
this.MarkerView.LastVisibleIndex = 9;
|
||||
this.MarkerView.Location = new System.Drawing.Point(3, 0);
|
||||
this.MarkerView.MultiSelect = false;
|
||||
this.MarkerView.Name = "MarkerView";
|
||||
this.MarkerView.Size = new System.Drawing.Size(198, 209);
|
||||
this.MarkerView.TabIndex = 5;
|
||||
this.MarkerView.TabStop = false;
|
||||
this.MarkerView.SelectedIndexChanged += new System.EventHandler(this.MarkerView_SelectedIndexChanged);
|
||||
//
|
||||
// columnHeader1
|
||||
//
|
||||
this.columnHeader1.Text = "Frame";
|
||||
this.columnHeader1.Width = 64;
|
||||
//
|
||||
// columnHeader2
|
||||
//
|
||||
this.columnHeader2.Text = "Label";
|
||||
this.columnHeader2.Width = 113;
|
||||
//
|
||||
// MarkerControl
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
|
@ -104,8 +93,6 @@
|
|||
#endregion
|
||||
|
||||
private InputRoll MarkerView;
|
||||
public System.Windows.Forms.ColumnHeader columnHeader1;
|
||||
private System.Windows.Forms.ColumnHeader columnHeader2;
|
||||
private System.Windows.Forms.Button AddBtn;
|
||||
private System.Windows.Forms.Button RemoveBtn;
|
||||
|
||||
|
|
|
@ -20,6 +20,21 @@ namespace BizHawk.Client.EmuHawk
|
|||
public MarkerControl()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
var col1 = new InputRoll.RollColumn()
|
||||
{
|
||||
Name = "FrameColumn",
|
||||
Text = "Frame",
|
||||
Width = 64,
|
||||
};
|
||||
var col2 = new InputRoll.RollColumn()
|
||||
{
|
||||
Name = "LabelColumn",
|
||||
Text = "Label",
|
||||
Width = 113,
|
||||
};
|
||||
MarkerView.Columns.AddRange(new InputRoll.RollColumn[]{col1, col2});
|
||||
|
||||
MarkerView.QueryItemBkColor += MarkerView_QueryItemBkColor;
|
||||
MarkerView.QueryItemText += MarkerView_QueryItemText;
|
||||
}
|
||||
|
|
|
@ -101,9 +101,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
this.EnableTooltipsMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator10 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.TasView = new InputRoll();
|
||||
this.Frame = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.Log = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
|
||||
this.TasView = new BizHawk.Client.EmuHawk.InputRoll();
|
||||
this.TasStatusStrip = new StatusStripEx();
|
||||
this.MessageStatusLabel = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.SplicerStatusLabel = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
|
@ -692,40 +690,29 @@ namespace BizHawk.Client.EmuHawk
|
|||
//
|
||||
// TasView
|
||||
//
|
||||
this.TasView.AllowColumnReorder = false;
|
||||
this.TasView.AllowColumnResize = false;
|
||||
this.TasView.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.TasView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
|
||||
this.Frame,
|
||||
this.Log});
|
||||
this.TasView.Font = new System.Drawing.Font("Courier New", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.TasView.FullRowSelect = true;
|
||||
this.TasView.GridLines = true;
|
||||
this.TasView.InputPaintingMode = false;
|
||||
this.TasView.HorizontalOrientation = false;
|
||||
this.TasView.ItemCount = 0;
|
||||
this.TasView.LastVisibleIndex = 22;
|
||||
this.TasView.Location = new System.Drawing.Point(8, 27);
|
||||
this.TasView.MultiSelect = false;
|
||||
this.TasView.Name = "TasView";
|
||||
this.TasView.RightButtonHeld = false;
|
||||
this.TasView.Size = new System.Drawing.Size(288, 471);
|
||||
this.TasView.TabIndex = 1;
|
||||
this.TasView.UseCustomBackground = true;
|
||||
this.TasView.RightMouseScrolled += new BizHawk.Client.EmuHawk.InputRoll.RightMouseScrollEventHandler(this.TasView_MouseWheel);
|
||||
this.TasView.ColumnClick += new System.Windows.Forms.ColumnClickEventHandler(this.TasView_ColumnClick);
|
||||
this.TasView.SelectedIndexChanged += new System.EventHandler(this.TasView_SelectedIndexChanged);
|
||||
this.TasView.RightMouseScrolled += new BizHawk.Client.EmuHawk.InputRoll.RightMouseScrollEventHandler(this.TasView_MouseWheel);
|
||||
this.TasView.KeyDown += new System.Windows.Forms.KeyEventHandler(this.TasView_KeyDown);
|
||||
this.TasView.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.TasView_MouseDoubleClick);
|
||||
this.TasView.MouseDown += new System.Windows.Forms.MouseEventHandler(this.TasView_MouseDown);
|
||||
this.TasView.MouseUp += new System.Windows.Forms.MouseEventHandler(this.TasView_MouseUp);
|
||||
//
|
||||
// Frame
|
||||
//
|
||||
this.Frame.Text = "Frame";
|
||||
//
|
||||
// Log
|
||||
//
|
||||
this.Log.Text = "Log";
|
||||
this.Log.Width = 222;
|
||||
//
|
||||
// TasStatusStrip
|
||||
//
|
||||
this.TasStatusStrip.ClickThrough = true;
|
||||
|
@ -937,11 +924,9 @@ namespace BizHawk.Client.EmuHawk
|
|||
private System.Windows.Forms.ToolStripMenuItem EditSubMenu;
|
||||
private System.Windows.Forms.ToolStripMenuItem ConfigSubMenu;
|
||||
private InputRoll TasView;
|
||||
private System.Windows.Forms.ColumnHeader Log;
|
||||
private System.Windows.Forms.ToolStripMenuItem RecentSubMenu;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator3;
|
||||
private System.Windows.Forms.ColumnHeader Frame;
|
||||
private System.Windows.Forms.ToolStripMenuItem InsertFrameMenuItem;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator4;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator7;
|
||||
|
|
|
@ -189,7 +189,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
if (TasView.Columns[columnName] == null)
|
||||
{
|
||||
var column = new ColumnHeader
|
||||
var column = new InputRoll.RollColumn
|
||||
{
|
||||
Name = columnName,
|
||||
Text = columnText,
|
||||
|
|
Loading…
Reference in New Issue