Dreamine.UI.Wpf 1.0.1
Dreamine.UI.Wpf 사용자 인터페이스 기능과 구성 요소를 제공합니다.
로딩중...
검색중...
일치하는것 없음
Int64ToInt32Converter.cs
이 파일의 문서화 페이지로 가기
1using System.Globalization;
2using System.Windows.Data;
3
5{
14 public class Int64ToInt32Converter : IValueConverter
15 {
72 public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
73 {
74 if (value is long longValue)
75 {
76 return (int)longValue;
77 }
78 else if (value is int intValue)
79 {
80 int rtn = intValue < 0 ? 0 : intValue;
81 return rtn;
82 }
83 return value;
84 }
85
134 public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
135 {
136 return value;
137 }
138 }
139}
object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
object Convert(object value, Type targetType, object parameter, CultureInfo culture)