/// <summary> /// Displays the PD dialog. /// </summary> /// <param name="worklistItem"></param> /// <param name="window"></param> /// <param name="continuationCode"></param> private static void ShowDialog(WorklistItemSummaryBase worklistItem, IDesktopWindow window, Action <ApplicationComponentExitCode> continuationCode) { var component = CreateComponent(worklistItem); var dialog = ApplicationComponent.LaunchAsWorkspaceDialog(window, component, MakeTitle(worklistItem)); dialog.Closed += delegate { continuationCode(component.ExitCode); }; }
/// <summary> /// Opens an <see cref="OrderNoteConversationComponent"/> /// </summary> public void Open() { if (this.OrderRef == null) { return; } try { var component = new OrderNoteConversationComponent(this.OrderRef, this.OrderNoteCategories, this.TemplatesXml, this.SoftKeysXml); var dialog = ApplicationComponent.LaunchAsWorkspaceDialog(this.Context.DesktopWindow, component, GetTitle()); dialog.Closed += delegate { OnDialogClosed(component.ExitCode); }; } catch (Exception e) { ExceptionHandler.Report(e, this.Context.DesktopWindow); } }