WdGridAdvAnalyze.xaml 4.83 KB
Newer Older
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
<Window x:Class="Flyad7_WPF.WdGridAdvAnalyze"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:Flyad7_WPF"
        xmlns:Chr="clr-namespace:System.Windows.Forms.DataVisualization.Charting;assembly=System.Windows.Forms.DataVisualization"
        mc:Ignorable="d"
        Title="WdGridAdvAnalyze" Width="800" d:DataContext="{d:DesignInstance Type=local:WdGridAdvAnalyzeVm}">
    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="WdGridAdvAnalyzeStyle.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Window.Resources>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="auto"/>
            <ColumnDefinition/>
        </Grid.ColumnDefinitions>
        <StackPanel Margin="5">
            <TextBlock Style="{StaticResource tbkTitle}" >
                R=<Run Text="{Binding R,StringFormat={}{0:F4}}"/> <LineBreak/>
                Speed=<Run Text="{Binding Speed,StringFormat={}{0:F1}}"/>
            </TextBlock>
            <Button Style="{StaticResource btnNormal}" Content="加载" Command="{Binding LoadCmd}"/>
            <Button Style="{StaticResource btnNormal}" Content="自动计算" Command="{Binding AutoCmd}"/>
            <Button Style="{StaticResource btnNormal}" Content="自动2" Command="{Binding Auto2Cmd}"/>
            <Button Style="{StaticResource btnNormal}" Content="手动计算" Command="{Binding ManualCmd}"/>
            <Button Style="{StaticResource btnNormal}" Content="清除R" Command="{Binding ClearRCmd}"/>
            <Button Style="{StaticResource btnNormal}" Content="卷积调试" Command="{Binding ConvDebugCmd}"/>
            <TextBlock Style="{StaticResource tbkTitle}">
                CurrR=<Run Text="{Binding CurrR,StringFormat={}{0:F6}}"/>
            </TextBlock>
            <TextBlock Style="{StaticResource tbkTitle}">
                CurrGroupR=<Run Text="{Binding CurrGroupR,StringFormat={}{0:F6}}"/>
            </TextBlock>
            <StackPanel Orientation="Horizontal">
                <TextBlock Style="{StaticResource tbkTitle}" Text="K1*X(n)"/>
                <TextBox Style="{StaticResource txtInput}" Text="{Binding Ks[0],StringFormat={}{0:F6}}"/>
            </StackPanel>
            <StackPanel Orientation="Horizontal">
                <TextBlock Style="{StaticResource tbkTitle}" Text="K2*Y(n-1)"/>
                <TextBox Style="{StaticResource txtInput}" Text="{Binding Ks[1],StringFormat={}{0:F6}}"/>
            </StackPanel>
            <StackPanel Orientation="Horizontal">
                <TextBlock Style="{StaticResource tbkTitle}" Text="K3*X(n-1)"/>
                <TextBox Style="{StaticResource txtInput}" Text="{Binding Ks[2],StringFormat={}{0:F6}}"/>
            </StackPanel>
            <StackPanel Orientation="Horizontal">
                <TextBlock Style="{StaticResource tbkTitle}" Text="K4*Y(n-2)"/>
                <TextBox Style="{StaticResource txtInput}" Text="{Binding Ks[3],StringFormat={}{0:F6}}"/>
            </StackPanel>
            <StackPanel Orientation="Horizontal">
                <TextBlock Style="{StaticResource tbkTitle}" Text="K5*X(n-2)"/>
                <TextBox Style="{StaticResource txtInput}" Text="{Binding Ks[4],StringFormat={}{0:F6}}"/>
            </StackPanel>
            <TextBlock Style="{StaticResource tbkTitle}">
                CellCnt=<Run Text="{Binding CellCnt,Mode=OneWay}"/>
            </TextBlock>
            <StackPanel Orientation="Horizontal">
                <TextBlock Style="{StaticResource tbkTitle}" Text="SampleCellIdx="/>
                <TextBox Style="{StaticResource txtInput}" Text="{Binding SampleCellIdx}"/>
            </StackPanel>
            <StackPanel Orientation="Horizontal">
                <Button Style="{StaticResource btnNormal}" Content="Pre" Command="{Binding PreIdxCmd}"/>
                <Button Style="{StaticResource btnNormal}" Content="Next" Command="{Binding NextIdxCmd}"/>
            </StackPanel>
        </StackPanel>
        <Grid Grid.Column="1">
            <Grid.RowDefinitions>
                <RowDefinition/>
                <RowDefinition/>
                <RowDefinition/>
            </Grid.RowDefinitions>
            <WindowsFormsHost Grid.Row="0">
                <Chr:Chart x:Name="chart2" />
            </WindowsFormsHost>
            <WindowsFormsHost Grid.Row="1">
                <Chr:Chart x:Name="chart0" />
            </WindowsFormsHost>
            <WindowsFormsHost Grid.Row="2">
                <Chr:Chart x:Name="chart1" />
            </WindowsFormsHost>
        </Grid>

    </Grid>
</Window>