修复FloatButton,FlowPanel,StackPanel属性改变失效问题
This commit is contained in:
parent
69aee5738a
commit
9a71f4bcbe
@ -1,15 +0,0 @@
|
|||||||
using Newtonsoft.Json.Linq;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.IO;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace AntdUIDemo.Utils
|
|
||||||
{
|
|
||||||
public class ConfigurationHelper
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -163,18 +163,21 @@ namespace AntdUIDemo.Views
|
|||||||
if (InvokeRequired)
|
if (InvokeRequired)
|
||||||
{
|
{
|
||||||
Invoke(new Action(CloseFloatButtonForm));
|
Invoke(new Action(CloseFloatButtonForm));
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
if (floatButtonForm != null)
|
|
||||||
{
|
{
|
||||||
floatButtonForm.Close();
|
// Ensure that floatButtonForm is not null before attempting to close it
|
||||||
floatButtonForm.Dispose();
|
if (floatButtonForm != null)
|
||||||
floatButtonForm = null;
|
{
|
||||||
|
floatButtonForm.Close();
|
||||||
|
floatButtonForm.Dispose();
|
||||||
|
floatButtonForm = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#region EventHandler
|
#region EventHandler
|
||||||
private void select_intvalue_SelectedIndexChanged(object sender, IntEventArgs e)
|
private void select_intvalue_SelectedIndexChanged(object sender, IntEventArgs e)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -75,7 +75,14 @@ namespace AntdUIDemo.Views
|
|||||||
|
|
||||||
private void switch_autoscroll_CheckedChanged(object sender, BoolEventArgs e)
|
private void switch_autoscroll_CheckedChanged(object sender, BoolEventArgs e)
|
||||||
{
|
{
|
||||||
flowPanel.AutoScroll = switch_autoscroll.Checked;
|
if (flowPanel.InvokeRequired)
|
||||||
|
{
|
||||||
|
flowPanel.Invoke(new Action(() => { flowPanel.AutoScroll = switch_autoscroll.Checked; }));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
flowPanel.AutoScroll = switch_autoscroll.Checked;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 初始化下拉框
|
// 初始化下拉框
|
||||||
@ -95,6 +102,10 @@ namespace AntdUIDemo.Views
|
|||||||
{
|
{
|
||||||
flowPanel.Invoke(new Action(() => { flowPanel.Align = (TAlignFlow)select_align.SelectedValue; }));
|
flowPanel.Invoke(new Action(() => { flowPanel.Align = (TAlignFlow)select_align.SelectedValue; }));
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
flowPanel.Align = (TAlignFlow)select_align.SelectedValue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void input_gap_ValueChanged(object sender, DecimalEventArgs e)
|
private void input_gap_ValueChanged(object sender, DecimalEventArgs e)
|
||||||
@ -103,6 +114,10 @@ namespace AntdUIDemo.Views
|
|||||||
{
|
{
|
||||||
flowPanel.Invoke(new Action(() => { flowPanel.Gap = (int)input_gap.Value; }));
|
flowPanel.Invoke(new Action(() => { flowPanel.Gap = (int)input_gap.Value; }));
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
flowPanel.Gap = (int)input_gap.Value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// 添加按钮
|
// 添加按钮
|
||||||
private void buttonADD_Click(object sender, EventArgs e)
|
private void buttonADD_Click(object sender, EventArgs e)
|
||||||
|
|||||||
@ -54,6 +54,8 @@ namespace AntdUIDemo.Views
|
|||||||
AntdUI.Modal.open(new AntdUI.Modal.Config(window, "Basic Modal", "Some contents...\r\nSome contents...\r\nSome contents...")
|
AntdUI.Modal.open(new AntdUI.Modal.Config(window, "Basic Modal", "Some contents...\r\nSome contents...\r\nSome contents...")
|
||||||
{
|
{
|
||||||
CloseIcon = true,
|
CloseIcon = true,
|
||||||
|
Keyboard = false,
|
||||||
|
MaskClosable = false,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -61,6 +63,8 @@ namespace AntdUIDemo.Views
|
|||||||
{
|
{
|
||||||
AntdUI.Modal.open(new AntdUI.Modal.Config(window, "Basic Modal", "Some contents...\r\nSome contents...\r\nSome contents...")
|
AntdUI.Modal.open(new AntdUI.Modal.Config(window, "Basic Modal", "Some contents...\r\nSome contents...\r\nSome contents...")
|
||||||
{
|
{
|
||||||
|
//禁止使用键盘关闭
|
||||||
|
Keyboard = false,
|
||||||
MaskClosable = false,
|
MaskClosable = false,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -89,6 +89,10 @@ namespace AntdUIDemo.Views
|
|||||||
stackPanel.ItemSize = input_itemsize.Text;
|
stackPanel.ItemSize = input_itemsize.Text;
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
stackPanel.ItemSize = input_itemsize.Text;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void input_gap_ValueChanged(object sender, DecimalEventArgs e)
|
private void input_gap_ValueChanged(object sender, DecimalEventArgs e)
|
||||||
@ -100,6 +104,10 @@ namespace AntdUIDemo.Views
|
|||||||
stackPanel.Gap = (int)input_gap.Value;
|
stackPanel.Gap = (int)input_gap.Value;
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
stackPanel.Gap = (int)input_gap.Value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ButtonDEL_Click(object sender, EventArgs e)
|
private void ButtonDEL_Click(object sender, EventArgs e)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user