示例#1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Function"/> class.
 /// </summary>
 /// <param name="type">The type.</param>
 /// <param name="name">The name.</param>
 /// <param name="pnt">The PNT.</param>
 /// <param name="sizef">The sizef.</param>
 /// <param name="lstPorts">The LST ports.</param>
 /// Created by SMK
 public Function(ComponentType type, Point pnt, XsltFunction func)
     : base(func.Name, type)
 {
     this.ObjFunction = func;
     area = new Rectangle(pnt.X, pnt.Y, Convert.ToInt32(func.CaptionSizeF.Width + func.TypeSizeF.Width) + Config.FUNCTION_DELTA_WIDTH + Config.IMAGE_SPRITE_WIDTH,
                          Config.FUNCTION_HEIGHT);
      InitPort();
 }
示例#2
0
 /// <summary>
 /// Adds the funclet function.
 /// </summary>
 /// <param name="strFunction">The STR function.</param>
 /// Created by SMK 
 private void AddFuncletFunction(string strFunction,XsltFunction funcObject)
 {
     Point pt = pnlFunclet.PointToClient(currentPoint);
     var captionSizef = Auxi_Geometry.RoundMeasureString(this, funcObject.Caption, Config.FONT_HEADER);
     var typeSizef = Auxi_Geometry.RoundMeasureString(this, funcObject.ReturnType.ToString().Substring(2), Config.FONT_HEADER);
     funcObject.CaptionSizeF = captionSizef;
     funcObject.TypeSizeF = typeSizef;
     var fnc = new Function(ComponentType.Function,pt, funcObject);
     AddFuncletGraphics(fnc);
 }