diff --git a/Bin/net40/SunnyUI.Demo.exe b/Bin/net40/SunnyUI.Demo.exe index f597bc82..8bc89917 100644 Binary files a/Bin/net40/SunnyUI.Demo.exe and b/Bin/net40/SunnyUI.Demo.exe differ diff --git a/Bin/net40/SunnyUI.dll b/Bin/net40/SunnyUI.dll index f04027e7..6be2885d 100644 Binary files a/Bin/net40/SunnyUI.dll and b/Bin/net40/SunnyUI.dll differ diff --git a/Bin/net5.0-windows/SunnyUI.dll b/Bin/net5.0-windows/SunnyUI.dll index fe4b0ed5..65710a12 100644 Binary files a/Bin/net5.0-windows/SunnyUI.dll and b/Bin/net5.0-windows/SunnyUI.dll differ diff --git a/Bin/netcoreapp3.1/SunnyUI.dll b/Bin/netcoreapp3.1/SunnyUI.dll index 255d8c54..539fea5f 100644 Binary files a/Bin/netcoreapp3.1/SunnyUI.dll and b/Bin/netcoreapp3.1/SunnyUI.dll differ diff --git a/SunnyUI.Demo/Forms/FEditor.cs b/SunnyUI.Demo/Forms/FEditor.cs index 5d537a74..d686f2a7 100644 --- a/SunnyUI.Demo/Forms/FEditor.cs +++ b/SunnyUI.Demo/Forms/FEditor.cs @@ -57,7 +57,7 @@ namespace Sunny.UI.Demo.Forms UIEditOption option = new UIEditOption(); option.AutoLabelWidth = true; option.Text = "增加"; - option.AddText("Name", "姓名", "", true); + option.AddText("Name", "姓名", null, true); option.AddInteger("Age", "年龄", 16); option.AddDate("Birthday", "生日", DateTime.Now); option.AddCombobox("Sex", "性别", sex, 1, true, true); diff --git a/SunnyUI/Forms/UIEditForm.cs b/SunnyUI/Forms/UIEditForm.cs index 83d1de10..8507973e 100644 --- a/SunnyUI/Forms/UIEditForm.cs +++ b/SunnyUI/Forms/UIEditForm.cs @@ -86,7 +86,7 @@ namespace Sunny.UI edit.Left = option.LabelWidth; edit.Width = option.ValueWidth; edit.Top = top; - edit.Text = info.Value.ToString(); + edit.Text = info.Value?.ToString(); edit.Parent = this; edit.Name = "Edit_" + info.DataPropertyName; edit.EnterAsTab = true; @@ -100,7 +100,7 @@ namespace Sunny.UI edit.Left = option.LabelWidth; edit.Width = option.ValueWidth; edit.Top = top; - edit.Text = info.Value.ToString(); + edit.Text = info.Value?.ToString(); edit.Parent = this; edit.PasswordChar = '*'; edit.Name = "Edit_" + info.DataPropertyName;