Ejemplo n.º 1
0
        public override void Configure(object viewModelInfo)
        {
            UpgradeCommand  = ReactiveCommand.Create(() => Upgrade());
            ManualCommand   = ReactiveCommand.Create(() => BrowserHelper.OpenLinkInBrowser(CommonResourceManager.Instance.GetResourceString("PMC_MainView_ManualLink")));
            TutorialCommand = ReactiveCommand.Create(() => BrowserHelper.OpenLinkInBrowser(CommonResourceManager.Instance.GetResourceString("PMC_MainView_TutorialLink")));
            PurchaseCommand = ReactiveCommand.Create(() => BrowserHelper.OpenLinkInBrowser(CommonResourceManager.Instance.GetResourceString("PMC_BuyLink")));

            OnInitialized();

            var settingsModel = settingsService.GetSettings();

            Enabled         = settingsModel.Enabled;
            AdvancedLogging = settingsModel.IsAdvancedLoggingEnabled;

            var licenseService = ServiceLocator.Current.GetInstance <ILicenseService>();

            if (licenseService.IsTrial ||
                (licenseService.IsRegistered && licenseService.IsExpiringSoon) ||
                !licenseService.IsRegistered)
            {
                RaiseRegistrationPopup(false);
                return;
            }

            Initialize(licenseService);
        }
Ejemplo n.º 2
0
 public Dictionary <long, string> GetHeroes()
 {
     return(settingsService.GetSettings()?.Heroes ?? new Dictionary <long, string>());
 }