/// <summary>
 /// Refreshes the control data.
 /// </summary>
 /// <param name="control">The control.</param>
 private void RefreshElementControlData(ElementInfoControlBase control)
 {
     try
     {
         RefreshSessionInfo();
         if (control != null && control is IElementInfoControl)
         {
             control.InvokeIfRequired(c => control.RefreshData());
         }
     }
     catch (ObjectDisposedException) { } // ignore
     catch (Exception ex)
     {
         throw ex;
     }
 }
        /// <summary>
        /// Loads the element information control into the display
        /// </summary>
        /// <param name="element">The element.</param>
        /// <param name="sessionInfo">The session information.</param>
        private void LoadElementInfoControl(SessionMapElement element, SessionInfo sessionInfo)
        {
            _elementInfoControl = null;
            var title = "{0} {1}".FormatWith(element.ElementSubtype, element.Name);

            groupBox_ElementInfo.InvokeIfRequired(c =>
            {
                radPanel_ElementInfoHolder.Text = string.Empty;
                groupBox_ElementInfo.Text       = "Loading {0}...".FormatWith(title);
            });

            var elementInfoControl = ObjectFactory.Create <ElementInfoControlBase>(element.ElementType);

            elementInfoControl.Initialize(element, sessionInfo);

            var revisedTitle = elementInfoControl.GetTitle();

            radPanel_ElementInfoHolder.InvokeIfRequired(c =>
            {
                this.SuspendLayout();
                elementInfoControl.Dock = DockStyle.Fill;
                radPanel_ElementInfoHolder.Controls.Add(elementInfoControl);

                if (!string.IsNullOrEmpty(revisedTitle) && revisedTitle != title)
                {
                    groupBox_ElementInfo.Text = revisedTitle;
                }
                else
                {
                    groupBox_ElementInfo.Text = title;
                }
                this.ResumeLayout();
            }
                                                        );
            _elementInfoControl = elementInfoControl;
        }