Exemplo n.º 1
0
 public ShellViewModel(UserContext userContext, ServersContainerViewModel serversContainerViewModel, LoadingViewModel loadingViewModel, LoginViewModel logingViewModel, RegistrationViewModel registerViewModel, HeaderBarViewModel headerViewModel, SettingsTabViewModel settingsViewModel, P2PModalViewModel p2PModalViewModel, CyberSecReconnectViewModel cyberSectReconnectViewModel, CyberSecModalViewModel cyberSecModalViewModel, AppSelectViewModel appSelectViewModel, IPersistedSettings settings, P2PTrafficStatusObserver p2PTrafficStatusObserver, MapViewModel mapViewModel, TrayViewModel trayViewModel, ExpiredMembershipViewModel expiredMembershipViewModel, ExpiredMembershipObserver expiredMembershipObserver, SubHeaderStripViewModel subHeaderStripViewModel, HeaderBarViewModel headerBarViewModel, AppWindowManager windowManager)
 {
     this._userContext                 = userContext;
     this._headerViewModel             = headerViewModel;
     this._settingsViewModel           = settingsViewModel;
     this._p2PModalViewModel           = p2PModalViewModel;
     this._cyberSectReconnectViewModel = cyberSectReconnectViewModel;
     this._cyberSecModalViewModel      = cyberSecModalViewModel;
     this._appSelectViewModel          = appSelectViewModel;
     this._settings = settings;
     this._serversContainerViewModel = serversContainerViewModel;
     this._mapViewModel      = mapViewModel;
     this._loadingViewModel  = loadingViewModel;
     this._loginViewModel    = logingViewModel;
     this._registerViewModel = registerViewModel;
     this.< SubHeaderStrip > k__BackingField                 = subHeaderStripViewModel;
     this.< HeaderBar > k__BackingField                      = headerBarViewModel;
     p2PTrafficStatusObserver.P2PTrafficRerouted            += new EventHandler(this.OnP2PTrafficRerouted);
     this._expiredMembershipViewModel                        = expiredMembershipViewModel;
     expiredMembershipObserver.ForegroundNotificationNeeded += new EventHandler(this.OnForegroundNotificationNeeded);
     this._windowManager = windowManager;
     this._userContext.add_UserAuthenticated(new EventHandler <UserEventArgs>(this.OnUserAuthenticated));
     this._userContext.add_UserLoggedIn(new EventHandler <UserEventArgs>(this.OnUserLoggedIn));
     this._userContext.add_UserLoggedOut(new EventHandler <UserEventArgs>(this.OnUserLoggedOut));
     this.< Tray > k__BackingField   = trayViewModel;
     this.Tray.ActivateAppRequested += new EventHandler(this.TrayOnActivateAppRequested);
     base.get_Items().AddRange(new Screen[]
     {
         serversContainerViewModel,
         mapViewModel,
         settingsViewModel
     });
 }
Exemplo n.º 2
0
        public void Cam4SetupSectorSets()
        {
            ConfigServiceMock.Object.Cam4SetupSector = "20/1";

            SettingsTabViewModel.LoadSettings();

            SettingsTabViewModel.Cam4SetupSector.Should().Be("20/1");
        }
Exemplo n.º 3
0
        public void Cam4YSetupValueSets()
        {
            ConfigServiceMock.Object.Cam4YSetupValue = 579;

            SettingsTabViewModel.LoadSettings();

            SettingsTabViewModel.Cam4YSetupValue.Should().Be(579);
        }
Exemplo n.º 4
0
        public void ToCam4DistanceSets()
        {
            ConfigServiceMock.Object.ToCam4Distance = 35.5;

            SettingsTabViewModel.LoadSettings();

            SettingsTabViewModel.ToCam4Distance.Should().Be(35.5);
        }
Exemplo n.º 5
0
        public void MaxContourWidthValueSets()
        {
            ConfigServiceMock.Object.MaxContourWidthValue = 100;

            SettingsTabViewModel.LoadSettings();

            SettingsTabViewModel.MaxContourWidthValue.Should().Be(100);
        }
Exemplo n.º 6
0
        public void Cam4ThresholdSliderValueSets()
        {
            ConfigServiceMock.Object.Cam4ThresholdSliderValue = 1555.55;

            SettingsTabViewModel.LoadSettings();

            SettingsTabViewModel.Cam4ThresholdSliderValue.Should().Be(1555.55);
        }
Exemplo n.º 7
0
        public void ExtractionSleepTimeValueSets()
        {
            ConfigServiceMock.Object.ExtractionSleepTimeValue = 8.5;

            SettingsTabViewModel.LoadSettings();

            SettingsTabViewModel.ExtractionSleepTimeValue.Should().Be(8.5);
        }
