예제 #1
0
        public TaskbarIconViewModel(IMenuFactory menuFactory, IWindowsManager windowsManager)
        {
            this.menuFactory    = menuFactory;
            this.windowsManager = windowsManager;

            InitMenuItems();
        }
예제 #2
0
 public void Dispose()
 {
     if (_windowsManager != null)
     {
         _windowsManager = null;
     }
 }
예제 #3
0
        public NonMobileUserPopupPageViewModel(IRegionManager regionManager, IEventAggregator eventAggregator, IWindowsManager windowsManager, ILocationManager locationManager) : base(regionManager)
        {
            _eventAggregator = eventAggregator;
            _windowsManager  = windowsManager;
            _locationManager = locationManager;

            this.CancelCommand = new DelegateCommand(() => ExecuteCancelCommand());

            this.FillCommand = new DelegateCommand(async() => await ExecuteFillCommand());

            this.CountriesSelectionChangedCommand = new DelegateCommand(() => ExecuteCountriesSelectionChangedCommand());
            this.StatesSelectionChangedCommand    = new DelegateCommand(() => ExecuteStatesSelectionChangedCommand());

            if (this.Countries == null)
            {
                this.Countries       = _locationManager.GetCountries();
                this.SelectedCountry = this.Countries.FirstOrDefault();

                PostalCodePlaceholder = this.SelectedCountry.Id == 231 ? "Zip Code" : "Postal Code";
            }

            if (this.States == null && this.SelectedCountry != null)
            {
                var states = _locationManager.GetStates();
                this.States        = states.Where(x => x.CountryId == this.SelectedCountry.Id).ToList();
                this.SelectedState = this.States.FirstOrDefault();
            }

            if (this.Cities == null && this.SelectedState != null)
            {
                var cities = _locationManager.GetCities();
                this.Cities       = cities.Where(x => x.StateId == this.SelectedState.Id).ToList();
                this.SelectedCity = this.Cities.FirstOrDefault();
            }
        }
예제 #4
0
        /// <summary>
        /// Конструктор.
        /// </summary>
        public LoginViewModel(IContext context, IWindowsManager windowsManager) : this()
        {
            this.context = context;
            this.windowsManager = windowsManager;

            TryLoginCommand = new AsyncCommand(TryLogin, () => LoginUser.IsValid);
        }
예제 #5
0
        public PasswordManagerViewModel(IWindowsManager windowsManager, IQrScannerHelper qrScannerHelper,
                                        IMetaPubSub metaMessenger, IActiveDevice activeDevice, ISettingsManager <ApplicationSettings> settingsManager)
        {
            this.windowsManager  = windowsManager;
            this.qrScannerHelper = qrScannerHelper;
            _metaMessenger       = metaMessenger;
            _settingsManager     = settingsManager;

            _metaMessenger.Subscribe <ActiveDeviceChangedMessage>(OnActiveDeviceChanged);
            _metaMessenger.Subscribe <AddAccountForAppMessage>(OnAddAccountForApp);

            this.WhenAnyValue(x => x.SearchQuery)
            .Throttle(TimeSpan.FromMilliseconds(100))
            .Where(term => null != term)
            .DistinctUntilChanged()
            .InvokeCommand(FilterAccountCommand);

            this.WhenAnyValue(x => x.Device)
            .Where(x => null != x)
            .Subscribe(d => OnDeviceChanged());

            this.WhenAnyValue(x => x.SelectedAccount)
            .InvokeCommand(CancelCommand);

            // Todo: On update, preserve selection or if unable, clear it
            //Observable.FromEventPattern<NotifyCollectionChangedEventArgs>(Accounts, nameof(ObservableCollection<string>.CollectionChanged))
            //          .Subscribe(change => SelectedAccount = Accounts.FirstOrDefault());

            Device = activeDevice.Device != null ? new DeviceViewModel(activeDevice.Device) : null;
        }
예제 #6
0
 public UIModule(IContainer container, IRegionManager regionManager,
                 IWindowsManager windowsManager, IEventAggregator eventAggregator)
 {
     _eventAggregator = eventAggregator;
     _container       = container;
     _regionManager   = regionManager;
     _windowsManager  = windowsManager;
 }
예제 #7
0
 public InputLogin(IInputHandler inputHandler, ITemporaryCacheAccount temporaryCacheAccount
                   , IInputCache inputCache, ISettingsManager <ApplicationSettings> settingsManager
                   , IWindowsManager windowsManager, IDeviceManager deviceManager
                   , IEventPublisher eventPublisher)
     : base(inputHandler, temporaryCacheAccount, inputCache, settingsManager, windowsManager, deviceManager)
 {
     _eventPublisher = eventPublisher;
 }
