예제 #1
0
            public ClimbRateCache(SolidColorBrush HudBrush)
            {
                triangleRenderTransform = new RotateTransform(180);
                triangle = CreateTriangle(HudBrush, -9, 0, 9, 0, 0, 12);
                triangle.RenderTransform = triangleRenderTransform;

                txtBlk = new BorderTextLabel
                {
                    Stroke     = HudBrush,
                    Foreground = HudBrush,
                    FontSize   = 16
                };

                zeroLn = new Line
                {
                    X1              = -10,
                    X2              = -40,
                    Y1              = 0,
                    Y2              = 00,
                    Stroke          = HudBrush,
                    StrokeThickness = 1
                };

                climbMagnitude = new Rectangle
                {
                    Fill  = HudBrush,
                    Width = 12
                };
            }
예제 #2
0
            public HeadingCache(SolidColorBrush HudBrush)
            {
                heading = new BorderTextLabel
                {
                    FontFamily = new FontFamily("Courier New"),
                    Stroke     = HudBrush,
                    FontSize   = 16,
                    Foreground = HudBrush
                };

                thickness = new Thickness(1);
                border    = new Border
                {
                    BorderThickness = thickness,
                    Child           = heading,
                    BorderBrush     = HudBrush
                };

                leftLn = new Line
                {
                    Y1              = 44,
                    Y2              = 30,
                    Stroke          = HudBrush,
                    StrokeThickness = 1
                };

                rightLn = new Line
                {
                    Y1              = 44,
                    Y2              = 30,
                    Stroke          = HudBrush,
                    StrokeThickness = 1
                };
            }
예제 #3
0
            public GroundSpeedCache(SolidColorBrush HudBrush)
            {
                lines = new Line[6];
                bit   = new BorderTextLabel[6];

                txtBlk = new BorderTextLabel
                {
                    Stroke     = HudBrush,
                    Foreground = HudBrush,
                    FontSize   = 16
                };

                rect = new Rectangle
                {
                    Width           = 60,
                    Height          = 150,
                    StrokeThickness = 2,
                    Stroke          = HudBrush
                };

                double space = (rect.Height - 20) / 5;

                for (int i = 1; i < 6; i++)
                {
                    Line li = new Line
                    {
                        X1 = -rect.Width,
                        Y1 = (-rect.Height / 2 + space * i) - 2.5
                    };

                    li.X2 = li.X1 + 10;
                    li.Y2 = li.Y1;
                    li.StrokeThickness = 2;
                    li.Stroke          = HudBrush;

                    BorderTextLabel texti = new BorderTextLabel
                    {
                        Width                      = 22,
                        StrokeThickness            = 0,
                        HorizontalContentAlignment = HorizontalAlignment.Left,
                        Foreground                 = HudBrush,
                        FontSize                   = 16,
                        FontWeight                 = FontWeights.Bold
                    };

                    lines[i] = li;
                    bit[i]   = texti;
                }

                tb = new TextBlock
                {
                    Width         = rect.Width - 4,
                    TextAlignment = TextAlignment.Center,
                    Foreground    = HudBrush,
                    Background    = new SolidColorBrush(Color.FromArgb(0xFF, 0x0, 0x0, 0x0)),
                    FontSize      = 17,
                    FontWeight    = FontWeights.Bold
                };
            }
예제 #4
0
 public AlphaBetaCache(SolidColorBrush HudBrush)
 {
     txtBlkSpd = new BorderTextLabel
     {
         Stroke     = HudBrush,
         Foreground = HudBrush,
         FontSize   = 16
     };
 }
예제 #5
0
 public MAndGCache(SolidColorBrush HudBrush)
 {
     txtBlkGM = new BorderTextLabel
     {
         Stroke     = HudBrush,
         Foreground = HudBrush,
         FontSize   = 16
     };
 }
예제 #6
0
 public WayPointCache(SolidColorBrush HudBrush)
 {
     txtBlk = new BorderTextLabel
     {
         Stroke     = HudBrush,
         Foreground = HudBrush,
         FontSize   = 16
     };
 }
예제 #7
0
 public GPSLabelCache(SolidColorBrush HudBrush)
 {
     gpsText = new BorderTextLabel
     {
         HorizontalContentAlignment = HorizontalAlignment.Center,
         Foreground      = HudBrush,
         StrokeThickness = 0,
         FontSize        = 16,
         FontWeight      = FontWeights.Bold
     };
 }
