Пример #1
0
        bool CreateItem(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)
        {
            // Need to check for runstate here, and decide if we'll fire DoItemCreated.
            // This is required in case a rogue client tries to create an item even when not supposed to.
            // This applies to all three create*, and all three delete* events.
            if (true) // Decide whether to create an item.
            {         // We're going to do it.
              // Create the item.

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

                return(true);
            }
            else
            { // We're not going to do it.
                return(false);
            }
        }
Пример #2
0
  bool CreateItem(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)
  {
    // Need to check for runstate here, and decide if we'll fire DoItemCreated.
    // This is required in case a rogue client tries to create an item even when not supposed to.
    // This applies to all three create*, and all three delete* events.
    if (true) // Decide whether to create an item.
    { // We're going to do it.
      // Create the item.

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

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