public OpenStudiesResult OpenStudies([System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] OpenStudiesRequest request) { object[] results = this.Invoke("OpenStudies", new object[] { request }); return((OpenStudiesResult)(results[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); }
/// <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); }
/// <remarks/> public void OpenStudiesAsync(OpenStudiesRequest request) { this.OpenStudiesAsync(request, null); }
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); } } }