2020-05-23 09:51:17 +00:00
|
|
|
using treasurechest.STDIOWrapper;
|
|
|
|
using System;
|
|
|
|
|
|
|
|
namespace treasurechestCLI{
|
|
|
|
|
|
|
|
|
|
|
|
internal class GetMessage{
|
|
|
|
|
|
|
|
internal static string getTypedMessage(){
|
|
|
|
|
|
|
|
translations.Strings strings = new translations.Strings();
|
|
|
|
string message = "";
|
|
|
|
string line = "";
|
|
|
|
STDIO.O(strings.ENTER_MESSAGE_UNTIL_DONE);
|
|
|
|
while (true){
|
2020-05-24 08:40:51 +00:00
|
|
|
try{
|
|
|
|
line = Console.ReadLine();
|
|
|
|
}
|
|
|
|
catch(System.ArgumentNullException){
|
|
|
|
line = "-q";
|
|
|
|
}
|
2020-05-23 09:51:17 +00:00
|
|
|
if (line.Equals("-q")){
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
message += line;
|
|
|
|
}
|
|
|
|
return message;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|