Example #1
0
 /// <summary>
 ///     Constructor
 /// </summary>
 public LoginViewModel(ISettingsFacade settingsFacade,
                       IMvxLogProvider logProvider,
                       IMvxNavigationService navigationService) : base(logProvider, navigationService)
 {
     this.settingsFacade    = settingsFacade;
     this.navigationService = navigationService;
 }
Example #2
0
 public AccountListViewActionViewModel(ICrudServicesAsync crudServices,
                                       IMvxLogProvider logProvider,
                                       IMvxNavigationService navigationService) : base(logProvider, navigationService)
 {
     this.crudServices      = crudServices;
     this.navigationService = navigationService;
 }
Example #3
0
 public FavoritesViewModel(
     IMvxLogProvider logProvider,
     IMvxNavigationService navigationService,
     IMovieService movieService) : base(logProvider, navigationService, movieService)
 {
     ItemsSource = new MvxObservableCollection <Movie>();
 }
        private DeviceCountryIdentifier(IMvxLogProvider mvxLogProvider)
        {
            _log = mvxLogProvider.GetLogFor <DeviceCountryIdentifier>();
            _telephonyManager = new CTTelephonyNetworkInfo();

            _log.Debug(_telephonyManager == null ? $"{nameof(CTTelephonyNetworkInfo)} is null" : $"{nameof(CTTelephonyNetworkInfo)} is not null");
        }
 public MainMenuViewModel(IMvxNavigationService navigationService, IMvxLogProvider mvxLogProvider)
     : base(Resources.AppResources.ApplicationName, mvxLogProvider, navigationService)
 {
     SettingTappedCommand          = new MvxCommand <string>(
         (param) => NavigationTask = MvxNotifyTask.Create(NavigateAsync(param), onException: ex => LogException(ex))
         );
 }
 public MoviesListingBaseViewModel(
     IMvxLogProvider logProvider,
     IMvxNavigationService navigationService,
     IMovieService movieService) :
     base(logProvider, navigationService, movieService)
 {
 }
Example #7
0
        public HomeViewModel(IMvxLogProvider logProvider, IMvxNavigationService navigationService, IUserDialogs userDialogs, IBrowseService browseService, IMediaManager mediaManager) : base(logProvider, navigationService)
        {
            _userDialogs   = userDialogs ?? throw new ArgumentNullException(nameof(userDialogs));
            _browseService = browseService ?? throw new ArgumentNullException(nameof(browseService));

            MediaManager = mediaManager ?? throw new ArgumentNullException(nameof(mediaManager));
        }
Example #8
0
        public RootViewModel(IMvxNavigationService navigationService, IMvxLogProvider logProvider)
        {
            _navigationService = navigationService;

            logProvider.GetLogFor <RootViewModel>().Warn(() => "Testing log");

            ShowChildCommand = new MvxAsyncCommand(async() => await _navigationService.Navigate <ChildViewModel>());

            ShowModalCommand = new MvxAsyncCommand(async() => await _navigationService.Navigate <ModalViewModel>());

            ShowModalNavCommand = new MvxAsyncCommand(async() => await _navigationService.Navigate <ModalNavViewModel>());

            ShowTabsCommand = new MvxAsyncCommand(async() => await _navigationService.Navigate <TabsRootViewModel>());

            ShowSplitCommand = new MvxAsyncCommand(async() => await _navigationService.Navigate <SplitRootViewModel>());

            ShowOverrideAttributeCommand = new MvxAsyncCommand(async() => await _navigationService.Navigate <OverrideAttributeViewModel>());

            ShowSheetCommand = new MvxAsyncCommand(async() => await _navigationService.Navigate <SheetViewModel>());

            ShowWindowCommand = new MvxAsyncCommand(async() => await _navigationService.Navigate <WindowViewModel>());

            ShowMixedNavigationCommand = new MvxAsyncCommand(async() => await _navigationService.Navigate <MixedNavFirstViewModel>());

            _counter = 3;
        }
