示例#1
0
 public BoldCommand(Text text)
 {
     _text = text;
 }
示例#2
0
 public UnboldCommand(Text text)
 {
     _text = text;
 }
示例#3
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);
        }