Example #1
0
        void RefreshCoreList()
        {
            if (_instance == null)
            {
                return;
            }

            Cursor = System.Windows.Input.Cursors.Wait;
            try
            {
                var queryTaskTitle = "Querying instance crash dumps...";
                var queryTask      = _cancelableTaskFactory.Create(
                    queryTaskTitle,
                    async() => await _coreListRequest.GetCoreListAsync(new SshTarget(_instance)));

                // Ignore cancelation, and accept the empty result.
                queryTask.RunAndRecord(_actionRecorder, ActionType.CrashDumpList);
                CoreList.ItemsSource = queryTask.Result;
            }
            catch (ProcessException e)
            {
                Trace.WriteLine($"Unable to query instance crash dumps: {e}");
                GameletMessageTextBox.Text = ErrorStrings.ErrorQueryingCoreFiles(e.Message);
                CoreList.ItemsSource       = new List <CoreListEntry>();
            }
            finally
            {
                Cursor = null;
            }
        }