Пример #1
0
            public override object GetValue(object component)
            {
                CommandMap map = component as CommandMap;

                if (null == map)
                {
                    throw new ArgumentException("component is not a CommandMap instance", "component");
                }
                return(map.Commands[this.Name]);
            }
Пример #2
0
 // Methods
 public CommandMapDescriptor(ICustomTypeDescriptor descriptor, CommandMap map)
     : base(descriptor)
 {
     this._map = map;
 }
Пример #3
0
 // Methods
 public CommandMapDescriptor(ICustomTypeDescriptor descriptor, CommandMap map)
     : base(descriptor)
 {
     this._map = map;
 }
Пример #4
0
 private void InitCommands()
 {
     this._commands = new CommandMap();
     this._commands.AddCommand("NewPuzzelCommand", x => this.NewPuzzel());
     this._commands.AddCommand("ShowPictureCommand", x => this.ShowPicture());
     this._commands.AddCommand("ShowPuzzelCommand", x => this.ShowPuzzel());
     this._commands.AddCommand("ReplayPuzzelCommand", x => this.ReplayPuzzel());
     this._commands.AddCommand("ShowVideoPuzzel", x => this.ShowVideoPuzzel());
 }