public DisconnectErrorModalViewModel( ILogger logger, IActiveUrls urlConfig, ConnectionErrorResolver connectionErrorResolver, IVpnManager vpnManager, IModals modals, SettingsModalViewModel settingsModalViewModel, ProfileManager profileManager, IUserStorage userStorage) { _userStorage = userStorage; _logger = logger; _modals = modals; _settingsModalViewModel = settingsModalViewModel; _vpnManager = vpnManager; _connectionErrorResolver = connectionErrorResolver; _urlConfig = urlConfig; _profileManager = profileManager; OpenHelpArticleCommand = new RelayCommand(OpenHelpArticleAction); SettingsCommand = new RelayCommand(OpenSettings); DisableKillSwitchCommand = new RelayCommand(DisableKillSwitch); GoToAccountCommand = new RelayCommand(OpenAccountPage); UpgradeCommand = new RelayCommand(UpgradeAction); }
public VpnReconnector(IAppSettings appSettings, ISimilarServerCandidatesGenerator similarServerCandidatesGenerator, IModals modals, IPopupWindows popups, IVpnConnector vpnConnector, INotificationSender notificationSender, ILogger logger, ServerCandidatesFactory serverCandidatesFactory, Common.Configuration.Config config, Lazy <ConnectionStatusViewModel> connectionStatusViewModel, ServerManager serverManager, Lazy <ServerConnector> serverConnector, Lazy <ProfileConnector> profileConnector) { _appSettings = appSettings; _similarServerCandidatesGenerator = similarServerCandidatesGenerator; _modals = modals; _popups = popups; _vpnConnector = vpnConnector; _notificationSender = notificationSender; _logger = logger; _serverCandidatesFactory = serverCandidatesFactory; _config = config; _connectionStatusViewModel = connectionStatusViewModel; _serverManager = serverManager; _serverConnector = serverConnector; _profileConnector = profileConnector; }
public QuickSettingsViewModel( IAppSettings appSettings, IUserStorage userStorage, IActiveUrls urls, IModals modals, IVpnReconnector vpnReconnector) { _modals = modals; _urls = urls; _userStorage = userStorage; _appSettings = appSettings; _vpnReconnector = vpnReconnector; SecureCoreLearnMoreCommand = new RelayCommand(OpenSecureCoreArticleAction); NetShieldLearnMoreCommand = new RelayCommand(OpenNetShieldArticleAction); KillSwitchLearnMoreCommand = new RelayCommand(OpenKillSwitchArticleAction); PortForwardingLearnMoreCommand = new RelayCommand(OpenPortForwardingArticleAction); SecureCoreOffCommand = new RelayCommand(TurnOffSecureCoreActionAsync); SecureCoreOnCommand = new RelayCommand(TurnOnSecureCoreActionAsync); NetShieldOffCommand = new RelayCommand(TurnOffNetShieldActionAsync); NetShieldOnFirstCommand = new RelayCommand(TurnOnNetShieldFirstModeActionAsync); NetShieldOnSecondCommand = new RelayCommand(TurnOnNetShieldSecondModeActionAsync); DisableKillSwitchCommand = new RelayCommand(DisableKillSwitchAction); EnableSoftKillSwitchCommand = new RelayCommand(EnableSoftKillSwitchActionAsync); EnableHardKillSwitchCommand = new RelayCommand(EnableHardKillSwitchActionAsync); PortForwardingOffCommand = new RelayCommand(TurnOffPortForwardingActionAsync); PortForwardingOnCommand = new RelayCommand(TurnOnPortForwardingActionAsync); GetPlusCommand = new RelayCommand(GetPlusAction); }
public void Initialize() { _logger = Substitute.For <ILogger>(); _decorated = Substitute.For <IVpnServiceManager>(); _modals = Substitute.For <IModals>(); _baseFilteringEngineService = Substitute.For <IService>(); }
public SystemTimeValidator(INtpClient ntpClient, IModals modals, ILogger logger) { _ntpClient = ntpClient; _modals = modals; _logger = logger; _validateAction = new SingleAction(ValidateTime); }
public LoginViewModel( Common.Configuration.Config appConfig, LoginWindowViewModel loginWindowViewModel, IActiveUrls urls, IAppSettings appSettings, LoginErrorViewModel loginErrorViewModel, UserAuth userAuth, IModals modals, GuestHoleConnector guestHoleConnector, GuestHoleState guestHoleState) { _appConfig = appConfig; _userAuth = userAuth; _appSettings = appSettings; _urls = urls; _modals = modals; _loginWindowViewModel = loginWindowViewModel; _guestHoleConnector = guestHoleConnector; _guestHoleState = guestHoleState; LoginErrorViewModel = loginErrorViewModel; LoginCommand = new RelayCommand(LoginAction); RegisterCommand = new RelayCommand(RegisterAction); HelpCommand = new RelayCommand(HelpAction); ToggleHelpBalloon = new RelayCommand(ToggleBalloonAction); ResetPasswordCommand = new RelayCommand(ResetPasswordAction); ForgotUsernameCommand = new RelayCommand(ForgotUsernameAction); DisableKillSwitchCommand = new RelayCommand(DisableKillSwitchAction); }
public ConnectionStatusViewModel( IAppSettings appSettings, SidebarManager sidebarManager, ServerManager serverManager, IVpnManager vpnManager, VpnConnectionSpeed speedTracker, IUserStorage userStorage, IModals modals, ILogger logger, SettingsModalViewModel settingsModalViewModel, AnnouncementsViewModel announcementsViewModel) { _appSettings = appSettings; _sidebarManager = sidebarManager; _vpnManager = vpnManager; _serverManager = serverManager; _speedTracker = speedTracker; _userStorage = userStorage; _modals = modals; _logger = logger; _settingsModalViewModel = settingsModalViewModel; _enumToDisplayTextConverter = new EnumToDisplayTextConverter(); QuickConnectCommand = new RelayCommand(QuickConnectAction); DisableKillSwitchCommand = new RelayCommand(DisableKillSwitch); ToggleSidebarModeCommand = new RelayCommand(ToggleSidebarModeAction); CloseVpnAcceleratorReconnectionPopupCommand = new RelayCommand(CloseVpnAcceleratorReconnectionPopupAction); OpenNotificationSettingsCommand = new RelayCommand(OpenNotificationSettingsAction); Announcements = announcementsViewModel; _timer = new DispatcherTimer { Interval = TimeSpan.FromSeconds(1) }; _timer.Tick += OnSecondPassed; }
public UpdateViewModel(IModals modals, IDialogs dialogs, IOsProcesses osProcesses) { _osProcesses = osProcesses; _modals = modals; _dialogs = dialogs; OpenAboutCommand = new RelayCommand(OpenAbout); }
public UpdateViewModel(UpdateService updateService, IModals modals, IDialogs dialogs) { _updateService = updateService; _modals = modals; _dialogs = dialogs; OpenAboutCommand = new RelayCommand(OpenAbout); }
public SecureCoreProfileFormViewModel( Common.Configuration.Config appConfig, ColorProvider colorProvider, IUserStorage userStorage, ServerManager serverManager, ProfileManager profileManager, IModals modals, IDialogs dialogs) : base(appConfig, colorProvider, userStorage, profileManager, dialogs, modals, serverManager) { }
public Trial( IAppSettings appSettings, UserAuth userAuth, IUserStorage userStorage, IModals modals) { _modals = modals; _userStorage = userStorage; _userAuth = userAuth; _appSettings = appSettings; }
public ServiceStartDecorator( ILogger logger, IVpnServiceManager decorated, IModals modals, IService baseFilteringEngineService) { _baseFilteringEngineService = baseFilteringEngineService; _logger = logger; _modals = modals; _decorated = decorated; }
public ActionableFailureApiResultEventHandler(IModals modals, ApiActionModalViewModel apiActionModalViewModel, IApiClient apiClient, ITokenClient tokenClient) { _modals = modals; _apiActionModalViewModel = apiActionModalViewModel; apiClient.OnActionableFailureResult += OnActionableFailureResult; tokenClient.OnActionableFailureResult += OnActionableFailureResult; }
protected BaseCountryServerProfileFormViewModel( Common.Configuration.Config appConfig, ColorProvider colorProvider, IUserStorage userStorage, ProfileManager profileManager, IDialogs dialogs, IModals modals, ServerManager serverManager) : base(appConfig, colorProvider, userStorage, profileManager, dialogs, modals, serverManager) { _modals = modals; }
public P2PDetector( ILogger logger, Common.Configuration.Config appConfig, IBlockedTraffic blockedTraffic, IForwardedTraffic forwardedTraffic, IScheduler scheduler, IModals modals, IDialogs dialogs) : this(logger, blockedTraffic, forwardedTraffic, scheduler.Timer(), modals, dialogs, appConfig.P2PCheckInterval.RandomizedWithDeviation(0.2)) { }
public UpdateViewModel( IDialogs dialogs, IOsProcesses osProcesses, IModals modals, SystemState systemState) { _systemState = systemState; _dialogs = dialogs; _osProcesses = osProcesses; _modals = modals; OpenAboutCommand = new RelayCommand(OpenAbout); }
public OutdatedAppNotification( IModals modals, UserAuth userAuth, LoginWindow loginWindow, IScheduler scheduler, IVpnServiceManager vpnServiceManager) { _modals = modals; _userAuth = userAuth; _loginWindow = loginWindow; _scheduler = scheduler; _vpnServiceManager = vpnServiceManager; }
public AboutModalViewModel( Common.Configuration.Config appConfig, UpdateService appUpdater, IAppSettings appSettings, UpdateViewModel updateViewModel, IModals modals) { _modals = modals; _appConfig = appConfig; _appUpdater = appUpdater; _appSettings = appSettings; Update = updateViewModel; LicenseCommand = new RelayCommand(ShowLicense); }
public TunFallbackPopupViewModel( AppWindow appWindow, SettingsModalViewModel settingsModalViewModel, IModals modals, IBugReport bugReport, IReportFieldProvider reportFieldProvider) : base(appWindow) { _bugReport = bugReport; _modals = modals; _settingsModalViewModel = settingsModalViewModel; _reportFieldProvider = reportFieldProvider; OpenAdvancedSettingsCommand = new RelayCommand(OpenAdvancedSettingsAction); ReportProblemCommand = new RelayCommand(ReportProblemAction); }
public SidebarProfilesViewModel( ProfileManager profileManager, ProfileViewModelFactory profileHelper, VpnManager vpnManager, IModals modals) { _modals = modals; _profileManager = profileManager; _profileHelper = profileHelper; _vpnManager = vpnManager; CreateProfileCommand = new RelayCommand(CreateProfileAction); ManageProfilesCommand = new RelayCommand(ManageProfilesAction); ConnectCommand = new RelayCommand <ProfileViewModel>(ConnectAction); }
public void TestInitialize() { _logger = Substitute.For <ILogger>(); _appConfig = new Common.Configuration.Config(); _blockedTraffic = Substitute.For <IBlockedTraffic>(); _forwardedTraffic = Substitute.For <IForwardedTraffic>(); _scheduler = Substitute.For <IScheduler>(); _modals = Substitute.For <IModals>(); _dialogs = Substitute.For <IDialogs>(); _timer = Substitute.For <ISchedulerTimer>(); _timer.When(x => x.Start()).Do(x => _timerIsEnabled = true); _timer.When(x => x.Stop()).Do(x => _timerIsEnabled = false); _timer.When(x => x.IsEnabled = Arg.Do <bool>(value => _timerIsEnabled = value)); _timer.IsEnabled.Returns(_ => _timerIsEnabled); _scheduler.Timer().Returns(_timer); }
public MainViewModel( UserAuth userAuth, IVpnManager vpnManager, IActiveUrls urls, IEventAggregator eventAggregator, AppExitHandler appExitHandler, IModals modals, IDialogs dialogs, IPopupWindows popups, MapViewModel mapViewModel, ConnectingViewModel connectingViewModel, OnboardingViewModel onboardingViewModel, FlashNotificationViewModel flashNotificationViewModel, TrayNotificationViewModel trayNotificationViewModel) { _eventAggregator = eventAggregator; _vpnManager = vpnManager; _urls = urls; _userAuth = userAuth; _appExitHandler = appExitHandler; _modals = modals; _dialogs = dialogs; _popups = popups; Map = mapViewModel; Connection = connectingViewModel; Onboarding = onboardingViewModel; TrayNotification = trayNotificationViewModel; FlashNotification = flashNotificationViewModel; eventAggregator.Subscribe(this); AboutCommand = new RelayCommand(AboutAction, CanClick); AccountCommand = new RelayCommand(AccountAction, CanClick); ProfilesCommand = new RelayCommand(ProfilesAction, CanClick); SettingsCommand = new RelayCommand(SettingsAction, CanClick); HelpCommand = new RelayCommand(HelpAction); ReportBugCommand = new RelayCommand(ReportBugAction, CanClick); DeveloperToolsCommand = new RelayCommand(DeveloperToolsAction); LogoutCommand = new RelayCommand(LogoutAction); ExitCommand = new RelayCommand(ExitAction); SetDeveloperToolsVisibility(); }
private P2PDetector( ILogger logger, IBlockedTraffic blockedTraffic, IForwardedTraffic forwardedTraffic, ISchedulerTimer timer, IModals modals, IDialogs dialogs, TimeSpan checkInterval) { _logger = logger; _blockedTraffic = blockedTraffic; _forwardedTraffic = forwardedTraffic; _timer = timer; _modals = modals; _dialogs = dialogs; _timer.Interval = checkInterval; _timer.Tick += OnTimerTick; }
protected AbstractForm( Common.Configuration.Config appConfig, ColorProvider colorProvider, IUserStorage userStorage, ProfileManager profileManager, IDialogs dialogs, IModals modals, ServerManager serverManager) { _appConfig = appConfig; _profileManager = profileManager; UserStorage = userStorage; _colorProvider = colorProvider; _dialogs = dialogs; _modals = modals; ServerManager = serverManager; SelectColorCommand = new RelayCommand <string>(SelectColorAction); }
public UpdateViewModel( IDialogs dialogs, IOsProcesses osProcesses, IModals modals, IAppSettings appSettings, IVpnServiceManager vpnServiceManager, ISystemState systemState, ISettingsServiceClientManager settingsServiceClientManager) { _dialogs = dialogs; _osProcesses = osProcesses; _modals = modals; _appSettings = appSettings; _vpnServiceManager = vpnServiceManager; _systemState = systemState; _settingsServiceClientManager = settingsServiceClientManager; OpenAboutCommand = new RelayCommand(OpenAbout); }
public DisconnectErrorModalViewModel( ILogger logger, IActiveUrls urlConfig, ConnectionErrorResolver connectionErrorResolver, IVpnManager vpnManager, IModals modals, SettingsModalViewModel settingsModalViewModel) { _logger = logger; _modals = modals; _settingsModalViewModel = settingsModalViewModel; _vpnManager = vpnManager; _connectionErrorResolver = connectionErrorResolver; _urlConfig = urlConfig; OpenHelpArticleCommand = new RelayCommand(OpenHelpArticleAction); SettingsCommand = new RelayCommand(OpenSettings); DisableKillSwitchCommand = new RelayCommand(DisableKillSwitch); ReportBugCommand = new RelayCommand(ReportBug); GoToAccountCommand = new RelayCommand(OpenAccountPage); }
public DeveloperToolsPopupViewModel(AppWindow appWindow, UserAuth userAuth, IPopupWindows popups, IModals modals, INotificationSender notificationSender, ConnectionStatusViewModel connectionStatusViewModel, IAppSettings appSettings, ReconnectManager reconnectManager) : base(appWindow) { _userAuth = userAuth; _popups = popups; _modals = modals; _notificationSender = notificationSender; _connectionStatusViewModel = connectionStatusViewModel; _appSettings = appSettings; _reconnectManager = reconnectManager; InitializeCommands(); }
public ProfileListModalViewModel( ProfileManager profileManager, ProfileViewModelFactory profileHelper, IModals modals, IDialogs dialogs, VpnManager vpnManager, ProfileSyncViewModel profileSync) { ProfileSync = profileSync; _profileHelper = profileHelper; _profileManager = profileManager; _modals = modals; _dialogs = dialogs; _vpnManager = vpnManager; ConnectCommand = new RelayCommand <ProfileViewModel>(ConnectAction); RemoveCommand = new RelayCommand <ProfileViewModel>(RemoveAction); EditCommand = new RelayCommand <ProfileViewModel>(EditProfileAction); CreateProfileCommand = new RelayCommand(CreateProfileAction); }
public DisconnectErrorModalViewModel( ILogger logger, IActiveUrls urlConfig, IAppSettings appSettings, IVpnManager vpnManager, IUserStorage userStorage, IModals modals) { _logger = logger; _urlConfig = urlConfig; _appSettings = appSettings; _vpnManager = vpnManager; _userStorage = userStorage; _modals = modals; OpenHelpArticleCommand = new RelayCommand(OpenHelpArticleAction); DisableKillSwitchCommand = new RelayCommand(DisableKillSwitch); GoToAccountCommand = new RelayCommand(OpenAccountPage); UpgradeCommand = new RelayCommand(UpgradeAction); ReportBugCommand = new RelayCommand(ReportBugAction); }
public ProfileConnector( ILogger logger, IUserStorage userStorage, IAppSettings appSettings, ServerManager serverManager, ServerCandidatesFactory serverCandidatesFactory, IVpnServiceManager vpnServiceManager, IModals modals, IDialogs dialogs, VpnCredentialProvider vpnCredentialProvider) { _logger = logger; _vpnCredentialProvider = vpnCredentialProvider; _modals = modals; _dialogs = dialogs; _userStorage = userStorage; _serverManager = serverManager; _serverCandidatesFactory = serverCandidatesFactory; _appSettings = appSettings; _vpnServiceManager = vpnServiceManager; }