当前位置:网站首页>A cool "ghost" console tool
A cool "ghost" console tool
2022-07-07 05:20:00 【InfoQ】
brief introduction
- Full name :Spectre.Console
- Translated names ( unofficial ): Ghost console ( Hereinafter referred to as ghost )
features
- New enough: The tools mentioned above , Or some did not mention , But tools with a large number of downloads , The update frequency is very slow , I want to be very angry ColorfulConsole, The last update has stopped 2020 year , So despite its powerful functions , But the vitality is not good . Ghosts are different , Look at the official release records , He is now in rapid iterative update , Abreast of the times 0.44.x edition , It has been updated 13 It's a small version , Yes, of course , Frequent updates are not necessarily a good thing , It also reflects many problems , Mending , But that's exactly what happened , It proves that it is energetic , It's worth affirming !
- Cool:I don't want to explain that , Look at the picture
- Strong enough :It can also be seen from the above figure , Ghost offers a variety of console printing styles , In addition to the processing of text style , And support , form , Trees , Progress bar , Even emoji expression ( The system configuration needs to be modified )
Use
typeface
AnsiConsole.MarkupLine($"[Yellow] I am the first 2 Middleware , I come from the entry file , I'm coming -{DateTime.Now}[/]");AnsiConsole.MarkupLine("[bold]World[/]");AnsiConsole.MarkupLine("[bold Yellow]World[/]");form
- Static tables
var table = new Table().Centered();
table.AddColumn(" Authorized person ID");
table.AddColumn(" Authorized events ID");
table.AddColumn(" Authorized person ");
while (sdr.Read())
{
string column1 = Convert.ToString(sdr["UserID"]);
string column2 = Convert.ToString(sdr["TypeID"]);
string column3 = Convert.ToString(sdr["UserNam"]);
table.AddRow(column1, column2, column3);
}
AnsiConsole.Write(table);// Set width
table.Width(50);
// Set offset
table.Columns[0].PadLeft(3);
// Set borders , Draw a circle
table.Border(TableBorder.Square);- Dynamic tables

FIGlet Text

AnsiConsole.Write(
new FigletText("Tony's Box")
.Centered()
.Color(Color.Blue)
);choice
var cmd = AnsiConsole.Prompt(
new SelectionPrompt<string>()
.Title(" The following are the operations temporarily supported by the toolkit ?")
.PageSize(10)
.MoreChoicesText("[grey]( Please select the operation to be performed )[/]")
.AddChoices(new[] {
"1. monitor 【User_ProgramTypeLink】 Permissions on the table ","2. Clear the log data half a year ago ", "3. Delete the specified index data "
}));边栏推荐
- Leetcode(417)——太平洋大西洋水流问题
- window定时计划任务
- The sooner you understand the four rules of life, the more blessed you will be
- 漏电继电器JELR-250FG
- Let f (x) = Σ x^n/n^2, prove that f (x) + F (1-x) + lnxln (1-x) = Σ 1/n^2
- 2. Overview of securities investment funds
- 痛心啊 收到教训了
- 利用OPNET进行网络单播(一服务器多客户端)仿真的设计、配置及注意点
- Addressable pre Download
- 【问道】编译原理
猜你喜欢
随机推荐
ScheduledExecutorService定时器
sublime使用技巧
Safe landing practice of software supply chain under salesforce containerized ISV scenario
【二叉树】二叉树寻路
DJ-ZBS2漏电继电器
高手勿进!写给初中级程序员以及还在大学修炼的“准程序员”的成长秘籍
U++ metadata specifier learning notes
最长公共子序列(LCS)(动态规划,递归)
pytest测试框架——数据驱动
Is it necessary to renew the PMP certificate?
ThinkPHP Association preload with
ASP. Net MVC - resource cannot be found error - asp Net MVC – Resource Cannot be found error
Annotation初体验
LinkedBlockingQueue源码分析-初始化
QT控件样式系列(一)之QSlider
Leetcode(46)——全排列
np.random.shuffle与np.swapaxis或transpose一起时要慎用
Linkedblockingqueue source code analysis - initialization
Error: No named parameter with the name ‘foregroundColor‘
JVM(十九) -- 字节码与类的加载(四) -- 再谈类的加载器









