mirror of
https://github.com/chylex/Code-Statistics.git
synced 2025-07-26 22:59:07 +02:00
Add a Quit option to main menu
This commit is contained in:
parent
453e0e9c5a
commit
a36f9d237c
CodeStatistics
9
CodeStatistics/Input/Methods/QuitProgram.cs
Normal file
9
CodeStatistics/Input/Methods/QuitProgram.cs
Normal file
@ -0,0 +1,9 @@
|
||||
using System;
|
||||
|
||||
namespace CodeStatistics.Input.Methods{
|
||||
class QuitProgram : IProjectInputMethod{
|
||||
public string[] Run(string[] args){
|
||||
return new string[0]; // automatically quits when an empty array is returned
|
||||
}
|
||||
}
|
||||
}
|
@ -27,6 +27,7 @@ namespace CodeStatistics{
|
||||
inputTabs.AddTab("Folder",new MultiFolderDialog());
|
||||
inputTabs.AddTab("GitHub",new MultiFolderDialog());
|
||||
inputTabs.AddTab("Magic",new MultiFolderDialog());
|
||||
inputTabs.AddTab("Quit",new QuitProgram());
|
||||
|
||||
inputTabs.Select += inputMethod => true; // breaks out
|
||||
inputTabs.Render();
|
||||
|
Loading…
Reference in New Issue
Block a user