Compare commits

...

10 Commits

Author SHA1 Message Date
392d4b5124 解决粘贴乱码问题 2023-08-31 15:45:24 +08:00
55dcfed653 减少不必要的报错 2023-08-31 11:49:42 +08:00
305201f23e 更新粘贴乱码问题 2023-08-31 10:58:35 +08:00
54ec14c527 调整日志 2023-08-30 23:32:01 +08:00
3f5ea7a5af 优化菜单图标 2023-08-30 22:52:43 +08:00
093fb09983 升级最新版本C# 2023-08-30 22:52:03 +08:00
979fb62063 更新日志问题 2023-08-30 22:51:46 +08:00
8d13f2ea3c 更新主题选项 2023-08-30 22:49:16 +08:00
a6c2359741 测试dotnetbar2 2023-08-30 22:49:16 +08:00
leomon
ee9a20f4f9 注销修改 2023-08-30 22:48:34 +08:00
32 changed files with 322 additions and 176 deletions

View File

@ -9,6 +9,7 @@
<RootNamespace>AIMS</RootNamespace> <RootNamespace>AIMS</RootNamespace>
<AssemblyName>AIMS</AssemblyName> <AssemblyName>AIMS</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<LangVersion>Latest</LangVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic> <Deterministic>true</Deterministic>
</PropertyGroup> </PropertyGroup>
@ -39,19 +40,14 @@
<PropertyGroup> <PropertyGroup>
<StartupObject>AIMS.Program</StartupObject> <StartupObject>AIMS.Program</StartupObject>
</PropertyGroup> </PropertyGroup>
<PropertyGroup>
<ApplicationManifest>app.manifest</ApplicationManifest>
</PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="DCSoft.Writer, Version=1.2015.12.23, Culture=neutral, PublicKeyToken=2e40e961ea876340, processorArchitecture=MSIL"> <Reference Include="DCSoft.Writer, Version=1.2015.12.23, Culture=neutral, PublicKeyToken=2e40e961ea876340, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>DLL\DCSoft.Writer.dll</HintPath> <HintPath>DLL\DCSoft.Writer.dll</HintPath>
</Reference> </Reference>
<Reference Include="DevComponents.DotNetBar.SuperGrid, Version=12.5.0.2, Culture=neutral, PublicKeyToken=c39c3242a43eee2b, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>Extensions\DevComponents.DotNetBar.SuperGrid.dll</HintPath>
</Reference>
<Reference Include="DevComponents.DotNetBar2, Version=12.5.0.2, Culture=neutral, PublicKeyToken=c39c3242a43eee2b, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\Program Files (x86)\DotNetBar for Windows Forms\DevComponents.DotNetBar2.dll</HintPath>
</Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
<Reference Include="System.Net.Http"> <Reference Include="System.Net.Http">
@ -80,6 +76,7 @@
<DependentUpon>Resources.resx</DependentUpon> <DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime> <DesignTime>True</DesignTime>
</Compile> </Compile>
<None Include="app.manifest" />
<None Include="appsettings.json"> <None Include="appsettings.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>

View File

@ -49,63 +49,42 @@ namespace AIMS
} }
finally finally
{ {
Log.Information("Application exiting.");
// Important to call at exit so that batched events are flushed. // Important to call at exit so that batched events are flushed.
Log.CloseAndFlush(); Log.CloseAndFlush();
} }
} }
static void MainStart(string[] args) static void MainStart(string[] args)
{ {
/**
*
* 使使
*/
//获得当前登录的Windows用户标示 //获得当前登录的Windows用户标示
System.Security.Principal.WindowsIdentity identity = System.Security.Principal.WindowsIdentity.GetCurrent(); System.Security.Principal.WindowsIdentity identity = System.Security.Principal.WindowsIdentity.GetCurrent();
//创建Windows用户主题 //创建Windows用户主题
Application.EnableVisualStyles(); Application.EnableVisualStyles();
System.Security.Principal.WindowsPrincipal principal = new System.Security.Principal.WindowsPrincipal(identity); System.Security.Principal.WindowsPrincipal principal = new System.Security.Principal.WindowsPrincipal(identity);
//判断当前登录用户是否为管理员
if (principal.IsInRole(System.Security.Principal.WindowsBuiltInRole.Administrator))
{
//如果是管理员,则直接运行
if (PublicMethod.FindProcess("AIMSAutoUpdate")) //如果是管理员,则直接运行
{
return;
}
BindExceptionHandler();
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
//Process instance = RunningInstance(); if (PublicMethod.FindProcess("AIMSAutoUpdate"))
//if (instance == null)
//{
UpdateProgram(args);
Application.Run(new FormLogin());
//}
//else
//{
// /*1.2 已经有一个实例在运行*/
// HandleRunningInstance(instance);
//}
}
else
{ {
//创建启动对象 return;
System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo();
//设置运行文件
startInfo.FileName = System.Windows.Forms.Application.ExecutablePath;
//设置启动参数
startInfo.Arguments = String.Join(" ", args);
//设置启动动作,确保以管理员身份运行
startInfo.Verb = "runas";
//如果不是管理员则启动UAC
System.Diagnostics.Process.Start(startInfo);
//退出
System.Windows.Forms.Application.Exit();
} }
BindExceptionHandler();
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
//Process instance = RunningInstance();
//if (instance == null)
//{
UpdateProgram(args);
Application.Run(new FormLogin());
//}
//else
//{
// /*1.2 已经有一个实例在运行*/
// HandleRunningInstance(instance);
//}
} }
static void UpdateProgram(string[] args) static void UpdateProgram(string[] args)

79
AIMS/app.manifest Normal file
View File

@ -0,0 +1,79 @@
<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<!-- UAC 清单选项
如果想要更改 Windows 用户帐户控制级别,请使用
以下节点之一替换 requestedExecutionLevel 节点。
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
指定 requestedExecutionLevel 元素将禁用文件和注册表虚拟化。
如果你的应用程序需要此虚拟化来实现向后兼容性,则移除此
元素。
-->
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
</requestedPrivileges>
</security>
</trustInfo>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- 设计此应用程序与其一起工作且已针对此应用程序进行测试的
Windows 版本的列表。取消评论适当的元素,
Windows 将自动选择最兼容的环境。 -->
<!-- Windows Vista -->
<!--<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />-->
<!-- Windows 7 -->
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />
<!-- Windows 8 -->
<!--<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />-->
<!-- Windows 8.1 -->
<!--<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />-->
<!-- Windows 10 -->
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
</application>
</compatibility>
<!-- 指示该应用程序可感知 DPI 且 Windows 在 DPI 较高时将不会对其进行
自动缩放。Windows Presentation Foundation (WPF)应用程序自动感知 DPI无需
选择加入。选择加入此设置的 Windows 窗体应用程序(面向 .NET Framework 4.6)还应
在其 app.config 中将 "EnableWindowsFormsHighDpiAutoResizing" 设置设置为 "true"。
将应用程序设为感知长路径。请参阅 https://docs.microsoft.com/windows/win32/fileio/maximum-file-path-limitation -->
<!--
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
<longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware>
</windowsSettings>
</application>
-->
<!-- 启用 Windows 公共控件和对话框的主题(Windows XP 和更高版本) -->
<!--
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="*"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
-->
</assembly>

