aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/SideChains/RealTimeGraphX/EventArguments/InputChangedEventArgs.cs
blob: 8a75e67af3283e8e270a621e7d85e207a5d78197 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RealTimeGraphX.EventArguments
{
    /// <summary>
    /// Represents an input <see cref="IGraphComponent"/> change event arguments.
    /// </summary>
    /// <typeparam name="TIn">The type of the input component.</typeparam>
    /// <seealso cref="System.EventArgs" />
    public class InputChangedEventArgs<TIn> : EventArgs where TIn : IGraphComponent
    {
        /// <summary>
        /// Gets or sets the input graph component.
        /// </summary>
        public TIn Input { get; set; }

        /// <summary>
        /// Initializes a new instance of the <see cref="InputChangedEventArgs{TIn}"/> class.
        /// </summary>
        /// <param name="input">The input.</param>
        public InputChangedEventArgs(TIn input)
        {
            Input = input;
        }
    }
}
nfx/2006/xaml" xmlns:Converters="clr-namespace:Tango.Visuals.Converters" xmlns:local="clr-namespace:Tango.Visuals"> <Style TargetType="{x:Type local:MetroWindowControl}"> <Style.Resources> <!--Converters--> <Converters:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" /> <Converters:NullToVisibilityConverter x:Key="NullToVisibilityConverter" /> <!--Brushes--> <SolidColorBrush x:Key="TitleBackground" Color="#252525"></SolidColorBrush> <SolidColorBrush x:Key="Background" Color="#303030"></SolidColorBrush> <SolidColorBrush x:Key="TitleForeground" Color="Gainsboro"></SolidColorBrush> <SolidColorBrush x:Key="TitleControlsHoverBrush" Color="#404040"></SolidColorBrush> <SolidColorBrush x:Key="TitleControlsPressedBrush" Color="#353535"></SolidColorBrush> <SolidColorBrush x:Key="TitleInactiveBackground" Color="#505050"></SolidColorBrush> <SolidColorBrush x:Key="BorderActiveBrush" Color="#252525"></SolidColorBrush> <SolidColorBrush x:Key="BorderInactiveBrush" Color="#505050"></SolidColorBrush> <!--Templates--> <DataTemplate x:Key="TitleTemplate"> <StackPanel Orientation="Horizontal"> <Image IsHitTestVisible="False" RenderOptions.BitmapScalingMode="Fant" VerticalAlignment="Center" Source="{Binding RelativeSource={RelativeSource AncestorType=Window},Path=Icon}" MaxHeight="{Binding ElementName=PART_GridTitle,Path=Height}" Margin="5 5 0 5" Visibility="{Binding RelativeSource={RelativeSource AncestorType=Window},Path=Icon,Converter={StaticResource NullToVisibilityConverter}}"></Image> <TextBlock IsHitTestVisible="False" Text="{Binding RelativeSource={RelativeSource AncestorType=Window},Path=Title}" FontSize="{Binding RelativeSource={RelativeSource AncestorType=local:MetroWindowControl},Path=TitleFontSize,TargetNullValue=12}" Padding="10 5 5 5" VerticalAlignment="Center" Foreground="{Binding RelativeSource={RelativeSource AncestorType=local:MetroWindowControl},Path=TitleForeground,TargetNullValue={StaticResource TitleForeground},FallbackValue={StaticResource TitleForeground}}"></TextBlock> </StackPanel> </DataTemplate> </Style.Resources> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type local:MetroWindowControl}"> <Grid> <Grid x:Name="PART_MainGrid" Background="{Binding RelativeSource={RelativeSource Mode=TemplatedParent},Path=Background,TargetNullValue={StaticResource Background}, FallbackValue={StaticResource Background}}"> <Border BorderThickness="1" BorderBrush="{Binding ElementName=PART_MainGrid,Path=Background}"> <Border.Effect> <DropShadowEffect ShadowDepth="0" Color="Black" Opacity="1" BlurRadius="{TemplateBinding BlurRadius}"></DropShadowEffect> </Border.Effect> </Border> <Grid Background="{Binding ElementName=PART_MainGrid,Path=Background}"> <DockPanel LastChildFill="True"> <Grid x:Name="PART_GridTitle" Height="{Binding RelativeSource={RelativeSource Mode=TemplatedParent},Path=TitleHeight,FallbackValue=35}" MinHeight="20" DockPanel.Dock="Top"> <Grid.Style> <Style TargetType="Grid"> <Setter Property="Background" Value="{Binding RelativeSource={RelativeSource Mode=TemplatedParent},Path=TitleBackground,TargetNullValue={StaticResource TitleBackground}, FallbackValue={StaticResource TitleBackground}}"></Setter> <Style.Triggers> <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=Window},Path=IsActive}" Value="False"> <Setter Property="Background" Value="{Binding RelativeSource={RelativeSource Mode=TemplatedParent},Path=TitleInactiveBackground,TargetNullValue={StaticResource TitleInactiveBackground},FallbackValue={StaticResource TitleInactiveBackground}}"></Setter> </DataTrigger> </Style.Triggers> </Style> </Grid.Style> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="*"/> <ColumnDefinition Width="Auto"/> </Grid.ColumnDefinitions> <Grid> <Thumb x:Name="PART_ThumbMove" Opacity="0"></Thumb> <ContentControl ContentTemplate="{Binding RelativeSource={RelativeSource Mode=TemplatedParent},Path=TitleTemplate,TargetNullValue={StaticResource TitleTemplate},FallbackValue={StaticResource TitleTemplate}}"></ContentControl> </Grid> <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Grid.Column="1"> <StackPanel.Resources> <Style x:Key="titleBarButton" TargetType="{x:Type Button}"> <Setter Property="Background" Value="Transparent"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type Button}"> <Border Background="{TemplateBinding Background}"> <ContentPresenter HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/> </Border> </ControlTemplate> </Setter.Value> </Setter> <Style.Triggers> <Trigger Property="IsMouseOver" Value="True"> <Setter Property="Background" Value="{Binding RelativeSource={RelativeSource Mode=TemplatedParent},Path=TitleControlsHoverBrush,TargetNullValue={StaticResource TitleControlsHoverBrush},FallbackValue={StaticResource TitleControlsHoverBrush}}"></Setter> </Trigger> <Trigger Property="IsPressed" Value="True"> <Setter Property="Background" Value="{Binding RelativeSource={RelativeSource Mode=TemplatedParent},Path=TitleControlsPressedBrush,TargetNullValue={StaticResource TitleControlsPressedBrush},FallbackValue={StaticResource TitleControlsPressedBrush}}"></Setter> </Trigger> </Style.Triggers> </Style> </StackPanel.Resources> <Button x:Name="PART_ButtonMinimize" Style="{StaticResource titleBarButton}" Width="{Binding ElementName=PART_GridTitle,Path=Height}" Visibility="{Binding RelativeSource={RelativeSource Mode=TemplatedParent},Path=ShowMinimizeButton,Converter={StaticResource BooleanToVisibilityConverter}}"> <Viewbox Width="10"> <Path Data="m 0 775.88763 1229.8352 0 0 286.00817 -1229.8352 0 z m 457.61307 -167.93933 71.50204 0 0 66.73524 -71.50204 0 z" Fill="{Binding RelativeSource={RelativeSource Mode=TemplatedParent},Path=TitleForeground,TargetNullValue={StaticResource TitleForeground},FallbackValue={StaticResource TitleForeground}}"></Path> </Viewbox> </Button> <Button x:Name="PART_ButtonMaximize" Style="{StaticResource titleBarButton}" Width="{Binding ElementName=PART_GridTitle,Path=Height}" Visibility="{Binding RelativeSource={RelativeSource Mode=TemplatedParent},Path=ShowMaximizeButton,Converter={StaticResource BooleanToVisibilityConverter}}"> <Viewbox Width="10" ClipToBounds="False"> <Path> <Path.Style> <Style TargetType="Path"> <Setter Property="RenderTransformOrigin" Value="0.5,0.5"></Setter> <Setter Property="Fill" Value="{Binding RelativeSource={RelativeSource Mode=TemplatedParent},Path=TitleForeground,TargetNullValue={StaticResource TitleForeground},FallbackValue={StaticResource TitleForeground}}"></Setter> <Setter Property="Data" Value="m 0 2.369 0 339.601 344.339 0 0 -339.601 z m 334.396 329.675 -324.446 0 0 -256.822 324.445 0 0 256.822 z"/> <Style.Triggers> <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=Window},Path=WindowState}" Value="Maximized"> <Setter Property="Data" Value="m 5.267 9.188 0 0.669 0 5.413 0 12.295 21.383 0 0 -12.295 0 -5.413 0 -0.669 -21.383 0 z m 20.314 17.307 -19.246 0 0 -11.225 19.245 0 0.001 11.225 0 0 z m 19.477051 6.081 0 2.059 1.069 0 0 -2.059 0 -5.413 0 -0.668 -21.3840001 0 0 0.668 0 5.413 0 12.296 3.193 0 0 -1.07 -2.12400005 0 0 -11.226 z"></Setter> <Setter Property="RenderTransform"> <Setter.Value> <TransformGroup> <ScaleTransform ScaleX="-1" ScaleY="1"></ScaleTransform> <ScaleTransform ScaleX="1.5" ScaleY="1.5"></ScaleTransform> </TransformGroup> </Setter.Value> </Setter> </DataTrigger> </Style.Triggers> </Style> </Path.Style> </Path> </Viewbox> </Button> <Button x:Name="PART_ButtonClose" Style="{StaticResource titleBarButton}" Width="{Binding ElementName=PART_GridTitle,Path=Height}" Visibility="{Binding RelativeSource={RelativeSource Mode=TemplatedParent},Path=ShowCloseButton,Converter={StaticResource BooleanToVisibilityConverter}}"> <Viewbox Width="10"> <Polygon Points="357,35.7 321.3,0 178.5,142.8 35.7,0 0,35.7 142.8,178.5 0,321.3 35.7,357 178.5,214.2 321.3,357 357,321.3 214.2,178.5" Fill="{Binding RelativeSource={RelativeSource Mode=TemplatedParent},Path=TitleForeground,TargetNullValue={StaticResource TitleForeground},FallbackValue={StaticResource TitleForeground}}"></Polygon> </Viewbox> </Button> </StackPanel> </Grid> </Grid> <Grid> <ContentPresenter Content="{TemplateBinding Content}"></ContentPresenter> <Grid IsEnabled="{Binding RelativeSource={RelativeSource Mode=TemplatedParent},Path=AllowResize}"> <Thumb x:Name="PART_ThumbResizeRight" Opacity="0" HorizontalAlignment="Right" Width="2" Cursor="SizeWE"></Thumb> <Thumb x:Name="PART_ThumbResizeBottom" Opacity="0" VerticalAlignment="Bottom" Height="2" Cursor="SizeNS" ></Thumb> <Thumb x:Name="PART_ThumbResizeBottomRight1" Opacity="0" HorizontalAlignment="Right" VerticalAlignment="Bottom" Width="10" Height="2" Cursor="SizeNWSE" ></Thumb> <Thumb x:Name="PART_ThumbResizeBottomRight2" Opacity="0" HorizontalAlignment="Right" VerticalAlignment="Bottom" Width="2" Height="10" Cursor="SizeNWSE" ></Thumb> </Grid> </Grid> </DockPanel> <Border x:Name="border" BorderThickness="{Binding RelativeSource={RelativeSource Mode=TemplatedParent},Path=BorderThickness}" IsHitTestVisible="False"> <Border.Style> <Style TargetType="Border"> <Setter Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource Mode=TemplatedParent},Path=BorderActiveBrush,FallbackValue={StaticResource BorderActiveBrush},TargetNullValue={StaticResource BorderActiveBrush}}"></Setter> <Style.Triggers> <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=Window},Path=IsActive}" Value="False"> <Setter Property="BorderBrush" Value="{Binding RelativeSource={RelativeSource Mode=TemplatedParent},Path=BorderInactiveBrush,FallbackValue={StaticResource BorderInactiveBrush},TargetNullValue={StaticResource BorderInactiveBrush}}"></Setter> </DataTrigger> </Style.Triggers> </Style> </Border.Style> </Border> </Grid> </Grid> </Grid> </ControlTemplate> </Setter.Value> </Setter> </Style> </ResourceDictionary>