public ScheduledNotifierViewModel(ScheduledNotifierModel _model)
        {
            Model = _model.AddTo(DisposeCollection);

            Progress = ScheduledNotifier.ToReadOnlyReactivePropertySlim().AddTo(DisposeCollection);

            TakeLongTimeCommand.Subscribe(TakeLongTimeAsync).AddTo(DisposeCollection);
        }
Пример #2
0
        public BusyNotifierViewModel(BusyNotifierModel _model)
        {
            Model = _model;

            BusyNotifierStatus = BusyNotifier.Select(item => item ? "処理中" : "処理していない").ToReactiveProperty().AddTo(DisposeCollection);

            TakeLongTimeCommand = BusyNotifier.Select(b => !b).ToReactiveCommand().AddTo(DisposeCollection);
            TakeLongTimeCommand.Subscribe(TakeLongTimeAsync).AddTo(DisposeCollection);

            OtherTakeLongTimeCommand = BusyNotifier.Select(b => !b).ToReactiveCommand().AddTo(DisposeCollection);
            OtherTakeLongTimeCommand.Subscribe(TakeLongTimeAsync).AddTo(DisposeCollection);
            OtherTakeLongTimeCommand.Subscribe(OtherTakeLongTimeAsync).AddTo(DisposeCollection);
        }