Exemplo n.º 1
0
 private void XReceiver_onXPlaneStatReceived(object sender, DataModel.XCurrent_Status e)
 {
     if (dlgTrace != null)
     {
         dlgTrace.Hide();
         dlgTrace = null;
         cmd_MyFlight.IsEnabled = true;
     }
     xStatus = e;
     BindToMap();
 }
Exemplo n.º 2
0
        private async void StartTrace(StackPanel srcObject)
        {
            ListViewItem item = (ListViewItem)srcObject.Parent;
            vw_Menu.IsPaneOpen = false;
            isTrace = !isTrace;
            if(isTrace)
            {
                item.Background = new SolidColorBrush(Windows.UI.Colors.Green);
                xReceiver = Control.xTraceGPSEFISReceiver.GetInstance();
                xReceiver.onXPlaneStatReceived += XReceiver_onXPlaneStatReceived;
                Control.xTraceGPSEFISReceiver.GetInstance().StartReceiveAsync();
                dlgTrace = new Views.Dlg_StartTrace();
                await dlgTrace.ShowAsync();
                
            }
            else
            {
                item.Background = new SolidColorBrush(Windows.UI.Colors.Transparent);
                Control.xTraceGPSEFISReceiver.GetInstance().StopReceive();
                themapitmes.ItemsSource = null;
                cmd_MyFlight.IsEnabled = false;
                
            }

            list_Menu.SelectedItem = null;
        }