View File

@ -10,6 +10,7 @@
//"Serilog.Sinks.Console", //"Serilog.Sinks.Console",
//"Serilog.Sinks.Debug", //"Serilog.Sinks.Debug",
"Serilog.Sinks.Seq", "Serilog.Sinks.Seq",
"Serilog.Sinks.File",
"Serilog.Settings.Configuration", "Serilog.Settings.Configuration",
"Serilog.Exceptions", "Serilog.Exceptions",
"Serilog.Enrichers.Span", "Serilog.Enrichers.Span",

View File

@ -11,6 +11,7 @@
<RootNamespace>AIMSAutoUpdate</RootNamespace> <RootNamespace>AIMSAutoUpdate</RootNamespace>
<AssemblyName>AIMSAutoUpdate</AssemblyName> <AssemblyName>AIMSAutoUpdate</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<LangVersion>Latest</LangVersion>
<TargetFrameworkProfile> <TargetFrameworkProfile>
</TargetFrameworkProfile> </TargetFrameworkProfile>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>

View File

@ -10,6 +10,7 @@
<AssemblyName>AIMSControls</AssemblyName> <AssemblyName>AIMSControls</AssemblyName>
<!-- <TargetFramework>.NETFramework,Version=v4.8</TargetFramework> --> <!-- <TargetFramework>.NETFramework,Version=v4.8</TargetFramework> -->
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<LangVersion>Latest</LangVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic> <Deterministic>true</Deterministic>
</PropertyGroup> </PropertyGroup>
@ -38,14 +39,6 @@
<Reference Include="DCSoft.Writer"> <Reference Include="DCSoft.Writer">
<HintPath>..\AIMS\Extensions\DCSoft.Writer.dll</HintPath> <HintPath>..\AIMS\Extensions\DCSoft.Writer.dll</HintPath>
</Reference> </Reference>
<Reference Include="DevComponents.DotNetBar.SuperGrid, Version=12.5.0.2, Culture=neutral, PublicKeyToken=c39c3242a43eee2b, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\AIMS\Extensions\DevComponents.DotNetBar.SuperGrid.dll</HintPath>
</Reference>
<Reference Include="DevComponents.DotNetBar2, Version=12.5.0.2, Culture=neutral, PublicKeyToken=c39c3242a43eee2b, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\AIMS\Extensions\DevComponents.DotNetBar2.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Office.Interop.Excel, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL"> <Reference Include="Microsoft.Office.Interop.Excel, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<EmbedInteropTypes>False</EmbedInteropTypes> <EmbedInteropTypes>False</EmbedInteropTypes>
@ -1605,6 +1598,9 @@
<None Include="Resources\GCSusers.png" /> <None Include="Resources\GCSusers.png" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="DotNetBar2">
<Version>1.0.1</Version>
</PackageReference>
<PackageReference Include="Newtonsoft.Json"> <PackageReference Include="Newtonsoft.Json">
<Version>13.0.3</Version> <Version>13.0.3</Version>
</PackageReference> </PackageReference>

View File

@ -197,7 +197,7 @@
// //
this.expandablePanel1.CanvasColor = System.Drawing.SystemColors.Control; this.expandablePanel1.CanvasColor = System.Drawing.SystemColors.Control;
this.expandablePanel1.CollapseDirection = DevComponents.DotNetBar.eCollapseDirection.RightToLeft; this.expandablePanel1.CollapseDirection = DevComponents.DotNetBar.eCollapseDirection.RightToLeft;
this.expandablePanel1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007; this.expandablePanel1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.expandablePanel1.DisabledBackColor = System.Drawing.Color.Empty; this.expandablePanel1.DisabledBackColor = System.Drawing.Color.Empty;
this.expandablePanel1.Dock = System.Windows.Forms.DockStyle.Left; this.expandablePanel1.Dock = System.Windows.Forms.DockStyle.Left;
this.expandablePanel1.Font = new System.Drawing.Font("宋体", 9.5F); this.expandablePanel1.Font = new System.Drawing.Font("宋体", 9.5F);

View File

@ -374,7 +374,7 @@
// //
this.expandablePanel1.CanvasColor = System.Drawing.SystemColors.Control; this.expandablePanel1.CanvasColor = System.Drawing.SystemColors.Control;
this.expandablePanel1.CollapseDirection = DevComponents.DotNetBar.eCollapseDirection.RightToLeft; this.expandablePanel1.CollapseDirection = DevComponents.DotNetBar.eCollapseDirection.RightToLeft;
this.expandablePanel1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007; this.expandablePanel1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.expandablePanel1.DisabledBackColor = System.Drawing.Color.Empty; this.expandablePanel1.DisabledBackColor = System.Drawing.Color.Empty;
this.expandablePanel1.Dock = System.Windows.Forms.DockStyle.Left; this.expandablePanel1.Dock = System.Windows.Forms.DockStyle.Left;
this.expandablePanel1.Font = new System.Drawing.Font("宋体", 9.5F); this.expandablePanel1.Font = new System.Drawing.Font("宋体", 9.5F);

View File