예제 #8
0
 public DeviceManager(IMetaPubSub metaMessenger, IWindowsManager windowsManager, IRemoteDeviceFactory remoteDeviceFactory, IEnumerable <DeviceDTO> devices)
     : this(metaMessenger, windowsManager, remoteDeviceFactory)
 {
     foreach (var device in devices)
     {
         AddDevice(device);
     }
 }
예제 #9
0
        public static void StartTest(IWindowsManager _windowsManager)
        {
            windowsManager = new AppWindowManager(_windowsManager);
            new AppBootstrapper();

            var w = IoC.Get<IWindowManager>();
            w.ShowDialog(new ViewModels.MainViewModel());
        }
예제 #10
0
        public EditButtonsPopupPageViewModel(IRegionManager regionManager, IEventAggregator eventAggregator, IWindowsManager windowsManager) : base(regionManager)
        {
            _eventAggregator = eventAggregator;
            _windowsManager  = windowsManager;

            this.CancelCommand = new DelegateCommand(() => ExecuteCancelCommand());
            this.SubmitCommand = new DelegateCommand(async() => await ExecuteSubmitCommand());
        }
예제 #11
0
        public EntityViewModel(IWindowsManager windowsManager, IVirtualFileSystem fs, VirtualDirectory directory, bool isParentDirectory)
            : base(windowsManager)
        {
            _entityInfo = isParentDirectory
                ? new ParentDirectoryInfo(directory, fs)
                : new VirtualDirectoryInfo(directory, fs);

            EditableName = Name;
        }
        public RegisterMasterStoreReviewPageViewModel(IRegionManager regionManager,
                                                      IWindowsManager windowsManager, IEventAggregator eventAggregator) : base(regionManager)
        {
            _eventAggregator = eventAggregator;
            _windowsManager  = windowsManager;

            this.BackCommand   = new DelegateCommand(() => ExecuteBackCommand());
            this.SubmitCommand = new DelegateCommand(async() => await ExecuteSubmitCommand());
        }
예제 #13
0
        static public void StartTest(IWindowsManager _windowsManager)
        {
            windowsManager = new AppWindowManager(_windowsManager);
            new AppBootstrapper();

            var w = IoC.Get <IWindowManager>();

            w.ShowDialog(new ViewModels.MainViewModel());
        }
예제 #14
0
        public RegisterUserPopupPageViewModel(IRegionManager regionManager, IEventAggregator eventAggregator,
                                              IWindowsManager windowsManager) : base(regionManager)
        {
            _eventAggregator = eventAggregator;
            _windowsManager  = windowsManager;

            CancelCommand = new DelegateCommand(() => ExecuteCancelCommand());
            SubmitCommand = new DelegateCommand(async() => await ExecuteSubmitCommand());
        }
        public UpdateNonMobileUserPopupPageViewModel(IRegionManager regionManager, IEventAggregator eventAggregator, IWindowsManager windowsManager, ILocationManager locationManager) : base(regionManager)
        {
            _eventAggregator = eventAggregator;
            _windowsManager  = windowsManager;
            _locationManager = locationManager;

            this.CancelCommand = new DelegateCommand(() => ExecuteCancelCommand());
            this.SubmitCommand = new DelegateCommand(async() => await ExecuteSubmit());
            this.StatesSelectionChangedCommand = new DelegateCommand(() => ExecuteStatesSelectionChangedCommand());
        }
예제 #16
0
        public StoreValidationPageViewModel(IRegionManager regionManager, IWindowsManager windowsManager) : base(regionManager)
        {
            _windowsManager = windowsManager;

            this.SubmitCommand = new DelegateCommand(async() => await ExecuteSubmitCommand(),
                                                     () => !string.IsNullOrEmpty(this.Username) && !string.IsNullOrEmpty(this.AccessCode) && this.CanExecuteSubmitCommand)
                                 .ObservesProperty(() => this.Username)
                                 .ObservesProperty(() => this.AccessCode)
                                 .ObservesProperty(() => this.CanExecuteSubmitCommand);
        }
