123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560 |
- <wnd:CustomWnd x:Class="VirgoUI.Client.MainView"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
- xmlns:cal="http://www.caliburn.org"
- WindowState="Maximized"
- WindowStartupLocation="CenterScreen"
- xmlns:wnd="http://OpenSEMI.Ctrlib.com/presentation"
- xmlns:client="clr-namespace:VirgoUI.Client"
- xmlns:deviceControl="clr-namespace:Aitex.Core.UI.DeviceControl;assembly=MECF.Framework.UI.Core"
- Title="MainView" Height="880" Width="1600" >
- <Window.Resources>
- <client:DateTimeToTextConverter x:Key="dateTimeToTextConverter"/>
- <client:CollectionLastIndexConverter x:Key="collectionLastIndexConverter" />
- </Window.Resources>
- <Grid>
- <Grid x:Name="LoginPart" Background="{StaticResource Login_BG}">
- <Ellipse Width="850" Height="600" Fill="{DynamicResource Login_BG_Highlight}"/>
- <Grid Width="590" Height="465">
- <Grid.Effect>
- <DropShadowEffect Color="#FF004D83" BlurRadius="30" ShadowDepth="0"/>
- </Grid.Effect>
- <Border BorderBrush="{DynamicResource LoginPanel_BD}" BorderThickness="1" CornerRadius="3" Background="{DynamicResource LoginPanel_BG}">
- <Grid>
- <Path Data="M0,0 L0.67857742,0.054499656 C95.091171,7.7605554 387.09985,38.266688 589.03564,132.3875 L590,132.84716 590,249.338 C590,250.99486 588.65686,252.338 587,252.338 L441.29346,252.338 440.83957,252.18517 C350.99802,222.35816 203.01686,189.00345 6.2653065,198.4652 L0,198.80318 z" Stretch="Fill" Height="252.338" VerticalAlignment="Bottom" Width="590" Fill="{DynamicResource LoginPanel_InnerGrow}"/>
- <Grid Margin="60,40">
- <Grid.RowDefinitions>
- <RowDefinition Height="70"/>
- <RowDefinition Height="10"/>
- <RowDefinition/>
- <RowDefinition Height="Auto"/>
- </Grid.RowDefinitions>
- <StackPanel HorizontalAlignment="Left" Orientation="Horizontal">
- <TextBlock TextWrapping="Wrap" Text="Login" FontWeight="Bold" FontFamily="Arial" FontSize="50" Foreground="White" VerticalAlignment="Bottom" Margin="0,0,0,5"/>
- <TextBlock TextWrapping="Wrap" Text="登录" FontFamily="SimHei" FontSize="32" Foreground="White" Opacity="0.5" Margin="10,0,0,12" VerticalAlignment="Bottom" FontWeight="Bold"/>
- </StackPanel>
- <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="-20,0">
- <Rectangle Fill="#19FFFFFF" Width="10" Height="10"/>
- <Rectangle Fill="#7FFFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
- <Rectangle Fill="#33FFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
- <Rectangle Fill="#66FFFFFF" Width="10" Height="10" Margin="50,0,0,0"/>
- <Rectangle Fill="#7FFFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
- <Rectangle Fill="#4CFFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
- <Rectangle Fill="#33FFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
- <Rectangle Fill="#66FFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
- <Rectangle Fill="#99FFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
- <Rectangle Fill="#7FFFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
- <Rectangle Fill="#99FFFFFF" Width="10" Height="10" Margin="20,0,0,0"/>
- <Rectangle Fill="#B2FFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
- <Rectangle Fill="#CCFFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
- <Rectangle Fill="#CCFFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
- <Rectangle Fill="#B2FFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
- <Rectangle Fill="#19FFFFFF" Width="10" Height="10" Margin="50,0,0,0"/>
- <Rectangle Fill="#4CFFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
- <Rectangle Fill="#19FFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
- <Rectangle Fill="#4CFFFFFF" Width="10" Height="10" Margin="30,0,0,0"/>
- <Rectangle Fill="#66FFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
- <Rectangle Fill="#33FFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
- <Rectangle Fill="#33FFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
- <Rectangle Fill="#66FFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
- <Rectangle Fill="#7FFFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
- <Rectangle Fill="#4CFFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
- <Rectangle Fill="#33FFFFFF" Width="10" Height="10" Margin="3,0,0,0"/>
- </StackPanel>
- <Grid Margin="40" Grid.Row="2">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="130"/>
- <ColumnDefinition/>
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition/>
- <RowDefinition/>
- <RowDefinition/>
- </Grid.RowDefinitions>
- <TextBox x:Name="tbLoginName" Grid.Column="1" Text="{Binding LastLoginName}" TextChanged="TbLoginName_TextChanged" TabIndex="0" TextWrapping="Wrap" Height="45" VerticalAlignment="Center" Style="{DynamicResource Login_TextBox}"/>
- <PasswordBox x:Name="pdbPassword" Grid.Column="1" Grid.Row="1" TabIndex="1" Height="45" Style="{DynamicResource Login_PasswordBox}">
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="KeyDown">
- <cal:ActionMessage MethodName="Enter">
- <cal:Parameter Value="$eventargs" />
- <cal:Parameter Value="{Binding ElementName=tbLoginName, Path=Text}" />
- <cal:Parameter Value="{Binding ElementName=pdbPassword}" />
- <cal:Parameter Value="{Binding ElementName=cbRole, Path=SelectedValue}" />
- </cal:ActionMessage>
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </PasswordBox>
- <ComboBox x:Name="cbRole" Style="{DynamicResource Login_ComboBox}" Grid.Column="1" Grid.Row="2" Height="45" ItemsSource="{Binding Roles}" DisplayMemberPath="RoleName" SelectedIndex="0" TabIndex="2">
- </ComboBox>
- <TextBlock TextWrapping="Wrap" Text="User Name" Foreground="{DynamicResource FG_White}" FontSize="16" FontFamily="Arial" FontWeight="Bold" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,0,20,0"/>
- <TextBlock TextWrapping="Wrap" Text="Password" Foreground="{DynamicResource FG_White}" FontSize="16" FontFamily="Arial" FontWeight="Bold" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,0,20,0" Grid.Row="1"/>
- <TextBlock TextWrapping="Wrap" Text="Role" Foreground="{DynamicResource FG_White}" FontSize="16" FontFamily="Arial" FontWeight="Bold" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,0,20,0" Grid.Row="2"/>
- </Grid>
- <Button Style="{StaticResource Login_Button}" Content="Login" Grid.Row="3" FontFamily="Arial" FontSize="18" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Center" Height="55" Width="160">
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="Click">
- <cal:ActionMessage MethodName="Login">
- <cal:Parameter Value="{Binding ElementName=tbLoginName, Path=Text}" />
- <cal:Parameter Value="{Binding ElementName=pdbPassword}" />
- <cal:Parameter Value="{Binding ElementName=cbRole, Path=SelectedValue}" />
- </cal:ActionMessage>
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </Button>
- </Grid>
- </Grid>
- </Border>
- </Grid>
- <Grid.Style>
- <Style>
- <Style.Triggers>
- <DataTrigger Binding="{Binding IsLogin}" Value="True">
- <Setter Property="Grid.Visibility" Value="Collapsed"></Setter>
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </Grid.Style>
- </Grid>
- <Grid x:Name="MainPage" Background="{DynamicResource MainFrame_BG}">
- <Grid.RowDefinitions>
- <RowDefinition Height="5*" MaxHeight="130"/>
- <RowDefinition Height="20*"/>
- <RowDefinition Height="Auto" MinHeight="35"/>
- <RowDefinition Height="3*" MaxHeight="70"/>
- </Grid.RowDefinitions>
- <Grid x:Name="Top_Frame">
- <Grid.RowDefinitions>
- <RowDefinition Height="30*" />
- </Grid.RowDefinitions>
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="Auto"/>
- <ColumnDefinition />
- <ColumnDefinition Width="Auto"/>
- </Grid.ColumnDefinitions>
- <TextBlock HorizontalAlignment="Center" TextWrapping="Wrap" Text="Virgo" VerticalAlignment="Center" FontFamily="Arial" Foreground="White" FontSize="64" FontWeight="Bold" Margin="10,0" FontStyle="Italic">
- <TextBlock.Effect>
- <DropShadowEffect/>
- </TextBlock.Effect>
- </TextBlock>
- <Grid Grid.Column="1" Margin="10,8,0,8">
- <Grid.RowDefinitions>
- <RowDefinition/>
- <RowDefinition/>
- <RowDefinition/>
- <RowDefinition/>
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition MinWidth="45" MaxWidth="90"/>
- <ColumnDefinition MinWidth="65"/>
- <ColumnDefinition MinWidth="45" MaxWidth="90"/>
- <ColumnDefinition MinWidth="65"/>
- <ColumnDefinition MinWidth="45" MaxWidth="90"/>
- <ColumnDefinition MinWidth="65"/>
- <ColumnDefinition Width="15"/>
- <ColumnDefinition Width="200"/>
- </Grid.ColumnDefinitions>
- <Border BorderBrush="{DynamicResource TopFrame_TableBD_Highlight}" BorderThickness="1,1,0,0" CornerRadius="6,0,0,0" Background="{DynamicResource TopFrame_TableBG}">
- <Border BorderBrush="{DynamicResource TopFrame_TableBD_Shadow}" BorderThickness="0,0,1,1" Padding="5,2">
- <TextBlock TextWrapping="NoWrap" Text="System" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{DynamicResource TopFrame_TextColor}" FontFamily="Arial" FontSize="16"/>
- </Border>
- </Border>
- <Border Grid.Column="2" BorderBrush="{DynamicResource TopFrame_TableBD_Highlight}" BorderThickness="1,1,0,0" Background="{DynamicResource TopFrame_TableBG}">
- <Border BorderBrush="{DynamicResource TopFrame_TableBD_Shadow}" BorderThickness="0,0,1,1" Padding="5,2">
- <TextBlock TextWrapping="NoWrap" Text="EFEM" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{DynamicResource TopFrame_TextColor}" FontFamily="Arial" FontSize="16"/>
- </Border>
- </Border>
- <Border Grid.Column="4" BorderBrush="{DynamicResource TopFrame_TableBD_Highlight}" BorderThickness="1,1,0,0" Background="{DynamicResource TopFrame_TableBG}">
- <Border BorderBrush="{DynamicResource TopFrame_TableBD_Shadow}" BorderThickness="0,0,1,1" Padding="5,2">
- <TextBlock TextWrapping="NoWrap" Text="Host" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{DynamicResource TopFrame_TextColor}" FontFamily="Arial" FontSize="16"/>
- </Border>
- </Border>
-
- <Border Grid.Column="6" BorderBrush="{DynamicResource TopFrame_TableBD_Highlight}" BorderThickness="0,1,0,0" CornerRadius="0,6,0,0" Background="{DynamicResource TopFrame_TableBG}">
- <Border BorderBrush="{DynamicResource TopFrame_TableBD_Shadow}" BorderThickness="0,0,1,0" CornerRadius="0,5,0,0" Padding="5,2"/>
- </Border>
- <Border Grid.Row="1" BorderBrush="{DynamicResource TopFrame_TableBD_Highlight}" BorderThickness="1,1,0,0" Background="{DynamicResource TopFrame_TableBG}">
- <Border BorderBrush="{DynamicResource TopFrame_TableBD_Shadow}" BorderThickness="0,0,1,1" Padding="5,2">
- <TextBlock TextWrapping="NoWrap" Text="PMA" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{Binding PMA_TopFrame_TextColor}" FontFamily="Arial" FontSize="16"/>
- </Border>
- </Border>
- <!--<Border Grid.Row="1" Grid.Column="2" BorderBrush="{DynamicResource TopFrame_TableBD_Highlight}" BorderThickness="1,1,0,0" Background="{DynamicResource TopFrame_TableBG}">
- <Border BorderBrush="{DynamicResource TopFrame_TableBD_Shadow}" BorderThickness="0,0,1,1" Padding="5,2">
- <TextBlock TextWrapping="NoWrap" Text="PMB" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{Binding PMB_TopFrame_TextColor}" FontFamily="Arial" FontSize="16"/>
- </Border>
- </Border>-->
- <Border Grid.Row="1" Grid.Column="4" BorderBrush="{DynamicResource TopFrame_TableBD_Highlight}" BorderThickness="1,1,0,0" Background="{DynamicResource TopFrame_TableBG}">
- <Border BorderBrush="{DynamicResource TopFrame_TableBD_Shadow}" BorderThickness="0,0,0,1" Padding="5,2">
- <TextBlock TextWrapping="NoWrap" Text="版本号:" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{DynamicResource TopFrame_TextColor}" FontFamily="Arial" FontSize="16"/>
- </Border>
- </Border>
- <Grid Grid.Row="1" Grid.Column="5">
- <Grid.ColumnDefinitions>
- <ColumnDefinition MinWidth="35"/>
- <ColumnDefinition MinWidth="30"/>
- </Grid.ColumnDefinitions>
- <Border Grid.Column="0" BorderBrush="{DynamicResource TopFrame_TableBD_Highlight}" BorderThickness="0,1,0,0" Background="{DynamicResource TopFrame_TableBG}">
- <Border BorderBrush="{DynamicResource TopFrame_TableBD_Shadow}" BorderThickness="0,1,0,1" Padding="0,2">
- <TextBlock TextWrapping="NoWrap" Text="{Binding SoftwareVersion}" HorizontalAlignment="Left" VerticalAlignment="Center" Foreground="{DynamicResource TopFrame_TextColor}" FontFamily="Arial" FontSize="16"/>
- </Border>
- </Border>
- <Border Grid.Column="1" BorderBrush="{DynamicResource TopFrame_TableBD_Highlight}" BorderThickness="0,1,0,0" Background="{DynamicResource TopFrame_TableBG}">
- <Border BorderBrush="{DynamicResource TopFrame_TableBD_Shadow}" BorderThickness="0,1,0,1" Padding="0,2">
- <TextBlock TextWrapping="NoWrap" Text="{Binding SystemTime}" HorizontalAlignment="Left" VerticalAlignment="Center" Foreground="{DynamicResource TopFrame_TextColor}" FontFamily="Arial" FontSize="16"/>
- </Border>
- </Border>
- </Grid>
- <Border Grid.Row="1" Grid.Column="6" BorderBrush="{DynamicResource TopFrame_TableBD_Highlight}" BorderThickness="0,0,0,0" Background="{DynamicResource TopFrame_TableBG}">
- <Border BorderBrush="{DynamicResource TopFrame_TableBD_Shadow}" BorderThickness="0,0,1,1" Padding="5,2"/>
- </Border>
- <Border Grid.Row="2" BorderBrush="{DynamicResource TopFrame_TableBD_Highlight}" BorderThickness="1,1,0,0" CornerRadius="0" Background="{DynamicResource TopFrame_TableBG}">
- <Border BorderBrush="{DynamicResource TopFrame_TableBD_Shadow}" BorderThickness="0,0,1,1" CornerRadius="0" Padding="5,2">
- <TextBlock TextWrapping="NoWrap" Text="Log" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{DynamicResource TopFrame_TextColor}" FontFamily="Arial" FontSize="16"/>
- </Border>
- </Border>
- <Border Grid.Row="3" BorderBrush="{DynamicResource TopFrame_TableBD_Highlight}" BorderThickness="1,1,0,0" CornerRadius="0,0,0,6" Background="{DynamicResource TopFrame_TableBG}">
- <Border BorderBrush="{DynamicResource TopFrame_TableBD_Shadow}" BorderThickness="0,0,1,1" CornerRadius="0,0,0,5" Padding="5,2">
- <TextBlock TextWrapping="NoWrap" Text="Alarm" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{DynamicResource TopFrame_TextColor}" FontFamily="Arial" FontSize="16"/>
- </Border>
- </Border>
- <TextBox Grid.Column="1" TextWrapping="Wrap" Text="{Binding RtStatus}" Background="{Binding RtStatusBackground}" Style="{StaticResource TextBox_Top}" Margin="0,0,1,0"/>
- <TextBox Grid.Column="3" TextWrapping="Wrap" Text="{Binding EfemStatus}" Background="{Binding EfemStatusBackground}" Style="{StaticResource TextBox_Top}" Margin="0,0,1,0"/>
- <TextBox Grid.Column="5" TextWrapping="Wrap" Text="{Binding HostCommunicationStatus}" Background="{Binding HostCommunicationStatusBackground}" Style="{StaticResource TextBox_Top}" Margin="0,0,1,0"/>
- <TextBox Grid.Row="1" Grid.Column="1" TextWrapping="Wrap" Text="{Binding PMAStatus}" Background="{Binding PMAStatusBackground}" Style="{StaticResource TextBox_Top}" Margin="0,0,1,0"/>
- <!--<TextBox Grid.Row="1" Grid.Column="3" TextWrapping="Wrap" Text="{Binding PMBStatus}" Background="{Binding PMBStatusBackground}" Style="{StaticResource TextBox_Top}" Margin="0,0,1,0"/>-->
- <Grid Grid.Column="1" Grid.Row="2" Grid.ColumnSpan="6">
- <Grid.ColumnDefinitions>
- <ColumnDefinition />
- <ColumnDefinition Width="Auto"/>
- <ColumnDefinition Width="15"/>
- </Grid.ColumnDefinitions>
- <ComboBox ItemsSource="{Binding EventLogList}" Visibility="{Binding AllEventsVisibility}"
- SelectedIndex="{Binding EventLogList.Count,Mode=OneWay,Converter={StaticResource collectionLastIndexConverter}}"
- VerticalContentAlignment="Center" FontSize="14" Height="Auto">
- <ComboBox.ItemTemplate>
- <DataTemplate>
- <ContentControl>
- <ContentControl.Style>
- <Style TargetType="ContentControl">
- <Setter Property="Background" Value="{StaticResource MessagesInformationBackgroundBrush}"/>
- <Setter Property="FontFamily" Value="Segoe,SimSun" />
- <Setter Property="FontSize" Value="16" />
- <Style.Triggers>
- <DataTrigger Binding="{Binding Level}" Value="Alarm">
- <Setter Property="Foreground" Value="{StaticResource MessagesErrorForegroundBrush}"/>
- </DataTrigger>
- <DataTrigger Binding="{Binding Level}" Value="Warning">
- <Setter Property="Foreground" Value="{StaticResource MessagesWarningForegroundBrush}"/>
- </DataTrigger>
- <DataTrigger Binding="{Binding Level}" Value="Information">
- <Setter Property="Foreground" Value="{StaticResource MessagesInformationForegroundBrush}"/>
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </ContentControl.Style>
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="120"/>
- <ColumnDefinition Width="*"/>
- </Grid.ColumnDefinitions>
- <TextBlock Grid.Column="0" Text="{Binding OccuringTime, Converter={StaticResource dateTimeToTextConverter}}" />
- <TextBlock Grid.Column="1" Text="{Binding Description}" />
- </Grid>
- </ContentControl>
- </DataTemplate>
- </ComboBox.ItemTemplate>
- </ComboBox>
- <!--<ComboBox ItemsSource="{Binding WarnEventLogList}" Visibility="{Binding WarnEventsVisibility}"
- SelectedIndex="{Binding EventLogList.Count,Mode=OneWay,Converter={StaticResource collectionLastIndexConverter}}"
- VerticalContentAlignment="Center" FontSize="14" Height="Auto">
- <ComboBox.ItemTemplate>
- <DataTemplate>
- <ContentControl>
- <ContentControl.Style>
- <Style TargetType="ContentControl">
- <Setter Property="Background" Value="{StaticResource MessagesInformationBackgroundBrush}"/>
- <Setter Property="FontFamily" Value="Calibri" />
- <Setter Property="FontSize" Value="16" />
- <Style.Triggers>
- <DataTrigger Binding="{Binding Level}" Value="Alarm">
- <Setter Property="Foreground" Value="{StaticResource MessagesErrorForegroundBrush}"/>
- </DataTrigger>
- <DataTrigger Binding="{Binding Level}" Value="Warning">
- <Setter Property="Foreground" Value="{StaticResource MessagesWarningForegroundBrush}"/>
- </DataTrigger>
- <DataTrigger Binding="{Binding Level}" Value="Information">
- <Setter Property="Foreground" Value="{StaticResource MessagesInformationForegroundBrush}"/>
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </ContentControl.Style>
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="120"/>
- <ColumnDefinition Width="*"/>
- </Grid.ColumnDefinitions>
- <TextBlock Grid.Column="0" Text="{Binding OccuringTime, Converter={StaticResource dateTimeToTextConverter}}" />
- <TextBlock Grid.Column="1" Text="{Binding Description}" />
- </Grid>
- </ContentControl>
- </DataTemplate>
- </ComboBox.ItemTemplate>
- </ComboBox>-->
- <!--<Border Grid.Column="1" BorderThickness="1" SnapsToDevicePixels="true" BorderBrush="{DynamicResource ComboBox_BD}" Background="{DynamicResource ComboBox_BG}">
- <Border x:Name="InnerBD_Shadow" BorderBrush="{DynamicResource ComboBox_BD_InnerShadow}" BorderThickness="1,1,0,0" Padding="5,1">
- <CheckBox Content="Alarm" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="{DynamicResource FG_Black}" FontFamily="Arial" FontSize="16">
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="Checked">
- <cal:ActionMessage MethodName="ShowAlarmEvents">
- </cal:ActionMessage>
- </i:EventTrigger>
- <i:EventTrigger EventName="Unchecked">
- <cal:ActionMessage MethodName="ShowAllEvents">
- </cal:ActionMessage>
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </CheckBox>
- </Border>
- </Border>-->
- <Border Grid.Column="2" BorderBrush="{DynamicResource TopFrame_TableBD_Highlight}" BorderThickness="0,1,0,0" CornerRadius="0" Background="{DynamicResource TopFrame_TableBG}">
- <Border BorderBrush="{DynamicResource TopFrame_TableBD_Shadow}" BorderThickness="0,0,1,1" CornerRadius="0" Padding="5,2"/>
- </Border>
- </Grid>
- <Grid Grid.Column="1" Grid.Row="3" Grid.ColumnSpan="6">
- <Grid.ColumnDefinitions>
- <ColumnDefinition />
- <ColumnDefinition Width="Auto"/>
- <ColumnDefinition Width="15"/>
- </Grid.ColumnDefinitions>
- <ComboBox ItemsSource="{Binding WarnEventLogList}" Visibility="Visible"
- SelectedIndex="{Binding WarnEventLogList.Count,Mode=OneWay,Converter={StaticResource collectionLastIndexConverter}}"
- VerticalContentAlignment="Center" FontSize="14" Height="Auto" IsDropDownOpen="{Binding IsAlarmListOpen}">
- <ComboBox.ItemTemplate>
- <DataTemplate>
- <ContentControl>
- <ContentControl.Style>
- <Style TargetType="ContentControl">
- <Setter Property="Background" Value="{StaticResource MessagesInformationBackgroundBrush}"/>
- <Setter Property="FontFamily" Value="Calibri" />
- <Setter Property="FontSize" Value="16" />
- <Style.Triggers>
- <DataTrigger Binding="{Binding Level}" Value="Alarm">
- <Setter Property="Foreground" Value="{StaticResource MessagesErrorForegroundBrush}"/>
- </DataTrigger>
- <DataTrigger Binding="{Binding Level}" Value="Warning">
- <Setter Property="Foreground" Value="{StaticResource MessagesWarningForegroundBrush}"/>
- </DataTrigger>
- <DataTrigger Binding="{Binding Level}" Value="Information">
- <Setter Property="Foreground" Value="{StaticResource MessagesInformationForegroundBrush}"/>
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </ContentControl.Style>
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="120"/>
- <ColumnDefinition Width="*"/>
- </Grid.ColumnDefinitions>
- <TextBlock Grid.Column="0" Text="{Binding OccuringTime, Converter={StaticResource dateTimeToTextConverter}}" />
- <TextBlock Grid.Column="1" Text="{Binding Description}" />
- </Grid>
- </ContentControl>
- </DataTemplate>
- </ComboBox.ItemTemplate>
- </ComboBox>
- <Border Grid.Column="2" BorderBrush="{DynamicResource TopFrame_TableBD_Highlight}" BorderThickness="0,1,0,0" CornerRadius="0,0,6,0" Background="{DynamicResource TopFrame_TableBG}">
- <Border BorderBrush="{DynamicResource TopFrame_TableBD_Shadow}" BorderThickness="0,0,1,1" CornerRadius="0,0,5,0" Padding="5,2"/>
- </Border>
- </Grid>
- <StackPanel Grid.Column="7" Grid.RowSpan="3" VerticalAlignment="Center">
- <Grid Margin="5,0,0,0">
- <Grid.ColumnDefinitions>
- <ColumnDefinition />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
- <Button Content="Host Enable" Height="35" IsEnabled="{Binding IsEnableFAEnable}">
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="Click">
- <cal:ActionMessage MethodName="FAEnable"/>
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </Button>
- <Button Grid.Column="1" Content="Host Disable" Margin="5,0,0,0" Height="35" IsEnabled="{Binding IsDisableFAEnable}">
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="Click">
- <cal:ActionMessage MethodName="FADisable"/>
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </Button>
- </Grid>
- <Grid Margin="5,5,0,0">
- <Grid.ColumnDefinitions>
- <ColumnDefinition />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
- <Button Content="Reset" Height="35">
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="Click">
- <cal:ActionMessage MethodName="Reset">
- </cal:ActionMessage>
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </Button>
- <Button Grid.Column="1" Content="Buzzer Off" Margin="5,0,0,0" Height="35">
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="Click">
- <cal:ActionMessage MethodName="BuzzerOff">
- </cal:ActionMessage>
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </Button>
- </Grid>
- </StackPanel>
- </Grid>
- <StackPanel Orientation="Horizontal" Grid.Column="2" Margin="10,8">
- <Border Width="50" BorderThickness="1,1,0,0" BorderBrush="#FF0A1624" Background="#FF396293" CornerRadius="6">
- <Viewbox Width="45" Height="80" >
- <deviceControl:AITSignalTower Width="45" Height="110" DeviceData="{Binding SignalTowerData}"></deviceControl:AITSignalTower>
- </Viewbox>
- </Border>
- <Grid Margin="10,0,0,0">
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto"/>
- <RowDefinition />
- </Grid.RowDefinitions>
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="24"/>
- <RowDefinition Height="24"/>
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="40"/>
- <ColumnDefinition Width="60"/>
- </Grid.ColumnDefinitions>
- <Border BorderBrush="{DynamicResource Table_BD}" CornerRadius="5,0,0,0" BorderThickness="1" Background="{DynamicResource Table_BG_FirstTitle}" Padding="5,1">
- <TextBlock TextWrapping="NoWrap" Text="User" HorizontalAlignment="Left" VerticalAlignment="Center" Foreground="{DynamicResource TopFrame_TextColor}" FontFamily="Arial" FontSize="12"/>
- </Border>
- <Border Grid.Column="1" BorderBrush="{DynamicResource Table_BD}" CornerRadius="0,5,0,0" BorderThickness="0,1,1,1" Background="{DynamicResource Table_BG_Content}" Padding="5,1">
- <TextBlock TextWrapping="NoWrap" Text="{Binding LoginName}" HorizontalAlignment="Left" VerticalAlignment="Center" Foreground="{DynamicResource FG_Black}" FontFamily="Arial" FontSize="12"/>
- </Border>
- <Border Grid.Row="1" BorderBrush="{DynamicResource Table_BD}" CornerRadius="0,0,0,5" BorderThickness="1,0,1,1" Background="{DynamicResource Table_BG_FirstTitle}" Padding="5,1">
- <TextBlock TextWrapping="NoWrap" Text="Role" HorizontalAlignment="Left" VerticalAlignment="Center" Foreground="{DynamicResource TopFrame_TextColor}" FontFamily="Arial" FontSize="12"/>
- </Border>
- <Border Grid.Row="1" Grid.Column="1" BorderBrush="{DynamicResource Table_BD}" CornerRadius="0,0,5,0" BorderThickness="0,0,1,1" Background="{DynamicResource Table_BG_Content}" Padding="5,1">
- <TextBlock TextWrapping="NoWrap" Text="{Binding RoleName}" HorizontalAlignment="Left" VerticalAlignment="Center" Foreground="{DynamicResource FG_Black}" FontFamily="Arial" FontSize="12"/>
- </Border>
- </Grid>
- <Button Grid.Row="1" Width="100" Content="Logout" FontSize="16" Margin="0,5,0,0">
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="Click">
- <cal:ActionMessage MethodName="Logout">
- </cal:ActionMessage>
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </Button>
- </Grid>
- </StackPanel>
- </Grid>
- </Grid>
- <Grid Grid.Row="1" Background="{DynamicResource ContentFrame_BG}">
- <ContentControl x:Name="ActiveItem" cal:View.Context="{Binding Context}" cal:View.Model="{Binding ActiveItem}" Margin="0">
- </ContentControl>
- </Grid>
- <Border x:Name="Sub_Menu_Bar" Grid.Row="2">
- <Menu ItemsSource="{Binding Path=SubMenuItems}" Grid.Row="0" Background="{x:Null}" Margin="3,0,0,0">
- <Menu.ItemTemplate>
- <DataTemplate>
- <TextBlock Margin="1" Text="{Binding Path=ResKey}"/>
- </DataTemplate>
- </Menu.ItemTemplate>
- <Menu.ItemContainerStyle>
- <Style TargetType="MenuItem">
- <Setter Property="Command" Value="{Binding DataContext.MenuItemClickCommand, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}"/>
- <Setter Property="CommandParameter" Value="{ Binding }"/>
- <Setter Property="Background" Value="Transparent"/>
- <Setter Property="Foreground" Value="{DynamicResource SubMenu_FG}"/>
- <Setter Property="FontFamily" Value="Arial"/>
- <Setter Property="MinWidth" Value="100"/>
- <Setter Property="Height" Value="35"/>
- <Setter Property="FontSize" Value="14"/>
- <Setter Property="FontWeight" Value="bold"/>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type MenuItem}">
- <Border x:Name="BG" BorderBrush="{DynamicResource SubMenu_BD_Shadow}" BorderThickness="0,0,2,2" CornerRadius="0,0,5,5" Background="{DynamicResource SubMenu_BG}" Cursor="Hand">
- <Border x:Name="InnerBD" BorderBrush="{DynamicResource SubMenu_BD_Highlight}" BorderThickness="2,0,0,0" CornerRadius="0,0,4,4">
- <ContentPresenter x:Name="contentPresenter" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Margin="6,0" Cursor="Hand" ContentSource="Header" RecognizesAccessKey="True" HorizontalAlignment="Center" VerticalAlignment="Center"/>
- </Border>
- </Border>
- <ControlTemplate.Triggers>
- <DataTrigger Binding="{Binding Selected}" Value="True">
- <Setter Property="Background" TargetName="BG" Value="{DynamicResource SubMenu_BG_Select}"/>
- <Setter Property="BorderBrush" TargetName="BG" Value="{DynamicResource SubMenu_BD_Shadow_Select}"/>
- <Setter Property="BorderBrush" TargetName="InnerBD" Value="{DynamicResource SubMenu_BD_Highlight}"/>
- <Setter Property="Foreground" Value="{DynamicResource SubMenu_FG_Select}"/>
- <Setter Property="FontSize" Value="16"/>
- <Setter Property="Effect" TargetName="contentPresenter">
- <Setter.Value>
- <DropShadowEffect BlurRadius="5" Color="White" ShadowDepth="0"/>
- </Setter.Value>
- </Setter>
- </DataTrigger>
- <Trigger Property="IsHighlighted" Value="True">
- <Setter Property="Background" TargetName="BG" Value="{DynamicResource SubMenu_BG_Select}"/>
- <Setter Property="Foreground" Value="{DynamicResource SubMenu_FG_Select}"/>
- </Trigger>
- <Trigger Property="IsEnabled" Value="false">
- <Setter Property="Foreground" Value="#FF9A9A9A"/>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- </Menu.ItemContainerStyle>
- </Menu>
- </Border>
- <Border x:Name="Bottom_Frame" Grid.Row="3" Background="{DynamicResource BottomFrame_BG}">
- <Border BorderBrush="{DynamicResource BottomFrame_BD}" BorderThickness="0,0,0,1">
- <Menu ItemsSource="{Binding Path=MenuItems}" Grid.Row="0" Background="{x:Null}" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="7,0">
- <Menu.ItemTemplate>
- <DataTemplate>
- <TextBlock Margin="1" Text="{Binding Path=ResKey}"/>
- </DataTemplate>
- </Menu.ItemTemplate>
- <Menu.ItemContainerStyle>
- <Style TargetType="MenuItem">
- <Setter Property="Command" Value="{Binding DataContext.MainMenuItemClickCommand, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}"/>
- <Setter Property="CommandParameter" Value="{ Binding }"/>
- <!--<Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
- <Setter Property="VerticalContentAlignment" Value="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>-->
- <Setter Property="Background" Value="Transparent"/>
- <Setter Property="FontSize" Value="16"/>
- <Setter Property="FontWeight" Value="Bold"/>
- <Setter Property="Margin" Value="10,0,0,0"/>
- <Setter Property="Width" Value="140"/>
- <Setter Property="Height" Value="50"/>
- <Setter Property="Template" Value="{DynamicResource SubMunu_ShowOnTop}"/>
- </Style>
- </Menu.ItemContainerStyle>
- </Menu>
- </Border>
- </Border>
- <Grid.Style>
- <Style>
- <Style.Triggers>
- <DataTrigger Binding="{Binding IsLogin}" Value="False">
- <Setter Property="Grid.Visibility" Value="Collapsed"></Setter>
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </Grid.Style>
- </Grid>
- </Grid>
- </wnd:CustomWnd>
|