齐越消息中心
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

143 lines
7.6 KiB

<c:BWindow x:Class="QYMessageCenter.Client.PopupWindow"
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:QYMessageCenter.Client"
xmlns:c="clr-namespace:SJ.Controls;assembly=SJ.Controls"
xmlns:templateSelector="clr-namespace:QYMessageCenter.Client.TemplateSelector"
mc:Ignorable="d"
Title="PopupWindow" Height="265" Width="350"
MinButtonVisibility="Collapsed"
MaxButtonVisibility="Collapsed"
CloseButtonVisibility="Collapsed"
Topmost="True"
ShowInTaskbar="False"
Style="{StaticResource bwstyle}">
<Window.Resources>
<SolidColorBrush x:Key="Border.Brush" Color="#D7D7D7"/>
<SolidColorBrush x:Key="Border.Background" Color="#8080FF"/>
<SolidColorBrush x:Key="Text.Link.Color" Color="#02A7F0"/>
<SolidColorBrush x:Key="Text.Property.Color" Color="Gray"/>
<Style x:Key="middleTextBlock" TargetType="TextBlock">
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="VerticalAlignment" Value="Center"/>
</Style>
<Style x:Key="LinkButton" TargetType="{x:Type c:BButton}">
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Foreground" Value="{StaticResource Text.Link.Color}"/>
</Style>
<DataTemplate x:Key="Template_PJZS_SHANGJIASHIBAI">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="40"/>
<RowDefinition Height="70"/>
<RowDefinition/>
</Grid.RowDefinitions>
<TextBlock Text="{Binding AppCode,Converter={StaticResource appCodeCtr}}"
VerticalAlignment="Center" Margin="22,0,0,0" FontSize="18"/>
<Grid Grid.Row="1">
<Grid.RowDefinitions>
<RowDefinition Height="25"/>
<RowDefinition Height="25"/>
<RowDefinition/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="90"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<c:BAsyncImage UrlSource="{Binding SpuLogo}" Margin="15,2,0,0" DecodePixelWidth="60" Width="60"
Grid.RowSpan="3"
VerticalAlignment="Top"/>
<TextBlock Text="任务执行失败" Grid.Column="1"/>
<TextBlock Grid.Column="1" Grid.Row="1">
<Run Text="活动:" Foreground="{StaticResource Text.Property.Color}"/>
<Run Text="{Binding ActivityName}"/>
</TextBlock>
<TextBlock Grid.Column="1" Grid.Row="2" VerticalAlignment="Top">
<Run Text="SPU:" Foreground="{StaticResource Text.Property.Color}"/>
<Run Text="{Binding MainProductSpu}"/>
</TextBlock>
</Grid>
<TextBlock Text="{Binding ErrorMsg}"
TextWrapping="Wrap"
Grid.Row="2"
Margin="22,0"/>
</Grid>
</DataTemplate>
<DataTemplate x:Key="Template_PJZS_NOTASK">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="40"/>
<RowDefinition Height="20"/>
<RowDefinition/>
</Grid.RowDefinitions>
<TextBlock Text="{Binding AppCode,Converter={StaticResource appCodeCtr}}"
VerticalAlignment="Center" Margin="22,0,0,0" FontSize="18"/>
<TextBlock Text="无可执行的任务" Grid.Row="1" Margin="22,0" Foreground="{StaticResource Text.Property.Color}"/>
<TextBlock Text="{Binding Content}" Grid.Row="2" Margin="22,0" TextWrapping="Wrap"/>
</Grid>
</DataTemplate>
<DataTemplate x:Key="Template_Normal">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="40"/>
<RowDefinition/>
</Grid.RowDefinitions>
<TextBlock Text="{Binding AppCode,Converter={StaticResource appCodeCtr}}"
VerticalAlignment="Center" Margin="22,0,0,0" FontSize="18"/>
<TextBlock Text="{Binding Content}" Grid.Row="1" Margin="22,0" TextWrapping="Wrap"/>
</Grid>
</DataTemplate>
<templateSelector:MessageTemplateSelector x:Key="mtSelector"
Template_Normal="{StaticResource Template_Normal}"
Template_PJZS_SHANGJIASHIBAI="{StaticResource Template_PJZS_SHANGJIASHIBAI}"
Template_PJZS_NOTASK="{StaticResource Template_PJZS_NOTASK}"/>
</Window.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="32"/>
<RowDefinition/>
<RowDefinition Height="30"/>
</Grid.RowDefinitions>
<Border BorderBrush="{StaticResource Border.Brush}"
Background="{StaticResource Border.Background}"/>
<TextBlock Text="{Binding Msg.Title}" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="14,0,0,0"
Foreground="White" FontSize="14"/>
<c:BButton HorizontalAlignment="Right" Margin="0,0,14,0" BorderThickness="0"
x:Name="btn_Close" Click="btn_Close_Click"
Background="#0CFFFFFF" WindowChrome.IsHitTestVisibleInChrome="True">
<Path x:Name="p" Stretch="Uniform" SnapsToDevicePixels="True" UseLayoutRounding="True"
Data="M814.060 781.227q-67.241-67.241-269.773-269.773 67.241-67.241 269.773-269.773 5.671-6.481 5.671-12.962 0 0-0.81-0.81 0-6.481-4.861-9.722-4.861-4.051-11.342-4.861-0.81 0-0.81 0-5.671 0-11.342 4.861-89.924 89.924-269.773 269.773-67.241-67.241-269.773-269.773-4.861-4.861-12.962-4.861-7.291 0.81-10.532 4.861-5.671 5.671-5.671 11.342 0 6.481 5.671 12.152 89.924 89.924 269.773 269.773-67.241 67.241-269.773 269.773-11.342 11.342 0 23.494 12.152 11.342 23.494 0 89.924-89.924 269.773-269.773 67.241 67.241 269.773 269.773 5.671 5.671 11.342 5.671 5.671 0 12.152-5.671 4.861-5.671 4.861-12.962 0-6.481-4.861-10.532z"
Width="14" Height="14" Stroke="White"/>
</c:BButton>
<c:BButton Style="{StaticResource LinkButton}"
Content="查看详情"
Grid.Row="2"
Margin="22,0,0,0"
HorizontalAlignment="Left"
VerticalAlignment="Top" Visibility="Collapsed"/>
<c:BButton x:Name="btn_showNext" Style="{StaticResource LinkButton}"
Content="下一条"
Grid.Row="2"
Margin="0,0,22,0"
HorizontalAlignment="Right"
VerticalAlignment="Top"
Click="btn_showNext_Click"/>
<ContentControl Content="{Binding Msg,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" ContentTemplateSelector="{StaticResource mtSelector}"
Grid.Row="1"/>
</Grid>
</c:BWindow>