Пример #1
0
        public ShortcutService(VersionService versionService)
        {
            _settingsFileName   = "UserSettings.xml";
            _settingsFolderPath = versionService.GetAppDataStudioFolder();
            _settingsXmlPath    = Path.Combine(_settingsFolderPath, _settingsFileName);
            _safeHandle         = new SafeFileHandle(IntPtr.Zero, true);
            _customShortcuts    = new List <StudioShortcut>();
            _keysConverter      = new KeysConverter();

            ReadCustomShortcutsFromUserSettingsXml();
        }
Пример #2
0
        public ConnectionService(IWin32Window owner, VersionService versionService, LanguageCloudIdentityApi languageCloudIdentityApi)
        {
            Owner          = owner;
            VersionService = versionService;

            IsSignedIn = false;

            PluginVersion = VersionService?.GetPluginVersion();
            StudioVersion = VersionService?.GetStudioVersion();

            LanguageCloudIdentityApi = languageCloudIdentityApi;

            Credential = new Credential();
        }
        public ConnectionService(IWin32Window owner, VersionService versionService, LanguageCloudIdentityApi languageCloudIdentityApi, IHttpClient httpClient)
        {
            _httpClient = httpClient;
            _httpClient.SetLogger(_logger);

            Owner          = owner;
            VersionService = versionService;

            IsSignedIn = false;

            PluginVersion = VersionService?.GetPluginVersion();
            StudioVersion = VersionService?.GetStudioVersion();

            LanguageCloudIdentityApi = languageCloudIdentityApi;
        }