示例#1
0
        public OpenStudiesResult OpenStudies([System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] OpenStudiesRequest request)
        {
            object[] results = this.Invoke("OpenStudies", new object[] {
                request
            });

            return((OpenStudiesResult)(results[0]));
        }
示例#2
0
 /// <remarks/>
 public void OpenStudiesAsync(OpenStudiesRequest request, object userState)
 {
     if ((this.OpenStudiesOperationCompleted == null))
     {
         this.OpenStudiesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnOpenStudiesOperationCompleted);
     }
     this.InvokeAsync("OpenStudies", new object[] {
         request
     }, this.OpenStudiesOperationCompleted, userState);
 }
示例#3
0
文件: Reference.cs 项目: nhannd/Xian
 /// <remarks/>
 public void OpenStudiesAsync(OpenStudiesRequest request, object userState) {
     if ((this.OpenStudiesOperationCompleted == null)) {
         this.OpenStudiesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnOpenStudiesOperationCompleted);
     }
     this.InvokeAsync("OpenStudies", new object[] {
                 request}, this.OpenStudiesOperationCompleted, userState);
 }
示例#4
0
文件: Reference.cs 项目: nhannd/Xian
 /// <remarks/>
 public void OpenStudiesAsync(OpenStudiesRequest request) {
     this.OpenStudiesAsync(request, null);
 }
示例#5
0
 /// <remarks/>
 public void OpenStudiesAsync(OpenStudiesRequest request)
 {
     this.OpenStudiesAsync(request, null);
 }
示例#6
0
		private void OnOpenStudy(object sender, EventArgs e)
		{
			StudyItem study = GetSelectedStudy();
			if (study == null)
				return;

			using (AutomationClient client = new AutomationClient())
			{
				try
				{
					OpenStudiesRequest request = new OpenStudiesRequest();
					List<OpenStudyInfo> studiesToOpen = new List<OpenStudyInfo>();
					foreach (StudyItem s in GetSelectedStudies())
					{
						OpenStudyInfo info = new OpenStudyInfo();
						info.StudyInstanceUid = s.StudyInstanceUid;
						info.SourceAETitle = s.RetrieveAETitle;
						studiesToOpen.Add(info);
					}

					request.StudiesToOpen = GetStudiesToOpen(studiesToOpen);
					request.ActivateIfAlreadyOpen = _activateIfOpen.Checked;

					OpenStudiesResult result = client.OpenStudies(request);
					if (result.Viewer != null)
					{
						bool shouldExist = study.HasViewers && _activateIfOpen.Checked;
						bool exists = study.HasViewer(result.Viewer.Identifier);
						if (shouldExist && !exists)
							study.ClearViewers();

						if (!exists)
							study.AddViewer(result.Viewer.Identifier);
					}
				}
				catch (Exception ex)
				{
					MessageBox.Show(ex.Message);
				}
			}
		}