Example #9
0
 public TabsRootViewModel(IMvxLogProvider logProvider, IMvxNavigationService navigationService) : base(logProvider, navigationService)
 {
     ShowInitialViewModelsCommand = new MvxAsyncCommand(
         async() => await ShowInitialViewModels().ConfigureAwait(false));
     ShowTabsRootBCommand = new MvxAsyncCommand(
         async() => await NavigationService.Navigate <TabsRootBViewModel>().ConfigureAwait(false));
 }
Example #10
0
        public MainViewModel(IMvxLogProvider logProvider, IMvxNavigationService navigationService) : base(logProvider, navigationService)
        {
            ShowChildCommand = new MvxAsyncCommand(async() => await NavigationService.Navigate <ChildViewModel>().ConfigureAwait(false));

            ShowModalCommand = new MvxAsyncCommand(async() => await NavigationService.Navigate <ModalViewModel>().ConfigureAwait(false));

            ShowModalNavCommand =
                new MvxAsyncCommand(async() => await NavigationService.Navigate <ModalNavViewModel>().ConfigureAwait(false));

            ShowTabsCommand = new MvxAsyncCommand(async() => await NavigationService.Navigate <TabsRootViewModel>().ConfigureAwait(false));

            ShowSplitCommand = new MvxAsyncCommand(async() => await NavigationService.Navigate <SplitRootViewModel>().ConfigureAwait(false));

            ShowOverrideAttributeCommand = new MvxAsyncCommand(async() =>
                                                               await NavigationService.Navigate <OverrideAttributeViewModel>().ConfigureAwait(false));

            ShowSheetCommand = new MvxAsyncCommand(async() => await NavigationService.Navigate <SheetViewModel>().ConfigureAwait(false));

            ShowWindowCommand = new MvxAsyncCommand(async() => await NavigationService.Navigate <WindowViewModel>().ConfigureAwait(false));

            ShowMixedNavigationCommand =
                new MvxAsyncCommand(async() => await NavigationService.Navigate <MixedNavFirstViewModel>().ConfigureAwait(false));

            ShowCustomBindingCommand =
                new MvxAsyncCommand(async() => await NavigationService.Navigate <CustomBindingViewModel>().ConfigureAwait(false));

            _counter = 3;
        }
Example #11
0
        public PCNetworkListenerViewModel(IMvxLogProvider logProvider, IMvxNavigationService navigationService) : base(logProvider, navigationService)
        {
            _log = logProvider.GetLogFor <PCNetworkListenerViewModel>();
            _log.Info("PCNetworkListenerViewModel has been constructed {logProvider} {navigationService}", logProvider, navigationService);
            _parser = new ComboBoxSQLParseManager(logProvider);

            // Setup UI Commands
            RefreshNetMsgCommand = new MvxCommand(GetLogsFromManager);

            // Fetch Initial Data
            _stopwatch = new Stopwatch();
            GetLogsFromManager();

            // get singleton and create event handler
            IPcNetworkListener pcNetworkListener = Mvx.IoCProvider.Resolve <IPcNetworkListener>();

            pcNetworkListener.MessageHit += PCNetworkManagerOnMessage;

            // set initial UI Fields
            int listeningPort = pcNetworkListener.GetAppSettingsDataUdpPort();

            ListeningUDPPort       = listeningPort.ToString();
            TimeSinceLastStartup   = GetDateFromTimeSpan();
            RemoteControlTimeStamp = "";
        }
 public GenderRecognitionPageViewModel(IMvxLogProvider provider,
                                       IMvxNavigationService navigationService,
                                       IUserDialogs userDialogs,
                                       GenderPredictionService genderPredictionService)
     : base(provider, navigationService, userDialogs, genderPredictionService)
 {
 }
Example #13
0
 public BaseNavigationViewModel(
     IMvxLogProvider logProvider,
     IMvxNavigationService navigationService,
     IMovieService movieService) : base(logProvider, navigationService)
 {
     MovieService = movieService;
 }
 public NestedChildViewModel(IMvxLogProvider logProvider, IMvxNavigationService navigationService) : base(logProvider, navigationService)
 {
     CloseCommand      = new MvxAsyncCommand(async() => await NavigationService.Close(this));
     PopToChildCommand = new MvxCommand(() => NavigationService.ChangePresentation(new MvxPopPresentationHint(typeof(ChildViewModel))));
     PopToRootCommand  = new MvxCommand(() => NavigationService.ChangePresentation(new MvxPopToRootPresentationHint()));
     RemoveCommand     = new MvxCommand(() => NavigationService.ChangePresentation(new MvxRemovePresentationHint(typeof(SecondChildViewModel))));
 }
