private UiPlugin CreateUiPlugin(CiPlugin ciPlugin) { if (ciPlugin != null) { return(ciPlugin.CreateUiPlugin(this)); } return(null); }
// -------------------------------------------------------------------------------------------------- // Helpers // -------------------------------------------------------------------------------------------------- private UiPlugin CreateUiPlugin(string puxFile) { if (!MyUtils.IsEmpty(puxFile)) { return(CreateUiPlugin(CiPlugin.CreateCiPluginFromFile(puxFile))); } return(null); }
// -------------------------------------------------------------------------------------------------- // Methods // -------------------------------------------------------------------------------------------------- public virtual void LoadUiPlugin(string puxFile) { try { LoadUiPlugin(CiPlugin.CreateCiPluginFromFile(puxFile)); } catch (Exception ex) { MyWebUtils.ShowAlert(Page, ex.Message); } }
public virtual void LoadUiPlugin(CiPlugin ciPlugin) { UiPlugin uiPlugin = CreateUiPlugin(ciPlugin); if (uiPlugin != null) { if (uiPlugin.IsInstanceOf(typeof(UiMenu))) { UiApplication.Me.CiApplication.Add(uiPlugin.CiPlugin); } else { myInnerPanel.Controls.Add(uiPlugin); } } }