public MainWindow() { bool InDebugMode = false; String[] commArgs = Environment.GetCommandLineArgs(); InitializeComponent(); if (commArgs.Length > 1) { if (commArgs[1].Equals("-debug")) { InDebugMode = true; } } if (!InDebugMode) { DebugMode.Visibility = Visibility.Collapsed; } ProgramPresenter = new MVP_Presenter(this); // DispatcherTimer setup dispatcherTimer = new DispatcherTimer(DispatcherPriority.Render); dispatcherTimer.Tick += new EventHandler(dispatcherTimer_Tick); dispatcherTimer.Interval = new TimeSpan(0, 0, 0, 0, 5); ProgramPresenter.Resize(new Tuple <int, int>((int)LeftCanvas.Width, (int)LeftCanvas.Height), new Tuple <int, int>((int)RightCanvas.Width, (int)RightCanvas.Height)); //Setup overlay items SetupOverlay(); }
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); } } }