Exemplo n.º 1
0
        static public void ProgramMode(string keyWord)
        {
            DocumentProgram DP;

            switch (keyWord)
            {
            case "basic":
                DP = new DocumentProgram();
                DP.OpenDOcument();
                DP.EditDocument();
                DP.SaveDocument();
                break;

            case "pro":
                DP = new ProDocumentProgram();
                DP.OpenDOcument();
                DP.EditDocument();
                DP.SaveDocument();
                break;

            case "expert":
                DP = new ExpertDocumentProgram();
                DP.OpenDOcument();
                DP.EditDocument();
                DP.SaveDocument();
                break;

            default:
                Console.WriteLine("Invalid choice !");
                break;
            }
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            DocumentProgram docProgram = null;

            while (true)
            {
                var input = Console.ReadLine();
                Console.Clear();
                switch (input)
                {
                case "basic": docProgram = new DocumentProgram(); break;

                case "pro": docProgram = new ProDocumentProgram(); break;

                case "expert": docProgram = new ExpertDocument(); break;

                default: Console.WriteLine("Achar soz sehvdir"); continue;
                }

                docProgram.OpenDocument();
                docProgram.EditDocument();
                docProgram.SaveDocument();
            }
        }