protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e) { camera = new Camera(cameraViewBrush,0); camera.start(); }
public void start(Camera _camera, Map _map) { Thread loopThread = new Thread(new ThreadStart(this.loop)); loopThread.IsBackground = true; loopThread.Name = "Flight Loop"; camera = _camera; themap = _map; _isRunning = true; loopThread.Start(); // Start camera on a timer cameraTimer = new System.Windows.Threading.DispatcherTimer(); if ((bool)settings["generalCameraToggle"]) { cameraTimer.Interval = new TimeSpan(0, 0, Convert.ToInt32(settings["cameraInterval"])); cameraTimer.Tick += new EventHandler(cameraTimer_Tick); cameraTimer.Start(); } }