更新页面框架Main命名,继承关系为Private。继承后编译时删除Design.cs里面Main部分

This commit is contained in:
sunny 2020-05-27 14:05:35 +08:00
parent fa512aee15
commit 6c132055b9
37 changed files with 80 additions and 120 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -63,10 +63,6 @@
this.Header.Size = new System.Drawing.Size(1024, 110);
this.Header.MenuItemClick += new Sunny.UI.UINavBar.OnMenuItemClick(this.Header_MenuItemClick);
//
// Main
//
this.Main.Size = new System.Drawing.Size(774, 575);
//
// uiLogo1
//
this.uiLogo1.Font = new System.Drawing.Font("微软雅黑", 12F);

View File

@ -44,11 +44,6 @@
this.Aside.Style = Sunny.UI.UIStyle.Blue;
this.Aside.MenuItemClick += new Sunny.UI.UINavMenu.OnMenuItemClick(this.Aside_MenuItemClick);
//
// Main
//
this.Main.Size = new System.Drawing.Size(774, 628);
this.Main.Style = Sunny.UI.UIStyle.Blue;
//
// FAsideHeaderMain
//
this.AutoScaleDimensions = new System.Drawing.SizeF(10F, 21F);

View File

@ -7,7 +7,7 @@
InitializeComponent();
//设置关联
Aside.TabControl = Main;
Aside.TabControl = MainTabControl;
//增加页面到Main
AddPage(new FPage1(), 1001);

View File

@ -51,10 +51,6 @@
this.Aside.Size = new System.Drawing.Size(250, 685);
this.Aside.MenuItemClick += new Sunny.UI.UINavMenu.OnMenuItemClick(this.Aside_MenuItemClick);
//
// Main
//
this.Main.Size = new System.Drawing.Size(774, 572);
//
// FAsideHeaderMainFooter
//
this.AutoScaleDimensions = new System.Drawing.SizeF(10F, 21F);

View File

@ -7,7 +7,7 @@
InitializeComponent();
//设置关联
Aside.TabControl = Main;
Aside.TabControl = MainTabControl;
//增加页面到Main
AddPage(new FPage1(), 1001);

View File

@ -36,11 +36,6 @@
this.Aside.Size = new System.Drawing.Size(250, 685);
this.Aside.Style = Sunny.UI.UIStyle.Blue;
//
// Main
//
this.Main.Size = new System.Drawing.Size(774, 685);
this.Main.Style = Sunny.UI.UIStyle.Blue;
//
// FAsideMain
//
this.AutoScaleDimensions = new System.Drawing.SizeF(10F, 21F);

View File

@ -7,7 +7,7 @@
InitializeComponent();
//设置关联
Aside.TabControl = Main;
Aside.TabControl = MainTabControl;
//增加页面到Main
AddPage(new FTitlePage1(), 1001);

View File

@ -44,11 +44,6 @@
this.Header.Size = new System.Drawing.Size(1024, 110);
this.Header.Style = Sunny.UI.UIStyle.Blue;
//
// Main
//
this.Main.Size = new System.Drawing.Size(774, 575);
this.Main.Style = Sunny.UI.UIStyle.Blue;
//
// uiLogo1
//
this.uiLogo1.Font = new System.Drawing.Font("微软雅黑", 12F);

View File

@ -7,7 +7,7 @@
InitializeComponent();
//设置关联
Aside.TabControl = Main;
Aside.TabControl = MainTabControl;
//增加页面到Main
AddPage(new FTitlePage1(), 1001);

View File

@ -52,11 +52,6 @@
this.Header.Size = new System.Drawing.Size(1024, 110);
this.Header.Style = Sunny.UI.UIStyle.Blue;
//
// Main
//
this.Main.Size = new System.Drawing.Size(774, 519);
this.Main.Style = Sunny.UI.UIStyle.Blue;
//
// uiLogo1
//
this.uiLogo1.Font = new System.Drawing.Font("微软雅黑", 12F);

View File

@ -7,7 +7,7 @@
InitializeComponent();
//设置关联
Aside.TabControl = Main;
Aside.TabControl = MainTabControl;
//增加页面到Main
AddPage(new FTitlePage1(), 1001);

View File

@ -50,11 +50,6 @@
treeNode2,
treeNode3});
this.Header.Size = new System.Drawing.Size(1024, 110);
this.Header.TabControl = this.Main;
//
// Main
//
this.Main.Size = new System.Drawing.Size(1024, 575);
//
// uiLogo1
//

View File

