コード例 #1
0
 public SignInViewModel(IAccountManager accountManager,
                        IExtendedNavigationService navigationService,
                        IDialogService dialogService)
 {
     this.accountManager    = accountManager;
     this.navigationService = navigationService;
     this.dialogService     = dialogService;
 }
コード例 #2
0
 public BasePageViewModel(IExtendedNavigationService navigationService, ISessionState sessionState, IDataService dataService, IConfigurationService configurationService)
 {
     this.NavigationService    = navigationService;
     this.SessionState         = sessionState;
     this.DataService          = dataService;
     this.ConfigurationService = configurationService;
     this.ToastNotificator     = DependencyService.Get <IToastNotificator>();
 }
コード例 #3
0
        public TransactionsViewModel(IExtendedNavigationService navigationService,
                                     ITransactionManager transactionsManager)
        {
            this.transactionsManager = transactionsManager;
            this.navigationService   = navigationService;

            OnLoadCommand = new RelayCommand(OnLoadCommandProcessor);
        }
コード例 #4
0
        public ProjectsViewModel(IDataService dataService, IResourceService resourceService, IExtendedNavigationService navigationService, IDialogService dialogService)
        {
            _dataService       = dataService;
            _resourceService   = resourceService;
            _navigationService = navigationService;
            _dialogService     = dialogService;

            InitCommand        = new RelayCommand(Init);
            ShowProjectCommand = new RelayCommand <Project>(ShowProject);
        }
コード例 #5
0
ファイル: MainViewModel.cs プロジェクト: ScottIsAFool/InTwo
        /// <summary>
        /// Initializes a new instance of the MainViewModel class.
        /// </summary>
        public MainViewModel(IExtendedNavigationService navigationService, IAsyncStorageService asyncStorageService, IApplicationSettingsService settingsService)
        {
            _navigationService   = navigationService;
            _asyncStorageService = asyncStorageService;
            _settingsService     = settingsService;

            if (IsInDesignMode)
            {
                DataExists = true;
            }
        }
コード例 #6
0
        public NewTransactionViewModel(IExtendedNavigationService navigationService,
                                       ITransactionManager transactionsManager)
        {
            this.transactionsManager = transactionsManager;
            this.navigationService   = navigationService;

            SendTransactionCommand = new RelayCommand(SendTransactionCommandCommandProcessor);
            SelectUsernameCommand  = new RelayCommand(SelectUsernameCommandProcessor);
            GetUserListCommand     = new RelayCommand(GetUserListCommandProcessor);
            SetUsernameCommand     = new RelayCommand <String>(SetUsernameCommandProcessor);
            CleanUserListCommand   = new RelayCommand(CleanCommandProcessor);
        }
コード例 #7
0
ファイル: LoginViewModel.cs プロジェクト: quangfox/RedTickets
        public LoginViewModel(IDataService dataService, ICredentialService credentialService, IDialogService dialogService, IResourceService resourceService, IExtendedNavigationService navigationService, INotificationService notificationService)
        {
            _dataService         = dataService;
            _credentialService   = credentialService;
            _dialogService       = dialogService;
            _resourceService     = resourceService;
            _navigationService   = navigationService;
            _notificationService = notificationService;

            InitCommand   = new RelayCommand(Init);
            LoginCommand  = new RelayCommand(Login);
            LogoutCommand = new RelayCommand(Logout);
        }
コード例 #8
0
        /// <summary>
        /// Initializes a new instance of the ScoresViewModel class.
        /// </summary>
        public ScoreoidViewModel(IExtendedNavigationService navigation, IScoreoidClient scoreoidClient)
        {
            _navigationService = navigation;
            _scoreoidClient    = scoreoidClient;

            if (IsInDesignMode)
            {
                CurrentPlayer = new Player
                {
                    Username  = "******",
                    BestScore = 336,
                    Rank      = 1
                };
            }
        }
コード例 #9
0
        public ProjectViewModel(IDataService dataService, IResourceService resourceService, IDialogService dialogService, IExtendedNavigationService navigationService)
        {
            _dataService       = dataService;
            _resourceService   = resourceService;
            _dialogService     = dialogService;
            _navigationService = navigationService;

            InitCommand      = new RelayCommand <Project>(Init);
            ShowIssueCommand = new RelayCommand <Issue>(ShowIssue);

            if (IsInDesignMode)
            {
                ProjectTitle = "Kunden\nCeBIT 2015 intern";
            }
        }
コード例 #10
0
        public MainViewModel(IAccountManager accountManager,
                             IExtendedNavigationService navigationService,
                             ILocaleManager localeManager,
                             IDialogService dialogService)
        {
            this.accountManager    = accountManager;
            this.navigationService = navigationService;
            this.localeManager     = localeManager;
            this.dialogService     = dialogService;

            OnLoadCommand           = new RelayCommand(OnLoadCommandProcessor);
            LogoutCommand           = new RelayCommand(LogoutCommandProcessor);
            ShowTransactionsCommand = new RelayCommand(ShowTransactionsCommandProcessor);
            NewTransactionCommand   = new RelayCommand(NewTransactionCommandProcessor);
        }
