Beispiel #1
0
 public ReportViewModel(INavigationService navigationService, ITrackingService trackingService, IUserService userService, ILoadingService loadingService)
 {
     this.navigationService = navigationService;
     this.trackingService   = trackingService;
     this.userService       = userService;
     this.loadingService    = loadingService;
 }
Beispiel #2
0
 public TaskRunner(ITaskService taskService,
                   ILoadingService loadingService)
 {
     _loadingService    = loadingService;
     _taskService       = taskService;
     _percentCalculator = new PercentCalculator();
 }
Beispiel #3
0
 public LocationService(
     ILoadingService loadingService,
     IDialogService dialogService)
 {
     _loadingService = loadingService;
     _dialogService  = dialogService;
 }
Beispiel #4
0
 public LoginViewModel(INavigationService navigationService, IPageDialogService pageDialogService, IUserService userService, ILoadingService loadingService,
                       IEventAggregator eventAggregator)
 {
     this._navigationService = navigationService;
     this._pageDialogService = pageDialogService;
     this._userService       = userService;
     this.loadingService     = loadingService;
 }
Beispiel #5
0
 public CachedTableManager(
     MobileServiceClient mobileServiceClient,
     ILoadingService loadingService,
     IDialogService dialogservice)
 {
     _table          = mobileServiceClient.GetTable <T>();
     _loadingService = loadingService;
     _dialogService  = dialogservice;
 }
        public LoggedInApplicationState(WinRTContainer container, ISavvyNavigationService navigationService, ILoadingService loadingService, ISessionStateService sessionStateService)
        {
            this._container = container;
            this._navigationService = navigationService;
            this._loadingService = loadingService;
            this._sessionStateService = sessionStateService;

            this._refreshItem = new NavigationItemViewModel(async () => await this.RefreshAsync()) { Label = "Refresh", Symbol = Symbol.Refresh };
            this._logoutItem = new NavigationItemViewModel(this.Logout) { Label = "Logout", Symbol = Symbol.LeaveChat };
        }
Beispiel #7
0
 public LoginViewModel(
     ILoadingService loadingService,
     IDialogService dialogservice,
     IAuthenticationService authenticationService,
     MobileServiceClient mobileServiceClient)
 {
     _loadingService        = loadingService;
     _dialogService         = dialogservice;
     _authenticationService = authenticationService;
     _mobileServiceClient   = mobileServiceClient;
     LoginCommand           = new Command <MobileServiceAuthenticationProvider>(Login);
 }
Beispiel #8
0
 /// <summary>Constructor</summary>
 public SantaController(
     ILoadingService loadSvc,
     IAssignmentService assignSvc,
     IStorageService storageSvc,
     IMessagingService msgSvc,
     IStatusService status)
 {
     _loadSvc    = loadSvc;
     _assignSvc  = assignSvc;
     _storageSvc = storageSvc;
     _msgSvc     = msgSvc;
     _status     = status;
 }
        public AddTransactionViewModel(YnabApi.YnabApi api, ISavvyNavigationService navigationService, ILoadingService loadingService, ISessionStateService sessionStateService)
        {
            this._api = api;
            this._navigationService = navigationService;
            this._loadingService = loadingService;
            this._sessionStateService = sessionStateService;

            this.Payees = new BindableCollection<Payee>();
            this.Accounts = new BindableCollection<Account>();
            this.Categories = new BindableCollection<CategoryViewModel>();

            this.IsOutflow = true;
        }
