public void SetCustomValue(MacrosSystem.ReservedVersionMacroKeys key, string value) { // based on the key, set the value for the currently selected connect version switch (key) { case MacrosSystem.ReservedVersionMacroKeys.APP_INSTALL_PATH: VersionDictionary[CustomStr].AppInstall = value; break; case MacrosSystem.ReservedVersionMacroKeys.APP_INSTALL_FULL_PATH: VersionDictionary[CustomStr].AppExe = value; break; case MacrosSystem.ReservedVersionMacroKeys.APP_SAMPLES_PATH: VersionDictionary[CustomStr].AppSamples = value; break; case MacrosSystem.ReservedVersionMacroKeys.APP_LOCAL_SETTINGS_PATH: VersionDictionary[CustomStr].AppLocalSettings = value; break; case MacrosSystem.ReservedVersionMacroKeys.APP_ROAMING_SETTINGS_PATH: VersionDictionary[CustomStr].AppRoamingSettings = value; break; default: OutputLog.Log(LogSeverity.Error, "cannot find case for switch value " + key.ToString()); break; } MacrosSystem.GetInstance().BuildDictionary(); }
public string GetCurrentValue(MacrosSystem.ReservedVersionMacroKeys key) { if (string.IsNullOrEmpty(SelectedVersionKey)) { return(string.Empty); } // based on the key, get the value for the currently selected connect version switch (key) { case MacrosSystem.ReservedVersionMacroKeys.APP_INSTALL_PATH: return(VersionDictionary[SelectedVersionKey].AppInstall); case MacrosSystem.ReservedVersionMacroKeys.APP_INSTALL_FULL_PATH: return(VersionDictionary[SelectedVersionKey].AppExe); case MacrosSystem.ReservedVersionMacroKeys.APP_SAMPLES_PATH: return(VersionDictionary[SelectedVersionKey].AppSamples); case MacrosSystem.ReservedVersionMacroKeys.APP_LOCAL_SETTINGS_PATH: return(VersionDictionary[SelectedVersionKey].AppLocalSettings); case MacrosSystem.ReservedVersionMacroKeys.APP_ROAMING_SETTINGS_PATH: return(VersionDictionary[SelectedVersionKey].AppRoamingSettings); default: OutputLog.Log(LogSeverity.Error, "cannot find case for switch value " + key.ToString()); return(string.Empty); } }