internal static ArrayList GetTabPageAddins() { ArrayList tabPageAddins = new ArrayList(); string[] addinsPaths = GetConfiguredAddinsPaths(); foreach (string path in addinsPaths) { try { Assembly addinAssembly; addinAssembly = Assembly.LoadFrom(path); Type[] addinTypes; addinTypes = addinAssembly.GetTypes(); foreach (Type addinType in addinTypes) { if (addinType.IsSubclassOf(typeof(AddinTabPage))) { AddinTabPage pageAddinTabPage = (AddinTabPage)addinAssembly.CreateInstance(addinType.ToString()); tabPageAddins.Add(pageAddinTabPage); } } } catch (Exception ex) { Logger.WriteMessage("Error loading the addin from " + path); Logger.WriteException(ex); continue; } } return(tabPageAddins); }
internal static string GetAddinDescription(string path) { try { string description = null; Assembly addinAssembly = Assembly.LoadFrom(path); Type[] addinTypes; addinTypes = addinAssembly.GetTypes(); foreach (Type addinType in addinTypes) { if (addinType.IsSubclassOf(typeof(AddinTabPage))) { AddinTabPage pageAddinTabPage = (AddinTabPage)addinAssembly.CreateInstance(addinType.ToString()); if (description != null && description != String.Empty) { description += " , "; } description += pageAddinTabPage.Text; } } return(description); } catch (Exception ex) { Logger.WriteMessage("Error loading the addin from " + path); Logger.WriteException(ex); return("Loading Error!"); } }
private void tabPage_StatusChanged(object sender, AddinTabPage.StatusChangedEventArgs e) { if(((AddinTabPage)sender).Visible) this.statusBar.Text = e.Status; }
private void LoadAddin(AddinTabPage addin) { TabPage tabPage = new TabPage(addin.Text); addin.Dock = DockStyle.Fill; tabPage.Controls.Add(addin); this.tabControl.Controls.Add(tabPage); }