コード例 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SessionExecutionManager"/> class.
        /// </summary>
        /// <param name="treeView">The tree view.</param>
        /// <param name="dockingControl">The docking control.</param>
        /// <param name="sessionControl">The session control.</param>
        /// <param name="startButton">The start button.</param>
        public SessionExecutionManager(SessionExecutionTreeView treeView, Control dockingControl, ControlSessionExecution sessionControl, ToolStripButton startButton)
        {
            _treeView           = treeView;
            _dockingControl     = dockingControl;
            _sessionControl     = sessionControl;
            _startButton        = startButton;
            _elementStatusPanel = new Panel();

            if (!GlobalSettings.IsDistributedSystem)
            {
                MAX_ACTIVE_SESSIONS = 1;
            }

            Initialize();
        }
コード例 #2
0
        /// <summary>
        /// Initializes this instance with the specified <see cref="SessionMapElement" />.
        /// </summary>
        /// <param name="element">The element.</param>
        /// <param name="sessionControl">The session execution control used to start/stop etc.</param>
        /// <exception cref="ControlTypeMismatchException">
        /// Thrown when an object of incorrect type is passed to this instance.
        /// </exception>
        public override void Initialize(SessionMapElement element, ControlSessionExecution sessionControl)
        {
            try
            {
                if (element == null || sessionControl == null)
                {
                    throw new ArgumentNullException("Element and SessionControl arguments must not be null");
                }

                _element   = element;
                _sessionId = element.SessionId;

                elementInfoCompositeControl.Initialize(element, sessionControl);

                _sessionExecutionControl = sessionControl;
                _sessionExecutionControl.RefreshRequested += _sessionExecutionControl_RefreshRequested;
            }
            catch (Exception ex)
            {
                TraceFactory.Logger.Error("Initialize", ex);
            }
        }
コード例 #3
0
        /// <summary>
        /// Initializes this instance with the specified <see cref="SessionMapElement" />.
        /// </summary>
        /// <param name="element">The element.</param>
        /// <param name="sessionControl">The session execution control used to start/stop etc.</param>
        /// <exception cref="ControlTypeMismatchException">
        /// Thrown when an object of incorrect type is passed to this instance.
        /// </exception>
        public void Initialize(SessionMapElement element, ControlSessionExecution sessionControl)
        {
            try
            {
                if (element == null || sessionControl == null)
                {
                    throw new ArgumentNullException("Element and SessionControl arguments must not be null");
                }

                _element   = element;
                _sessionId = element.SessionId;
                RefreshSessionInfo();

                _sessionExecutionControl = sessionControl;
                _sessionExecutionControl.RefreshRequested += _sessionExecutionControl_RefreshRequested;

                Task.Factory.StartNew(() => LoadElementInfoControl(element, _sessionInfo));
            }
            catch (Exception ex)
            {
                TraceFactory.Logger.Error("Initialize", ex);
            }
        }
コード例 #4
0
 /// <summary>
 /// Initializes this instance with the specified <see cref="SessionMapElement"/>.
 /// </summary>
 /// <param name="element">The element.</param>
 /// <exception cref="ControlTypeMismatchException">
 /// Thrown when an object of incorrect type is passed to this instance.
 /// </exception>
 public virtual void Initialize(SessionMapElement element, ControlSessionExecution control)
 {
     throw new NotImplementedException();
 }
コード例 #5
0
 /// <summary>
 /// Initializes the specified element.
 /// </summary>
 /// <param name="element">The element.</param>
 /// <param name="sessionControl">The session control.</param>
 public override void Initialize(SessionMapElement element, ControlSessionExecution sessionControl)
 {
     elementInfoCompositeControl.Initialize(element, sessionControl);
 }