当前位置: 首页>>代码示例>>C#>>正文


C# IDesktopWindow类代码示例

本文整理汇总了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;
            }
        }
开发者ID:m-berkani,项目名称:ClearCanvas,代码行数:30,代码来源:PatientReconciliation.cs

示例2: GetClipboardShelf

		private static IShelf GetClipboardShelf(IDesktopWindow desktopWindow)
		{
			if (_clipboardShelves.ContainsKey(desktopWindow))
				return _clipboardShelves[desktopWindow];
			else 
				return null;
		}
开发者ID:nhannd,项目名称:Xian,代码行数:7,代码来源:KeyImageClipboard.cs

示例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;
		}
开发者ID:m-berkani,项目名称:ClearCanvas,代码行数:32,代码来源:PreliminaryDiagnosis.cs

示例4: ExceptionHandlingContext

 public ExceptionHandlingContext(Exception e, string contextualMessage, IDesktopWindow desktopWindow, AbortOperationDelegate abortOperationDelegate)
 {
     _exception = e;
     ContextualMessage = contextualMessage;
     DesktopWindow = desktopWindow;
     _abortDelegate = abortOperationDelegate;
 }
开发者ID:m-berkani,项目名称:ClearCanvas,代码行数:7,代码来源:ExceptionHandlingContext.cs

示例5: OnAfterStartup

		protected override void OnAfterStartup(IDesktopWindow mainDesktopWindow, bool canShowHome)
		{
			if (!canShowHome || LaunchExplorerAtStartup)
			{
				ExplorerTool.ShowExplorer(mainDesktopWindow);
			}
		}
开发者ID:UIKit0,项目名称:ClearCanvas,代码行数:7,代码来源:IntegratedGlobalHomeTool.cs

示例6: ExternalPractitionerContactPointLookupHandler

		public ExternalPractitionerContactPointLookupHandler(
			EntityRef practitionerRef,
			IList<ExternalPractitionerContactPointDetail> contactPoints,
			IDesktopWindow desktopWindow)
		{
			_practitionerRef = practitionerRef;
			_contactPoints = contactPoints;
			_desktopWindow = desktopWindow;
		}
开发者ID:m-berkani,项目名称:ClearCanvas,代码行数:9,代码来源:ExternalPractitionerContactPointLookupHandler.cs

示例7: PerformingDocumentationDocument

		public PerformingDocumentationDocument(ModalityWorklistItemSummary item, IDesktopWindow desktopWindow)
			: base(item.OrderRef, desktopWindow)
		{
			if(item == null)
			{
				throw new ArgumentNullException("item");
			}

			_item = item;
		}
开发者ID:nhannd,项目名称:Xian,代码行数:10,代码来源:PerformingDocumentationDocument.cs

示例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;
			}
开发者ID:nhannd,项目名称:Xian,代码行数:10,代码来源:StudyFilterComponentBackgroundFileLoader.cs

示例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;
		}
开发者ID:nhannd,项目名称:Xian,代码行数:11,代码来源:PatientBiographyDocument.cs

示例10: Startup

		public void Startup(IDesktopWindow mainDesktopWindow)
		{
			if (LicenseInformation.IsFeatureAuthorized(FeatureTokens.RIS.Core))
			{
				new RisViewerStartupActionProvider(this).Startup(mainDesktopWindow);
			}
			else
			{
				ShowExplorer(mainDesktopWindow, false);
			}
		}
开发者ID:m-berkani,项目名称:ClearCanvas,代码行数:11,代码来源:IntegratedGlobalHomeTool.cs

示例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);
		}
开发者ID:m-berkani,项目名称:ClearCanvas,代码行数:54,代码来源:DynamicTeSeriesCreator.cs

示例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);
        }
开发者ID:CuriousX,项目名称:annotation-and-image-markup,代码行数:14,代码来源:ATSWebBrowserContainer.cs

示例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);
			}
开发者ID:nhannd,项目名称:Xian,代码行数:49,代码来源:LocalSopLoader.cs

示例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);
		    }
		}
开发者ID:nhannd,项目名称:Xian,代码行数:18,代码来源:SharedConfigurationPageProvider.cs

示例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;
		}
开发者ID:m-berkani,项目名称:ClearCanvas,代码行数:25,代码来源:PreliminaryDiagnosis.cs


注:本文中的IDesktopWindow类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。