private void PropertyAnimation_Stop(object sender, EventArgs e) { ReactiveObject.TryDeleteValueByPriority(_property, ReactiveObject.ANIMATION_VALUE); }
protected override void UpdateValue(float value) { var valueConverted = ConvertScaleValue(value); ReactiveObject.SetValue <T>(_property, ReactiveObject.ANIMATION_VALUE, valueConverted); }
public override OpenGui.Animations.Animation GetAnimation(ReactiveObject objectToAnimate) { return(new OpenGui.Animations.ParallelAnimation(objectToAnimate, Animations.Select(a => a.GetAnimation(objectToAnimate)))); }
public PropertyAnimation(ReactiveObject objectToAnimate, int duration, string property) : base(objectToAnimate, duration) { _property = property; this.Stop += PropertyAnimation_Stop; }
public ParallelAnimation(ReactiveObject obj, IEnumerable <Animation> animations) : base(obj, animations.Max((a) => a.Duration)) { _animations = animations; }
public GraphicsSection() { MaxAnisotropy = new ReactiveObject <float>(); ShadersDumpPath = new ReactiveObject <string>(); EnableVsync = new ReactiveObject <bool>(); }
public void SetActiveOverlay(ReactiveObject overlay) { ActiveOverlay = overlay; //Application.Current.Dispatcher.BeginInvoke(DispatcherPriority.Render, (Action)OnAfterRendered); Task.Run(OnAfterOverlayRendered); }
/// <summary> /// RaisePropertyChanged is a helper method intended for test / mock /// scenarios to manually fake a property change. /// </summary> /// <param name="target">The ReactiveObject to invoke /// raisePropertyChanging on.</param> /// <param name="property">The property that will be faking a change.</param> public static void RaisePropertyChanged(ReactiveObject target, string property) { target.raisePropertyChanged(property); }
public abstract Task Handle(IEvent @event, ReactiveObject state, MultiInstanceFactory factory);
public override Task Handle(IEvent @event, ReactiveObject state, MultiInstanceFactory factory) { var tasks = GetTasks(@event, state, factory); return(Task.WhenAll(tasks)); }
private void OpenRxUi(string title, ReactiveObject content) { //_logger.Debug("Opening '{0}'", title); _viewCreatedSubject.OnNext(_viewContainerFactory(title, _rxUiHostViewModelFactory(content))); //_logger.Debug("--Opened '{0}'", title); }
/// <summary> /// Initializes a new instance of the <see cref="MainWindowViewModel"/> class. /// </summary> public MainWindowViewModel() { // Initally show the login view. this.content = new LoginViewModel(); }
public MainControlPanelViewModel(StellaServerLib.StellaServer stellaServer, StoryboardRepository storyboardRepository, BitmapStoryboardCreator bitmapStoryboardCreator, BitmapRepository bitmapRepository, BitmapThumbnailRepository thumbnailRepository, LogViewModel logViewModel, MidiInputManager midiInputManager) { _stellaServer = stellaServer; AnimationsPanelViewModel = new AnimationsPanelViewModel(storyboardRepository, bitmapStoryboardCreator, bitmapRepository); AnimationsPanelViewModel.StartAnimationRequested += StartAnimation; AnimationsPanelViewModel.SendToPadRequested += AnimationsPanelViewModel_OnSendToPadRequested; this.WhenAnyValue(x => x.AnimationsPanelViewModel.SelectedAnimation) .Subscribe(onNext => { if (onNext == null) { SelectedViewModel = null; return; } if (onNext.Animation is Storyboard storyboard) { var viewmodel = new StoryboardDetailsControlViewModel(storyboard, bitmapRepository); viewmodel.Back.Subscribe(next => { SelectedViewModel = NavigationViewModel; }); SelectedViewModel = viewmodel; return; } if (onNext.Animation is PlayList playList) { var viewmodel = new PlaylistDetailsContolViewModel(playList, bitmapRepository); viewmodel.Back.Subscribe(next => { SelectedViewModel = NavigationViewModel; }); SelectedViewModel = viewmodel; return; } throw new NotImplementedException("Unknown animation type"); }); StatusViewModel = new StatusViewModel(stellaServer, 3, logViewModel); //TODO insert number of clients AnimationCreationViewModel = new AnimationCreationViewModel(bitmapRepository, bitmapStoryboardCreator, thumbnailRepository, 6, 24); // Todo insert number of rows, number of tubes AnimationCreationViewModel.Save.Subscribe(onNext => AnimationsPanelViewModel.AddItem(onNext)); AnimationCreationViewModel.Start.Subscribe(onNext => StartAnimation(null, onNext)); AnimationCreationViewModel.Back.Subscribe(onNext => SelectedViewModel = NavigationViewModel); if (midiInputManager != null) { MidiPanelViewModel = new MidiPanelViewModel(4, 4, 10, midiInputManager); //TODO configurable midi buttons MidiPanelViewModel.StartAnimation.Subscribe(x => { StartAnimation(null, x); }); midiInputManager.Stop.Subscribe(x => { StartAnimation(null, FindStopAnimation()); }); } NavigationViewModel = new NavigationViewModel(); NavigationViewModel.NavigateToCreateAnimation.Subscribe(onNext => SelectedViewModel = AnimationCreationViewModel); NavigationViewModel.NavigateToMidiPanel.Subscribe(onNext => SelectedViewModel = MidiPanelViewModel); SelectedViewModel = NavigationViewModel; }
public HidSection() { EnableKeyboard = new ReactiveObject <bool>(); Hotkeys = new ReactiveObject <KeyboardHotkeys>(); InputConfig = new ReactiveObject <List <InputConfig> >(); }
public RxUiHostViewModel(ReactiveObject content) { Content = content; }
public ColumnSortSettings() { SortColumnId = new ReactiveObject <int>(); SortAscending = new ReactiveObject <bool>(); }
public GraphicsSection() { ShadersDumpPath = new ReactiveObject <string>(); EnableVsync = new ReactiveObject <bool>(); }
public static void OnPropertyChanged(this ReactiveObject reactiveObject, [CallerMemberName] string propertyName = null) { reactiveObject.RaisePropertyChanged(propertyName); }
public static void RaisePropertyChanged <T>(this ReactiveObject reactiveObject, Expression <Func <T> > changedProperty) { var name = ((MemberExpression)changedProperty.Body).Member.Name; reactiveObject.OnPropertyChanged(name); }