@ -7,7 +7,7 @@
InitializeComponent();
//设置关联
Header.TabControl = Main;
Header.TabControl = MainTabControl;
//增加页面到Main
AddPage(new FTitlePage1(), 1001);

View File

@ -48,11 +48,6 @@
this.Header.Style = Sunny.UI.UIStyle.Blue;
this.Header.MenuItemClick += new Sunny.UI.UINavBar.OnMenuItemClick(this.Header_MenuItemClick);
//
// Main
//
this.Main.Size = new System.Drawing.Size(1024, 519);
this.Main.Style = Sunny.UI.UIStyle.Blue;
//
// uiLogo1
//
this.uiLogo1.Font = new System.Drawing.Font("微软雅黑", 12F);

View File

@ -7,7 +7,7 @@
InitializeComponent();
//设置关联
Header.TabControl = Main;
Header.TabControl = MainTabControl;
//增加页面到Main
AddPage(new FTitlePage1(), 1001);

View File

@ -297,7 +297,7 @@ namespace Sunny.UI
/// <param name="rgnRadius">圆角矩形的半径</param>
public static void SetFormRoundRectRegion(Form form, int rgnRadius)
{
if (form.FormBorderStyle == FormBorderStyle.None)
if (form != null && form.FormBorderStyle == FormBorderStyle.None)
{
int region = CreateRoundRectRgn(0, 0, form.Width + 1, form.Height + 1, rgnRadius, rgnRadius);
SetWindowRgn(form.Handle, region, true);

View File

@ -31,10 +31,6 @@
this.Footer = new Sunny.UI.UIPanel();
this.SuspendLayout();
//
// Main
//
this.Main.Size = new System.Drawing.Size(550, 302);
//
// Footer
//
this.Footer.Dock = System.Windows.Forms.DockStyle.Bottom;
@ -59,7 +55,6 @@
this.Controls.SetChildIndex(this.Aside, 0);
this.Controls.SetChildIndex(this.Header, 0);
this.Controls.SetChildIndex(this.Footer, 0);
this.Controls.SetChildIndex(this.Main, 0);
this.ResumeLayout(false);
}

View File

@ -26,9 +26,15 @@ namespace Sunny.UI
public UIAsideHeaderMainFooterFrame()
{
InitializeComponent();
Controls.SetChildIndex(MainTabControl, 0);
Header.Parent = this;
Aside.Parent = this;
MainTabControl.Parent = this;
Footer.Parent = this;
Header.BringToFront();
Footer.BringToFront();
Main.BringToFront();
MainTabControl.BringToFront();
Aside.TabControl = MainTabControl;
}
}
}

View File

@ -34,12 +34,6 @@
// Aside
//
this.Aside.LineColor = System.Drawing.Color.Black;
this.Aside.TabControl = this.Main;
//
// Main
//
this.Main.Location = new System.Drawing.Point(250, 92);
this.Main.Size = new System.Drawing.Size(550, 358);
//
// Header
//
@ -64,7 +58,6 @@
this.Text = "UIAsideHeaderMainFrame";
this.Controls.SetChildIndex(this.Aside, 0);
this.Controls.SetChildIndex(this.Header, 0);
this.Controls.SetChildIndex(this.Main, 0);
this.ResumeLayout(false);
}

View File

@ -26,8 +26,13 @@ namespace Sunny.UI
public UIAsideHeaderMainFrame()
{
InitializeComponent();
Controls.SetChildIndex(MainTabControl, 0);
Header.Parent = this;
Aside.Parent = this;
MainTabControl.Parent = this;
Header.BringToFront();
Main.BringToFront();
MainTabControl.BringToFront();
Aside.TabControl = MainTabControl;
}
}
}

View File

@ -31,13 +31,6 @@
this.Aside = new Sunny.UI.UINavMenu();
this.SuspendLayout();
//
// Main
//
this.Main.ItemSize = new System.Drawing.Size(0, 1);
this.Main.Location = new System.Drawing.Point(250, 35);
this.Main.Size = new System.Drawing.Size(550, 415);
this.Main.TabVisible = false;
//
// Aside
//
this.Aside.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(56)))), ((int)(((byte)(56)))), ((int)(((byte)(56)))));
@ -49,7 +42,6 @@
this.Aside.Location = new System.Drawing.Point(0, 35);
this.Aside.Name = "Aside";
this.Aside.Size = new System.Drawing.Size(250, 415);
this.Aside.TabControl = this.Main;
this.Aside.TabIndex = 1;
//
// UIAsideMainFrame
@ -61,7 +53,6 @@
this.Name = "UIAsideMainFrame";
this.Text = "UIAsideMainFrame";
this.Controls.SetChildIndex(this.Aside, 0);
this.Controls.SetChildIndex(this.Main, 0);
this.ResumeLayout(false);
}

