* UIForm:加了个属性AllowAddControlOnTitle,允许在标题栏放置控件
This commit is contained in:
parent
dc4bb68940
commit
5ddbfebee9
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
35
SunnyUI.Demo/FMain.Designer.cs
generated
35
SunnyUI.Demo/FMain.Designer.cs
generated
@ -29,10 +29,10 @@
|
|||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
this.components = new System.ComponentModel.Container();
|
this.components = new System.ComponentModel.Container();
|
||||||
System.Windows.Forms.TreeNode treeNode9 = new System.Windows.Forms.TreeNode("控件");
|
System.Windows.Forms.TreeNode treeNode1 = new System.Windows.Forms.TreeNode("控件");
|
||||||
System.Windows.Forms.TreeNode treeNode10 = new System.Windows.Forms.TreeNode("窗体");
|
System.Windows.Forms.TreeNode treeNode2 = new System.Windows.Forms.TreeNode("窗体");
|
||||||
System.Windows.Forms.TreeNode treeNode11 = new System.Windows.Forms.TreeNode("图表");
|
System.Windows.Forms.TreeNode treeNode3 = new System.Windows.Forms.TreeNode("图表");
|
||||||
System.Windows.Forms.TreeNode treeNode12 = new System.Windows.Forms.TreeNode("主题");
|
System.Windows.Forms.TreeNode treeNode4 = new System.Windows.Forms.TreeNode("主题");
|
||||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FMain));
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FMain));
|
||||||
this.uiLogo1 = new Sunny.UI.UILogo();
|
this.uiLogo1 = new Sunny.UI.UILogo();
|
||||||
this.uiAvatar = new Sunny.UI.UIAvatar();
|
this.uiAvatar = new Sunny.UI.UIAvatar();
|
||||||
@ -63,20 +63,20 @@
|
|||||||
this.Header.Controls.Add(this.uiAvatar);
|
this.Header.Controls.Add(this.uiAvatar);
|
||||||
this.Header.Controls.Add(this.uiLogo1);
|
this.Header.Controls.Add(this.uiLogo1);
|
||||||
this.Header.Location = new System.Drawing.Point(2, 35);
|
this.Header.Location = new System.Drawing.Point(2, 35);
|
||||||
treeNode9.ImageIndex = 1;
|
treeNode1.ImageIndex = 1;
|
||||||
treeNode9.Name = "节点0";
|
treeNode1.Name = "节点0";
|
||||||
treeNode9.Text = "控件";
|
treeNode1.Text = "控件";
|
||||||
treeNode10.Name = "节点1";
|
treeNode2.Name = "节点1";
|
||||||
treeNode10.Text = "窗体";
|
treeNode2.Text = "窗体";
|
||||||
treeNode11.Name = "节点2";
|
treeNode3.Name = "节点2";
|
||||||
treeNode11.Text = "图表";
|
treeNode3.Text = "图表";
|
||||||
treeNode12.Name = "节点2";
|
treeNode4.Name = "节点2";
|
||||||
treeNode12.Text = "主题";
|
treeNode4.Text = "主题";
|
||||||
this.Header.Nodes.AddRange(new System.Windows.Forms.TreeNode[] {
|
this.Header.Nodes.AddRange(new System.Windows.Forms.TreeNode[] {
|
||||||
treeNode9,
|
treeNode1,
|
||||||
treeNode10,
|
treeNode2,
|
||||||
treeNode11,
|
treeNode3,
|
||||||
treeNode12});
|
treeNode4});
|
||||||
this.Header.SelectedIndex = 0;
|
this.Header.SelectedIndex = 0;
|
||||||
this.Header.Size = new System.Drawing.Size(1020, 110);
|
this.Header.Size = new System.Drawing.Size(1020, 110);
|
||||||
this.Header.Style = Sunny.UI.UIStyle.Custom;
|
this.Header.Style = Sunny.UI.UIStyle.Custom;
|
||||||
@ -130,7 +130,6 @@
|
|||||||
//
|
//
|
||||||
// FMain
|
// FMain
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(10F, 21F);
|
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||||
this.ClientSize = new System.Drawing.Size(1024, 720);
|
this.ClientSize = new System.Drawing.Size(1024, 720);
|
||||||
this.ExtendBox = true;
|
this.ExtendBox = true;
|
||||||
|
@ -66,6 +66,13 @@ namespace Sunny.UI
|
|||||||
showTitleIcon = false;
|
showTitleIcon = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[DefaultValue(false)]
|
||||||
|
[Description("允许在标题栏放置控件"), Category("SunnyUI")]
|
||||||
|
public bool AllowAddControlOnTitle
|
||||||
|
{
|
||||||
|
get; set;
|
||||||
|
}
|
||||||
|
|
||||||
[DefaultValue(false)]
|
[DefaultValue(false)]
|
||||||
[Description("允许显示标题栏"), Category("SunnyUI")]
|
[Description("允许显示标题栏"), Category("SunnyUI")]
|
||||||
public bool AllowShowTitle
|
public bool AllowShowTitle
|
||||||
@ -195,7 +202,7 @@ namespace Sunny.UI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ShowTitle && e.Control.Top < TitleHeight)
|
if (ShowTitle && !AllowAddControlOnTitle && e.Control.Top < TitleHeight)
|
||||||
{
|
{
|
||||||
e.Control.Top = Padding.Top;
|
e.Control.Top = Padding.Top;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user