void InitializeSmartPart() { SmartPartHost hostFiles = new SmartPartHost(panelFiles); hostFiles.HostName = "Simple host"; hostFiles.SmartPartAcivated += new EventHandler<SmartPartAcivatedEventArgs>(host_SmartPartAcivated); DefaultSmartPart def = new DefaultSmartPart(); def.SmartPartRegister(hostFiles, tsDefault); hostFiles.ActivateSmartPart(def); }
/// <summary> /// Register smartpart at host and share with button /// </summary> /// <param name="host">Host control for smartpart</param> /// <param name="button">Button that activate this smartpart</param> public void SmartPartRegister(SmartPartHost host, ToolStripItem button) { this.SmartPartHost = host; this.SmartPartButton = button; }