Page_Graph.xaml 11 KB
Newer Older
潘栩锋's avatar
潘栩锋 committed
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
<Page x:Class="FLY.FeedbackRenZiJia.UI.Client.UIModule.Page_Graph"
      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:d="http://schemas.microsoft.com/expression/blend/2008" 
      xmlns:my="clr-namespace:System.Windows.Forms.Integration;assembly=WindowsFormsIntegration"  
      xmlns:Chr="clr-namespace:System.Windows.Forms.DataVisualization.Charting;assembly=System.Windows.Forms.DataVisualization"
      xmlns:local="clr-namespace:FLY.FeedbackRenZiJia.UI.Client.UIModule"
      xmlns:iservice="clr-namespace:FLY.FeedbackRenZiJia.IService;assembly=FLY.FeedbackRenZiJia" 
      xmlns:ed="http://schemas.microsoft.com/expression/2010/drawing" 
      mc:Ignorable="d" 
      d:DesignHeight="400" d:DesignWidth="980"
	Title="Page_Graph" Unloaded="Page_Unloaded" Loaded="Page_Loaded">
    <Page.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/Dictionary_MyStyle.xaml"/>
                <ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Converter/Dictionary_MyConv.xaml"/>
            </ResourceDictionary.MergedDictionaries>
            <ControlTemplate x:Key="picture_button" TargetType="Button">
                <Border Name="border" BorderThickness="1" CornerRadius="5">
                    <ContentPresenter Content="{TemplateBinding Content}"/>
                </Border>
                <ControlTemplate.Triggers>
                    <Trigger Property="IsMouseOver" Value="True">
                        <Setter TargetName="border" Property="BorderBrush" Value="LightBlue"/>
                    </Trigger>
                    <Trigger Property="IsPressed" Value="True">
                        <Setter TargetName="border" Property="Background" Value="LightGray"/>
                    </Trigger>
                </ControlTemplate.Triggers>
            </ControlTemplate>
        </ResourceDictionary>
    </Page.Resources>

    <Grid Name="grid" Background="White">
        <Grid.RowDefinitions>
            <RowDefinition Height="auto" />
            <RowDefinition Height="258*" />
        </Grid.RowDefinitions>

        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="18" />
                <RowDefinition Height="32" />
            </Grid.RowDefinitions>
            <Rectangle Fill="#FF579aab"/>
        </Grid>
        
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="auto" />
                <ColumnDefinition Width="auto" />
                <ColumnDefinition Width="204*" />
                <ColumnDefinition Width="auto" />
            </Grid.ColumnDefinitions>
            <Grid.Resources>
                <ResourceDictionary>
                    <Style TargetType="Button" BasedOn="{StaticResource ButtonStyle_empty}">
                        <Setter Property="Width" Value="50"/>
                        <Setter Property="Margin" Value="2"/>
                    </Style>
                    <Style TargetType="Image">
                        <Setter Property="Height" Value="50"/>
                    </Style>
                    <Style TargetType="TextBlock" >
                        <Setter Property="FontWeight" Value="Bold"/>
                        <Setter Property="FontFamily" Value="YouYuan"/>
                        <Setter Property="HorizontalAlignment" Value="Center"/>
                    </Style>
                </ResourceDictionary>
            </Grid.Resources>

潘栩锋's avatar
潘栩锋 committed
74
            <Button Click="button_graphset_click">
潘栩锋's avatar
潘栩锋 committed
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 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129
                    <StackPanel>
                        <Image Source="/FLY.FeedbackRenZiJia.UI.Client;component/Images/info.png" />
                        <TextBlock Text="设置" />
                    </StackPanel>
                </Button>

            <StackPanel Orientation="Horizontal" Grid.Column="1" Visibility="{Binding CheckEnable, Converter={StaticResource visbilityconv},ConverterParameter=HiddenWhenTrue}" >
                <Button Click="button_baseup_click" >
                    <StackPanel>
                        <Image Source="/FLY.FeedbackRenZiJia.UI.Client;component/Images/up.png"/>
                        <TextBlock Text="上升" />
                    </StackPanel>
                </Button>
                <Button Click="button_basedown_click" >
                    <StackPanel>
                        <Image Source="/FLY.FeedbackRenZiJia.UI.Client;component/Images/down.png" />
                        <TextBlock Text="下降" />
                    </StackPanel>
                </Button>
                <Button Click="button_add_click" >
                    <StackPanel>
                        <Image Source="/FLY.FeedbackRenZiJia.UI.Client;component/Images/add.png" />
                        <TextBlock Text="加热" />
                    </StackPanel>
                </Button>
                <Button Click="button_sub_click" >
                    <StackPanel>
                        <Image Source="/FLY.FeedbackRenZiJia.UI.Client;component/Images/cancel.png" />
                        <TextBlock Text="降温" />
                    </StackPanel>
                </Button>
                <Button Click="button_cal_click" >
                    <StackPanel>
                        <Image Source="/FLY.FeedbackRenZiJia.UI.Client;component/Images/aim.png" />
                        <TextBlock Text="计算" />
                    </StackPanel>
                </Button>
                <Button Click="button_apply_click" >
                    <StackPanel>
                        <Image Source="/FLY.FeedbackRenZiJia.UI.Client;component/Images/checkmark.png" />
                        <TextBlock Text="应用" />
                    </StackPanel>
                </Button>
                <Button Click="button_undo_click" >
                    <StackPanel>
                        <Grid>
                            <Image Source="/FLY.FeedbackRenZiJia.UI.Client;component/Images/previous.png" />
                            <Grid HorizontalAlignment="Left" VerticalAlignment="Bottom" >
                                <Ellipse Fill="#FF2F5070" Width="25" Height="25" Opacity="0.8"/>
                                <TextBlock Text="{Binding UndoIdx}" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White"  FontFamily="Arial" FontSize="10"/>
                            </Grid>
                        </Grid>
                        <TextBlock Text="撤销" />
                    </StackPanel>
                </Button>
