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
b6d55a05
Commit
b6d55a05
authored
Jun 25, 2026
by
段廷瑞
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pref: 主页右上角按钮优化
parent
8afe8a66
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
178 additions
and
58 deletions
+178
-58
wMain.Designer.cs
Tools/wMain.Designer.cs
+64
-56
wMain.cs
Tools/wMain.cs
+113
-1
wMain.resx
Tools/wMain.resx
+1
-1
No files found.
Tools/wMain.Designer.cs
View file @
b6d55a05
...
...
@@ -35,6 +35,8 @@
this
.
listView1
=
new
System
.
Windows
.
Forms
.
ListView
();
this
.
imageList1
=
new
System
.
Windows
.
Forms
.
ImageList
(
this
.
components
);
this
.
btnToggleMenu
=
new
System
.
Windows
.
Forms
.
Button
();
this
.
tabControl1
=
new
Tools
.
MyCommon
.
controls
.
TabControlEx
();
this
.
HomePage
=
new
System
.
Windows
.
Forms
.
TabPage
();
this
.
menuStrip1
=
new
System
.
Windows
.
Forms
.
MenuStrip
();
this
.
toolStripMenuItem1
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
tsmiSysUpload
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
...
...
@@ -64,17 +66,15 @@
this
.
label2
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
toolTip1
=
new
System
.
Windows
.
Forms
.
ToolTip
(
this
.
components
);
this
.
timer1
=
new
System
.
Windows
.
Forms
.
Timer
(
this
.
components
);
this
.
tabControl1
=
new
Tools
.
MyCommon
.
controls
.
TabControlEx
();
this
.
HomePage
=
new
System
.
Windows
.
Forms
.
TabPage
();
this
.
panel1
.
SuspendLayout
();
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
splitContainer1
)).
BeginInit
();
this
.
splitContainer1
.
Panel1
.
SuspendLayout
();
this
.
splitContainer1
.
Panel2
.
SuspendLayout
();
this
.
splitContainer1
.
SuspendLayout
();
this
.
tabControl1
.
SuspendLayout
();
this
.
menuStrip1
.
SuspendLayout
();
this
.
Header
.
SuspendLayout
();
this
.
Footer
.
SuspendLayout
();
this
.
tabControl1
.
SuspendLayout
();
this
.
SuspendLayout
();
//
// panel1
...
...
@@ -118,7 +118,7 @@
this
.
listView1
.
LargeImageList
=
this
.
imageList1
;
this
.
listView1
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
0
);
this
.
listView1
.
Name
=
"listView1"
;
this
.
listView1
.
Size
=
new
System
.
Drawing
.
Size
(
200
,
34
9
);
this
.
listView1
.
Size
=
new
System
.
Drawing
.
Size
(
200
,
34
4
);
this
.
listView1
.
SmallImageList
=
this
.
imageList1
;
this
.
listView1
.
StateImageList
=
this
.
imageList1
;
this
.
listView1
.
TabIndex
=
0
;
...
...
@@ -142,15 +142,43 @@
this
.
btnToggleMenu
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnToggleMenu
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
,
System
.
Drawing
.
FontStyle
.
Bold
,
System
.
Drawing
.
GraphicsUnit
.
Point
,
((
byte
)(
134
)));
this
.
btnToggleMenu
.
ForeColor
=
System
.
Drawing
.
Color
.
White
;
this
.
btnToggleMenu
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
34
9
);
this
.
btnToggleMenu
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
34
4
);
this
.
btnToggleMenu
.
Margin
=
new
System
.
Windows
.
Forms
.
Padding
(
0
);
this
.
btnToggleMenu
.
Name
=
"btnToggleMenu"
;
this
.
btnToggleMenu
.
Size
=
new
System
.
Drawing
.
Size
(
200
,
2
0
);
this
.
btnToggleMenu
.
Size
=
new
System
.
Drawing
.
Size
(
200
,
2
5
);
this
.
btnToggleMenu
.
TabIndex
=
1
;
this
.
btnToggleMenu
.
Text
=
"<"
;
this
.
btnToggleMenu
.
UseVisualStyleBackColor
=
false
;
this
.
btnToggleMenu
.
Click
+=
new
System
.
EventHandler
(
this
.
btnToggleMenu_Click
);
//
// tabControl1
//
this
.
tabControl1
.
BackgroundColor
=
System
.
Drawing
.
Color
.
White
;
this
.
tabControl1
.
Controls
.
Add
(
this
.
HomePage
);
this
.
tabControl1
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
tabControl1
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
);
this
.
tabControl1
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
0
);
this
.
tabControl1
.
Name
=
"tabControl1"
;
this
.
tabControl1
.
SelectedIndex
=
0
;
this
.
tabControl1
.
Size
=
new
System
.
Drawing
.
Size
(
494
,
369
);
this
.
tabControl1
.
TabActivedBackColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
41
)))),
((
int
)(((
byte
)(
101
)))),
((
int
)(((
byte
)(
204
)))));
this
.
tabControl1
.
TabActivedFontColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
250
)))),
((
int
)(((
byte
)(
250
)))),
((
int
)(((
byte
)(
250
)))));
this
.
tabControl1
.
TabDeactivedBackColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
246
)))),
((
int
)(((
byte
)(
247
)))),
((
int
)(((
byte
)(
254
)))));
this
.
tabControl1
.
TabDeactivedBackColorHover
=
System
.
Drawing
.
Color
.
LightGreen
;
this
.
tabControl1
.
TabDeactivedFontColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
55
)))),
((
int
)(((
byte
)(
55
)))),
((
int
)(((
byte
)(
55
)))));
this
.
tabControl1
.
TabDeactivedFontColorHover
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
55
)))),
((
int
)(((
byte
)(
55
)))),
((
int
)(((
byte
)(
55
)))));
this
.
tabControl1
.
TabIndex
=
0
;
//
// HomePage
//
this
.
HomePage
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
26
);
this
.
HomePage
.
Name
=
"HomePage"
;
this
.
HomePage
.
Padding
=
new
System
.
Windows
.
Forms
.
Padding
(
3
);
this
.
HomePage
.
Size
=
new
System
.
Drawing
.
Size
(
486
,
339
);
this
.
HomePage
.
TabIndex
=
0
;
this
.
HomePage
.
Text
=
"首页"
;
this
.
HomePage
.
UseVisualStyleBackColor
=
true
;
//
// menuStrip1
//
this
.
menuStrip1
.
BackColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
234
)))),
((
int
)(((
byte
)(
245
)))),
((
int
)(((
byte
)(
255
)))));
...
...
@@ -292,43 +320,52 @@
//
this
.
btnMinimized
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)(((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
btnMinimized
.
BackgroundImage
=
global
::
Tools
.
Properties
.
Resources
.
最小化
;
this
.
btnMinimized
.
BackgroundImageLayout
=
System
.
Windows
.
Forms
.
ImageLayout
.
Stretch
;
this
.
btnMinimized
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Popup
;
this
.
btnMinimized
.
Location
=
new
System
.
Drawing
.
Point
(
611
,
2
);
this
.
btnMinimized
.
BackColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
41
)))),
((
int
)(((
byte
)(
101
)))),
((
int
)(((
byte
)(
204
)))));
this
.
btnMinimized
.
FlatAppearance
.
BorderSize
=
0
;
this
.
btnMinimized
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnMinimized
.
ForeColor
=
System
.
Drawing
.
Color
.
White
;
this
.
btnMinimized
.
Location
=
new
System
.
Drawing
.
Point
(
611
,
1
);
this
.
btnMinimized
.
Name
=
"btnMinimized"
;
this
.
btnMinimized
.
Size
=
new
System
.
Drawing
.
Size
(
2
2
,
22
);
this
.
btnMinimized
.
Size
=
new
System
.
Drawing
.
Size
(
2
4
,
25
);
this
.
btnMinimized
.
TabIndex
=
3
;
this
.
btnMinimized
.
UseVisualStyleBackColor
=
true
;
this
.
btnMinimized
.
Text
=
""
;
this
.
btnMinimized
.
UseVisualStyleBackColor
=
false
;
this
.
btnMinimized
.
Click
+=
new
System
.
EventHandler
(
this
.
btnMinimized_Click
);
this
.
btnMinimized
.
Paint
+=
new
System
.
Windows
.
Forms
.
PaintEventHandler
(
this
.
btnMinimized_Paint
);
//
// btnMaximized
//
this
.
btnMaximized
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)(((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
)
//
this
.
btnMaximized
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)(((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
btnMaximized
.
BackgroundImage
=
global
::
Tools
.
Properties
.
Resources
.
最大化
;
this
.
btnMaximized
.
BackgroundImageLayout
=
System
.
Windows
.
Forms
.
ImageLayout
.
Stretch
;
this
.
btnMaximized
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Popup
;
this
.
btnMaximized
.
Location
=
new
System
.
Drawing
.
Point
(
638
,
2
);
this
.
btnMaximized
.
BackColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
41
)))),
((
int
)(((
byte
)(
101
)))),
((
int
)(((
byte
)(
204
)))));
this
.
btnMaximized
.
FlatAppearance
.
BorderSize
=
0
;
this
.
btnMaximized
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnMaximized
.
ForeColor
=
System
.
Drawing
.
Color
.
White
;
this
.
btnMaximized
.
Location
=
new
System
.
Drawing
.
Point
(
637
,
1
);
this
.
btnMaximized
.
Name
=
"btnMaximized"
;
this
.
btnMaximized
.
Size
=
new
System
.
Drawing
.
Size
(
2
2
,
22
);
this
.
btnMaximized
.
Size
=
new
System
.
Drawing
.
Size
(
2
4
,
25
);
this
.
btnMaximized
.
TabIndex
=
2
;
this
.
btnMaximized
.
UseVisualStyleBackColor
=
true
;
this
.
btnMaximized
.
Text
=
""
;
this
.
btnMaximized
.
UseVisualStyleBackColor
=
false
;
this
.
btnMaximized
.
Click
+=
new
System
.
EventHandler
(
this
.
btnMaximized_Click
);
this
.
btnMaximized
.
Paint
+=
new
System
.
Windows
.
Forms
.
PaintEventHandler
(
this
.
btnMaximized_Paint
);
//
// btnClosed
//
this
.
btnClosed
.
Anchor
=
((
System
.
Windows
.
Forms
.
AnchorStyles
)(((
System
.
Windows
.
Forms
.
AnchorStyles
.
Top
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Bottom
)
|
System
.
Windows
.
Forms
.
AnchorStyles
.
Right
)));
this
.
btnClosed
.
BackgroundImage
=
global
::
Tools
.
Properties
.
Resources
.
关闭
;
this
.
btnClosed
.
BackgroundImageLayout
=
System
.
Windows
.
Forms
.
ImageLayout
.
Stretch
;
this
.
btnClosed
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Popup
;
this
.
btnClosed
.
Location
=
new
System
.
Drawing
.
Point
(
665
,
2
);
this
.
btnClosed
.
BackColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
41
)))),
((
int
)(((
byte
)(
101
)))),
((
int
)(((
byte
)(
204
)))));
this
.
btnClosed
.
FlatAppearance
.
BorderSize
=
0
;
this
.
btnClosed
.
FlatStyle
=
System
.
Windows
.
Forms
.
FlatStyle
.
Flat
;
this
.
btnClosed
.
ForeColor
=
System
.
Drawing
.
Color
.
White
;
this
.
btnClosed
.
Location
=
new
System
.
Drawing
.
Point
(
663
,
1
);
this
.
btnClosed
.
Name
=
"btnClosed"
;
this
.
btnClosed
.
Size
=
new
System
.
Drawing
.
Size
(
2
2
,
22
);
this
.
btnClosed
.
Size
=
new
System
.
Drawing
.
Size
(
2
4
,
25
);
this
.
btnClosed
.
TabIndex
=
4
;
this
.
btnClosed
.
UseVisualStyleBackColor
=
true
;
this
.
btnClosed
.
Text
=
""
;
this
.
btnClosed
.
UseVisualStyleBackColor
=
false
;
this
.
btnClosed
.
Click
+=
new
System
.
EventHandler
(
this
.
btnClosed_Click
);
this
.
btnClosed
.
Paint
+=
new
System
.
Windows
.
Forms
.
PaintEventHandler
(
this
.
btnClosed_Paint
);
//
// Footer
//
...
...
@@ -444,35 +481,6 @@
this
.
timer1
.
Interval
=
1000
;
this
.
timer1
.
Tick
+=
new
System
.
EventHandler
(
this
.
timer1_Tick
);
//
// tabControl1
//
this
.
tabControl1
.
BackgroundColor
=
System
.
Drawing
.
Color
.
White
;
this
.
tabControl1
.
Controls
.
Add
(
this
.
HomePage
);
this
.
tabControl1
.
Dock
=
System
.
Windows
.
Forms
.
DockStyle
.
Fill
;
this
.
tabControl1
.
Font
=
new
System
.
Drawing
.
Font
(
"微软雅黑"
,
9F
);
this
.
tabControl1
.
Location
=
new
System
.
Drawing
.
Point
(
0
,
0
);
this
.
tabControl1
.
Name
=
"tabControl1"
;
this
.
tabControl1
.
SelectedIndex
=
0
;
this
.
tabControl1
.
Size
=
new
System
.
Drawing
.
Size
(
494
,
369
);
this
.
tabControl1
.
TabActivedBackColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
41
)))),
((
int
)(((
byte
)(
101
)))),
((
int
)(((
byte
)(
204
)))));
this
.
tabControl1
.
TabActivedFontColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
250
)))),
((
int
)(((
byte
)(
250
)))),
((
int
)(((
byte
)(
250
)))));
this
.
tabControl1
.
TabDeactivedBackColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
246
)))),
((
int
)(((
byte
)(
247
)))),
((
int
)(((
byte
)(
254
)))));
this
.
tabControl1
.
TabDeactivedBackColorHover
=
System
.
Drawing
.
Color
.
LightGreen
;
this
.
tabControl1
.
TabDeactivedFontColor
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
55
)))),
((
int
)(((
byte
)(
55
)))),
((
int
)(((
byte
)(
55
)))));
this
.
tabControl1
.
TabDeactivedFontColorHover
=
System
.
Drawing
.
Color
.
FromArgb
(((
int
)(((
byte
)(
55
)))),
((
int
)(((
byte
)(
55
)))),
((
int
)(((
byte
)(
55
)))));
this
.
tabControl1
.
TabIndex
=
0
;
//
// HomePage
//
this
.
HomePage
.
Location
=
new
System
.
Drawing
.
Point
(
4
,
26
);
this
.
HomePage
.
Name
=
"HomePage"
;
this
.
HomePage
.
Padding
=
new
System
.
Windows
.
Forms
.
Padding
(
3
);
this
.
HomePage
.
Size
=
new
System
.
Drawing
.
Size
(
486
,
339
);
this
.
HomePage
.
TabIndex
=
0
;
this
.
HomePage
.
Text
=
"首页"
;
this
.
HomePage
.
UseVisualStyleBackColor
=
true
;
//
//
// wMain
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
6F
,
12F
);
...
...
@@ -491,11 +499,11 @@
this
.
splitContainer1
.
Panel2
.
ResumeLayout
(
false
);
((
System
.
ComponentModel
.
ISupportInitialize
)(
this
.
splitContainer1
)).
EndInit
();
this
.
splitContainer1
.
ResumeLayout
(
false
);
this
.
tabControl1
.
ResumeLayout
(
false
);
this
.
menuStrip1
.
ResumeLayout
(
false
);
this
.
menuStrip1
.
PerformLayout
();
this
.
Header
.
ResumeLayout
(
false
);
this
.
Footer
.
ResumeLayout
(
false
);
this
.
tabControl1
.
ResumeLayout
(
false
);
this
.
ResumeLayout
(
false
);
}
...
...
Tools/wMain.cs
View file @
b6d55a05
...
...
@@ -95,6 +95,13 @@ namespace Tools
// this.webBrowser1.Url = new Uri("http://www.feteto.cn/#/");
// this.webBrowser1.Show();
//}));
//窗口控制按钮悬停效果
this
.
btnMinimized
.
MouseEnter
+=
BtnWinCtrl_MouseEnter
;
this
.
btnMinimized
.
MouseLeave
+=
BtnWinCtrl_MouseLeave
;
this
.
btnMaximized
.
MouseEnter
+=
BtnWinCtrl_MouseEnter
;
this
.
btnMaximized
.
MouseLeave
+=
BtnWinCtrl_MouseLeave
;
this
.
btnClosed
.
MouseEnter
+=
BtnClosed_MouseEnter
;
this
.
btnClosed
.
MouseLeave
+=
BtnClosed_MouseLeave
;
//版本号处理
Task
.
Run
(()
=>
this
.
AsyncUI
(()
=>
{
var
dt
=
this
.
_db
.
GetDataTable
(
$@"
...
...
@@ -145,14 +152,118 @@ namespace Tools
{
this
.
SetWinMaximized
();
}
this
.
btnMaximized
.
Invalidate
();
//刷新Tab显示
this
.
RefreshTab
();
}
/// <summary>
/// 自定义绘制最小化图标:底部横线
/// </summary>
private
void
btnMinimized_Paint
(
object
sender
,
PaintEventArgs
e
)
{
var
btn
=
sender
as
Button
;
var
g
=
e
.
Graphics
;
g
.
SmoothingMode
=
System
.
Drawing
.
Drawing2D
.
SmoothingMode
.
AntiAlias
;
int
w
=
btn
.
Width
;
int
h
=
btn
.
Height
;
int
lw
=
10
;
// 横线宽度
int
x
=
(
w
-
lw
)
/
2
;
int
y
=
h
/
2
;
using
(
var
pen
=
new
Pen
(
btn
.
ForeColor
,
1.5f
))
g
.
DrawLine
(
pen
,
x
,
y
,
x
+
lw
,
y
);
}
/// <summary>
/// 自定义绘制最大化/还原图标,像素级居中
/// </summary>
private
void
btnMaximized_Paint
(
object
sender
,
PaintEventArgs
e
)
{
var
btn
=
sender
as
Button
;
var
g
=
e
.
Graphics
;
g
.
SmoothingMode
=
System
.
Drawing
.
Drawing2D
.
SmoothingMode
.
AntiAlias
;
int
w
=
btn
.
Width
;
int
h
=
btn
.
Height
;
int
s
=
9
;
// 矩形边长
int
gx
=
3
;
// 还原态前后窗口间距
using
(
var
pen
=
new
Pen
(
btn
.
ForeColor
,
1.5f
))
{
if
(
this
.
IsMaximized
)
{
// 还原图标:两个重叠矩形
int
bx
=
(
w
-
s
-
gx
)
/
2
;
int
by
=
(
h
-
s
-
gx
)
/
2
+
1
;
g
.
DrawRectangle
(
pen
,
bx
+
gx
,
by
-
gx
/
2
,
s
,
s
);
using
(
var
brush
=
new
SolidBrush
(
btn
.
BackColor
))
g
.
FillRectangle
(
brush
,
bx
,
by
,
s
,
s
);
g
.
DrawRectangle
(
pen
,
bx
,
by
,
s
,
s
);
}
else
{
// 最大化图标:单个矩形
int
x
=
(
w
-
s
)
/
2
;
int
y
=
(
h
-
s
)
/
2
;
g
.
DrawRectangle
(
pen
,
x
,
y
,
s
,
s
);
}
}
}
/// <summary>
/// 自定义绘制关闭图标:X 形叉号
/// </summary>
private
void
btnClosed_Paint
(
object
sender
,
PaintEventArgs
e
)
{
var
btn
=
sender
as
Button
;
var
g
=
e
.
Graphics
;
g
.
SmoothingMode
=
System
.
Drawing
.
Drawing2D
.
SmoothingMode
.
AntiAlias
;
int
w
=
btn
.
Width
;
int
h
=
btn
.
Height
;
int
m
=
8
;
// 边距
int
x1
=
m
,
y1
=
m
;
int
x2
=
w
-
m
,
y2
=
h
-
m
;
using
(
var
pen
=
new
Pen
(
btn
.
ForeColor
,
1.6f
))
{
g
.
DrawLine
(
pen
,
x1
,
y1
,
x2
,
y2
);
g
.
DrawLine
(
pen
,
x2
,
y1
,
x1
,
y2
);
}
}
private
void
btnMinimized_Click
(
object
sender
,
EventArgs
e
)
{
this
.
WindowState
=
FormWindowState
.
Minimized
;
}
/// <summary>
/// 最小化/最大化按钮悬停效果
/// </summary>
private
void
BtnWinCtrl_MouseEnter
(
object
sender
,
EventArgs
e
)
{
if
(
sender
is
Button
btn
)
btn
.
BackColor
=
Color
.
FromArgb
(
70
,
130
,
220
);
}
private
void
BtnWinCtrl_MouseLeave
(
object
sender
,
EventArgs
e
)
{
if
(
sender
is
Button
btn
)
btn
.
BackColor
=
Color
.
FromArgb
(
41
,
101
,
204
);
}
/// <summary>
/// 关闭按钮悬停效果(红色高亮)
/// </summary>
private
void
BtnClosed_MouseEnter
(
object
sender
,
EventArgs
e
)
{
this
.
btnClosed
.
BackColor
=
Color
.
FromArgb
(
220
,
60
,
60
);
}
private
void
BtnClosed_MouseLeave
(
object
sender
,
EventArgs
e
)
{
this
.
btnClosed
.
BackColor
=
Color
.
FromArgb
(
41
,
101
,
204
);
}
/// <summary>
/// 设置窗体最大化
/// </summary>
...
...
@@ -490,7 +601,8 @@ namespace Tools
// 使用三元运算符简化状态切换
this
.
splitContainer1
.
SplitterDistance
=
this
.
IsMenuCollapsed
?
20
:
this
.
OriginalMenuWidth
;
this
.
btnToggleMenu
.
Text
=
this
.
IsMenuCollapsed
?
">"
:
"<"
;
this
.
toolTip1
.
SetToolTip
(
this
.
btnToggleMenu
,
this
.
IsMenuCollapsed
?
"展开菜单"
:
"折叠菜单"
);
// 强制刷新按钮显示
this
.
btnToggleMenu
.
PerformLayout
();
this
.
btnToggleMenu
.
Refresh
();
...
...
Tools/wMain.resx
View file @
b6d55a05
...
...
@@ -125,7 +125,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAD0
EgAAAk1TRnQBSQFMAgEBBQEAA
SgBAQEo
AQEBIAEAASABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
EgAAAk1TRnQBSQFMAgEBBQEAA
TgBAQE4
AQEBIAEAASABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABgAMAAUADAAEBAQABCAYAASAYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
...
...
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