예제 #17
0
        public EditUserAgeOrNeedlePopupPageViewModel(IRegionManager regionManager, IEventAggregator eventAggregator, IWindowsManager windowsManager) : base(regionManager)
        {
            _eventAggregator = eventAggregator;
            _windowsManager  = windowsManager;

            this.VeryTerribleCheckedCommand   = new DelegateCommand <string>((user) => ExecuteVeryTerribleCheckedCommand(user));
            this.VeryTerribleUncheckedCommand = new DelegateCommand <string>((user) => ExecuteVeryTerribleUncheckedCommand(user));
            this.CancelCommand = new DelegateCommand(() => ExecuteCancelCommand());
            this.SubmitCommand = new DelegateCommand(async() => await ExecuteSubmitCommand());
        }
예제 #18
0
 public StartWindowViewModel(IWindowsManager windowsManager,
                             IFileSystemViewModelFactory fileSystemViewModelFactory,
                             IRelayCommandFactory commandFactory)
     : base(windowsManager)
 {
     _fileSystemViewModelFactory = fileSystemViewModelFactory;
     CreateDriveCommand          = commandFactory.Create(createDriveExec);
     OpenDriveCommand            = commandFactory.Create(openDriveExec);
     ExitCommand = commandFactory.Create(exitExec);
 }
예제 #19
0
 protected InputBase(IInputHandler inputHandler, ITemporaryCacheAccount temporaryCacheAccount
                     , IInputCache inputCache, ISettingsManager <ApplicationSettings> settingsManager
                     , IWindowsManager windowsManager, IDeviceManager deviceManager)
 {
     this.inputHandler          = inputHandler;
     this.temporaryCacheAccount = temporaryCacheAccount;
     this.inputCache            = inputCache;
     this.settingsManager       = settingsManager;
     this.windowsManager        = windowsManager;
     this.deviceManager         = deviceManager;
 }
예제 #20
0
        public DeviceManager(IMetaPubSub metaMessenger, IWindowsManager windowsManager, IRemoteDeviceFactory remoteDeviceFactory)
        {
            _windowsManager      = windowsManager;
            _remoteDeviceFactory = remoteDeviceFactory;
            _metaMessenger       = metaMessenger;

            _metaMessenger.TrySubscribeOnServer <DevicesCollectionChangedMessage>(OnDevicesCollectionChanged);
            _metaMessenger.TrySubscribeOnServer <DeviceConnectionStateChangedMessage>(OnDeviceConnectionStateChanged);

            _metaMessenger.Subscribe <DisconnectedFromServerEvent>(OnDisconnectedFromService, null);
        }
예제 #21
0
 public void Initialize()
 {
     try
     {
         _windowsManager = new WindowsManager();
     }
     catch (Exception ex)
     {
         throw new WindowsManagerException(WindowsManagerError.Unexpected, ex);
     }
 }
예제 #22
0
        public VSTalkCore(IWindowsManager windowsManager, IEnvironmentManager environmentManager, IModelContext modelContext)
        {
            WindowsManager     = windowsManager;
            EnvironmentManager = environmentManager;
            ModelContext       = modelContext;

            NotificationQueue = new NotificationQueue();

            Connector          = new ClientConnector(this);
            ControlsRepository = new ControlRepository(this);

            LoadConnections();
        }
예제 #23
0
        public VSTalkCore(IWindowsManager windowsManager, IEnvironmentManager environmentManager, IModelContext modelContext)
        {
            WindowsManager = windowsManager;
            EnvironmentManager = environmentManager;
            ModelContext = modelContext;

            NotificationQueue = new NotificationQueue();

            Connector = new ClientConnector(this);
            ControlsRepository = new ControlRepository(this);

            LoadConnections();
        }
        public DeviceSettingsPageViewModel(IServiceProxy serviceProxy, IWindowsManager windowsManager, IActiveDevice activeDevice, IMetaPubSub metaMessenger)
        {
            this.serviceProxy   = serviceProxy;
            this.windowsManager = windowsManager;
            _metaMessenger      = metaMessenger;

            _metaMessenger.Subscribe <ActiveDeviceChangedMessage>(OnActiveDeviceChanged);

            Сonnected = new StateControlViewModel
            {
                Name    = "Status.Device.Сonnected",
                Visible = true,
            };
            Initialized = new StateControlViewModel
            {
                Name    = "Status.Device.Initialized",
                Visible = true,
            };
            Authorized = new StateControlViewModel
            {
                Name    = "Status.Device.Authorized",
                Visible = true,
            };
            StorageLoaded = new StateControlViewModel
            {
                Name    = "Status.Device.StorageLoaded",
                Visible = true,
            };

            Indicators.Add(Сonnected);
            Indicators.Add(Initialized);
            Indicators.Add(Authorized);
            Indicators.Add(StorageLoaded);

            this.WhenAnyValue(x => x.Device).Where(d => d != null).Subscribe(d =>
            {
                PropertyChangedEventManager.AddListener(Device, this, nameof(Device.IsConnected));
                PropertyChangedEventManager.AddListener(Device, this, nameof(Device.IsInitialized));
                PropertyChangedEventManager.AddListener(Device, this, nameof(Device.IsAuthorized));
                PropertyChangedEventManager.AddListener(Device, this, nameof(Device.IsStorageLoaded));

                Сonnected.State     = StateControlViewModel.BoolToState(Device.IsConnected);
                Initialized.State   = StateControlViewModel.BoolToState(Device.IsInitialized);
                Authorized.State    = StateControlViewModel.BoolToState(Device.IsAuthorized);
                StorageLoaded.State = StateControlViewModel.BoolToState(Device.IsStorageLoaded);
            });

            this.WhenAnyValue(x => x.LockProximity, x => x.UnlockProximity).Where(t => t.Item1 != 0 && t.Item2 != 0).Subscribe(o => ProximityHasChanges = true);

            Device = activeDevice.Device != null ? new DeviceViewModel(activeDevice.Device) : null;
        }
