protected override void InitializeCommand()
 {
     OpenConfigurationCommand = new SecureCommand(OpenConfigurationCommandExecute, CanOpenConfigurationCommandExecute);
     SelectUserCommand = new SecureCommand(SelectUserCommandExecute, CanSelectUserCommandExecute);
     AgentPortalCommand = new SecureCommand(AgentPortalCommandExecute, CanAgentPortalCommandExecute);
     base.InitializeCommand();
 }
 protected override void InitializeCommand()
 {
     OpenLocalImageCommand = new SecureCommand(OpenLocalImageCommandExecute, CanSelectImageCommandExecute);
     CameraImageCommand = new SecureCommand(CameraImageCommandExecute, CanSelectImageCommandExecute);
     EndScreenCaptureCommand = new SecureCommand(EndScreenCaptureCommandExecute, CanEndScreenCaptureCommandExecute);
     StartScreenCaptureCommand = new SecureCommand(StartScreenCaptureCommandExecute, CanStartScreenCaptureCommandExecute);
     base.InitializeCommand();
 }
 public override void Initialize()
 {
     StartCapturePhotoCommand = new SecureCommand(StartCapturePhotoCommandExecute, CanStartCapturePhotoCommandExecute);
     SaveCapturePhotoCommand = new SecureCommand(SaveCapturePhotoCommandExecute, CanSaveCapturePhotoCommandExecute);
     Title = Text.CameraPhoto;
     capturePhoto.SetValue(Text.CapturePhoto);
     save.SetValue(Text.Save);
     base.Initialize();
 }
 protected override void InitializeCommand()
 {
     base.InitializeCommand();
     OnMicCommandVM = new CommandViewModel(BuiltIns.OnMicCommand, this,OnMicCommandExecute);
     ConfigCommand = new SecureCommand(ConfigCommandExecute);
     PlayMusicCommand = new SecureCommand(PlayMusicCommandExecute, CanPlayMusicCommandExecute);
     ManageMusicCommand = new SecureCommand(ManageMusicCommandExecute, CanManageMusicCommandExecute);
     //RecordCommand = new SecureCommand(RecordCommandExecute);
     //PlayCommand = new SecureCommand(PlayCommandExecute);
     //StopCommand = new SecureCommand(StopCommandExecute);
 }
示例#5
0
 public CommandViewModel(Command cmd, RoomWindowViewModel owner, Action<SecureCommandArgs> execute, Func<SecureCommandArgs, bool> canExecute)
     : base(cmd)
 {
     if (cmd != null)
     {
         name.SetValue(cmd.Name);
         description.SetValue(cmd.Description);
         money.SetValue(cmd.Money.HasValue ? cmd.Money.Value : 0);
         commandType.SetValue(cmd.CommandType);
         SecureCommand = new SecureCommand(SecureCommandExecute, CanSecureCommandExecute) { Owner = owner };
     }
     this.execute = execute;
     this.canExecute = canExecute;
 }
 protected override void InitializeCommand()
 {
     Command = new SecureCommand(CommandExecute, CanCommandExecute);
     base.InitializeCommand();
 }
 protected override void InitializeCommand()
 {
     SaveCommand = new SecureCommand(SaveCommandExecute, CanSaveCommandExecute);
     ResetCommand = new SecureCommand(ResetCommandExecute, CanResetCommandExecute);
     base.InitializeCommand();
 }
 protected override void InitializeCommand()
 {
     SwitchUserCommand = new SecureCommand(SwitchUserCommandExecute, CanSwitchUserCommandExecute);
     CancelCommand = new SecureCommand(CancelCommandExecute, CanCancelCommandExecute);
     base.InitializeCommand();
 }
 public FunctionNodeViewModel(string title, ViewModelBase vm, SecureCommand cmd, ReadOnlyCollection<FunctionNodeViewModel> funcs, bool isSelected)
 {
     Title = title;
    
     functionVM = vm;
     funcCommand = cmd;
     functions = funcs;
     IsSelected = isSelected;
 }
 public FunctionNodeViewModel(string title, ViewModelBase vm, SecureCommand cmd, ReadOnlyCollection<FunctionNodeViewModel> funcs)
     : this(title, vm, cmd, funcs, false)
 {
 }
        public FunctionNodeViewModel(string title,  ViewModelBase vm, SecureCommand cmd)
            : this(title, vm, cmd, null)
        {

        }
 public SecureCommandViewModel(Action<SecureCommandArgs> execute, Func<SecureCommandArgs, bool> canExecute)
 {
     Command = new SecureCommand(execute, canExecute);
 }
 protected override void InitializeCommand()
 {
     TryNowCommand = new SecureCommand(TryNowCommandExecute, CanTryNowCommandExecute);
     base.InitializeCommand();
 }
 protected override void InitializeCommand()
 {
     ReserveRoomCommand = new SecureCommand(ReserveRoomCommandExecute, CanReserveRoomCommandExecute);
     RecommendRoomCommand = new SecureCommand(RecommendRoomCommandExecute, CanRecommendRoomCommandExecute);
     base.InitializeCommand();
 }
 public SecureCommandViewModel(Action <SecureCommandArgs> execute, Func <SecureCommandArgs, bool> canExecute)
 {
     Command = new SecureCommand(execute, canExecute);
 }
 protected override void InitializeCommand()
 {
     base.InitializeCommand();
     UploadMusicCommand = new SecureCommand(UploadMusicCommandExecute, CanUploadMusicCommandExecute);
     DeleteMusicCommand = new SecureCommand(DeleteMusicCommandExecute, CanDeleteMusicCommandExecute);
 }