Esempio n. 1
0
        private void simpleButton1_Click(object sender, EventArgs e)
        {
            var command1 = new ParameterValueSetCommand(new Parameter(), 1).Run(_myContext);

            command1.AddExtendedProperty("p1", "command1 p1");
            command1.AddExtendedProperty("p2", "command1 p2");
            var command2 = new MacroCommand <MyContext>().Add(command1, command1);

            command2.AddExtendedProperty("p1", "command2 p1");
            command2.AddExtendedProperty("p2", "command2 p2");
            var command3 = new ParameterValueSetCommand(new Parameter(), 3).Run(_myContext);

            command3.AddExtendedProperty("p1", "command3 p1");
            command3.AddExtendedProperty("p2", "command3 p2");
            var command4 = new ParameterValueSetCommand(new Parameter(), 4).Run(_myContext);

            command4.AddExtendedProperty("p1", "command4 p1");
            command4.AddExtendedProperty("p2", "command4 p2");
            var macroCommand = new MacroCommand <MyContext>().Add(command1, command2, command3);

            _historyManager.AddToHistory(macroCommand);
            _historyManager.AddToHistory(command4);
        }