/// <remarks/> public void ActivateViewerAsync(ActivateViewerRequest request, object userState) { if ((this.ActivateViewerOperationCompleted == null)) { this.ActivateViewerOperationCompleted = new System.Threading.SendOrPostCallback(this.OnActivateViewerOperationCompleted); } this.InvokeAsync("ActivateViewer", new object[] { request }, this.ActivateViewerOperationCompleted, userState); }
/// <remarks/> public void ActivateViewerAsync(ActivateViewerRequest request, object userState) { if ((this.ActivateViewerOperationCompleted == null)) { this.ActivateViewerOperationCompleted = new System.Threading.SendOrPostCallback(this.OnActivateViewerOperationCompleted); } this.InvokeAsync("ActivateViewer", new object[] { request}, this.ActivateViewerOperationCompleted, userState); }
/// <remarks/> public void ActivateViewerAsync(ActivateViewerRequest request) { this.ActivateViewerAsync(request, null); }
public void ActivateViewer([System.Xml.Serialization.XmlElementAttribute(IsNullable = true)] ActivateViewerRequest request) { this.Invoke("ActivateViewer", new object[] { request }); }
private void OnActivateViewer(object sender, EventArgs e) { StudyItem study = GetSelectedStudy(); if (study == null) { MessageBox.Show("Select a single study item in the list."); return; } Guid? viewerId = GetSelectedViewer(); if (viewerId == null) { MessageBox.Show("An active viewer must be selected."); return; } using (AutomationClient client = new AutomationClient()) { try { ActivateViewerRequest request = new ActivateViewerRequest(); request.Viewer = new Viewer(); request.Viewer.Identifier = GetIdentifier(viewerId.Value); client.ActivateViewer(request); } catch (Exception ex) { study.RemoveViewer(viewerId.Value); MessageBox.Show(ex.Message); } } }