/// <summary>
        /// Create graphic object for order
        /// </summary>
        /// <param name="order">Source order</param>
        /// <returns>Graphic object for order</returns>
        public static OrderGraphicObject Create(Order order)
        {
            OrderGraphicObject graphic = null;

            graphic = new OrderGraphicObject(order);

            Color color = Color.FromRgb(0, 0, 0);
            graphic.Attributes.Add(SymbologyContext.FILL_ATTRIBUTE_NAME, new SolidColorBrush(color));
            graphic.Attributes.Add(SymbologyContext.OFFSETX_ATTRIBUTE_NAME,
                -(SymbologyManager.DEFAULT_SIZE - SymbologyManager.DEFAULT_INDENT / 2));
            graphic.Attributes.Add(SymbologyContext.OFFSETY_ATTRIBUTE_NAME,
                -(SymbologyManager.DEFAULT_SIZE - SymbologyManager.DEFAULT_INDENT / 2));
            graphic.Attributes.Add(SymbologyContext.SIZE_ATTRIBUTE_NAME, SymbologyManager.DEFAULT_SIZE);
            graphic.Attributes.Add(SymbologyContext.FULLSIZE_ATTRIBUTE_NAME,
                SymbologyManager.DEFAULT_SIZE + SymbologyManager.DEFAULT_INDENT);

            SymbologyManager.InitGraphic(graphic);

            return graphic;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Create graphic object for order
        /// </summary>
        /// <param name="order">Source order</param>
        /// <returns>Graphic object for order</returns>
        public static OrderGraphicObject Create(Order order)
        {
            OrderGraphicObject graphic = null;

            graphic = new OrderGraphicObject(order);

            Color color = Color.FromRgb(0, 0, 0);

            graphic.Attributes.Add(SymbologyContext.FILL_ATTRIBUTE_NAME, new SolidColorBrush(color));
            graphic.Attributes.Add(SymbologyContext.OFFSETX_ATTRIBUTE_NAME,
                                   -(SymbologyManager.DEFAULT_SIZE - SymbologyManager.DEFAULT_INDENT / 2));
            graphic.Attributes.Add(SymbologyContext.OFFSETY_ATTRIBUTE_NAME,
                                   -(SymbologyManager.DEFAULT_SIZE - SymbologyManager.DEFAULT_INDENT / 2));
            graphic.Attributes.Add(SymbologyContext.SIZE_ATTRIBUTE_NAME, SymbologyManager.DEFAULT_SIZE);
            graphic.Attributes.Add(SymbologyContext.FULLSIZE_ATTRIBUTE_NAME,
                                   SymbologyManager.DEFAULT_SIZE + SymbologyManager.DEFAULT_INDENT);

            SymbologyManager.InitGraphic(graphic);

            return(graphic);
        }