예제 #25
0
 public MenuFactory(IStartupHelper startupHelper
                    , IWindowsManager windowsManager, IAppHelper appHelper,
                    ISettingsManager <ApplicationSettings> settingsManager, ISupportMailContentGenerator supportMailContentGenerator,
                    IServiceProxy serviceProxy, IActiveDevice activeDevice, IMetaPubSub metaMessenger)
 {
     _startupHelper               = startupHelper;
     _windowsManager              = windowsManager;
     _appHelper                   = appHelper;
     _settingsManager             = settingsManager;
     _supportMailContentGenerator = supportMailContentGenerator;
     _serviceProxy                = serviceProxy;
     _activeDevice                = activeDevice;
     _metaMessenger               = metaMessenger;
 }
예제 #26
0
        public MoveUserPopupPageViewModel(IRegionManager regionManager,
                                          IEventAggregator eventAggregator, IWindowsManager windowsManager) : base(regionManager)
        {
            _eventAggregator = eventAggregator;
            _windowsManager  = windowsManager;

            this.DeleteStoreUserCommand = new DelegateCommand(async() => await ExecuteDeleteStoreUserCommand());

            this.CancelCommand = new DelegateCommand(() => ExecuteCancelCommand());
            this.SubmitCommand = new DelegateCommand(async() => await ExecuteSubmitCommand(), () =>
            {
                int val = 0;
                return(int.TryParse(this.EnteredRow, out val));
            }).ObservesProperty(() => this.EnteredRow);
        }
예제 #27
0
파일: Game.cs 프로젝트: lllllgb/AosUnity
 public static void InitGameModule()
 {
     GameModuleManager.CreateModule <EventManager>();
     EventMgr = GameModuleManager.GetModule <IEventManager>();
     GameModuleManager.CreateModule <NetworkManager>();
     NetworkMgr = GameModuleManager.GetModule <INetworkManager>();
     GameModuleManager.CreateModule <ResourcesManager>();
     ResourcesMgr = GameModuleManager.GetModule <IResourcesManager>();
     GameModuleManager.CreateModule <FsmManager>();
     FsmMgr = GameModuleManager.GetModule <IFsmManager>();
     GameModuleManager.CreateModule <ProcedureManager>();
     ProcedureMgr = GameModuleManager.GetModule <IProcedureManager>();
     GameModuleManager.CreateModule <ControllerManager>();
     ControllerMgr = GameModuleManager.GetModule <IControllerManager>();
     GameModuleManager.CreateModule <WindowsManager>();
     WindowsMgr = GameModuleManager.GetModule <IWindowsManager>();
 }
