Exemplo n.º 1
0
        static void ChangeKey(string key)
        {
            DocumentProgram documentProgram;


            switch (key)
            {
            case "basic":
                documentProgram = new DocumentProgram();

                break;

            case "pro":
                documentProgram = new ProDocumentProgram();

                break;

            case "expert ":
                documentProgram = new ExpertDocument();

                break;

            default:
                throw new ArgumentException("Keyword is not valid");
            }
            ShowFull(documentProgram);
        }
Exemplo n.º 2
0
 static void ShowFull(DocumentProgram documentProgram)
 {
     documentProgram.OpenDocument();
     documentProgram.EditDocument();
     documentProgram.SaveDocument();
 }