private async void WaypointMission_StateChanged(WaypointMissionHandler sender, WaypointMissionStateTransition?value)
 {
     await CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
     {
         WaypointMissionState = value.HasValue ? value.Value.current : WaypointMissionState.UNKNOWN;
     });
 }
Ejemplo n.º 2
0
        /*
         * private async void Get_DownloadState(object sender, RoutedEventArgs vlaue)
         * {
         *  var state = DJISDKManager.Instance.WaypointMissionManager.GetWaypointMissionHandler(0).GetCurrentState();
         *  WaypointMissionState.Text = state.ToString();
         * }
         */
        //private async void Get_DownloadState(WaypointMissionHandler sender, WaypointMissionDownloadState? value)
        //{
        //    await Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
        //    {
        //        String data = value.HasValue ? JsonConvert.SerializeObject(value) : "Invalid data";
        //        DownloadState.Text = data;
        //        Debug.WriteLine("Download State => " + data);
        //    });
        //}

        /*
         * private async void Get_ExecutionState(object sender, RoutedEventArgs vlaue)
         * {
         *  var state = DJISDKManager.Instance.WaypointMissionManager.GetWaypointMissionHandler(0).GetCurrentState();
         *  WaypointMissionState.Text = state.ToString();
         * }
         */
        private async void Get_ExecutionState(WaypointMissionHandler sender, WaypointMissionExecutionState?value)
        {
            await Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
            {
                String data         = value.HasValue ? JsonConvert.SerializeObject(value) : "Invalid data";
                ExecutionState.Text = data;
                Debug.WriteLine("Execution State => " + data);
            });
        }