/* * This function is calling the ApllicationModel function "Connect", which * connects to the Flight Simulator as client and creates a server which * the Flight Simulator is it's client. * Moreover, this function creates a no name function to add to the "Io" * class event. When triggered, the function will set the View Model * LonAndLat point property to be the Io's LonAndLat point and notifies the * View that there was a change. */ private void ConnectClick() { this.AM = ApplicationModel.Instance; this.AM.Io.IoEvent += () => { this.LonAndLat = this.AM.Io.LonAndLat; FVBMEvent?.Invoke(this, null); }; AM.Connect(); }