* 解决弹窗报错

This commit is contained in:
Sunny 2024-08-07 11:31:00 +08:00
parent 1317d552b5
commit c64bdddaf8
2 changed files with 4 additions and 4 deletions

View File

@ -1363,12 +1363,12 @@ namespace Sunny.UI
if (e.Node.IsExpanded) if (e.Node.IsExpanded)
{ {
e.Graphics.DrawFontImage(61703, 24, fcf, e.Graphics.DrawFontImage(61703, 24, fcf,
new RectangleF(lineX - 12, lineY - 12, 24, 24), -1, 1); new RectangleF(lineX - 12, lineY - 12, 24, 24), 1, 1);
} }
else else
{ {
e.Graphics.DrawFontImage(61701, 24, fcf, e.Graphics.DrawFontImage(61701, 24, fcf,
new RectangleF(lineX - 12, lineY - 12, 24, 24), -2, 1); new RectangleF(lineX - 12, lineY - 12, 24, 24), 0, 1);
} }
} }
} }

View File

@ -164,7 +164,7 @@ namespace Sunny.UI
//frm.StartPosition = FormStartPosition.CenterScreen; //frm.StartPosition = FormStartPosition.CenterScreen;
frm.StartPosition = FormStartPosition.Manual; frm.StartPosition = FormStartPosition.Manual;
if (!centerParent || showMask) if (!centerParent || showMask || form == null)
{ {
frm.Left = screen.Left + screen.Width / 2 - frm.Width / 2; frm.Left = screen.Left + screen.Width / 2 - frm.Width / 2;
frm.Top = screen.Top + screen.Height / 2 - frm.Height / 2; frm.Top = screen.Top + screen.Height / 2 - frm.Height / 2;
@ -206,7 +206,7 @@ namespace Sunny.UI
using UIMessageForm2 frm = new UIMessageForm2(title, message, noteType, defaultButton); using UIMessageForm2 frm = new UIMessageForm2(title, message, noteType, defaultButton);
if (frm != null) frm.Owner = form; if (frm != null) frm.Owner = form;
frm.StartPosition = FormStartPosition.Manual; frm.StartPosition = FormStartPosition.Manual;
if (!centerParent || showMask) if (!centerParent || showMask || form == null)
{ {
frm.Left = screen.Left + screen.Width / 2 - frm.Width / 2; frm.Left = screen.Left + screen.Width / 2 - frm.Width / 2;
frm.Top = screen.Top + screen.Height / 2 - frm.Height / 2; frm.Top = screen.Top + screen.Height / 2 - frm.Height / 2;