private void DisplayErrorWindow() { try { UIUpdater.InvokeAsync(new Action(() => { var window = new EncodingErrorView(ItemsCollector.GetDocumentsToEncode()); window.ShowDialog(); })).SafeFireAndForget(); } catch (Exception) { } }
private void DisplayErrorWindow() { try { UIUpdater.InvokeAsync(new Action(() => { var itemsCollector = new ItemsCollector(); var window = new EncodingErrorView(itemsCollector.GetDocumentsToEncode()); window.ShowDialog(); })).SafeFireAndForget(); } catch (Exception e) { MessageBox.Show(e.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }