Beispiel #1
0
        public HomeViewModel(IApplicationController app, VideoCameraController videoCameraController)
            : base()
        {
            _app = app;

            // Set menu
            MenuViewModel menuViewModel = new MenuViewModel(_app);
            menuViewModel.VisibilityLaser = true;
            Menu = menuViewModel;

            // Set VideoCamera
            CameraView = new CameraViewModel(_app);
            VideoCameraController = videoCameraController;

            // Set Graph
            GraphViewModel graphVM = new GraphViewModel(_app, this, true, 2000);
            GraphView = graphVM;
        }
Beispiel #2
0
        public SettingsViewModel(IApplicationController app, 
            PortController portController,
            VideoCameraController videoCameraController = null)
            : base()
        {
            _app = app;

            CameraView     = new CameraViewModel(_app);

            // Set PortController
            this.portController = portController;

            // Set videocamera settings
            this.videoCameraController = videoCameraController;
            openVideoSource(this.videoCameraController.CameraWindow);
            videoCameraController.setDevices();
            Devices = videoCameraController.Devices;

            setSettingsProperties();
            setValidationRules();
        }
Beispiel #3
0
 public void ShowCameraView()
 {
     CameraViewModel cameraViewModel = new CameraViewModel(this);
     _setContent(cameraViewModel);
 }
        public MeasurementViewModel(IApplicationController app, PortController portController, VideoCameraController videoCameraController)
            : base()
        {
            _app = app;
            Measuring = false;
            RatingViewModel ratingVM = new RatingViewModel(_app);
            RatingControl = ratingVM;

            RectangleColor = "White";

            gymnastList     = vaultModule.getGymnasts();
            vaultNumberList = vaultModule.getVaultNumbers();
            vaultKindList   = vaultModule.getVaultKinds();
            locationsList   = vaultModule.getLocations();

            // Set PortController
            this.portController = portController;

            // Set VideoCamera
            CameraView = new CameraViewModel(_app);
            VideoCameraController = videoCameraController;

            ManualModeChecked = true;

            //Turn pilotlaser off if it is on
            if (portController.PilotLaser != 0)
            {
                portController.PilotLaser = 0;
            }

            // Set Graph
            GraphViewModel graphVM = new GraphViewModel(_app, this, true, 1500);
            GraphViewMeasurement = graphVM;

            // Set validation
            SetValidationRules();

            // Set vault handler
            cameraModule.VaultCreated += vaultCreated;

            // Set thumbnail collection
            thumbnailCollection = new ObservableCollection<ThumbnailViewModel>();

            // Create empty vault
            vault newVault = new vault();
            newVault.timestamp = DateTime.Now;
            selectedVault = newVault;

            // Add empty thumbnail for live and set selected
            ThumbnailViewModel liveThumbnail = new ThumbnailViewModel(_app);
            liveThumbnail.setLive(true);
            liveThumbnail.Vault = newVault;
            thumbnailCollection.Add(liveThumbnail);
            SelectedThumbnail = liveThumbnail;
        }