public void SetExtensionDataForExtension(string extensionId, string data) { ExtensionData ex = getExtensionDataForExtensions(extensionId); if (ex == null) { ex = new ExtensionData(); if (ExtensionsConfigData == null) ExtensionsConfigData = new ExtensionsConfigData() { ExtensionsData = new System.Collections.Generic.Dictionary<string, ExtensionData>() }; ExtensionsConfigData.ExtensionsData.Add(extensionId, ex); } ex.ConfigData = data; }
public void SetExtensionDataForExtension(string extensionId, string data) { ExtensionData ex = getExtensionDataForExtensions(extensionId); if (ex == null) { ex = new ExtensionData(); if (ExtensionsConfigData == null) { ExtensionsConfigData = new ExtensionsConfigData() { ExtensionsData = new System.Collections.Generic.Dictionary <string, ExtensionData>() } } ; ExtensionsConfigData.ExtensionsData.Add(extensionId, ex); } ex.ConfigData = data; }
public string GetConfigurationOfControls() { IApplicationAdmin appAdmin = MapApplication.Current as IApplicationAdmin; if (appAdmin == null || appAdmin.ConfigurableControls == null) return null; ExtensionsConfigData data = new ExtensionsConfigData(); foreach (FrameworkElement elem in appAdmin.ConfigurableControls) { if (string.IsNullOrWhiteSpace(elem.Name)) continue; ExtensionData extensionData = null; if (ExtensionsDataManager.ExtensionsConfigData.ExtensionsData.TryGetValue(elem.Name, out extensionData)) { if (data.ExtensionsData == null) data.ExtensionsData = new Dictionary<string, ExtensionData>(); data.ExtensionsData.Add(elem.Name, extensionData); } } return data.ToXml(); }
public ExtensionsHelper(View view, ExtensionsConfigData extensionConfigData) { View = view; extensionsDataManager = new ExtensionsDataManager() { ExtensionsConfigData = extensionConfigData }; }