Example #1
0
        private BracketPoint LenghtLine(BracketPoint point)
        {
            NameLabel(index, point, true);
            ScoreLabel(index, point, true);
            index++;

            NameLabel(index, point, false);
            ScoreLabel(index, point, false);
            index++;

            Line line = new Line();

            line.X1 = point.X;
            line.X2 = point.X - BracketWidth;
            line.Y1 = point.Y;
            line.Y2 = point.Y;
            line.StrokeThickness = Thickness;
            line.Stroke          = Color;
            lines.Add(line);

            if (!HideHorizontal)
            {
                container.Children.Add(line);
            }
            BracketPoint newpoint = new BracketPoint(line.X2, line.Y2);

            return(newpoint);
        }
Example #2
0
        private BracketPointPair AddPair(BracketPoint startpoint)
        {
            BracketPointPair newPoints = WidthLine(startpoint);
            BracketPointPair pair      = new BracketPointPair(LenghtLine(newPoints.point1), LenghtLine(newPoints.point2));

            return(pair);
        }
Example #3
0
        private BracketPointPair WidthLine(BracketPoint startPoint)
        {
            Line line = new Line();

            line.X1 = startPoint.X;
            line.X2 = startPoint.X;
            line.Y1 = startPoint.Y + currentHeight / 2;
            line.Y2 = line.Y1 - currentHeight;
            line.StrokeThickness = Thickness;
            line.Stroke          = Color;
            lines.Add(line);

            if (!HideVertical)
            {
                container.Children.Add(line);
            }
            BracketPointPair pair = new BracketPointPair(new BracketPoint(line.X1, line.Y1), new BracketPoint(line.X2, line.Y2));

            return(pair);
        }
Example #4
0
        private void ScoreLabel(int index, BracketPoint point, bool up)
        {
            Scores[index].FontColor  = ExampleLabel.FontColor;
            Scores[index].FontSize   = ExampleLabel.FontSize;
            Scores[index].FontFamily = ExampleLabel.FontFamily;
            Scores[index].FontWeight = ExampleLabel.FontWeight;
            Scores[index].FontStyle  = ExampleLabel.FontStyle;

            if (up)
            {
                Scores[index].X = point.X + OffsetX + ScoreOffset;
                Scores[index].Y = point.Y - ExampleLabel.FontSize * 1.5 - OffsetY;
            }
            else
            {
                Scores[index].X = point.X + OffsetX + ScoreOffset;
                Scores[index].Y = point.Y + OffsetY;
            }
            Scores[index].Visibility = Visibility.Visible;
        }
Example #5
0
 private void NameLabel(int index, BracketPoint point, bool up)
 {
     Names[index].FontColor  = ExampleLabel.FontColor;
     Names[index].FontSize   = ExampleLabel.FontSize;
     Names[index].FontFamily = ExampleLabel.FontFamily;
     Names[index].FontWeight = ExampleLabel.FontWeight;
     Names[index].FontStyle  = ExampleLabel.FontStyle;
     Names[index].Width      = BracketWidth;
     if (up)
     {
         Names[index].X = point.X - BracketWidth + OffsetX;
         Names[index].Y = point.Y - ExampleLabel.FontSize * 1.5 - OffsetY;
     }
     else
     {
         Names[index].X = point.X - BracketWidth + OffsetX;
         Names[index].Y = point.Y + OffsetY;
     }
     Names[index].Visibility = Visibility.Visible;
 }
Example #6
0
 public BracketPointPair(BracketPoint point1, BracketPoint point2)
 {
     this.point1 = point1;
     this.point2 = point2;
 }