public SettingsService(IDefaultValueProvider defaultValueProvider, ApplicationDataContainers containers) { _defaultValueProvider = defaultValueProvider; _localSettings = containers.LocalSettings; _roamingSettings = containers.RoamingSettings; _themes = containers.Themes; _keyBindings = containers.KeyBindings; _shellProfiles = containers.ShellProfiles; _sshProfiles = containers.SshProfiles; foreach (var theme in _defaultValueProvider.GetPreInstalledThemes()) { if (GetTheme(theme.Id) == null) { _themes.WriteValueAsJson(theme.Id.ToString(), theme); } } foreach (var shellProfile in _defaultValueProvider.GetPreinstalledShellProfiles()) { if (GetShellProfile(shellProfile.Id) == null) { _shellProfiles.WriteValueAsJson(shellProfile.Id.ToString(), shellProfile); } } }
public SshProfilesPageViewModel(ISettingsService settingsService, IDialogService dialogService, IFileSystemService fileSystemService, IApplicationView applicationView, ITrayProcessCommunicationService trayProcessCommunicationService, IApplicationDataContainer historyContainer) { _settingsService = settingsService; _dialogService = dialogService; _fileSystemService = fileSystemService; _applicationView = applicationView; _trayProcessCommunicationService = trayProcessCommunicationService; _historyContainer = historyContainer; CreateSshProfileCommand = new RelayCommand(CreateSshProfile); CloneCommand = new RelayCommand <SshProfileViewModel>(Clone); foreach (var sshProfile in _settingsService.GetSshProfiles()) { var viewModel = new SshProfileViewModel(sshProfile, settingsService, dialogService, fileSystemService, applicationView, _trayProcessCommunicationService, historyContainer, false); viewModel.Deleted += OnSshProfileDeleted; SshProfiles.Add(viewModel); } if (SshProfiles.Count == 0) { CreateSshProfile(); } SelectedSshProfile = SshProfiles.First(); }
public SshProfileViewModel(SshProfile sshProfile, ISettingsService settingsService, IDialogService dialogService, IFileSystemService fileSystemService, IApplicationView applicationView, ITrayProcessCommunicationService trayProcessCommunicationService, IApplicationDataContainer historyContainer, bool isNew) : base(sshProfile, settingsService, dialogService, isNew) { ProfileVm = new SshConnectViewModel(settingsService, applicationView, trayProcessCommunicationService, fileSystemService, sshProfile); }
public CustomCommandDialog(ISettingsService settingsService, IApplicationView applicationView, ITrayProcessCommunicationService trayProcessCommunicationService, ApplicationDataContainers containers) { _settingsService = settingsService; _applicationView = applicationView; _trayProcessCommunicationService = trayProcessCommunicationService; _historyContainer = containers.HistoryContainer; InitializeComponent(); PrimaryButtonText = I18N.Translate("OK"); SecondaryButtonText = I18N.Translate("Cancel"); var currentTheme = settingsService.GetCurrentTheme(); RequestedTheme = ContrastHelper.GetIdealThemeForBackgroundColor(currentTheme.Colors.Background); }
public CommandHistoryService(ApplicationDataContainers containers, ISettingsService settingsService) { _settingsService = settingsService; _historyContainer = containers.HistoryContainer; }
public CommandHistoryService(ApplicationDataContainers containers) { _historyContainer = containers.HistoryContainer; }
public ApplicationSettingsService(IApplicationDataContainer dataContainer) { _dataContainer = dataContainer; LoadSettings(); }