public ConnectionPartViewModel()
        {
            if (!Windows.ApplicationModel.DesignMode.DesignModeEnabled)
                _settings = Services.SettingsServices.SettingsService.Instance;

            _domoticzConnection = Services.DomoticzConnectionServices.DomoticzConnection.Instance;
        }
 public SettingsPartViewModel()
 {
     if (!Windows.ApplicationModel.DesignMode.DesignModeEnabled)
     {
         _settings = Services.SettingsServices.SettingsService.Instance;
     }
 }
Beispiel #3
0
        /// <summary>
        /// Will set the background grid of the map view
        /// NOTE: Since we can't add this code inside XAML, thanks to ESRI sdk, we need to force it here.
        /// </summary>
        public void SetBackgroundGrid()
        {
            if (myMapView.BackgroundGrid.GridLineWidth != 0)
            {
                Services.SettingsServices.SettingsService _settings = Services.SettingsServices.SettingsService.Instance;

                CustomResource customColors = new CustomResource();
                customColors.InitializeComponent();
                if (customColors.ContainsKey("MapViewBackgroundGridLightColor"))
                {
                    var appT = _settings.AppTheme;
                    if (_settings.AppTheme == ApplicationTheme.Light)
                    {
                        Windows.UI.Color lightDefault = (Windows.UI.Color)customColors["MapViewBackgroundGridLightColor"];
                        myMapView.BackgroundGrid.Color = System.Drawing.Color.FromArgb(lightDefault.A, lightDefault.R, lightDefault.G, lightDefault.B);
                        //myMapView.BackgroundGrid.GridLineColor = (Windows.UI.Color)customColors["MapViewBackgroundGridDarkColor"];
                        //myMapView.BackgroundGrid.GridLineWidth = 5;
                    }
                    else
                    {
                        Windows.UI.Color darkDefault = (Windows.UI.Color)customColors["MapViewBackgroundGridDarkColor"];
                        myMapView.BackgroundGrid.Color = System.Drawing.Color.FromArgb(darkDefault.A, darkDefault.R, darkDefault.G, darkDefault.B);


                        //myMapView.BackgroundGrid.GridLineColor = (Windows.UI.Color)customColors["MapViewBackgroundGridLightColor"];
                        //myMapView.BackgroundGrid.GridLineWidth = 5;
                    }
                }
                myMapView.BackgroundGrid.GridLineWidth = 0;
                myMapView.UpdateLayout();
            }
        }
Beispiel #4
0
 /// <summary>
 /// Constructor.
 /// </summary>
 public MainPageViewModel()
 {
     _settings  = Services.SettingsServices.SettingsService.Instance;
     _canAdd    = new DelegateCommand(new Action(AddTile), CanAddTile);
     _canRemove = new DelegateCommand(new Action(RemoveTile), CanRemoveTile);
     _canSync   = new DelegateCommand(new Action(Sync), CanSync);
 }
        public ToolBarViewModel()
        {
            if (Windows.ApplicationModel.DesignMode.DesignModeEnabled)
                Query = "Designtime value";

            if (!Windows.ApplicationModel.DesignMode.DesignModeEnabled)
                _settings = Services.SettingsServices.SettingsService.Instance;
        }
 public SettingsPageViewModel()
 {
     if (Windows.ApplicationModel.DesignMode.DesignModeEnabled)
     {
         return;
     }
     _settings = new Services.SettingsServices.SettingsService();
 }
Beispiel #7
0
 public Shell()
 {
     Instance = this;
     InitializeComponent();
     _settings = Services.SettingsServices.SettingsService.Instance;
     _settings.PairdLocks.CollectionChanged += PairdLocks_CollectionChanged;
     BuildPimaryButtons();
 }
 public SettingsPartViewModel()
 {
     if (!Windows.ApplicationModel.DesignMode.DesignModeEnabled)
     {
         _settings = Services.SettingsServices.SettingsService.Instance;
         _settings.ApplyAppTheme(ApplicationTheme.Light);
     }
 }
Beispiel #9
0
        public Shell()
        {
            Instance = this;
            InitializeComponent();
            _settings = Services.SettingsServices.SettingsService.Instance;

            MainPageViewModel.login();
            loginButtonText.Text = "Logout";
        }
Beispiel #10
0
 public Shell()
 {
     Instance = this;
     InitializeComponent();
     _settings = Services.SettingsServices.SettingsService.Instance;
     SystemNavigationManager.GetForCurrentView().AppViewBackButtonVisibility = AppViewBackButtonVisibility.Visible;
     SystemNavigationManager.GetForCurrentView().BackRequested += (s, e) => {
     };
 }
 public SettingsPageViewModel()
 {
     if (Windows.ApplicationModel.DesignMode.DesignModeEnabled)
     {
         // designtime data
         return;
     }
     _settings = Services.SettingsServices.SettingsService.Instance;
 }
        public SettingsPartViewModel()
        {
            if (!DesignMode.DesignModeEnabled)
            {
                _settings = Services.SettingsServices.SettingsService.Instance;
            }

            ShellDrawnBackButtonVisibility = ApiInformation.IsTypePresent(Constants.WINDOWS_API__HardwareButtons) ? Visibility.Collapsed : Visibility.Visible;
        }
 public SettingsPageViewModel()
 {
     if (Windows.ApplicationModel.DesignMode.DesignModeEnabled)
     {
         // designtime data
         return;
     }
     _settings = Services.SettingsServices.SettingsService.Instance;
 }
        static bool startup = true; // Forms dies without startup defined
