Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
刘韬
/
HZH_Controls
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
作业
提交
问题看板
文件
提交
网络
比较
分支
标签
Commit 014468ad
由
HZH
编写于
2019-09-11 14:31:15 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
bug
1 个父辈
62e9eed8
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
6 行增加
和
4 行删除
HZH_Controls/HZH_Controls/Controls/FactoryControls/MindMapping/MindMappingItemEntity.cs
HZH_Controls/HZH_Controls/Controls/FactoryControls/MindMapping/UCMindMapping.cs
HZH_Controls/HZH_Controls/Controls/FactoryControls/MindMapping/MindMappingItemEntity.cs
查看文件 @
014468a
...
...
@@ -196,12 +196,12 @@ namespace HZH_Controls.Controls
/// Gets the height of the item.
/// </summary>
/// <value>The height of the item.</value>
private
int
ItemHeight
{
private
get
;
private
set
;
}
int
ItemHeight
{
get
;
set
;
}
/// <summary>
/// Gets the width of the item.
/// </summary>
/// <value>The width of the item.</value>
private
int
ItemWidth
{
private
get
;
private
set
;
}
int
ItemWidth
{
get
;
set
;
}
/// <summary>
/// Resets the size.
/// </summary>
...
...
HZH_Controls/HZH_Controls/Controls/FactoryControls/MindMapping/UCMindMapping.cs
查看文件 @
014468a
...
...
@@ -251,12 +251,13 @@ namespace HZH_Controls.Controls
/// <param name="g">The g.</param>
private
void
DrawItem
(
MindMappingItemEntity
item
,
Graphics
g
)
{
//节点
var
size
=
g
.
MeasureString
(
item
.
Text
,
item
.
Font
);
item
.
DrawRectangle
=
new
RectangleF
(
item
.
WorkingRectangle
.
Left
+
2
,
item
.
WorkingRectangle
.
Top
+
(
item
.
WorkingRectangle
.
Height
-
size
.
Height
)
/
2
+
2
,
size
.
Width
+
4
,
size
.
Height
+
4
);
GraphicsPath
drawPath
=
item
.
DrawRectangle
.
CreateRoundedRectanglePath
(
5
);
g
.
FillPath
(
new
SolidBrush
(
item
.
BackColor
),
drawPath
);
g
.
DrawString
(
item
.
Text
,
item
.
Font
,
new
SolidBrush
(
item
.
ForeColor
),
item
.
DrawRectangle
.
Location
.
X
+
2
,
item
.
DrawRectangle
.
Location
.
Y
+
2
);
//子节点
if
(
item
.
Childrens
!=
null
&&
item
.
IsExpansion
)
{
for
(
int
i
=
0
;
i
<
item
.
Childrens
.
Length
;
i
++)
...
...
@@ -273,6 +274,7 @@ namespace HZH_Controls.Controls
DrawItem
(
child
,
g
);
}
}
//连线
if
(
item
.
ParentItem
!=
null
)
{
g
.
DrawLines
(
new
Pen
(
new
SolidBrush
(
lineColor
),
1
),
new
PointF
[]
...
...
@@ -284,7 +286,7 @@ namespace HZH_Controls.Controls
new
PointF
(
item
.
DrawRectangle
.
Left
,
item
.
DrawRectangle
.
Top
+
item
.
DrawRectangle
.
Height
/
2
),
});
}
//展开折叠按钮
if
(
item
.
Childrens
!=
null
&&
item
.
Childrens
.
Length
>
0
)
{
RectangleF
_rect
=
new
RectangleF
(
item
.
DrawRectangle
.
Right
+
1
,
item
.
DrawRectangle
.
Top
+
(
item
.
DrawRectangle
.
Height
-
10
)
/
2
,
10
,
10
);
...
...
编写
预览
支持
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
Finish editing this message first!
Cancel
请
注册
或
登录
后发表评论