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