Beispiel #10
0
        public LoggedInApplicationMode(IApplicationStateService applicationStateService, ICentronService centronService, ILoadingService loadingService, IHelpdeskGroupsService helpdeskGroupsService, IEventAggregator eventAggregator)
        {
            this._applicationStateService = applicationStateService;
            this._centronService          = centronService;
            this._loadingService          = loadingService;
            this._helpdeskGroupsService   = helpdeskGroupsService;
            this._eventAggregator         = eventAggregator;

            this._dashboardItem        = new NavigatingHamburgerItem(SBoardResources.Get("Navigation.Dashboard"), Symbol.Home, typeof(DashboardViewModel));
            this._logoutItem           = new ClickableHamburgerItem(SBoardResources.Get("Navigation.Logout"), SymbolEx.Logout, this.Logout);
            this._newHelpdeskGroupItem = new NavigatingHamburgerItem(SBoardResources.Get("Navigation.NewHelpdeskGroup"), Symbol.Add, typeof(NewHelpdeskGroupViewModel));
            this._helpdeskGroupItems   = new List <NavigatingHamburgerItem>();
        }
        public OpenBudgetApplicationState(WinRTContainer container, ISavvyNavigationService navigationService, ILoadingService loadingService, ISessionStateService sessionStateService)
        {
            this._container = container;
            this._navigationService = navigationService;
            this._loadingService = loadingService;
            this._sessionStateService = sessionStateService;

            this._overviewItem = new NavigationItemViewModel(this.Overview) { Label = "Overview", Symbol = Symbol.Globe };
            this._transactionsItem = new NavigationItemViewModel(this.Transactions) { Label = "Transactions", Symbol = Symbol.AllApps };
            this._addTransactionItem = new NavigationItemViewModel(this.AddTransaction) { Label = "Add transaction", Symbol = Symbol.Add };
            this._refreshItem = new NavigationItemViewModel(this.RefreshAsync) { Label = "Refresh", Symbol = Symbol.Refresh };

            this._changeBudgetItem = new NavigationItemViewModel(this.ChangeBudget) { Label = "Change budget", Symbol = Symbol.Switch };
        }
Beispiel #12
0
        public TestViewModel(ILoadingService loadingService, INavigationService navigationService, IShell shell)
        {
            this._loadingService    = loadingService;
            this._navigationService = navigationService;
            this._shell             = shell;

            this.DisplayName = "Statistics from 9/1/2016 to 9/30/2016";

            this.Test = UwCoreCommand.Create(this.TestImpl)
                        .ShowLoadingOverlay("Test-Message")
                        .HandleExceptions()
                        .TrackEvent("TestCommand");

            this.Test.ToProperty(this, f => f.SomeUnit, out this._someUnitHelper);
        }
        public static async Task WithExecuteAsync(
            this ILoadingService loadingService,
            string message,
            Func <Task> execute)
        {
            try
            {
                loadingService.Show(message);

                await execute();
            }
            finally
            {
                loadingService.Hide();
            }
        }
        public static TResult WithExecute <TResult>(
            this ILoadingService loadingService,
            string message,
            Func <TResult> execute)
        {
            try
            {
                loadingService.Show(message);

                return(execute());
            }
            finally
            {
                loadingService.Hide();
            }
        }
        public static async Task <TResult> WithExecuteAsync <TResult>(
            this ILoadingService loadingService,
            string message,
            Func <Task <TResult> > execute)
        {
            try
            {
                loadingService.Show(message);

                return(await execute());
            }
            finally
            {
                loadingService.Hide();
            }
        }
        public static void WithExecute(
            this ILoadingService loadingService,
            string message,
            Action execute)
        {
            try
            {
                loadingService.Show(message);

                execute();
            }
            finally
            {
                loadingService.Hide();
            }
        }
Beispiel #17
0
 public MasterViewModel(
     IAuthenticationService authenticationService,
     ILoadingService loadingService,
     IDialogService dialogService,
     IAccountInformationService accountInformationService,
     MobileServiceClient mobileServiceClient,
     CachedTableManager <Shift> shiftManager,
     CachedTableManager <DietPaymentItem> dietManager)
 {
     _authenticationService    = authenticationService;
     _loadingService           = loadingService;
     _dialogService            = dialogService;
     _accoutInformationService = accountInformationService;
     _shiftManager             = shiftManager;
     _dietManager         = dietManager;
     _mobileServiceClient = mobileServiceClient;
     LogoutCommand        = new Command(Logout);
 }
        public MasterDownloadPageViewModel(
            INavigator navigator,
            IDialogService dialogService,
            ILoadingService loadingService,
            ISettingService settingService,
            INetworkClient networkClient,
            ItemService itemService)
        {
            this.navigator      = navigator;
            this.dialogService  = dialogService;
            this.loadingService = loadingService;
            this.settingService = settingService;
            this.networkClient  = networkClient;
            this.itemService    = itemService;

            BackCommand    = MakeAsyncCommand(Back);
            RecieveCommand = MakeAsyncCommand(Recieve);
        }
