Example #1
0
        /********************************************/
        /*** FUNCTIONS TO INTERACT WITH PRESENTER ***/
        /********************************************/

        /// <summary>
        /// A function to update the dimensions of the left and right canvas when the window is resized.
        /// </summary>
        /// <param name="RightCanvas">The size of the right canvas.</param>
        public void ResizeEvent(ImageDimension RightCanvas)
        {
            if (RightCanvas.Height >= 0 && RightCanvas.Width >= 0)
            {
                rightImageSize = RightCanvas;
            }
            RepopulateDeletionMatrixes();
        }
Example #2
0
 /// <summary>
 /// The function to set the left image.
 /// </summary>
 /// <param name="width">The width of the left image.</param>
 /// <param name="height">The height of the left image.</param>
 /// <param name="listOfLines">The List of Lines to be displayed in the left image.</param>
 public void SetLeftLineList(int width, int height, List <InternalLine> listOfLines)
 {
     rightImageSize = new ImageDimension(width, height);
     leftLineList   = listOfLines;
     graphicLoaded  = true;
     programPresenter.UpdateLeftLines(leftLineList);
     CanvasActivated();
 }
Example #3
0
        public MVP_Model(MVP_Presenter presenter)
        {
            programPresenter = presenter;
            historyOfActions = new ActionHistory();
            rightLineList    = new List <Tuple <bool, InternalLine> >();
            canvasActive     = false;
            UpdateUI();
            rightImageSize = new ImageDimension(0, 0);
            connector      = new OptiTrackConnector();
            wristband      = new Wristband();

            //Set up Optitrack
            optitrackAvailable = false;
            if (File.Exists(@"C:\Users\videowall-pc-user\Documents\BP-SketchAssistant\SketchAssistant\optitrack_setup.ttp"))
            {
                if (connector.Init(@"C:\Users\videowall-pc-user\Documents\BP-SketchAssistant\SketchAssistant\optitrack_setup.ttp"))
                {
                    optitrackAvailable = true;
                    connector.StartTracking(GetOptiTrackPosition);
                }
            }
        }