public override Bitmap CreateIcon(Graphics g)
 {
     if (this.ActionData != null)
     {
         MethodCreateValue mcv = this.ActionData.ActionMethod as MethodCreateValue;
         if (mcv != null)
         {
             LocalVariable lv = mcv.Owner as LocalVariable;
             if (lv != null)
             {
                 Bitmap img = lv.ImageIcon as Bitmap;
                 if (img != null)
                 {
                     IconLayout = EnumIconDrawType.Left;
                     return(img);
                 }
             }
         }
         else
         {
             CustomConstructorPointer ccp = this.ActionData.ActionMethod as CustomConstructorPointer;
             if (ccp != null)
             {
                 return(Resources._constructor.ToBitmap());
             }
         }
     }
     return(base.CreateIcon(g));
 }
Example #2
0
        public ActionAssignInstance(ClassPointer owner)
        {
            _class               = owner;
            _actMethod           = new MethodCreateValue(this);
            _parameters          = new ParameterValueCollection();
            _valType             = new ParameterValue(this);
            _valType.Name        = Instance_Type;
            _valType.ParameterID = IntanceTypeId;
            ConstObjectPointer cop = new ConstObjectPointer(Instance_Type, typeof(Type));

            _valType.ConstantValue = cop;
            _valType.ConstantValue.SetOnValueChanged(onInstanceTypeChanged);
            _val             = new ParameterValue(this);
            _val.ParameterID = IntanceValueId;
            _val.Name        = Instance_Value;
            _parameters.Add(_valType);
            _parameters.Add(_val);
        }