コード例 #1
0
 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();
 }
コード例 #2
0
 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();
 }
コード例 #3
0
 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);
 }
コード例 #4
0
            public void Consume(IConsumeContext <T> message)
            {
                var output = new SecureCommand <T>()
                {
                    Command     = message.Message,
                    Credentials = new UserCredentials {
                        Username = "******", Password = "******"
                    },
                };

                message.Bus.Publish(output, x => x.ForwardUsingOriginalContext(message));
            }
コード例 #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;
 }
コード例 #6
0
 protected override void InitializeCommand()
 {
     Command = new SecureCommand(CommandExecute, CanCommandExecute);
     base.InitializeCommand();
 }
コード例 #7
0
 protected override void InitializeCommand()
 {
     base.InitializeCommand();
     UploadMusicCommand = new SecureCommand(UploadMusicCommandExecute, CanUploadMusicCommandExecute);
     DeleteMusicCommand = new SecureCommand(DeleteMusicCommandExecute, CanDeleteMusicCommandExecute);
 }
コード例 #8
0
 protected override void InitializeCommand()
 {
     SwitchUserCommand = new SecureCommand(SwitchUserCommandExecute, CanSwitchUserCommandExecute);
     CancelCommand     = new SecureCommand(CancelCommandExecute, CanCancelCommandExecute);
     base.InitializeCommand();
 }
コード例 #9
0
 protected override void InitializeCommand()
 {
     ReserveRoomCommand   = new SecureCommand(ReserveRoomCommandExecute, CanReserveRoomCommandExecute);
     RecommendRoomCommand = new SecureCommand(RecommendRoomCommandExecute, CanRecommendRoomCommandExecute);
     base.InitializeCommand();
 }
コード例 #10
0
 protected override void InitializeCommand()
 {
     OpenConfigurationCommand = new SecureCommand(OpenConfigurationCommandExecute, CanOpenConfigurationCommandExecute);
     SelectUserCommand        = new SecureCommand(SelectUserCommandExecute, CanSelectUserCommandExecute);
     base.InitializeCommand();
 }
コード例 #11
0
 protected override void InitializeCommand()
 {
     TryNowCommand = new SecureCommand(TryNowCommandExecute, CanTryNowCommandExecute);
     base.InitializeCommand();
 }
コード例 #12
0
 protected override void InitializeCommand()
 {
     SaveCommand  = new SecureCommand(SaveCommandExecute, CanSaveCommandExecute);
     ResetCommand = new SecureCommand(ResetCommandExecute, CanResetCommandExecute);
     base.InitializeCommand();
 }