Commit 10dca059 authored by 姜春辉's avatar 姜春辉

增加手动输入身份证号

程序优化
parent c7a5e460
...@@ -7,21 +7,21 @@ ...@@ -7,21 +7,21 @@
<Setter.Value> <Setter.Value>
<ControlTemplate TargetType="ContentControl"> <ControlTemplate TargetType="ContentControl">
<Border Background="#CC000000" > <Border Background="#CC000000" >
<Border Width="860" Height="560" <Border Width="860" Height="800"
Padding="60,0,60,0" Padding="60,0,60,0"
Background="White" CornerRadius="10"> Background="White" CornerRadius="10">
<Grid> <Grid>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="220"/> <RowDefinition Height="200"/>
<RowDefinition/> <RowDefinition/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<TextBlock Text="关注微信公众号预约" <TextBlock Text="使用微信扫一扫预约"
FontSize="60" FontSize="60"
HorizontalAlignment="Left" VerticalAlignment="Center"/> HorizontalAlignment="Left" VerticalAlignment="Center"/>
<gs:IconButton Icon="圆圈叉号" FontSize="100" <gs:IconButton Icon="圆圈叉号" FontSize="100"
Command="{Binding CloseCommand}" Command="{Binding CloseCommand}"
HorizontalAlignment="Right" VerticalAlignment="Center"/> HorizontalAlignment="Right" VerticalAlignment="Center"/>
<Image Source="resources/qrcode.png" VerticalAlignment="Top" Grid.Row="1"/> <Image Height="400" Source="resources/qrcode.png" VerticalAlignment="Top" Grid.Row="1"/>
</Grid> </Grid>
</Border> </Border>
</Border> </Border>
......
EWDRGDEUHHHSBSCBJHHFFEGVJEAZIHBNEBBIJIDJAMBCAJIGAGBBBUDNJQCYHZDBEGGWITANEHJOHCGGHMFXGIJMCREUAMCQGBCTJRINCXJDCZBPHKGOCEGHAGECAQBVJIFTCDCOEFJTBHEXCNINJIIOHNFGDCIIHDFXHXIKJGBVJIBVHJDCAYGHHKAXBBJQIYEPHQFXGMEBGXBSJKJCCMCZHDEBHKCHEXBUCCAJAYCREIDRFVCXAVFGGIFOGRIKHIJSGGIXBRHPGBFEAVHGJAIPJGIWCGJMBNCJBRJGIWFQEMIWHSBQESFYEBAEGJEVIRFAGLCOCHBUHEGIDKBYCDJBGMFDFEIYBQAPJMJDITACAIAFCKEABPBOIUIUJSHBAOGCERGIBJIXDYDOJUFVJJEQJMBAEBJBDIJOJVDWITIYHVHUEJGPGZFMJQCXFJHRENDYGZECGTFSFAFWELJPERDYCRIDCHASIKANCZBRCEDCBGDTBHIYHTAPARAIEYBKJBFMHZHAIQHRJKFOGOFZCYJOHFCUIOGEDNBVBAFKJFIBFZDWCXECHRHKGKCICQAQGTIDERJNCEDRISGCGIGYAYDNFCFMFGCJJQGJDXITINEGDZAPGFHFDXAIFPAAIOHYGOBEHLEIIGBXICBVBIFVAFGFANGYILBSAYHCCYACBXDNHJEUDZCGCWCRDOCQFUAIAOIWFQBDAJIWDSGPGXIXIZILDJHPCKFWDBGAIPFTBWFAANCPIZBTFCEZGPANCKFVFOJGJEELEFGBCTEBEHGQCQCGHDDSFQAOBLHRJCJKDYGDEFFTFZFRCBEGEOERHODYIEIOEKBUJTAUDOGYCNJAHYCKEWGRAECOHYEAFREPAEECAAAECKIKCKEHEYFCHOGJIYAYCBESDMCRBHIRHEFMBMFPGKAUIWAQAZFDJCJPEXJMDZDGCPHUJBFUFSJTIUACERCLFUGEBRGGARFDCMIJDWJQDVDBGAJQBRCXARJRIAACCJJBHTIMGSBBBBDZFTCOEVJODMJDIEAGEPEGAHBLGXENIUHZDXHAHRGMBMEXBECAGKAQILEFFMDIIK
\ No newline at end of file
...@@ -117,6 +117,12 @@ ...@@ -117,6 +117,12 @@
<Reference Include="WindowsBase" /> <Reference Include="WindowsBase" />
<Reference Include="PresentationCore" /> <Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" /> <Reference Include="PresentationFramework" />
<Reference Include="zxing, Version=0.16.11.0, Culture=neutral, PublicKeyToken=4e88037ac681fe60, processorArchitecture=MSIL">
<HintPath>..\packages\ZXing.Net.0.16.11\lib\net45\zxing.dll</HintPath>
</Reference>
<Reference Include="zxing.presentation, Version=0.16.11.0, Culture=neutral, PublicKeyToken=4e88037ac681fe60, processorArchitecture=MSIL">
<HintPath>..\packages\ZXing.Net.0.16.11\lib\net45\zxing.presentation.dll</HintPath>
</Reference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ApplicationDefinition Include="App.xaml"> <ApplicationDefinition Include="App.xaml">
...@@ -219,6 +225,10 @@ ...@@ -219,6 +225,10 @@
<Link>Addons\GS.Terminal.FaceRecognization\OpenCvSharp.UserInterface.dll</Link> <Link>Addons\GS.Terminal.FaceRecognization\OpenCvSharp.UserInterface.dll</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content> </Content>
<Content Include="..\Logic\GS.Terminal.VisitorSelfService.Logic\bin\Debug\agreement.txt">
<Link>Addons\GS.Terminal.VisitorSelfService.Logic\agreement.txt</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="..\Logic\GS.Terminal.VisitorSelfService.Logic\bin\Debug\GS.Terminal.Common.dll"> <Content Include="..\Logic\GS.Terminal.VisitorSelfService.Logic\bin\Debug\GS.Terminal.Common.dll">
<Link>Addons\GS.Terminal.VisitorSelfService.Logic\GS.Terminal.Common.dll</Link> <Link>Addons\GS.Terminal.VisitorSelfService.Logic\GS.Terminal.Common.dll</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
...@@ -332,6 +342,11 @@ ...@@ -332,6 +342,11 @@
<Content Include="log4net.config"> <Content Include="log4net.config">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content> </Content>
<Content Include="..\Logic\GS.Terminal.VisitorSelfService.Logic\bin\Debug\printsetting.json">
<Link>Addons\GS.Terminal.VisitorSelfService.Logic\printsetting.json</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<None Include="ArcFacePro.dat" />
<None Include="packages.config" /> <None Include="packages.config" />
<None Include="Properties\Settings.settings"> <None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator> <Generator>SettingsSingleFileGenerator</Generator>
......
...@@ -10,4 +10,5 @@ ...@@ -10,4 +10,5 @@
<package id="OpenCvSharp3-AnyCPU" version="4.0.0.20181129" targetFramework="net452" /> <package id="OpenCvSharp3-AnyCPU" version="4.0.0.20181129" targetFramework="net452" />
<package id="System.Data.SQLite.Core" version="1.0.112.0" targetFramework="net452" /> <package id="System.Data.SQLite.Core" version="1.0.112.0" targetFramework="net452" />
<package id="System.ValueTuple" version="4.5.0" targetFramework="net452" /> <package id="System.ValueTuple" version="4.5.0" targetFramework="net452" />
<package id="ZXing.Net" version="0.16.11" targetFramework="net452" />
</packages> </packages>
\ No newline at end of file
...@@ -8,11 +8,13 @@ ...@@ -8,11 +8,13 @@
<Key Caption="重复登记提示" Name="RepeatMessage" Value="你已经完成确认,欢迎进入海信大厦"/> <Key Caption="重复登记提示" Name="RepeatMessage" Value="你已经完成确认,欢迎进入海信大厦"/>
<Key Caption="远程认证地址" Name="FaceWebSocket" Value="ws://192.168.1.7:15005/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" /> <Key Caption="管理员卡片" Name="AdminCard" Value="EEEE,FFF,AAAAA,DDDDD" />
<Key Caption="是否打印标签" Name="PrintTag" Value="True"/>
</Dict> </Dict>
<Dict Caption="识别方式配置" Name="authenticationconfig"> <Dict Caption="识别方式配置" Name="authenticationconfig">
<Key Caption="人脸识别" Name="EnableFace" Value="false"/> <Key Caption="人脸识别" Name="EnableFace" Value="false"/>
<Key Caption="二代证识别" Name="EnableIdCard" Value="false"/> <Key Caption="二代证识别" Name="EnableIdCard" Value="true"/>
<Key Caption="二维码识别" Name="EnableQRCode" Value="false"/> <Key Caption="二维码识别" Name="EnableQRCode" Value="false"/>
<Key Caption="手动输入" Name="EnableInputIdCard" Value="true"/>
<!--0是人脸识别 1是二代证识别 2是二维码识别--> <!--0是人脸识别 1是二代证识别 2是二维码识别-->
<Key Caption="默认识别方式" Name="DefaultAuthMode" Value="1"/> <Key Caption="默认识别方式" Name="DefaultAuthMode" Value="1"/>
</Dict> </Dict>
......
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ViewModels.PopWindows.Agreement;
namespace GS.Terminal.VisitorSelfService.Logic.Core
{
public class AgreementHandler : Corebase<ViewModel>
{
public override void Init()
{
VM.OnAgree += VM_OnAgree;
VM.OnRefuse += VM_OnRefuse;
var agreementFile = Path.Combine(Program._Context.Addon.Location, "agreement.txt");
if (File.Exists(agreementFile))
{
VM.Content = File.ReadAllText(agreementFile);
}
}
private void VM_OnRefuse()
{
ThirdAddon.LogicShell.Close(VM);
}
private void VM_OnAgree()
{
ThirdAddon.LogicShell.Close(VM);
var menuHandler = Handlers.GetHandler<MenuPageHandler>();
Handlers.GetHandler<AuthenticationPageHandler>()?.BeginAuth(menuHandler.AuthSuccess,
exitView: vmLocator.MenuPage);
}
}
}
using GalaSoft.MvvmLight.Threading;
using GS.Terminal.Common;
using GS.Terminal.VisitorSelfService.Logic.ThirdAddon;
using OpenCvSharp;
using OpenCvSharp.Extensions;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using ViewModels.PopWindows.Camera;
namespace GS.Terminal.VisitorSelfService.Logic.Core
{
public class CameraHandler : Corebase<ViewModel>
{
private EventWaitHandle _waiter;
private Bitmap _takeBitmap = null;
public override void Init()
{
_waiter = new EventWaitHandle(false, EventResetMode.AutoReset);
VM.OnTake += VM_OnTake;
VM.OnCancel += VM_OnCancel;
VM.OnOpened += VM_OnOpened;
VM.OnClosed += VM_OnClosed;
}
private void VM_OnClosed()
{
FaceRecognization.UnRegistOutPutMatEvent(VideoOut);
VM.Output = null;
}
private void VM_OnOpened()
{
FaceRecognization.RegistOutPutMatEvent(VideoOut);
}
private void VideoOut(Mat mat)
{
DispatcherHelper.CheckBeginInvokeOnUI(() =>
{
VM.Output = mat.ToBitmapSource();
});
}
private void VM_OnCancel()
{
_takeBitmap = null;
_waiter.Set();
}
private void VM_OnTake()
{
_takeBitmap = FaceRecognization.GetCurrentVideoFrame();
_waiter.Set();
}
public Bitmap TakePhoto()
{
Open();
//FaceRecognization.GetCurrentVideoFrame()
_waiter.WaitOne();
ThirdAddon.LogicShell.Close(VM);
return _takeBitmap;
}
}
}
...@@ -42,8 +42,8 @@ namespace GS.Terminal.VisitorSelfService.Logic.Core ...@@ -42,8 +42,8 @@ namespace GS.Terminal.VisitorSelfService.Logic.Core
{ {
if (menuItem == ViewModels.Pages.MenuPage.MenuItemType.HasAppointment) if (menuItem == ViewModels.Pages.MenuPage.MenuItemType.HasAppointment)
{ {
Handlers.GetHandler<AuthenticationPageHandler>()?.BeginAuth(AuthSuccess, Handlers.GetHandler<AgreementHandler>()?.Open();
exitView: vmLocator.MenuPage);
} }
else if (menuItem == ViewModels.Pages.MenuPage.MenuItemType.NoAppointment) else if (menuItem == ViewModels.Pages.MenuPage.MenuItemType.NoAppointment)
{ {
...@@ -56,7 +56,7 @@ namespace GS.Terminal.VisitorSelfService.Logic.Core ...@@ -56,7 +56,7 @@ namespace GS.Terminal.VisitorSelfService.Logic.Core
} }
} }
private async Task<bool> AuthSuccess(AuthenticationMode mode, object data) internal async Task<bool> AuthSuccess(AuthenticationMode mode, object data)
{ {
//((dynamic)data).cardid 身份证芯片号 //((dynamic)data).cardid 身份证芯片号
//((dynamic)data).poto 身份证照片 //((dynamic)data).poto 身份证照片
...@@ -72,7 +72,7 @@ namespace GS.Terminal.VisitorSelfService.Logic.Core ...@@ -72,7 +72,7 @@ namespace GS.Terminal.VisitorSelfService.Logic.Core
{ {
Handlers.GetHandler<AppointmentDetailPageHandler>()?.ShowDetail(findResult, Handlers.GetHandler<AppointmentDetailPageHandler>()?.ShowDetail(findResult,
mode == AuthenticationMode.IdCard ? ((dynamic)data).cardid : "", mode == AuthenticationMode.IdCard ? ((dynamic)data).cardid : "",
mode == AuthenticationMode.IdCard ? File.ReadAllBytes(((dynamic)data).poto) : null); null);//mode == AuthenticationMode.IdCard ? File.ReadAllBytes(((dynamic)data).poto) : null
} }
else else
{ {
...@@ -97,6 +97,11 @@ namespace GS.Terminal.VisitorSelfService.Logic.Core ...@@ -97,6 +97,11 @@ namespace GS.Terminal.VisitorSelfService.Logic.Core
{ {
Handlers.GetHandler<HistoryMenuPageHandler>()?.ShowView(((dynamic)data).number); Handlers.GetHandler<HistoryMenuPageHandler>()?.ShowView(((dynamic)data).number);
} }
else if (mode == AuthenticationMode.InputIdCard)
{
if (data != null)
Handlers.GetHandler<HistoryMenuPageHandler>()?.ShowView(data.ToString());
}
return true; return true;
} }
......
using GalaSoft.MvvmLight;
using GS.Terminal.LogicShell.Interface;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Drawing.Imaging;
using System.Drawing.Printing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Media.Imaging;
using ZXing;
using ZXing.QrCode.Internal;
namespace GS.Terminal.VisitorSelfService.Logic.Core
{
public class PrinterHandler
{
private static PrinterHandler printerHandler;
public static PrinterHandler GetPrinter()
{
if (printerHandler == null)
printerHandler = new PrinterHandler();
return printerHandler;
}
private PrinterSetting printerSetting;
private PrinterHandler() { }
public void Init()
{
var content = Read("printsetting.json");
try
{
if (!string.IsNullOrEmpty(content))
{
var entity = JsonConvert.DeserializeObject<PrinterSetting>(content);
printerSetting = entity;
}
}
catch (Exception ex)
{
}
}
public void Print(DataEntityModel data)
{
PrintDocument pd = new PrintDocument();
pd.PrintPage += (sender, e) =>
{
Draw(e.Graphics, data);
};
pd.DefaultPageSettings.PrinterSettings.PrinterName = printerSetting.PrinterName; //打印机名称
pd.DefaultPageSettings.Landscape = false; //设置横向打印,不设置默认是纵向的
pd.PrintController = new StandardPrintController();
pd.EndPrint += (sender, e) => { };
pd.BeginPrint += (sender, e) => { };
pd.Print();
}
private string Read(string cachename)
{
var path = Path.Combine(Program._Context.Addon.Location, cachename);
if (File.Exists(path))
{
try
{
return File.ReadAllText(path);
}
catch (Exception ex)
{
}
}
return "";
}
private string getContent(string content, DataEntityModel data)
{
if (content.Contains("${visitorname}"))
{
return content.Replace("${visitorname}", data.visitorname ?? "");
}
if (content.Contains("${phone}"))
{
return content.Replace("${phone}", data.phone);
}
if (content.Contains("${visitcompany}"))
{
//if (string.IsNullOrEmpty(data.visitcompany)) data.visitcompany = "-";
//if (data.visitcompany.Length > 7)
// data.visitcompany = data.visitcompany.Substring(0, 7);
return content.Replace("${visitcompany}", data.visitcompany);
}
if (content.Contains("${visitempname}"))
{
return content.Replace("${visitempname}", data.visitempname ?? "");
}
if (content.Contains("${idcard}"))
{
return content.Replace("${idcard}", data.idcard ?? "");
}
if (content.Contains("${cardnum}"))
{
return content.Replace("${cardnum}", data.cardnum ?? "");
}
if (content.Contains("${id}"))
{
return content.Replace("${id}", data.id ?? "");
}
if (content.Contains("${visitdepart}"))
{
//if (string.IsNullOrEmpty(data.visitdepart)) data.visitdepart = "-";
//if (data.visitdepart.Length > 10)
// data.visitdepart = data.visitdepart.Substring(0, 10);
return content.Replace("${visitdepart}", data.visitdepart ?? "");
}
if (content.Contains("${visittime}"))
{
var sp = content.Split('|');
if (sp.Length == 2)
{
var ostr = "${visittime}|" + sp[1];
return content.Replace(ostr, data.visittime.ToString(sp[1]));
}
else
{
return content.Replace("${visittime}", data.visittime.ToString("yyyy年MM月dd日"));
}
}
if (content.Contains("${qrcode}"))
{
return content.Replace("${qrcode}", data.qrcode);
}
return content;
}
private void Draw(Graphics graphics, DataEntityModel data)
{
foreach (var item in printerSetting.Fields)
{
graphics.DrawString(getContent(item.Content, data), new Font(item.FontFamily, item.FontSize), Brushes.Black, new PointF(item.X, item.Y));
}
if (printerSetting.QRCode != null)
{
BarcodeWriter writer = new BarcodeWriter();
writer.Format = BarcodeFormat.QR_CODE;
writer.Options.Margin = 0;
writer.Options.Hints.Add(EncodeHintType.MIN_SIZE, new Dimension(printerSetting.QRCode.Width - 5, printerSetting.QRCode.Height - 5));
writer.Options.Height = 300;
writer.Options.Width = 300;
writer.Options.PureBarcode = false;
var content = getContent(printerSetting.QRCode.Content, data);
var qdimg = writer.Write(content);
graphics.DrawImage(qdimg, printerSetting.QRCode.X, printerSetting.QRCode.Y, printerSetting.QRCode.Width, printerSetting.QRCode.Height);
}
}
}
public class PrinterSetting
{
public string PrinterName { get; set; }
public List<PrintItemSetting> Fields { get; set; }
public PrtingItemSetting_QRCode QRCode { get; set; }
}
public class PrintItemSetting
{
private string _ItemName;
public string ItemName
{
get { return _ItemName; }
set { _ItemName = value; }
}
private string _Content;
public string Content
{
get { return _Content; }
set { _Content = value; }
}
private int _FontSize;
public int FontSize
{
get { return _FontSize; }
set { _FontSize = value; }
}
private string _FontFamily;
public string FontFamily
{
get { return _FontFamily; }
set { _FontFamily = value; }
}
private int _X;
public int X
{
get { return _X; }
set { _X = value; }
}
private int _Y;
public int Y
{
get { return _Y; }
set { _Y = value; }
}
}
public class PrtingItemSetting_QRCode : PrintItemSetting
{
public int Height { get; set; }
public int Width { get; set; }
}
public class DataEntityModel
{
public string id { get; set; }
public string cardnum { get; set; }
public string phone { get; set; }
public string idcard { get; set; }
public string visitorname { get; set; }
public DateTime visittime { get; set; }
public string visitcompany { get; set; }
public string visitdepart { get; set; }
public string visitempname { get; set; }
public string qrcode { get; set; }
}
}
...@@ -108,10 +108,18 @@ ...@@ -108,10 +108,18 @@
<HintPath>..\..\packages\WebSocket4Net.0.15.2\lib\net45\WebSocket4Net.dll</HintPath> <HintPath>..\..\packages\WebSocket4Net.0.15.2\lib\net45\WebSocket4Net.dll</HintPath>
</Reference> </Reference>
<Reference Include="WindowsBase" /> <Reference Include="WindowsBase" />
<Reference Include="zxing, Version=0.16.11.0, Culture=neutral, PublicKeyToken=4e88037ac681fe60, processorArchitecture=MSIL">
<HintPath>..\..\packages\ZXing.Net.0.16.11\lib\net45\zxing.dll</HintPath>
</Reference>
<Reference Include="zxing.presentation, Version=0.16.11.0, Culture=neutral, PublicKeyToken=4e88037ac681fe60, processorArchitecture=MSIL">
<HintPath>..\..\packages\ZXing.Net.0.16.11\lib\net45\zxing.presentation.dll</HintPath>
</Reference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="Core\AgreementHandler.cs" />
<Compile Include="Core\AppointmentDetailPageHandler.cs" /> <Compile Include="Core\AppointmentDetailPageHandler.cs" />
<Compile Include="Core\AuthenticationPageHandler.cs" /> <Compile Include="Core\AuthenticationPageHandler.cs" />
<Compile Include="Core\CameraHandler.cs" />
<Compile Include="Core\Corebase.cs" /> <Compile Include="Core\Corebase.cs" />
<Compile Include="Core\FootHandler.cs" /> <Compile Include="Core\FootHandler.cs" />
<Compile Include="Core\HeadHandler.cs" /> <Compile Include="Core\HeadHandler.cs" />
...@@ -121,6 +129,7 @@ ...@@ -121,6 +129,7 @@
<Compile Include="Core\MenuPageHandler.cs" /> <Compile Include="Core\MenuPageHandler.cs" />
<Compile Include="Core\MenuPageHandler.FindAppointment.cs" /> <Compile Include="Core\MenuPageHandler.FindAppointment.cs" />
<Compile Include="Core\NoAppointmentHandler.cs" /> <Compile Include="Core\NoAppointmentHandler.cs" />
<Compile Include="Core\PrinterHandler.cs" />
<Compile Include="Core\SubmitVisitInfoResultHandler.cs" /> <Compile Include="Core\SubmitVisitInfoResultHandler.cs" />
<Compile Include="Handlers.cs" /> <Compile Include="Handlers.cs" />
<Compile Include="LocalSetting.cs" /> <Compile Include="LocalSetting.cs" />
...@@ -133,6 +142,7 @@ ...@@ -133,6 +142,7 @@
<Compile Include="Remote\Models\WebApiPagingResponseBody.cs" /> <Compile Include="Remote\Models\WebApiPagingResponseBody.cs" />
<Compile Include="Remote\Models\WebApiResponseBody.cs" /> <Compile Include="Remote\Models\WebApiResponseBody.cs" />
<Compile Include="Remote\WebApi.cs" /> <Compile Include="Remote\WebApi.cs" />
<Compile Include="SecondCardWebApi.cs" />
<Compile Include="ThirdAddon\DeviceManager.cs" /> <Compile Include="ThirdAddon\DeviceManager.cs" />
<Compile Include="ThirdAddon\FaceRecognization.cs" /> <Compile Include="ThirdAddon\FaceRecognization.cs" />
<Compile Include="ThirdAddon\FastRecognization.cs" /> <Compile Include="ThirdAddon\FastRecognization.cs" />
...@@ -144,6 +154,12 @@ ...@@ -144,6 +154,12 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="packages.config" /> <None Include="packages.config" />
<Content Include="agreement.txt">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="printsetting.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="Config.xml"> <Content Include="Config.xml">
......
...@@ -27,6 +27,7 @@ namespace GS.Terminal.VisitorSelfService.Logic ...@@ -27,6 +27,7 @@ namespace GS.Terminal.VisitorSelfService.Logic
public bool EnableFace { get; set; } public bool EnableFace { get; set; }
public bool EnableIdCard { get; set; } public bool EnableIdCard { get; set; }
public bool EnableQRCode { get; set; } public bool EnableQRCode { get; set; }
public bool EnableInputIdCard { get; set; }
public ViewModels.Pages.AuthenticationPage.AuthenticationMode DefaultAuthMode { get; set; } public ViewModels.Pages.AuthenticationPage.AuthenticationMode DefaultAuthMode { get; set; }
public string DictName => "authenticationconfig"; public string DictName => "authenticationconfig";
} }
...@@ -39,6 +40,7 @@ namespace GS.Terminal.VisitorSelfService.Logic ...@@ -39,6 +40,7 @@ namespace GS.Terminal.VisitorSelfService.Logic
public bool DisableVideoDetect { get; set; } public bool DisableVideoDetect { get; set; }
public string FaceWebSocket { get; set; } public string FaceWebSocket { get; set; }
public string AdminCard { get; set; } public string AdminCard { get; set; }
public bool PrintTag { get; set; }
public string DictName => "defaultconfig"; public string DictName => "defaultconfig";
} }
......
using GS.Terminal.VisitorSelfService.Logic.Remote; using GS.Terminal.VisitorSelfService.Logic.Core;
using GS.Terminal.VisitorSelfService.Logic.Remote;
using GS.Terminal.VisitorSelfService.Logic.ThirdAddon; using GS.Terminal.VisitorSelfService.Logic.ThirdAddon;
using GS.Unitive.Framework.Core; using GS.Unitive.Framework.Core;
using GS.Unitive.Framework.Persistent; using GS.Unitive.Framework.Persistent;
using Microsoft.VisualBasic.ApplicationServices; using Microsoft.VisualBasic.ApplicationServices;
using Newtonsoft.Json;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics;
using System.Linq; using System.Linq;
using System.Net.NetworkInformation; using System.Net.NetworkInformation;
using System.Runtime.Remoting.Contexts;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using ViewModels; using ViewModels;
...@@ -41,6 +45,7 @@ namespace GS.Terminal.VisitorSelfService.Logic ...@@ -41,6 +45,7 @@ namespace GS.Terminal.VisitorSelfService.Logic
private void Instance_onRuntimeCompleted(object sender) private void Instance_onRuntimeCompleted(object sender)
{ {
_Context.Logger.Debug("配置->" + JsonConvert.SerializeObject(LocalSetting.AddonDefaultConfig), null);
var manager = new ObjectSpaceManager(); var manager = new ObjectSpaceManager();
_ObjectSpace = manager.CreateObjectSpace(_Context, "c1"); _ObjectSpace = manager.CreateObjectSpace(_Context, "c1");
_ObjectSpace.UpdateDataSchema(); _ObjectSpace.UpdateDataSchema();
...@@ -59,9 +64,13 @@ namespace GS.Terminal.VisitorSelfService.Logic ...@@ -59,9 +64,13 @@ namespace GS.Terminal.VisitorSelfService.Logic
goto RETRY; goto RETRY;
} }
TerminalConsole.StartHeart(LocalSetting.AppConfig.ServerIP, LocalSetting.AddonDefaultConfig.HeartPort, 30 * 1000); TerminalConsole.StartHeart(LocalSetting.AppConfig.ServerIP, LocalSetting.AddonDefaultConfig.HeartPort, 30 * 1000);
ThirdAddon.LogicShell.ShowView(vmLocator.MenuPage); ThirdAddon.LogicShell.ShowView(vmLocator.MenuPage);
}); });
if (LocalSetting.AddonDefaultConfig.PrintTag)
{
PrinterHandler.GetPrinter().Init();
}
} }
public void Stop(IAddonContext Context) public void Stop(IAddonContext Context)
......
...@@ -13,11 +13,13 @@ namespace GS.Terminal.VisitorSelfService.Logic.Remote.Models ...@@ -13,11 +13,13 @@ namespace GS.Terminal.VisitorSelfService.Logic.Remote.Models
public string visitorName { get; set; } public string visitorName { get; set; }
public string visitorIdNum { get; set; } public string visitorIdNum { get; set; }
public string visitorPhone { get; set; } public string visitorPhone { get; set; }
public string visitorCompany { get; set; }
public DateTime startDate { get; set; } public DateTime startDate { get; set; }
public DateTime endDate { get; set; } public DateTime endDate { get; set; }
public string visitArea { get; set; } public string visitArea { get; set; }
public int numberOfPeople { get; set; } public int numberOfPeople { get; set; }
public string visitPerson { get; set; } public string visitPerson { get; set; }
public string visitDepart { get; set; }
public int todayvisittimes { get; set; } public int todayvisittimes { get; set; }
public List<AppointmentExtendInfo> extendInfo { get; set; } public List<AppointmentExtendInfo> extendInfo { get; set; }
} }
......
...@@ -11,4 +11,9 @@ namespace GS.Terminal.VisitorSelfService.Logic.Remote.Models ...@@ -11,4 +11,9 @@ namespace GS.Terminal.VisitorSelfService.Logic.Remote.Models
public bool Status { get; set; } public bool Status { get; set; }
public string Message { get; set; } public string Message { get; set; }
} }
public class WebApiResponseBodyWithData<T> : WebApiResponseBody
{
public T record { get; set; }
}
} }
...@@ -136,11 +136,61 @@ namespace GS.Terminal.VisitorSelfService.Logic.Remote ...@@ -136,11 +136,61 @@ namespace GS.Terminal.VisitorSelfService.Logic.Remote
} }
public static string GetMACAddress() public static string GetMACAddress()
{ {
NetworkInterface[] interfaces = NetworkInterface.GetAllNetworkInterfaces(); try
NetworkInterface current = interfaces.FirstOrDefault(ss => ss.OperationalStatus == OperationalStatus.Up); {
if (current == null)//如果当前没有可用的就选第一个 // 定义有线网卡的类型列表(以太网和千兆以太网)
current = interfaces.FirstOrDefault(); NetworkInterfaceType[] wiredTypes =
return BitConverter.ToString(current.GetPhysicalAddress().GetAddressBytes()); {
NetworkInterfaceType.Ethernet,
NetworkInterfaceType.Ethernet3Megabit,
NetworkInterfaceType.FastEthernetT,
NetworkInterfaceType.FastEthernetFx,
NetworkInterfaceType.GigabitEthernet
};
// 获取所有网络接口
var interfaces = NetworkInterface.GetAllNetworkInterfaces();
// 优先选择:状态为Up的有线网卡
var wiredNic = interfaces.FirstOrDefault(nic =>
wiredTypes.Contains(nic.NetworkInterfaceType) &&
nic.OperationalStatus == OperationalStatus.Up &&
!nic.Description.Contains("Virtual") && // 排除虚拟网卡
!nic.Description.Contains("VPN") && // 排除VPN
!nic.Description.Contains("Hyper-V") && // 排除Hyper-V
nic.GetPhysicalAddress()?.GetAddressBytes()?.Length == 6); // 确保是标准MAC
// 其次:选择任意有线网卡
if (wiredNic == null)
{
wiredNic = interfaces.FirstOrDefault(nic =>
wiredTypes.Contains(nic.NetworkInterfaceType) &&
!nic.Description.Contains("Virtual") &&
!nic.Description.Contains("VPN") &&
!nic.Description.Contains("Hyper-V") &&
nic.GetPhysicalAddress()?.GetAddressBytes()?.Length == 6);
}
if (wiredNic == null)
{
return string.Empty;
}
// 获取MAC地址并格式化为标准格式
var macBytes = wiredNic.GetPhysicalAddress().GetAddressBytes();
if (macBytes == null || macBytes.Length != 6)
{
return string.Empty;
}
return string.Join("-", macBytes.Select(b => b.ToString("X2")));
}
catch (Exception ex)
{
// 记录日志或处理异常
Console.WriteLine($"Error getting MAC address: {ex.Message}");
return string.Empty;
}
} }
/// <summary> /// <summary>
/// 设备签到 /// 设备签到
...@@ -148,7 +198,9 @@ namespace GS.Terminal.VisitorSelfService.Logic.Remote ...@@ -148,7 +198,9 @@ namespace GS.Terminal.VisitorSelfService.Logic.Remote
/// <returns></returns> /// <returns></returns>
public static (bool success, string message) Signature() public static (bool success, string message) Signature()
{ {
_terminaltoken = GetTAsync<TerminalToken>($"/api/GS.WebApi.Terminal/TerminalConsole/Signature?tCode={LocalSetting.AppConfig.tCode}&tMacCode={GetMACAddress()}", false).Result; var mac = GetMACAddress();
Program._Context.Logger.Debug("当前Mac地址为:" + mac);
_terminaltoken = GetTAsync<TerminalToken>($"/api/GS.WebApi.Terminal/TerminalConsole/Signature?tCode={LocalSetting.AppConfig.tCode}&tMacCode={mac}", false).Result;
if (_terminaltoken == null) return (false, "网络异常,设备注册失败"); if (_terminaltoken == null) return (false, "网络异常,设备注册失败");
if (!_terminaltoken.Status) return (false, $"设备注册失败.原因:{_terminaltoken.Message}"); if (!_terminaltoken.Status) return (false, $"设备注册失败.原因:{_terminaltoken.Message}");
_token = _terminaltoken.tToken; _token = _terminaltoken.tToken;
...@@ -157,7 +209,9 @@ namespace GS.Terminal.VisitorSelfService.Logic.Remote ...@@ -157,7 +209,9 @@ namespace GS.Terminal.VisitorSelfService.Logic.Remote
public static async Task<(bool success, string message)> SignatureAsync() public static async Task<(bool success, string message)> SignatureAsync()
{ {
_terminaltoken = await GetTAsync<TerminalToken>($"/api/GS.WebApi.Terminal/TerminalConsole/Signature?tCode={LocalSetting.AppConfig.tCode}&tMacCode={GetMACAddress()}"); var mac = GetMACAddress();
Program._Context.Logger.Debug("当前Mac地址为:" + mac);
_terminaltoken = await GetTAsync<TerminalToken>($"/api/GS.WebApi.Terminal/TerminalConsole/Signature?tCode={LocalSetting.AppConfig.tCode}&tMacCode={mac}");
if (_terminaltoken == null) return (false, "网络异常,设备注册失败"); if (_terminaltoken == null) return (false, "网络异常,设备注册失败");
if (!_terminaltoken.Status) return (false, $"设备注册失败.原因:{_terminaltoken.Message}"); if (!_terminaltoken.Status) return (false, $"设备注册失败.原因:{_terminaltoken.Message}");
_token = _terminaltoken.tToken; _token = _terminaltoken.tToken;
......
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
namespace GS.Terminal.VisitorSelfService.Logic
{
public class SecondCardWebApi
{
public async static Task<SecondCardInfo> ReadAsync()
{
var apiUrl = "http://localhost:8989/api/ReadMsg";
HttpClient client = new HttpClient();
try
{
var response = await client.GetAsync(apiUrl);
if (response.IsSuccessStatusCode)
{
var responseContent = await response.Content.ReadAsStringAsync();
var entity = JsonConvert.DeserializeObject<SecondCardInfo>(responseContent);
if (entity != null)
{
return entity;
}
}
else
{
Program._Context.Logger.Error("二代证读卡器服务异常", null);
}
}
catch (Exception e)
{
Program._Context.Logger.Error("二代证读卡器服务调用异常", e);
}
return null;
}
public class SecondCardInfo
{
public string code { get; set; }
public string retcode { get; set; }
public string retmsg { get; set; }
public string errmsg { get; set; }
public string name { get; set; }
public string sex { get; set; }
public string nation { get; set; }
public string born { get; set; }
public string address { get; set; }
public string cardno { get; set; }
public string userlifeb { get; set; }
public string userlifee { get; set; }
public string police { get; set; }
public string CardType { get; set; }
public string CardTypeName { get; set; }
public string Reserved { get; set; }
public string EngName { get; set; }
public string CertVol { get; set; }
public string PassID { get; set; }
public string IssuesTimes { get; set; }
public string FpDescribe { get; set; }
public string FpData { get; set; }
public string FpFingerName1 { get; set; }
public string FpQuality1 { get; set; }
public string FpRegResult1 { get; set; }
public string FpFeature1 { get; set; }
public string FpFingerName2 { get; set; }
public string FpQuality2 { get; set; }
public string FpRegResult2 { get; set; }
public string FpFeature2 { get; set; }
public string photobase64 { get; set; }
public string frontImg { get; set; }
public string backImg { get; set; }
}
}
}
...@@ -14,5 +14,146 @@ namespace GS.Terminal.VisitorSelfService.Logic ...@@ -14,5 +14,146 @@ namespace GS.Terminal.VisitorSelfService.Logic
return $"{LocalSetting.AppConfig.WebPath.TrimEnd('/')}/FileStore/Image/{resourceid}?q=H"; return $"{LocalSetting.AppConfig.WebPath.TrimEnd('/')}/FileStore/Image/{resourceid}?q=H";
} }
/// <summary>
/// 生成授权码
/// </summary>
/// <param name="IDCode">ID编号</param>
/// <param name="IDType">ID编号类型 0 卡号 1工号 2身份证</param>
/// <param name="startDate">开始时间</param>
/// <param name="endDate">结束时间</param>
/// <returns>授权码</returns>
/// <exception cref="Exception"></exception>
public static string Generate(string IDCode, int IDType, DateTime startDate, DateTime endDate)
{
DateTime minDate = new DateTime(1970, 1, 1, 8, 0, 0);//标准时间
uint startSeconds = (uint)(startDate - minDate).TotalSeconds;
uint endSeconds = (uint)(endDate - minDate).TotalSeconds;
if (endSeconds <= startSeconds) throw new Exception("结束时间必须大于开始时间");
uint totalMin = (endSeconds - startSeconds) / 60u;
byte[] data = new byte[64];
data[0] = 16;
int dataLength = 0;
if (IDType == 0)
{
//物理卡号
ulong cardNo;
try
{
cardNo = Convert.ToUInt64(IDCode,16);
}
catch
{
throw new Exception("卡号不正确"+IDCode);
}
if (cardNo > ulong.MaxValue - 1)
{
throw new Exception("卡号不符合规则 : 过大");
}
dataLength = 4;
data[1] = (byte)dataLength;
data[2] = (byte)(cardNo >> 24);
data[3] = (byte)(cardNo >> 16);
data[4] = (byte)(cardNo >> 8);
data[5] = (byte)(cardNo);
}
else if (IDType == 1)
{
//员工ID
byte[] bytes = Encoding.Default.GetBytes(IDCode);//1. 将员工号转成byte数组
dataLength = (byte)IDCode.Length;
data[1] = (byte)dataLength;//1.1 将员工号长度转成16进制放入数组 1 下标
for (int i = 0; i < IDCode.Length; i++)
{
data[2 + i] = bytes[i];
}
}
else if (IDType == 2)
{
//身份证
if (IDCode.Length != 18) throw new Exception("不合法的身份证号");
uint[] array2 = new uint[2];
char[] array3 = new char[1];
try
{
array2[0] = Convert.ToUInt32(IDCode.Substring(0, 9), 10);
array2[1] = Convert.ToUInt32(IDCode.Substring(9, 8), 10);
if (IDCode.Substring(17, 1) == "x" || IDCode.Substring(17, 1) == "X")
{
array3[0] = 'X';
}
else
{
array3 = IDCode.ToCharArray(17, 1);
if (array3[0] < '0' || array3[0] > '9') throw new Exception("身份证号格式错误");
}
}
catch
{
throw new Exception("身份证号格式错误");
}
dataLength = 9;
data[1] = (byte)dataLength;
data[2] = (byte)(array2[0] >> 24);
data[3] = (byte)(array2[0] >> 16);
data[4] = (byte)(array2[0] >> 8);
data[5] = (byte)(array2[0]);
data[6] = (byte)(array2[1] >> 24);
data[7] = (byte)(array2[1] >> 16);
data[8] = (byte)(array2[1] >> 8);
data[9] = (byte)(array2[1]);
//for (int i = 0; i < 4; i++)
//{
// data[i + 2] = (byte)(array2[0] >> 24);
// array2[0] <<= 8;
// data[i + 6] = (byte)(array2[1] >> 24);
// array2[1] <<= 8;
//}
data[10] = (byte)array3[0];
}
else throw new Exception("不正确的类别");
data[dataLength + 2] = 17;
data[dataLength + 3] = 4;
data[dataLength + 4] = (byte)(startSeconds >> 24);
data[dataLength + 5] = (byte)(startSeconds >> 16);
data[dataLength + 6] = (byte)(startSeconds >> 8);
data[dataLength + 7] = (byte)startSeconds;
data[dataLength + 8] = 18;
data[dataLength + 9] = 2;
data[dataLength + 10] = (byte)(totalMin / 256u);
data[dataLength + 11] = (byte)(totalMin % 256u);
Random random = new Random();
byte salt = (byte)random.Next(1, 255);
data[dataLength + 12] = salt;//随机加密盐
data[dataLength + 13] = 0;
int last = dataLength + 13;
for (int i = 0; i < dataLength + 13; i++)
{
data[last] += (byte)data[i];
}
//对每一位数据根据加密盐进行异或运算, 得到现在值.
for (int i = 0; i < dataLength + 14; i++)
{
data[i] += (byte)(i + 1);
if (i <= dataLength + 11)
{
if (i % 2 == 0)//如果是偶数位用加密盐异或
{
data[i] ^= salt;
}
else
{
data[i] ^= (byte)(255 - salt);//如果是奇数位,则用255 - 密码盐 异或
}
}
}
string result = "VMS://v001.";
result += Convert.ToBase64String(data, 0, (int)(dataLength + 14));//转成base64字符串
return result;
}
} }
} }
为方便便捷地给您提供门禁服务您可使用我们的人脸识别服务,当您使用人脸识别服务时,我们会收集您的姓名、员工卡号、面部图像信息*,
本项服务为员工自愿行为,若您拒绝授予上述权限,您将无法使用以上业务的人脸识别功能,
但是我们仍会提供员工卡、电子胸卡等方式保障您可以正常使用以上业务。
如果您对人脸信息的处理有投诉、建议、疑问,
您可以通过【DHR)隐私政策公布的渠道联系我们。
为方便便捷地给您提供门禁服务您可使用我们的人脸识别服务,当您使用人脸识别服务时,我们会收集您的姓名、员工卡号、面部图像信息*,
本项服务为员工自愿行为,若您拒绝授予上述权限,您将无法使用以上业务的人脸识别功能,
但是我们仍会提供员工卡、电子胸卡等方式保障您可以正常使用以上业务。
如果您对人脸信息的处理有投诉、建议、疑问,
您可以通过【DHR)隐私政策公布的渠道联系我们。
\ No newline at end of file
...@@ -11,4 +11,5 @@ ...@@ -11,4 +11,5 @@
<package id="SuperSocket.ClientEngine.Core" version="0.10.0" targetFramework="net452" /> <package id="SuperSocket.ClientEngine.Core" version="0.10.0" targetFramework="net452" />
<package id="System.ValueTuple" version="4.5.0" targetFramework="net452" /> <package id="System.ValueTuple" version="4.5.0" targetFramework="net452" />
<package id="WebSocket4Net" version="0.15.2" targetFramework="net452" /> <package id="WebSocket4Net" version="0.15.2" targetFramework="net452" />
<package id="ZXing.Net" version="0.16.11" targetFramework="net452" />
</packages> </packages>
\ No newline at end of file
{
"PrinterName": "",
"Fields": [
{
"ItemName": "主标题",
"Content": "海信集团 - 黄岛产业园 - 访客",
"FontSize": 12,
"FontFamily": "方正小标宋简体",
"X": 15,
"Y": 20
},
{
"ItemName": "名称",
"Content": "来访日期",
"FontSize": 9,
"FontFamily": "黑体",
"X": 5,
"Y": 65
},
{
"ItemName": "名称",
"Content": "${visittime}|MM-dd HH:mm",
"FontSize": 11,
"FontFamily": "黑体",
"X": 65,
"Y": 62
},
{
"ItemName": "访客姓名",
"Content": "访客姓名",
"FontSize": 9,
"FontFamily": "黑体",
"X": 5,
"Y": 92
},
{
"ItemName": "访客姓名",
"Content": "${visitorname}",
"FontSize": 11,
"FontFamily": "黑体",
"X": 65,
"Y": 90
},
{
"ItemName": "访客单位",
"Content": "访客单位",
"FontSize": 9,
"FontFamily": "黑体",
"X": 5,
"Y": 122
},
{
"ItemName": "访客单位",
"Content": "${visitcompany}",
"FontSize": 11,
"FontFamily": "黑体",
"X": 65,
"Y": 120
},
{
"ItemName": "被访部门",
"Content": "被访部门",
"FontSize": 9,
"FontFamily": "黑体",
"X": 5,
"Y": 152
},
{
"ItemName": "被访部门",
"Content": "${visitdepart}",
"FontSize": 11,
"FontFamily": "黑体",
"X": 65,
"Y": 150
},
{
"ItemName": "当日有效",
"Content": "当日有效",
"FontSize": 8,
"FontFamily": "黑体",
"X": 100,
"Y": 175
}
],
"QRCode": {
"Height": 80,
"Width": 80,
"ItemName": null,
"Content": "${id}",
"FontSize": 0,
"FontFamily": null,
"X": 180,
"Y": 60
}
}
\ No newline at end of file
...@@ -27,6 +27,8 @@ namespace ViewModels ...@@ -27,6 +27,8 @@ namespace ViewModels
CheckRegistVM<Pages.HistoryMenuPage.ViewModel>(); CheckRegistVM<Pages.HistoryMenuPage.ViewModel>();
CheckRegistVM<Pages.SubmitVisitInfoResult.ViewModel>(); CheckRegistVM<Pages.SubmitVisitInfoResult.ViewModel>();
CheckRegistVM<PopWindows.NoAppointment.ViewModel>(); CheckRegistVM<PopWindows.NoAppointment.ViewModel>();
CheckRegistVM<PopWindows.Agreement.ViewModel>();
CheckRegistVM<PopWindows.Camera.ViewModel>();
} }
private void CheckRegistVM<T>() where T : class private void CheckRegistVM<T>() where T : class
...@@ -112,5 +114,9 @@ namespace ViewModels ...@@ -112,5 +114,9 @@ namespace ViewModels
} }
public PopWindows.NoAppointment.ViewModel NoAppointment => SimpleIoc.Default.GetInstance<PopWindows.NoAppointment.ViewModel>(); public PopWindows.NoAppointment.ViewModel NoAppointment => SimpleIoc.Default.GetInstance<PopWindows.NoAppointment.ViewModel>();
public PopWindows.Agreement.ViewModel Agreement => SimpleIoc.Default.GetInstance<PopWindows.Agreement.ViewModel>();
public PopWindows.Camera.ViewModel Camera => SimpleIoc.Default.GetInstance<PopWindows.Camera.ViewModel>();
} }
} }
...@@ -108,7 +108,7 @@ namespace ViewModels.Pages.AppointmentDetailPage ...@@ -108,7 +108,7 @@ namespace ViewModels.Pages.AppointmentDetailPage
set { _ShowConfirm = value; RaisePropertyChanged("ShowConfirm"); } set { _ShowConfirm = value; RaisePropertyChanged("ShowConfirm"); }
} }
private bool _ConfirmYesEnable; private bool _ConfirmYesEnable = true;
public bool ConfirmYesEnable public bool ConfirmYesEnable
{ {
...@@ -218,6 +218,7 @@ namespace ViewModels.Pages.AppointmentDetailPage ...@@ -218,6 +218,7 @@ namespace ViewModels.Pages.AppointmentDetailPage
{ {
public Guid id { get; set; } public Guid id { get; set; }
public string visitorName { get; set; } public string visitorName { get; set; }
public string visitorCompany { get; set; }
public string photoUrl { get; set; } public string photoUrl { get; set; }
public string idCardNum { get; set; } public string idCardNum { get; set; }
public string phoneNum { get; set; } public string phoneNum { get; set; }
...@@ -226,6 +227,7 @@ namespace ViewModels.Pages.AppointmentDetailPage ...@@ -226,6 +227,7 @@ namespace ViewModels.Pages.AppointmentDetailPage
public string areaName { get; set; } public string areaName { get; set; }
public int visitPeople { get; set; } public int visitPeople { get; set; }
public string beVisitPerson { get; set; } public string beVisitPerson { get; set; }
public string beVisitDepart { get; set; }
public int todayvisittimes { get; set; } public int todayvisittimes { get; set; }
public List<AppointmentExtendGroup> extends { get; set; } public List<AppointmentExtendGroup> extends { get; set; }
......
...@@ -16,10 +16,12 @@ namespace ViewModels.Pages.AuthenticationPage ...@@ -16,10 +16,12 @@ namespace ViewModels.Pages.AuthenticationPage
{ {
Face, Face,
IdCard, IdCard,
QRCode QRCode,
InputIdCard
} }
public delegate void AuthModeChangedDelegate(AuthenticationMode nowMode); public delegate void AuthModeChangedDelegate(AuthenticationMode nowMode);
public delegate void ScreenKeyboardPressed(string key);
public partial class ViewModel : ViewModelBase, IViewModel, IViewModelBehavior public partial class ViewModel : ViewModelBase, IViewModel, IViewModelBehavior
{ {
public string ViewID => "bbf0b764-4029-4db8-8beb-97b9627a4ac5"; public string ViewID => "bbf0b764-4029-4db8-8beb-97b9627a4ac5";
...@@ -28,6 +30,7 @@ namespace ViewModels.Pages.AuthenticationPage ...@@ -28,6 +30,7 @@ namespace ViewModels.Pages.AuthenticationPage
public event Action OnNavigateInto; public event Action OnNavigateInto;
public event Action OnNavigateOut; public event Action OnNavigateOut;
public event AuthModeChangedDelegate OnAuthModeChanged; public event AuthModeChangedDelegate OnAuthModeChanged;
public event ScreenKeyboardPressed OnScreenKeyBoardPressed;
public RelayCommand ExitCommand => new RelayCommand(() => public RelayCommand ExitCommand => new RelayCommand(() =>
{ {
OnExitClick?.Invoke(); OnExitClick?.Invoke();
...@@ -38,7 +41,11 @@ namespace ViewModels.Pages.AuthenticationPage ...@@ -38,7 +41,11 @@ namespace ViewModels.Pages.AuthenticationPage
AuthMode = (AuthenticationMode)int.Parse(para); AuthMode = (AuthenticationMode)int.Parse(para);
}); });
public RelayCommand<string> ScreenKeyboardCommand =>
new RelayCommand<string>((key) =>
{
OnScreenKeyBoardPressed?.Invoke(key);
});
private ImageSource _VideoOutput; private ImageSource _VideoOutput;
...@@ -62,6 +69,15 @@ namespace ViewModels.Pages.AuthenticationPage ...@@ -62,6 +69,15 @@ namespace ViewModels.Pages.AuthenticationPage
} }
} }
private string _inputidcard;
public string InputIdCard
{
get { return _inputidcard; }
set { _inputidcard = value; RaisePropertyChanged("InputIdCard"); }
}
private bool _EnableFace = true; private bool _EnableFace = true;
public bool EnableFace public bool EnableFace
...@@ -86,6 +102,14 @@ namespace ViewModels.Pages.AuthenticationPage ...@@ -86,6 +102,14 @@ namespace ViewModels.Pages.AuthenticationPage
set { _EnableQRCode = value; RaisePropertyChanged("EnableQRCode"); } set { _EnableQRCode = value; RaisePropertyChanged("EnableQRCode"); }
} }
private bool _EnableInputIdCard = true;
public bool EnableInputIdCard
{
get { return _EnableInputIdCard; }
set { _EnableInputIdCard = value; RaisePropertyChanged("EnableInputIdCard"); }
}
private bool _ShowAlert; private bool _ShowAlert;
public bool ShowAlert public bool ShowAlert
...@@ -109,6 +133,9 @@ namespace ViewModels.Pages.AuthenticationPage ...@@ -109,6 +133,9 @@ namespace ViewModels.Pages.AuthenticationPage
AlertMessage = ""; AlertMessage = "";
}); });
public void Alert(string msg, Action closeCallback) public void Alert(string msg, Action closeCallback)
{ {
AlertMessage = msg; AlertMessage = msg;
......
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Command;
using GS.Terminal.LogicShell.Interface;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ViewModels.PopWindows.Agreement
{
public class ViewModel : ViewModelBase, IViewModel, IPopWindowBehavior
{
public string ViewID => "9B97DCCA-5A9C-44F9-8925-3011BE89D8D4";
public event Action OnAgree;
public event Action OnRefuse;
public RelayCommand AgreeCommand => new RelayCommand(() =>
{
OnAgree?.Invoke();
});
public RelayCommand RefuseCommand => new RelayCommand(() =>
{
OnRefuse?.Invoke();
});
private string content = "";
public string Content
{
get { return content; }
set { content = value; RaisePropertyChanged("TodayPerson"); }
}
public void Closed()
{
}
public void Opened()
{
}
public void Reset()
{
}
}
}
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Command;
using GS.Terminal.LogicShell.Interface;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Media;
namespace ViewModels.PopWindows.Camera
{
public class ViewModel : ViewModelBase, IViewModel, IPopWindowBehavior
{
public string ViewID => "7585A046-E50F-4595-A785-BBF930A1ABAA";
private ImageSource _Output;
public ImageSource Output
{
get { return _Output; }
set { _Output = value; RaisePropertyChanged("Output"); }
}
public event Action OnTake;
public event Action OnCancel;
public RelayCommand TakeCommand => new RelayCommand(() =>
{
OnTake?.Invoke();
});
public RelayCommand CancelCommand => new RelayCommand(() =>
{
OnCancel?.Invoke();
});
public event Action OnOpened;
public event Action OnClosed;
public void Closed()
{
OnClosed?.Invoke();
}
public void Opened()
{
OnOpened?.Invoke();
}
public void Reset()
{
}
}
}
...@@ -75,6 +75,8 @@ ...@@ -75,6 +75,8 @@
<Compile Include="Pages\HistoryVisitPage\ViewModel.cs" /> <Compile Include="Pages\HistoryVisitPage\ViewModel.cs" />
<Compile Include="Pages\MenuPage\ViewModel.cs" /> <Compile Include="Pages\MenuPage\ViewModel.cs" />
<Compile Include="Pages\SubmitVisitInfoResult\ViewModel.cs" /> <Compile Include="Pages\SubmitVisitInfoResult\ViewModel.cs" />
<Compile Include="PopWindows\Agreement\ViewModel.cs" />
<Compile Include="PopWindows\Camera\ViewModel.cs" />
<Compile Include="PopWindows\NoAppointment\ViewModel.cs" /> <Compile Include="PopWindows\NoAppointment\ViewModel.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup> </ItemGroup>
......
...@@ -169,7 +169,7 @@ ...@@ -169,7 +169,7 @@
<TextBlock Text="确定提交到访信息?" FontSize="48" <TextBlock Text="确定提交到访信息?" FontSize="48"
HorizontalAlignment="Center" VerticalAlignment="Center" HorizontalAlignment="Center" VerticalAlignment="Center"
TextWrapping="Wrap"/> TextWrapping="Wrap"/>
<TextBlock Text="请联系您身边的工作人员帮您确认" Foreground="#f96400" HorizontalAlignment="Center" FontSize="28" Margin="0,20,0,0"/> <!--<TextBlock Text="请联系您身边的工作人员帮您确认" Foreground="#f96400" HorizontalAlignment="Center" FontSize="28" Margin="0,20,0,0"/>-->
</StackPanel> </StackPanel>
<StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Center"> <StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Center">
<gs:ImageButtonFix Command="{Binding ConfirmClose}" Width="360" Height="160" Image="/Views;component/Resources/confirm-no.png"/> <gs:ImageButtonFix Command="{Binding ConfirmClose}" Width="360" Height="160" Image="/Views;component/Resources/confirm-no.png"/>
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
Command="{Binding ExitCommand}" Command="{Binding ExitCommand}"
Width="250" Height="60" Content="退出" Foreground="#2a2b2d" FontSize="24" Focusable="False"/> Width="250" Height="60" Content="退出" Foreground="#2a2b2d" FontSize="24" Focusable="False"/>
</Grid> </Grid>
<Border Background="Transparent" Visibility="{Binding ShowAlert, Converter={StaticResource BooleanToVisibilityConverter}}"> <Border d:IsHidden="true" Background="Transparent" Visibility="{Binding ShowAlert, Converter={StaticResource BooleanToVisibilityConverter}}">
<Border Height="420" Background="White" <Border Height="420" Background="White"
BorderThickness="6" CornerRadius="15" BorderBrush="#f1f1f1" BorderThickness="6" CornerRadius="15" BorderBrush="#f1f1f1"
Margin="50,0,50,50" Padding="50"> Margin="50,0,50,50" Padding="50">
......
...@@ -44,6 +44,105 @@ ...@@ -44,6 +44,105 @@
</StackPanel> </StackPanel>
</ControlTemplate> </ControlTemplate>
<ControlTemplate x:Key="Authentication_CurrentMode_InputIdCard" TargetType="ContentControl">
<StackPanel>
<TextBlock FontSize="72" HorizontalAlignment="Center">
<Run Text="请输入证件号码"/>
</TextBlock>
<Border Margin="0,92,0,42" CornerRadius="10" BorderThickness="2" BorderBrush="#2a2b2d" Height="90" Width="600">
<TextBlock Text="{Binding InputIdCard}" FontSize="48" Foreground="#2a2b2d" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<Grid HorizontalAlignment="Center">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="154"/>
<ColumnDefinition Width="154"/>
<ColumnDefinition Width="154"/>
<ColumnDefinition Width="154"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="124"/>
<RowDefinition Height="124"/>
<RowDefinition Height="124"/>
<RowDefinition Height="124"/>
</Grid.RowDefinitions>
<!--第一行-->
<gs:ImageButtonFix Grid.Column="0" Grid.Row="0"
Command="{Binding ScreenKeyboardCommand}"
CommandParameter="7"
Image="/Views;component/Resources/keyboard/btn-numb-seven.png"/>
<!--7-->
<gs:ImageButtonFix Grid.Column="1" Grid.Row="0"
Command="{Binding ScreenKeyboardCommand}"
CommandParameter="8"
Image="/Views;component/Resources/keyboard/btn-numb-eight.png"/>
<!--8-->
<gs:ImageButtonFix Grid.Column="2" Grid.Row="0"
Command="{Binding ScreenKeyboardCommand}"
CommandParameter="9"
Image="/Views;component/Resources/keyboard/btn-numb-nine.png"/>
<!--9-->
<gs:ImageButtonFix Grid.Column="3" Grid.Row="0"
Command="{Binding ScreenKeyboardCommand}"
CommandParameter="reset"
Image="/Views;component/Resources/keyboard/btn-numb-reset.png" Grid.RowSpan="2"/>
<!--重置-->
<!--第二行-->
<gs:ImageButtonFix Grid.Column="0" Grid.Row="1"
Command="{Binding ScreenKeyboardCommand}"
CommandParameter="4"
Image="/Views;component/Resources/keyboard/btn-numb-four.png"/>
<!--4-->
<gs:ImageButtonFix Grid.Column="1" Grid.Row="1"
Command="{Binding ScreenKeyboardCommand}"
CommandParameter="5"
Image="/Views;component/Resources/keyboard/btn-numb-five.png"/>
<!--5-->
<gs:ImageButtonFix Grid.Column="2" Grid.Row="1"
Command="{Binding ScreenKeyboardCommand}"
CommandParameter="6"
Image="/Views;component/Resources/keyboard/btn-numb-six.png"/>
<!--6-->
<!--第三行-->
<gs:ImageButtonFix Grid.Column="0" Grid.Row="2"
Command="{Binding ScreenKeyboardCommand}"
CommandParameter="1"
Image="/Views;component/Resources/keyboard/btn-numb-one.png"/>
<!--1-->
<gs:ImageButtonFix Grid.Column="1" Grid.Row="2"
Command="{Binding ScreenKeyboardCommand}"
CommandParameter="2"
Image="/Views;component/Resources/keyboard/btn-numb-two.png"/>
<!--2-->
<gs:ImageButtonFix Grid.Column="2" Grid.Row="2"
Command="{Binding ScreenKeyboardCommand}"
CommandParameter="3"
Image="/Views;component/Resources/keyboard/btn-numb-three.png"/>
<!--3-->
<gs:ImageButtonFix Grid.Column="3" Grid.Row="2"
Command="{Binding ScreenKeyboardCommand}"
CommandParameter="confirm"
Image="/Views;component/Resources/keyboard/btn-numb-submit.png" Grid.RowSpan="2"/>
<!--确认-->
<!--第四行-->
<gs:ImageButtonFix Grid.Column="0" Grid.Row="3"
Command="{Binding ScreenKeyboardCommand}"
CommandParameter="X"
Image="/Views;component/Resources/keyboard/btn-numb-x.png"/>
<!--X-->
<gs:ImageButtonFix Grid.Column="1" Grid.Row="3"
Command="{Binding ScreenKeyboardCommand}"
CommandParameter="0"
Image="/Views;component/Resources/keyboard/btn-numb-zero.png"/>
<!--0-->
<gs:ImageButtonFix Grid.Column="2" Grid.Row="3"
Command="{Binding ScreenKeyboardCommand}"
CommandParameter="back"
Image="/Views;component/Resources/keyboard/btn-numb-cancel.png"/>
<!--退格-->
</Grid>
</StackPanel>
</ControlTemplate>
<ControlTemplate x:Key="Authentication_CurrentMode_QRCode" TargetType="ContentControl"> <ControlTemplate x:Key="Authentication_CurrentMode_QRCode" TargetType="ContentControl">
<StackPanel> <StackPanel>
<TextBlock FontSize="72" HorizontalAlignment="Center"> <TextBlock FontSize="72" HorizontalAlignment="Center">
...@@ -60,7 +159,7 @@ ...@@ -60,7 +159,7 @@
</ControlTemplate.Triggers> </ControlTemplate.Triggers>
</ControlTemplate> </ControlTemplate>
<Style x:Key="Authentication_CurrentMode" TargetType="ContentControl"> <Style x:Key="Authentication_CurrentMode" TargetType="ContentControl">
<Setter Property="Template" Value="{StaticResource Authentication_CurrentMode_QRCode}"/> <Setter Property="Template" Value="{StaticResource Authentication_CurrentMode_InputIdCard}"/>
<Style.Triggers> <Style.Triggers>
<DataTrigger Binding="{Binding AuthMode}" Value="0"> <DataTrigger Binding="{Binding AuthMode}" Value="0">
<Setter Property="Template" Value="{StaticResource Authentication_CurrentMode_Face}"/> <Setter Property="Template" Value="{StaticResource Authentication_CurrentMode_Face}"/>
...@@ -71,6 +170,9 @@ ...@@ -71,6 +170,9 @@
<DataTrigger Binding="{Binding AuthMode}" Value="2"> <DataTrigger Binding="{Binding AuthMode}" Value="2">
<Setter Property="Template" Value="{StaticResource Authentication_CurrentMode_QRCode}"/> <Setter Property="Template" Value="{StaticResource Authentication_CurrentMode_QRCode}"/>
</DataTrigger> </DataTrigger>
<DataTrigger Binding="{Binding AuthMode}" Value="3">
<Setter Property="Template" Value="{StaticResource Authentication_CurrentMode_InputIdCard}"/>
</DataTrigger>
</Style.Triggers> </Style.Triggers>
</Style> </Style>
...@@ -124,6 +226,20 @@ ...@@ -124,6 +226,20 @@
</Button.Template> </Button.Template>
</Button> </Button>
</Border> </Border>
<Border Visibility="{Binding EnableInputIdCard, Converter={StaticResource BooleanToVisibilityConverter}}">
<Button x:Name="PART_InputIdCard" Focusable="False" Command="{Binding ChangeAuthModeCommand}" CommandParameter="3" Width="330" Height="296" Margin="50,0,50,0">
<Button.Template>
<ControlTemplate TargetType="Button">
<StackPanel>
<gs:ImageButtonFix Focusable="False" Command="{TemplateBinding Command}" CommandParameter="{TemplateBinding CommandParameter}"
Width="330" Height="250" HorizontalAlignment="Center" VerticalAlignment="Center"
Image="/Views;component/Resources/auto_mode_inputidcard.png" />
<TextBlock Text="手动输入" HorizontalAlignment="Center" FontSize="36"/>
</StackPanel>
</ControlTemplate>
</Button.Template>
</Button>
</Border>
</StackPanel> </StackPanel>
</Grid> </Grid>
<ControlTemplate.Triggers> <ControlTemplate.Triggers>
...@@ -136,6 +252,9 @@ ...@@ -136,6 +252,9 @@
<DataTrigger Binding="{Binding AuthMode}" Value="2"> <DataTrigger Binding="{Binding AuthMode}" Value="2">
<Setter Property="Visibility" Value="Collapsed" TargetName="PART_qrcode"/> <Setter Property="Visibility" Value="Collapsed" TargetName="PART_qrcode"/>
</DataTrigger> </DataTrigger>
<DataTrigger Binding="{Binding AuthMode}" Value="3">
<Setter Property="Visibility" Value="Collapsed" TargetName="PART_InputIdCard"/>
</DataTrigger>
</ControlTemplate.Triggers> </ControlTemplate.Triggers>
</ControlTemplate> </ControlTemplate>
</ResourceDictionary> </ResourceDictionary>
\ No newline at end of file
<Page x:Class="Views.PopWindows.Agreement.Index"
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:local="clr-namespace:Views.PopWindows.Agreement"
xmlns:gs="clr-namespace:Develop.Extension.Wpf;assembly=Develop.Extension.Wpf"
mc:Ignorable="d"
d:DesignHeight="1920" d:DesignWidth="1080"
Title="Index">
<Grid>
<Border Background="White" HorizontalAlignment="Center" VerticalAlignment="Center" CornerRadius="50">
<Grid Width="860">
<Grid.RowDefinitions>
<RowDefinition Height="300"/>
<RowDefinition MaxHeight="1800" MinHeight="200"/>
<RowDefinition Height="250"/>
</Grid.RowDefinitions>
<TextBlock Text="必要说明" FontSize="76" FontWeight="Bold" Margin="0,130,0,0" HorizontalAlignment="Center" VerticalAlignment="Top"/>
<RichTextBox IsReadOnly="True" FontWeight="Light" Grid.Row="1" FontSize="40" Margin="70,0" BorderThickness="0" Background="Transparent">
<FlowDocument>
<Paragraph TextIndent="80" LineHeight="80" Margin="0,0,0,8">
<Run Text="{Binding Content}"/>
</Paragraph>
</FlowDocument>
</RichTextBox>
<Grid Grid.Row="2">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<gs:ImageButtonFix Command="{Binding AgreeCommand}" Width="380" Height="200" Image="/Views;component/Resources/btn-agree.png" />
<gs:ImageButtonFix Command="{Binding RefuseCommand}" Grid.Column="1" Width="380" Height="200" Image="/Views;component/Resources/btn-refuse.png" />
</Grid>
</Grid>
</Border>
</Grid>
</Page>
using GS.Terminal.LogicShell.Attributes;
using GS.Terminal.LogicShell.Interface;
using GS.Unitive.Framework.Security.Core;
using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace Views.PopWindows.Agreement
{
/// <summary>
/// Index.xaml 的交互逻辑
/// </summary>
[Export(typeof(IView))]
[PopWindow(1080, 1920)]
[UnitiveView("协议展示", "", "9B97DCCA-5A9C-44F9-8925-3011BE89D8D4", null)]
public partial class Index : Page, IView
{
public Index()
{
InitializeComponent();
}
public void BindDataContext(IViewModel vm)
{
DataContext = vm;
}
public object Clone()
{
throw new NotImplementedException();
}
public void GoBack()
{
throw new NotImplementedException();
}
public void GoForward()
{
throw new NotImplementedException();
}
public void NavigateToContent(object content)
{
throw new NotImplementedException();
}
public void Reset()
{
throw new NotImplementedException();
}
}
}
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
</ResourceDictionary>
\ No newline at end of file
<Page x:Class="Views.PopWindows.Camera.Index"
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:gs="clr-namespace:Develop.Extension.Wpf;assembly=Develop.Extension.Wpf"
xmlns:local="clr-namespace:Views.PopWindows.Camera"
mc:Ignorable="d"
d:DesignHeight="1920" d:DesignWidth="1080"
Title="Index">
<Grid Background="#7F000000">
<StackPanel>
<Border Height="300"></Border>
<TextBlock Text="请正视摄像头,按下拍照按钮" HorizontalAlignment="Center" Foreground="White" FontSize="48"/>
<Border Width="506" Height="506" Margin="0,50,0,0"
BorderBrush="#03EDA6"
BorderThickness="4"
CornerRadius="253">
<Image Width="500" Height="500" Stretch="Fill" Source="{Binding Output}">
<Image.Clip>
<EllipseGeometry Center="250,250" RadiusX="250" RadiusY="250"/>
</Image.Clip>
<!--<Image.OpacityMask>
<VisualBrush Visual="{Binding ElementName=border,Mode=OneTime}"/>
</Image.OpacityMask>-->
</Image>
</Border>
<gs:ImageButtonFix Command="{Binding TakeCommand}" Image="/Views;component/Resources/btn-take.png" Width="660" Height="240" />
<gs:ImageButtonFix Command="{Binding CancelCommand}" Image="/Views;component/Resources/confirm-no.png" Height="160" Width="360" />
</StackPanel>
</Grid>
</Page>
using GS.Terminal.LogicShell.Attributes;
using GS.Terminal.LogicShell.Interface;
using GS.Unitive.Framework.Security.Core;
using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace Views.PopWindows.Camera
{
/// <summary>
/// Index.xaml 的交互逻辑
/// </summary>
///
[Export(typeof(IView))]
[PopWindow(1080, 1920)]
[UnitiveView("拍照", "", "7585A046-E50F-4595-A785-BBF930A1ABAA", null)]
public partial class Index : Page, IView
{
public Index()
{
InitializeComponent();
}
public void BindDataContext(IViewModel vm)
{
this.DataContext = vm;
}
public object Clone()
{
throw new NotImplementedException();
}
public void GoBack()
{
throw new NotImplementedException();
}
public void GoForward()
{
throw new NotImplementedException();
}
public void NavigateToContent(object content)
{
throw new NotImplementedException();
}
public void Reset()
{
throw new NotImplementedException();
}
}
}
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
</ResourceDictionary>
\ No newline at end of file
...@@ -106,6 +106,12 @@ ...@@ -106,6 +106,12 @@
<Compile Include="Pages\SubmitVisitInfoResult\Index.xaml.cs"> <Compile Include="Pages\SubmitVisitInfoResult\Index.xaml.cs">
<DependentUpon>Index.xaml</DependentUpon> <DependentUpon>Index.xaml</DependentUpon>
</Compile> </Compile>
<Compile Include="PopWindows\Agreement\Index.xaml.cs">
<DependentUpon>Index.xaml</DependentUpon>
</Compile>
<Compile Include="PopWindows\Camera\Index.xaml.cs">
<DependentUpon>Index.xaml</DependentUpon>
</Compile>
<Compile Include="PopWindows\NoAppointment\Index.xaml.cs"> <Compile Include="PopWindows\NoAppointment\Index.xaml.cs">
<DependentUpon>Index.xaml</DependentUpon> <DependentUpon>Index.xaml</DependentUpon>
</Compile> </Compile>
...@@ -189,6 +195,22 @@ ...@@ -189,6 +195,22 @@
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</Page> </Page>
<Page Include="PopWindows\Agreement\Index.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="PopWindows\Agreement\Style.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="PopWindows\Camera\Index.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="PopWindows\Camera\Style.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="PopWindows\NoAppointment\Index.xaml"> <Page Include="PopWindows\NoAppointment\Index.xaml">
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
...@@ -240,5 +262,31 @@ ...@@ -240,5 +262,31 @@
<ItemGroup> <ItemGroup>
<Resource Include="Resources\btn_ikonw.png" /> <Resource Include="Resources\btn_ikonw.png" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Resource Include="Resources\btn-agree.png" />
<Resource Include="Resources\btn-refuse.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\auto_mode_inputidcard.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\keyboard\btn-numb-cancel.png" />
<Resource Include="Resources\keyboard\btn-numb-eight.png" />
<Resource Include="Resources\keyboard\btn-numb-five.png" />
<Resource Include="Resources\keyboard\btn-numb-four.png" />
<Resource Include="Resources\keyboard\btn-numb-nine.png" />
<Resource Include="Resources\keyboard\btn-numb-one.png" />
<Resource Include="Resources\keyboard\btn-numb-reset.png" />
<Resource Include="Resources\keyboard\btn-numb-seven.png" />
<Resource Include="Resources\keyboard\btn-numb-six.png" />
<Resource Include="Resources\keyboard\btn-numb-submit.png" />
<Resource Include="Resources\keyboard\btn-numb-three.png" />
<Resource Include="Resources\keyboard\btn-numb-two.png" />
<Resource Include="Resources\keyboard\btn-numb-x.png" />
<Resource Include="Resources\keyboard\btn-numb-zero.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\btn-take.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project> </Project>
\ No newline at end of file
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