예제 #1
0
            public void Reset()
            {
                RtfDestinationState = 0;
                RtfInternalState    = 0;
                InFontTable         = false;
                SymbolFont          = SymbolFont.None;

                Properties[(int)Property.Hidden] = 0;
                Properties[(int)Property.UnicodeCharSkipCount] = 1;
                Properties[(int)Property.FontNum] = -1;
            }
예제 #2
0
        public static Graphic NewText(string text, MapPoint p, Color color, SymbolFont font)
        {
            TextSymbol textSymbol = new TextSymbol();

            textSymbol.Text  = text;
            textSymbol.Color = color;
            textSymbol.Font  = font;

            Graphic graphicText = new Graphic();

            graphicText.Symbol   = textSymbol;
            graphicText.Geometry = p;

            return(graphicText);
        }
예제 #3
0
        public static Graphic NewText(string text, MapPoint p, Color color, string fontName, double fontSize)
        {
            TextSymbol textSymbol = new TextSymbol();

            textSymbol.Text  = text;
            textSymbol.Color = color;

            SymbolFont font = new SymbolFont(fontName, fontSize);

            textSymbol.Font = font;

            Graphic graphicText = new Graphic();

            graphicText.Symbol   = textSymbol;
            graphicText.Geometry = p;

            return(graphicText);
        }
예제 #4
0
        private void addTextSymbol(string text, MapPoint mp)
        {
            TextSymbol textSymbol = new TextSymbol();

            textSymbol.Text = text + "\n" + mp.X.ToString("R") + "\n" + mp.Y.ToString("R");
            SymbolFont font = new SymbolFont();

            font.FontSize              = 16;
            textSymbol.Font            = font;
            textSymbol.BorderLineColor = System.Windows.Media.Colors.White;
            textSymbol.BorderLineSize  = 1;
            textSymbol.XOffset         = 10;
            textSymbol.Color           = System.Windows.Media.Colors.Blue;
            Graphic graphicText = new Graphic
            {
                Geometry = mp,
                Symbol   = textSymbol
            };

            _tempTextGraphic.Add(graphicText);
            _map.GetGraphicLayer("Drawing").Graphics.Add(graphicText);
        }
예제 #5
0
        public static Graphic NewText(string text, MapPoint p, Color color, SymbolFont font)
        {
            TextSymbol textSymbol = new TextSymbol();
            textSymbol.Text = text;
            textSymbol.Color = color;
            textSymbol.Font = font;

            Graphic graphicText = new Graphic();
            graphicText.Symbol = textSymbol;
            graphicText.Geometry = p;

            return graphicText;
        }
예제 #6
0
        public static Graphic NewText(string text, MapPoint p, Color color, string fontName, double fontSize)
        {
            TextSymbol textSymbol = new TextSymbol();
            textSymbol.Text = text;
            textSymbol.Color = color;

            SymbolFont font = new SymbolFont(fontName, fontSize);
            textSymbol.Font = font;

            Graphic graphicText = new Graphic();
            graphicText.Symbol = textSymbol;
            graphicText.Geometry = p;

            return graphicText;
        }
