Exemplo n.º 1
0
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            VR33BConnectionState connectionState = (VR33BConnectionState)value;

            if (connectionState == VR33BConnectionState.Success)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Exemplo n.º 2
0
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            VR33BConnectionState connectionState = (VR33BConnectionState)value;

            switch (connectionState)
            {
            case VR33BConnectionState.NotConnected:
                return("未连接");

            case VR33BConnectionState.Connecting:
                return("连接中");

            case VR33BConnectionState.Success:
                return("已连接");

            case VR33BConnectionState.Failed:
                return("连接失败");
            }
            return("WHAT??");
        }