예제 #8
0
            public RollTickCache(SolidColorBrush HudBrush)
            {
                rotationTransform     = new RotateTransform[RollCacheCount];
                textRotationTransform = new RotateTransform[RollCacheCount];
                texts = new BorderTextLabel[RollCacheCount];

                for (int i = 0; i < RollCacheCount; i++)
                {
                    rotationTransform[i]     = new RotateTransform();
                    textRotationTransform[i] = new RotateTransform();

                    texts[i] = new BorderTextLabel
                    {
                        Foreground      = HudBrush,
                        Stroke          = HudBrush,
                        StrokeThickness = 1,
                        FontSize        = 12
                    };
                    texts[i].RenderTransform = textRotationTransform[i];
                }

                texts[9].Text = "-60";
                texts[8].Text = "-45";
                texts[7].Text = "-30";
                texts[6].Text = "-20";
                texts[5].Text = "-10";

                texts[4].Text = "60";
                texts[3].Text = "45";
                texts[2].Text = "30";
                texts[1].Text = "20";
                texts[0].Text = "10";

                line = new Line[RollCacheCount];
                for (int i = 0; i < RollCacheCount; i++)
                {
                    line[i] = new Line
                    {
                        X1              = 0,
                        X2              = 0,
                        Y2              = 0,
                        Stroke          = HudBrush,
                        StrokeThickness = 2,
                        RenderTransform = rotationTransform[i]
                    };
                }
                ;
            }
예제 #9
0
            public SpeedCache(SolidColorBrush HudBrush)
            {
                txtBlkSpdG = new BorderTextLabel
                {
                    Stroke     = HudBrush,
                    Foreground = HudBrush,
                    FontSize   = 16
                };

                txtBlkSpdA = new BorderTextLabel
                {
                    Stroke     = HudBrush,
                    Foreground = HudBrush,
                    FontSize   = 16
                };
            }
예제 #10
0
            public CompassCache(SolidColorBrush HudBrush)
            {
                tl = new Line[26];
                for (int i = 0; i < tl.Length; i++)
                {
                    tl[i] = new Line();
                }

                ticktext = new BorderTextLabel[26];
                for (int i = 0; i < ticktext.Length; i++)
                {
                    ticktext[i] = new BorderTextLabel
                    {
                        FontSize   = 16,
                        Stroke     = HudBrush,
                        Foreground = HudBrush,
                        FontFamily = new FontFamily("Courier New")
                    };
                }
            }
예제 #11
0
            public MajorPitchTickCache(SolidColorBrush HudBrush)
            {
                lnL = new Line[TickCount];
                for (int i = 0; i < TickCount; i++)
                {
                    lnL[i] = new Line
                    {
                        X1              = 0,
                        X2              = 40,
                        Y1              = 0,
                        Y2              = 0,
                        Stroke          = HudBrush,
                        StrokeThickness = 2
                    };
                }

                lnR = new Line[TickCount];
                for (int i = 0; i < TickCount; i++)
                {
                    lnR[i] = new Line
                    {
                        X1              = 0,
                        X2              = 40,
                        Y1              = 0,
                        Y2              = 0,
                        Stroke          = HudBrush,
                        StrokeThickness = 2
                    };
                }

                left = new Line[TickCount];
                for (int i = 0; i < TickCount; i++)
                {
                    left[i] = new Line
                    {
                        X1              = 0,
                        X2              = 0,
                        Y1              = 0,
                        Y2              = 7,
                        Stroke          = HudBrush,
                        StrokeThickness = 2
                    };
                }

                for (int i = 0; i < 9; i++)
                {
                    left[i * 2].Y2 = -5;
                }

                right = new Line[TickCount];
                for (int i = 0; i < TickCount; i++)
                {
                    right[i] = new Line
                    {
                        X1              = 0,
                        X2              = 0,
                        Y1              = 0,
                        Y2              = 7,
                        Stroke          = HudBrush,
                        StrokeThickness = 2
                    };
                }

                for (int i = 0; i < 9; i++)
                {
                    right[i * 2].Y2 = -5;
                }

                disp = new bool[TickCount];
                for (int i = 0; i < TickCount; i++)
                {
                    disp[i] = true;
                }

                txtBlkL = new BorderTextLabel[TickCount];
                for (int i = 0; i < TickCount; i++)
                {
                    txtBlkL[i] = new BorderTextLabel
                    {
                        Stroke = new SolidColorBrush(Color.FromArgb(0, 0, 0, 0)),
                        HorizontalContentAlignment = HorizontalAlignment.Left,
                        Foreground = HudBrush,
                        FontSize   = 16,
                        FontWeight = FontWeights.Bold
                    };
                }

                txtBlkR = new BorderTextLabel[TickCount];
                for (int i = 0; i < TickCount; i++)
                {
                    txtBlkR[i] = new BorderTextLabel
                    {
                        Stroke = new SolidColorBrush(Color.FromArgb(0, 0, 0, 0)),
                        HorizontalContentAlignment = HorizontalAlignment.Right,
                        Foreground = HudBrush,
                        FontSize   = 16,
                        FontWeight = FontWeights.Bold
                    };
                }
            }