Ejemplo n.º 1
0
        public SymbologyRecord()
        {
            if (Symbol == null)
                Symbol = new SymbolBox();
            Symbol.ParentRecord = this;

            Color = Color.Black;
            Size = DEFAULT_SIZE;
            Angle = DEFAULT_ANGLE;
            UseRouteColor = DEFAULT_USE_ROUTE_COLOR;
        }
        private SymbolBox _CreateSymbolBox(string templateFileName, SymbologyRecord symbologyRecord)
        {
            SymbolBox symbolBox = new SymbolBox(templateFileName);
            symbolBox.ParentRecord = symbologyRecord;
            symbolBox.Size = symbologyRecord.Size;

            System.Drawing.Color color = symbologyRecord.Color;
            System.Windows.Media.Color mediaColor =
                System.Windows.Media.Color.FromArgb(color.A, color.R, color.G, color.B);
            symbolBox.Fill = new System.Windows.Media.SolidColorBrush(mediaColor);

            symbolBox.Height = (symbologyRecord.Size + SymbologyManager.DEFAULT_INDENT) * SymbologyManager.INCREASE_ON_HOVER;
            symbolBox.Width = (symbologyRecord.Size + SymbologyManager.DEFAULT_INDENT) * SymbologyManager.INCREASE_ON_HOVER;

            return symbolBox;
        }