123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703 |
- <UserControl
- x:Class="ShakerApp.Views.SweepConfigView"
- xmlns="https://github.com/avaloniaui"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="using:ShakerApp"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:model="using:Shaker.Models"
- xmlns:oxy="http://oxyplot.org/avalonia"
- xmlns:suki="https://github.com/kikipoulet/SukiUI"
- xmlns:view="using:ShakerApp.Views"
- xmlns:vm="using:ShakerApp.ViewModels"
- d:DesignHeight="450"
- d:DesignWidth="800"
- x:DataType="vm:SweepConfigViewModel"
- DataContext="{Binding Source={x:Static vm:SweepConfigViewModel.Instance}}"
- mc:Ignorable="d">
- <UserControl.Resources>
- <x:Double x:Key="MyConverterParameter">80</x:Double>
- </UserControl.Resources>
- <Grid RowDefinitions="1.2*,*">
- <Grid ColumnDefinitions="*,*,*">
- <oxy:PlotView Background="Transparent" Model="{Binding AccelerationModel}">
- <oxy:PlotView.DefaultTrackerTemplate>
- <ControlTemplate>
- <oxy:TrackerControl
- Background="#6F999999"
- BorderBrush="Transparent"
- CornerRadius="6"
- HorizontalLineVisibility="False"
- LineExtents="{Binding PlotModel.PlotArea}"
- LineStroke="Gray"
- Position="{Binding Position}"
- ShowPointer="True"
- VerticalLineVisibility="True">
- <oxy:TrackerControl.Content>
- <StackPanel Margin="10">
- <TextBlock Text="{DynamicResource Value}" />
- <TextBlock>
- <Run Text="{Binding XAxis.Title}" />
- <Run Text=":" />
- <Run Text="{Binding TrackerDatas[0].DataPoint.X, StringFormat='{}{0:F2}'}" />
- <Run Text="{Binding XAxis.Unit}" />
- </TextBlock>
- <ItemsControl ItemsSource="{Binding TrackerDatas}">
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <TextBlock IsVisible="{Binding Series.IsVisible}">
- <Run Text="{Binding Series.Title}" />
- <Run Text=":" />
- <Run Text="{Binding DataPoint.Y, StringFormat='{}{0:F4}'}" />
- <Run Text="{Binding $parent[ItemsControl].DataContext.YAxis.Unit}" />
- </TextBlock>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
- </StackPanel>
- </oxy:TrackerControl.Content>
- </oxy:TrackerControl>
- </ControlTemplate>
- </oxy:PlotView.DefaultTrackerTemplate>
- </oxy:PlotView>
- <Button
- Margin="0,0,16,56"
- HorizontalAlignment="Right"
- VerticalAlignment="Bottom"
- Classes="Basic"
- Cursor="Hand">
- <Interaction.Behaviors>
- <EventTriggerBehavior EventName="Click">
- <InvokeCommandAction Command="{Binding Source={x:Static vm:PlotConfigViewModel.Instance}, Path=PlotConfigCommand}" CommandParameter="{Binding AccelerationModel}" />
- </EventTriggerBehavior>
- </Interaction.Behaviors>
- <PathIcon Background="Transparent" Data="{StaticResource SettingGeometry}">
- <PathIcon.Styles>
- <Style Selector="PathIcon:pointerover">
- <Setter Property="Foreground" Value="Black" />
- </Style>
- <Style Selector="PathIcon">
- <Setter Property="Foreground" Value="#AAAAAAAA" />
- </Style>
- </PathIcon.Styles>
- </PathIcon>
- </Button>
- <oxy:PlotView
- Grid.Column="1"
- Background="Transparent"
- Model="{Binding VelocityModel}">
- <oxy:PlotView.DefaultTrackerTemplate>
- <ControlTemplate>
- <oxy:TrackerControl
- Background="#6F999999"
- BorderBrush="Transparent"
- CornerRadius="6"
- HorizontalLineVisibility="False"
- LineExtents="{Binding PlotModel.PlotArea}"
- LineStroke="Gray"
- Position="{Binding Position}"
- ShowPointer="True"
- VerticalLineVisibility="True">
- <oxy:TrackerControl.Content>
- <StackPanel Margin="10">
- <TextBlock Text="{DynamicResource Value}" />
- <TextBlock>
- <Run Text="{Binding XAxis.Title}" />
- <Run Text=":" />
- <Run Text="{Binding TrackerDatas[0].DataPoint.X, StringFormat='{}{0:F2}'}" />
- <Run Text="{Binding XAxis.Unit}" />
- </TextBlock>
- <ItemsControl ItemsSource="{Binding TrackerDatas}">
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <TextBlock IsVisible="{Binding Series.IsVisible}">
- <Run Text="{Binding Series.Title}" />
- <Run Text=":" />
- <Run Text="{Binding DataPoint.Y, StringFormat='{}{0:F4}'}" />
- <Run Text="{Binding $parent[ItemsControl].DataContext.YAxis.Unit}" />
- </TextBlock>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
- </StackPanel>
- </oxy:TrackerControl.Content>
- </oxy:TrackerControl>
- </ControlTemplate>
- </oxy:PlotView.DefaultTrackerTemplate>
- </oxy:PlotView>
- <Button
- Grid.Column="1"
- Margin="0,0,16,56"
- HorizontalAlignment="Right"
- VerticalAlignment="Bottom"
- Classes="Basic"
- Cursor="Hand">
- <Interaction.Behaviors>
- <EventTriggerBehavior EventName="Click">
- <InvokeCommandAction Command="{Binding Source={x:Static vm:PlotConfigViewModel.Instance}, Path=PlotConfigCommand}" CommandParameter="{Binding VelocityModel}" />
- </EventTriggerBehavior>
- </Interaction.Behaviors>
- <PathIcon Background="Transparent" Data="{StaticResource SettingGeometry}">
- <PathIcon.Styles>
- <Style Selector="PathIcon:pointerover">
- <Setter Property="Foreground" Value="Black" />
- </Style>
- <Style Selector="PathIcon">
- <Setter Property="Foreground" Value="#AAAAAAAA" />
- </Style>
- </PathIcon.Styles>
- </PathIcon>
- </Button>
- <oxy:PlotView
- Grid.Column="2"
- Background="Transparent"
- Model="{Binding DisplacementModel}">
- <oxy:PlotView.DefaultTrackerTemplate>
- <ControlTemplate>
- <oxy:TrackerControl
- Background="#6F999999"
- BorderBrush="Transparent"
- CornerRadius="6"
- HorizontalLineVisibility="False"
- LineExtents="{Binding PlotModel.PlotArea}"
- LineStroke="Gray"
- Position="{Binding Position}"
- ShowPointer="True"
- VerticalLineVisibility="True">
- <oxy:TrackerControl.Content>
- <StackPanel Margin="10">
- <TextBlock Text="{DynamicResource Value}" />
- <TextBlock>
- <Run Text="{Binding XAxis.Title}" />
- <Run Text=":" />
- <Run Text="{Binding TrackerDatas[0].DataPoint.X, StringFormat='{}{0:F2}'}" />
- <Run Text="{Binding XAxis.Unit}" />
- </TextBlock>
- <ItemsControl ItemsSource="{Binding TrackerDatas}">
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <TextBlock IsVisible="{Binding Series.IsVisible}">
- <Run Text="{Binding Series.Title}" />
- <Run Text=":" />
- <Run Text="{Binding DataPoint.Y, StringFormat='{}{0:F4}'}" />
- <Run Text="{Binding $parent[ItemsControl].DataContext.YAxis.Unit}" />
- </TextBlock>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
- </StackPanel>
- </oxy:TrackerControl.Content>
- </oxy:TrackerControl>
- </ControlTemplate>
- </oxy:PlotView.DefaultTrackerTemplate>
- </oxy:PlotView>
- <Button
- Grid.Column="2"
- Margin="0,0,16,56"
- HorizontalAlignment="Right"
- VerticalAlignment="Bottom"
- Classes="Basic"
- Cursor="Hand">
- <Interaction.Behaviors>
- <EventTriggerBehavior EventName="Click">
- <InvokeCommandAction Command="{Binding Source={x:Static vm:PlotConfigViewModel.Instance}, Path=PlotConfigCommand}" CommandParameter="{Binding DisplacementModel}" />
- </EventTriggerBehavior>
- </Interaction.Behaviors>
- <PathIcon Background="Transparent" Data="{StaticResource SettingGeometry}">
- <PathIcon.Styles>
- <Style Selector="PathIcon:pointerover">
- <Setter Property="Foreground" Value="Black" />
- </Style>
- <Style Selector="PathIcon">
- <Setter Property="Foreground" Value="#AAAAAAAA" />
- </Style>
- </PathIcon.Styles>
- </PathIcon>
- </Button>
- </Grid>
- <TabControl Grid.Row="1">
- <TabItem Header="{DynamicResource SweepSpectrum}">
- <Grid RowDefinitions="*,56">
- <StackPanel
- Width="860"
- HorizontalAlignment="Left"
- VerticalAlignment="Top">
- <Grid
- Height="{StaticResource ItemHeight}"
- Background="LightGray"
- ColumnDefinitions="40,120,140,*,100,100,100,100">
- <TextBlock
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Text="{DynamicResource ServoValveIndex}" />
- <TextBlock
- Grid.Column="1"
- HorizontalAlignment="Center"
- VerticalAlignment="Center">
- <Run Text="{DynamicResource Frequency}" />
- <Run Text="(Hz)" />
- </TextBlock>
- <TextBlock
- Grid.Column="2"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Text="{DynamicResource SweepValueType}" />
- <TextBlock
- Grid.Column="3"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Text="{DynamicResource Value}" />
- <TextBlock
- Grid.Column="4"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Text="{DynamicResource UpStopAcceleration}" />
- <TextBlock
- Grid.Column="5"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Text="{DynamicResource UpWarnAcceleration}" />
- <TextBlock
- Grid.Column="6"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Text="{DynamicResource DownStopAcceleration}" />
- <TextBlock
- Grid.Column="7"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Text="{DynamicResource DownWarnAcceleration}" />
- </Grid>
- <TextBlock
- Height="1"
- Foreground="Transparent"
- Text="{Binding $parent.Bounds.Height}" />
- <ScrollViewer Height="{Binding $parent.Bounds.Height, Converter={StaticResource SubtractionConverter}, ConverterParameter={StaticResource ItemHeight}}">
- <ItemsControl ItemsSource="{Binding SweepItems}">
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <Grid ColumnDefinitions="40,120,140,*,100,100,100,100">
- <TextBlock
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Text="{Binding Index}" />
- <NumericUpDown
- Grid.Column="1"
- Increment="{Binding $parent[ItemsControl].DataContext.Increment}"
- Maximum="{Binding Source={x:Static vm:ShakerConfigViewModel.Instance}, Path=MaxFrequency}"
- Minimum="{Binding Source={x:Static vm:ShakerConfigViewModel.Instance}, Path=MinFrequency}"
- Value="{Binding Value.Frequency}" />
- <ComboBox
- Grid.Column="2"
- ItemsSource="{Binding Value.SweepValueType, Converter={StaticResource EnumToCollectionConverter}, Mode=OneTime}"
- SelectedValue="{Binding Path=Value.SweepValueType}"
- SelectedValueBinding="{Binding Value}">
- <ComboBox.ItemTemplate>
- <DataTemplate>
- <TextBlock Text="{local:ResourceBinding Key}" />
- </DataTemplate>
- </ComboBox.ItemTemplate>
- </ComboBox>
- <StackPanel
- Grid.Column="3"
- Margin="4,0,4,0"
- Orientation="Horizontal">
- <NumericUpDown
- Width="120"
- Increment="0.01"
- Minimum="0"
- Value="{Binding Value.Value}" />
- <TextBlock
- Margin="4,0,0,0"
- VerticalAlignment="Center"
- Classes.Displacement="{Binding Value.SweepValueType, Converter={StaticResource EnumToBooleanConverter}, ConverterParameter={x:Static model:SweepValueType.FixedDisplacement}}"
- Classes.DynamicAcceleration="{Binding Value.SweepValueType, Converter={StaticResource EnumToBooleanConverter}, ConverterParameter={x:Static model:SweepValueType.DynamicAcceleration}}"
- Classes.FixedAcceleration="{Binding Value.SweepValueType, Converter={StaticResource EnumToBooleanConverter}, ConverterParameter={x:Static model:SweepValueType.FixedAcceleration}}"
- Classes.Velocity="{Binding Value.SweepValueType, Converter={StaticResource EnumToBooleanConverter}, ConverterParameter={x:Static model:SweepValueType.FixedVelocity}}">
- <TextBlock.Styles>
- <Style Selector="TextBlock.Displacement">
- <Setter Property="Text" Value="mm" />
- </Style>
- <Style Selector="TextBlock.Velocity">
- <Setter Property="Text" Value="m/s" />
- </Style>
- <Style Selector="TextBlock.FixedAcceleration">
- <Setter Property="Text" Value="g" />
- </Style>
- <Style Selector="TextBlock.DynamicAcceleration">
- <Setter Property="Text" Value="g" />
- </Style>
- </TextBlock.Styles>
- </TextBlock>
- </StackPanel>
- <NumericUpDown
- Grid.Column="4"
- Margin="4,0,4,0"
- Increment="0.5"
- Minimum="{Binding Value.UpWarn}"
- Value="{Binding Value.UpStop}" />
- <NumericUpDown
- Grid.Column="5"
- Margin="4,0,4,0"
- Increment="0.5"
- Maximum="{Binding Value.UpStop}"
- Minimum="0.5"
- Value="{Binding Value.UpWarn}" />
- <NumericUpDown
- Grid.Column="6"
- Margin="4,0,4,0"
- Increment="0.5"
- Maximum="{Binding Value.DownWarn}"
- Value="{Binding Value.DownStop}" />
- <NumericUpDown
- Grid.Column="7"
- Margin="4,0,4,0"
- Increment="0.5"
- Maximum="{Binding Value.DownStop}"
- Minimum="-0.5"
- Value="{Binding Value.DownWarn}" />
- </Grid>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
- </ScrollViewer>
- </StackPanel>
- <StackPanel
- Grid.Row="1"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Orientation="Horizontal">
- <Button
- Command="{Binding RefreshCommand}"
- Content="{DynamicResource RefreshItem}"
- IsEnabled="{Binding RefreshEnabled}" />
- <Button
- Margin="120,0,0,0"
- Command="{Binding AddCommand}"
- Content="{DynamicResource AddItem}"
- IsEnabled="{Binding AddEnabled}" />
- <Button
- Margin="120,0,0,0"
- Command="{Binding DeleteCommand}"
- Content="{DynamicResource DelLastItem}"
- IsEnabled="{Binding DeleteEnabled}" />
- <Button
- Margin="120,0,0,0"
- Command="{Binding MaxLoadCommand}"
- Content="{DynamicResource MaxLoad}" />
- </StackPanel>
- </Grid>
- </TabItem>
- <TabItem Header="{DynamicResource SweepLimit}">
- <StackPanel
- Width="660"
- HorizontalAlignment="Left"
- VerticalAlignment="Top">
- <Grid
- Height="{StaticResource ItemHeight}"
- Background="LightGray"
- ColumnDefinitions="*,*,*,*">
- <TextBlock
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Text="{DynamicResource Item}" />
- <TextBlock
- Grid.Column="1"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Text="{DynamicResource Ampt}" />
- <TextBlock
- Grid.Column="2"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Text="{DynamicResource SweepLimit}" />
- <TextBlock
- Grid.Column="3"
- HorizontalAlignment="Center"
- VerticalAlignment="Center">
- <Run Text="{DynamicResource Load}" />
- <Run Text="(%)" />
- </TextBlock>
- </Grid>
- <Grid RowDefinitions="auto,auto,auto,auto">
- <Grid Height="{StaticResource ItemHeight}" ColumnDefinitions="*,*,*,*">
- <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center">
- <Run Text="{DynamicResource Acceleration}" />
- <Run Text="(g)" />
- </TextBlock>
- <TextBlock
- Grid.Column="1"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Text="{Binding MaxAcceleration}" />
- <TextBlock
- Grid.Column="2"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Text="{Binding Source={x:Static vm:ShakerConfigViewModel.Instance}, Path=MaxAcceleration}" />
- <TextBlock
- Grid.Column="3"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Classes.Loaded="{Binding AccelerationOverLimit}"
- Text="{Binding AccelerationLoad}">
- <TextBlock.Styles>
- <Style Selector="TextBlock">
- <Setter Property="Foreground" Value="Green" />
- </Style>
- <Style Selector="TextBlock.Loaded">
- <Setter Property="Foreground" Value="Red" />
- </Style>
- </TextBlock.Styles>
- </TextBlock>
- </Grid>
- <Grid
- Grid.Row="1"
- Height="{StaticResource ItemHeight}"
- ColumnDefinitions="*,*,*,*">
- <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center">
- <Run Text="{DynamicResource Velocity}" />
- <Run Text="(m/s)" />
- </TextBlock>
- <TextBlock
- Grid.Column="1"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Text="{Binding MaxVelocity}" />
- <TextBlock
- Grid.Column="2"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Text="{Binding Source={x:Static vm:ShakerConfigViewModel.Instance}, Path=MaxVelocity}" />
- <TextBlock
- Grid.Column="3"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Classes.Loaded="{Binding VelocityOverLimit}"
- Text="{Binding VelocityLoad}">
- <TextBlock.Styles>
- <Style Selector="TextBlock">
- <Setter Property="Foreground" Value="Green" />
- </Style>
- <Style Selector="TextBlock.Loaded">
- <Setter Property="Foreground" Value="Red" />
- </Style>
- </TextBlock.Styles>
- </TextBlock>
- </Grid>
- <Grid
- Grid.Row="2"
- Height="{StaticResource ItemHeight}"
- ColumnDefinitions="*,*,*,*">
- <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center">
- <Run Text="{DynamicResource Displacement}" />
- <Run Text="(mm)" />
- </TextBlock>
- <TextBlock
- Grid.Column="1"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Text="{Binding MaxDisplacement}" />
- <TextBlock
- Grid.Column="2"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Text="{Binding Source={x:Static vm:ShakerConfigViewModel.Instance}, Path=MaxDisplacement}" />
- <TextBlock
- Grid.Column="3"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Classes.Loaded="{Binding DisplacementOverLimit}"
- Text="{Binding DisplacementLoad}">
- <TextBlock.Styles>
- <Style Selector="TextBlock">
- <Setter Property="Foreground" Value="Green" />
- </Style>
- <Style Selector="TextBlock.Loaded">
- <Setter Property="Foreground" Value="Red" />
- </Style>
- </TextBlock.Styles>
- </TextBlock>
- </Grid>
- </Grid>
- </StackPanel>
- </TabItem>
- <TabItem Header="{DynamicResource SweepSchedule}">
- <Grid
- Width="740"
- Height="210"
- Margin="10,10,0,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Top"
- ColumnDefinitions="0.5*,*,0.7*"
- RowDefinitions="*,*,*">
- <StackPanel IsVisible="{Binding Channels.Count, Converter={StaticResource GreaterThanEqualConverter}, ConverterParameter='2'}">
- <TextBlock Text="{DynamicResource AccelerationChannel}" />
- <ComboBox
- Width="120"
- Margin="-4,0,0,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- ItemsSource="{Binding Channels}"
- SelectedValue="{Binding Path=SelectChannel}"
- SelectedValueBinding="{Binding Value}">
- <ComboBox.ItemTemplate>
- <DataTemplate>
- <StackPanel Orientation="Horizontal">
- <TextBlock Text="{DynamicResource Channel}" />
- <TextBlock Text="{Binding $self.DataContext.Key}" />
- </StackPanel>
- </DataTemplate>
- </ComboBox.ItemTemplate>
- </ComboBox>
- </StackPanel>
- <StackPanel Grid.Column="1">
- <TextBlock Text="{DynamicResource SweepCount}" />
- <NumericUpDown
- Width="120"
- Margin="4"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- Increment="1"
- Minimum="1"
- Value="{Binding SweepCount}" />
- </StackPanel>
- <StackPanel Grid.Column="2" IsEnabled="{Binding SignalType, Converter={StaticResource EnumToBooleanConverter}, ConverterParameter={x:Static model:SignalType.Sweep}}">
- <TextBlock Text="{DynamicResource SweepType}" />
- <ComboBox
- Width="120"
- Margin="-4,0,0,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- ItemsSource="{Binding SweepType, Converter={StaticResource EnumToCollectionConverter}, Mode=OneTime}"
- SelectedValue="{Binding Path=SweepType}"
- SelectedValueBinding="{Binding Value}">
- <ComboBox.ItemTemplate>
- <DataTemplate>
- <TextBlock Text="{local:ResourceBinding Key}" />
- </DataTemplate>
- </ComboBox.ItemTemplate>
- </ComboBox>
- </StackPanel>
- <StackPanel Grid.Row="1" IsEnabled="{Binding SignalType, Converter={StaticResource EnumToBooleanConverter}, ConverterParameter={x:Static model:SignalType.Sweep}}">
- <TextBlock Text="{DynamicResource SweepDirection}" />
- <ComboBox
- Width="120"
- Margin="-4,0,0,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- ItemsSource="{Binding SweepDirection, Converter={StaticResource EnumToCollectionConverter}, Mode=OneTime}"
- SelectedValue="{Binding Path=SweepDirection}"
- SelectedValueBinding="{Binding Value}">
- <ComboBox.ItemTemplate>
- <DataTemplate>
- <TextBlock Text="{local:ResourceBinding Key}" />
- </DataTemplate>
- </ComboBox.ItemTemplate>
- </ComboBox>
- </StackPanel>
- <StackPanel Grid.Row="1" Grid.Column="1">
- <TextBlock Text="{DynamicResource SignalType}" />
- <ComboBox
- Width="120"
- Margin="-4,0,0,0"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- ItemsSource="{Binding SignalType, Converter={StaticResource EnumToCollectionConverter}, Mode=OneTime}"
- SelectedValue="{Binding Path=SignalType}"
- SelectedValueBinding="{Binding Value}">
- <ComboBox.ItemTemplate>
- <DataTemplate>
- <TextBlock Text="{local:ResourceBinding Key}" />
- </DataTemplate>
- </ComboBox.ItemTemplate>
- </ComboBox>
- </StackPanel>
- <StackPanel Grid.Row="1" Grid.Column="2">
- <TextBlock Text="{DynamicResource MinFreq}" />
- <StackPanel Orientation="Horizontal">
- <NumericUpDown
- Width="120"
- Margin="4"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- Increment="0.01"
- Maximum="{Binding EndFrequency}"
- Minimum="{Binding MinFrequency}"
- Value="{Binding StartFrequency, Mode=TwoWay}" />
- <TextBlock
- Margin="4,0,0,0"
- VerticalAlignment="Center"
- Text="Hz" />
- </StackPanel>
- </StackPanel>
- <StackPanel Grid.Row="2" IsEnabled="{Binding SignalType, Converter={StaticResource EnumToBooleanConverter}, ConverterParameter={x:Static model:SignalType.Sweep}}">
- <TextBlock Text="{DynamicResource MaxFreq}" />
- <StackPanel
- Width="120"
- Margin="4"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- Orientation="Horizontal">
- <NumericUpDown
- Width="120"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- Increment="0.01"
- Maximum="{Binding MaxFrequency}"
- Minimum="{Binding StartFrequency}"
- Value="{Binding EndFrequency}" />
- <TextBlock VerticalAlignment="Center" Text="Hz" />
- </StackPanel>
- </StackPanel>
- <StackPanel Grid.Row="2" Grid.Column="1">
- <TextBlock Text="{DynamicResource SweepTime}" />
- <view:TimeControl
- Margin="4"
- Increment="0.01"
- Time="{Binding OnceSweepTime, Mode=TwoWay}" />
- </StackPanel>
- <StackPanel
- Grid.Row="2"
- Grid.Column="2"
- IsEnabled="{Binding SignalType, Converter={StaticResource EnumToBooleanConverter}, ConverterParameter={x:Static model:SignalType.Sweep}}">
- <TextBlock Text="{DynamicResource SweepSpeed}" />
- <StackPanel Orientation="Horizontal">
- <NumericUpDown
- Width="120"
- Margin="4"
- Increment="0.1"
- Maximum="20"
- Minimum="1"
- Value="{Binding SweepSpeed}" />
- <TextBlock VerticalAlignment="Center" Text="oct/min" />
- </StackPanel>
- </StackPanel>
- </Grid>
- </TabItem>
- </TabControl>
- </Grid>
- </UserControl>
|