View File

@ -26,6 +26,11 @@ namespace Sunny.UI
public UIAsideMainFrame()
{
InitializeComponent();
Controls.SetChildIndex(MainTabControl, 0);
Aside.Parent = this;
MainTabControl.Parent = this;
MainTabControl.BringToFront();
Aside.TabControl = MainTabControl;
}
}
}

View File

@ -35,10 +35,6 @@
//
this.Aside.LineColor = System.Drawing.Color.Black;
//
// Main
//
this.Main.Size = new System.Drawing.Size(550, 249);
//
// Footer
//
this.Footer.Dock = System.Windows.Forms.DockStyle.Bottom;
@ -63,7 +59,6 @@
this.Controls.SetChildIndex(this.Header, 0);
this.Controls.SetChildIndex(this.Aside, 0);
this.Controls.SetChildIndex(this.Footer, 0);
this.Controls.SetChildIndex(this.Main, 0);
this.ResumeLayout(false);
}

View File

@ -27,9 +27,15 @@ namespace Sunny.UI
{
InitializeComponent();
Controls.SetChildIndex(MainTabControl, 0);
Header.Parent = this;
Aside.Parent = this;
MainTabControl.Parent = this;
Footer.Parent = this;
Aside.BringToFront();
Footer.BringToFront();
Main.BringToFront();
MainTabControl.BringToFront();
Aside.TabControl = MainTabControl;
}
}
}

View File

@ -36,11 +36,6 @@
this.Header.Location = new System.Drawing.Point(0, 35);
this.Header.Size = new System.Drawing.Size(800, 110);
//
// Main
//
this.Main.Location = new System.Drawing.Point(250, 145);
this.Main.Size = new System.Drawing.Size(550, 305);
//
// Aside
//
this.Aside.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(56)))), ((int)(((byte)(56)))), ((int)(((byte)(56)))));
@ -52,7 +47,6 @@
this.Aside.Location = new System.Drawing.Point(0, 145);
this.Aside.Name = "Aside";
this.Aside.Size = new System.Drawing.Size(250, 305);
this.Aside.TabControl = this.Main;
this.Aside.TabIndex = 2;
//
// UIHeaderAsideMainFrame
@ -65,7 +59,6 @@
this.Text = "UIHeaderAsideMainFrame";
this.Controls.SetChildIndex(this.Header, 0);
this.Controls.SetChildIndex(this.Aside, 0);
this.Controls.SetChildIndex(this.Main, 0);
this.ResumeLayout(false);
}

View File

@ -26,8 +26,13 @@ namespace Sunny.UI
public UIHeaderAsideMainFrame()
{
InitializeComponent();
Controls.SetChildIndex(MainTabControl, 0);
Header.Parent = this;
Aside.Parent = this;
MainTabControl.Parent = this;
Aside.BringToFront();
Main.BringToFront();
MainTabControl.BringToFront();
Aside.TabControl = MainTabControl;
}
}
}

View File

@ -36,10 +36,6 @@
this.Header.Location = new System.Drawing.Point(0, 35);
this.Header.Size = new System.Drawing.Size(800, 110);
//
// Main
//
this.Main.Size = new System.Drawing.Size(800, 249);
//
// Footer
//
this.Footer.Dock = System.Windows.Forms.DockStyle.Bottom;
@ -65,7 +61,6 @@
this.Text = "UIHeaderMainFooterFrame";
this.Controls.SetChildIndex(this.Footer, 0);
this.Controls.SetChildIndex(this.Header, 0);
this.Controls.SetChildIndex(this.Main, 0);
this.ResumeLayout(false);
}

View File

@ -26,6 +26,11 @@ namespace Sunny.UI
public UIHeaderMainFooterFrame()
{
InitializeComponent();
Controls.SetChildIndex(MainTabControl, 0);
Header.Parent = this;
Footer.Parent = this;
MainTabControl.Parent = this;
MainTabControl.BringToFront();
}
}
}

View File

@ -31,13 +31,6 @@
this.Header = new Sunny.UI.UINavBar();
this.SuspendLayout();
//
// Main
//
this.Main.ItemSize = new System.Drawing.Size(0, 1);
this.Main.Location = new System.Drawing.Point(1, 145);
this.Main.Size = new System.Drawing.Size(798, 304);
this.Main.TabVisible = false;
//
// Header
//
this.Header.Dock = System.Windows.Forms.DockStyle.Top;
@ -60,7 +53,6 @@
this.Name = "UIHeaderMainFrame";
this.Text = "UIHeaderMainFrame";
this.Controls.SetChildIndex(this.Header, 0);
this.Controls.SetChildIndex(this.Main, 0);
this.ResumeLayout(false);
}

