for Developer builds - Lua functions list - a ToTASVideosWikiMarkup button that copies to clipboard

This commit is contained in:
adelikat 2014-06-05 00:23:05 +00:00
parent 5bb38cb1c2
commit e4a12c58bc
3 changed files with 22 additions and 2 deletions

View File

@ -11,7 +11,7 @@ namespace BizHawk.Client.Common
public LuaDocumentation()
:base() { }
public void ToTASVideosWikiMarkup()
public string ToTASVideosWikiMarkup()
{
var sb = new StringBuilder();
@ -48,7 +48,7 @@ namespace BizHawk.Client.Common
}
}
File.WriteAllText(Path.Combine(PathManager.GetExeDirectoryAbsolute(), "LuaDocumentationWiki.txt"), sb.ToString());
return sb.ToString();
}
}

View File

@ -33,6 +33,7 @@
this.directoryEntry1 = new System.DirectoryServices.DirectoryEntry();
this.FilterBox = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.ToWikiMarkupButton = new System.Windows.Forms.Button();
this.FunctionView = new BizHawk.Client.EmuHawk.VirtualListView();
this.LibraryReturn = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.LibraryHead = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
@ -71,6 +72,16 @@
this.label1.TabIndex = 3;
this.label1.Text = "Filter";
//
// ToWikiMarkupButton
//
this.ToWikiMarkupButton.Location = new System.Drawing.Point(493, 309);
this.ToWikiMarkupButton.Name = "ToWikiMarkupButton";
this.ToWikiMarkupButton.Size = new System.Drawing.Size(138, 23);
this.ToWikiMarkupButton.TabIndex = 11;
this.ToWikiMarkupButton.Text = "Wiki markup to Clipboard";
this.ToWikiMarkupButton.UseVisualStyleBackColor = true;
this.ToWikiMarkupButton.Click += new System.EventHandler(this.ToWikiMarkupButton_Click);
//
// FunctionView
//
this.FunctionView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
@ -129,6 +140,7 @@
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(730, 340);
this.Controls.Add(this.ToWikiMarkupButton);
this.Controls.Add(this.label1);
this.Controls.Add(this.FilterBox);
this.Controls.Add(this.FunctionView);
@ -156,5 +168,6 @@
private System.Windows.Forms.ColumnHeader LibraryDescription;
private System.Windows.Forms.TextBox FilterBox;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button ToWikiMarkupButton;
}
}

View File

@ -45,6 +45,8 @@ namespace BizHawk.Client.EmuHawk
.ToList();
UpdateList();
FilterBox.Focus();
ToWikiMarkupButton.Visible = VersionInfo.DeveloperBuild;
}
private void FunctionView_QueryItemBkColor(int index, int column, ref Color color)
@ -207,5 +209,10 @@ namespace BizHawk.Client.EmuHawk
{
UpdateList();
}
private void ToWikiMarkupButton_Click(object sender, EventArgs e)
{
Clipboard.SetDataObject(GlobalWin.Tools.LuaConsole.LuaImp.Docs.ToTASVideosWikiMarkup());
}
}
}