예제 #7
0
        private void AddGraphicsToDisplay(object sender, RoutedEventArgs e)
        {
            if (_mapPoints == null)
            {
                _mapPoints = GenerateRandomPoints(25000);
            }

            ClearGraphics();
            Button button = sender as Button;

            SymbolFont font = new SymbolFont
            {
                FontFamily     = "Tahoma",
                FontSize       = 8,
                FontStyle      = SymbolFontStyle.Italic,
                FontWeight     = SymbolFontWeight.Bold,
                TextDecoration = SymbolTextDecoration.Underline
            };

            List <Graphic> graphics = new List <Graphic>();

            switch (button.Name)
            {
            case "Button1":
                for (int i = 0; i < _mapPoints.Length; i++)
                {
                    MyGraphicsLayer.Graphics.Add(new Graphic
                    {
                        Geometry = _mapPoints[i],
                        Symbol   = new TextSymbol
                        {
                            Text = i.ToString(CultureInfo.InvariantCulture)
                        }
                    });
                }
                break;

            case "Button2":
                graphics.AddRange(_mapPoints.Select((t, i) => new Graphic
                {
                    Geometry = t,
                    Symbol   = new TextSymbol {
                        Text = i.ToString(CultureInfo.InvariantCulture)
                    }
                }));

                MyGraphicsLayer.GraphicsSource = graphics;
                break;

            case "Button3":
                ClearGraphics();
                return;

            case "Button4":
                for (int i = 0; i < _mapPoints.Length; i++)
                {
                    MyGraphicsLayer.Graphics.Add(new Graphic
                    {
                        Geometry = _mapPoints[i],
                        Symbol   = new TextSymbol
                        {
                            Text            = i.ToString(CultureInfo.InvariantCulture),
                            Font            = font,
                            Color           = Colors.DarkGreen,
                            BorderLineColor = Colors.White,
                            BorderLineSize  = 1,
                            BackgroundColor = Colors.Red
                        }
                    });
                }
                break;

            case "Button5":
                graphics.AddRange(_mapPoints.Select((t, i) => new Graphic
                {
                    Geometry = t,
                    Symbol   = new TextSymbol
                    {
                        Text            = i.ToString(CultureInfo.InvariantCulture),
                        Font            = font,
                        Color           = Colors.DarkGreen,
                        BorderLineColor = Colors.White,
                        BorderLineSize  = 1,
                        BackgroundColor = Colors.Red
                    }
                }));
                MyGraphicsLayer.GraphicsSource = graphics;
                break;
            }
        }
예제 #8
0
        private void WorkflowA(object sender, RoutedEventArgs e)
        {
            ClearGraphics();
            Button button = sender as Button;

            if (_mapPoints == null)
            {
                _mapPoints = GenerateRandomPoints(_numberOfPoints);
            }

            SymbolFont font = new SymbolFont
            {
                FontFamily     = "Tahoma",
                FontSize       = 12,
                FontStyle      = SymbolFontStyle.Italic,
                FontWeight     = SymbolFontWeight.Bold,
                TextDecoration = SymbolTextDecoration.Underline
            };

            TextSymbol symbol;

            switch (button.Name)
            {
            case "Button01":
                symbol = new TextSymbol
                {
                    Font = font
                };
                break;

            case "Button02":
                symbol = new TextSymbol
                {
                    Font  = font,
                    Color = Colors.DarkGreen
                };
                break;

            case "Button03":
                symbol = new TextSymbol
                {
                    Font            = font,
                    Color           = Colors.DarkGreen,
                    BorderLineColor = Colors.White,
                    BorderLineSize  = 1
                };
                break;

            case "Button04":
                symbol = new TextSymbol
                {
                    Font            = font,
                    Color           = Colors.DarkGreen,
                    BorderLineColor = Colors.White,
                    BorderLineSize  = 1,
                    BackgroundColor = Colors.Red
                };
                break;

            default:
                symbol = new TextSymbol();
                break;
            }

            for (int i = 0; i < _mapPoints.Length; i++)
            {
                symbol.Text = i.ToString(CultureInfo.InvariantCulture);
                MyGraphicsLayer.Graphics.Add(new Graphic {
                    Geometry = _mapPoints[i], Symbol = symbol
                });
            }
        }