@ -11,13 +11,16 @@ using AIMSExtension;
using AIMSModel; using AIMSModel;
using DevComponents.DotNetBar; using DevComponents.DotNetBar;
using HelperDB; using HelperDB;
using Microsoft.Extensions.Logging;
namespace AIMS namespace AIMS
{ {
public partial class FormLogin : Office2007Form public partial class FormLogin : Office2007Form
{ {
ILogger<FormLogin> logger;
public FormLogin() public FormLogin()
{ {
logger = this.GetLogger();
this.FormBorderStyle = FormBorderStyle.None; this.FormBorderStyle = FormBorderStyle.None;
this.EnableGlass = false; this.EnableGlass = false;
@ -31,7 +34,7 @@ namespace AIMS
AIMSExtension.PublicMethod.SetLocalDateTime(); AIMSExtension.PublicMethod.SetLocalDateTime();
AIMSExtension.PublicMethod.HospitalName = PublicMethod.GetHospital(); AIMSExtension.PublicMethod.HospitalName = PublicMethod.GetHospital();
//label1.Text = AIMSExtension.PublicMethod.GetSystemName(); //label1.Text = AIMSExtension.PublicMethod.GetSystemName();
label2.Text = PublicMethod.HospitalName + " V" + PublicMethod.NowVersion; label2.Text = PublicMethod.HospitalName + " V" + PublicMethod.NowVersion;
txtNo.Select(); txtNo.Select();
txtNo.Focus(); txtNo.Focus();
List<string> list = xmlUse.GetNode("LastLoginNo"); List<string> list = xmlUse.GetNode("LastLoginNo");
@ -53,7 +56,8 @@ namespace AIMS
#if DEBUG #if DEBUG
txtNo.Text = "admin"; txtNo.Text = "admin";
txtPassWord.Text = "1"; txtPassWord.Text = "1";
btnOk_Click(null, null);
btnOk_Click(btnOk, new EventArgs());
#endif #endif
} }
private void btnOk_Click(object sender, EventArgs e) private void btnOk_Click(object sender, EventArgs e)
@ -80,8 +84,8 @@ namespace AIMS
{ {
PublicMethod.LastOperationSite = list[0]; PublicMethod.LastOperationSite = list[0];
} }
PublicMethod.WriteLog("登录", PersonObj.Id.Value); using var userScope = logger.BeginScope(new Dictionary<string, object> { { "OperatorId", PersonObj.Id.Value }, { "OperatorNo", PersonObj.No }, { "OperatorName", PersonObj.Name } });
logger.LogInformation("登录成功:{userno}",txtNo.Text);
PublicMethod.StartCollectorDataProgram(); PublicMethod.StartCollectorDataProgram();
Hide(); Hide();
//在这里为编辑器注册 //在这里为编辑器注册
@ -91,6 +95,7 @@ namespace AIMS
} }
else else
{ {
logger.LogInformation("登录失败:{userno}",txtNo.Text);
MessageBox.Show("用户名或密码有错误,请重新输入!", "提示", MessageBoxButtons.OK); MessageBox.Show("用户名或密码有错误,请重新输入!", "提示", MessageBoxButtons.OK);
txtPassWord.Text = ""; txtPassWord.Text = "";

View File

@ -3,22 +3,32 @@ using AIMS.OperationAanesthesia;
using AIMSBLL; using AIMSBLL;
using AIMSExtension; using AIMSExtension;
using AIMSModel; using AIMSModel;
using DCSoftDotfuscate;
using DevComponents.DotNetBar; using DevComponents.DotNetBar;
using DevComponents.DotNetBar.Metro.ColorTables;
using DocumentManagement; using DocumentManagement;
using Microsoft.Extensions.Logging;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Data; using System.Data;
using System.Drawing; using System.Drawing;
using System.Linq;
using System.Reflection; using System.Reflection;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
#if MD
using MaterialSkin;
using MaterialSkin.Controls;
#endif
namespace AIMS namespace AIMS
{ {
public partial class FormMainManage : OfficeForm public partial class FormMainManage : Office2007Form
{ {
ILogger<FormMainManage> logger = null;
public FormMainManage() public FormMainManage()
{ {
logger = this.GetLogger();
InitializeComponent(); InitializeComponent();
Control.CheckForIllegalCrossThreadCalls = false; Control.CheckForIllegalCrossThreadCalls = false;
//Task.Factory.StartNew(() => { PreLoad(); }); //Task.Factory.StartNew(() => { PreLoad(); });
@ -39,6 +49,8 @@ namespace AIMS
eStyle.VisualStudio2012Dark , eStyle.VisualStudio2012Dark ,
eStyle.OfficeMobile2014 }); eStyle.OfficeMobile2014 });
comboBoxEx1.SelectedIndex = 1; comboBoxEx1.SelectedIndex = 1;
comboBoxEx2.Items.AddRange(MetroColorGeneratorParameters.GetAllPredefinedThemes().Cast<object>()
.ToArray());
SetGridAlternatingRows(lv1); SetGridAlternatingRows(lv1);
SetGridAlternatingRows(lv2); SetGridAlternatingRows(lv2);
@ -46,6 +58,14 @@ namespace AIMS
SetGridAlternatingRows(lv4); SetGridAlternatingRows(lv4);
SetGridAlternatingRows(lv5); SetGridAlternatingRows(lv5);
SetGridAlternatingRows(lv6); SetGridAlternatingRows(lv6);
#if MD
var materialSkinManager = MaterialSkinManager.Instance;
//materialSkinManager.AddFormToManage(this);
materialSkinManager.Theme = MaterialSkinManager.Themes.LIGHT;
materialSkinManager.ColorScheme = new MaterialSkin.ColorScheme(Primary.BlueGrey800, Primary.BlueGrey900, Primary.BlueGrey500, Accent.LightBlue200, TextShade.WHITE);
#endif
} }
private void switchButton1_ValueChanged(object sender, EventArgs e) private void switchButton1_ValueChanged(object sender, EventArgs e)
@ -92,8 +112,45 @@ namespace AIMS
eStyle style = (eStyle)comboBoxEx1.SelectedItem; eStyle style = (eStyle)comboBoxEx1.SelectedItem;
if (styleManager1.ManagerStyle != style) if (styleManager1.ManagerStyle != style)
styleManager1.ManagerStyle = style; styleManager1.ManagerStyle = style;
}
private void comboBoxEx2_SelectedIndexChanged(object sender, EventArgs e)
{
if (comboBoxEx1.SelectedItem == null) return;
var style = (MetroColorGeneratorParameters)comboBoxEx2.SelectedItem;
//if (styleManager1.MetroColorParameters != style)
styleManager1.MetroColorParameters = style;
//styleManager1.MetroColorParameters = MetroColorGeneratorParameters.Cherry;
} }
Dictionary<string, string> menuToSymbol = new()
{
{"手术申请", "\uf044"},
{"手术排程", "\uf073"},
{"麻醉记录", "\uf15b"},
{"恢复记录", "\uf15c"},
{"诱导记录", "\uf044"},
{"镇痛记录", "\uf044"},
{"内镜麻醉", "\uf044"},
{"介入手术", "\uf044"},
{"科室登记", "\uf044"},
{"复苏记录", "\uf15c"},
{"查询管理", "\uf00e"},
{"收费管理", "\uf00e"},
{"术后回顾", "\uf0cb"},
{"病案管理", "\uf0cb"},
{"排程查询", "\uf0c5"},
{"医疗文书", "\uf14b"},
{"人员管理", "\uf0f0"},
{"系统管理", "\uf1de"},
{"报表统计", "\uf080"},
{"排班管理", "\uf03a"},
{"中央监护", "\uf109"},
{"大屏公告", "\uf022"},
{"质控管理", "\uf200"},
{"室外登记", "\uf183"},
{"交班管理", "\uf18d"},
{"手术清点", "\uf0ea"}
};
private void FormMainManage_Load(object sender, EventArgs e) private void FormMainManage_Load(object sender, EventArgs e)
{ {
@ -154,58 +211,13 @@ namespace AIMS
sideNavItem.Panel = sideNavPanel; sideNavItem.Panel = sideNavPanel;
sideNavItem.Text = menuSec.Name; sideNavItem.Text = menuSec.Name;
sideNavItem.Tag = menuSec; sideNavItem.Tag = menuSec;
if (menuSec.Name == "手术申请")
sideNavItem.Symbol = "\uf044";
if (menuSec.Name == "手术排程") if (menuToSymbol.ContainsKey(menuSec.Name))
sideNavItem.Symbol = "\uf073"; {
if (menuSec.Name == "麻醉记录") sideNavItem.Symbol = menuToSymbol[menuSec.Name];
sideNavItem.Symbol = "\uf15b"; }
if (menuSec.Name == "恢复记录")
sideNavItem.Symbol = "\uf15c";
if (menuSec.Name == "诱导记录")
sideNavItem.Symbol = "\uf044";
if (menuSec.Name == "镇痛记录")
sideNavItem.Symbol = "\uf044";
if (menuSec.Name == "内镜麻醉")
sideNavItem.Symbol = "\uf044";
if (menuSec.Name == "介入手术")
sideNavItem.Symbol = "\uf044";
if (menuSec.Name == "科室登记")
sideNavItem.Symbol = "\uf044";
if (menuSec.Name == "复苏记录")
sideNavItem.Symbol = "\uf15c";
if (menuSec.Name == "查询管理")
sideNavItem.Symbol = "\uf00e";
if (menuSec.Name == "收费管理")
sideNavItem.Symbol = "\uf00e";
if (menuSec.Name == "术后回顾")
sideNavItem.Symbol = "\uf0cb";
if (menuSec.Name == "病案管理")
sideNavItem.Symbol = "\uf0cb";
if (menuSec.Name == "排程查询")
sideNavItem.Symbol = "\uf0c5";
if (menuSec.Name == "医疗文书")
sideNavItem.Symbol = "\uf14b";
if (menuSec.Name == "人员管理")
sideNavItem.Symbol = "\uf0f0";
if (menuSec.Name == "系统管理")
sideNavItem.Symbol = "\uf1de";
if (menuSec.Name == "报表统计")
sideNavItem.Symbol = "\uf080";
if (menuSec.Name == "排班管理")
sideNavItem.Symbol = "\uf03a";
if (menuSec.Name == "中央监护")
sideNavItem.Symbol = "\uf109";
if (menuSec.Name == "大屏公告")
sideNavItem.Symbol = "\uf022";
if (menuSec.Name == "质控管理")
sideNavItem.Symbol = "\uf200";
if (menuSec.Name == "室外登记")
sideNavItem.Symbol = "\uf183";
if (menuSec.Name == "交班管理")
sideNavItem.Symbol = "\uf18d";
if (menuSec.Name == "手术清点")
sideNavItem.Symbol = "\uf0ea";
this.sideNav1.Items.Add(sideNavItem); this.sideNav1.Items.Add(sideNavItem);
} }
@ -352,11 +364,13 @@ namespace AIMS
frm.WindowState = FormWindowState.Maximized; frm.WindowState = FormWindowState.Maximized;
sideNavItem.Panel.Controls.Clear(); sideNavItem.Panel.Controls.Clear();
sideNavItem.Panel.Controls.Add(frm); sideNavItem.Panel.Controls.Add(frm);
frm.Show(); frm.Show();
frm.BringToFront(); frm.BringToFront();
} }
catch (Exception) catch (Exception ex)
{ {
logger.LogError(ex, "打开窗体时出错:@Menu", menu);
if (path.Contains("MainFormManage")) if (path.Contains("MainFormManage"))
{ {
MainFormManage frm = new MainFormManage(); MainFormManage frm = new MainFormManage();
@ -369,9 +383,9 @@ namespace AIMS
} }
public Form GetForm(string Path) public Form GetForm(string Path)
{ {
object result = null; object result = null;
Type type = Type.GetType(Path); Type type = Type.GetType(Path);
result = (Form)Activator.CreateInstance(type); result = (Form)Activator.CreateInstance(type);
return (Form)result; return (Form)result;
} }
@ -386,27 +400,27 @@ namespace AIMS
{ {
try try
{ {
foreach (Form frm in Application.OpenForms) var forms = Application.OpenForms.OfType<Form>().ToList() ;
foreach (var frm in forms)
{ {
if (frm.Name != "frmLogin" && frm.Name != this.Name) if (frm == this)
{ {
frm.Close(); continue;
break;
} }
} if (frm is FormLogin fl)
foreach (Form frm in Application.OpenForms)
{
if (frm.Name == "frmLogin")
{ {
frm.Show(); fl.Show();
isClose = true; continue;
this.Close();
break;
} }
frm.Close();
} }
isClose = true;
this.Close();
} }
catch (Exception) catch (Exception ex)
{ {
logger.LogError(ex, "关闭窗口出错");
} }
} }
bool isClose = false; bool isClose = false;
@ -416,15 +430,36 @@ namespace AIMS
{ {
if (MessageBox.Show(this, "确定要退出当前系统?", "系统提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) if (MessageBox.Show(this, "确定要退出当前系统?", "系统提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
{ {
GC.Collect(); isClose = true;
GC.WaitForPendingFinalizers(); //关闭所有窗体
this.Dispose(); Task.Factory.StartNew(CloseAll);
Environment.Exit(0);
}
else
{
e.Cancel = true;
} }
e.Cancel = true;
} }
} }
private async Task CloseAll()
{
var forms = Application.OpenForms.OfType<Form>().ToList();
foreach (var frm in forms)
{
if (frm == this)
{
continue;
}
frm.Close();
}
await Task.Delay(10 * 1000);//等待10秒
logger.LogWarning("等待10秒未能关闭所有窗体即将强制关闭");
Environment.Exit(0);
}
private void buttonX1_Click(object sender, EventArgs e) private void buttonX1_Click(object sender, EventArgs e)
{ {
AIMS.PublicUI.UI.frmAbout frmEditPassWord = new PublicUI.UI.frmAbout(); AIMS.PublicUI.UI.frmAbout frmEditPassWord = new PublicUI.UI.frmAbout();

Binary file not shown.

View File

@ -822,7 +822,7 @@
this.circularProgress1.Name = "circularProgress1"; this.circularProgress1.Name = "circularProgress1";
this.circularProgress1.ProgressColor = System.Drawing.Color.DodgerBlue; this.circularProgress1.ProgressColor = System.Drawing.Color.DodgerBlue;
this.circularProgress1.Size = new System.Drawing.Size(389, 239); this.circularProgress1.Size = new System.Drawing.Size(389, 239);
this.circularProgress1.Style = DevComponents.DotNetBar.eDotNetBarStyle.OfficeXP; this.circularProgress1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.circularProgress1.TabIndex = 6; this.circularProgress1.TabIndex = 6;
this.circularProgress1.Value = 100; this.circularProgress1.Value = 100;
// //

View File

@ -959,7 +959,7 @@
this.circularProgress1.Name = "circularProgress1"; this.circularProgress1.Name = "circularProgress1";
this.circularProgress1.ProgressColor = System.Drawing.Color.DodgerBlue; this.circularProgress1.ProgressColor = System.Drawing.Color.DodgerBlue;
this.circularProgress1.Size = new System.Drawing.Size(389, 239); this.circularProgress1.Size = new System.Drawing.Size(389, 239);
this.circularProgress1.Style = DevComponents.DotNetBar.eDotNetBarStyle.OfficeXP; this.circularProgress1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.circularProgress1.TabIndex = 6; this.circularProgress1.TabIndex = 6;
this.circularProgress1.Value = 100; this.circularProgress1.Value = 100;
// //
@ -1049,7 +1049,7 @@
this.circularProgress2.Name = "circularProgress2"; this.circularProgress2.Name = "circularProgress2";
this.circularProgress2.ProgressColor = System.Drawing.Color.DodgerBlue; this.circularProgress2.ProgressColor = System.Drawing.Color.DodgerBlue;
this.circularProgress2.Size = new System.Drawing.Size(389, 239); this.circularProgress2.Size = new System.Drawing.Size(389, 239);
this.circularProgress2.Style = DevComponents.DotNetBar.eDotNetBarStyle.OfficeXP; this.circularProgress2.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.circularProgress2.TabIndex = 6; this.circularProgress2.TabIndex = 6;
this.circularProgress2.Value = 100; this.circularProgress2.Value = 100;
// //

View File

@ -959,7 +959,7 @@
this.circularProgress1.Name = "circularProgress1"; this.circularProgress1.Name = "circularProgress1";
this.circularProgress1.ProgressColor = System.Drawing.Color.DodgerBlue; this.circularProgress1.ProgressColor = System.Drawing.Color.DodgerBlue;
this.circularProgress1.Size = new System.Drawing.Size(389, 239); this.circularProgress1.Size = new System.Drawing.Size(389, 239);
this.circularProgress1.Style = DevComponents.DotNetBar.eDotNetBarStyle.OfficeXP; this.circularProgress1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.circularProgress1.TabIndex = 6; this.circularProgress1.TabIndex = 6;
this.circularProgress1.Value = 100; this.circularProgress1.Value = 100;
// //
@ -1049,7 +1049,7 @@
this.circularProgress2.Name = "circularProgress2"; this.circularProgress2.Name = "circularProgress2";
this.circularProgress2.ProgressColor = System.Drawing.Color.DodgerBlue; this.circularProgress2.ProgressColor = System.Drawing.Color.DodgerBlue;
this.circularProgress2.Size = new System.Drawing.Size(389, 239); this.circularProgress2.Size = new System.Drawing.Size(389, 239);
this.circularProgress2.Style = DevComponents.DotNetBar.eDotNetBarStyle.OfficeXP; this.circularProgress2.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.circularProgress2.TabIndex = 6; this.circularProgress2.TabIndex = 6;
this.circularProgress2.Value = 100; this.circularProgress2.Value = 100;
// //

View File

@ -748,7 +748,7 @@
this.circularProgress1.Name = "circularProgress1"; this.circularProgress1.Name = "circularProgress1";
this.circularProgress1.ProgressColor = System.Drawing.Color.DodgerBlue; this.circularProgress1.ProgressColor = System.Drawing.Color.DodgerBlue;
this.circularProgress1.Size = new System.Drawing.Size(389, 239); this.circularProgress1.Size = new System.Drawing.Size(389, 239);
this.circularProgress1.Style = DevComponents.DotNetBar.eDotNetBarStyle.OfficeXP; this.circularProgress1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.circularProgress1.TabIndex = 6; this.circularProgress1.TabIndex = 6;
this.circularProgress1.Value = 100; this.circularProgress1.Value = 100;
// //

View File

@ -127,7 +127,7 @@ namespace AIMS.PublicUI.UI
this.btnDelete.Location = new System.Drawing.Point(861, 6); this.btnDelete.Location = new System.Drawing.Point(861, 6);
this.btnDelete.Name = "btnDelete"; this.btnDelete.Name = "btnDelete";
this.btnDelete.Size = new System.Drawing.Size(106, 30); this.btnDelete.Size = new System.Drawing.Size(106, 30);
this.btnDelete.Style = DevComponents.DotNetBar.eDotNetBarStyle.OfficeMobile2014; this.btnDelete.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnDelete.TabIndex = 2; this.btnDelete.TabIndex = 2;
this.btnDelete.Text = "删除"; this.btnDelete.Text = "删除";
this.btnDelete.Click += new System.EventHandler(this.btnDelete_Click); this.btnDelete.Click += new System.EventHandler(this.btnDelete_Click);

View File

@ -1339,7 +1339,7 @@
this.circularProgress1.Name = "circularProgress1"; this.circularProgress1.Name = "circularProgress1";
this.circularProgress1.ProgressColor = System.Drawing.Color.DodgerBlue; this.circularProgress1.ProgressColor = System.Drawing.Color.DodgerBlue;
this.circularProgress1.Size = new System.Drawing.Size(389, 239); this.circularProgress1.Size = new System.Drawing.Size(389, 239);
this.circularProgress1.Style = DevComponents.DotNetBar.eDotNetBarStyle.OfficeXP; this.circularProgress1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.circularProgress1.TabIndex = 6; this.circularProgress1.TabIndex = 6;
this.circularProgress1.Value = 100; this.circularProgress1.Value = 100;
// //
@ -1985,7 +1985,7 @@
this.circularProgress2.Name = "circularProgress2"; this.circularProgress2.Name = "circularProgress2";
this.circularProgress2.ProgressColor = System.Drawing.Color.DodgerBlue; this.circularProgress2.ProgressColor = System.Drawing.Color.DodgerBlue;
this.circularProgress2.Size = new System.Drawing.Size(389, 239); this.circularProgress2.Size = new System.Drawing.Size(389, 239);
this.circularProgress2.Style = DevComponents.DotNetBar.eDotNetBarStyle.OfficeXP; this.circularProgress2.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.circularProgress2.TabIndex = 6; this.circularProgress2.TabIndex = 6;
this.circularProgress2.Value = 100; this.circularProgress2.Value = 100;
// //

View File

@ -664,13 +664,13 @@ namespace AIMS.OperationFront.UI
this.navigationPane1.NavigationBarHeight = 190; this.navigationPane1.NavigationBarHeight = 190;
this.navigationPane1.Padding = new System.Windows.Forms.Padding(1); this.navigationPane1.Padding = new System.Windows.Forms.Padding(1);
this.navigationPane1.Size = new System.Drawing.Size(320, 737); this.navigationPane1.Size = new System.Drawing.Size(320, 737);
this.navigationPane1.Style = DevComponents.DotNetBar.eDotNetBarStyle.Office2013; this.navigationPane1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.navigationPane1.TabIndex = 0; this.navigationPane1.TabIndex = 0;
// //
// //
// //
this.navigationPane1.TitlePanel.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; this.navigationPane1.TitlePanel.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
this.navigationPane1.TitlePanel.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2013; this.navigationPane1.TitlePanel.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.navigationPane1.TitlePanel.DisabledBackColor = System.Drawing.Color.Empty; this.navigationPane1.TitlePanel.DisabledBackColor = System.Drawing.Color.Empty;
this.navigationPane1.TitlePanel.Dock = System.Windows.Forms.DockStyle.Top; this.navigationPane1.TitlePanel.Dock = System.Windows.Forms.DockStyle.Top;
this.navigationPane1.TitlePanel.Font = new System.Drawing.Font("΢ÈíÑźÚ", 11.5F, System.Drawing.FontStyle.Bold); this.navigationPane1.TitlePanel.Font = new System.Drawing.Font("΢ÈíÑźÚ", 11.5F, System.Drawing.FontStyle.Bold);
@ -692,7 +692,7 @@ namespace AIMS.OperationFront.UI
// //
// navigationPanePanel1 // navigationPanePanel1
// //
this.navigationPanePanel1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2013; this.navigationPanePanel1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.navigationPanePanel1.Controls.Add(this.groupBoxsel); this.navigationPanePanel1.Controls.Add(this.groupBoxsel);
this.navigationPanePanel1.DisabledBackColor = System.Drawing.Color.Empty; this.navigationPanePanel1.DisabledBackColor = System.Drawing.Color.Empty;
this.navigationPanePanel1.Dock = System.Windows.Forms.DockStyle.Fill; this.navigationPanePanel1.Dock = System.Windows.Forms.DockStyle.Fill;
@ -1069,7 +1069,7 @@ namespace AIMS.OperationFront.UI
// //
// navigationPanePanel4 // navigationPanePanel4
// //
this.navigationPanePanel4.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2013; this.navigationPanePanel4.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.navigationPanePanel4.Controls.Add(this.groupBox2); this.navigationPanePanel4.Controls.Add(this.groupBox2);
this.navigationPanePanel4.DisabledBackColor = System.Drawing.Color.Empty; this.navigationPanePanel4.DisabledBackColor = System.Drawing.Color.Empty;
this.navigationPanePanel4.Dock = System.Windows.Forms.DockStyle.Fill; this.navigationPanePanel4.Dock = System.Windows.Forms.DockStyle.Fill;
@ -1410,7 +1410,7 @@ namespace AIMS.OperationFront.UI
// //
// navigationPanePanel5 // navigationPanePanel5
// //
this.navigationPanePanel5.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2013; this.navigationPanePanel5.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.navigationPanePanel5.Controls.Add(this.v); this.navigationPanePanel5.Controls.Add(this.v);
this.navigationPanePanel5.DisabledBackColor = System.Drawing.Color.Empty; this.navigationPanePanel5.DisabledBackColor = System.Drawing.Color.Empty;
this.navigationPanePanel5.Dock = System.Windows.Forms.DockStyle.Fill; this.navigationPanePanel5.Dock = System.Windows.Forms.DockStyle.Fill;
@ -1751,7 +1751,7 @@ namespace AIMS.OperationFront.UI
// //
// navigationPanePanel2 // navigationPanePanel2
// //
this.navigationPanePanel2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2013; this.navigationPanePanel2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.navigationPanePanel2.Controls.Add(this.groupBox1); this.navigationPanePanel2.Controls.Add(this.groupBox1);
this.navigationPanePanel2.DisabledBackColor = System.Drawing.Color.Empty; this.navigationPanePanel2.DisabledBackColor = System.Drawing.Color.Empty;
this.navigationPanePanel2.Dock = System.Windows.Forms.DockStyle.Fill; this.navigationPanePanel2.Dock = System.Windows.Forms.DockStyle.Fill;

View File

@ -172,7 +172,7 @@
this.cboOperationRoom.Location = new System.Drawing.Point(452, 12); this.cboOperationRoom.Location = new System.Drawing.Point(452, 12);
this.cboOperationRoom.Name = "cboOperationRoom"; this.cboOperationRoom.Name = "cboOperationRoom";
this.cboOperationRoom.Size = new System.Drawing.Size(103, 28); this.cboOperationRoom.Size = new System.Drawing.Size(103, 28);
this.cboOperationRoom.Style = DevComponents.DotNetBar.eDotNetBarStyle.OfficeMobile2014; this.cboOperationRoom.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.cboOperationRoom.TabIndex = 500; this.cboOperationRoom.TabIndex = 500;
this.cboOperationRoom.Visible = false; this.cboOperationRoom.Visible = false;
// //

View File

@ -161,7 +161,7 @@ namespace AIMS.OperationFront.UI
this.cboOperationRoom.Location = new System.Drawing.Point(462, 12); this.cboOperationRoom.Location = new System.Drawing.Point(462, 12);
this.cboOperationRoom.Name = "cboOperationRoom"; this.cboOperationRoom.Name = "cboOperationRoom";
this.cboOperationRoom.Size = new System.Drawing.Size(103, 28); this.cboOperationRoom.Size = new System.Drawing.Size(103, 28);
this.cboOperationRoom.Style = DevComponents.DotNetBar.eDotNetBarStyle.OfficeMobile2014; this.cboOperationRoom.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.cboOperationRoom.TabIndex = 0; this.cboOperationRoom.TabIndex = 0;
this.cboOperationRoom.Visible = false; this.cboOperationRoom.Visible = false;
// //

View File

@ -1,10 +1,13 @@
using AIMS.PublicUI.UI; using AIMS.PublicUI.UI;
using AIMSModel; using AIMSModel;
using CCIS.Shared;
using DCSoft.Writer; using DCSoft.Writer;
using DCSoft.Writer.Data; using DCSoft.Writer.Data;
using DCSoft.Writer.Dom; using DCSoft.Writer.Dom;
using DocumentManagement; using DocumentManagement;
using DrawGraph; using DrawGraph;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Data; using System.Data;
@ -18,6 +21,7 @@ namespace AIMS.OremrUserControl
{ {
public partial class ucDocument : UserControl public partial class ucDocument : UserControl
{ {
ILogger<ucDocument> logger = SharedContext.StaticInstance.ServiceProvider.GetService<ILoggerFactory>().CreateLogger<ucDocument>();
//模板Model //模板Model
private PrintTemplate TModel = new PrintTemplate(); private PrintTemplate TModel = new PrintTemplate();
//文档Model //文档Model
@ -43,6 +47,7 @@ namespace AIMS.OremrUserControl
public ucDocument(int tempId, int docId, PatientRecord patient) public ucDocument(int tempId, int docId, PatientRecord patient)
{ {
InitializeComponent(); InitializeComponent();
Patient = patient; Patient = patient;
@ -250,6 +255,7 @@ namespace AIMS.OremrUserControl
} }
catch (Exception exp) catch (Exception exp)
{ {
logger.LogError(exp,"保存文档出错");
MessageBox.Show(exp.Message, "提示"); MessageBox.Show(exp.Message, "提示");
} }
} }

View File

@ -9,6 +9,7 @@
<RootNamespace>AIMSEntity</RootNamespace> <RootNamespace>AIMSEntity</RootNamespace>
<AssemblyName>AIMSEntity</AssemblyName> <AssemblyName>AIMSEntity</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<LangVersion>Latest</LangVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic> <Deterministic>true</Deterministic>
<TargetFrameworkProfile /> <TargetFrameworkProfile />

View File

@ -11,6 +11,7 @@
<RootNamespace>AIMSExtension</RootNamespace> <RootNamespace>AIMSExtension</RootNamespace>
<AssemblyName>AIMSExtension</AssemblyName> <AssemblyName>AIMSExtension</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<LangVersion>Latest</LangVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
</PropertyGroup> </PropertyGroup>

View File

@ -9,6 +9,7 @@
<RootNamespace>AutoUpdateTool</RootNamespace> <RootNamespace>AutoUpdateTool</RootNamespace>
<AssemblyName>AutoUpdateTool</AssemblyName> <AssemblyName>AutoUpdateTool</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<LangVersion>Latest</LangVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic> <Deterministic>true</Deterministic>
<TargetFrameworkProfile /> <TargetFrameworkProfile />

View File

@ -14,6 +14,7 @@
<RootNamespace>BeginScreen</RootNamespace> <RootNamespace>BeginScreen</RootNamespace>
<AssemblyName>BeginScreen</AssemblyName> <AssemblyName>BeginScreen</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<LangVersion>Latest</LangVersion>
<UseIISExpress>false</UseIISExpress> <UseIISExpress>false</UseIISExpress>
<FileUpgradeFlags> <FileUpgradeFlags>
</FileUpgradeFlags> </FileUpgradeFlags>

View File

@ -22,7 +22,7 @@ namespace DocumentManagement
public CompilerResults cr; public CompilerResults cr;
public Type type; public Type type;
private WriterControl myEdit;
private ElementEventTemplate eet; private ElementEventTemplate eet;
public bool IsLoad = false; public bool IsLoad = false;
@ -32,13 +32,46 @@ namespace DocumentManagement
public EventCodeCompiler(ref WriterControl myEditControl, string strMouseClickEvent, string strContentChangedEvent) public EventCodeCompiler(ref WriterControl myEditControl, string strMouseClickEvent, string strContentChangedEvent)
{ {
myEdit= myEditControl;
eet = new ElementEventTemplate(); eet = new ElementEventTemplate();
eet.MouseClick += new ElementMouseEventHandler(eetChk_MouseClick); eet.MouseClick += new ElementMouseEventHandler(eetChk_MouseClick);
eet.MouseDblClick += Eet_MouseDblClick; eet.MouseDblClick += Eet_MouseDblClick;
eet.KeyUp += Eet_KeyUp; eet.KeyUp += Eet_KeyUp;
eet.ContentChanged += new ContentChangedEventHandler(eet_ContentChanged); eet.ContentChanged += new ContentChangedEventHandler(eet_ContentChanged);
myEditControl.GlobalEventTemplate_Element = eet; myEditControl.GlobalEventTemplate_Element = eet;
eet.ContentChanging += Eet_ContentChanging;
}
private void Eet_ContentChanging(object eventSender, ContentChangingEventArgs args)
{
if (eventSender is XTextInputFieldElement xife&& args.InsertingElements is { })
{
var txtAll = args.InsertingElements.Select(c => c.Text).ToList();
var txt = string.Concat(txtAll);
if (txtAll.Any(c=>c.Contains("<22>")))
{
var clip = Clipboard.GetText()?.Trim();
args.InsertingElements.Clear();
args.InsertingElements.AddRange(clip.Select(c => new XTextCharElement { Text = c.ToString() }));
return;
//xife.Text = clip;
args.Cancel = true;
xife.InsertBefore(new XTextBlockElement { Text = clip }, xife.NextElement);
//myEdit.Refresh();
xife.Parent.EditorRefreshView();
var pos = myEdit.SelectionStartPosition;
return;
}
//byte[] originalBytes = Encoding.UTF8.GetBytes(txt); // 这里使用 UTF8 是假设或猜测
//string decodedString = Encoding.GetEncoding("GB2312").GetString(originalBytes); // 用其他编码尝试解码
//byte[] originalBytes2 = Encoding.GetEncoding("GB2312").GetBytes(txt); // 这里使用 UTF8 是假设或猜测
//string decodedString2 = Encoding.UTF8.GetString(originalBytes2); // 用其他编码尝试解码
}
} }
private void Eet_KeyUp(object eventSender, ElementKeyEventArgs args) private void Eet_KeyUp(object eventSender, ElementKeyEventArgs args)
@ -50,10 +83,16 @@ namespace DocumentManagement
var element = (eventSender as XTextDocument).CurrentInputField; var element = (eventSender as XTextDocument).CurrentInputField;
if (element != null) if (element != null)
{ {
var etxt = element.Text;
element.Text = element.Text.Replace("\r", "").Replace("\n", ""); element.Text = element.Text.Replace("\r", "").Replace("\n", "");
} }
} }
} }
else
{
}
} }
public CompilerErrorCollection Errors { get { return cr.Errors; } } public CompilerErrorCollection Errors { get { return cr.Errors; } }

