* 删除一些过时的方法
This commit is contained in:
parent
b5c019362c
commit
f2334b65c8
@ -657,72 +657,6 @@ namespace Sunny.UI
|
|||||||
return dr;
|
return dr;
|
||||||
}
|
}
|
||||||
|
|
||||||
[Obsolete("已弃用,直接调用Form的ShowDialogWithMask扩展方法")]
|
|
||||||
public static Form ShowFullMask(this Form form)
|
|
||||||
{
|
|
||||||
Point pt = SystemEx.GetCursorPos();
|
|
||||||
Rectangle screen = Screen.GetBounds(pt);
|
|
||||||
|
|
||||||
Form mask = new Form();
|
|
||||||
mask.FormBorderStyle = FormBorderStyle.None;
|
|
||||||
mask.BackColor = Color.FromArgb(0, 0, 0);
|
|
||||||
mask.Opacity = 0.5;
|
|
||||||
mask.ShowInTaskbar = false;
|
|
||||||
mask.StartPosition = FormStartPosition.Manual;
|
|
||||||
mask.Bounds = screen;
|
|
||||||
mask.TopMost = true;
|
|
||||||
mask.Show();
|
|
||||||
return mask;
|
|
||||||
}
|
|
||||||
|
|
||||||
[Obsolete("已弃用,直接调用Form的ShowDialogWithMask扩展方法")]
|
|
||||||
public static Form ShowControlMask(this Control control)
|
|
||||||
{
|
|
||||||
bool topmost = false;
|
|
||||||
Form baseForm = control.RootForm();
|
|
||||||
if (baseForm != null)
|
|
||||||
{
|
|
||||||
topmost = baseForm.TopMost;
|
|
||||||
baseForm.TopMost = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
Form mask = new Form();
|
|
||||||
mask.FormBorderStyle = FormBorderStyle.None;
|
|
||||||
mask.BackColor = Color.FromArgb(0, 0, 0);
|
|
||||||
mask.Opacity = 0.5;
|
|
||||||
mask.ShowInTaskbar = false;
|
|
||||||
mask.StartPosition = FormStartPosition.Manual;
|
|
||||||
mask.Bounds = control.Bounds;
|
|
||||||
mask.Tag = baseForm;
|
|
||||||
mask.Text = topmost.ToString();
|
|
||||||
|
|
||||||
var pt = control.ScreenLocation();
|
|
||||||
mask.Left = pt.X;
|
|
||||||
mask.Top = pt.Y;
|
|
||||||
mask.Show();
|
|
||||||
mask.TopMost = true;
|
|
||||||
return mask;
|
|
||||||
}
|
|
||||||
|
|
||||||
[Obsolete("已弃用,直接调用Form的ShowDialogWithMask扩展方法")]
|
|
||||||
public static void EndShow(this Form maskForm)
|
|
||||||
{
|
|
||||||
if (maskForm.Tag is Form form)
|
|
||||||
{
|
|
||||||
form.TopMost = maskForm.Text.ToBoolean();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[Obsolete("已弃用,直接调用Form的ShowDialogWithMask扩展方法")]
|
|
||||||
public static void ShowInMask(this Form frm, Form maskForm)
|
|
||||||
{
|
|
||||||
frm.StartPosition = FormStartPosition.Manual;
|
|
||||||
frm.Left = maskForm.Left + (maskForm.Width - frm.Width) / 2;
|
|
||||||
frm.Top = maskForm.Top + (maskForm.Height - frm.Height) / 2;
|
|
||||||
frm.ShowInTaskbar = false;
|
|
||||||
frm.TopMost = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static UIEditForm CreateForm(this UIEditOption option)
|
public static UIEditForm CreateForm(this UIEditOption option)
|
||||||
{
|
{
|
||||||
return new UIEditForm(option);
|
return new UIEditForm(option);
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
* 2020-05-05: V2.2.5 增加文件
|
* 2020-05-05: V2.2.5 增加文件
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
|
|
||||||
namespace Sunny.UI
|
namespace Sunny.UI
|
||||||
@ -106,14 +105,6 @@ namespace Sunny.UI
|
|||||||
set => processBar.DecimalPlaces = value;
|
set => processBar.DecimalPlaces = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
[Obsolete("请用DecimalPlaces代替。")]
|
|
||||||
public int DecimalCount
|
|
||||||
{
|
|
||||||
get => processBar.DecimalPlaces;
|
|
||||||
set => processBar.DecimalPlaces = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
private delegate void SetTextHandler(string text);
|
private delegate void SetTextHandler(string text);
|
||||||
|
|
||||||
public void SetDescription(string text)
|
public void SetDescription(string text)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user