public OpenContentSettings(IDictionary moduleSettings) { var template = moduleSettings["template"] as string; //templatepath+file or //manifestpath+key FirstTimeInitialisation = string.IsNullOrEmpty(template); if (!FirstTimeInitialisation) { var templateUri = new FileUri(template); TemplateKey = new TemplateKey(templateUri); TemplateManifest templateManifest; Manifest = ManifestUtils.GetManifest(TemplateKey, out templateManifest); Template = templateManifest; } var sTabId = moduleSettings["tabid"] as string; var sModuleId = moduleSettings["moduleid"] as string; TabId = -1; ModuleId = -1; if (sTabId != null && sModuleId != null) { TabId = int.Parse(sTabId); ModuleId = int.Parse(sModuleId); } Data = moduleSettings["data"] as string; _query = moduleSettings["query"] as string; var sDetailTabId = moduleSettings["detailtabid"] as string; DetailTabId = -1; if (!string.IsNullOrEmpty(sDetailTabId)) { DetailTabId = int.Parse(sDetailTabId); } }
public OpenContentSettings(string template, int tabId, int moduleId, string templateSettings = "", string filterSettings = "", int detailTabId = -1) { // template = //templatepath+file or //manifestpath+key FirstTimeInitialisation = string.IsNullOrEmpty(template); if (!FirstTimeInitialisation) { TemplateKey = new TemplateKey(new FileUri(template)); TemplateManifest templateManifest; Manifest = ManifestUtils.GetManifest(TemplateKey, out templateManifest); Template = templateManifest; } TabId = tabId; ModuleId = moduleId; Data = templateSettings; _query = filterSettings; DetailTabId = detailTabId; }
public OpenContentSettings(ComponentSettingsInfo moduleSettings) { FirstTimeInitialisation = string.IsNullOrEmpty(moduleSettings.Template); if (!FirstTimeInitialisation) { TemplateKey = new TemplateKey(new FileUri(moduleSettings.Template)); TemplateManifest templateManifest; Manifest = ManifestUtils.GetManifest(TemplateKey, out templateManifest); Template = templateManifest; } TabId = moduleSettings.TabId; ModuleId = moduleSettings.ModuleId; Data = moduleSettings.Data; _query = moduleSettings.Query; DetailTabId = moduleSettings.DetailTabId; }