diff --git a/Bin/SunnyUI.dll b/Bin/SunnyUI.dll index e3cdcb47..fd800d5a 100644 Binary files a/Bin/SunnyUI.dll and b/Bin/SunnyUI.dll differ diff --git a/Bin/SunnyUI.pdb b/Bin/SunnyUI.pdb index 43aa3de0..60e826ea 100644 Binary files a/Bin/SunnyUI.pdb and b/Bin/SunnyUI.pdb differ diff --git a/SunnyUI.Demo/Bin/SunnyUI.dll b/SunnyUI.Demo/Bin/SunnyUI.dll index e3cdcb47..fd800d5a 100644 Binary files a/SunnyUI.Demo/Bin/SunnyUI.dll and b/SunnyUI.Demo/Bin/SunnyUI.dll differ diff --git a/SunnyUI/Controls/UINavBar.cs b/SunnyUI/Controls/UINavBar.cs index ac2470c0..0eeefa8a 100644 --- a/SunnyUI/Controls/UINavBar.cs +++ b/SunnyUI/Controls/UINavBar.cs @@ -69,6 +69,11 @@ namespace Sunny.UI MenuHelper.SetPageIndex(node, pageIndex); } + public int GetPageIndex(TreeNode node) + { + return MenuHelper.GetPageIndex(node); + } + public void SetNodeSymbol(TreeNode node, int symbol, int symbolSize = 24) { MenuHelper.SetSymbol(node, symbol, symbolSize); diff --git a/SunnyUI/Controls/UINavMenu.cs b/SunnyUI/Controls/UINavMenu.cs index b691e452..c7846b26 100644 --- a/SunnyUI/Controls/UINavMenu.cs +++ b/SunnyUI/Controls/UINavMenu.cs @@ -342,6 +342,11 @@ namespace Sunny.UI private readonly NavMenuHelper MenuHelper = new NavMenuHelper(); + public int GetPageIndex(TreeNode node) + { + return MenuHelper.GetPageIndex(node); + } + public void SetNodeItem(TreeNode node, NavMenuItem item) { MenuHelper.Add(node, item); diff --git a/SunnyUI/Forms/UIEditForm.Designer.cs b/SunnyUI/Forms/UIEditForm.Designer.cs index 38676c48..8e255f3e 100644 --- a/SunnyUI/Forms/UIEditForm.Designer.cs +++ b/SunnyUI/Forms/UIEditForm.Designer.cs @@ -90,6 +90,7 @@ this.MinimizeBox = false; this.Name = "UIEditForm"; this.Padding = new System.Windows.Forms.Padding(1, 35, 1, 3); + this.ShowIcon = false; this.ShowInTaskbar = false; this.Text = "UIEditForm"; this.pnlBtm.ResumeLayout(false); diff --git a/SunnyUI/Forms/UIEditForm.resx b/SunnyUI/Forms/UIEditForm.resx new file mode 100644 index 00000000..1af7de15 --- /dev/null +++ b/SunnyUI/Forms/UIEditForm.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/SunnyUI/Forms/UIForm.cs b/SunnyUI/Forms/UIForm.cs index f9d2d5e6..74aca570 100644 --- a/SunnyUI/Forms/UIForm.cs +++ b/SunnyUI/Forms/UIForm.cs @@ -896,7 +896,7 @@ namespace Sunny.UI e.Graphics.SetDefaultQuality(); - if (Icon != null) + if (ShowIcon && Icon != null) { e.Graphics.DrawImage(Icon.ToBitmap(), 6, (TitleHeight - 24) / 2, 24, 24); } @@ -908,7 +908,7 @@ namespace Sunny.UI } else { - e.Graphics.DrawString(Text, Font, titleForeColor,6 + (Icon == null ? 0 : 26), (TitleHeight - sf.Height) / 2); + e.Graphics.DrawString(Text, Font, titleForeColor,6 + (ShowIcon && Icon != null ? 26 : 0), (TitleHeight - sf.Height) / 2); } } diff --git a/SunnyUI/Forms/UIStatusForm.Designer.cs b/SunnyUI/Forms/UIStatusForm.Designer.cs index e964337e..8d5c03fa 100644 --- a/SunnyUI/Forms/UIStatusForm.Designer.cs +++ b/SunnyUI/Forms/UIStatusForm.Designer.cs @@ -58,7 +58,6 @@ // // UIStatusForm // - this.AutoScaleDimensions = new System.Drawing.SizeF(10F, 21F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.ClientSize = new System.Drawing.Size(473, 153); this.ControlBox = false; @@ -68,6 +67,7 @@ this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "UIStatusForm"; + this.ShowIcon = false; this.Text = "进度"; this.TopMost = true; this.ResumeLayout(false); diff --git a/SunnyUI/Forms/UIStatusForm.resx b/SunnyUI/Forms/UIStatusForm.resx new file mode 100644 index 00000000..1af7de15 --- /dev/null +++ b/SunnyUI/Forms/UIStatusForm.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/SunnyUI/SunnyUI.csproj b/SunnyUI/SunnyUI.csproj index f831ac8f..d7253ea8 100644 --- a/SunnyUI/SunnyUI.csproj +++ b/SunnyUI/SunnyUI.csproj @@ -477,12 +477,18 @@ UIDateTimeItem.cs + + UIEditForm.cs + UINotifier.cs UIFontImages.cs + + UIStatusForm.cs + ResXFileCodeGenerator Resources.Designer.cs