Browse Source

优化

master
胡超1 1 year ago
parent
commit
4539bca56b
  1. 2
      AksWebBrowser.sln
  2. 6
      CPF_Cef/AksVideoPlayer.cs
  3. 2
      CPF_Cef/AksWebBrowser.csproj
  4. 3
      CPF_Cef/Common/COMUtils.cs
  5. 7
      CPF_Cef/Common/ChunkedUpload.cs
  6. 2
      CPF_Cef/Common/TcpClients.cs
  7. 3
      CPF_Cef/Common/Utils.cs
  8. 2
      CPF_Cef/CusWebBrowser.cs
  9. 10
      CPF_Cef/FrmMain.cs
  10. 3
      CPF_Cef/MainModel.cs
  11. 4
      CPF_Cef/Parame.cs
  12. 2
      CPF_Cef/Program.cs
  13. 120
      CPF_Cef/StyleSheet.css
  14. BIN
      CPF_Cef/msyh.ttc

2
AksWebBrowser.sln

@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.9.34622.214
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AKS.EnterpriseLibrary.WebBrowser", "CPF_Cef\AKS.EnterpriseLibrary.WebBrowser.csproj", "{76142658-6E83-4A1C-8CC9-C2574865CA7D}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AksWebBrowser", "CPF_Cef\AksWebBrowser.csproj", "{76142658-6E83-4A1C-8CC9-C2574865CA7D}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution

6
CPF_Cef/AksVideoPlayer.cs

