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; } }
/// <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(); } }
/// <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(); }
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); } }
public Shell() { Instance = this; InitializeComponent(); _settings = Services.SettingsServices.SettingsService.Instance; MainPageViewModel.login(); loginButtonText.Text = "Logout"; }
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; }
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"); }
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; } }
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("+")); }
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); }); }
public ToolBarViewModel() { if (Windows.ApplicationModel.DesignMode.DesignModeEnabled) { Query = "Designtime value"; } if (!Windows.ApplicationModel.DesignMode.DesignModeEnabled) { _settings = Services.SettingsServices.SettingsService.Instance; } }
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 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; } }
/// <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%" }; }
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 } }
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(); } } }
public SettingsPartViewModel() { _settings = Services.SettingsServices.SettingsService.Instance; ProfileImageSrc = _settings.ProfileImageSrc; }
private Shell() { Instance = this; InitializeComponent(); _settings = Services.SettingsServices.SettingsService.Instance; }
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(); }