aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/FSE/Modules/Tango.FSE.Diagnostics/Project/Widgets/RealTimeGraphMultiChannel/RealTimeGraphMultiChannelWidgetSettingsView.xaml
blob: 451f6fa03dc83f14c25dc96dfbc97458fde71265 (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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<UserControl x:Class="Tango.FSE.Diagnostics.Project.Widgets.RealTimeGraphMultiChannel.RealTimeGraphMultiChannelWidgetSettingsView"
             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:material="http://materialdesigninxaml.net/winfx/xaml/themes"
             xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
             xmlns:controls="clr-namespace:Tango.FSE.Common.Controls;assembly=Tango.FSE.Common"
             xmlns:colorPicker="clr-namespace:Tango;assembly=Tango.ColorPicker"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:Tango.FSE.Diagnostics.Project.Widgets.RealTimeGraphMultiChannel"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="600" d:DataContext="{d:DesignInstance Type=local:RealTimeGraphMultiChannelWidget,IsDesignTimeCreatable=False}">
    <Grid>
        <StackPanel>

            <controls:FSEGroupBox Header="DURATION" HeaderFontSize="{StaticResource FSE_SmallFontSize}">
                <StackPanel>
                    <DockPanel>
                        <TextBlock DockPanel.Dock="Right" FontSize="{StaticResource FSE_SmallerFontSize}"  Text="{Binding Settings.Duration,Mode=OneWay}" />
                        <TextBlock FontSize="{StaticResource FSE_SmallerFontSize}">Maximum Visible Time</TextBlock>
                    </DockPanel>
                    <Slider Margin="0 5 0 0" Minimum="10" Maximum="3600" IsSnapToTickEnabled="True" Value="{Binding Settings.Duration,Converter={StaticResource TimeSpanToSecondsConverter},Mode=TwoWay}"></Slider>
                </StackPanel>
            </controls:FSEGroupBox>

            <controls:FSEGroupBox Margin="0 10 0 0" Header="RANGE" HeaderFontSize="{StaticResource FSE_SmallFontSize}">
                <StackPanel>
                    <DockPanel>
                        <StackPanel Margin="0 -5 0 0" DockPanel.Dock="Right" Orientation="Horizontal">
                            <TextBox Width="70" Style="{StaticResource FSE_Rounded_Corners_TextBox}" FontSize="{StaticResource FSE_SmallerFontSize}" Text="{Binding Settings.Min}"></TextBox>
                            <TextBlock Margin="5 0">-</TextBlock>
                            <TextBox Width="70" Style="{StaticResource FSE_Rounded_Corners_TextBox}" FontSize="{StaticResource FSE_SmallerFontSize}" Text="{Binding Settings.Max}"></TextBox>
                        </StackPanel>
                        <TextBlock FontSize="{StaticResource FSE_SmallerFontSize}" >Y Min/Max</TextBlock>
                    </DockPanel>
                    <mahapps:RangeSlider Margin="0 5 0 0" 
                                         Minimum="-100000" 
                                         Interval="1"
                                         Maximum="100000"
                                         SmallChange="1"
                                         IsSnapToTickEnabled="True"
                                         AutoToolTipPlacement="None"
                                         LowerValue="{Binding Settings.Min,UpdateSourceTrigger=PropertyChanged}"
                                         UpperValue="{Binding Settings.Max,UpdateSourceTrigger=PropertyChanged}"/>

                    <CheckBox FontSize="{StaticResource FSE_SmallFontSize}" Margin="0 10 0 0" IsChecked="{Binding Settings.AutoRange}">Auto Range</CheckBox>
                </StackPanel>
            </controls:FSEGroupBox>

            <controls:FSEGroupBox Header="FORMAT" Margin="0 10 0 0" HeaderFontSize="{StaticResource FSE_SmallFontSize}">
                <StackPanel>
                    <TextBlock FontSize="{StaticResource FSE_SmallerFontSize}" >Decimal Places</TextBlock>
                    <mahapps:NumericUpDown Minimum="0" Maximum="3" Focusable="False" Value="{Binding Settings.DecimalPlaces,UpdateSourceTrigger=PropertyChanged}" />
                </StackPanel>
            </controls:FSEGroupBox>

            <controls:FSEGroupBox Header="VISIBILITY" Margin="0 10 0 0" HeaderFontSize="{StaticResource FSE_SmallFontSize}">
                <Border TextElement.FontSize="{StaticResource FSE_SmallFontSize}">
                    <ItemsControl ItemsSource="{Binding Controller.DataSeriesCollection}">
                        <ItemsControl.ItemTemplate>
                            <DataTemplate>
                                <ToggleButton IsChecked="{Binding IsVisible}" Cursor="Hand">
                                    <ToggleButton.Template>
                                        <ControlTemplate>
                                            <StackPanel Orientation="Horizontal" Margin="0 2" Background="Transparent">
                                                <Ellipse Width="10" Height="10">
                                                    <Ellipse.Style>
                                                        <Style TargetType="Ellipse">
                                                            <Setter Property="Fill" Value="Black"></Setter>
                                                            <Style.Triggers>
                                                                <DataTrigger Binding="{Binding IsVisible}" Value="True">
                                                                    <Setter Property="Fill">
                                                                        <Setter.Value>
                                                                            <SolidColorBrush Color="{Binding Stroke}" />
                                                                        </Setter.Value>
                                                                    </Setter>
                                                                </DataTrigger>
                                                            </Style.Triggers>
                                                        </Style>
                                                    </Ellipse.Style>
                                                </Ellipse>
                                                <TextBlock Margin="5 0 0 0" Text="{Binding Name}">
                                                    <TextBlock.Foreground>
                                                        <SolidColorBrush Color="{Binding Stroke}" />
                                                    </TextBlock.Foreground>
                                                </TextBlock>
                                            </StackPanel>
                                        </ControlTemplate>
                                    </ToggleButton.Template>
                                </ToggleButton>
                            </DataTemplate>
                        </ItemsControl.ItemTemplate>
                    </ItemsControl>
                </Border>
            </controls:FSEGroupBox>

            <Button Style="{StaticResource FSE_RaisedButton_Dark_Hover}" Margin="0 20 0 0" Height="50" material:ButtonAssist.CornerRadius="25" Command="{Binding ClearCommand}">CLEAR</Button>
        </StackPanel>
    </Grid>
</UserControl>