Beispiel #19
0
        public InspectionRecievePageViewModel(
            INavigator navigator,
            IDialogService dialogService,
            ILoadingService loadingService,
            ISettingService settingService,
            INetworkClient networkClient,
            InspectionService inspectionService)
        {
            this.navigator         = navigator;
            this.dialogService     = dialogService;
            this.loadingService    = loadingService;
            this.settingService    = settingService;
            this.networkClient     = networkClient;
            this.inspectionService = inspectionService;

            BackCommand    = MakeAsyncCommand(Back);
            RecieveCommand = MakeAsyncCommand(Recieve, () => selectedCount.Value > 0).Observe(selectedCount);
            SelectCommand  = new DelegateCommand <SelectableItem <StorageResponseEntry> >(Select);
        }
        private static void LoadFile2(ILoadingService context, byte[] data, string fileName)
        {
            using (var stream = new MemoryStream(data))
            {
                var meta = new FileMetadata
                {
                    FileName = fileName,
                    FileSize = data.Length
                };
                var start = DateTime.Now;
                Console.WriteLine(@"Uploading {0} with a size of {1} bytes @ {2}", meta.FileName, meta.FileSize, start.ToString("HH:mm:ss:ffff", CultureInfo.CurrentCulture.DateTimeFormat));

                var request = new FileUploadRequest(meta, stream);

                var response = context.UploadFile2(request);
                var taken    = DateTime.Now.Subtract(start);
                Console.WriteLine(@"Uploading {0} has completed in {1}ms with a reponse of {2}", meta.FileName, taken.TotalMilliseconds, response.SessionFileName);
            }
        }
Beispiel #21
0
        public InspectionSendPageViewModel(
            INavigator navigator,
            IDialogService dialogService,
            ILoadingService loadingService,
            ISettingService settingService,
            INetworkClient networkClient,
            InspectionService inspectionService,
            Session session)
        {
            this.navigator         = navigator;
            this.dialogService     = dialogService;
            this.loadingService    = loadingService;
            this.settingService    = settingService;
            this.networkClient     = networkClient;
            this.inspectionService = inspectionService;
            this.session           = session;

            BackCommand = MakeAsyncCommand(Back);
            SendCommand = MakeAsyncCommand(Send, () => Entities.Count > 0).Observe(Entities);
        }
        public MainWindow()
        {
            InitializeComponent();

            _loadingService = new LoadingService();
            DependencyInjectionUtil.RegisterInstance <ILoadingService>(_loadingService);

            _loadingService.CurrentStatusChanged += (sender, s) => { Dispatcher.Invoke(() => LoadingTextBlock.Text = s); };
            _loadingService.IsLoadingChanged     += (sender, b) =>
            {
                Dispatcher.Invoke(() =>
                {
                    LoadingTextBlock.Visibility = b ? Visibility.Visible : Visibility.Hidden;
                    Loader.Visibility           = b ? Visibility.Visible : Visibility.Hidden;
                });
            };

            if (string.IsNullOrEmpty((string)Settings.Default["RootFolderPath"]))
            {
                Settings.Default["RootFolderPath"] = Environment.GetFolderPath(Environment.SpecialFolder.MyVideos);
            }

            NavigateToVideos(null, null);
        }
Beispiel #23
0
        public MainWindow()
        {
            List <string> picturesList = CreatePicturesList();
            SplashScreen  splashScreen = CreateSplashScreen(picturesList);

            InitializeComponent();

            userDecisionsService = new UserDecisionsService();

            try
            {
                DomainContext = new DomainContext();
                DomainContext.CloseMainWindow = Close;
                DataContext = new MainWindowViewModel(DomainContext);
                loadService = new LoadingService(DomainContext, LoadingBackgroung, WaitControl);

                SetDomainContext();
                SubscribeMessenger();

                if (splashScreen != null)
                {
                    DateTime now = DateTime.Now.AddSeconds(3);
                    splashScreen.Close(TimeSpan.FromSeconds(1));
                    while (DateTime.Now < now)
                    {
                    }
                }

                SetMainTimer();
            }
            catch (Exception e)
            {
                userDecisionsService.ShowException(e);
                Close();
            }
        }
 public LoadingHub(ITaskService taskService,
                   ILoadingService loadingService)
 {
     _taskService    = taskService;
     _loadingService = loadingService;
 }
Beispiel #25
0
 public WelcomeViewModel(ILoadingService loadingService)
 {
     this._loadingService = loadingService;
 }
Beispiel #26
0
 public BaseViewModel()
 {
     alertService   = App.Locator.GetService <IAlertService>();
     loadingService = App.Locator.GetService <ILoadingService>();
 }
 public BaseViewModel()
 {
     LoadingService = DependencyInjectionUtil.Resolve <ILoadingService>();
 }
Beispiel #28
0
 public VideoService(params string[] visionApiSubscriptionKeys)
 {
     InitVisionServiceClients(visionApiSubscriptionKeys);
     _loadingService = DependencyInjectionUtil.Resolve <ILoadingService>();
 }