<commit_before>﻿<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:drawingBoard1="clr-namespace:Dexel.Editor.ViewModels.DrawingBoard"
    xmlns:drawingBoard="clr-namespace:Dexel.Editor.Views.UserControls.DrawingBoard"
    x:Class="Dexel.Editor.Views.UserControls.DrawingBoard.FunctionUnitView"
    x:Name="TheFunctionUnit"
    d:DataContext="{d:DesignInstance drawingBoard1:FunctionUnitViewModel, IsDesignTimeCreatable=True}"
    mc:Ignorable="d">

    <UserControl.Resources>
        <ContextMenu x:Key="MyContextMenu">
            <!--<MenuItem Header="Add New Input" Click="NewInput_click" />-->
            <MenuItem Header="Add New Output" Click="NewOutput_click" />
            <Separator />
            <MenuItem Header="Make to Integration of (pick)" Click="MakeIntegration_OnClick" />
            <MenuItem Header="Remove from Integration" Click="RemoveFromIntegration_OnClick" />
            <Separator />

            <MenuItem Header="Copy" Click="Copy_click" />
            <!--<MenuItem Header="Cut" Click="Cut_click" />-->
            <MenuItem Header="Delete" Click="Delete_click" />
        </ContextMenu>
        
        <ContextMenu x:Key="MyContextMenuOutput">
            <MenuItem Header="Delete Data Stream" Click="DeleteDataStreamDefinition"  />
        </ContextMenu>

        <ContextMenu x:Key="ContextMenuInput">
        </ContextMenu>

    </UserControl.Resources>
    <Grid>
        <ItemsControl MinHeight="35" x:Name="InputFlow"                               
                      HorizontalAlignment="Left"
                      VerticalAlignment="Center"
                      ItemsSource="{Binding Inputs}" RenderTransformOrigin="0.5,0.5">
            <ItemsControl.RenderTransform>
                <TransformGroup>
                    <ScaleTransform />
                    <SkewTransform />
                    <RotateTransform />
                    <TranslateTransform
                        X="{Binding ActualWidth, ConverterParameter=-1, Converter={StaticResource PercentageConverter}, Mode=OneWay, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ItemsControl}}}" />
                </TransformGroup>
            </ItemsControl.RenderTransform>
            <ItemsControl.Resources>
                <DataTemplate DataType="{x:Type drawingBoard1:DangelingConnectionViewModel}">
                    <drawingBoard:DangelingConnectionView 
                            ContextMenu="{StaticResource ContextMenuInput}"
                            x:Name="DangelingConnectionViews" />
                </DataTemplate>
                <DataTemplate DataType="{x:Type drawingBoard1:ConnectionAdapterViewModel}">
                    <drawingBoard:ConnectionAdapterView x:Name="ConnectionAdapterView" />
                </DataTemplate>
            </ItemsControl.Resources>
        </ItemsControl>

        <StackPanel
            ContextMenu="{StaticResource MyContextMenu}"
            MinHeight="60"
            Orientation="Horizontal">
            <drawingBoard:FunctionUnitBody x:Name="Fu"
                                       Focusable="False"
                                       LabelContent="{Binding Model.Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
            <ItemsControl VerticalAlignment="Center"                         
                          HorizontalAlignment="Center" Panel.ZIndex="20"
                          x:Name="OutputFlow" ItemsSource="{Binding Outputs, Mode=TwoWay}" >
                <ItemsControl.Resources><commit_msg>Removed Input ConnectionadapterView<commit_after>﻿<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:drawingBoard1="clr-namespace:Dexel.Editor.ViewModels.DrawingBoard"
    xmlns:drawingBoard="clr-namespace:Dexel.Editor.Views.UserControls.DrawingBoard"
    x:Class="Dexel.Editor.Views.UserControls.DrawingBoard.FunctionUnitView"
    x:Name="TheFunctionUnit"
    d:DataContext="{d:DesignInstance drawingBoard1:FunctionUnitViewModel, IsDesignTimeCreatable=True}"
    mc:Ignorable="d">

    <UserControl.Resources>
        <ContextMenu x:Key="MyContextMenu">
            <!--<MenuItem Header="Add New Input" Click="NewInput_click" />-->
            <MenuItem Header="Add New Output" Click="NewOutput_click" />
            <Separator />
            <MenuItem Header="Make to Integration of (pick)" Click="MakeIntegration_OnClick" />
            <MenuItem Header="Remove from Integration" Click="RemoveFromIntegration_OnClick" />
            <Separator />

            <MenuItem Header="Copy" Click="Copy_click" />
            <!--<MenuItem Header="Cut" Click="Cut_click" />-->
            <MenuItem Header="Delete" Click="Delete_click" />
        </ContextMenu>
        
        <ContextMenu x:Key="MyContextMenuOutput">
            <MenuItem Header="Delete Data Stream" Click="DeleteDataStreamDefinition"  />
        </ContextMenu>

        <ContextMenu x:Key="ContextMenuInput">
        </ContextMenu>

    </UserControl.Resources>
    <Grid>
        <ItemsControl MinHeight="35" x:Name="InputFlow"                               
                      HorizontalAlignment="Left"
                      VerticalAlignment="Center"
                      ItemsSource="{Binding Inputs}" RenderTransformOrigin="0.5,0.5">
            <ItemsControl.RenderTransform>
                <TransformGroup>
                    <ScaleTransform />
                    <SkewTransform />
                    <RotateTransform />
                    <TranslateTransform
                        X="{Binding ActualWidth, ConverterParameter=-1, Converter={StaticResource PercentageConverter}, Mode=OneWay, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type ItemsControl}}}" />
                </TransformGroup>
            </ItemsControl.RenderTransform>
            <ItemsControl.Resources>
                <DataTemplate DataType="{x:Type drawingBoard1:DangelingConnectionViewModel}">
                    <drawingBoard:DangelingConnectionView 
                            ContextMenu="{StaticResource ContextMenuInput}"
                            x:Name="DangelingConnectionViews" />
                </DataTemplate>
                <DataTemplate DataType="{x:Type drawingBoard1:ConnectionAdapterViewModel}">
                    
                </DataTemplate>
            </ItemsControl.Resources>
        </ItemsControl>

        <StackPanel
            ContextMenu="{StaticResource MyContextMenu}"
            MinHeight="60"
            Orientation="Horizontal">
            <drawingBoard:FunctionUnitBody x:Name="Fu"
                                       Focusable="False"
                                       LabelContent="{Binding Model.Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
            <ItemsControl VerticalAlignment="Center"                         
                          HorizontalAlignment="Center" Panel.ZIndex="20"
                          x:Name="OutputFlow" ItemsSource="{Binding Outputs, Mode=TwoWay}" >
                <ItemsControl.Resources>
{'fraction_non_alphanumeric': 0.11062124248496993, 'fraction_numerical': 0.008283233132932532, 'mean_word_length': 2.210120068610635, 'pattern_counts': {'":': 0, '<': 90, '<?xml version=': 0, '>': 90, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 14}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3437919', 'n_tokens_mistral': 1950, 'n_tokens_neox': 1797, 'n_words': 253}