コード例 #11
0
        public ScoreBoardViewModel(IExtendedNavigationService navigationService, IScoreoidClient scoreoidClient)
        {
            _navigationService = navigationService;
            _scoreoidClient    = scoreoidClient;

            if (IsInDesignMode)
            {
                ScoreBoardItems = new ObservableCollection <ScoreWrapper>
                {
                    new ScoreWrapper
                    {
                        Score = new ScoreItem
                        {
                            Player = new Player
                            {
                                FirstName = "Scott",
                                LastName  = "Lovegrove",
                                Username  = "******",
                                BestScore = 336,
                                Rank      = 1
                            }
                        },
                        Rank = 1
                    },
                    new ScoreWrapper
                    {
                        Score = new ScoreItem
                        {
                            Player = new Player
                            {
                                FirstName = "Mel",
                                LastName  = "Sheppard",
                                Username  = "******",
                                BestScore = 335,
                                Rank      = 2,
                            }
                        },
                        Rank = 2
                    }
                };
                MostRecentScore = 336;
            }
            else
            {
                ScoreBoardItems = new ObservableCollection <ScoreWrapper>();
            }
        }
コード例 #12
0
        /// <summary>
        /// Initializes a new instance of the UserProfileViewModel class.
        /// </summary>
        public UserProfileViewModel(IExtendedNavigationService navigationService, IScoreoidClient scoreoidClient, IPhotoChooserService photoChooserService, IAsyncStorageService asyncStorageService)
        {
            _navigationService   = navigationService;
            _scoreoidClient      = scoreoidClient;
            _photoChooserService = photoChooserService;
            _asyncStorageService = asyncStorageService;

            if (IsInDesignMode)
            {
                CurrentPlayer = new Player
                {
                    Username  = "******",
                    BestScore = 336,
                    Rank      = 1
                };
            }

            TotalScore = NumberOfGames = 0;
        }
コード例 #13
0
ファイル: GameViewModel.cs プロジェクト: ScottIsAFool/InTwo
        /// <summary>
        /// Initializes a new instance of the GameViewModel class.
        /// </summary>
        public GameViewModel(IExtendedNavigationService navigationService, IApplicationSettingsService applicationSettings)
        {
            _navigationService   = navigationService;
            _applicationSettings = applicationSettings;

            if (IsInDesignMode)
            {
                // Code runs in Blend --> create design time data.
                Genres = new List <Genre> {
                    new Genre {
                        Name = "Rock"
                    }
                };
                SelectedGenre = Genres[0];

                GameLocked = false;

                GameTrack = new Product
                {
                    Name       = "I don't wanna miss a thing",
                    Performers = new[] { new Artist {
                                             Name = "Aerosmith", Thumb320Uri = new Uri("http://assets.ent.nokia.com/p/d/music_image/320x320/1470.jpg")
                                         } },
                    Thumb320Uri = new Uri("http://4.musicimg.ovi.com/u/1.0/image/156920531/?w=320&q=90")
                };
                MaximumRoundPoints = 300;
            }
            else
            {
                _gameTimer = new DispatcherTimer();

                GameLength = TimeSpan.FromSeconds(2);

                _gameTimer.Interval = GameLength;
                _gameTimer.Tick    += GameTimerOnTick;

                _usedTracks = new List <string>();

                GetDefaults();
            }
        }
コード例 #14
0
        private void InitServices()
        {
            _navigationService = IocContainer.GetContainer().Resolve <IExtendedNavigationService>();

            _dialogService = IocContainer.GetContainer().Resolve <IExtendedDialogService> ();

            _hudService = IocContainer.GetContainer().Resolve <IHudService> ();

            _browserService = IocContainer.GetContainer().Resolve <IBrowserService> ();

            _dispatchService = IocContainer.GetContainer().Resolve <IDispatcherService> ();

            _logger = IocContainer.GetContainer().Resolve <ILogger>();

            _phoneService = IocContainer.GetContainer().Resolve <IPhoneService> ();

            _mapService = IocContainer.GetContainer().Resolve <IMapService> ();

            _connectivityService = IocContainer.GetContainer().Resolve <IConnectivityService>();

            _emailService = IocContainer.GetContainer().Resolve <IEmailService> ();
        }
コード例 #15
0
 public SettingsPageViewModel(IExtendedNavigationService navigationService, ISessionState sessionState, IDataService dataService, IConfigurationService configurationService, IApplicationService applicationService)
     : base(navigationService, sessionState, dataService, configurationService)
 {
     this.NotificationFrequencies = Enum.GetValues(typeof(NotificationFrequency)).Cast <NotificationFrequency>().ToList();
     this.ApplicationService      = applicationService;
 }
コード例 #16
0
 /// <summary>
 /// Initializes a new instance of the RemoveAdsViewModel class.
 /// </summary>
 public RemoveAdsViewModel(IExtendedNavigationService navigationService, HttpClient httpClient)
 {
     _navigationService = navigationService;
     _httpClient        = httpClient;
 }
