aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Explorer/ExplorerItem.cs
blob: b604c71b5d9dc38b0e677ce999b476a9460bb17d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Media.Imaging;

namespace Tango.Explorer
{
    public abstract class ExplorerItem
    {
        public String Name { get; set; }
        public String Description { get; set; }
        public String Path { get; set; }
        public BitmapSource Icon { get; set; }
    }
}
an class="nn">Tango.MachineStudio.DB.Converters { /// <summary> /// Converts user role to string. /// </summary> /// <seealso cref="System.Windows.Data.IValueConverter" /> public class UsersRolesToStringConverter : IValueConverter { public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { if (value == null) return ""; if (value is IEnumerable<UsersRole>) { IEnumerable<UsersRole> userRoles = value as IEnumerable<UsersRole>; return String.Join(", ", userRoles.Select(x => x.Role.Name)); } else { IEnumerable<MultiComboVM<Role>> userRoles = value as IEnumerable<MultiComboVM<Role>>; return String.Join(", ", userRoles.Where(x => x.IsSelected).Select(x => x.Entity.Name)); } } public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) { throw new NotImplementedException(); } } }