예제 #28
0
        public ExpressTimePickerPopupPageViewModel(IRegionManager regionManager, IEventAggregator eventAggregator, IWindowsManager windowsManager) : base(regionManager)
        {
            _eventAggregator = eventAggregator;
            _windowsManager  = windowsManager;

            this.CancelCommand     = new DelegateCommand(() => ExecuteCancelCommand());
            this.SubmitCommand     = new DelegateCommand(() => ExecuteSubmitCommand());
            this.DayCheckedCommand = new DelegateCommand <string>((data) => ExecuteDayCheckedCommand(data));

            Hours   = new List <string>();
            Minutes = new List <string>();

            for (int i = 0; i <= 60; i++)
            {
                if (i > 0 && i < 13)
                {
                    if (i.ToString().Length == 1)
                    {
                        Hours.Add($"0{i}");
                    }
                    else
                    {
                        Hours.Add($"{i}");
                    }
                }

                if (i.ToString().Length == 1)
                {
                    Minutes.Add($"0{i}");
                }
                else
                {
                    Minutes.Add($"{i}");
                }
            }

            TimeMode = new List <string> {
                "AM", "PM"
            };
        }
        public EditAccountViewModel(DeviceViewModel device,
                                    AccountRecord accountRecord,
                                    IWindowsManager windowsManager,
                                    IQrScannerHelper qrScannerHelper,
                                    IMetaPubSub metaMessenger)
        {
            _windowsManager  = windowsManager;
            _qrScannerHelper = qrScannerHelper;
            _device          = device;
            _metaMessenger   = metaMessenger;

            if (accountRecord == null)
            {
                IsNewAccount  = true;
                cache         = new AccountRecord();
                AccountRecord = new AccountRecord();
            }
            else
            {
                cache         = accountRecord;
                AccountRecord = new AccountRecord
                {
                    Key       = accountRecord.Key,
                    StorageId = accountRecord.StorageId,
                    Timestamp = accountRecord.Timestamp,
                    Flags     = accountRecord.Flags,
                    Name      = accountRecord.Name,
                    Login     = accountRecord.Login,
                    Password  = accountRecord.Password,
                    OtpSecret = accountRecord.OtpSecret,
                    Apps      = accountRecord.Apps,
                    Urls      = accountRecord.Urls,
                    IsPrimary = accountRecord.IsPrimary,
                };
                InitProp(AccountRecord);
            }
            HasOpt = cache.Flags.HasOtp;
            InitDependencies();
        }
예제 #30
0
        public UserActionHandler(
            IMetaPubSub metaMessenger,
            IActiveDevice activeDevice,
            InputLogin inputLogin,
            InputPassword inputPassword,
            InputOtp inputOtp,
            ISettingsManager <ApplicationSettings> appSettingsManager,
            IHotkeyManager hotkeyManager,
            IWindowsManager windowsManager,
            ILog log)
            : base(nameof(UserActionHandler), log)
        {
            _metaMessenger      = metaMessenger;
            _activeDevice       = activeDevice;
            _inputLogin         = inputLogin;
            _inputPassword      = inputPassword;
            _inputOtp           = inputOtp;
            _appSettingsManager = appSettingsManager;
            _hotkeyManager      = hotkeyManager;
            _windowsManager     = windowsManager;

            _metaMessenger.Subscribe <HotkeyPressedMessage>(HotkeyPressedMessageHandler);
            _metaMessenger.Subscribe <ButtonPressedMessage>(ButtonPressedMessageHandler);
        }
