示例#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());
 }