Esempio n. 1
0
 public AccountVM()
 {
     NewAccountCommand        = new CommandAsync(NewAccount);
     DeleteAccountCommand     = new CommandAsync(DeleteAccount);
     dispatcherTimer.Tick    += Refresh;
     dispatcherTimer.Interval = new TimeSpan(0, 0, 1);
     dispatcherTimer.Start();
 }
Esempio n. 2
0
 public CompanyVM()
 {
     //ExecuteLoadCompanies();
     CompanyChangedCommand    = new CommandAsync(SetCompID);
     dispatcherTimer.Tick    += Refresh;
     dispatcherTimer.Interval = new TimeSpan(0, 0, 1);
     dispatcherTimer.Start();
 }
        public NetDiskFileNodeViewModel(IUnityContainer container, IMountUserRepository mountUserRepository, INetDiskFile netDiskFile)
            : base(container)
        {
            _mountUserRepository = mountUserRepository;
            _netDiskFile         = netDiskFile;

            DeleteFileCommand           = new Command(DeleteFileCommandExecuteAsync);
            DownloadFileCommand         = new Command(DownloadFileCommandExecuteAsync);
            RefreshChildrenCommandAsync = new CommandAsync(RefreshChildrenCommandExecuteAsync, () => !RefreshChildrenCommandAsync.IsWorking);

            EventAggregator.GetEvent <DownloadStateChangedEvent>().Subscribe(
                OnDownloadStateChanged,
                Prism.Events.ThreadOption.UIThread,
                keepSubscriberReferenceAlive: false,
                filter: e => e.FileId == FileId);
            EventAggregator.GetEvent <DownloadProgressChangedEvent>().Subscribe(
                OnDownloadProgressChanged,
                Prism.Events.ThreadOption.UIThread,
                keepSubscriberReferenceAlive: false,
                filter: e => e.FileId == FileId);
        }
Esempio n. 4
0
 public void ConstructHimself()
 {
     _ = new CommandAsync(_actionToExecute);
 }
Esempio n. 5
0
 public void TestInitialize()
 {
     _actualCount     = 0;
     _actionToExecute = () => _actualCount++;
     _sut             = new CommandAsync(_actionToExecute);
 }