Tastudio - add a bookmark widget, doesn't do anything yet

This commit is contained in:
adelikat 2015-07-18 16:10:56 -04:00
parent 140ce0af16
commit 2c7fd7edea
5 changed files with 136 additions and 67 deletions

View File

@ -29,6 +29,11 @@
private void InitializeComponent()
{
this.BookmarksBranchesGroupBox = new System.Windows.Forms.GroupBox();
this.BranchView = new BizHawk.Client.EmuHawk.VirtualListView();
this.BranchNumberColumn = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.FrameColumn = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.TimeColumn = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.BookmarksBranchesGroupBox.SuspendLayout();
this.SuspendLayout();
//
// BookmarksBranchesGroupBox
@ -36,13 +41,50 @@
this.BookmarksBranchesGroupBox.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.BookmarksBranchesGroupBox.Controls.Add(this.BranchView);
this.BookmarksBranchesGroupBox.Location = new System.Drawing.Point(3, 0);
this.BookmarksBranchesGroupBox.Name = "BookmarksBranchesGroupBox";
this.BookmarksBranchesGroupBox.Size = new System.Drawing.Size(198, 249);
this.BookmarksBranchesGroupBox.TabIndex = 0;
this.BookmarksBranchesGroupBox.TabStop = false;
this.BookmarksBranchesGroupBox.Text = "Bookmarks / Branches";
this.BookmarksBranchesGroupBox.Enter += new System.EventHandler(this.BookmarksBranchesGroupBox_Enter);
//
// BranchView
//
this.BranchView.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.BranchView.BlazingFast = false;
this.BranchView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.BranchNumberColumn,
this.FrameColumn,
this.TimeColumn});
this.BranchView.GridLines = true;
this.BranchView.ItemCount = 0;
this.BranchView.Location = new System.Drawing.Point(6, 19);
this.BranchView.Name = "BranchView";
this.BranchView.SelectAllInProgress = false;
this.BranchView.selectedItem = -1;
this.BranchView.Size = new System.Drawing.Size(186, 224);
this.BranchView.TabIndex = 0;
this.BranchView.UseCompatibleStateImageBehavior = false;
this.BranchView.UseCustomBackground = true;
this.BranchView.View = System.Windows.Forms.View.Details;
//
// BranchNumberColumn
//
this.BranchNumberColumn.Text = "#";
this.BranchNumberColumn.Width = 30;
//
// FrameColumn
//
this.FrameColumn.Text = "Frame";
this.FrameColumn.Width = 68;
//
// TimeColumn
//
this.TimeColumn.Text = "Length";
this.TimeColumn.Width = 83;
//
// BookmarksBranchesBox
//
@ -50,6 +92,7 @@
this.Controls.Add(this.BookmarksBranchesGroupBox);
this.Name = "BookmarksBranchesBox";
this.Size = new System.Drawing.Size(204, 253);
this.BookmarksBranchesGroupBox.ResumeLayout(false);
this.ResumeLayout(false);
}
@ -57,5 +100,9 @@
#endregion
private System.Windows.Forms.GroupBox BookmarksBranchesGroupBox;
private VirtualListView BranchView;
private System.Windows.Forms.ColumnHeader BranchNumberColumn;
private System.Windows.Forms.ColumnHeader FrameColumn;
private System.Windows.Forms.ColumnHeader TimeColumn;
}
}

View File

@ -14,11 +14,18 @@ namespace BizHawk.Client.EmuHawk
public BookmarksBranchesBox()
{
InitializeComponent();
BranchView.QueryItemText += QueryItemText;
BranchView.QueryItemBkColor += QueryItemBkColor;
}
private void BookmarksBranchesGroupBox_Enter(object sender, EventArgs e)
private void QueryItemText(int index, int column, out string text)
{
text = string.Empty;
}
private void QueryItemBkColor(int index, int column, ref Color color)
{
}
}
}

View File

