• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# IDesktopWindow类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中IDesktopWindow的典型用法代码示例。如果您正苦于以下问题:C# IDesktopWindow类的具体用法?C# IDesktopWindow怎么用?C# IDesktopWindow使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



IDesktopWindow类属于命名空间,在下文中一共展示了IDesktopWindow类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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


示例16: CheckIn

		public static bool CheckIn(EntityRef orderRef, string title, IDesktopWindow desktopWindow)
		{
			List<ProcedureSummary> procedures = null;
			Platform.GetService((IRegistrationWorkflowService service) =>
				procedures = service.ListProceduresForCheckIn(new ListProceduresForCheckInRequest(orderRef)).Procedures);

			if(procedures.Count == 0)
			{
				desktopWindow.ShowMessageBox(SR.MessageNoProceduresCanBeCheckedIn, MessageBoxActions.Ok);
				return false;
			}

			var checkInComponent = new CheckInOrderComponent(procedures);
			var exitCode = ApplicationComponent.LaunchAsDialog(
				desktopWindow,
				checkInComponent,
				title);

			return (exitCode == ApplicationComponentExitCode.Accepted);
		}
开发者ID:m-berkani,项目名称:ClearCanvas,代码行数:20,代码来源:OrderCheckInHelper.cs


示例17: Show

        public static void Show(IDesktopWindow desktopWindow)
        {
            if (_workspace != null)
            {
                _workspace.Activate();
                return;
            }

            if (!PermissionsHelper.IsInRole(AuthorityTokens.ActivityMonitor.View))
            {
                desktopWindow.ShowMessageBox(SR.WarningActivityMonitorPermission, MessageBoxActions.Ok);
                return;
            }

            var component = new ActivityMonitorComponent();
            _workspace = ApplicationComponent.LaunchAsWorkspace(desktopWindow, component, SR.TitleActivityMonitor);
            _workspace.Closed += ((sender, args) =>
            {
                _workspace = null;
            });
        }
开发者ID:nhannd,项目名称:Xian,代码行数:21,代码来源:ActivityMonitorManager.cs


示例18: Startup

		public void Startup(IDesktopWindow mainDesktopWindow)
		{
			using (var tool = new GlobalHomeTool())
			{
				tool.SetContext(new StartupActionContext {DesktopWindow = mainDesktopWindow as DesktopWindow});
				tool.Initialize();

				var canShowHome = tool.CanShowHome;

				// allow subclasses opportunity to execute actions before the Home workspace is created
				OnBeforeStartup(mainDesktopWindow, canShowHome);

				// create and show the Home workspace
				if (canShowHome) tool.PerformLaunch();

				// allow subclasses opportunity to execute actions after the Home workspace is created
				OnAfterStartup(mainDesktopWindow, canShowHome);

				// reactivate the Home workspace
				if (canShowHome) tool.Launch();
			}
		}
开发者ID:m-berkani,项目名称:ClearCanvas,代码行数:22,代码来源:GlobalHomeStartupActionProvider.cs


示例19: CancelOrder

		public static bool CancelOrder(EntityRef orderRef, string description, IDesktopWindow desktopWindow)
		{
			// first check for warnings
			QueryCancelOrderWarningsResponse response = null;
			Platform.GetService<IOrderEntryService>(
				service => response = service.QueryCancelOrderWarnings(new QueryCancelOrderWarningsRequest(orderRef)));

			if (response.Errors != null && response.Errors.Count > 0)
			{
				var error = CollectionUtils.FirstElement(response.Errors);
				desktopWindow.ShowMessageBox(error, MessageBoxActions.Ok);
				return false;
			}

			if (response.Warnings != null && response.Warnings.Count > 0)
			{
				var warn = CollectionUtils.FirstElement(response.Warnings);
				var action = desktopWindow.ShowMessageBox(
					warn + "\n\nAre you sure you want to cancel this order?",
					MessageBoxActions.YesNo);
				if (action == DialogBoxAction.No)
					return false;
			}

			var cancelOrderComponent = new CancelOrderComponent(orderRef);
			var exitCode = ApplicationComponent.LaunchAsDialog(
				desktopWindow,
				cancelOrderComponent,
				String.Format(SR.TitleCancelOrder, description));

			if (exitCode == ApplicationComponentExitCode.Accepted)
			{
				Platform.GetService<IOrderEntryService>(
					service => service.CancelOrder(new CancelOrderRequest(orderRef, cancelOrderComponent.SelectedCancelReason)));

				return true;
			}
			return false;
		}
开发者ID:UIKit0,项目名称:ClearCanvas,代码行数:39,代码来源:OrderCancelHelper.cs


示例20: Load

			public static bool Load(StudyFilterComponent component, IDesktopWindow desktopWindow, bool allowCancel, IEnumerable<string> paths, bool recursive)
			{
				BackgroundTaskTerminatedEventArgs evArgs = null;

				try
				{
					using (var task = new BackgroundTask(LoadWorker, allowCancel, new State(component, paths, recursive)))
					{
						task.Terminated += (s, e) => evArgs = e;
						ProgressDialog.Show(task, desktopWindow, true, ProgressBarStyle.Continuous);
					}
				}
				catch (Exception ex)
				{
					ExceptionHandler.Report(ex, desktopWindow);
					return false;
				}

				if (evArgs.Reason == BackgroundTaskTerminatedReason.Exception && evArgs.Exception != null)
					ExceptionHandler.Report(evArgs.Exception, desktopWindow);
				return evArgs.Reason == BackgroundTaskTerminatedReason.Completed;
			}
开发者ID:m-berkani,项目名称:ClearCanvas,代码行数:22,代码来源:StudyFilterComponentBackgroundFileLoader.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IDestination类代码示例发布时间:2022-05-24
下一篇:
C# IDesignerSerializationManager类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap