-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdefault.sdpd
More file actions
42 lines (29 loc) · 1.76 KB
/
Copy pathdefault.sdpd
File metadata and controls
42 lines (29 loc) · 1.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
Benhart documentation
=======
Benhart is a logwindow that can be attached to a WPF window or used standalone. It was inspired by the PCSX2 logwindow.
Initializing the window is easy
using BenhartLog;
Benhart.AttachTo(Window); // To attach to a WPF window
// or
Benhart.Show(); // To just open the window "standalone"
This will open up a Benhart log window. Writing to it is easy as well.
Benhart.Log(LogStyle, string); // Write using a logstyle
Benhart.Log(string, string); // Write using a specific style
// Or any of the shorthand methods
Benhart.Message(text);
Benhart.Debug(text);
Benhart.Info(text);
Benhart.Warning(text);
Benhart.Error(text);
You can also add values to the watch window by using
Benhart.SetWatch(name, value);
Updating the value can be done by the same method, just use the same name
Using the BenhartMD class, you can output markdown. This markdown can be converted to HTML with your favorite markdown parser.
In every entry, title is optional but will default to what is outputed (eg: "List: " for lists)
BenhartMarkdown.Table(LogLevel, IEnumerable, title)
BenhartMarkdown.NumberedList(LogLevel, IEnumerable, title)
BenhartMarkdown.BulletList(LogLevel, IEnumerable, title)
BenhartMarkdown.Paragraph(LogLevel, text, title)
If you just want to copy/paste the output for HTML, then you should keep in mind the time output. Normally, Benhart outputs the time with each call, this is not Markdown and will not be parsed. To circumvent this, manually remove the time entries or turn of time output completely by setting BenhartWindowOptions.ShowTime to false.
The display and window can be configured using the properties in the BenhartWindowOptions class.
The example project contains a example application showing most of the features of Benhart.