View File

@ -11,6 +11,7 @@
<RootNamespace>DocumentManagement</RootNamespace> <RootNamespace>DocumentManagement</RootNamespace>
<AssemblyName>DocumentManagement</AssemblyName> <AssemblyName>DocumentManagement</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<LangVersion>Latest</LangVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<NuGetPackageImportStamp> <NuGetPackageImportStamp>
</NuGetPackageImportStamp> </NuGetPackageImportStamp>
@ -43,10 +44,6 @@
<Reference Include="DCSoft.Writer"> <Reference Include="DCSoft.Writer">
<HintPath>..\AIMS\Extensions\DCSoft.Writer.dll</HintPath> <HintPath>..\AIMS\Extensions\DCSoft.Writer.dll</HintPath>
</Reference> </Reference>
<Reference Include="DevComponents.DotNetBar2, Version=12.5.0.2, Culture=neutral, PublicKeyToken=c39c3242a43eee2b, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\AIMS\Extensions\DevComponents.DotNetBar2.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Office.Interop.Excel, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL"> <Reference Include="Microsoft.Office.Interop.Excel, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<EmbedInteropTypes>False</EmbedInteropTypes> <EmbedInteropTypes>False</EmbedInteropTypes>
@ -249,6 +246,11 @@
<Name>AIMSExtension</Name> <Name>AIMSExtension</Name>
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup>
<PackageReference Include="DotNetBar2">
<Version>1.0.1</Version>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.

