Exemple #1
0
        public static void Main(string[] args)
        {
            Text     paragraph = new Text();
            ICommand bold      = new BoldCommand(paragraph);
            ICommand unbold    = new UnboldCommand(paragraph);

            RichTextEditorInvoker richTextEditor = new RichTextEditorInvoker();

            richTextEditor.StoreAndExecute(bold);
            richTextEditor.StoreAndExecute(unbold);
        }
Exemple #2
0
        public static void Main(string[] args)
        {
            Text paragraph = new Text();
            ICommand bold = new BoldCommand(paragraph);
            ICommand unbold = new UnboldCommand(paragraph);

            RichTextEditorInvoker richTextEditor  = new RichTextEditorInvoker();
            richTextEditor.StoreAndExecute(bold);
            richTextEditor.StoreAndExecute(unbold);
        }