예제 #9
0
        private void WorkflowB(object sender, RoutedEventArgs e)
        {
            ClearGraphics();

            Button button = sender as Button;

            if (_mapPoints == null)
            {
                _mapPoints = GenerateRandomPoints(_numberOfPoints);
            }

            SymbolFont font = new SymbolFont
            {
                FontFamily     = "Tahoma",
                FontSize       = 12,
                FontStyle      = SymbolFontStyle.Italic,
                FontWeight     = SymbolFontWeight.Bold,
                TextDecoration = SymbolTextDecoration.Underline
            };

            List <Graphic> graphics = new List <Graphic>();

            switch (button.Name)
            {
            case "Button11":
                graphics.AddRange(_mapPoints.Select((t, i) =>
                                                    new Graphic
                {
                    Geometry = t,
                    Symbol   = new TextSymbol
                    {
                        Text = i.ToString(CultureInfo.InvariantCulture),
                        Font = font
                    }
                }));
                break;

            case "Button12":
                graphics.AddRange(_mapPoints.Select((t, i) =>
                                                    new Graphic
                {
                    Geometry = t,
                    Symbol   = new TextSymbol
                    {
                        Text  = i.ToString(CultureInfo.InvariantCulture),
                        Font  = font,
                        Color = Colors.DarkGreen
                    }
                }));
                break;

            case "Button13":
                graphics.AddRange(_mapPoints.Select((t, i) =>
                                                    new Graphic
                {
                    Geometry = t,
                    Symbol   = new TextSymbol
                    {
                        Text            = i.ToString(CultureInfo.InvariantCulture),
                        Font            = font,
                        Color           = Colors.DarkGreen,
                        BorderLineColor = Colors.White,
                        BorderLineSize  = 1
                    }
                }));
                break;

            case "Button14":
                graphics.AddRange(_mapPoints.Select((t, i) =>
                                                    new Graphic
                {
                    Geometry = t,
                    Symbol   = new TextSymbol
                    {
                        Text            = i.ToString(CultureInfo.InvariantCulture),
                        Font            = font,
                        Color           = Colors.DarkGreen,
                        BorderLineColor = Colors.White,
                        BorderLineSize  = 1,
                        BackgroundColor = Colors.Red
                    }
                }));
                break;

            default:
                graphics.AddRange(_mapPoints.Select((t, i) =>
                                                    new Graphic
                {
                    Geometry = t,
                    Symbol   = new TextSymbol
                    {
                        Text = i.ToString(CultureInfo.InvariantCulture)
                    }
                }));
                break;
            }

            MyGraphicsLayer.GraphicsSource = graphics;
        }
예제 #10
0
        private void AddGraphicsToDisplay(object sender, RoutedEventArgs e)
        {
            if (_mapPoints == null)
                _mapPoints = GenerateRandomPoints(25000);

            ClearGraphics();
            Button button = sender as Button;

            SymbolFont font = new SymbolFont
            {
                FontFamily = "Tahoma",
                FontSize = 8,
                FontStyle = SymbolFontStyle.Italic,
                FontWeight = SymbolFontWeight.Bold,
                TextDecoration = SymbolTextDecoration.Underline
            };

            List<Graphic> graphics = new List<Graphic>();

            switch (button.Name)
            {
                case "Button1":
                    for (int i = 0; i < _mapPoints.Length; i++)
                    {
                        MyGraphicsLayer.Graphics.Add(new Graphic
                        {
                            Geometry = _mapPoints[i], 
                            Symbol = new TextSymbol
                            {
                                Text = i.ToString(CultureInfo.InvariantCulture)
                            }
                        });
                    }
                    break;
                case "Button2":
                    graphics.AddRange(_mapPoints.Select((t, i) => new Graphic
                    {
                        Geometry = t,
                        Symbol = new TextSymbol {Text = i.ToString(CultureInfo.InvariantCulture)}
                    }));

                    MyGraphicsLayer.GraphicsSource = graphics;
                    break;
                case "Button3":
                    ClearGraphics();
                    return;
                case "Button4":
                    for (int i = 0; i < _mapPoints.Length; i++)
                    {
                        MyGraphicsLayer.Graphics.Add(new Graphic
                        {
                            Geometry = _mapPoints[i],
                            Symbol = new TextSymbol
                            {
                                Text = i.ToString(CultureInfo.InvariantCulture),
                                Font = font,
                                Color = Colors.DarkGreen,
                                BorderLineColor = Colors.White,
                                BorderLineSize = 1,
                                BackgroundColor = Colors.Red
                            }
                        });
                    }
                    break;
                case "Button5":
                    graphics.AddRange(_mapPoints.Select((t, i) => new Graphic
                    {
                        Geometry = t,
                        Symbol = new TextSymbol
                        {
                            Text = i.ToString(CultureInfo.InvariantCulture),
                            Font = font,
                            Color = Colors.DarkGreen,
                            BorderLineColor = Colors.White,
                            BorderLineSize = 1,
                            BackgroundColor = Colors.Red
                        }
                    }));
                    MyGraphicsLayer.GraphicsSource = graphics;
                    break;
            }
        }
