Beispiel #1
0
        public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
        {
            string str = value as string;

            if (str != null)
            {
                if (str == StringResourceManager.GetString(typeof(Resources.StringResources), Constants.BuildAction.Merge, culture))
                {
                    return(BuildAction.Merge);
                }

                if (str == StringResourceManager.GetString(typeof(Resources.StringResources), Constants.BuildAction.None, culture))
                {
                    return(BuildAction.None);
                }
            }

            return(base.ConvertFrom(context, culture, value));
        }
Beispiel #2
0
        public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, System.Type destinationType)
        {
            if (destinationType == typeof(string))
            {
                string result = null;
                if (value != null)
                {
                    result = StringResourceManager.GetString(typeof(Resources.StringResources), ((BuildAction)value).ToString(), culture);
                }
                else
                {
                    result = StringResourceManager.GetString(typeof(Resources.StringResources), BuildAction.None.ToString(), culture);
                }

                if (result != null)
                {
                    return(result);
                }
            }

            return(base.ConvertTo(context, culture, value, destinationType));
        }
Beispiel #3
0
 public ConfigurationSettingsPage()
 {
     Name = StringResourceManager.GetString(typeof(Resources.StringResources), Constants.Project.Property.Category.Assemble);
 }
Beispiel #4
0
 public static string GetString(string key)
 {
     return(stringResources.GetString(key));
 }
 public VsProjectSettingsPage()
 {
     Name = StringResourceManager.GetString(typeof(Resources.StringResources), Constants.Project.Property.Category.General);
 }