@ -28,66 +28,69 @@
/// </summary>
private void InitializeComponent()
{
this.AddBtn = new System.Windows.Forms.Button();
this.RemoveBtn = new System.Windows.Forms.Button();
this.MarkerView = new BizHawk.Client.EmuHawk.InputRoll();
this.SuspendLayout();
//
// AddBtn
//
this.AddBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.AddBtn.Location = new System.Drawing.Point(157, 214);
this.AddBtn.Name = "AddBtn";
this.AddBtn.Size = new System.Drawing.Size(44, 23);
this.AddBtn.TabIndex = 6;
this.AddBtn.Text = "Add";
this.AddBtn.UseVisualStyleBackColor = true;
this.AddBtn.Click += new System.EventHandler(this.AddBtn_Click);
//
// RemoveBtn
//
this.RemoveBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.RemoveBtn.Enabled = false;
this.RemoveBtn.Location = new System.Drawing.Point(3, 214);
this.RemoveBtn.Name = "RemoveBtn";
this.RemoveBtn.Size = new System.Drawing.Size(58, 23);
this.RemoveBtn.TabIndex = 7;
this.RemoveBtn.Text = "Remove";
this.RemoveBtn.UseVisualStyleBackColor = true;
this.RemoveBtn.Click += new System.EventHandler(this.RemoveBtn_Click);
//
// 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)
this.AddBtn = new System.Windows.Forms.Button();
this.RemoveBtn = new System.Windows.Forms.Button();
this.MarkerView = new BizHawk.Client.EmuHawk.InputRoll();
this.SuspendLayout();
//
// AddBtn
//
this.AddBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.AddBtn.Location = new System.Drawing.Point(154, 173);
this.AddBtn.Name = "AddBtn";
this.AddBtn.Size = new System.Drawing.Size(44, 23);
this.AddBtn.TabIndex = 6;
this.AddBtn.Text = "Add";
this.AddBtn.UseVisualStyleBackColor = true;
this.AddBtn.Click += new System.EventHandler(this.AddBtn_Click);
//
// RemoveBtn
//
this.RemoveBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.RemoveBtn.Enabled = false;
this.RemoveBtn.Location = new System.Drawing.Point(3, 173);
this.RemoveBtn.Name = "RemoveBtn";
this.RemoveBtn.Size = new System.Drawing.Size(58, 23);
this.RemoveBtn.TabIndex = 7;
this.RemoveBtn.Text = "Remove";
this.RemoveBtn.UseVisualStyleBackColor = true;
this.RemoveBtn.Click += new System.EventHandler(this.RemoveBtn_Click);
//
// MarkerView
//
this.MarkerView.AllowColumnReorder = false;
this.MarkerView.AllowColumnResize = false;
this.MarkerView.AlwaysScroll = 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.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.HorizontalOrientation = false;
this.MarkerView.LastVisibleRow = 9;
this.MarkerView.Location = new System.Drawing.Point(3, 0);
this.MarkerView.MaxCharactersInHorizontal = 1;
this.MarkerView.MultiSelect = false;
this.MarkerView.Name = "MarkerView";
this.MarkerView.RowCount = 0;
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);
this.MarkerView.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.MarkerView_MouseDoubleClick);
//
// MarkerControl
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
this.Controls.Add(this.RemoveBtn);
this.Controls.Add(this.AddBtn);
this.Controls.Add(this.MarkerView);
this.Name = "MarkerControl";
this.Size = new System.Drawing.Size(204, 241);
this.Load += new System.EventHandler(this.MarkerControl_Load);
this.ResumeLayout(false);
this.MarkerView.CellHeightPadding = 0;
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.HideWasLagFrames = false;
this.MarkerView.HorizontalOrientation = false;
this.MarkerView.LagFramesToHide = 0;
this.MarkerView.Location = new System.Drawing.Point(3, 0);
this.MarkerView.MaxCharactersInHorizontal = 1;
this.MarkerView.MultiSelect = false;
this.MarkerView.Name = "MarkerView";
this.MarkerView.RowCount = 0;
this.MarkerView.Size = new System.Drawing.Size(195, 168);
this.MarkerView.TabIndex = 5;
this.MarkerView.TabStop = false;
this.MarkerView.SelectedIndexChanged += new System.EventHandler(this.MarkerView_SelectedIndexChanged);
this.MarkerView.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.MarkerView_MouseDoubleClick);
//
// MarkerControl
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
this.Controls.Add(this.RemoveBtn);
this.Controls.Add(this.AddBtn);
this.Controls.Add(this.MarkerView);
this.Name = "MarkerControl";
this.Size = new System.Drawing.Size(201, 200);
this.Load += new System.EventHandler(this.MarkerControl_Load);
this.ResumeLayout(false);
}

