Ejemplo n.º 1
0
        public override void CreateViewModel()
        {
            if (UseEmptyViewModel || string.IsNullOrEmpty(ViewModelInitValueJson))
            {
                VM = new PTestViewModel();
            }
            else
            {
                VM = JsonConvert.DeserializeObject <PTestViewModel> (ViewModelInitValueJson);
                ViewModelPropertyRef();
            }

            VM.AddHostView(ViewModelBase.DefaultViewBaseKey, this);
        }
Ejemplo n.º 2
0
        public override void Initialize(ViewModelBase viewModel)
        {
            if (viewModel != null)
            {
                VM = (PTestViewModel)viewModel;
                VM.AddHostView(ViewModelBase.DefaultViewBaseKey, this);
            }
            else
            {
                if (AutoCreateViewModel && VM == null)
                {
                    CreateViewModel();
                }
            }

            base.Initialize(VM);
        }
Ejemplo n.º 3
0
 /*  */
 public virtual void DefaultCommand3(PTestViewModel viewModel)
 {
 }
Ejemplo n.º 4
0
 /*  */
 public virtual void DefaultCommand1(PTestViewModel viewModel, DefaultCommand1Command command)
 {
 }
Ejemplo n.º 5
0
        public override void Attach(ViewModelBase viewModel)
        {
            PTestViewModel vm = (PTestViewModel)viewModel;

            vm.RC_DefaultCommand1.Subscribe <DefaultCommand1Command> (command => {
                command.Sender = viewModel;
                DefaultCommand1((PTestViewModel)viewModel, command);
            }).AddTo(viewModel.baseAttachDisposables);
            vm.RC_DefaultCommand2.Subscribe(_ => {
                DefaultCommand2((PTestViewModel)viewModel);
            }).AddTo(viewModel.baseAttachDisposables);
            vm.RC_DefaultCommand3.Subscribe(_ => {
                DefaultCommand3((PTestViewModel)viewModel);
            }).AddTo(viewModel.baseAttachDisposables);
            vm.RC_DefaultCommand4.Subscribe(_ => {
                DefaultCommand4((PTestViewModel)viewModel);
            }).AddTo(viewModel.baseAttachDisposables);
            vm.RC_DefaultCommand5.Subscribe(_ => {
                DefaultCommand5((PTestViewModel)viewModel);
            }).AddTo(viewModel.baseAttachDisposables);
            vm.RC_DefaultCommand6.Subscribe(_ => {
                DefaultCommand6((PTestViewModel)viewModel);
            }).AddTo(viewModel.baseAttachDisposables);
            vm.RC_DefaultCommand7.Subscribe(_ => {
                DefaultCommand7((PTestViewModel)viewModel);
            }).AddTo(viewModel.baseAttachDisposables);
            vm.RC_DefaultCommand8.Subscribe <DefaultCommand8Command> (command => {
                command.Sender = viewModel;
                DefaultCommand8((PTestViewModel)viewModel, command);
            }).AddTo(viewModel.baseAttachDisposables);
            vm.RC_DefaultCommand9.Subscribe(_ => {
                DefaultCommand9((PTestViewModel)viewModel);
            }).AddTo(viewModel.baseAttachDisposables);
            vm.RC_DefaultCommand10.Subscribe(_ => {
                DefaultCommand10((PTestViewModel)viewModel);
            }).AddTo(viewModel.baseAttachDisposables);
            vm.RC_DefaultCommand11.Subscribe(_ => {
                DefaultCommand11((PTestViewModel)viewModel);
            }).AddTo(viewModel.baseAttachDisposables);
            vm.RC_DefaultCommand12.Subscribe(_ => {
                DefaultCommand12((PTestViewModel)viewModel);
            }).AddTo(viewModel.baseAttachDisposables);
            vm.RC_DefaultCommand13.Subscribe(_ => {
                DefaultCommand13((PTestViewModel)viewModel);
            }).AddTo(viewModel.baseAttachDisposables);
            vm.RC_DefaultCommand14.Subscribe(_ => {
                DefaultCommand14((PTestViewModel)viewModel);
            }).AddTo(viewModel.baseAttachDisposables);
            vm.RC_DefaultCommand15.Subscribe(_ => {
                DefaultCommand15((PTestViewModel)viewModel);
            }).AddTo(viewModel.baseAttachDisposables);
            vm.RC_DefaultCommand16.Subscribe(_ => {
                DefaultCommand16((PTestViewModel)viewModel);
            }).AddTo(viewModel.baseAttachDisposables);
            vm.RC_DefaultCommand17.Subscribe(_ => {
                DefaultCommand17((PTestViewModel)viewModel);
            }).AddTo(viewModel.baseAttachDisposables);
            vm.RC_DefaultCommand18.Subscribe(_ => {
                DefaultCommand18((PTestViewModel)viewModel);
            }).AddTo(viewModel.baseAttachDisposables);
            vm.RC_DefaultCommand19.Subscribe(_ => {
                DefaultCommand19((PTestViewModel)viewModel);
            }).AddTo(viewModel.baseAttachDisposables);
            vm.RC_DefaultCommand20.Subscribe(_ => {
                DefaultCommand20((PTestViewModel)viewModel);
            }).AddTo(viewModel.baseAttachDisposables);
        }
Ejemplo n.º 6
0
 public override void SetViewModel(ViewModelBase viewModel)
 {
     VM = (PTestViewModel)viewModel;
 }
Ejemplo n.º 7
0
 /*  */
 public override void DefaultCommand14(PTestViewModel viewModel)
 {
     base.DefaultCommand14(viewModel);
 }
Ejemplo n.º 8
0
 /*  */
 public override void DefaultCommand8(PTestViewModel viewModel, DefaultCommand8Command command)
 {
     base.DefaultCommand8(viewModel, command);
 }