Example #15
0
 public MyAnimalActivityViewModel(IMvxNavigationService navigationService,
                                  IMvxLogProvider logProvider, IUserDialogs userDialogs,
                                  IBackend backend) : base(logProvider, navigationService)
 {
     this.backend     = backend;
     this.userDialogs = userDialogs;
 }
 public SettingsViewModel(IMvxNavigationService navigationService, IMvxLogProvider mvxLogProvider)
     : base(Resources.AppResources.SettingsPageTitle, mvxLogProvider, navigationService)
 {
     SettingClickedCommand         = new MvxCommand <SettingModel>(
         (param) => NavigationTask = MvxNotifyTask.Create(NavigateToSettingAsync(param), onException: ex => LogException(ex))
         );
 }
Example #17
0
        public Page1ViewModel(IMvxLogProvider logProvider, IMvxNavigationService navigationService) : base(logProvider, navigationService)
        {
            HeaderTappedCommand = new MvxCommand <int>(DoHeaderTappedCommand);

            var random   = new Random();
            var sections = new List <SectionViewModel>();

            for (var section = 0; section < 5; section++)
            {
                var itemsCount = random.Next(0, 10);
                var items      = new List <SectionItemViewModel>();
                for (var item = 0; item < itemsCount; item++)
                {
                    items.Add(new SectionItemViewModel
                    {
                        Title = $"Item {item}"
                    });
                }
                sections.Add(new SectionViewModel(items, section % 2 == 0)
                {
                    Title = $"Section {section}",
                    On    = section % 2 != 0
                });
            }

            Sections = sections;
        }
Example #18
0
 public SettingsViewModel(IMvxLogProvider logProvider, IMvxNavigationService navigationService, ISettingsService settingsService, IWorkItemService workItemService)
     : base(logProvider, navigationService)
 {
     _settingsService = settingsService;
     SaveCommand      = new MvxAsyncCommand(SaveSettingsAsync, () => _hasChanges);
     _workItemService = workItemService;
 }
Example #19
0
 /// <summary>
 ///     Constructor
 /// </summary>
 public LoginViewModel(ISettingsManager settingsManager,
                       IMvxLogProvider logProvider,
                       IMvxNavigationService navigationService) : base(logProvider, navigationService)
 {
     this.settingsManager   = settingsManager;
     this.navigationService = navigationService;
 }
Example #20
0
 public AccountListViewActionViewModel(IAccountService accountService,
                                       IMvxLogProvider logProvider,
                                       IMvxNavigationService navigationService) : base(logProvider, navigationService)
 {
     this.accountService    = accountService;
     this.navigationService = navigationService;
 }
        public BaseViewModel(string title, IMvxLogProvider mvxLogProvider, IMvxNavigationService navigationService, IUserDialogs userDialog, ILocalizeService localizeService)
        {
            NavigationService = navigationService;

            MvxLogProvider = mvxLogProvider;

            Log = mvxLogProvider.GetLogFor(GetType());

            UserDialog = userDialog;

            LocalizeService = localizeService;

            Title = title;

            SaveCommand        = new MvxCommand(
                () => SaveTask = MvxNotifyTask.Create(SaveAsync(), onException: ex => LogException(ex))
                );

            DeleteCommand        = new MvxCommand(
                () => DeleteTask = MvxNotifyTask.Create(DeleteAsync, onException: ex => LogException(ex))
                );

            AddCommand        = new MvxCommand(
                () => AddTask = MvxNotifyTask.Create(AddAsync(), onException: ex => LogException(ex))
                );
        }