Exemplo n.º 8
0
        public void MovesDetectedSleepTimeValueSets()
        {
            ConfigServiceMock.Object.MovesDetectedSleepTimeValue = 0.25;

            SettingsTabViewModel.LoadSettings();

            SettingsTabViewModel.MovesDetectedSleepTimeValue.Should().Be(0.25);
        }
Exemplo n.º 9
0
        public void SmoothGaussValueSets()
        {
            ConfigServiceMock.Object.SmoothGaussValue = 5;

            SettingsTabViewModel.LoadSettings();

            SettingsTabViewModel.SmoothGaussValue.Should().Be(5);
        }
Exemplo n.º 10
0
        public void CamsResolutionWidthSets()
        {
            ConfigServiceMock.Object.CamsResolutionWidth = 1920;

            SettingsTabViewModel.LoadSettings();

            SettingsTabViewModel.CamsResolutionWidth.Should().Be(1920);
        }
Exemplo n.º 11
0
        public void CamsResolutionHeightSets()
        {
            ConfigServiceMock.Object.CamsResolutionHeight = 1028;

            SettingsTabViewModel.LoadSettings();

            SettingsTabViewModel.CamsResolutionHeight.Should().Be(1028);
        }
Exemplo n.º 12
0
        public void CamsFovAngleSets()
        {
            ConfigServiceMock.Object.CamsFovAngle = 75.5;

            SettingsTabViewModel.LoadSettings();

            SettingsTabViewModel.CamsFovAngle.Should().Be(75.5);
        }
Exemplo n.º 13
0
        public void Cam4IdSets()
        {
            ConfigServiceMock.Object.Cam4Id = "34rre5";

            SettingsTabViewModel.LoadSettings();

            SettingsTabViewModel.Cam4Id.Should().Be("34rre5");
        }
Exemplo n.º 14
0
        public void DetectionEnabledSets()
        {
            ConfigServiceMock.Object.DetectionEnabled = true;

            SettingsTabViewModel.LoadSettings();

            SettingsTabViewModel.DetectionEnabled.Should().BeTrue();
        }
Exemplo n.º 15
0
        public void Cam1SurfaceCenterSliderValueSets()
        {
            ConfigServiceMock.Object.Cam1SurfaceCenterSliderValue = 1555.55;

            SettingsTabViewModel.LoadSettings();

            SettingsTabViewModel.Cam1SurfaceCenterSliderValue.Should().Be(1555.55);
        }
Exemplo n.º 16
0
        public void ThresholdSleepTimeValueSets()
        {
            ConfigServiceMock.Object.ThresholdSleepTimeValue = 5.5;

            SettingsTabViewModel.LoadSettings();

            SettingsTabViewModel.ThresholdSleepTimeValue.Should().Be(5.5);
        }
 protected override void Setup()
 {
     base.Setup();
     SettingsTabViewModel = new SettingsTabViewModel(null,
                                                     DbServiceMock.Object,
                                                     LoggerMock.Object,
                                                     ConfigServiceMock.Object,
                                                     null,
                                                     MessageBoxServiceMock.Object,
                                                     null,
                                                     DetectionServiceMock.Object);
 }
        public SettingsTabView(SettingsTabViewModel model)
        {
            InitializeComponent();

            //SolidColorBrush black = new SolidColorBrush(Colors.Black);
            //SolidColorBrush white = new SolidColorBrush(Colors.White);
            //btnCompanyDetails.Background = black;
            //btnCompanyDetails.Foreground = white;
            DataContext = model;
            //SolidColorBrush btnBackColor = new SolidColorBrush(Colors.Black);
            //SolidColorBrush btnForColor = new SolidColorBrush(Colors.Black);
            //btnCompanydetails.Background = btnBackColor;
            //btnCompanydetails.Foreground = btnForColor;
        }
Exemplo n.º 19
0
        public override void InitViewModels()
        {
            SceneTab    = new SceneTabViewModel();
            EntitiesTab = new EntitiesTabViewModel();
            FilesTab    = new FilesTabViewModel();
            ConsoleTab  = new ConsoleTabViewModel();

            NodesTab = new NodesTabViewModel();
            NodesTab.InitViewModels();

            AssetsTab = new AssetsTabViewModel();
            AssetsTab.InitViewModels();

            SettingsTab = new SettingsTabViewModel();
            SettingsTab.InitViewModels();

            StatusBar = new StatusBarViewModel();
        }