예제 #31
0
        public MainPageViewModel(IRegionManager regionManager, IEventAggregator eventAggregator, IWindowsManager windowsManager) : base(regionManager)
        {
            _eventAggregator = eventAggregator;
            _windowsManager  = windowsManager;

            _eventAggregator.GetEvent <NonMobileUserUpdateEvent>().Subscribe(async(user) =>
            {
                _eventAggregator.GetEvent <PopupVisibilityEvent>().Publish(false);

                if (user != null)
                {
                    if (user.IsNewRecord)
                    {
                        this.NonMobileUser = user;
                        this.FirstName     = user.FirstName;
                        this.LastName      = user.LastName;
                    }
                    else
                    {
                        await GetData();
                    }
                }
            });

            _eventAggregator.GetEvent <NonMobileUserEditEvent>().Subscribe(async(user) =>
            {
                _eventAggregator.GetEvent <PopupVisibilityEvent>().Publish(false);

                if (user != null)
                {
                    await GetData();
                }
            });

            _eventAggregator.GetEvent <EditStoreUserSubmitEvent>().Subscribe(async(user) =>
            {
                _eventAggregator.GetEvent <PopupVisibilityEvent>().Publish(false);

                if (user != null)
                {
                    await GetData();
                }
            });

            _eventAggregator.GetEvent <MoveStoreUserSubmitEvent>().Subscribe(async(user) =>
            {
                _eventAggregator.GetEvent <PopupVisibilityEvent>().Publish(false);

                if (user != null)
                {
                    await GetData();
                }
            });

            _eventAggregator.GetEvent <MoveStoreUserToArchiveSubmitEvent>().Subscribe(async(user) =>
            {
                _eventAggregator.GetEvent <PopupVisibilityEvent>().Publish(false);

                if (user != null)
                {
                    await GetData();
                }
            });

            _eventAggregator.GetEvent <EditButtonsSubmitEvent>().Subscribe(async(user) =>
            {
                _eventAggregator.GetEvent <PopupVisibilityEvent>().Publish(false);

                if (user != null)
                {
                    await GetData();
                }
            });

            _eventAggregator.GetEvent <RegisterStoreUserSubmitEvent>().Subscribe(async(user) =>
            {
                _eventAggregator.GetEvent <PopupVisibilityEvent>().Publish(false);
                ResetFields();
                if (user != null)
                {
                    await GetData();
                }
            });

            this.NonMobileUserCommand                 = new DelegateCommand(() => ExecuteNonMobileUserCommand());
            this.AddUserCommand                       = new DelegateCommand(async() => await ExecuteAddUserCommand());
            this.DeleteStoreUserCommand               = new DelegateCommand <StoreUserEntity>(async(user) => await ExecuteDeleteStoreUserCommand(user));
            this.DeleteArchiveUserCommand             = new DelegateCommand <StoreUserEntity>(async(user) => await ExecuteDeleteArchiveUserCommand(user));
            this.EditStoreUserCommand                 = new DelegateCommand <StoreUserEntity>((user) => ExecuteEditStoreUserCommand(user));
            this.SetFlagCommand                       = new DelegateCommand <StoreUserEntity>((user) => ExecuteFlagCommand(user));
            this.EditNonMobileStoreUserCommand        = new DelegateCommand <StoreUserEntity>((user) => ExecuteEditNonMobileStoreUserCommand(user));
            this.EditStoreButtonsCommand              = new DelegateCommand <StoreUserEntity>((user) => ExecuteEditStoreButtonsCommand(user));
            this.EditArchiveButtonsCommand            = new DelegateCommand <StoreUserEntity>((user) => ExecuteEditArchiveButtonsCommand(user));
            this.EditNonMobileArchiveStoreUserCommand = new DelegateCommand <StoreUserEntity>((user) => ExecuteEditNonMobileArchiveStoreUserCommand(user));
            this.MoveStoreUserCommand                 = new DelegateCommand <StoreUserEntity>((user) => ExecuteMoveStoreUserCommand(user));
            this.LogoutCommand                = new DelegateCommand(() => ExecuteLogoutCommand());
            this.RefreshDataCommand           = new DelegateCommand(async() => await ExecuteRefreshDataCommand());
            this.StoreIDCheckedCommand        = new DelegateCommand <StoreUserEntity>(async(user) => await ExecuteStoreIDCheckedCommand(user));
            this.ArchiveIDCheckedCommand      = new DelegateCommand <StoreUserEntity>(async(user) => await ExecuteArchiveIDCheckedCommand(user));
            this.UserDetailWindowCommand      = new DelegateCommand <StoreUserEntity>((user) => ExecuteUserDetailWindowCommand(user));
            this.VeryTerribleCheckedCommand   = new DelegateCommand <string>((user) => ExecuteVeryTerribleCheckedCommand(user));
            this.VeryTerribleUncheckedCommand = new DelegateCommand <string>((user) => ExecuteVeryTerribleUncheckedCommand(user));


            #region Pusher Events Subscribe

            _eventAggregator.GetEvent <RefreshData>().Subscribe((model) =>
            {
                try
                {
                    lock (locker)
                    {
                        if (model.Action == PusherAction.Store)
                        {
                            if (model.EventName.Equals(PusherData.DeleteStoreUser))
                            {
                                Task.WaitAll(GetData());
                            }
                            else
                            {
                                Task.WhenAll(GetStoreUsers());
                            }
                        }
                        else if (model.Action == PusherAction.Archieve)
                        {
                            Task.WhenAll(GetArchieveStoreUsers());
                        }
                    }
                }
                catch (Exception) { }
            });

            #endregion
        }
 public EditAccountViewModel(DeviceViewModel device, IWindowsManager windowsManager, IQrScannerHelper qrScannerHelper, IMetaPubSub metaMessenger)
     : this(device, null, windowsManager, qrScannerHelper, metaMessenger)
 {
 }
예제 #33
0
 public AppWindowManager(IWindowsManager _windowManager)
 {
     windowManager = _windowManager;
 }