130
                <Button x:Name="button_clear_h" Click="button_clear_h_click" Template="{StaticResource picture_button}" >
潘栩锋's avatar
潘栩锋 committed
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205
                    <StackPanel>
                        <Grid>
                            <Image HorizontalAlignment="Center" VerticalAlignment="Center" Source="/FLY.FeedbackRenZiJia.UI.Client;component/Images/close.png" />
                            <Grid HorizontalAlignment="Center" VerticalAlignment="Center" x:Name="grid_longpress" Visibility="{Binding IsRunning,Converter={StaticResource visbilityconv}}">
                                <ed:Arc Width="45" Height="45" Opacity="0.9" 
                                        ArcThickness="4" 
                                        ArcThicknessUnit="Pixel" 
                                        StartAngle="0" EndAngle="360" 
                                        Fill="#FFF1F1F1" Stretch="None" Stroke="#FF988585" />
                                <ed:Arc Width="45" Height="45"
                                    ArcThickness="4" 
                                    ArcThicknessUnit="Pixel"
                                    StartAngle="0" 
                                        EndAngle="{Binding Progress}"  
                                    Fill="#FF5C7AA0" Stretch="None" Stroke="#FF988585" Opacity="0.9" >
                                </ed:Arc>
                            </Grid>
                        </Grid>
                        <TextBlock Text="清除" />
                    </StackPanel>
                </Button>
                <Button Click="button_save_click" >
                    <StackPanel>
                        <Image Source="/FLY.FeedbackRenZiJia.UI.Client;component/Images/diskette.png" />
                        <TextBlock Text="保存" />
                    </StackPanel>
                </Button>
                <Button Click="button_load_click" >
                    <StackPanel>
                        <Image Source="/FLY.FeedbackRenZiJia.UI.Client;component/Images/open_folder.png" />
                        <TextBlock Text="读取" />
                    </StackPanel>
                </Button>

            </StackPanel>

            <StackPanel Orientation="Horizontal" Grid.Column="3">

                <StackPanel Orientation="Horizontal">
                    <Button Click="button_checkenable_click" Visibility="{Binding HasCheck, Converter={StaticResource visbilityconv}}" >
                        <StackPanel>
                            <Grid >
                                <Rectangle Fill="Yellow" RadiusX="5" RadiusY="5" Visibility="{Binding HasElectricity, Converter={StaticResource visbilityconv}}"/>
                                <Image Source="/FLY.FeedbackRenZiJia.UI.Client;component/Images/nurse.png" Visibility="{Binding CheckEnable, Converter={StaticResource visbilityconv}}" />
                                <Image Source="/FLY.FeedbackRenZiJia.UI.Client;component/Images/nurse_gray.png" Visibility="{Binding CheckEnable, Converter={StaticResource visbilityconv},ConverterParameter=HiddenWhenTrue}" />
                            </Grid>
                            <TextBlock Text="检查" />
                        </StackPanel>
                    </Button>
                    <Button Click="button_enable_click"   >
                        <StackPanel>
                            <Image>
                                <Image.Style>
                                    <Style TargetType="Image">
                                        <Setter Property="Source" Value="/FLY.FeedbackRenZiJia.UI.Client;component/Images/ligthbulb_on.png"/>
                                        <Style.Triggers>
                                            <DataTrigger Binding="{Binding IsAuto}" Value="False">
                                                <Setter Property="Source" Value="/FLY.FeedbackRenZiJia.UI.Client;component/Images/ligthbulb_off.png"/>
                                            </DataTrigger>
                                        </Style.Triggers>
                                    </Style>
                                </Image.Style>
                            </Image>
                            <TextBlock Text="自动" />
                        </StackPanel>
                    </Button>
                </StackPanel>
            </StackPanel>
        </Grid>

        <WindowsFormsHost Grid.Row="2">
            <Chr:Chart x:Name="chart1" />
        </WindowsFormsHost>
    </Grid>
</Page>