Exemple #1
0
        private static bool ShowAndHandleMenu(string input)
        {
            switch (input)
            {
            case ".stop":
                return(false);

            case ".clients":
                foreach (KeyValuePair <User, bool> user in clients)
                {
                    log.Add(user.ToString(), MessageType.Debug);
                }
                break;

            case ".pause":
                stopReceive = true;
                break;

            case ".continue":
                stopReceive = false;
                break;

            case ".clean":
                cleaner.Clean();
                break;

            case ".cleanall":
                cleaner.CleanAll();
                break;

            case ".clear":
                Console.Clear();
                break;

            default:
                log.Add($"Commands: {Environment.NewLine}" +
                        $" .stop {Environment.NewLine}" +
                        $" .clients {Environment.NewLine}" +
                        $" .pause {Environment.NewLine}" +
                        $" .continue {Environment.NewLine}" +
                        $" .clean {Environment.NewLine}" +
                        $" .cleanall {Environment.NewLine}" +
                        $" .clear", MessageType.Debug);
                break;
            }

            return(true);
        }