예제 #1
0
        private async void menuitemErrorReports_Click(object sender, RoutedEventArgs e)
        {
            CancellationTokenSource         cancellationTokenSource = new CancellationTokenSource();
            List <AzureSphereDeviceInsight> deviceInsights;

            Cursor = Cursors.Wait;
            try
            {
                deviceInsights = await Api.GetDeviceInsightsAsync(Tenant, cancellationTokenSource.Token);
            }
            finally
            {
                Cursor = null;
            }

            var dialog = new ErrorReportsWindow();

            dialog.Owner          = this;
            dialog.DeviceInsights = deviceInsights;
            var dialogResult = dialog.ShowDialog();

            dialog = null;
        }
        private async void menuitemErrorReports_Click(object sender, RoutedEventArgs e)
        {
            List <DeviceInsightModel> deviceInsightModels = new List <DeviceInsightModel>();

            Cursor = Cursors.Wait;
            try
            {
                ModelManager modelManager = ModelManager.GetInstance();
                deviceInsightModels = await modelManager.GetDeviceInsightModels(this.CurrentTenantModel);
            }
            finally
            {
                Cursor = null;
            }

            var dialog = new ErrorReportsWindow();

            dialog.Owner = this;
            dialog.DeviceInsightModels = deviceInsightModels;

            var dialogResult = dialog.ShowDialog();

            dialog = null;
        }