Example #1
0
        public void New(string[] args)
        {
            if (args.Length > 3)
            {
                string   listName  = args[1];
                string[] languages = args.Skip(2).ToArray();

                Wordlist wordlist = new Wordlist(listName, languages);
                wordlist.Save();
            }
            else
            {
                GlossaryConsole.PrintErrorInstructionMessage();
            }
        }
Example #2
0
        static void Main(string[] args)
        {
            GlossaryConsole glossary = new GlossaryConsole();

            switch (args[0])
            {
            case "-list": { glossary.List(args); break; }

            case "-new": { glossary.New(args); break; }

            case "-add": { glossary.Add(args); break; }

            case "-remove": { glossary.Remove(args); break; }

            case "-words": { glossary.Words(args); break; }

            case "-count": { glossary.Count(args); break; }

            case "-practice": { glossary.Practice(args); break; }

            default: { GlossaryConsole.PrintErrorInstructionMessage(); break; }
            }
        }