Example #1
0
        public LoginWindow(AppExitHandler appExitHandler)
        {
            _appExitHandler = appExitHandler;
            InitializeComponent();

            CloseButton.Click    += CloseButton_Click;
            MinimizeButton.Click += Minimize_Click;
        }
Example #2
0
        public TrayNotificationViewModel(
            IVpnManager vpnManager,
            AppExitHandler appExitHandler,
            QuickLaunchViewModel quickLaunchViewModel)
        {
            _vpnManager     = vpnManager;
            _appExitHandler = appExitHandler;

            ExitCommand       = new RelayCommand(ExitAction);
            DisconnectCommand = new RelayCommand(DisconnectAction);
            ConnectCommand    = new RelayCommand(ConnectAction);

            HandleVpnStatus(VpnStatus.Disconnected);

            QuickLaunch = quickLaunchViewModel;
        }
Example #3
0
        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();
        }
Example #4
0
 public SystemNotification(IEventAggregator eventAggregator, IAppSettings appSettings, AppExitHandler appExitHandler)
 {
     _appExitHandler  = appExitHandler;
     _appSettings     = appSettings;
     _eventAggregator = eventAggregator;
 }