예제 #11
0
        private void WorkflowB(object sender, RoutedEventArgs e)
        {
            ClearGraphics();

            Button button = sender as Button;

            if (_mapPoints == null)
                _mapPoints = GenerateRandomPoints(_numberOfPoints);

            SymbolFont font = new SymbolFont
            {
                FontFamily = "Tahoma",
                FontSize = 12,
                FontStyle = SymbolFontStyle.Italic,
                FontWeight = SymbolFontWeight.Bold,
                TextDecoration = SymbolTextDecoration.Underline
            };

            List<Graphic> graphics = new List<Graphic>();

            switch (button.Name)
            {
                case "Button11":
                    graphics.AddRange(_mapPoints.Select((t, i) => 
                        new Graphic
                        {
                            Geometry = t, 
                            Symbol = new TextSymbol
                            {
                                Text = i.ToString(CultureInfo.InvariantCulture), 
                                Font = font
                            }
                        }));
                    break;
                case "Button12":
                    graphics.AddRange(_mapPoints.Select((t, i) => 
                        new Graphic
                        {
                            Geometry = t, 
                            Symbol = new TextSymbol
                            {
                                Text = i.ToString(CultureInfo.InvariantCulture), 
                                Font = font, 
                                Color = Colors.DarkGreen
                            }
                        }));
                    break;
                case "Button13":
                    graphics.AddRange(_mapPoints.Select((t, i) => 
                        new Graphic
                        {
                            Geometry = t, 
                            Symbol = new TextSymbol
                            {
                                Text = i.ToString(CultureInfo.InvariantCulture), 
                                Font = font, 
                                Color = Colors.DarkGreen, 
                                BorderLineColor = Colors.White, 
                                BorderLineSize = 1
                            }
                        }));
                    break;
                case "Button14":
                    graphics.AddRange(_mapPoints.Select((t, i) =>
                        new Graphic
                        {
                            Geometry = t, 
                            Symbol = new TextSymbol
                            {
                                Text = i.ToString(CultureInfo.InvariantCulture), 
                                Font = font, 
                                Color = Colors.DarkGreen, 
                                BorderLineColor = Colors.White, 
                                BorderLineSize = 1, 
                                BackgroundColor = Colors.Red
                            }
                        }));
                    break;
                default:
                    graphics.AddRange(_mapPoints.Select((t, i) => 
                        new Graphic
                        {
                            Geometry = t, 
                            Symbol = new TextSymbol
                            {
                                Text = i.ToString(CultureInfo.InvariantCulture)
                            }
                        }));
                    break;
            }

            MyGraphicsLayer.GraphicsSource = graphics;
        }
예제 #12
0
        private void WorkflowA(object sender, RoutedEventArgs e)
        {
            ClearGraphics();
            Button button = sender as Button;

            if (_mapPoints == null)
                _mapPoints = GenerateRandomPoints(_numberOfPoints);
            
            SymbolFont font = new SymbolFont
            {
                FontFamily = "Tahoma",
                FontSize = 12,
                FontStyle = SymbolFontStyle.Italic,
                FontWeight = SymbolFontWeight.Bold,
                TextDecoration = SymbolTextDecoration.Underline
            };

            TextSymbol symbol;

            switch (button.Name)
            {
                case "Button01":
                    symbol = new TextSymbol
                    {
                        Font = font
                    };
                    break;
                case "Button02":
                    symbol = new TextSymbol
                    {
                        Font = font,
                        Color = Colors.DarkGreen
                    };
                    break;
                case "Button03":
                    symbol = new TextSymbol
                    {
                        Font = font,
                        Color = Colors.DarkGreen,
                        BorderLineColor = Colors.White,
                        BorderLineSize = 1
                    };
                    break;
                case "Button04":
                    symbol = new TextSymbol
                    {
                        Font = font,
                        Color = Colors.DarkGreen,
                        BorderLineColor = Colors.White,
                        BorderLineSize = 1,
                        BackgroundColor = Colors.Red
                    };
                    break;
                default:
                    symbol = new TextSymbol();
                    break;
            }

            for (int i = 0; i < _mapPoints.Length; i++)
            {
                symbol.Text = i.ToString(CultureInfo.InvariantCulture);
                MyGraphicsLayer.Graphics.Add(new Graphic {Geometry = _mapPoints[i], Symbol = symbol});
            }
        }