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
<flyctrllib:WindowBigClose x:Class="FLY.Weight.UI.Client.Window_RatioSet"
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:FLY.Weight.UI.Client"
xmlns:control="clr-namespace:FLY.Weight.UI.Client.Control"
xmlns:flyctrllib="clr-namespace:FLY.ControlLibrary;assembly=FLY.ControlLibrary"
mc:Ignorable="d"
Title="Window_RatioSet" WindowStartupLocation="CenterScreen" d:DesignWidth="538.195" Loaded="WindowBigClose_Loaded" d:DesignHeight="525.559">
<Window.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/FLY.Weight.UI.Client;component/Themes/LightSkin.xaml"/>
<ResourceDictionary Source="pack://application:,,,/FLY.Weight.UI.Client;component/UnitTests/UnitTests_Weights.xaml"/>
<ResourceDictionary Source="pack://application:,,,/FLY.Weight.UI.Client;component/Themes/Dictionary_MainSingleWeight.xaml"/>
<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/Dictionary_MyStyle.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Window.Resources>
<StackPanel Name="root_grid" Orientation="Vertical" Margin="5,20" >
<StackPanel.DataContext>
<StaticResource ResourceKey="unittests_weighters"/>
</StackPanel.DataContext>
<StackPanel Orientation="Vertical" Margin="5">
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldHeader}" Text="流量设置" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="44" />
</StackPanel>
<Grid >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<ItemsControl Grid.Row="1" ItemsSource="{Binding Items}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Vertical" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<Grid x:Name="templateRoot" SnapsToDevicePixels="true" Margin="10,0">
<Border x:Name="mainBorder" MinWidth="60" Height="60" Background="{Binding Color}" Margin="0" />
<TextBlock Text="{Binding Number}" FontSize="60" Foreground="White" FontWeight="Bold" VerticalAlignment="Bottom" HorizontalAlignment="Left" />
</Grid>
<Border Background="{Binding Color}" Margin="3" >
<Border BorderThickness="1" BorderBrush="White" Margin="3" MinWidth="160">
<StackPanel Orientation="Horizontal" Margin="20,3" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBox Style="{StaticResource TextBoxStyle_FieldContent}" Text="{Binding ScrewPSet, StringFormat={}{0:F1}}" Background="Transparent" Foreground="White"/>
<TextBlock Style="{StaticResource TextBlockStyle_FieldContent_mm}" Text="%" Foreground="White" />
</StackPanel>
</Border>
</Border>
</StackPanel>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<StackPanel Orientation="Vertical" Grid.Column="1">
<control:PieChart x:Name="piechart" Width="200" Height="200" Margin="10"
ItemValueBinding="ScrewPSet" ItemColorBinding="Color"
ItemsSource="{Binding Items}"
/>
<StackPanel Orientation="Vertical" Margin="5">
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldHeaderEditable}" Text="总流量" />
<StackPanel Orientation="Horizontal">
<TextBox Style="{StaticResource ResourceKey=TextBoxStyle_FieldContent}" Text="{Binding Accessory.TotalFlowSetting, StringFormat={}{0:F1}}"/>
<TextBlock Style="{StaticResource ResourceKey=TextBlockStyle_FieldContent_mm}" Text="kg/h" />
</StackPanel>
</StackPanel>
<Button Style="{StaticResource ButtonStyle2}" Content="当前->设置" FontSize="30" Width="auto" Margin="5" Click="button_autoset_Click" />
</StackPanel>
</Grid>
</StackPanel>
</flyctrllib:WindowBigClose>