123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121 |
- <Window x:Class="GDNXFD.Alert.Config.Views.MainWindow"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:controls="clr-namespace:GDNXFD.Alert.Config.Controls"
- xmlns:view="clr-namespace:GDNXFD.Alert.Config.Views"
- Title="自定义报警配置" Height="240" Width="500"
- Closing="Window_Closing" Background="{x:Null}"
- Icon="/Resources/Images/favicon.ico"
- WindowState="Normal" WindowStartupLocation="CenterScreen"
- WindowStyle="None" BorderThickness="0" Style="{x:Null}"
- AllowsTransparency="True"
- MinWidth="500" MinHeight="240">
- <Window.Resources>
- <Style x:Key="CycleButtonStyle2" TargetType="RadioButton" >
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type RadioButton}">
- <Border x:Name="bdr_main" Background="DeepSkyBlue" BorderThickness="1" BorderBrush="LightGray">
- <ContentPresenter VerticalAlignment="Center" HorizontalAlignment="Center" ContentSource="Content" />
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter TargetName="bdr_main" Property="Opacity" Value="0.5"/>
- </Trigger>
- <Trigger Property="IsChecked" Value="True">
- <Setter TargetName="bdr_main" Property="Background" Value="LightBlue"/>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- <Setter Property="Width" Value="100" />
- <Setter Property="Height" Value="40" />
- <Setter Property="FontSize" Value="16" />
- <Setter Property="HorizontalAlignment" Value="Center" />
- <Setter Property="VerticalAlignment" Value="Center" />
- <Setter Property="SnapsToDevicePixels" Value="True" />
- </Style>
- </Window.Resources>
- <Grid>
- <Border CornerRadius="8,8,8,8" Background="{StaticResource module-background-color-brush }" Height="Auto">
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="10px"></ColumnDefinition>
- <ColumnDefinition Width="402px"></ColumnDefinition>
- <ColumnDefinition ></ColumnDefinition>
- <ColumnDefinition Width="50px"></ColumnDefinition>
- <ColumnDefinition Width="10px"></ColumnDefinition>
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition Height="60px"></RowDefinition>
- <RowDefinition Height="*"></RowDefinition>
- </Grid.RowDefinitions>
- <!--顶部区域,支持鼠标拖放,最大化和还原,类似于传统窗口的标题栏-->
- <Border Grid.Row="0" Grid.ColumnSpan="5" Margin="0" Height="60" VerticalAlignment="Top" Background="#00FFFFFF" MouseLeftButtonDown="MainWindow_MouseLeftButtonDown"></Border>
- <!--标题栏的三按钮:最小化、最大化(恢复)、关闭-->
- <Grid Grid.Row="0" Grid.ColumnSpan="4">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*"/>
- <ColumnDefinition Width="Auto"/>
- </Grid.ColumnDefinitions>
- <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Grid.Column="1" Margin="0,5,0,0" VerticalAlignment="Top" Height="20">
- <Button Click="MinimizeButton" Style="{StaticResource MinimizeButtonStyle}" ToolTip="{Binding Tooltip_minimize, Source={StaticResource Provider}, Mode=OneWay}" Width="10" Margin="0,2,12,0" VerticalAlignment="Top"></Button>
- <Button Click="MaximizeButton" Style="{StaticResource MaximizeButtonStyle}" ToolTip="{Binding Tooltip_restore, Source={StaticResource Provider}, Mode=OneWay}" Width="18" Margin="0,2,10,0" ></Button>
- <Button Click="CloseButton" Style="{StaticResource CloseButtonStyle}" ToolTip="{Binding Tooltip_close, Source={StaticResource Provider}, Mode=OneWay}" Height="15" ></Button>
- </StackPanel>
- </Grid>
-
- <!--功能导航: 自定义报警、 DI点报警--><!--
- <StackPanel Grid.Row="0" Grid.Column="2" Orientation="Horizontal"
- Visibility="{Binding IsLogin, Converter={StaticResource BooleanToVisibilityConverter}}"
- HorizontalAlignment="Left" VerticalAlignment="Bottom" x:Name="pnlNav">
- <RadioButton Style="{StaticResource CycleButtonStyle2}" Margin="10 0 0 0"
- Content="自定义报警" IsChecked="True" x:Name="rbtnCustom"
- GroupName="g2" Checked="rbtnCustom_Checked" >
- </RadioButton>
- <RadioButton Style="{StaticResource CycleButtonStyle2}" Content="开关量报警"
- GroupName="g2" x:Name="rbtnDI" Checked="rbtnDI_Checked" >
- </RadioButton>
- </StackPanel>-->
- <Image Grid.Row="0" Grid.Column="1" IsHitTestVisible="False" IsEnabled="False" Source="/Resources/Images/logo.png" Stretch="Uniform" Margin="5,9,0,8"></Image>
- <!-- 当前用户 -->
- <Grid Grid.Row="0" Grid.Column="2" Grid.ColumnSpan="2" >
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*"/>
- <ColumnDefinition Width="Auto"/>
- </Grid.ColumnDefinitions>
- <StackPanel Visibility="{Binding IsLogin, Converter={StaticResource BooleanToVisibilityConverter}}"
- HorizontalAlignment="Right" Orientation="Horizontal" Grid.Column="1" Margin="0,25,0,0" VerticalAlignment="Top" Height="25">
- <Image IsEnabled="False" Source="/Resources/Images/user.png" Width="18" Height="20" Stretch="Uniform" Margin="0,0,5,0"></Image>
- <TextBlock Text="{Binding Username}" Style="{StaticResource UserNameStyle}" ></TextBlock>
- </StackPanel>
- </Grid>
- <!--数据区域-->
- <ScrollViewer Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="4" VerticalScrollBarVisibility="Auto" Margin="0,0,5,0">
- <Grid x:Name="PARTContentHost" Margin="5,0,10,0" Focusable="False">
- </Grid>
- </ScrollViewer>
- <!--显示忙碌状态-->
- <Grid Grid.ColumnSpan="5" Grid.RowSpan="2"
- Visibility="{Binding IsBusy, Converter={StaticResource BooleanToVisibilityConverter}}">
- <controls:LoadingControl></controls:LoadingControl>
- </Grid>
- <!--显示确认对话框-->
- <Grid Grid.ColumnSpan="5" Grid.RowSpan="2"
- Visibility="{Binding IsVisibleDialog, Converter={StaticResource BooleanToVisibilityConverter}}" >
- <controls:CustomDialog DataContext="{Binding DialogMessage}"></controls:CustomDialog>
- </Grid>
- </Grid>
- </Border>
- </Grid>
- </Window>
|