效果预览:
使用软件:dnSpyEx(https://github.com/dnSpyEx/dnSpy ... py-netframework.zip)
修改dll:UBFStudio\Runtime\UFSoft.UBF.Report.Designer.Controls.dll
修改步骤:
0.将下列dll拖入dnspy
Runtime\UFSoft.UBF.Report.Designer.Controls.dll
Runtime\UFSoft.UBF.Report.Base.dll
Runtime\UFSoft.UBF.Report.Entity.dll
Runtime\UFSoft.UBF.Report.Designer.Propertys.dll
Runtime\UFSoft.UBF.Report.Designer.dll
Runtime\UFSoft.UBF.Report.Filter.FilterModel.dll
Runtime\UFSoft.UBF.Report.Designer.CommDialog.dll
1.找到相关类并点击编辑类UFSoft.UBF.Report.Designer.Controls.ControlSizeButton
2.找到方法public ControlSizeButton()并添加代码
[color=]base
[color=].
[color=]KeyDown
[color=]
[color=]+=
[color=]
[color=]this
[color=].
[color=]ControlSizeButton_KeyDown
[color=];
3.添加方法ControlSizeButton_KeyDown
private void ControlSizeButton_KeyDown(object sender, KeyEventArgs e)
{
bool control = e.Control;
Keys keyCode = e.KeyCode;
// 按住 Ctrl 键时移动 10 像素,否则移动 1 像素
int moveAmount = control ? 10 : 1;
int x = 0;
int y = 0;
switch (keyCode)
{
case Keys.W:
y -= moveAmount;
break;
case Keys.A:
x -= moveAmount;
break;
case Keys.S:
y += moveAmount;
break;
case Keys.D:
x += moveAmount;
break;
}
if (x != 0 || y != 0)
{
ControlSizeButtonEventArgs controlSizeButtonEventArgs = new ControlSizeButtonEventArgs(x, y);
this.On_ControlMoving(x, y);
this.On_ControlMoved(x, y);
}
e.Handled = true;
}
4.找到方法private void ControlSizeButton_MouseDown(object sender, MouseEventArgs e)并添加
[color=]base
[color=].
[color=]Focus
[color=]();
添加完成后点击编译
5.点击:文件-全部保存-确定
6.修改已完成,打开软件进行验证