示例#1
0
    protected override void OnPropertyChanged(PropertyChangedEventArgs e)
    {

      if (graphicNode != null)
      {
        NodeChanged(graphicNode);
        //SysCAD.Protocol.Action action = new SysCAD.Protocol.Action();
        //action.Modify.Add(graphicNode);

        ////state.f AddAction(action);
        //state.ModifyNode(graphicNode.Guid);
        //state.ModifyGraphicItem(out requestId, graphicNode.Guid, graphicNode.Tag, graphicNode.Path,
        //  graphicNode.Model, graphicNode.Shape, graphicNode.BoundingRect, graphicNode.Angle, graphicNode.TagArea,
        //  graphicNode.TagAngle, graphicNode.FillColor, graphicNode.FillMode, graphicNode.MirrorX, graphicNode.MirrorY);
      }

      if (graphicLink != null)
      {
        LinkChanged(graphicLink);
        //state.ModifyLink(graphicLink.Guid);
        //state.ModifyGraphicLink(out requestId, graphicLink.Guid, graphicLink.Tag, graphicLink.ClassID,
        //  graphicLink.Origin, graphicLink.Destination,
        //  graphicLink.OriginPort, graphicLink.OriginPortID, graphicLink.DestinationPort, graphicLink.DestinationPortID,
        //  graphicLink.ControlPoints, graphicLink.TagArea, graphicLink.TagAngle);
      }
    }
示例#2
0
 protected override void OnPropertyChanged(VisualHint.SmartPropertyGrid.PropertyChangedEventArgs e)
 {
     if (e.PropertyEnum.Property.Id == 7)
     {
         ParentForm.Opacity = (double)Opacity / 100.0;
         //FormBackColor = Color.FromArgb((int)((double)Opacity / 100.0 * 255.0), FormBackColor);
     }
     else if (e.PropertyEnum.Property.Id == 10)
     {
         PropertyEnumerator propEnum = FindProperty(6);
         propEnum.Property.Value.ReadOnly = (bool)e.PropertyEnum.Property.
                                            Value.GetValue();
     }
 }
示例#3
0
        //[Property Changes] property changed This can call all the changes!
        //Make a settings function that lists all the changes
        //1.) EFI
        //2.) If bad update
        //3.) SPG
        //4.) List View
        //5.) Tab
        //6.) Else
        //7.) Show button
        protected override void OnPropertyChanged(VisualHint.SmartPropertyGrid.PropertyChangedEventArgs e)
        {
            //[Change] == SPG can allow for the module XML to update the acceptable Dt
            // on property change
            // check against max, min and default for each property in the Module.
            // if out of range, give a new message
            // if out of range, turn it red

            if (e.PropertyEnum.Property.Id > 0)
            {
                ;
            }

            //All code goes above this SPG standard fragment.
            //Section 4.12 of the spg manual, p 37
            base.OnPropertyChanged(e);
        }