void PrintHeader() { string header = "===================================================\n" + "TouchDesigner Version Detector 1.0.0\n" + "(Copyright : 2018 Kodai Takao All Rights Reserved.)\n" + "===================================================\n"; MyConsole.ColoredWriteLine(header, ConsoleColor.DarkGreen); }
public ToeExpander() { expander_path = SearchDefaultInstalledDirectory(); // null check if (expander_path == null) { MyConsole.ColoredWriteLine("\nCouldn't find TouchDesigner in default installation folder.", ConsoleColor.Yellow); expander_path = AnotherFolderPrompt(); if (expander_path == null) { MyConsole.StatusWriteLine("TouchDesigner is not found.", false); Console.WriteLine("Press any key to close application."); Console.ReadLine(); Environment.Exit(0); } } }
void Start() { ToeExpander expander = new ToeExpander(); Console.Write("\nInput .toe path : "); string toe_path = Console.ReadLine(); if (expander.Expand(toe_path)) { VersionDetector detector = new VersionDetector(toe_path); string version = detector.Detect(); detector.DeleteGarbageDirectories(); if (version != null) { Console.Write("\n.toe version : "); MyConsole.ColoredWriteLine(version, ConsoleColor.Cyan); Console.Write("\nPress enter to end app."); Console.ReadLine(); } } }