#pragma warning restore CS0414      // The field 'MainPageViewModel.startup' is assigned but its value is never used

        public MainPageViewModel()
        {
            if (Windows.ApplicationModel.DesignMode.DesignModeEnabled)
            {
            }
            else
            {
                _settings = Services.SettingsServices.SettingsService.Instance;
            }
        }
 public SettingsPartViewModel()
 {
     if (DesignMode.DesignModeEnabled)
     {
         // designtime
     }
     else
     {
         _settings = Services.SettingsServices.SettingsService.Instance;
     }
 }
 public SettingsPartViewModel()
 {
     if (Windows.ApplicationModel.DesignMode.DesignModeEnabled)
     {
         // designtime
     }
     else
     {
         _settings = App.Container.Resolve <SettingsService>();
     }
 }
        public SettingsPartViewModel()
        {
            if (!Windows.ApplicationModel.DesignMode.DesignModeEnabled)
            {
                _settings = Services.SettingsServices.SettingsService.Instance;
                _manager  = new LocalSettingsManager();
                _loader   = Windows.ApplicationModel.Resources.ResourceLoader.GetForCurrentView();
            }

            _BusyText = _loader.GetString("WaitMessage");
        }
Beispiel #18
0
 public SettingsPageSettingsPartViewModel()
 {
     if (Windows.ApplicationModel.DesignMode.DesignModeEnabled)
     {
         // designtime
     }
     else
     {
         _settings = Services.SettingsServices.SettingsService.Instance;
     }
 }
        //public ObservableCollection<DomoticzLightSwitch> observableSwitches = new ObservableCollection<DomoticzLightSwitch>();

        public SwitchesPageViewModel()
        {
            _domoticzConnection = Services.DomoticzConnectionServices.DomoticzConnection.Instance;
            observableSwitches = new ObservableCollection<Switch>();

            if (Windows.ApplicationModel.DesignMode.DesignModeEnabled)
            {
                _settings = Services.SettingsServices.SettingsService.Instance;
                observableSwitches.Add(new Switch() { Name = "Test switch 1", Status = true });
            }
        }
 public SettingsPartViewModel()
 {
     if (Windows.ApplicationModel.DesignMode.DesignModeEnabled)
     {
         // designtime
     }
     else
     {
         _settings = Services.SettingsServices.SettingsService.Instance;
     }
 }
Beispiel #21
0
        public Shell()
        {
            Instance = this;
            InitializeComponent();
            _settings = Services.SettingsServices.SettingsService.Instance;

            _settings.RefreshTitleBarColor();

            Messenger.Default.Register <string>(this, FlashbackConstants.MessengerShowWarning, ShowWarning);
            Messenger.Default.Register <string>(this, FlashbackConstants.MessengerShowError, ShowError);
            Messenger.Default.Register <string>(this, FlashbackConstants.MessengerShowInformation, ShowInformation);
        }
        /// <summary>
        /// Constructor.
        /// </summary>
        public AccountsViewModel()
        {
            if (Windows.ApplicationModel.DesignMode.DesignModeEnabled)
            {
                return;
            }

            _settings = Services.SettingsServices.SettingsService.Instance;

            _accounts = _settings.Accounts;
            _accounts.Add(new AccountModel("+"));
        }
Beispiel #23
0
        public Shell()
        {
            Instance = this;
            InitializeComponent();
            _settings = Services.SettingsServices.SettingsService.Instance;

            // Add checking if already logged in
            LoginModal.IsModal  = true;
            SignUpModal.IsModal = false;

            PairBand = new RelayCommand(() => BandModal.IsModal = true, () => { return(!BandService.Instance.IsConnected); });
        }
Beispiel #24
0
        public ToolBarViewModel()
        {
            if (Windows.ApplicationModel.DesignMode.DesignModeEnabled)
            {
                Query = "Designtime value";
            }

            if (!Windows.ApplicationModel.DesignMode.DesignModeEnabled)
            {
                _settings = Services.SettingsServices.SettingsService.Instance;
            }
        }
