1微信店铺切换登录 20% 2过滤筛选备注改为全等于 3数据库数据拉回逻辑优化

This commit is contained in:
wule committed 2026-03-13 16:21:15 +08:00
1 parent dc83334c59
commit 860b4408ef
37 files changed
+2520 -274

No files matched your search

+12 -2
View File
@@ -101,16 +101,26 @@ namespace TemuKJD.UserComponent
for (int index = 0; index < checkedListBox.Items.Count; index++)
{
var item = checkedListBox.Items[index];
if (this.Text == "全部" || this.Text.Split(new string[] { ";", ",", ",", " " }, StringSplitOptions.RemoveEmptyEntries).Contains(item.ParseToString()))
if (this.Text == "全部" || this.Text.Split(new string[] { ";", ";", ",", "," }, StringSplitOptions.RemoveEmptyEntries).Contains(item.ParseToString()))
checkedListBox.SetItemChecked(index, true);
else
checkedListBox.SetItemChecked(index, false);
}
// 计算宽度
int maxItemWidth = 0;
for (int index = 0; index < checkedListBox.Items.Count; index++)
{
var wth = TextRenderer.MeasureText(checkedListBox.Items[index].ToString(), checkedListBox.Font).Width + 20;
if (wth > maxItemWidth)
maxItemWidth = wth;
}
checkedListBox.SendToBack();
checkedListBox.Visible = true;
// 确定弹出列表框的大小和位置
checkedListBox.Size = new Size(Math.Max(80, this.Width), Math.Min(300, checkedListBox.PreferredHeight));
//checkedListBox.Size = new Size(Math.Max(80, this.Width), Math.Min(300, checkedListBox.PreferredHeight));
checkedListBox.Size = new Size(Math.Max(this.Width, maxItemWidth), Math.Min(300, checkedListBox.PreferredHeight));
Point relativeLocation = this.GetRelativePosition();
if (parentForm.Height - relativeLocation.Y >= this.Height + checkedListBox.Size.Height + 20)
relativeLocation = new Point(relativeLocation.X, relativeLocation.Y + this.Height);