コード例 #1
0
 /// <summary>
 /// 熟悉改变事件
 /// </summary>
 /// <param name="obj"></param>
 /// <param name="name"></param>
 public void PropertyValueChanged(object sender, PropertyChangedEventArgs e)
 {
     if (sender as IPropertyIt != null && e.PropertyName == "Name")
     {
         IPropertyIt ip = sender as IPropertyIt;
         if (this.boxType == ItemBoxEnum.SET)
         {
             this.Name = "设置" + ip.Name + "属性的值";
             if (this.InputDatas.Count > 1)
             {
                 InputDatas[1].Name = ip.Name;
             }
             if (this.outputDatas.Count > 1)
             {
                 outputDatas[1].Name = ip.Name;
             }
         }
         else if (this.boxType == ItemBoxEnum.GET)
         {
             this.Name = "获取" + ip.Name + "属性的值";
             if (this.outputDatas.Count > 1)
             {
                 outputDatas[0].Name = ip.Name;
             }
         }
     }
 }
コード例 #2
0
        /// <summary>
        /// 设置全局变量的值
        /// </summary>
        /// <param name="id"></param>
        /// <param name="value"></param>
        public virtual void SetPropertyValue(string id, object value)
        {
            IPropertyIt pro = FindIPropertyById(id);

            if (pro != null)
            {
                pro.Value = value;
            }
        }