View File

@ -196,9 +196,9 @@ namespace DrawGraph
} }
} }
} }
catch (Exception) catch (Exception ex)
{ {
//PublicMethod.WriteLog(new Exception("回写数据出错:" + propertyName + " 值:" + value + " 错误:" + ex.Message)); PublicMethod.WriteLog(new Exception("回写数据出错:" + propertyName + " 值:" + value + " 错误:" + ex.Message));
} }
return i; return i;
} }

View File

@ -9,6 +9,7 @@
<RootNamespace>DrawGraph</RootNamespace> <RootNamespace>DrawGraph</RootNamespace>
<AssemblyName>DrawGraph</AssemblyName> <AssemblyName>DrawGraph</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<LangVersion>Latest</LangVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic> <Deterministic>true</Deterministic>
<TargetFrameworkProfile /> <TargetFrameworkProfile />
@ -38,10 +39,6 @@
<StartupObject /> <StartupObject />
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="DevComponents.DotNetBar2, Version=12.5.0.2, Culture=neutral, PublicKeyToken=c39c3242a43eee2b, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\AIMS\Extensions\DevComponents.DotNetBar2.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> <Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\AIMS\Extensions\Newtonsoft.Json.dll</HintPath> <HintPath>..\AIMS\Extensions\Newtonsoft.Json.dll</HintPath>
@ -330,5 +327,10 @@
<ItemGroup> <ItemGroup>
<EmbeddedResource Include="Resources\bjtp.png" /> <EmbeddedResource Include="Resources\bjtp.png" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<PackageReference Include="DotNetBar2">
<Version>1.0.1</Version>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project> </Project>

