/// <summary>
        /// Initializes a new instance of the <see cref="ShellViewModel"/> class.
        /// </summary>
        /// <param name="context">The context.</param>
        /// <param name="commonServices">The common services.</param>
        /// <param name="settingsService">The settings services.</param>
        /// <param name="logger">The logger factory.</param>
        /// <param name="themeService">The theme selector service.</param>
        /// <param name="localizationFunctions">The localization functions.</param>
        public ShellViewModel(
            IContext context,
            ICommonServices commonServices,
            IBaseApplicationSettingsService settingsService,
            ILogger logger,
            IThemeService themeService,
            LocalizationFunctions localizationFunctions)
            : base(context, commonServices, settingsService, logger, themeService, localizationFunctions)
        {
            CommonServices = commonServices;

            Title       = commonServices.InfoService.ProductName;
            Version     = commonServices.InfoService.ProductVersion;
            DisplayName = "User";

            Display_Command        = new Command(async() => await OpenDisplayAsync());
            Info_Command           = new Command(async() => await OpenInfoAsync());
            Browse_Command         = new Command(async() => await BrowseFileAsync());
            Converter_Command      = new Command(async() => await OpenConvertersAsync());
            SelectionTest_Command  = new Command(async() => await OpenSelectionTestAsync());
            ListViewTest_Command   = new Command(async() => await OpenListViewTestAsync());
            ValidationTest_Command = new Command(async() => await OpenValidationTestAsync());

            PopulateNavItems();
        }
예제 #2
0
 /// <summary>
 /// Default constructor.
 /// </summary>
 /// <param name="infoService"></param>
 /// <param name="applicationSettingsService"></param>
 /// <param name="options"></param>
 public ThemeService(
     IInfoService infoService,
     IBaseApplicationSettingsService applicationSettingsService,
     IOptions <ConfigurationOptions> options)
     : this(applicationSettingsService, options)
 {
     _infoService = infoService;
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="LanguageViewModel"/> class.
        /// </summary>
        /// <param name="context">The context.</param>
        /// <param name="commonServices">The common services.</param>
        /// <param name="appSettingsService">The settings services.</param>
        /// <param name="localizationFunctions">The localization functions.</param>
        /// <param name="logger">The logger factory.</param>
        public LanguageViewModel(
            IContext context,
            IBaseCommonServices commonServices,
            IBaseApplicationSettingsService appSettingsService,
            LocalizationFunctions localizationFunctions,
            ILogger logger)
            : base(context, commonServices, logger)
        {
            _localizationFunctions = localizationFunctions;
            _appSettingsService    = appSettingsService;

            SetLanguage_Command = new Command <string>((e) => SelectedItem = e);
            SelectedItem        = _appSettingsService.Settings.Culture;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="ShellViewModel"/> class.
        /// </summary>
        /// <param name="context">The context.</param>
        /// <param name="commonServices">The common services.</param>
        /// <param name="settingsService">The settings services.</param>
        /// <param name="logger">The logger factory.</param>
        /// <param name="themeService">The theme selector service.</param>
        /// <param name="localizationFunctions">The localization functions.</param>
        public ShellViewModel(
            IContext context,
            ICommonServices commonServices,
            IBaseApplicationSettingsService settingsService,
            ILogger <ShellViewModel> logger)
            : base(context, commonServices, settingsService, logger, null, null)
        {
            CommonServices = commonServices;

            Title       = commonServices.InfoService.ProductName;
            Version     = commonServices.InfoService.ProductVersion;
            DisplayName = "User";

            Unlist_Command = new Command(async() => await OpenUnlistViewAsync());

            PopulateNavItems();
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="ShellViewModel"/> class.
        /// </summary>
        /// <param name="context">The context.</param>
        /// <param name="commonServices">The common services.</param>
        /// <param name="applicationSettingsService"></param>
        /// <param name="logger">The logger factory.</param>
        public ShellViewModel(
            IContext context,
            ICommonServices commonServices,
            IBaseApplicationSettingsService applicationSettingsService,
            ILogger <ShellViewModel> logger)
            : base(context, commonServices, applicationSettingsService, logger, null, null)
        {
            CommonServices = commonServices;

            Title       = "Sample WPF Title";
            Version     = commonServices.InfoService.ProductVersion;
            DisplayName = "User";

            Info_Command           = new Command(async() => await OpenInfoAsync());
            EditableCombo_Command  = new Command(async() => await OpenEditableComboAsync());
            ValidationTest_Command = new Command(async() => await OpenValidationTestAsync());
            UnitConversion_Command = new Command(async() => await OpenUnitConversionAsync());

            PopulateNavItems();
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="LocalizationFunctions"/> class.
 /// </summary>
 /// <param name="context">The context.</param>
 /// <param name="settingsService">The settings service.</param>
 public LocalizationFunctions(IContext context, IBaseApplicationSettingsService settingsService)
 {
     Context         = context;
     SettingsService = settingsService;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="LocalizationService"/> class.
 /// </summary>
 /// <param name="context">The context.</param>
 /// <param name="settingsService">The settings service.</param>
 public LocalizationService(IContext context, IBaseApplicationSettingsService settingsService)
 {
     _context         = context;
     _settingsService = settingsService;
 }