コード例 #17
0
 public ProfilePopupViewModel(IExtendedNavigationService navigationService, IDialogService dialogService)
     : base(navigationService, dialogService)
 {
     Text = CreateProfileText();
 }
コード例 #18
0
 /// <summary>
 /// Initializes a new instance of the DownloadingSongsViewModel class.
 /// </summary>
 public DownloadingSongsViewModel(IExtendedNavigationService navigationService, IMusicClient musicClient, IAsyncStorageService asyncStorageService)
 {
     _navigationService   = navigationService;
     _musicClient         = musicClient;
     _asyncStorageService = asyncStorageService;
 }
コード例 #19
0
 public ViewModelBase(IExtendedNavigationService navigationService, IDialogService dialogService)
 {
     _dialogService     = dialogService;
     _navigationService = navigationService;
 }
コード例 #20
0
 public PersonalityPopupViewModel(IExtendedNavigationService navigationService, IDialogService dialogService)
     : base(navigationService, dialogService)
 {
 }
コード例 #21
0
 public LikedPageViewModel(IExtendedNavigationService navigationService, ISessionState sessionState, IDataService dataService, IConfigurationService configurationService)
     : base(navigationService, sessionState, dataService, configurationService)
 {
 }
コード例 #22
0
 public ContactMePopupViewModel(IExtendedNavigationService navigationService, IDialogService dialogService)
     : base(navigationService, dialogService)
 {
 }
コード例 #23
0
 public HobbiesPopupViewModel(IExtendedNavigationService navigationService, IDialogService dialogService)
     : base(navigationService, dialogService)
 {
 }
 public WorkflowExpiriencePopupViewModel(IExtendedNavigationService navigationService, IDialogService dialogService)
     : base(navigationService, dialogService)
 {
 }
コード例 #25
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            InitCrashlytics();
            Current = this;
            Bootstrap.RegisterServices(this, Resource.Id.main_content);
            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.Main);
            var toolbar = FindViewById <Android.Support.V7.Widget.Toolbar>(Resource.Id.toolbar);


            drawerLayout = FindViewById <DrawerLayout>(Resource.Id.drawer_layout);
            drawerToggle = new ActionBarDrawerToggle(this, drawerLayout, toolbar, Resource.String.app_name, Resource.String.app_name);
            drawerLayout.AddDrawerListener(drawerToggle);
            drawerLayout.DrawerClosed += OnDrawerClosedTask;
            drawerToggle.SyncState();
            drawerToggle.DrawerSlideAnimationEnabled = false;

            drawerToggle.ToolbarNavigationClickListener = this;
            SetSupportActionBar(toolbar);
            //Enable support action bar to display hamburger
            SupportActionBar.SetDisplayHomeAsUpEnabled(true);
            SupportActionBar.SetDisplayShowHomeEnabled(true);


            navigationView = FindViewById <NavigationView>(Resource.Id.nav_view);
            boughtItem     = navigationView.Menu.FindItem(Resource.Id.paid_section);

            navigationView.NavigationItemSelected += (sender, e) =>
            {
                switch (e.MenuItem.ItemId)
                {
                case Resource.Id.nav_import:
                    AskImportSource();
                    break;

                case Resource.Id.nav_export:
                    _driveManager.SaveFile();
                    break;

                case Resource.Id.nav_backup:
                    break;

                case Resource.Id.nav_upgrade:
                    Buy();
                    break;

                default:
                    break;
                }
                //react to click here and swap fragments or navigate
                drawerLayout.CloseDrawers();
            };
            if (Build.VERSION.SdkInt >= Build.VERSION_CODES.Lollipop)
            {
                Window window = this.Window;
                window.AddFlags(WindowManagerFlags.TranslucentStatus);
            }



            SupportFragmentManager.AddOnBackStackChangedListener(this);

            //SetContentView (Resource.Layout.history);
            _navigationService = ServiceLocator.Current.GetInstance <IExtendedNavigationService>();
            _navigationService.NavigateTo(Page.MainPage);

            _storage = ServiceLocator.Current.GetInstance <StorageManager>();

            _driveManager = ServiceLocator.Current.GetInstance <GoogleDriveInteractor>();
            _driveManager.Init(Utils.GetStringFromResource(Resource.String.app_name));

            _iInAppPurchase                     = ServiceLocator.Current.GetInstance <IInAppPurchase>() as InAppPurchase;
            _interfaceUpdateManager             = ServiceLocator.Current.GetInstance <InterfaceUpdateManager>();
            _interfaceUpdateManager.CurrrentTab = _storage.GetTab();
            _inapp = ServiceLocator.Current.GetInstance <IInAppPurchase>();
            if (!_storage.Bought)
            {
                LoadProducts();
            }
            else
            {
                boughtItem.SetVisible(false);
            }
        }
コード例 #26
0
 public SocialNetworksPopupViewModel(IExtendedNavigationService navigationService, IDialogService dialogService)
     : base(navigationService, dialogService)
 {
 }