123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145 |
- <UserControl
- x:Class="ShakerApp.Views.RandomMainPage"
- 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:models="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:RandomMainPageViewModel"
- DataContext="{Binding Source={x:Static vm:RandomMainPageViewModel.Instance}}"
- mc:Ignorable="d">
- <Grid ColumnDefinitions="220,*">
- <ScrollViewer Grid.Column="0">
- <StackPanel>
- <view:ShakerMiniStatusControl />
- <view:OilMinView IsVisible="{Binding Source={x:Static vm:OilSourceStatusViewModel.Instance}, Path=IsEnabled}" />
- <Expander ExpandDirection="Down" IsExpanded="True">
- <Expander.Header>
- <TextBlock
- FontSize="24"
- FontWeight="Bold"
- Text="{DynamicResource TestInfo}" />
- </Expander.Header>
- <StackPanel Margin="4,0,0,0">
- <StackPanel>
- <TextBlock>
- <Run Text="{DynamicResource RandomTestStep}" />
- <Run Text=":" />
- </TextBlock>
- <TextBlock Text="{local:ResourceBinding RandomTestStepKey}" />
- </StackPanel>
- <StackPanel>
- <TextBlock>
- <Run Text="{DynamicResource CurrentIdentifyDisplacement}" />
- <Run Text=":" />
- </TextBlock>
- <TextBlock Text="{Binding CurrentIdentifyDisplacement, StringFormat='{}{0:F4}mm'}" />
- </StackPanel>
- <StackPanel>
- <TextBlock>
- <Run Text="{DynamicResource CurrentIdentifyRms}" />
- <Run Text=":" />
- </TextBlock>
- <TextBlock Text="{Binding TimeDomainRMS, StringFormat='{}{0:F4}g'}" />
- </StackPanel>
- <StackPanel>
- <TextBlock>
- <Run Text="{DynamicResource IdentifyIndex}" />
- <Run Text=":" />
- </TextBlock>
- <TextBlock Text="{Binding IdentifyIndex}" />
- </StackPanel>
- <StackPanel IsVisible="{Binding RandomTestStep, Converter={StaticResource EnumToBooleanConverter}, ConverterParameter={x:Static models:RandomTestStep.Test}}">
- <TextBlock>
- <Run Text="{DynamicResource CurrentTestLevel}" />
- <Run Text=":" />
- </TextBlock>
- <TextBlock Text="{Binding CurrentTestLevel, StringFormat='{}{0:F1}dB'}" />
- </StackPanel>
- <StackPanel IsVisible="{Binding RandomTestStep, Converter={StaticResource EnumToBooleanConverter}, ConverterParameter={x:Static models:RandomTestStep.Test}}">
- <TextBlock>
- <Run Text="{DynamicResource CurrentTestTime}" />
- <Run Text=":" />
- </TextBlock>
- <TextBlock Text="{Binding CurrentTestTime, Converter={StaticResource TimeToStringConverter}}" />
- </StackPanel>
- <StackPanel IsVisible="{Binding RandomTestStep, Converter={StaticResource EnumToBooleanConverter}, ConverterParameter={x:Static models:RandomTestStep.Test}}">
- <TextBlock>
- <Run Text="{DynamicResource CurrentLevelTestMaxTime}" />
- <Run Text=":" />
- </TextBlock>
- <TextBlock Text="{Binding CurrentLevelTestMaxTime, Converter={StaticResource TimeToStringConverter}}" />
- </StackPanel>
- </StackPanel>
- </Expander>
- </StackPanel>
- </ScrollViewer>
- <oxy:PlotView
- Grid.Column="1"
- Background="Transparent"
- Model="{Binding PlotModel}">
- <oxy:PlotView.DefaultTrackerTemplate>
- <ControlTemplate>
- <oxy:TrackerControl
- Background="#6F999999"
- BorderBrush="Transparent"
- CornerRadius="6"
- Position="{Binding Position}"
- ShowPointer="True">
- <oxy:TrackerControl.Content>
- <StackPanel Margin="6">
- <TextBlock Text="{DynamicResource Value}" />
- <TextBlock>
- <Run Text="{DynamicResource Frequency}" />
- <Run Text=":" />
- <Run Text="{Binding Item.Frequency, StringFormat='{}{0:F2}Hz'}" />
- </TextBlock>
- <TextBlock IsVisible="{Binding Source={x:Static vm:SineMainPageViewModel.Instance}, Path=LineSeries[0].IsVisible}">
- <Run Text="{DynamicResource Acceleration}" />
- <Run Text=":" />
- <Run Text="{Binding Item.Acceleration, StringFormat='{}{0:F4}g'}" />
- </TextBlock>
- <TextBlock IsVisible="{Binding Source={x:Static vm:SineMainPageViewModel.Instance}, Path=LineSeries[1].IsVisible}">
- <Run Text="{DynamicResource TargetAcceleration}" />
- <Run Text=":" />
- <Run Text="{Binding Item.TargetAcceleration, StringFormat='{}{0:F4}'}" />
- <Run Text="{StaticResource RandomValueUnit}" />
- </TextBlock>
- <TextBlock IsVisible="{Binding Source={x:Static vm:SineMainPageViewModel.Instance}, Path=LineSeries[2].IsVisible}">
- <Run Text="{DynamicResource UpStopAcceleration}" />
- <Run Text=":" />
- <Run Text="{Binding Item.UpStopAcceleration, StringFormat='{}{0:F4}g'}" />
- </TextBlock>
- <TextBlock IsVisible="{Binding Source={x:Static vm:SineMainPageViewModel.Instance}, Path=LineSeries[3].IsVisible}">
- <Run Text="{DynamicResource UpWarnAcceleration}" />
- <Run Text=":" />
- <Run Text="{Binding Item.UpWarnAcceleration, StringFormat='{}{0:F4}'}" />
- <Run Text="{StaticResource RandomValueUnit}" />
- </TextBlock>
- <TextBlock IsVisible="{Binding Source={x:Static vm:SineMainPageViewModel.Instance}, Path=LineSeries[4].IsVisible}">
- <Run Text="{DynamicResource DownStopAcceleration}" />
- <Run Text=":" />
- <Run Text="{Binding Item.DownStopAcceleration, StringFormat='{}{0:F4}'}" />
- <Run Text="{StaticResource RandomValueUnit}" />
- </TextBlock>
- <TextBlock IsVisible="{Binding Source={x:Static vm:SineMainPageViewModel.Instance}, Path=LineSeries[5].IsVisible}">
- <Run Text="{DynamicResource DownWarnAcceleration}" />
- <Run Text=":" />
- <Run Text="{Binding Item.DownWarnAcceleration, StringFormat='{}{0:F4}'}" />
- <Run Text="{StaticResource RandomValueUnit}" />
- </TextBlock>
- </StackPanel>
- </oxy:TrackerControl.Content>
- </oxy:TrackerControl>
- </ControlTemplate>
- </oxy:PlotView.DefaultTrackerTemplate>
- </oxy:PlotView>
- </Grid>
- </UserControl>
|