コード例 #1
0
 public void SetParameterValue(string name, object value)
 {
     if (string.Compare(name, ActionAssignInstance.Instance_Value, StringComparison.Ordinal) == 0)
     {
         InstanceValue.SetValue(value);
         if (_valueChanged != null)
         {
             _valueChanged(this, EventArgs.Empty);
         }
     }
     if (_var != null)
     {
         if (string.Compare(name, ActionAssignInstance.Instance_Type, StringComparison.Ordinal) == 0)
         {
             bool            typeChanged = false;
             DataTypePointer dp          = value as DataTypePointer;
             if (dp != null)
             {
                 if (_var.ClassType.IsAssignableFrom(dp))
                 {
                     InstanceType.SetValue(dp);
                     typeChanged = true;
                 }
             }
             if (typeChanged)
             {
                 if (_valueChanged != null)
                 {
                     _valueChanged(this, EventArgs.Empty);
                 }
             }
         }
     }
 }