Exemplo n.º 1
0
        static public OrganizerSettingsData NewOrganizerSettingData(string lineFromSettingsFile)
        {
            string[] parameters = lineFromSettingsFile.Split('|');
            OrganizerSettingsData.DataEditTypes valueType = (OrganizerSettingsData.DataEditTypes)Enum.Parse(typeof(OrganizerSettingsData.DataEditTypes), parameters[2].Trim());
            switch (parameters.Length)
            {
            case 3:
                return(NewOrganizerSettingData(parameters[0].Trim(), parameters[1].Trim(), valueType));

            case 4:
                return(NewOrganizerSettingData(parameters[0].Trim(), parameters[1].Trim(), valueType, parameters[3].Trim()));

            case 5:
                return(NewOrganizerSettingData(parameters[0].Trim(), parameters[1].Trim(), valueType, parameters[3].Trim(), parameters[4].Trim()));

            default:
                throw new Exception("Bad number of parameters.");
            }
        }
Exemplo n.º 2
0
 static public OrganizerSettingsData NewOrganizerSettingData(string slicerConfigName, string presentationName, OrganizerSettingsData.DataEditTypes dataEditType, string extraSettings = "", string helpText = "")
 {
     return(new OrganizerSettingsData(slicerConfigName, presentationName, dataEditType, extraSettings, helpText));
 }