@ -12,7 +12,7 @@ using CPF.Svg;
using CPF.Input;
using static System.Net.Mime.MediaTypeNames;
namespace AKS.EnterpriseLibrary.WebBrowser
namespace AksWebBrowser
{
public class AksVideoPlayer : Control
{
@ -63,6 +63,8 @@ namespace AKS.EnterpriseLibrary.WebBrowser
{
MarginRight = 12f,
MarginTop = 10f,
Classes = "imgAndText",
FontFamily = "微软雅黑",//Alibaba PuHuiTi
Text = "关闭",
FontSize = 16,
Cursor = CPF.Cursors.Hand,
@ -91,8 +93,10 @@ namespace AKS.EnterpriseLibrary.WebBrowser
FontSize = 16f,
MarginLeft = 12.6f,
MarginTop = 9.6f,
Classes = "imgAndText",
Foreground = Color.White,
Text = videoTitle,
FontFamily = "微软雅黑",
});
Children.Add(vplayer);

2
CPF_Cef/AKS.EnterpriseLibrary.WebBrowser.csproj → CPF_Cef/AksWebBrowser.csproj

@ -27,6 +27,7 @@
</ItemGroup>
<ItemGroup>
<None Remove="msyh.ttc" />
<None Remove="StyleSheet.css" />
</ItemGroup>
@ -35,6 +36,7 @@
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="msyh.ttc" />
<EmbeddedResource Include="StyleSheet.css" />
</ItemGroup>

3
CPF_Cef/Common/COMUtils.cs

@ -1,5 +1,4 @@
using AKS.EnterpriseLibrary.WebBrowser;
using AksWebBrowser;
using AksWebBrowser;
using AKSWebBrowser.Commen;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;

7
CPF_Cef/Common/ChunkedUpload.cs

@ -1,4 +1,4 @@
using AKS.EnterpriseLibrary.WebBrowser;
using AksWebBrowser;
using AksWebBrowser.Devices;
using AKSWebBrowser.Commen;
using Newtonsoft.Json;
@ -528,6 +528,8 @@ namespace AksWebBrowser.Common
{
try
{
//关闭身份证
await PublicIdcard(type, typeCode, timeout);
timeout = timeout == 0 ? Parame.timeout : timeout;
var client = new HttpClient();
client.Timeout = TimeSpan.FromSeconds(timeout);
@ -545,7 +547,6 @@ namespace AksWebBrowser.Common
JObject jo2 = (JObject)JsonConvert.DeserializeObject(ret);
if (jo2["code"].ToString() == "0")
{
//读取指纹
if (typeCode == 1)
{
//读取data数据
@ -603,7 +604,7 @@ namespace AksWebBrowser.Common
}
/// <summary>
/// 公共读取指纹
/// 公共读取身份证
/// </summary>
/// <param name="type"></param>
/// <param name="typeCode"></param>

2
CPF_Cef/Common/TcpClients.cs

@ -10,7 +10,7 @@ using System.Net;
using System.Net.Http;
using System.IO.Ports;
using System.Timers;
using AKS.EnterpriseLibrary.WebBrowser;
using AksWebBrowser;
namespace AksWebBrowser.Common
{

3
CPF_Cef/Common/Utils.cs

@ -1,5 +1,4 @@
using AKS.EnterpriseLibrary.WebBrowser;
using AKSWebBrowser.Commen;
using AKSWebBrowser.Commen;
using CPF.Controls;
using System;
using System.Drawing;

2
CPF_Cef/CusWebBrowser.cs

@ -10,7 +10,7 @@ using System.Runtime.ConstrainedExecution;
using System.Text;
using System.Threading.Tasks;
namespace AKS.EnterpriseLibrary.WebBrowser
namespace AksWebBrowser
{
public class CusWebBrowser : CPF.Cef.WebBrowser

10
CPF_Cef/FrmMain.cs

@ -16,7 +16,7 @@ using System.Threading;
using System.Threading.Tasks;
using System.Timers;
namespace AKS.EnterpriseLibrary.WebBrowser
namespace AksWebBrowser
{
public class FrmMain : Window
{
@ -75,6 +75,7 @@ namespace AKS.EnterpriseLibrary.WebBrowser
protected override async void OnInitialized()
{
LoadStyleFile("res://AksWebBrowser/StyleSheet.css");
//窗体大小
this.Width = w;
this.Height = h;
@ -113,6 +114,8 @@ namespace AKS.EnterpriseLibrary.WebBrowser
showDev = true;
Parame.webBrowser.ShowDev();
}
//获取授权
GetSQObject();
//获取设备
MainModel.GetSnIndex();
//打开高拍仪
@ -135,11 +138,6 @@ namespace AKS.EnterpriseLibrary.WebBrowser
{
try
{
if (!Parame.isCloseHttp)
{
//获取授权
GetSQObject();
}
//检测服务是否启动
MainModel.StartShll();
}

3
CPF_Cef/MainModel.cs

@ -30,7 +30,7 @@ using System.Web;
using System.Xml.Linq;
using static System.Net.Mime.MediaTypeNames;
namespace AKS.EnterpriseLibrary.WebBrowser
namespace AksWebBrowser
{
public class MainModel : CPF.CpfObject
{
@ -1203,7 +1203,6 @@ namespace AKS.EnterpriseLibrary.WebBrowser
}
}
/// <summary>
/// aks100117 读取问答 (已国产化)
/// </summary>

4
CPF_Cef/Parame.cs

@ -1,4 +1,4 @@
using AKS.EnterpriseLibrary.WebBrowser;
using AksWebBrowser;
using CPF.Controls;
using Fleck;
using System;
@ -19,7 +19,7 @@ namespace AksWebBrowser
public static Window frm { get; set; }
public static List<Func> FuncObject { get; set; }
//接口地址
public static string apiUrl = "http://127.0.0.1:8098";//"http://192.168.0.34:92";
public static string apiUrl ="http://127.0.0.1:8098"; // "http://192.168.0.34:92";
//授权key
public static string key = "1";
//硬件Ip

2
CPF_Cef/Program.cs

@ -10,7 +10,7 @@ using System.Threading.Tasks;
using System.Threading;
using System.IO;
namespace AKS.EnterpriseLibrary.WebBrowser
namespace AksWebBrowser
{
class Program
{

120
CPF_Cef/StyleSheet.css

@ -2,6 +2,7 @@
@media windows {
* {
FontFamily: '微软雅黑'; /*不同系统的字体不同,自己根据情况改或者使用内嵌字体*/
src: url('res://AksWebBrowser/msyh.ttc');
}
}
@ -13,7 +14,8 @@
@media linux {
* {
FontFamily: '文泉驿正黑';
FontFamily: '微软雅黑';
src: url('res://AksWebBrowser/msyh.ttc');
}
}
/*设置窗体标题栏背景颜色圆角*/
@ -21,98 +23,37 @@
IsAntiAlias: true;
Background: #2c2c2c;
CornerRadius:5,5,0,0;
Height:30;
}
#frame {
CornerRadius: 5;
IsAntiAlias: true;
}*/
Button {
BorderFill: #DCDFE6;
IsAntiAlias: True;
CornerRadius: 4,4,4,4;
Background: #FFFFFF;
#caption {
IsAntiAlias: true;
Background: #2c2c2c;
CornerRadius: 5,5,0,0;
Height: 50;
}
Button[IsMouseOver=true] {
BorderFill: rgb(198,226,255);
Background: rgb(236,245,255);
Foreground: rgb(64,158,255);
}
Button[IsPressed=true] {
BorderFill: rgb(58,142,230);
}
Button.primary {
BorderFill: rgb(64,158,255);
CornerRadius: 4,4,4,4;
Background: rgb(64,158,255);
Foreground: #FFFFFF;
}
Button.primary[IsMouseOver=true] {
BorderFill: rgb(102,177,255);
Background: rgb(102,177,255);
Foreground: #FFFFFF;
}
Button.primary[IsPressed=true] {
BorderFill: rgb(58,142,230);
Background: rgb(58,142,230);
}
Button.success {
BorderFill: rgb(103,194,58);
CornerRadius: 4,4,4,4;
Background: rgb(103,194,58);
Foreground: #FFFFFF;
}
Button.success[IsMouseOver=true] {
BorderFill: rgb(133,206,97);
Background: rgb(133,206,97);
Foreground: #FFFFFF;
}
Button.success[IsPressed=true] {
BorderFill: rgb(93,175,52);
Background: rgb(93,175,52);
}
.AMenuPageStyle {
Background: #2c2c2c01;
}
Button.danger {
BorderFill: rgb(245,108,108);
Background: rgb(245,108,108);
CornerRadius: 4,4,4,4;
Foreground: #FFFFFF;
.AMenuPageStyle[IsMouseOver=true] {
Background: #00000015;
}
Button.danger[IsMouseOver=true] {
BorderFill: rgb(247,137,137);
Background: rgb(247,137,137);
Foreground: #FFFFFF;
}
Button.danger[IsPressed=true] {
BorderFill: rgb(221,97,97);
Background: rgb(221,97,97);
}
TextBox, .textBox, DatePicker {
Background: #fff;
#frame {
CornerRadius: 5;
IsAntiAlias: true;
BorderFill: #DCDFE6;
CornerRadius: 4,4,4,4;
BorderStroke: 1;
}
.groupPanel TextBox, DatePicker TextBox, .textBox TextBox {
BorderStroke: 0;
}
.textBox[IsKeyboardFocusWithin=true] {
BorderFill: #1E9FFF;
}
#caption {
Background: rgb(36,48,70);
Height: 40;
Font-Size: 18px;
}
.singleLine { /*单行文本框*/
AcceptsReturn: false;
@ -250,7 +191,6 @@ ComboBox {
MarginLeft: 5;
MarginTop: 2;
MarginBottom: 2;
font-size: 14;
}
#dropDownBorder {
@ -471,3 +411,21 @@ TabControl[TabStripPlacement=Left] #headerPanel, TabControl[TabStripPlacement=Ri
ListBoxItem {
Width: 100%;
}
#dialogClose, #dialogClose[IsMouseOver=true] {
Background: null;
BorderFill: null;
}
#dialogClose[IsPressed=true] {
Background: null;
BorderFill: null;
}
#dialogClose Line {
StrokeFill: 218,218,218;
}
#dialogClose[IsMouseOver=true] Line {
StrokeFill: #fff;
}

BIN
CPF_Cef/msyh.ttc

Binary file not shown.
Loading…
Cancel
Save