chenghaoran
2024-03-12 375b488be2666cd56e70728624f4eadaefee0440
WPFProject/Models/Variable.cs
File was renamed from Models/Variable.cs
@@ -1,61 +1,61 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Policy;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Serialization;
namespace WPFProject.Models
{
    public class Variable : NotifyBase
    {
        /// <summary>
        /// 参数名
        /// </summary>
        private string _Name;
        public string Name
        {
            get { return _Name; }
            set => RaiseAndSetIfChanged(ref _Name, value);
        }
        /// <summary>
        /// 参数类型
        /// </summary>
        private string _TypeName;
        public string TypeName
        {
            get { return _TypeName; }
            set
            {
                RaiseAndSetIfChanged(ref _TypeName, value);
                Type = value == null ? null : Type.GetType(value);
            }
        }
        [XmlIgnore]
        public Type Type { get; private set; }
        /// <summary>
        /// 值字符
        /// </summary>
        private string _ValueStr;
        public string ValueStr
        {
            get { return _ValueStr; }
            set => RaiseAndSetIfChanged(ref _ValueStr, value);
        }
        /// <summary>
        /// 参数值
        /// </summary>
        private object _Value;
        public object Value
        {
            get { return _Value; }
            set { _Value = value; }
        }
    }
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Policy;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Serialization;
namespace WPFProject.Models
{
    public class Variable : NotifyBase
    {
        /// <summary>
        /// 参数名
        /// </summary>
        private string _Name;
        public string Name
        {
            get { return _Name; }
            set => RaiseAndSetIfChanged(ref _Name, value);
        }
        /// <summary>
        /// 参数类型
        /// </summary>
        private string _TypeName;
        public string TypeName
        {
            get { return _TypeName; }
            set
            {
                RaiseAndSetIfChanged(ref _TypeName, value);
                Type = value == null ? null : Type.GetType(value);
            }
        }
        [XmlIgnore]
        public Type Type { get; private set; }
        /// <summary>
        /// 值字符
        /// </summary>
        private string _ValueStr;
        public string ValueStr
        {
            get { return _ValueStr; }
            set => RaiseAndSetIfChanged(ref _ValueStr, value);
        }
        /// <summary>
        /// 参数值
        /// </summary>
        private object _Value;
        public object Value
        {
            get { return _Value; }
            set { _Value = value; }
        }
    }
}