Sysnet.TouchScreen/AppCode/Code.cs

(开头部分) 10KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Security;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Data;
using System.Windows.Interop;
using System.Windows.Media.Imaging;
using System.Xml;
using Sysnet.Common;

namespace Sysnet.TouchScreen
{
    public class IsStringEmptyConverter : IValueConverter
    {
        public object Convert(
            object value,
            Type targetType,
            object parameter,
            CultureInfo culture)
        {
            XmlElement str = value as XmlElement;
            if (str != null)
            {
                XmlAttribute attribute = str.Attributes["Description"];
                if (attribute != null)
                {
                    string foo = attribute.Value;
                    if (foo != null && foo.Length > 0)
                    {
                        if (targetType == typeof(Visibility))
                        {
                            return Visibility.Visible;
                        }
                        else
                        {
                            return true;
                        }
                    }
                }
            }
            if (targetType == typeof(Visibility))
            {
                return Visibility.Collapsed;
            }
            else
            {
                return false;
            }
        }

        public object ConvertBack(
            object value,
            Type targetType,
            object parameter,
            CultureInfo culture)
后面还有 285 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。