Exemplo n.º 1
0
        bool ModifyItem(ServiceProtocol serviceProtocol, Int64 requestID, Guid guid, String tag, String path, Model model, Shape stencil, RectangleF boundingRect, Single angle, System.Drawing.Color fillColor, System.Drawing.Drawing2D.FillMode fillMode, bool mirrorX, bool mirrorY)
        {
            if (true) // Decide whether to modify an item.
            {         // We're going to do it.
              // Modify the item.

                // Need to get hold of a valid pDoc pointer... *********

                //Individual changes would go something like this: *********
                //int length = tag.Length;
                //wchar_t * tagwc = (wchar_t*)(void*)Marshal.StringToHGlobalUni(tag);

                //char * tagc = (char *)malloc(length+1);
                //tagc[length] = 0;
                //for (int i=0; i<length; i++)
                //  tagc[i] = (char)tagwc[i];

                //pDoc.GCB.DoModify(tagc,
                //                    angle,
                //                    boundingRect,
                //                    fillColor,
                //                    fillMode,
                //                    mirrorX,
                //                    mirrorY);

                // Raise event(s).
                serviceProtocol.DoItemModified(requestID, guid, tag, path, model, stencil, boundingRect, angle, fillColor, fillMode, mirrorX, mirrorY);

                return(true);
            }
            else
            { // We're not going to do it.
                return(false);
            }
        }
Exemplo n.º 2
0
  bool ModifyItem(ServiceProtocol serviceProtocol, Int64 requestID, Guid guid, String tag, String path, Model model, Shape stencil, RectangleF boundingRect, Single angle, System.Drawing.Color fillColor, System.Drawing.Drawing2D.FillMode fillMode, bool mirrorX, bool mirrorY)
  {
    if (true) // Decide whether to modify an item.
    { // We're going to do it.

      // Modify the item.

      // Need to get hold of a valid pDoc pointer... *********

      //Individual changes would go something like this: *********
      //int length = tag.Length;
      //wchar_t * tagwc = (wchar_t*)(void*)Marshal.StringToHGlobalUni(tag);

      //char * tagc = (char *)malloc(length+1);
      //tagc[length] = 0;
      //for (int i=0; i<length; i++)
      //  tagc[i] = (char)tagwc[i];

      //pDoc.GCB.DoModify(tagc, 
      //                    angle,
      //                    boundingRect, 
      //                    fillColor,
      //                    fillMode,
      //                    mirrorX,
      //                    mirrorY);

      // Raise event(s).
      serviceProtocol.DoItemModified(requestID, guid, tag, path, model, stencil, boundingRect, angle, fillColor, fillMode, mirrorX, mirrorY);

      return true;
    }
    else
    { // We're not going to do it.
      return false;
    }
  }