public ShellView( IDialogService dialogService, IProgressService progressService, IChocolateyConfigurationProvider chocolateyConfigurationProvider, IConfigService configService, IFileSystem fileSystem, IImageService imageService) { InitializeComponent(); dialogService.ShellView = this; progressService.ShellView = this; _progressService = progressService; _chocolateyConfigurationProvider = chocolateyConfigurationProvider; _configService = configService; _fileSystem = fileSystem; _imageService = imageService; this.Icon = BitmapFrame.Create(_imageService.ToolbarIconUri); CheckOperatingSystemCompatibility(); // Certain things like Cef (our markdown browser engine) get unhappy when GUI is started from a different cwd. // If we're in a different one, reset it to our app files directory. if (_fileSystem.get_directory_name(Environment.CurrentDirectory) != Bootstrapper.ApplicationFilesPath) { Environment.CurrentDirectory = Bootstrapper.ApplicationFilesPath; } }
public ShellView( IProgressService progressService, IChocolateyConfigurationProvider chocolateyConfigurationProvider, IConfigService configService) { InitializeComponent(); var service = progressService as ProgressService; if (service != null) { service.ShellView = this; } _progressService = progressService; _chocolateyConfigurationProvider = chocolateyConfigurationProvider; _configService = configService; CheckOperatingSystemCompatibility(); // Certain things like Cef (our markdown browser engine) get unhappy when GUI is started from a different cwd. // If we're in a different one, reset it to our app files directory. if (Path.GetDirectoryName(Environment.CurrentDirectory) != Bootstrapper.ApplicationFilesPath) { Environment.CurrentDirectory = Bootstrapper.ApplicationFilesPath; } }
public PackageArgumentsService( IEncryptionUtility encryptionUtility, IFileSystem fileSystem, IChocolateyConfigurationProvider chocolateyConfigurationProvider, IDialogService dialogService) { _encryptionUtility = encryptionUtility; _fileSystem = fileSystem; _chocolateyConfigurationProvider = chocolateyConfigurationProvider; _dialogService = dialogService; }
protected BasePackageService(IProgressService progressService, Func <Type, ILogService> logServiceFunc, IChocolateyConfigurationProvider chocolateyConfigurationProvider) { if (logServiceFunc == null) { throw new ArgumentNullException("logServiceFunc"); } this.GetInstalledLock = new AsyncLock(); this.progressService = progressService; this.logService = logServiceFunc(typeof(IChocolateyPackageService)); this.chocolateyConfigurationProvider = chocolateyConfigurationProvider; this.PackagesJsonPath = Path.Combine( Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "ChocolateyGUI", "packages.json"); }
protected BasePackageService(IProgressService progressService, Func<Type, ILogService> logServiceFunc, IChocolateyConfigurationProvider chocolateyConfigurationProvider) { if (logServiceFunc == null) { throw new ArgumentNullException("logServiceFunc"); } this.GetInstalledLock = new AsyncLock(); this.progressService = progressService; this.logService = logServiceFunc(typeof(IChocolateyPackageService)); this.chocolateyConfigurationProvider = chocolateyConfigurationProvider; this.PackagesJsonPath = Path.Combine( Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "ChocolateyGUI", "packages.json"); }
public ShellView( IProgressService progressService, IChocolateyConfigurationProvider chocolateyConfigurationProvider, IConfigService configService) { InitializeComponent(); var service = progressService as ProgressService; if (service != null) { service.ShellView = this; } _progressService = progressService; _chocolateyConfigurationProvider = chocolateyConfigurationProvider; _configService = configService; CheckOperatingSystemCompatibility(); // Certain things like Cef (our markdown browser engine) get unhappy when GUI is started from a different cwd. // If we're in a different one, reset it to our app files directory. if (Path.GetDirectoryName(Environment.CurrentDirectory) != Bootstrapper.ApplicationFilesPath) { Environment.CurrentDirectory = Bootstrapper.ApplicationFilesPath; } var settings = new CefSettings(); settings.RegisterScheme(new CefCustomScheme { SchemeName = ChocolateyCustomSchemeProvider.SchemeName, SchemeHandlerFactory = new ChocolateyCustomSchemeProvider() }); settings.CefCommandLineArgs.Add("no-proxy-server", "1"); settings.CachePath = Path.Combine(Bootstrapper.LocalAppDataPath, "CefCache"); if (!Cef.Initialize(settings, performDependencyCheck: true, browserProcessHandler: null)) { return; } }
public ShellView( IDialogService dialogService, IProgressService progressService, IChocolateyConfigurationProvider chocolateyConfigurationProvider, IConfigService configService, IFileSystem fileSystem, IImageService imageService) { InitializeComponent(); dialogService.ShellView = this; progressService.ShellView = this; _progressService = progressService; _chocolateyConfigurationProvider = chocolateyConfigurationProvider; _configService = configService; _fileSystem = fileSystem; _imageService = imageService; this.Icon = BitmapFrame.Create(_imageService.ToolbarIconUri); CheckOperatingSystemCompatibility(); // Certain things like Cef (our markdown browser engine) get unhappy when GUI is started from a different cwd. // If we're in a different one, reset it to our app files directory. if (_fileSystem.get_directory_name(Environment.CurrentDirectory) != Bootstrapper.ApplicationFilesPath) { Environment.CurrentDirectory = Bootstrapper.ApplicationFilesPath; } dialogService.ChildWindowOpened += (sender, o) => IsAnyDialogOpen = true; dialogService.ChildWindowClosed += (sender, o) => IsAnyDialogOpen = false; SetLanguage(TranslationSource.Instance.CurrentCulture); TranslationSource.Instance.PropertyChanged += TranslationLanguageChanged; }
public CSharpChocolateyPackageService(IProgressService progressService, Func <Type, ILogService> logServiceFunc, IChocolateyConfigurationProvider chocolateyConfigurationProvider) : base(progressService, logServiceFunc, chocolateyConfigurationProvider) { this.chocoExePath = Path.Combine(this.ChocolateyConfigurationProvider.ChocolateyInstall, "choco.exe"); }
public CSharpChocolateyPackageService(IProgressService progressService, Func<Type, ILogService> logServiceFunc, IChocolateyConfigurationProvider chocolateyConfigurationProvider) : base(progressService, logServiceFunc, chocolateyConfigurationProvider) { this.chocoExePath = Path.Combine(this.ChocolateyConfigurationProvider.ChocolateyInstall, "choco.exe"); }
public PowerShellChocolateyPackageService(IProgressService progressService, Func<Type, ILogService> logServiceFunc, IChocolateyConfigurationProvider chocolateyConfigurationProvider) : base(progressService, logServiceFunc, chocolateyConfigurationProvider) { this._runspace = RunspaceFactory.CreateRunspace(new ChocolateyHost(this.ProgressService)); this._runspace.Open(); }
public PowerShellChocolateyPackageService(IProgressService progressService, Func <Type, ILogService> logServiceFunc, IChocolateyConfigurationProvider chocolateyConfigurationProvider) : base(progressService, logServiceFunc, chocolateyConfigurationProvider) { this._runspace = RunspaceFactory.CreateRunspace(new ChocolateyHost(this.ProgressService)); this._runspace.Open(); }