Beispiel #1
0
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if ((value != null) && (parameter != null))
            {
                // Get the format resource
                string formatStringKey = parameter.ToString();
                string formatString = StringResourcesManager.GetResource(formatStringKey);

                // format the value into the resource string
                return string.Format(formatString, value);
            }
            else
                return null;
        }
Beispiel #2
0
 public LocalizedCategoryAttribute(string category) : base(category)
 {
     Category = StringResourcesManager.GetResource(category);
 }
Beispiel #3
0
 public LocalizedDisplayNameAttribute(string displayName) : base(displayName)
 {
     Name = StringResourcesManager.GetResource(displayName);
 }
Beispiel #4
0
 public LocalizedPropertyDescriptionAttribute(string desc)
     : base(desc)
 {
     _description = StringResourcesManager.GetResource(desc);
 }