예제 #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;
        }
예제 #2
0
 public LocalizedCategoryAttribute(string category) : base(category)
 {
     Category = StringResourcesManager.GetResource(category);
 }
예제 #3
0
 public LocalizedDisplayNameAttribute(string displayName) : base(displayName)
 {
     Name = StringResourcesManager.GetResource(displayName);
 }
예제 #4
0
 public LocalizedPropertyDescriptionAttribute(string desc)
     : base(desc)
 {
     _description = StringResourcesManager.GetResource(desc);
 }