本文整理汇总了C#中IDesktopWindow类的典型用法代码示例。如果您正苦于以下问题:C# IDesktopWindow类的具体用法?C# IDesktopWindow怎么用?C# IDesktopWindow使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IDesktopWindow类属于命名空间,在下文中一共展示了IDesktopWindow类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ShowReconciliationDialog
public static bool ShowReconciliationDialog(EntityRef targetProfile, IDesktopWindow window)
{
IList<ReconciliationCandidate> candidates = null;
IList<PatientProfileSummary> reconciledProfiles = null;
Platform.GetService<IPatientReconciliationService>(
delegate(IPatientReconciliationService service)
{
ListPatientReconciliationMatchesResponse response =
service.ListPatientReconciliationMatches(new ListPatientReconciliationMatchesRequest(targetProfile));
candidates = response.MatchCandidates;
reconciledProfiles = response.ReconciledProfiles;
});
if (candidates.Count > 0)
{
ReconciliationComponent component = new ReconciliationComponent(targetProfile, reconciledProfiles, candidates);
ApplicationComponentExitCode exitCode = ApplicationComponent.LaunchAsDialog(
window,
component,
SR.TitlePatientReconciliation);
return exitCode == ApplicationComponentExitCode.Accepted;
}
else
{
window.ShowMessageBox(SR.MessageNoReconciliationCandidate, MessageBoxActions.Ok);
return false;
}
}
示例2: GetClipboardShelf
private static IShelf GetClipboardShelf(IDesktopWindow desktopWindow)
{
if (_clipboardShelves.ContainsKey(desktopWindow))
return _clipboardShelves[desktopWindow];
else
return null;
}
示例3: ShowDialogOnVerifyIfRequired
/// <summary>
/// Determines if the PD dialog must be shown upon verification for the specified worklist item, and shows it if needed.
/// </summary>
/// <param name="worklistItem"></param>
/// <param name="desktopWindow"></param>
/// <param name="continuation">Code block that is executed if the dialog was shown and accepted, or if it was not required. </param>
/// <returns>True if the dialog was shown and accepted, or if it was not required. False if the user cancelled out of the dialog.</returns>
public static bool ShowDialogOnVerifyIfRequired(WorklistItemSummaryBase worklistItem, IDesktopWindow desktopWindow,
Action<object> continuation)
{
if(!NeedDialogOnVerify(worklistItem, desktopWindow))
{
// we don't need the dialog, so we can continue
continuation(null);
return true;
}
// show the pd dialog
var completed = false;
ShowDialog(worklistItem, desktopWindow,
exitCode =>
{
if(exitCode == ApplicationComponentExitCode.Accepted)
{
// if the dialog was accepted, continue
continuation(null);
completed = true;
}
});
return completed;
}
示例4: ExceptionHandlingContext
public ExceptionHandlingContext(Exception e, string contextualMessage, IDesktopWindow desktopWindow, AbortOperationDelegate abortOperationDelegate)
{
_exception = e;
ContextualMessage = contextualMessage;
DesktopWindow = desktopWindow;
_abortDelegate = abortOperationDelegate;
}
示例5: OnAfterStartup
protected override void OnAfterStartup(IDesktopWindow mainDesktopWindow, bool canShowHome)
{
if (!canShowHome || LaunchExplorerAtStartup)
{
ExplorerTool.ShowExplorer(mainDesktopWindow);
}
}
示例6: ExternalPractitionerContactPointLookupHandler
public ExternalPractitionerContactPointLookupHandler(
EntityRef practitionerRef,
IList<ExternalPractitionerContactPointDetail> contactPoints,
IDesktopWindow desktopWindow)
{
_practitionerRef = practitionerRef;
_contactPoints = contactPoints;
_desktopWindow = desktopWindow;
}
示例7: PerformingDocumentationDocument
public PerformingDocumentationDocument(ModalityWorklistItemSummary item, IDesktopWindow desktopWindow)
: base(item.OrderRef, desktopWindow)
{
if(item == null)
{
throw new ArgumentNullException("item");
}
_item = item;
}
示例8: Load
public static bool Load(StudyFilterComponent component, IDesktopWindow desktopWindow, bool allowCancel, IEnumerable<string> paths, bool recursive)
{
bool success = false;
BackgroundTask task = new BackgroundTask(LoadWorker, allowCancel, new State(component, paths, recursive));
task.Terminated += delegate(object sender, BackgroundTaskTerminatedEventArgs e) { success = e.Reason == BackgroundTaskTerminatedReason.Completed; };
ProgressDialog.Show(task, desktopWindow, true, ProgressBarStyle.Continuous);
return success;
}
示例9: PatientBiographyDocument
public PatientBiographyDocument(PatientProfileSummary patientProfile, IDesktopWindow window)
: base(patientProfile.PatientRef, window)
{
Platform.CheckForNullReference(patientProfile.PatientRef, "PatientRef");
Platform.CheckForNullReference(patientProfile.PatientProfileRef, "PatientProfileRef");
_patientRef = patientProfile.PatientRef;
_profileRef = patientProfile.PatientProfileRef;
_patientName = patientProfile.Name;
_mrn = patientProfile.Mrn;
}
示例10: Startup
public void Startup(IDesktopWindow mainDesktopWindow)
{
if (LicenseInformation.IsFeatureAuthorized(FeatureTokens.RIS.Core))
{
new RisViewerStartupActionProvider(this).Startup(mainDesktopWindow);
}
else
{
ShowExplorer(mainDesktopWindow, false);
}
}
示例11: Create
public static void Create(IDesktopWindow desktopWindow, IImageViewer viewer)
{
IDisplaySet selectedDisplaySet = viewer.SelectedImageBox.DisplaySet;
string name = String.Format("{0} - Dynamic TE", selectedDisplaySet.Name);
IDisplaySet t2DisplaySet = new DisplaySet(name, "");
double currentSliceLocation = 0.0;
BackgroundTask task = new BackgroundTask(
delegate(IBackgroundTaskContext context)
{
int i = 0;
foreach (IPresentationImage image in selectedDisplaySet.PresentationImages)
{
IImageSopProvider imageSopProvider = image as IImageSopProvider;
if (imageSopProvider == null)
continue;
ImageSop imageSop = imageSopProvider.ImageSop;
Frame frame = imageSopProvider.Frame;
if (frame.SliceLocation != currentSliceLocation)
{
currentSliceLocation = frame.SliceLocation;
try
{
DynamicTePresentationImage t2Image = CreateT2Image(imageSop, frame);
t2DisplaySet.PresentationImages.Add(t2Image);
}
catch (Exception e)
{
Platform.Log(LogLevel.Error, e);
desktopWindow.ShowMessageBox("Unable to create T2 series. Please check the log for details.",
MessageBoxActions.Ok);
break;
}
}
string message = String.Format("Processing {0} of {1} images", i, selectedDisplaySet.PresentationImages.Count);
i++;
BackgroundTaskProgress progress = new BackgroundTaskProgress(i, selectedDisplaySet.PresentationImages.Count, message);
context.ReportProgress(progress);
}
}, false);
ProgressDialog.Show(task, desktopWindow, true, ProgressBarStyle.Blocks);
viewer.LogicalWorkspace.ImageSets[0].DisplaySets.Add(t2DisplaySet);
}
示例12: Create
public static ATSWebBrowserContainer Create(IDesktopWindow desktopWindow)
{
var atsWebBrowserComponent = new ATSWebBrowserComponent();
var aimAnnotationComponent = AimAnnotationComponent.Create(desktopWindow, true);
aimAnnotationComponent.Preview = true;
atsWebBrowserComponent.AimAnnotationComponent = aimAnnotationComponent;
var leftPane = new SplitPane(SR.TitleWebBrowserPane, atsWebBrowserComponent, 0.75f);
var rightPane = new SplitPane(SR.TitleAimAnnotationPane, aimAnnotationComponent, 0.25f);
return new ATSWebBrowserContainer(leftPane, rightPane);
}
示例13: Load
public void Load(string[] files, IDesktopWindow desktop, out bool cancelled)
{
Platform.CheckForNullReference(files, "files");
_total = 0;
_failed = 0;
bool userCancelled = false;
if (desktop != null)
{
BackgroundTask task = new BackgroundTask(
delegate(IBackgroundTaskContext context)
{
for (int i = 0; i < files.Length; i++)
{
LoadSop(files[i]);
int percentComplete = (int)(((float)(i + 1) / files.Length) * 100);
string message = String.Format(SR.MessageFormatOpeningImages, i, files.Length);
BackgroundTaskProgress progress = new BackgroundTaskProgress(percentComplete, message);
context.ReportProgress(progress);
if (context.CancelRequested)
{
userCancelled = true;
break;
}
}
context.Complete(null);
}, true);
ProgressDialog.Show(task, desktop, true, ProgressBarStyle.Blocks);
cancelled = userCancelled;
}
else
{
foreach (string file in files)
LoadSop(file);
cancelled = false;
}
if (Failed > 0)
throw new LoadSopsException(Total, Failed);
}
示例14: catch
void IActivityMonitorQuickLinkHandler.Handle(ActivityMonitorQuickLink link, IDesktopWindow window)
{
try
{
if (link == ActivityMonitorQuickLink.SystemConfiguration)
{
SharedConfigurationDialog.Show(window);
}
if (link == ActivityMonitorQuickLink.LocalStorageConfiguration)
{
SharedConfigurationDialog.Show(window, StorageConfigurationPath);
}
}
catch (Exception e)
{
ExceptionHandler.Report(e, window);
}
}
示例15: NeedDialogOnVerify
/// <summary>
/// Checks the PD dialog must be shown when verifying the specified worklist item.
/// </summary>
/// <param name="worklistItem"></param>
/// <param name="window"></param>
/// <returns></returns>
private static bool NeedDialogOnVerify(WorklistItemSummaryBase worklistItem, IDesktopWindow window)
{
var existingConv = ConversationExists(worklistItem.OrderRef);
// if no existing conversation, may not need to show the dialog
if (!existingConv)
{
// if this is not an emergency order, do not show the dialog
if (!IsEmergencyOrder(worklistItem.PatientClass.Code))
return false;
// otherwise, ask the user if they would like to initiate a PD review
var msg = string.Format(SR.MessageQueryPrelimDiagnosisReviewRequired, worklistItem.PatientClass.Value);
var action = window.ShowMessageBox(msg, MessageBoxActions.YesNo);
if (action == DialogBoxAction.No)
return false;
}
return true;
}