Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
Ftt_Common
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Ftt_Common
Commits
4ad24f61
Commit
4ad24f61
authored
Dec 30, 2021
by
罗显健
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://jhdsoft.gicp.net:18180/root/Ftt_Common
parents
cbe07d8d
05b572a2
Changes
24
Show whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
763 additions
and
88 deletions
+763
-88
Ftt.PatchPack.exe.config
AppHome/Ftt.PatchPack.exe.config
+0
-2
Tools.exe.config
AppHome/Tools.exe.config
+1
-1
links.xml
AppHome/config/links.xml
+24
-0
Project.cs
Ftt.PatchPack/Project.cs
+20
-6
Log.cs
Tools/MyCommon/Log.cs
+203
-0
UserLog.cs
Tools/MyCommon/UserLog.cs
+3
-3
wProgressText.Designer.cs
Tools/MyCommon/wProgressText.Designer.cs
+66
-0
wProgressText.cs
Tools/MyCommon/wProgressText.cs
+66
-0
wProgressText.resx
Tools/MyCommon/wProgressText.resx
+120
-0
Utils.cs
Tools/MyUtils/Utils.cs
+58
-6
Tools.csproj
Tools/Tools.csproj
+11
-1
wHelpDocument.Designer.cs
Tools/UI/sys/wHelpDocument.Designer.cs
+27
-0
wHelpDocument.resx
Tools/UI/sys/wHelpDocument.resx
+9
-0
wUploadUpdate.Designer.cs
Tools/UI/sys/wUploadUpdate.Designer.cs
+13
-13
wUploadUpdate.cs
Tools/UI/sys/wUploadUpdate.cs
+72
-19
wAppModel.Designer.cs
Tools/UI/wAppModel.Designer.cs
+1
-0
wAppModel.cs
Tools/UI/wAppModel.cs
+9
-1
wAuditDemo.cs
Tools/UI/wAuditDemo.cs
+1
-0
wFlowShare.Designer.cs
Tools/UI/wFlowShare.Designer.cs
+18
-0
wFlowShare.resx
Tools/UI/wFlowShare.resx
+6
-0
wModuleManager.Designer.cs
Tools/UI/wModuleManager.Designer.cs
+28
-29
wModuleManager.resx
Tools/UI/wModuleManager.resx
+1
-1
wExtend.cs
Tools/wExtend.cs
+2
-2
wMain.cs
Tools/wMain.cs
+4
-4
No files found.
AppHome/Ftt.PatchPack.exe.config
View file @
4ad24f61
...
...
@@ -9,8 +9,6 @@
<
add
key
=
"PatchTimeFrame_Sql"
value
=
"720"
/>
<
add
key
=
"PatchTimeFrame_Xml"
value
=
"720"
/>
<
add
key
=
"PatchTimeFrame_Xml"
value
=
"720"
/>
<!--是否排除.
pdb
文件。
1
:排除,其他包含。-->
<
add
key
=
"Exclude_PDB"
value
=
"1"
/>
<
add
key
=
"ClientSettingsProvider.ServiceUri"
value
=
""
/>
...
...
AppHome/Tools.exe.config
View file @
4ad24f61
...
...
@@ -3,7 +3,7 @@
<
appSettings
>
<
add
key
=
"LoginInfo"
value
=
"wwF/xpBzWek="
/>
<
add
key
=
"LoginVerify"
value
=
"v86f5Q3Xa7U="
/>
<
add
key
=
"UpdateTime"
value
=
"2021-1
1-26 14:21:49.650
"
/>
<
add
key
=
"UpdateTime"
value
=
"2021-1
2-09 09:48:49.755
"
/>
</
appSettings
>
<
startup
>
<
supportedRuntime
version
=
"v4.0"
sku
=
".NETFramework,Version=v4.8"
/>
...
...
AppHome/config/links.xml
View file @
4ad24f61
...
...
@@ -96,4 +96,28 @@
<UserId>
sa
</UserId>
<Pwd>
a*1
</Pwd>
</links>
<links>
<Link>
192.168.1.31
</Link>
<DbName>
FTT_PDM
</DbName>
<UserId>
sa
</UserId>
<Pwd>
a*1
</Pwd>
</links>
<links>
<Link>
122.226.244.210,1800
</Link>
<DbName>
FTT_U6
</DbName>
<UserId>
sa
</UserId>
<Pwd>
a*1
</Pwd>
</links>
<links>
<Link>
120.192.78.70,5088
</Link>
<DbName>
JHD_HY_210911
</DbName>
<UserId>
sa
</UserId>
<Pwd>
a*1
</Pwd>
</links>
<links>
<Link>
192.168.1.204
</Link>
<DbName>
FTT_GuBang
</DbName>
<UserId>
sa
</UserId>
<Pwd>
sa
</Pwd>
</links>
</DocumentElement>
\ No newline at end of file
Ftt.PatchPack/Project.cs
View file @
4ad24f61
...
...
@@ -71,8 +71,25 @@ namespace Ftt.PatchPack
static
Project
()
{
var
strExceptFiles
=
ConfigurationManager
.
AppSettings
[
"ExceptFiles"
];
//检查配置文件
var
val
=
ConfigurationManager
.
AppSettings
[
"PatchTimeFrame_Dll"
];
if
(
val
==
null
)
{
Configuration
config
=
ConfigurationManager
.
OpenExeConfiguration
(
ConfigurationUserLevel
.
None
);
//添加默认配置
config
.
AppSettings
.
Settings
.
Add
(
"ExceptFiles"
,
""
);
config
.
AppSettings
.
Settings
.
Add
(
"ContainFiles"
,
""
);
config
.
AppSettings
.
Settings
.
Add
(
"PatchTimeFrame_Dll"
,
"48"
);
config
.
AppSettings
.
Settings
.
Add
(
"PatchTimeFrame_Sql"
,
"720"
);
config
.
AppSettings
.
Settings
.
Add
(
"PatchTimeFrame_Xml"
,
"720"
);
config
.
AppSettings
.
Settings
.
Add
(
"Exclude_PDB"
,
"1"
);
//保存配置文件
config
.
Save
(
ConfigurationSaveMode
.
Modified
);
//更新缓存
ConfigurationManager
.
RefreshSection
(
"appSettings"
);
}
var
strExceptFiles
=
ConfigurationManager
.
AppSettings
[
"ExceptFiles"
];
if
(!
string
.
IsNullOrEmpty
(
strExceptFiles
))
{
var
files
=
strExceptFiles
.
Split
(
new
char
[]
{
','
},
StringSplitOptions
.
RemoveEmptyEntries
);
...
...
@@ -86,12 +103,10 @@ namespace Ftt.PatchPack
foreach
(
var
file
in
files
)
if
(!
ContainFiles
.
Contains
(
file
))
ContainFiles
.
Add
(
file
);
}
Int32
.
TryParse
(
ConfigurationManager
.
AppSettings
[
"PatchTimeFrame_Dll"
],
out
PatchTimeFrame_Dll
);
Int32
.
TryParse
(
ConfigurationManager
.
AppSettings
[
"PatchTimeFrame_Sql"
],
out
PatchTimeFrame_Sql
);
Int32
.
TryParse
(
ConfigurationManager
.
AppSettings
[
"PatchTimeFrame_Xml"
],
out
PatchTimeFrame_Xml
);
Int32
.
TryParse
(
ConfigurationManager
.
AppSettings
[
"Exclude_PDB"
],
out
int
_exclude_PDB
);
Int32
.
TryParse
(
ConfigurationManager
.
AppSettings
[
"Exclude_PDB"
],
out
int
_exclude_PDB
);
//是否包含pdb文件
if
(
_exclude_PDB
==
1
)
Exclude_PDB
=
true
;
}
...
...
@@ -323,7 +338,6 @@ namespace Ftt.PatchPack
return
date
;
}
#
endregion
}
...
...
Tools/MyCommon/Log.cs
0 → 100644
View file @
4ad24f61
using
System
;
using
System.Collections.Generic
;
using
System.Diagnostics
;
using
System.IO
;
using
System.Linq
;
using
System.Text
;
using
System.Threading
;
using
System.Threading.Tasks
;
namespace
FTT.Core
{
/// <summary>
/// 日志
/// </summary>
public
sealed
class
Log
{
/// <summary>
/// 调试
/// </summary>
/// <param name="msg"></param>
public
static
void
Debug
(
object
obj
)
{
Write
(
obj
,
nameof
(
Debug
));
}
/// <summary>
/// 错误
/// </summary>
/// <param name="msg"></param>
public
static
void
Error
(
object
obj
)
{
Write
(
obj
,
nameof
(
Error
));
}
/// <summary>
/// 信息
/// </summary>
/// <param name="obj">消息对象</param>
/// <param name="title">自定义标题</param>
public
static
void
Info
(
object
obj
,
string
title
=
"Info"
)
{
Write
(
obj
,
title
);
}
/// <summary>
/// 警告
/// </summary>
/// <param name="msg"></param>
public
static
void
Warn
(
object
obj
)
{
Write
(
obj
,
nameof
(
Warn
));
}
/// <summary>
/// [并发]锁对象
/// </summary>
private
static
object
_locker
=
new
object
();
/// <summary>
/// [异步]写入日志
/// </summary>
/// <param name="obj">消息对象</param>
/// <param name="category">消息类别</param>
private
static
void
Write
(
object
obj
,
string
category
)
{
lock
(
_locker
)
{
try
{
Task
.
Run
(()
=>
Loger
.
Instance
.
Write
(
obj
,
category
));
}
finally
{
Monitor
.
Pulse
(
_locker
);
}
}
}
}
/// <summary>
/// 日志(单例)
/// </summary>
public
class
Loger
{
private
static
Loger
_instance
=
null
;
/// <summary>
/// 单例
/// </summary>
public
static
Loger
Instance
{
get
{
if
(
_instance
==
null
)
_instance
=
new
Loger
();
return
_instance
;
}
}
/// <summary>
/// 私有:构造方法
/// </summary>
private
Loger
()
{
//清除监听器
Trace
.
Listeners
.
Clear
();
//通过自定义监听器,监听消息并记录日志
Trace
.
Listeners
.
Add
(
new
LogerTraceListener
());
}
/// <summary>
/// 写入日志
/// </summary>
/// <param name="msg"></param>
/// <param name="category"></param>
public
void
Write
(
object
obj
,
string
category
)
{
Trace
.
WriteLine
(
obj
,
category
);
}
}
/// <summary>
/// 日志记录监听器
/// </summary>
public
class
LogerTraceListener
:
TraceListener
{
private
string
_fileName
;
public
LogerTraceListener
()
{
//日志路径初始化
string
logPath
=
$@"
{
AppDomain
.
CurrentDomain
.
BaseDirectory
}
\Logs"
;
if
(!
Directory
.
Exists
(
logPath
))
Directory
.
CreateDirectory
(
logPath
);
this
.
_fileName
=
$@"
{
logPath
}
\Log-
{
DateTime
.
Now
.
ToString
(
"yyyyMMdd"
)}
.txt"
;
}
public
override
void
Write
(
string
message
)
{
this
.
WriteLogFile
(
message
);
}
public
override
void
Write
(
object
obj
)
{
this
.
WriteLogFile
(
obj
);
}
public
override
void
Write
(
string
message
,
string
category
)
{
this
.
WriteLogFile
(
message
,
category
);
}
public
override
void
Write
(
object
obj
,
string
category
)
{
this
.
WriteLogFile
(
obj
,
category
);
}
public
override
void
WriteLine
(
string
message
)
{
this
.
WriteLogFile
(
message
);
}
public
override
void
WriteLine
(
object
obj
)
{
this
.
WriteLogFile
(
obj
);
}
public
override
void
WriteLine
(
string
message
,
string
category
)
{
this
.
WriteLogFile
(
message
,
category
);
}
public
override
void
WriteLine
(
object
obj
,
string
category
)
{
this
.
WriteLogFile
(
obj
,
category
);
}
/// <summary>
/// 写入日志文件
/// </summary>
/// <param name="obj"></param>
/// <param name="category"></param>
private
void
WriteLogFile
(
object
obj
,
string
category
=
""
)
{
var
message
=
this
.
Format
(
obj
,
category
);
File
.
AppendAllText
(
_fileName
,
message
);
}
/// <summary>
/// 格式化消息对象
/// </summary>
/// <param name="obj"></param>
/// <param name="category"></param>
/// <returns></returns>
private
string
Format
(
object
obj
,
string
category
)
{
StringBuilder
builder
=
new
StringBuilder
();
//添加类别,格式:[类别名称] 日期 消息体
if
(!
string
.
IsNullOrEmpty
(
category
))
builder
.
AppendFormat
(
"[{0}] "
,
category
);
//添加日期
builder
.
AppendFormat
(
"{0} "
,
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
));
//构建消息体
if
(
obj
is
Exception
)
{
var
ex
=
(
Exception
)
obj
;
builder
.
Append
(
ex
.
Message
+
"\r\n"
);
builder
.
Append
(
ex
.
StackTrace
+
"\r\n"
);
}
else
{
builder
.
Append
(
obj
.
ToString
()
+
"\r\n"
);
}
return
builder
.
ToString
();
}
}
}
Tools/Log.cs
→
Tools/
MyCommon/User
Log.cs
View file @
4ad24f61
...
...
@@ -9,12 +9,12 @@ using Tools.MyCommon;
using
Tools.MyData
;
using
Tools.MyUtils
;
namespace
Tools
namespace
Tools
.MyCommon
{
/// <summary>
/// 日志
///
用户
日志
/// </summary>
public
class
Log
public
class
User
Log
{
/// <summary>
/// 数据库访问对象
...
...
Tools/MyCommon/wProgressText.Designer.cs
0 → 100644
View file @
4ad24f61
namespace
Tools.MyCommon
{
partial
class
wProgressText
{
/// <summary>
/// Required designer variable.
/// </summary>
private
System
.
ComponentModel
.
IContainer
components
=
null
;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected
override
void
Dispose
(
bool
disposing
)
{
if
(
disposing
&&
(
components
!=
null
))
{
components
.
Dispose
();
}
base
.
Dispose
(
disposing
);
}
#
region
Windows
Form
Designer
generated
code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private
void
InitializeComponent
()
{
this
.
label1
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
SuspendLayout
();
//
// label1
//
this
.
label1
.
BackColor
=
System
.
Drawing
.
Color
.
LightGreen
;
this
.
label1
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
label1
.
ForeColor
=
System
.
Drawing
.
Color
.
Black
;
this
.
label1
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
0
);
this
.
label1
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
0
,
4
,
0
);
this
.
label1
.
Name
=
"label1"
;
this
.
label1
.
Size
=
new
System
.
Drawing
.
Size
(
200
,
22
);
this
.
label1
.
TabIndex
=
1
;
this
.
label1
.
Text
=
"label1"
;
this
.
label1
.
TextAlign
=
System
.
Drawing
.
ContentAlignment
.
MiddleCenter
;
//
// wProgressText
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
7F
,
17F
);
this
.
AutoScaleMode
=
System
.
Windows
.
Forms
.
AutoScaleMode
.
Font
;
this
.
BackColor
=
System
.
Drawing
.
SystemColors
.
Window
;
this
.
ClientSize
=
new
System
.
Drawing
.
Size
(
200
,
22
);
this
.
Controls
.
Add
(
this
.
label1
);
this
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
FormBorderStyle
=
System
.
Windows
.
Forms
.
FormBorderStyle
.
None
;
this
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
4
,
4
,
4
,
4
);
this
.
Name
=
"wProgressText"
;
this
.
Text
=
"wProgressBar"
;
this
.
ResumeLayout
(
false
);
}
#
endregion
private
System
.
Windows
.
Forms
.
Label
label1
;
}
}
\ No newline at end of file
Tools/MyCommon/wProgressText.cs
0 → 100644
View file @
4ad24f61
using
System
;
using
System.Collections.Generic
;
using
System.ComponentModel
;
using
System.Data
;
using
System.Drawing
;
using
System.Linq
;
using
System.Text
;
using
System.Threading
;
using
System.Threading.Tasks
;
using
System.Windows.Forms
;
//
using
Tools.MyUtils
;
namespace
Tools.MyCommon
{
public
partial
class
wProgressText
:
wBasic
{
int
_max
=
0
;
public
wProgressText
()
{
InitializeComponent
();
//隐藏窗体边框
this
.
ShowInTaskbar
=
false
;
//不显示在任务栏
this
.
FormBorderStyle
=
FormBorderStyle
.
None
;
this
.
MaximumSize
=
new
Size
(
200
,
22
);
this
.
MinimumSize
=
new
Size
(
200
,
22
);
this
.
FormClosing
+=
WProgressText_FormClosing
;
}
/// <summary>
/// 事件-窗口关闭
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private
void
WProgressText_FormClosing
(
object
sender
,
FormClosingEventArgs
e
)
{
Task
.
Run
(()
=>
Thread
.
Sleep
(
200
)).
Wait
();
//窗口结束时停顿0.2秒
}
/// <summary>
/// 设置进度条最大值
/// </summary>
/// <param name="total"></param>
public
void
SetMaximum
(
int
max
)
{
this
.
AsyncUI
(()
=>
{
this
.
_max
=
max
;
this
.
label1
.
Text
=
$"共
{
max
}
条数据 已处理0条"
;
this
.
Text
=
$"0/
{
max
}
"
;
});
}
/// <summary>
/// 设置进度条当前位置
/// </summary>
/// <param name="pos"></param>
public
void
SetPosition
(
int
pos
)
{
this
.
AsyncUI
(()
=>
{
this
.
label1
.
Text
=
$"共
{
_max
}
条数据 已处理
{
pos
}
条"
;
this
.
Text
=
$"
{
pos
}
/
{
_max
}
"
;
});
}
}
}
Tools/MyCommon/wProgressText.resx
0 → 100644
View file @
4ad24f61
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema
id=
"root"
xmlns=
""
xmlns:xsd=
"http://www.w3.org/2001/XMLSchema"
xmlns:msdata=
"urn:schemas-microsoft-com:xml-msdata"
>
<xsd:import
namespace=
"http://www.w3.org/XML/1998/namespace"
/>
<xsd:element
name=
"root"
msdata:IsDataSet=
"true"
>
<xsd:complexType>
<xsd:choice
maxOccurs=
"unbounded"
>
<xsd:element
name=
"metadata"
>
<xsd:complexType>
<xsd:sequence>
<xsd:element
name=
"value"
type=
"xsd:string"
minOccurs=
"0"
/>
</xsd:sequence>
<xsd:attribute
name=
"name"
use=
"required"
type=
"xsd:string"
/>
<xsd:attribute
name=
"type"
type=
"xsd:string"
/>
<xsd:attribute
name=
"mimetype"
type=
"xsd:string"
/>
<xsd:attribute
ref=
"xml:space"
/>
</xsd:complexType>
</xsd:element>
<xsd:element
name=
"assembly"
>
<xsd:complexType>
<xsd:attribute
name=
"alias"
type=
"xsd:string"
/>
<xsd:attribute
name=
"name"
type=
"xsd:string"
/>
</xsd:complexType>
</xsd:element>
<xsd:element
name=
"data"
>
<xsd:complexType>
<xsd:sequence>
<xsd:element
name=
"value"
type=
"xsd:string"
minOccurs=
"0"
msdata:Ordinal=
"1"
/>
<xsd:element
name=
"comment"
type=
"xsd:string"
minOccurs=
"0"
msdata:Ordinal=
"2"
/>
</xsd:sequence>
<xsd:attribute
name=
"name"
type=
"xsd:string"
use=
"required"
msdata:Ordinal=
"1"
/>
<xsd:attribute
name=
"type"
type=
"xsd:string"
msdata:Ordinal=
"3"
/>
<xsd:attribute
name=
"mimetype"
type=
"xsd:string"
msdata:Ordinal=
"4"
/>
<xsd:attribute
ref=
"xml:space"
/>
</xsd:complexType>
</xsd:element>
<xsd:element
name=
"resheader"
>
<xsd:complexType>
<xsd:sequence>
<xsd:element
name=
"value"
type=
"xsd:string"
minOccurs=
"0"
msdata:Ordinal=
"1"
/>
</xsd:sequence>
<xsd:attribute
name=
"name"
type=
"xsd:string"
use=
"required"
/>
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader
name=
"resmimetype"
>
<value>
text/microsoft-resx
</value>
</resheader>
<resheader
name=
"version"
>
<value>
2.0
</value>
</resheader>
<resheader
name=
"reader"
>
<value>
System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
</value>
</resheader>
<resheader
name=
"writer"
>
<value>
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
</value>
</resheader>
</root>
\ No newline at end of file
Tools/MyUtils/Utils.cs
View file @
4ad24f61
using
System
;
using
ICSharpCode.SharpZipLib.Zip
;
using
System
;
using
System.Collections.Generic
;
using
System.Configuration
;
using
System.Data
;
...
...
@@ -10,6 +11,7 @@ using System.Text;
using
System.Threading.Tasks
;
//
using
System.Windows.Forms
;
using
Tools.MyCommon
;
namespace
Tools.MyUtils
{
...
...
@@ -263,6 +265,59 @@ namespace Tools.MyUtils
#
endregion
#
region
ZIP
压缩
/// <summary>
/// Zip:打包专用压缩方法(进度提示)
/// </summary>
/// <param name="bar">进度提示</param>
/// <param name="zipFileName">压缩文件保存路径</param>
/// <param name="fileNames">待压缩的文件列表</param>
/// <param name="rootPath">待压缩文件的根路径:用于定位压缩相对路径</param>
public
static
void
ZipCompress4Package
(
wProgressText
bar
,
string
zipFileName
,
List
<
string
>
fileNames
,
string
rootPath
)
{
try
{
using
(
ZipOutputStream
zip
=
new
ZipOutputStream
(
File
.
Create
(
zipFileName
)))
{
zip
.
SetLevel
(
9
);
// 压缩级别 0-9
byte
[]
buffer
=
new
byte
[
1024
];
//缓冲区大小
int
iCount
=
0
;
bar
?.
SetMaximum
(
fileNames
.
Count
);
foreach
(
string
path
in
fileNames
)
{
//进度条显示
bar
?.
SetPosition
(++
iCount
);
//EntryName用以指定压缩层级
string
EntryName
=
path
.
Substring
(
$@"
{
rootPath
}
\"
.
Length
);
//这里取根目录的相对路径
//创建新入口
ZipEntry
entry
=
new
ZipEntry
(
EntryName
)
{
DateTime
=
DateTime
.
Now
};
zip
.
PutNextEntry
(
entry
);
//写入源数据
using
(
FileStream
fs
=
File
.
OpenRead
(
path
))
{
int
size
;
while
((
size
=
fs
.
Read
(
buffer
,
0
,
buffer
.
Length
))
>
0
)
{
zip
.
Write
(
buffer
,
0
,
size
);
}
}
}
zip
.
Finish
();
zip
.
Close
();
}
}
catch
(
Exception
ex
)
{
TipException
(
ex
);
}
}
#
endregion
#
region
winform
:提示;帮助窗口;异步
UI
支持
/// <summary>
...
...
@@ -304,10 +359,7 @@ namespace Tools.MyUtils
var
helpFileName
=
$@"
{
Utils
.
ConfigPath
}
\help\
{
txtFileName
}
.txt"
;
if
(
File
.
Exists
(
helpFileName
))
{
using
(
var
sr
=
new
StreamReader
(
helpFileName
))
{
Utils
.
Tip
(
sr
.
ReadToEnd
(),
700
,
400
);
}
Utils
.
Tip
(
File
.
ReadAllText
(
helpFileName
),
700
,
400
);
}
}
/// <summary>
...
...
@@ -315,7 +367,7 @@ namespace Tools.MyUtils
/// </summary>
/// <param name="frm"></param>
/// <param name="action"></param>
public
static
void
AsyncUI
(
this
Form
frm
,
Action
action
)
public
static
void
AsyncUI
(
this
Control
frm
,
Action
action
)
{
if
(
frm
.
Disposing
||
frm
.
IsDisposed
)
return
;
...
...
Tools/Tools.csproj
View file @
4ad24f61
...
...
@@ -74,7 +74,8 @@
<Reference
Include=
"System.Xml"
/>
</ItemGroup>
<ItemGroup>
<Compile
Include=
"Log.cs"
/>
<Compile
Include=
"MyCommon\Log.cs"
/>
<Compile
Include=
"MyCommon\UserLog.cs"
/>
<Compile
Include=
"MyCommon\controls\MyTreeView.cs"
>
<SubType>
Component
</SubType>
</Compile>
...
...
@@ -106,6 +107,12 @@
<Compile
Include=
"MyCommon\controls\TabControlEx.Designer.cs"
>
<DependentUpon>
TabControlEx.cs
</DependentUpon>
</Compile>
<Compile
Include=
"MyCommon\wProgressText.cs"
>
<SubType>
Form
</SubType>
</Compile>
<Compile
Include=
"MyCommon\wProgressText.Designer.cs"
>
<DependentUpon>
wProgressText.cs
</DependentUpon>
</Compile>
<Compile
Include=
"MyData\AnlysisHelper.cs"
/>
<Compile
Include=
"MyData\DBHelper.cs"
/>
<Compile
Include=
"MyData\SqlHelper.cs"
/>
...
...
@@ -341,6 +348,9 @@
<EmbeddedResource
Include=
"MyCommon\controls\TabControlEx.resx"
>
<DependentUpon>
TabControlEx.cs
</DependentUpon>
</EmbeddedResource>
<EmbeddedResource
Include=
"MyCommon\wProgressText.resx"
>
<DependentUpon>
wProgressText.cs
</DependentUpon>
</EmbeddedResource>
<EmbeddedResource
Include=
"MyUtils\wDbSetting.resx"
>
<DependentUpon>
wDbSetting.cs
</DependentUpon>
</EmbeddedResource>
...
...
Tools/UI/sys/wHelpDocument.Designer.cs
View file @
4ad24f61
...
...
@@ -37,6 +37,9 @@
this
.
Column3
=
new
System
.
Windows
.
Forms
.
DataGridViewButtonColumn
();
this
.
Column1
=
new
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
();
this
.
Column2
=
new
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
();
this
.
Column5
=
new
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
();
this
.
Column6
=
new
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
();
this
.
Column7
=
new
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
();
this
.
Column4
=
new
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
dgvDetail
)).
BeginInit
();
this
.
panel2
.
SuspendLayout
();
...
...
@@ -51,6 +54,9 @@
this
.
Column3
,
this
.
Column1
,
this
.
Column2
,
this
.
Column5
,
this
.
Column6
,
this
.
Column7
,
this
.
Column4
});
this
.
dgvDetail
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
dgvDetail
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
25
);
...
...
@@ -132,6 +138,24 @@
this
.
Column2
.
Name
=
"Column2"
;
this
.
Column2
.
Width
=
120
;
//
// Column5
//
this
.
Column5
.
DataPropertyName
=
"CreateUser"
;
this
.
Column5
.
HeaderText
=
"创建人"
;
this
.
Column5
.
Name
=
"Column5"
;
//
// Column6
//
this
.
Column6
.
DataPropertyName
=
"CreateDate"
;
this
.
Column6
.
HeaderText
=
"创建日期"
;
this
.
Column6
.
Name
=
"Column6"
;
//
// Column7
//
this
.
Column7
.
DataPropertyName
=
"UpdateUser"
;
this
.
Column7
.
HeaderText
=
"更新人"
;
this
.
Column7
.
Name
=
"Column7"
;
//
// Column4
//
this
.
Column4
.
DataPropertyName
=
"CreateDate"
;
...
...
@@ -174,6 +198,9 @@
private
System
.
Windows
.
Forms
.
DataGridViewButtonColumn
Column3
;
private
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
Column1
;
private
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
Column2
;
private
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
Column5
;
private
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
Column6
;
private
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
Column7
;
private
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
Column4
;
}
}
\ No newline at end of file
Tools/UI/sys/wHelpDocument.resx
View file @
4ad24f61
...
...
@@ -126,6 +126,15 @@
<metadata
name=
"Column2.UserAddedColumn"
type=
"System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
>
<value>
True
</value>
</metadata>
<metadata
name=
"Column5.UserAddedColumn"
type=
"System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
>
<value>
True
</value>
</metadata>
<metadata
name=
"Column6.UserAddedColumn"
type=
"System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
>
<value>
True
</value>
</metadata>
<metadata
name=
"Column7.UserAddedColumn"
type=
"System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
>
<value>
True
</value>
</metadata>
<metadata
name=
"Column4.UserAddedColumn"
type=
"System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
>
<value>
True
</value>
</metadata>
...
...
Tools/UI/sys/wUploadUpdate.Designer.cs
View file @
4ad24f61
...
...
@@ -28,7 +28,7 @@
/// </summary>
private
void
InitializeComponent
()
{
this
.
btn
Upload
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
btn
GenZip
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
label1
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label2
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
label3
=
new
System
.
Windows
.
Forms
.
Label
();
...
...
@@ -43,17 +43,17 @@
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
pictureBox1
)).
BeginInit
();
this
.
SuspendLayout
();
//
// btn
Upload
// btn
GenZip
//
this
.
btn
Upload
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btn
Upload
.
Location
=
new
System
.
Drawing
.
Point
(
74
,
303
);
this
.
btn
Upload
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
3
,
4
,
3
,
4
);
this
.
btn
Upload
.
Name
=
"btnUpload
"
;
this
.
btn
Upload
.
Size
=
new
System
.
Drawing
.
Size
(
117
,
33
);
this
.
btn
Upload
.
TabIndex
=
2
;
this
.
btn
Upload
.
Text
=
"选择
压缩包"
;
this
.
btn
Upload
.
UseVisualStyleBackColor
=
true
;
this
.
btn
Upload
.
Click
+=
new
System
.
EventHandler
(
this
.
btnUpload
_Click
);
this
.
btn
GenZip
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btn
GenZip
.
Location
=
new
System
.
Drawing
.
Point
(
74
,
303
);
this
.
btn
GenZip
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
3
,
4
,
3
,
4
);
this
.
btn
GenZip
.
Name
=
"btnGenZip
"
;
this
.
btn
GenZip
.
Size
=
new
System
.
Drawing
.
Size
(
117
,
33
);
this
.
btn
GenZip
.
TabIndex
=
2
;
this
.
btn
GenZip
.
Text
=
"生成
压缩包"
;
this
.
btn
GenZip
.
UseVisualStyleBackColor
=
true
;
this
.
btn
GenZip
.
Click
+=
new
System
.
EventHandler
(
this
.
btnGenZip
_Click
);
//
// label1
//
...
...
@@ -181,7 +181,7 @@
this
.
Controls
.
Add
(
this
.
label3
);
this
.
Controls
.
Add
(
this
.
label2
);
this
.
Controls
.
Add
(
this
.
label1
);
this
.
Controls
.
Add
(
this
.
btn
Upload
);
this
.
Controls
.
Add
(
this
.
btn
GenZip
);
this
.
Controls
.
Add
(
this
.
pictureBox1
);
this
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Regular
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
FormBorderStyle
=
System
.
Windows
.
Forms
.
FormBorderStyle
.
FixedToolWindow
;
...
...
@@ -198,7 +198,7 @@
#
endregion
private
System
.
Windows
.
Forms
.
PictureBox
pictureBox1
;
private
System
.
Windows
.
Forms
.
Button
btn
Upload
;
private
System
.
Windows
.
Forms
.
Button
btn
GenZip
;
private
System
.
Windows
.
Forms
.
Label
label1
;
private
System
.
Windows
.
Forms
.
Label
label2
;
private
System
.
Windows
.
Forms
.
Label
label3
;
...
...
Tools/UI/sys/wUploadUpdate.cs
View file @
4ad24f61
...
...
@@ -17,10 +17,36 @@ namespace Tools.UI.sys
{
public
partial
class
wUploadUpdate
:
wEditBasic
{
/// <summary>
/// 进度文本提示
/// </summary>
wProgressText
_bar
=
null
;
/// <summary>
/// 生成的压缩文件列表
/// </summary>
List
<
string
>
GenZipFileList
=
new
List
<
string
>();
/// <summary>
/// 构造函数
/// </summary>
public
wUploadUpdate
()
{
InitializeComponent
();
}
/// <summary>
/// 析构函数
/// </summary>
~
wUploadUpdate
()
{
//删除所有的压缩包
this
.
GenZipFileList
.
ForEach
(
file
=>
{
if
(
File
.
Exists
(
file
))
{
File
.
Delete
(
file
);
}
});
}
private
void
wUploadUpdate_Load
(
object
sender
,
EventArgs
e
)
{
...
...
@@ -57,36 +83,63 @@ namespace Tools.UI.sys
return
base
.
SaveCheck
();
}
private
void
btnUpload_Click
(
object
sender
,
EventArgs
e
)
{
//对话框
OpenFileDialog
dlg
=
new
OpenFileDialog
()
{
Multiselect
=
false
,
Filter
=
"压缩包|*.zip"
,
InitialDirectory
=
Environment
.
GetFolderPath
(
Environment
.
SpecialFolder
.
Desktop
),
};
//结果处理
if
(
dlg
.
ShowDialog
()
==
DialogResult
.
OK
)
private
void
btnGenZip_Click
(
object
sender
,
EventArgs
e
)
{
//显示进度条窗口
this
.
_bar
=
new
wProgressText
();
this
.
_bar
.
TopMost
=
true
;
//顶层显示;
this
.
_bar
.
Show
();
//异步调用
Task
.
Run
(()
=>
{
string
Name
=
"工具平台"
;
string
RootPath
=
Directory
.
GetParent
(
Utils
.
StartupPath
).
FullName
;
string
ZipFileName
=
$@"
{
RootPath
}
\
{
Name
}
-
{
DateTime
.
Now
.
ToString
(
"yyyyMMdd-hhmmss"
)}
.zip"
;
this
.
GenZipFileList
.
Add
(
ZipFileName
);
//记录压缩文件名称,可能点多次
//路径检查
string
path
=
$@"
{
RootPath
}
\AppHome"
;
if
(!
Directory
.
Exists
(
path
))
return
;
//打包所有文件
DirectoryInfo
dirInfo
=
new
DirectoryInfo
(
path
);
var
fileInfos
=
dirInfo
.
GetFiles
(
"*.*"
,
SearchOption
.
AllDirectories
).
ToList
();
fileInfos
=
fileInfos
.
Where
(
f
=>
!
f
.
FullName
.
Contains
(
"\\AutoUpdate\\"
)
//剔除自动更新文件
&&
!
f
.
FullName
.
Contains
(
"\\Config\\"
)
//剔除配置文件
&&
!
f
.
FullName
.
Contains
(
"\\Logs\\"
)
//剔除日志文件
&&
!
f
.
FullName
.
Contains
(
"Tools.exe."
)
//剔除应用配置文件(包含更新时间和登录信息)
).
ToList
();
//剔除自动更新相关目录
//构造压缩文件路径集合
List
<
string
>
FileNames
=
new
List
<
string
>();
FileNames
.
AddRange
(
fileInfos
.
Select
(
f
=>
f
.
FullName
));
//调用压缩方法
Utils
.
ZipCompress4Package
(
this
.
_bar
,
ZipFileName
,
FileNames
,
RootPath
);
//赋值基本信息
var
bytes
=
File
.
ReadAllBytes
(
dlg
.
FileName
);
var
drv
=
this
.
_ds
.
Tables
[
0
].
DefaultView
[
0
];
var
name
=
Path
.
GetFileName
(
dlg
.
FileName
);
var
bytes
=
File
.
ReadAllBytes
(
ZipFileName
);
var
size
=
(
bytes
.
Length
/
1000
M
/
1000
M
).
ToString
(
"0.##"
);
this
.
tbUName
.
Text
=
name
;
this
.
tbUSize
.
Text
=
size
;
var
name
=
Path
.
GetFileName
(
ZipFileName
);
//数据源赋值
var
drv
=
this
.
_ds
.
Tables
[
0
].
DefaultView
[
0
];
drv
[
"UName"
]
=
name
;
drv
[
"USize"
]
=
size
;
drv
[
"UData"
]
=
bytes
;
drv
.
EndEdit
();
//上传成功,更新图片
//更新UI
this
.
AsyncUI
(()
=>
{
this
.
tbUName
.
Text
=
name
;
this
.
tbUSize
.
Text
=
size
;
this
.
pictureBox1
.
Image
=
Properties
.
Resources
.
压缩包
;
}
});
}).
ContinueWith
((
x
)
=>
{
if
(
x
.
IsCompleted
)
this
.
AsyncUI
(()
=>
this
.
_bar
.
Close
());
});
}
private
void
btnSave_Click
(
object
sender
,
EventArgs
e
)
{
this
.
Save
();
//刷新更新日期,即默认本机为最新版本
Utils
.
AppSettings
(
APP
.
UPDATE_TIME
,
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss.fff"
));
}
}
}
Tools/UI/wAppModel.Designer.cs
View file @
4ad24f61
...
...
@@ -333,6 +333,7 @@
this
.
Name
=
"wAppModel"
;
this
.
StartPosition
=
System
.
Windows
.
Forms
.
FormStartPosition
.
CenterParent
;
this
.
Text
=
"APP模块编辑"
;
this
.
Load
+=
new
System
.
EventHandler
(
this
.
wAppModel_Load
);
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
dgvAppModel
)).
EndInit
();
this
.
toolStrip1
.
ResumeLayout
(
false
);
this
.
toolStrip1
.
PerformLayout
();
...
...
Tools/UI/wAppModel.cs
View file @
4ad24f61
...
...
@@ -21,12 +21,19 @@ namespace Tools.UI
/// <summary>
/// 刷新数据时的筛选语句
/// </summary>
private
string
strWhere
;
private
string
strWhere
=
"1=1"
;
public
wAppModel
()
{
InitializeComponent
();
}
private
void
wAppModel_Load
(
object
sender
,
EventArgs
e
)
{
var
link
=
Utils
.
GetDbLinkString204
(
"FTT"
);
this
.
tstbLinkString
.
Text
=
Utils
.
GetDbItemModel
(
link
).
ToString
();
this
.
InitDBHelper
(
link
);
this
.
InitData
();
}
public
override
void
InitData
()
{
...
...
@@ -107,5 +114,6 @@ namespace Tools.UI
tabControl1
.
SelectedTab
=
tabSql
;
}
}
}
Tools/UI/wAuditDemo.cs
View file @
4ad24f61
...
...
@@ -212,6 +212,7 @@ namespace Tools.UI
AuditUsers
+=
$";
{
drv
[
"AuditUser"
]}
"
;
}
//模拟不同人员登录
this
.
cmbLoginUser
.
Items
.
Clear
();
this
.
cmbLoginUser
.
Items
.
AddRange
(
AuditUsers
.
Split
(
';'
).
Distinct
().
ToArray
());
this
.
cmbLoginUser
.
SelectedIndex
=
0
;
//绑定审批数据源
...
...
Tools/UI/wFlowShare.Designer.cs
View file @
4ad24f61
...
...
@@ -35,7 +35,9 @@
this
.
Column6
=
new
System
.
Windows
.
Forms
.
DataGridViewButtonColumn
();
this
.
Column2
=
new
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
();
this
.
Column3
=
new
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
();
this
.
Column1
=
new
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
();
this
.
Column4
=
new
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
();
this
.
Column7
=
new
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
();
this
.
Column5
=
new
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
();
this
.
toolStrip1
.
SuspendLayout
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
dgvDetail
)).
BeginInit
();
...
...
@@ -78,7 +80,9 @@
this
.
Column6
,
this
.
Column2
,
this
.
Column3
,
this
.
Column1
,
this
.
Column4
,
this
.
Column7
,
this
.
Column5
});
this
.
dgvDetail
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
dgvDetail
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
25
);
...
...
@@ -110,6 +114,12 @@
this
.
Column3
.
HeaderText
=
"文件大小(K)"
;
this
.
Column3
.
Name
=
"Column3"
;
//
// Column1
//
this
.
Column1
.
DataPropertyName
=
"CreateUser"
;
this
.
Column1
.
HeaderText
=
"创建人"
;
this
.
Column1
.
Name
=
"Column1"
;
//
// Column4
//
this
.
Column4
.
DataPropertyName
=
"CreateDate"
;
...
...
@@ -117,6 +127,12 @@
this
.
Column4
.
Name
=
"Column4"
;
this
.
Column4
.
Width
=
120
;
//
// Column7
//
this
.
Column7
.
DataPropertyName
=
"UpdateUser"
;
this
.
Column7
.
HeaderText
=
"更新人"
;
this
.
Column7
.
Name
=
"Column7"
;
//
// Column5
//
this
.
Column5
.
DataPropertyName
=
"UpdateDate"
;
...
...
@@ -152,7 +168,9 @@
private
System
.
Windows
.
Forms
.
DataGridViewButtonColumn
Column6
;
private
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
Column2
;
private
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
Column3
;
private
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
Column1
;
private
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
Column4
;
private
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
Column7
;
private
System
.
Windows
.
Forms
.
DataGridViewTextBoxColumn
Column5
;
}
}
\ No newline at end of file
Tools/UI/wFlowShare.resx
View file @
4ad24f61
...
...
@@ -129,9 +129,15 @@
<metadata
name=
"Column3.UserAddedColumn"
type=
"System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
>
<value>
True
</value>
</metadata>
<metadata
name=
"Column1.UserAddedColumn"
type=
"System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
>
<value>
True
</value>
</metadata>
<metadata
name=
"Column4.UserAddedColumn"
type=
"System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
>
<value>
True
</value>
</metadata>
<metadata
name=
"Column7.UserAddedColumn"
type=
"System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
>
<value>
True
</value>
</metadata>
<metadata
name=
"Column5.UserAddedColumn"
type=
"System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
>
<value>
True
</value>
</metadata>
...
...
Tools/UI/wModuleManager.Designer.cs
View file @
4ad24f61
...
...
@@ -51,6 +51,10 @@
this
.
tsmiDel
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
tsFuncInfo
=
new
System
.
Windows
.
Forms
.
ToolStrip
();
this
.
toolStripLabel2
=
new
System
.
Windows
.
Forms
.
ToolStripLabel
();
this
.
toolStripSeparator1
=
new
System
.
Windows
.
Forms
.
ToolStripSeparator
();
this
.
toolStripLabel1
=
new
System
.
Windows
.
Forms
.
ToolStripLabel
();
this
.
tslbStatus
=
new
System
.
Windows
.
Forms
.
ToolStripLabel
();
this
.
tstbFocusedCellContent
=
new
System
.
Windows
.
Forms
.
ToolStripTextBox
();
this
.
tsBaseInfo
=
new
System
.
Windows
.
Forms
.
ToolStrip
();
this
.
toolStripLabel3
=
new
System
.
Windows
.
Forms
.
ToolStripLabel
();
this
.
label1
=
new
System
.
Windows
.
Forms
.
Label
();
...
...
@@ -78,10 +82,6 @@
this
.
tbSysCode
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
tbPrevID
=
new
System
.
Windows
.
Forms
.
TextBox
();
this
.
imgList5
=
new
System
.
Windows
.
Forms
.
ImageList
(
this
.
components
);
this
.
toolStripSeparator1
=
new
System
.
Windows
.
Forms
.
ToolStripSeparator
();
this
.
toolStripLabel1
=
new
System
.
Windows
.
Forms
.
ToolStripLabel
();
this
.
tstbFocusedCellContent
=
new
System
.
Windows
.
Forms
.
ToolStripTextBox
();
this
.
tslbStatus
=
new
System
.
Windows
.
Forms
.
ToolStripLabel
();
this
.
toolStrip1
.
SuspendLayout
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
splitContainer1
)).
BeginInit
();
this
.
splitContainer1
.
Panel1
.
SuspendLayout
();
...
...
@@ -348,6 +348,30 @@
this
.
toolStripLabel2
.
Size
=
new
System
.
Drawing
.
Size
(
56
,
24
);
this
.
toolStripLabel2
.
Text
=
"功能信息"
;
//
// toolStripSeparator1
//
this
.
toolStripSeparator1
.
Name
=
"toolStripSeparator1"
;
this
.
toolStripSeparator1
.
Size
=
new
System
.
Drawing
.
Size
(
6
,
27
);
//
// toolStripLabel1
//
this
.
toolStripLabel1
.
Name
=
"toolStripLabel1"
;
this
.
toolStripLabel1
.
Size
=
new
System
.
Drawing
.
Size
(
0
,
24
);
//
// tslbStatus
//
this
.
tslbStatus
.
ForeColor
=
System
.
Drawing
.
Color
.
Gray
;
this
.
tslbStatus
.
Name
=
"tslbStatus"
;
this
.
tslbStatus
.
Size
=
new
System
.
Drawing
.
Size
(
44
,
24
);
this
.
tslbStatus
.
Text
=
"已复制"
;
//
// tstbFocusedCellContent
//
this
.
tstbFocusedCellContent
.
BorderStyle
=
System
.
Windows
.
Forms
.
BorderStyle
.
None
;
this
.
tstbFocusedCellContent
.
Font
=
new
System
.
Drawing
.
Font
(
"Microsoft YaHei UI"
,
9F
);
this
.
tstbFocusedCellContent
.
Name
=
"tstbFocusedCellContent"
;
this
.
tstbFocusedCellContent
.
Size
=
new
System
.
Drawing
.
Size
(
300
,
27
);
//
// tsBaseInfo
//
this
.
tableLayoutPanel1
.
SetColumnSpan
(
this
.
tsBaseInfo
,
8
);
...
...
@@ -607,31 +631,6 @@
this
.
imgList5
.
Images
.
SetKeyName
(
0
,
"tv5-gray.png"
);
this
.
imgList5
.
Images
.
SetKeyName
(
1
,
"tv5-red.png"
);
//
// toolStripSeparator1
//
this
.
toolStripSeparator1
.
Name
=
"toolStripSeparator1"
;
this
.
toolStripSeparator1
.
Size
=
new
System
.
Drawing
.
Size
(
6
,
27
);
//
// toolStripLabel1
//
this
.
toolStripLabel1
.
Name
=
"toolStripLabel1"
;
this
.
toolStripLabel1
.
Size
=
new
System
.
Drawing
.
Size
(
0
,
24
);
//
// tstbFocusedCellContent
//
this
.
tstbFocusedCellContent
.
BorderStyle
=
System
.
Windows
.
Forms
.
BorderStyle
.
None
;
this
.
tstbFocusedCellContent
.
Enabled
=
false
;
this
.
tstbFocusedCellContent
.
Font
=
new
System
.
Drawing
.
Font
(
"Microsoft YaHei UI"
,
9F
);
this
.
tstbFocusedCellContent
.
Name
=
"tstbFocusedCellContent"
;
this
.
tstbFocusedCellContent
.
Size
=
new
System
.
Drawing
.
Size
(
300
,
27
);
//
// tslbStatus
//
this
.
tslbStatus
.
ForeColor
=
System
.
Drawing
.
Color
.
Gray
;
this
.
tslbStatus
.
Name
=
"tslbStatus"
;
this
.
tslbStatus
.
Size
=
new
System
.
Drawing
.
Size
(
44
,
24
);
this
.
tslbStatus
.
Text
=
"已复制"
;
//
// wModuleManager
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
6F
,
12F
);
...
...
Tools/UI/wModuleManager.resx
View file @
4ad24f61
...
...
@@ -137,7 +137,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADo
CAAAAk1TRnQBSQFMAgEBAgEAA
YgBAAGI
AQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
CAAAAk1TRnQBSQFMAgEBAgEAA
ZABAAGQ
AQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
...
...
Tools/wExtend.cs
View file @
4ad24f61
...
...
@@ -50,8 +50,8 @@ namespace Tools
this
.
CreateModule
(
Tools_imp
,
typeof
(
UI
.
wExcelExportSetting
),
"Excel导出设置"
,
"tr:Excel导出配置图形化版本"
),
this
.
CreateModule
(
Tools_imp
,
typeof
(
UI
.
wLogViewer
),
"日志查看器"
,
"tr:可以方便的查看系统日志"
),
//-------------------------------
this
.
CreateModule
(
Tools_dev
,
typeof
(
Ftt
.
PatchPack
.
FrmMain
),
"自动打包工具"
,
"xj:用于CS后端程序自动打包成压缩包"
),
this
.
CreateModule
(
Tools_dev
,
typeof
(
UI
.
wSysModule
),
"功能模块管理"
,
"xj:管理功能模块和代码窗体的映射"
),
this
.
CreateModule
(
Tools_dev
,
typeof
(
Ftt
.
PatchPack
.
FrmMain
),
"自动打包工具"
,
"
l
xj:用于CS后端程序自动打包成压缩包"
),
this
.
CreateModule
(
Tools_dev
,
typeof
(
UI
.
wSysModule
),
"功能模块管理"
,
"
l
xj:管理功能模块和代码窗体的映射"
),
this
.
CreateModule
(
Tools_dev
,
typeof
(
UI
.
wAppModel
),
"APP模块管理"
,
"tb:APP添加模块的图形化界面"
),
this
.
CreateModule
(
Tools_dev
,
typeof
(
UI
.
wMonitorVisit
),
"APP访问监控"
,
"tb:APP模块的访问统计查看界面"
),
this
.
CreateModule
(
Tools_dev
,
typeof
(
UI
.
wAutoClass
),
"类生成工具"
,
"tb:将任意数据库表,生成为模型类"
),
...
...
Tools/wMain.cs
View file @
4ad24f61
...
...
@@ -98,7 +98,7 @@ namespace Tools
this
.
lbSysVersion
.
Text
=
dt
.
DefaultView
.
Count
==
0
?
$"2021.0.1"
:
$"
{
dt
.
DefaultView
[
0
][
0
]}
"
;
}));
//日志记录
Log
.
Write
(
"打开系统"
);
User
Log
.
Write
(
"打开系统"
);
}
private
void
WMain_FormClosing
(
object
sender
,
FormClosingEventArgs
e
)
{
...
...
@@ -324,7 +324,7 @@ namespace Tools
return
;
}
//日志记录
Log
.
Write
(
"退出系统"
);
User
Log
.
Write
(
"退出系统"
);
//关闭窗体
this
.
Close
();
}
...
...
@@ -399,7 +399,7 @@ namespace Tools
frm
.
Show
();
}
//日志记录
Log
.
Write
(
$"打开模块:
{
page
.
Text
}
"
);
User
Log
.
Write
(
$"打开模块:
{
page
.
Text
}
"
);
//选中标签页
this
.
tabControl1
.
SelectedTab
=
page
;
page
.
Refresh
();
...
...
@@ -412,7 +412,7 @@ namespace Tools
{
if
(
page
.
Name
!=
nameof
(
HomePage
))
{
Log
.
Write
(
$"关闭模块:
{
page
.
Text
}
"
);
//日志记录
User
Log
.
Write
(
$"关闭模块:
{
page
.
Text
}
"
);
//日志记录
this
.
OpenedList
.
Remove
(
page
.
Text
);
//移除列表
this
.
tabControl1
.
TabPages
.
Remove
(
page
);
//移除页面
page
.
Dispose
();
//释放页面
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment