private void RunCommandExample() { OrderInvoker ot = new OrderInvoker(); Console.WriteLine("Creating commands with receivers"); CmdAbstract create = new CmdCreateOrder(new RecCreateOrder()); CmdAbstract fill = new CmdFillOrder(new RecFillOrder()); CmdAbstract ship = new CmdShipOrder(new RecShipOrder()); CmdAbstract archive = new CmdArchiveOrder(new RecArchiveOrder()); Console.WriteLine("Setting create command in invoker"); ot.SetCommand(create); Console.WriteLine("Invoker executing command"); ot.Execute(); Console.WriteLine("Setting fill command in invoker"); ot.SetCommand(fill); Console.WriteLine("Invoker executing command"); ot.Execute(); Console.WriteLine("Setting ship command in invoker"); ot.SetCommand(ship); Console.WriteLine("Invoker executing command"); ot.Execute(); Console.WriteLine("Setting archive command in invoker"); ot.SetCommand(archive); Console.WriteLine("Invoker executing command"); ot.Execute(); }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); //RequestWindowFeature(WindowFeatures.NoTitle); SetContentView(Resource.Layout.ComissionsLayout); drawer = new Drawer(this); core = new ComissionsCore(this); orderInvoker = new OrderInvoker(this); SetResources(); }