Example #22
0
        public RootViewModel(IMvxNavigationService navigationService, IMvxLogProvider logProvider, IMvxViewModelLoader mvxViewModelLoader)
        {
            _navigationService  = navigationService;
            _mvxViewModelLoader = mvxViewModelLoader;

            logProvider.GetLogFor <RootViewModel>().Warn(() => "Testing log");

            ShowChildCommand = new MvxAsyncCommand(async() => await _navigationService.Navigate <ChildViewModel, SampleModel>(new SampleModel {
                Message = "Hey", Value = 1.23m
            }));

            ShowModalCommand = new MvxAsyncCommand(async() => await _navigationService.Navigate <ModalViewModel>());

            ShowModalNavCommand = new MvxAsyncCommand(async() => await _navigationService.Navigate <ModalNavViewModel>());

            ShowTabsCommand = new MvxAsyncCommand(async() => await _navigationService.Navigate <TabsRootViewModel>());

            ShowSplitCommand = new MvxAsyncCommand(async() => await _navigationService.Navigate <SplitRootViewModel>());

            ShowOverrideAttributeCommand = new MvxAsyncCommand(async() => await _navigationService.Navigate <OverrideAttributeViewModel>());

            ShowSheetCommand = new MvxAsyncCommand(async() => await _navigationService.Navigate <SheetViewModel>());

            ShowWindowCommand = new MvxAsyncCommand(async() => await _navigationService.Navigate <WindowViewModel>());

            ShowMixedNavigationCommand = new MvxAsyncCommand(async() => await _navigationService.Navigate <MixedNavFirstViewModel>());

            ShowDictionaryBindingCommand = new MvxAsyncCommand(async() => await _navigationService.Navigate <DictionaryBindingViewModel>());

            _counter = 3;
        }
 public SplitRootViewModel(IMvxLogProvider logProvider, IMvxNavigationService navigationService) : base(logProvider, navigationService)
 {
     ShowInitialMenuCommand = new MvxAsyncCommand(
         async() => await ShowInitialViewModel().ConfigureAwait(true));
     ShowDetailCommand = new MvxAsyncCommand(
         async() => await ShowDetailViewModel().ConfigureAwait(true));
 }
Example #24
0
 public MixedNavMasterRootContentViewModel(IMvxLogProvider logProvider, IMvxNavigationService navigationService) : base(logProvider, navigationService)
 {
     ShowModalCommand = new MvxAsyncCommand(async() => await NavigationService.Navigate <ModalNavViewModel>());
     ShowChildCommand = new MvxAsyncCommand(async() => await NavigationService.Navigate <ChildViewModel, SampleModel>(new SampleModel {
         Message = "Hey", Value = 1.23m
     }));
 }
 public MovieReviewViewModel(
     IMvxLogProvider logProvider,
     IMvxNavigationService navigationService,
     IUserDialogs userDialogs) : base(logProvider, navigationService)
 {
     UserDialogs = userDialogs;
 }
 public AgeRecognitionPageViewModel(IMvxLogProvider provider,
                                    IMvxNavigationService navigationService,
                                    IUserDialogs userDialogs,
                                    AgePredictionService agePredictionService)
     : base(provider, navigationService, userDialogs, agePredictionService)
 {
 }
        public SecondChildViewModel(IMvxLogProvider logProvider, IMvxNavigationService navigationService)
            : base(logProvider, navigationService)
        {
            ShowNestedChildCommand = new MvxAsyncCommand(async () => await NavigationService.Navigate<NestedChildViewModel>());

            CloseCommand = new MvxAsyncCommand(async () => await NavigationService.Close(this));
        }
        public OldViewModel(IMvxLogProvider logProvider)
        {
            _mvxLog = logProvider.GetLogFor <OldViewModel>();
            _mvxLog.Trace("OldViewModel.ctor called");

            CloseCommand = new MvxCommand(OnClose);
        }
Example #29
0
 public SendEmailPageViewModel(IMvxLogProvider provider, IMvxNavigationService navigationService, IEmailService emailService,
                               IUserDialogs userDialogs)
     : base(provider, navigationService)
 {
     _emailService = emailService;
     _userDialogs  = userDialogs;
 }
 public HomeViewModel(IMvxLogProvider logProvider, IMvxNavigationService navigationService, IExampleService exampleService) : base(logProvider, navigationService)
 {
     _exampleService    = exampleService;
     _navigationService = navigationService;
     _logProvider       = logProvider;
     _exampleChanged    = _messageService.Subscribe <ExampleChangedMessage>((msg) => { OnChangeCollection(msg); });
 }