public WinActiveTriggerEditor(
            [NotNull] IWindowSelectorViewModel windowSelector)
        {
            WindowSelector = windowSelector.AddTo(Anchors);
            activeSourceAnchors.AddTo(Anchors);

            this.WhenAnyValue(x => x.Source)
            .Subscribe(HandleSourceChange)
            .AddTo(Anchors);
        }
        public OverlayAuraPropertiesEditorViewModel(
            [NotNull] IAuraRepository repository,
            [NotNull] IFactory <IPropertyEditorViewModel> propertiesEditorFactory,
            [NotNull] IWindowSelectorViewModel windowSelector,
            [NotNull][Dependency(WellKnownSchedulers.UI)] IScheduler uiScheduler)
        {
            this.repository = repository;
            this.propertiesEditorFactory = propertiesEditorFactory;
            this.uiScheduler             = uiScheduler;
            WindowSelector = windowSelector.AddTo(Anchors);
            activeSourceAnchors.AddTo(Anchors);

            addTriggerCommand = new DelegateCommand <object>(AddTriggerCommandExecuted);
            addActionCommand  = new DelegateCommand <object>(AddOnEnterActionCommandExecuted);

            repository.KnownEntities
            .ToObservableChangeSet()
            .Filter(x => x is IAuraTrigger)
            .Transform(x => x as IAuraTrigger)
            .Bind(out var knownTriggers)
            .Subscribe()
            .AddTo(Anchors);
            KnownTriggers = knownTriggers;

            repository.KnownEntities
            .ToObservableChangeSet()
            .Filter(x => x is IAuraAction)
            .Transform(x => x as IAuraAction)
            .Bind(out var knownActions)
            .Subscribe()
            .AddTo(Anchors);
            KnownActions = knownActions;

            this.WhenAnyValue(x => x.Source)
            .Subscribe(HandleSourceChange)
            .AddTo(Anchors);
        }
Beispiel #3
0
 public WinActivateAction(IWindowSelectorViewModel windowSelector)
 {
     WindowSelector = windowSelector;
     this.RaiseWhenSourceValue(x => x.TargetWindow, windowSelector, x => x.TargetWindow).AddTo(Anchors);
 }