Commit c7a5e460 authored by 姜春辉's avatar 姜春辉

feat: 扩展信息中的图片增加点击放大功能

parent f9662f8a
......@@ -4,9 +4,10 @@
<Dict Caption="基础配置" Name="defaultconfig">
<Key Caption="人脸识别阀值" Name="FaceMinValue" Value="0.85"/>
<Key Caption="人证比对阀值" Name="FaceCardMatch" Value="0"/>
<Key Caption="心跳端口" Name="HeartPort" Value="18083"/>
<Key Caption="心跳端口" Name="HeartPort" Value="15000"/>
<Key Caption="重复登记提示" Name="RepeatMessage" Value="你已经完成确认,欢迎进入海信大厦"/>
<Key Caption="远程认证地址" Name="FaceWebSocket" Value="ws://192.168.1.7:15055/face/sdk2?persontype=访客"/>
<Key Caption="远程认证地址" Name="FaceWebSocket" Value="ws://192.168.1.7:15005/face/sdk2?persontype=访客"/>
<Key Caption="管理员卡片" Name="AdminCard" Value="EEEE,FFF,AAAAA,DDDDD" />
</Dict>
<Dict Caption="识别方式配置" Name="authenticationconfig">
<Key Caption="人脸识别" Name="EnableFace" Value="false"/>
......
......@@ -5,7 +5,7 @@
</startup>
<appSettings>
<add key="ServerIP" value="192.168.1.7"/>
<add key="WebPath" value="http://192.168.1.7:5017/"/>
<add key="WebPath" value="http://192.168.1.7:5000/"/>
<add key="tCode" value="SYL106"/>
</appSettings>
</configuration>
\ No newline at end of file
......@@ -16,6 +16,24 @@ namespace ViewModels.Pages.AppointmentDetailPage
public List<AppointmentItem> Datas { get; set; }
private string _CurrentShowImage;
public string CurrentShowImage
{
get { return _CurrentShowImage; }
set { _CurrentShowImage = value; RaisePropertyChanged("CurrentShowImage"); }
}
private Visibility _ShowFullScreenImage = Visibility.Collapsed;
public Visibility ShowFullScreenImage
{
get { return _ShowFullScreenImage; }
set { _ShowFullScreenImage = value; RaisePropertyChanged("ShowFullScreenImage"); }
}
private AppointmentItem _Appointment;
public AppointmentItem Appointment
......@@ -149,7 +167,17 @@ namespace ViewModels.Pages.AppointmentDetailPage
AlertMessage = "";
});
public RelayCommand<string> ImageFullScreenCommand => new RelayCommand<string>(e =>
{
CurrentShowImage = e;
ShowFullScreenImage = Visibility.Visible;
});
public RelayCommand CloseImageFullScreenCommand => new RelayCommand(() =>
{
ShowFullScreenImage = Visibility.Collapsed;
CurrentShowImage = "";
});
public event Action OnExitClick;
public RelayCommand ExitCommand => new RelayCommand(() =>
......@@ -181,6 +209,8 @@ namespace ViewModels.Pages.AppointmentDetailPage
Appointment = null;
ShowConfirm = false;
ShowAlert = false;
ShowFullScreenImage = Visibility.Collapsed;
CurrentShowImage = "";
}
}
......
......@@ -179,6 +179,16 @@
</ContentControl.RenderTransform>
</ContentControl>
<Button Command="{Binding CloseImageFullScreenCommand}" Visibility="{Binding ShowFullScreenImage}">
<Button.Template>
<ControlTemplate TargetType="Button">
<Border Background="#66000000">
<Image HorizontalAlignment="Center" Source="{Binding CurrentShowImage}" VerticalAlignment="Center" Stretch="Uniform"/>
</Border>
</ControlTemplate>
</Button.Template>
</Button>
<CheckBox x:Name="chk_showconfirm" IsChecked="{Binding ShowConfirm}" Visibility="Collapsed"/>
</Grid>
</Page>
......@@ -103,9 +103,15 @@
TextWrapping="Wrap" VerticalAlignment="Center"
Foreground="#787f8e" FontSize="36"
HorizontalAlignment="Left"/>
<Image Grid.Column="1" Margin="80,0,0,0"
HorizontalAlignment="Right" Stretch="Fill"
Source="{Binding content}"/>
<Button HorizontalAlignment="Right" Grid.Column="1"
Command="{Binding DataContext.ImageFullScreenCommand, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Page}}}"
CommandParameter="{Binding content}">
<Button.Template>
<ControlTemplate TargetType="Button">
<Image Margin="80,0,0,0" MaxHeight="100" Stretch="Uniform" Source="{Binding content}"/>
</ControlTemplate>
</Button.Template>
</Button>
</Grid>
</ControlTemplate>
</Setter.Value>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment