public VideoPlaybackViewModel(IApplicationController app)
            : base()
        {
            _app = app;

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

            // Set Graph
            GraphViewModel graphVM = new GraphViewModel(_app, this, false ,2000);
            GraphView = graphVM;
        }
Exemple #2
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;
        }
        public CompareVaultsViewModel(IApplicationController app)
            : base()
        {
            _app = app;

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

            PlayButtonImage = playImage;
            SelectionEnabled = true;
            rightIsEnabled = true;
            LeftIsEnabled = true;

            DistanceGraphView = new GraphViewModel(_app, this, false, 1000);
            SpeedGraphView = new GraphViewModel(_app, this, false, 1000);

            aVideoFinished = false;
            videoLeftMax = 0;
            videoRightMax = 0;
        }
        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;
        }