示例#1
0
        private static void CommandBusSample()
        {
            CommandBus bus = new CommandBus();

            ICommand cmd = new ChangeUserPassowrdCmd(1, "qwert1234", "QWERTY1234");

            bus.Send(cmd);

            cmd = new AddUserCommnad("jan", "kowalski");

            bus.Send(cmd);
        }
示例#2
0
        private static void ButtonSample()
        {
            ICommand cmd = new ChangeUserPassowrdCmd(1, "zxc", "asd");
            Button   btn = new Button(cmd);

            btn.Click();

            ICommand cmd2 = new AddUserCommnad("jan", "kowalski");

            btn.SetClickCommnad(cmd2);

            btn.Click();
        }