public MainPage() { InitializeComponent(); setUpMap(); this.fastestRuning = false; this.timer = new DispatcherTimer(); timer.Interval = new TimeSpan(0, 0, 1); timer.Tick += new EventHandler(timer_Tick); this.isConnected = false; this.Connector = new WifiConnector(); this.Connector.ReceivingDataHandler += new WifiConnector.ReceivingData(updateRealTime); this.Connector.UpdatingConsoleHandler += new WifiConnector.UpdatingInfo(displayRobotMessage); this.Connector.UpdatingConnectionHandler += new WifiConnector.UpdatingConnectionStatus(this.updateConnectionStatus); this.mappingThread = new Thread(this.Connector.run); }