{"id":20366879,"url":"https://github.com/distantcam/cui","last_synced_at":"2025-10-24T02:11:52.345Z","repository":{"id":143492101,"uuid":"83628449","full_name":"distantcam/CUI","owner":"distantcam","description":"A simple Console UI","archived":false,"fork":false,"pushed_at":"2017-06-06T02:53:05.000Z","size":9,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-15T05:39:44.652Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/distantcam.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"license.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-03-02T03:09:46.000Z","updated_at":"2017-06-14T17:31:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"2b0a58dc-ae85-4e82-9d09-e3ee88688c80","html_url":"https://github.com/distantcam/CUI","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/distantcam%2FCUI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/distantcam%2FCUI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/distantcam%2FCUI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/distantcam%2FCUI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/distantcam","download_url":"https://codeload.github.com/distantcam/CUI/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241908653,"owners_count":20040661,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-15T00:27:36.387Z","updated_at":"2025-10-24T02:11:52.297Z","avatar_url":"https://github.com/distantcam.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CUI\r\n**CUI** provides a simple state based console UI with screens and a menu system for creating sample applications.\r\n\r\n### Example code\r\n```\r\nusing System;\r\nusing System.Threading.Tasks;\r\nusing CUI;\r\n\r\nclass Program\r\n{\r\n    enum Screens\r\n    {\r\n        MainScreen,\r\n        Processes,\r\n        Process1,\r\n        Process2\r\n    }\r\n\r\n    static void Main(string[] args)\r\n    {\r\n        var app = new ConsoleApplication\u003cScreens\u003e(Screens.MainScreen);\r\n\r\n        app.AddMenuScreen(Screens.MainScreen)\r\n            .WithMenuOption('p', \"Select Process to run\", Screens.Processes)\r\n            .WithMenuOption('q', \"Quit\");\r\n\r\n        app.AddMenuScreen(Screens.Processes)\r\n            .WithMenuOption(\"Task 1 (long)\", Screens.Process1)\r\n            .WithMenuOption(\"Task 2 (short)\", Screens.Process2);\r\n\r\n        app.AddFunctionScreen(Screens.Process1)\r\n            .SetAction(async () =\u003e\r\n            {\r\n                Console.WriteLine(\"Running...\");\r\n                await Task.Delay(1000);\r\n                Console.WriteLine(\"Almost done...\");\r\n                await Task.Delay(1000);\r\n                Console.WriteLine(\"Just finishing up...\");\r\n                await Task.Delay(1000);\r\n                Console.WriteLine(\"Done!\");\r\n            });\r\n\r\n        app.AddFunctionScreen(Screens.Process2)\r\n            .SetAction(() =\u003e\r\n            {\r\n                Console.WriteLine(\"I'm done already!\");\r\n                return Task.CompletedTask;\r\n            });\r\n\r\n        app.Run();\r\n        // Or app.RunAsync().GetAwaiter().GetResult();\r\n    }\r\n}\r\n```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdistantcam%2Fcui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdistantcam%2Fcui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdistantcam%2Fcui/lists"}