Dreamine.UI.Wpf 1.0.1
Dreamine.UI.Wpf 사용자 인터페이스 기능과 구성 요소를 제공합니다.
로딩중...
검색중...
일치하는것 없음
FormatToExampleConverter.cs
이 파일의 문서화 페이지로 가기
1using System;
2using System.Collections.Generic;
3using System.Globalization;
4using System.Linq;
5using System.Text;
6using System.Threading.Tasks;
7using System.Windows.Data;
8
10{
19 public enum InputFormat
20 {
39 }
40
49 public class FormatToExampleConverter : IValueConverter
50 {
99 public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
100 {
101 if (value is InputFormat fmt)
102 {
103 return fmt == InputFormat.ASCII
104 ? "예시: \\s123\\e\\n\\,실제텍스트"
105 : "예시: 02 32 33 34 03,32";
106 }
107 return "";
108 }
109
166 public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
167 => throw new NotSupportedException();
168 }
169}
object Convert(object value, Type targetType, object parameter, CultureInfo culture)
object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)