代码清理
This commit is contained in:
@ -1,18 +1,9 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using AntdUI;
|
||||
|
||||
namespace DHSoftware.Utils
|
||||
namespace DHSoftware.Utils
|
||||
{
|
||||
public static class AdaptiveHelper
|
||||
{
|
||||
#region 控件大小随窗体大小等比例缩放
|
||||
|
||||
|
||||
|
||||
public static void setTag(Control cons)
|
||||
{
|
||||
foreach (Control con in cons.Controls)
|
||||
@ -35,15 +26,13 @@ namespace DHSoftware.Utils
|
||||
con.Height = Convert.ToInt32(Convert.ToSingle(mytag[1]) * newy); //高度
|
||||
con.Left = Convert.ToInt32(Convert.ToSingle(mytag[2]) * newx); //左边距
|
||||
con.Top = Convert.ToInt32(Convert.ToSingle(mytag[3]) * newy); //顶边距
|
||||
var currentSize = Convert.ToSingle(mytag[4]) * newy; //字体大小
|
||||
var currentSize = Convert.ToSingle(mytag[4]) * newy; //字体大小
|
||||
if (currentSize > 0) con.Font = new Font(con.Font.Name, currentSize, con.Font.Style, con.Font.Unit);
|
||||
con.Focus();
|
||||
if (con.Controls.Count > 0) setControls(newx, newy, con);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endregion
|
||||
#endregion 控件大小随窗体大小等比例缩放
|
||||
}
|
||||
}
|
||||
}
|
@ -1,9 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using DHSoftware.Models;
|
||||
using DHSoftware.Models;
|
||||
using SqlSugar;
|
||||
|
||||
namespace DHSoftware.Utils
|
||||
@ -153,4 +148,4 @@ namespace DHSoftware.Utils
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,9 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Security.Cryptography;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DHSoftware.Utils
|
||||
{
|
||||
@ -20,4 +16,4 @@ namespace DHSoftware.Utils
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,5 +1,4 @@
|
||||
using Microsoft.Win32;
|
||||
using System.Drawing;
|
||||
|
||||
namespace DHSoftware.Utils
|
||||
{
|
||||
@ -45,4 +44,4 @@ namespace DHSoftware.Utils
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user