View File

@ -26,6 +26,10 @@ namespace Sunny.UI
public UIHeaderMainFrame()
{
InitializeComponent();
Controls.SetChildIndex(MainTabControl, 0);
Header.Parent = this;
MainTabControl.Parent = this;
MainTabControl.BringToFront();
}
}
}

View File

@ -28,26 +28,26 @@
/// </summary>
private void InitializeComponent()
{
this.Main = new Sunny.UI.UITabControl();
this.MainContainer = new Sunny.UI.UITabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.Main.SuspendLayout();
this.MainContainer.SuspendLayout();
this.SuspendLayout();
//
// Main
// MainContainer
//
this.Main.Controls.Add(this.tabPage1);
this.Main.Controls.Add(this.tabPage2);
this.Main.Dock = System.Windows.Forms.DockStyle.Fill;
this.Main.DrawMode = System.Windows.Forms.TabDrawMode.OwnerDrawFixed;
this.Main.Font = new System.Drawing.Font("微软雅黑", 12F);
this.Main.ItemSize = new System.Drawing.Size(150, 40);
this.Main.Location = new System.Drawing.Point(0, 35);
this.Main.Name = "Main";
this.Main.SelectedIndex = 0;
this.Main.Size = new System.Drawing.Size(800, 415);
this.Main.SizeMode = System.Windows.Forms.TabSizeMode.Fixed;
this.Main.TabIndex = 0;
this.MainContainer.Controls.Add(this.tabPage1);
this.MainContainer.Controls.Add(this.tabPage2);
this.MainContainer.Dock = System.Windows.Forms.DockStyle.Fill;
this.MainContainer.DrawMode = System.Windows.Forms.TabDrawMode.OwnerDrawFixed;
this.MainContainer.Font = new System.Drawing.Font("微软雅黑", 12F);
this.MainContainer.ItemSize = new System.Drawing.Size(150, 40);
this.MainContainer.Location = new System.Drawing.Point(0, 35);
this.MainContainer.Name = "MainContainer";
this.MainContainer.SelectedIndex = 0;
this.MainContainer.Size = new System.Drawing.Size(800, 415);
this.MainContainer.SizeMode = System.Windows.Forms.TabSizeMode.Fixed;
this.MainContainer.TabIndex = 0;
//
// tabPage1
//
@ -69,14 +69,12 @@
//
// UIMainFrame
//
this.AutoScaleDimensions = new System.Drawing.SizeF(10F, 21F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.ClientSize = new System.Drawing.Size(800, 450);
this.Controls.Add(this.Main);
this.Controls.Add(this.MainContainer);
this.Name = "UIMainFrame";
this.Padding = new System.Windows.Forms.Padding(0, 35, 0, 0);
this.Text = "UIMainFrame";
this.Main.ResumeLayout(false);
this.MainContainer.ResumeLayout(false);
this.ResumeLayout(false);
}
@ -84,6 +82,6 @@
#endregion
private System.Windows.Forms.TabPage tabPage1;
private System.Windows.Forms.TabPage tabPage2;
protected UITabControl Main;
private UITabControl MainContainer;
}
}

View File

@ -26,25 +26,28 @@ namespace Sunny.UI
public UIMainFrame()
{
InitializeComponent();
Main.BringToFront();
MainContainer.TabVisible = false;
MainContainer.BringToFront();
}
public UIPage AddPage(UIPage page, int index)
{
page.PageIndex = index;
Main.AddPage(page);
MainContainer.AddPage(page);
return page;
}
public UIPage AddPage(UIPage page)
{
Main.AddPage(page);
MainContainer.AddPage(page);
return page;
}
public void SelectPage(int pageIndex)
{
Main.SelectPage(pageIndex);
MainContainer.SelectPage(pageIndex);
}
protected UITabControl MainTabControl => MainContainer;
}
}

View File

@ -1,5 +1,12 @@
+ 增加; - 删除; * 修改
2020.05.27
* 更新UIListBox消息处理Bug
* 更新页面框架Main命名继承关系为Private。继承后编译时删除Design.cs里面Main部分
2020.05.26
* 更新页面框架Main叠放次序
2020.05.25
+ UITextBox增加Watermark水印属性
+ ULocalize.cs增加多语帮助类