markus / KCOM / Common / Converter / enumStringConverter.cs @ f87dfb18
이력 | 보기 | 이력해설 | 다운로드 (1.32 KB)
1 | 6deaed53 | KangIngu | using System; |
---|---|---|---|
2 | using System.Collections.Generic; |
||
3 | using System.Globalization; |
||
4 | using System.Linq; |
||
5 | using System.Text; |
||
6 | using System.Windows.Data; |
||
7 | |||
8 | namespace KCOM.Common.Converter |
||
9 | { |
||
10 | public class enumStringConverter : IValueConverter |
||
11 | { |
||
12 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture) |
||
13 | { |
||
14 | if (value != null) |
||
15 | { |
||
16 | switch (value) |
||
17 | { |
||
18 | case (int)IKCOM.FAVORITE_FLAG.ALL: |
||
19 | { |
||
20 | return "ALL"; |
||
21 | } |
||
22 | break; |
||
23 | case (int)IKCOM.FAVORITE_FLAG.Personal: |
||
24 | { |
||
25 | return "Personal"; |
||
26 | } |
||
27 | break; |
||
28 | case (int)IKCOM.FAVORITE_FLAG.TeamShare: |
||
29 | { |
||
30 | return "TeamShare"; |
||
31 | } |
||
32 | break; |
||
33 | default: |
||
34 | break; |
||
35 | } |
||
36 | //IKCOM.FAVORITE_FLAG |
||
37 | |||
38 | } |
||
39 | |||
40 | return null; |
||
41 | } |
||
42 | |||
43 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) |
||
44 | { |
||
45 | throw new NotImplementedException(); |
||
46 | } |
||
47 | } |
||
48 | } |