View File

@ -33,7 +33,7 @@ namespace BizHawk.Client.EmuHawk
{
Name = "LabelColumn",
Text = "",
Width = 139
Width = 125
}
});

View File

@ -171,6 +171,7 @@ namespace BizHawk.Client.EmuHawk
this.StartFromNowSeparator = new System.Windows.Forms.ToolStripSeparator();
this.StartNewProjectFromNowMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.bookmarksBranchesBox1 = new BizHawk.Client.EmuHawk.BookmarksBranchesBox();
this.TASMenu.SuspendLayout();
this.TasStatusStrip.SuspendLayout();
this.MarkerContextMenu.SuspendLayout();
@ -1018,6 +1019,7 @@ namespace BizHawk.Client.EmuHawk
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.CellHeightPadding = 0;
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.HideWasLagFrames = false;
@ -1028,7 +1030,7 @@ namespace BizHawk.Client.EmuHawk
this.TasView.MultiSelect = false;
this.TasView.Name = "TasView";
this.TasView.RowCount = 0;
this.TasView.Size = new System.Drawing.Size(288, 471);
this.TasView.Size = new System.Drawing.Size(288, 528);
this.TasView.TabIndex = 1;
this.TasView.ColumnClick += new BizHawk.Client.EmuHawk.InputRoll.ColumnClickEventHandler(this.TasView_ColumnClick);
this.TasView.ColumnRightClick += new BizHawk.Client.EmuHawk.InputRoll.ColumnClickEventHandler(this.TasView_ColumnRightClick);
@ -1051,7 +1053,7 @@ namespace BizHawk.Client.EmuHawk
this.SavingProgressBar,
this.toolStripStatusLabel2,
this.SplicerStatusLabel});
this.TasStatusStrip.Location = new System.Drawing.Point(0, 497);
this.TasStatusStrip.Location = new System.Drawing.Point(0, 554);
this.TasStatusStrip.Name = "TasStatusStrip";
this.TasStatusStrip.Size = new System.Drawing.Size(506, 22);
this.TasStatusStrip.TabIndex = 4;
@ -1099,7 +1101,7 @@ namespace BizHawk.Client.EmuHawk
this.MarkerControl.Emulator = null;
this.MarkerControl.Location = new System.Drawing.Point(2, 16);
this.MarkerControl.Name = "MarkerControl";
this.MarkerControl.Size = new System.Drawing.Size(198, 343);
this.MarkerControl.Size = new System.Drawing.Size(201, 206);
this.MarkerControl.TabIndex = 6;
this.MarkerControl.Tastudio = null;
//
@ -1338,19 +1340,28 @@ namespace BizHawk.Client.EmuHawk
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox1.Controls.Add(this.MarkerControl);
this.groupBox1.Location = new System.Drawing.Point(302, 129);
this.groupBox1.Location = new System.Drawing.Point(304, 323);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(201, 365);
this.groupBox1.Size = new System.Drawing.Size(204, 228);
this.groupBox1.TabIndex = 7;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Markers";
//
// bookmarksBranchesBox1
//
this.bookmarksBranchesBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.bookmarksBranchesBox1.Location = new System.Drawing.Point(302, 120);
this.bookmarksBranchesBox1.Name = "bookmarksBranchesBox1";
this.bookmarksBranchesBox1.Size = new System.Drawing.Size(204, 205);
this.bookmarksBranchesBox1.TabIndex = 8;
//
// TAStudio
//
this.AllowDrop = true;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(506, 519);
this.ClientSize = new System.Drawing.Size(506, 576);
this.Controls.Add(this.bookmarksBranchesBox1);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.TasPlaybackBox);
this.Controls.Add(this.TasStatusStrip);
@ -1522,5 +1533,6 @@ namespace BizHawk.Client.EmuHawk
private System.Windows.Forms.ToolStripMenuItem ScrollToMarkerToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem applyPatternToPaintedInputToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem onlyOnAutoFireColumnsToolStripMenuItem;
private BookmarksBranchesBox bookmarksBranchesBox1;
}
}