View File

@ -36,7 +36,7 @@
// panelEx1 // panelEx1
// //
this.panelEx1.CanvasColor = System.Drawing.SystemColors.Control; this.panelEx1.CanvasColor = System.Drawing.SystemColors.Control;
this.panelEx1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2010; this.panelEx1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.panelEx1.DisabledBackColor = System.Drawing.Color.Empty; this.panelEx1.DisabledBackColor = System.Drawing.Color.Empty;
this.panelEx1.Dock = System.Windows.Forms.DockStyle.Fill; this.panelEx1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panelEx1.Font = new System.Drawing.Font("微软雅黑", 13F); this.panelEx1.Font = new System.Drawing.Font("微软雅黑", 13F);

View File

@ -11,6 +11,7 @@
<RootNamespace>DrawGraphManagement</RootNamespace> <RootNamespace>DrawGraphManagement</RootNamespace>
<AssemblyName>DrawGraphManagement</AssemblyName> <AssemblyName>DrawGraphManagement</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<LangVersion>Latest</LangVersion>
<TargetFrameworkProfile> <TargetFrameworkProfile>
</TargetFrameworkProfile> </TargetFrameworkProfile>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
@ -74,10 +75,6 @@
<Reference Include="DCSoft.Writer"> <Reference Include="DCSoft.Writer">
<HintPath>..\AIMS\Extensions\DCSoft.Writer.dll</HintPath> <HintPath>..\AIMS\Extensions\DCSoft.Writer.dll</HintPath>
</Reference> </Reference>
<Reference Include="DevComponents.DotNetBar2, Version=12.5.0.2, Culture=neutral, PublicKeyToken=c39c3242a43eee2b, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\AIMS\Extensions\DevComponents.DotNetBar2.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> <Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\AIMS\Extensions\Newtonsoft.Json.dll</HintPath> <HintPath>..\AIMS\Extensions\Newtonsoft.Json.dll</HintPath>
@ -170,7 +167,6 @@
<DesignTime>True</DesignTime> <DesignTime>True</DesignTime>
</Compile> </Compile>
<None Include="app.config" /> <None Include="app.config" />
<None Include="packages.config" />
<None Include="Properties\Settings.settings"> <None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator> <Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput> <LastGenOutput>Settings.Designer.cs</LastGenOutput>
@ -212,6 +208,14 @@
<Name>DrawGraph</Name> <Name>DrawGraph</Name>
</ProjectReference> </ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup>
<PackageReference Include="DotNetBar2">
<Version>1.0.1</Version>
</PackageReference>
<PackageReference Include="PdfiumViewer">
<Version>2.13.0</Version>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.

View File

@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="PdfiumViewer" version="2.13.0.0" targetFramework="net40" />
</packages>