void host_SmartPartAcivated(object sender, SmartPartAcivatedEventArgs e)
        {
            this.Text = string.Format("{0} - {1}", e.HostName, e.SmartPartName);

            if (e.SmartPartIcon != null)
                this.Icon = e.SmartPartIcon;
        }
 protected void onSmartPartAcivated(SmartPartAcivatedEventArgs ea)
 {
     EventHandler<SmartPartAcivatedEventArgs> handler = SmartPartAcivated;
     if (handler != null)
     {
         handler(this, ea);
     }
 }
        protected void onSmartPartAcivated(SmartPartAcivatedEventArgs ea)
        {
            EventHandler <SmartPartAcivatedEventArgs> handler = SmartPartAcivated;

            if (handler != null)
            {
                handler(this, ea);
            }
        }
        public void ActivateSmartPart(ISmartPartView smartPart)
        {
            if (smartPart is UserControl)
            {
                hostPanel.Controls.Clear();
                hostPanel.Controls.Add((UserControl)smartPart);
                smartPart.Dock = DockStyle.Fill;

                SmartPartAcivatedEventArgs ea = new SmartPartAcivatedEventArgs();
                ea.SmartPartName = smartPart.SmartPartName;
                ea.SmartPartIcon = smartPart.SmartPartIcon;
                ea.HostName = this.HostName;
                ea.SmartPart = smartPart;
                onSmartPartAcivated(ea);
            }
            else
            {
                throw new ArgumentException(string.Format(Resources.SmartPartHost_ActivateSmartPartError, smartPart.GetType()));
            }
        }
        public void ActivateSmartPart(ISmartPartView smartPart)
        {
            if (smartPart is UserControl)
            {
                hostPanel.Controls.Clear();
                hostPanel.Controls.Add((UserControl)smartPart);
                smartPart.Dock = DockStyle.Fill;

                SmartPartAcivatedEventArgs ea = new SmartPartAcivatedEventArgs();
                ea.SmartPartName = smartPart.SmartPartName;
                ea.SmartPartIcon = smartPart.SmartPartIcon;
                ea.HostName      = this.HostName;
                ea.SmartPart     = smartPart;
                onSmartPartAcivated(ea);
            }
            else
            {
                throw new ArgumentException(string.Format(Resources.SmartPartHost_ActivateSmartPartError, smartPart.GetType()));
            }
        }