<commit_before>﻿using System;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Controls;
using System.Windows.Ink;
using System.Windows.Media;
using System.Windows.Shapes;

namespace BBT
{
    class Ellipse : IForm
    {
        Grid IForm.getStrokeFromNode(ANode node)
        {
            Grid ellipse = new Grid();
            ellipse.Height = node.getRectangle().Height;
            ellipse.Width = node.getRectangle().Width;
            Rectangle zeichnung = new Rectangle();
            zeichnung.RadiusX = ellipse.Width;
            zeichnung.RadiusY = ellipse.Height/2;
            SolidColorBrush farbe = new SolidColorBrush(Color.FromRgb(100, 100, 100)); //new SolidColorBrush(node.getStyle().getColor().Item1);

            if (node.getStyle().getColor().Item2)
            {
                zeichnung.Fill = farbe;
                zeichnung.Stroke = new SolidColorBrush(Color.FromRgb(0, 0, 0));
                zeichnung.StrokeThickness = 2;
                ellipse.Children.Add(zeichnung);
            }
            else
            {
                zeichnung.Stroke = farbe;
                zeichnung.StrokeThickness = 2;
                ellipse.Children.Add(zeichnung);
            }

            StackPanel textPanel = new StackPanel();
            textPanel.Orientation = Orientation.Horizontal;
            textPanel.HorizontalAlignment = System.Windows.HorizontalAlignment.Center;
            textPanel.VerticalAlignment = System.Windows.VerticalAlignment.Center;
            TextBlock text = new TextBlock();
            text.Text = node.getText();
                  
            textPanel.Children.Add(text);
            ellipse.Children.Add(textPanel);

            return ellipse;
        }

        public override string ToString()
        {
            return "Ellipse";
        }
    }
}<commit_msg>Ellipse.cs     benutzt icon     background für grid<commit_after>﻿using System;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Controls;
using System.Windows.Ink;
using System.Windows.Media;
using System.Windows.Shapes;

namespace BBT
{
    class Ellipse : IForm
    {
        Grid IForm.getStrokeFromNode(ANode node)
        {
            Grid ellipse = new Grid();
            ellipse.Background = new SolidColorBrush(Color.FromArgb(0, 0, 0, 0));
            ellipse.Height = node.getRectangle().Height;
            ellipse.Width = node.getRectangle().Width;
            Rectangle zeichnung = new Rectangle();
            zeichnung.RadiusX = ellipse.Width;
            zeichnung.RadiusY = ellipse.Height/2;
            SolidColorBrush farbe = new SolidColorBrush(node.getStyle().getColor().Item1);

            if (node.getStyle().getColor().Item2)
            {
                zeichnung.Fill = farbe;
                zeichnung.Stroke = new SolidColorBrush(Color.FromRgb(0, 0, 0));
                zeichnung.StrokeThickness = 2;
                ellipse.Children.Add(zeichnung);
            }
            else
            {
                zeichnung.Stroke = farbe;
                zeichnung.StrokeThickness = 2;
                ellipse.Children.Add(zeichnung);
            }

            StackPanel textPanel = new StackPanel();
            textPanel.Orientation = Orientation.Horizontal;
            textPanel.HorizontalAlignment = System.Windows.HorizontalAlignment.Center;
            textPanel.VerticalAlignment = System.Windows.VerticalAlignment.Center;

            if (node.getStyle().getIcon() != null)
            {
                Image bild = new Image();
                bild.Source = node.getStyle().getIcon();
                bild.Width = node.getRectangle().Width / 4;
                bild.Height = node.getRectangle().Width / 4;
                bild.HorizontalAlignment = System.Windows.HorizontalAlignment.Center;
                bild.VerticalAlignment = System.Windows.VerticalAlignment.Center;
                textPanel.Children.Add(bild);
            }

            TextBlock text = new TextBlock();
            text.FontSize = node.getStyle().getFontsize();
            text.HorizontalAlignment = System.Windows.HorizontalAlignment.Center;
            text.VerticalAlignment = System.Windows.VerticalAlignment.Center;

           
            text.Text = node.getText();
                  
            textPanel.Children.Add(text);
            ellipse.Children.Add(textPanel);

            return ellipse;
        }

        public override string ToString()
        {
            return "Ellipse";
        }
    }
}
{'fraction_non_alphanumeric': 0.09648351648351648, 'fraction_numerical': 0.006813186813186814, 'mean_word_length': 1.830223880597015, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5953223', 'n_tokens_mistral': 1275, 'n_tokens_neox': 1222, 'n_words': 217}