Ejemplo n.º 1
0
        public SetupViewModel(
            IDialogManager dialogManager,
            IAppConfigService appConfigService,
            ModalWindowManager modalWindowManager)
        {
            _dialogManager      = dialogManager;
            AppConfigService    = appConfigService;
            _modalWindowManager = modalWindowManager;

            SetWireSharkFolderCmd = ReactiveCommand.CreateFromTask(async() =>
            {
                AppConfigService.Config.WiresharkPath = await _dialogManager.ShowFolderDialog();
            });

            SetPortCmd = ReactiveCommand.Create(() =>
            {
                _modalWindowManager.ShowModalFor <SetPortViewModel>();
            });

            SetBaudrateCmd = ReactiveCommand.Create(() =>
            {
                _modalWindowManager.ShowModalFor <SetBaudrateViewModel>();
            });
        }