大量细节修改优化,新组件的BUG修复,完成测试winform,wpf,asp net mvc
This commit is contained in:
@@ -25,13 +25,14 @@ namespace 软件系统客户端模版.UIControls
|
||||
|
||||
private void userButton_upload_Click(object sender, EventArgs e)
|
||||
{
|
||||
//上传数据,先对权限进行验证
|
||||
//上传数据
|
||||
if(UserClient.UserAccount.Grade<AccountGrade.Technology)
|
||||
{
|
||||
MessageBox.Show("权限不够!");
|
||||
return;
|
||||
}
|
||||
|
||||
// 上传文件
|
||||
using (FormSimplyFileUpload upload = new FormSimplyFileUpload(
|
||||
CommonHeadCode.KeyToken,
|
||||
UserClient.LogNet,
|
||||
@@ -65,7 +66,7 @@ namespace 软件系统客户端模版.UIControls
|
||||
ClearControls();
|
||||
if (files?.Count > 0 && panel2.Width > 20)
|
||||
{
|
||||
int location_y = 2;
|
||||
int location_y = 2 - panel2.VerticalScroll.Value;
|
||||
//添加子控件
|
||||
foreach(var m in files)
|
||||
{
|
||||
@@ -85,17 +86,17 @@ namespace 软件系统客户端模版.UIControls
|
||||
return MessageBox.Show("请确认是否真的删除?", "删除确认", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes;
|
||||
}
|
||||
});
|
||||
panel2.Controls.Add(item);
|
||||
item.BackColor = Color.White;
|
||||
item.BorderStyle = BorderStyle.FixedSingle;
|
||||
item.SetFile(m, () => m.UploadName == UserClient.UserAccount.UserName);
|
||||
item.Location = new Point(2, location_y);
|
||||
int width = panel2.VerticalScroll.Visible ? panel2.Width - 4 - SystemInformation.VerticalScrollBarWidth : panel2.Width - 4;
|
||||
item.Size = new Size(width, item.Size.Height);
|
||||
item.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
|
||||
panel2.Controls.Add(item); // 添加显示
|
||||
item.BackColor = Color.White; // 白色的背景
|
||||
item.BorderStyle = BorderStyle.FixedSingle; // 边框样式
|
||||
item.SetFile(m, () => m.UploadName == UserClient.UserAccount.UserName); // 设置文件显示并提供一个删除使能的权限,此处设置是登录名和上传人不一致时,删除键不能点击
|
||||
item.Location = new Point(2, location_y); // 控件的位置
|
||||
int width = panel2.VerticalScroll.Visible ? panel2.Width - 4 - SystemInformation.VerticalScrollBarWidth : panel2.Width - 4; // 控件的宽度
|
||||
item.Size = new Size(width, item.Size.Height); // 控件的大小
|
||||
item.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;// 控件随窗口变化的样式
|
||||
|
||||
location_y += item.Height + 4;
|
||||
FilesControls.Push(item);
|
||||
location_y += item.Height + 4; // 位置偏移
|
||||
FilesControls.Push(item);// 控件压入堆栈
|
||||
}
|
||||
}
|
||||
|
||||
@@ -127,12 +128,12 @@ namespace 软件系统客户端模版.UIControls
|
||||
|
||||
private void ShareFilesRender_Load(object sender, EventArgs e)
|
||||
{
|
||||
//选择是否禁用上传键
|
||||
// 选择是否禁用上传键
|
||||
}
|
||||
|
||||
private void textBox1_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
//搜索时触发的数据
|
||||
// 搜索时触发的数据
|
||||
if(!string.IsNullOrEmpty(textBox1.Text))
|
||||
{
|
||||
string pattern = textBox1.Text;
|
||||
@@ -146,5 +147,7 @@ namespace 软件系统客户端模版.UIControls
|
||||
SetFilesShow(Cache_Files);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user