Beispiel #25
0
 public Shell()
 {
     Instance = this;
     InitializeComponent();
     _settings = Services.SettingsServices.SettingsService.Instance;
     Aggregate.OnMessageTransmitted += OnMessageReceived;
     Buildings.Visibility            = Visibility.Collapsed;
     Residents.Visibility            = Visibility.Collapsed;
     Conditions.Visibility           = Visibility.Collapsed;
     Requests.Visibility             = Visibility.Collapsed;
     Apartment.Visibility            = Visibility.Collapsed;
 }
 public SettingsPartViewModel()
 {
     
     if (!Windows.ApplicationModel.DesignMode.DesignModeEnabled)
     {
         _settings = Services.SettingsServices.SettingsService.Instance;
         _manager = new LocalSettingsManager();
         _loader = Windows.ApplicationModel.Resources.ResourceLoader.GetForCurrentView();
     }
     
     _BusyText = _loader.GetString("WaitMessage");
 }
 public ContentDialogSemanticZoomViewModel()
 {
     //Force application theme on dialog, else it doesn't synchronize with user changes
     Services.SettingsServices.SettingsService _settings = Services.SettingsServices.SettingsService.Instance;
     if (_settings.AppTheme == ApplicationTheme.Dark)
     {
         userTheme = ElementTheme.Dark;
     }
     else
     {
         userTheme = ElementTheme.Light;
     }
 }
Beispiel #28
0
        /// <summary>
        /// Constructor.
        /// </summary>
        public AccountsViewModel()
        {
            if (Windows.ApplicationModel.DesignMode.DesignModeEnabled)
            {
                return;
            }

            _deleteCommand = new RelayCommand(new Action(Delete), CanEditDelete);
            _editCommand   = new RelayCommand(new Action(Edit), CanEditDelete);
            _settings      = Services.SettingsServices.SettingsService.Instance;

            LoadAccounts(_settings.Accounts);
        }
        public SettingsPartViewModel()
        {
            if (Windows.ApplicationModel.DesignMode.DesignModeEnabled)
            {
                // designtime
            }
            else
            {
                _settings = Services.SettingsServices.SettingsService.Instance;
            }

            FontSizes = new ObservableCollection <string> {
                "120%", "110%", "100%", "90%", "80%", "70%"
            };
        }
Beispiel #30
0
        public MainViewModel(INetworkService networkService, IMessenger messengerService,
                             Services.SettingsServices.SettingsService settings)
        {
            _networkService   = networkService;
            _messengerService = messengerService;
            _settingsService  = settings;

            _messengerService.Register <MessageTypes.PlanFoundMessage>(this, PlanFound);
            _messengerService.Register <MessageTypes.LineSearchRequested>(this, SearchLine);
            _transitTrafficAlertComparer = new TransitTrafficAlertComparer();

            if (Windows.ApplicationModel.DesignMode.DesignModeEnabled)
            {
                //set up design-time values
            }
        }
Beispiel #31
0
        public TripFormViewModel(INetworkService netService, IMessenger messengerService,
                                 Services.SettingsServices.SettingsService settings, IGeolocationService geolocationService,
                                 IDialogService dialogService, IFavoritesService favoritesService)
        {
            _networkService     = netService;
            _settingsService    = settings;
            _messengerService   = messengerService;
            _geolocationService = geolocationService;
            _dialogService      = dialogService;
            _favoritesService   = favoritesService;

            _messengerService.Register <SecondaryTilePayload>(this, SecondaryTileInvoked);
            FromPlace             = _settingsService.PreferredFromPlace;
            ToPlace               = _settingsService.PreferredToPlace;
            SelectedWalkingAmount = WalkingAmounts.FirstOrDefault(x => x.AmountType == _settingsService.PreferredWalkingAmount)
                                    ?? Constants.DefaultWalkingAmount;
            SelectedWalkingSpeed = WalkingSpeeds.FirstOrDefault(x => x.SpeedType == _settingsService.PreferredWalkingSpeed)
                                   ?? Constants.DefaultWalkingSpeed;
        }
 public SettingsPartViewModel()
 {
     if (Windows.ApplicationModel.DesignMode.DesignModeEnabled)
     {
         // designtime
     }
     else
     {
         _settings = Services.SettingsServices.SettingsService.Instance;
         if (_settings.AppTheme != ApplicationTheme.Light)
         {
             _settings.AppTheme = ApplicationTheme.Dark;
             base.RaisePropertyChanged();
         }
         else
         {
             _settings.AppTheme = ApplicationTheme.Light;
             base.RaisePropertyChanged();
         }
     }
 }
Beispiel #33
0
 public SettingsPartViewModel()
 {
     _settings       = Services.SettingsServices.SettingsService.Instance;
     ProfileImageSrc = _settings.ProfileImageSrc;
 }
Beispiel #34
0
 private Shell()
 {
     Instance = this;
     InitializeComponent();
     _settings = Services.SettingsServices.SettingsService.Instance;
 }
Beispiel #35
0
 public Shell()
 {
     Instance = this;
     InitializeComponent();
     _settings = Services.SettingsServices.SettingsService.Instance;
 }
 public SettingsPartViewModel()
 {
     if (!Windows.ApplicationModel.DesignMode.DesignModeEnabled)
         _settings = Services.SettingsServices.SettingsService.Instance;
 }
 public SettingsPartViewModel()
 {
     _settings = Services.SettingsServices.SettingsService.Instance;
 }
 public TraktClientPartViewModel()
 {
     _settings = Services.SettingsServices.SettingsService.Instance;
 }
 public SettingsPageViewModel()
 {
     if (Windows.ApplicationModel.DesignMode.DesignModeEnabled)
         return;
     _settings = new Services.SettingsServices.SettingsService();
 }