/// <summary> /// Initializes this instance by subscribing to <see cref="SessionClient"/> events. /// </summary> public void Initialize(SessionExecutionManager manager = null) { // Need the Invoke call to prevent cross-thread exceptions SessionClient.Instance.SessionMapElementReceived += (s, e) => Invoke(new Action(() => SessionMapElementReceived(e.MapElement))); SessionClient.Instance.ClearSessionRequestReceived += (s, e) => Invoke(new Action(() => ClearSession(e.SessionId))); SessionManager = manager; }
public void Initialize(SessionExecutionManager manager) { if (manager == null) { throw new ArgumentNullException("manager"); } Manager = manager; }
private void Initialize() { _sessionManager = new SessionExecutionManager(this.sessionExecution_TreeView, this.splitContainerSessionExecution.Panel2, this.sessionControl, this.start_ToolStripButton); SessionManager.PropertyChanged += (s, e) => this.InvokeIfRequired(c => sessionManager_PropertyChanged(s, e)); SetButtonStates(); }