1拼多多皮肤 2打包编译脚本优化 3.头部选中所有的DataGridView列控件

This commit is contained in:
wule committed 2026-05-08 18:05:54 +08:00
1 parent 05553a3ba3
commit f04c74fa32
34 files changed
+1710 -1135

No files matched your search

+42 -29
View File
@@ -29,8 +29,8 @@
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
this.label1 = new System.Windows.Forms.Label();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
@@ -39,6 +39,7 @@
this.btnLoginSelect = new TemuKJD.UserControls.ButtonEx();
this.btnCheck = new TemuKJD.UserControls.ButtonEx();
this.panel4 = new System.Windows.Forms.Panel();
this.label5 = new System.Windows.Forms.Label();
this.btnImport = new DevComponents.DotNetBar.PanelEx();
this.btnAddShop = new DevComponents.DotNetBar.PanelEx();
this.btnOpenOrder = new TemuKJD.UserControls.ButtonEx();
@@ -127,7 +128,7 @@
this.splitContainer1.Panel2.Controls.Add(this.splitContainer2);
this.splitContainer1.Panel2.Margin = new System.Windows.Forms.Padding(4);
this.splitContainer1.Size = new System.Drawing.Size(1264, 622);
this.splitContainer1.SplitterDistance = 46;
this.splitContainer1.SplitterDistance = 66;
this.splitContainer1.TabIndex = 33;
//
// tableLayoutPanel2
@@ -142,7 +143,7 @@
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
this.tableLayoutPanel2.RowCount = 1;
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel2.Size = new System.Drawing.Size(1264, 46);
this.tableLayoutPanel2.Size = new System.Drawing.Size(1264, 66);
this.tableLayoutPanel2.TabIndex = 37;
//
// panel5
@@ -205,6 +206,7 @@
//
// panel4
//
this.panel4.Controls.Add(this.label5);
this.panel4.Controls.Add(this.btnImport);
this.panel4.Controls.Add(this.btnAddShop);
this.panel4.Controls.Add(this.btnOpenOrder);
@@ -220,9 +222,19 @@
this.panel4.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel4.Location = new System.Drawing.Point(3, 3);
this.panel4.Name = "panel4";
this.panel4.Size = new System.Drawing.Size(1035, 40);
this.panel4.Size = new System.Drawing.Size(1035, 60);
this.panel4.TabIndex = 0;
//
// label5
//
this.label5.AutoSize = true;
this.label5.ForeColor = System.Drawing.Color.OrangeRed;
this.label5.Location = new System.Drawing.Point(1, 42);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(596, 17);
this.label5.TabIndex = 822;
this.label5.Text = "注:订单授权到期后无法读取订单、自动发货、读取售后;上传授权到期后无法进行发布商品和上下架等操作。";
//
// btnImport
//
this.btnImport.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
@@ -410,8 +422,8 @@
//
this.splitContainer2.Panel2.Controls.Add(this.chkAutoDrag);
this.splitContainer2.Panel2.Controls.Add(this.statusBar);
this.splitContainer2.Size = new System.Drawing.Size(1264, 572);
this.splitContainer2.SplitterDistance = 540;
this.splitContainer2.Size = new System.Drawing.Size(1264, 552);
this.splitContainer2.SplitterDistance = 520;
this.splitContainer2.TabIndex = 0;
//
// btnRefreshAuth
@@ -435,7 +447,7 @@
//
this.pbLoading.Anchor = System.Windows.Forms.AnchorStyles.None;
this.pbLoading.Image = global::TemuKJD.Properties.Resources.loading_blue;
this.pbLoading.Location = new System.Drawing.Point(607, 245);
this.pbLoading.Location = new System.Drawing.Point(607, 235);
this.pbLoading.Name = "pbLoading";
this.pbLoading.Size = new System.Drawing.Size(50, 50);
this.pbLoading.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
@@ -446,20 +458,20 @@
//
this.dgvShop.AllowUserToAddRows = false;
this.dgvShop.AllowUserToDeleteRows = false;
dataGridViewCellStyle3.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle3;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
this.dgvShop.AutoRowNumber = true;
this.dgvShop.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
this.dgvShop.BackgroundColor = System.Drawing.Color.White;
this.dgvShop.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
this.dgvShop.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvShop.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colSelect,
@@ -496,7 +508,7 @@
this.dgvShop.Name = "dgvShop";
this.dgvShop.ReadOnly = true;
this.dgvShop.RowTemplate.Height = 23;
this.dgvShop.Size = new System.Drawing.Size(1256, 540);
this.dgvShop.Size = new System.Drawing.Size(1256, 520);
this.dgvShop.TabIndex = 5;
this.dgvShop.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvShop_CellContentClick);
//
@@ -558,7 +570,7 @@
//
// colGroupName
//
this.colGroupName.FillWeight = 69.42599F;
this.colGroupName.FillWeight = 69F;
this.colGroupName.HeaderText = "店铺分组";
this.colGroupName.Name = "colGroupName";
this.colGroupName.ReadOnly = true;
@@ -566,7 +578,7 @@
//
// colUploadAccount
//
this.colUploadAccount.FillWeight = 69.42599F;
this.colUploadAccount.FillWeight = 69F;
this.colUploadAccount.HeaderText = "上货账户";
this.colUploadAccount.Name = "colUploadAccount";
this.colUploadAccount.ReadOnly = true;
@@ -574,7 +586,7 @@
//
// colBuyAccount
//
this.colBuyAccount.FillWeight = 69.42599F;
this.colBuyAccount.FillWeight = 69F;
this.colBuyAccount.HeaderText = "采购账户";
this.colBuyAccount.Name = "colBuyAccount";
this.colBuyAccount.ReadOnly = true;
@@ -582,7 +594,7 @@
//
// colChatAccount
//
this.colChatAccount.FillWeight = 69.42599F;
this.colChatAccount.FillWeight = 69F;
this.colChatAccount.HeaderText = "客服账户";
this.colChatAccount.Name = "colChatAccount";
this.colChatAccount.ReadOnly = true;
@@ -604,7 +616,7 @@
//
// colBindApi
//
this.colBindApi.FillWeight = 48F;
this.colBindApi.FillWeight = 68F;
this.colBindApi.HeaderText = "上传授权";
this.colBindApi.Name = "colBindApi";
this.colBindApi.ReadOnly = true;
@@ -622,7 +634,7 @@
//
// colBindOrderApi
//
this.colBindOrderApi.FillWeight = 48F;
this.colBindOrderApi.FillWeight = 68F;
this.colBindOrderApi.HeaderText = "订单授权";
this.colBindOrderApi.Name = "colBindOrderApi";
this.colBindOrderApi.ReadOnly = true;
@@ -695,7 +707,7 @@
//
// colUpdateCookies
//
this.colUpdateCookies.FillWeight = 67F;
this.colUpdateCookies.FillWeight = 55F;
this.colUpdateCookies.HeaderText = "获取Cookie";
this.colUpdateCookies.Name = "colUpdateCookies";
this.colUpdateCookies.ReadOnly = true;
@@ -704,7 +716,7 @@
//
// colCopyCookies
//
this.colCopyCookies.FillWeight = 70F;
this.colCopyCookies.FillWeight = 55F;
this.colCopyCookies.HeaderText = "复制Cookie";
this.colCopyCookies.Name = "colCopyCookies";
this.colCopyCookies.ReadOnly = true;
@@ -812,6 +824,8 @@
private System.Windows.Forms.ComboBox cmbNotes;
private UserComponent.UcCheckBox chkUsePddWorkbanch;
public UserControls.ButtonEx btnOpenOrder;
private DevComponents.DotNetBar.PanelEx btnAddShop;
private DevComponents.DotNetBar.PanelEx btnImport;
private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect;
private System.Windows.Forms.DataGridViewTextBoxColumn colLoginName;
private System.Windows.Forms.DataGridViewTextBoxColumn colMallId;
@@ -840,7 +854,6 @@
private System.Windows.Forms.DataGridViewLinkColumn colCopyCookies;
private System.Windows.Forms.DataGridViewLinkColumn colEdit;
private System.Windows.Forms.DataGridViewLinkColumn colDelete;
private DevComponents.DotNetBar.PanelEx btnAddShop;
private DevComponents.DotNetBar.PanelEx btnImport;
private System.Windows.Forms.Label label5;
}
}
+23 -2
View File
@@ -484,7 +484,7 @@ namespace TemuKJD.PDDForms.ShopForms
param.ChatAccount,
"",
"购买授权",
"绑定授权",
"绑定授权" + (param.AuthExpiresTime < DateTime.Now ? " (已过期)" : param.AuthExpiresTime.ToString(" MM-dd")),
"购买授权",
"绑定授权",
"进入",
@@ -504,6 +504,7 @@ namespace TemuKJD.PDDForms.ShopForms
dgvShop.CurrentCell = this.dgvShop.Rows[rowIndex].Cells[2];
}
}
displayShopStatus(param);
}));
}
@@ -521,8 +522,28 @@ namespace TemuKJD.PDDForms.ShopForms
dgvr.Cells["colGroupName"].Value = param.GroupName;
dgvr.Cells["colUploadAccount"].Value = param.UploadAccount;
dgvr.Cells["colBuyAccount"].Value = param.BuyAccount;
dgvr.Cells["colChatAccount"].Value = param.ChatAccount;
dgvr.Cells["colChatAccount"].Value = param.ChatAccount;
dgvr.Cells["colRelogin"].Value = string.IsNullOrWhiteSpace(param.LoginStatus) ? "未登录" : param.LoginStatus.Trim();
dgvr.Cells["colBindApi"].Value = "绑定授权" + (param.AuthExpiresTime < DateTime.Now ? " (已过期)" : param.AuthExpiresTime.ToString(" MM-dd"));
}
void displayShopStatus(ShopLoginInfo shop)
{
bool canUse = shop.LoginStatus == "登录成功";
bool apiAuth = shop.AuthExpiresTime > DateTime.Now;
var rows = this.dgvShop.Rows.Cast<DataGridViewRow>().Where(r => r.Cells["colShopId"].Value.ParseToString() == shop?.ShopId);
foreach (var row in rows)
{
(row.Cells["colRelogin"] as DataGridViewLinkCell).Style.ForeColor = canUse ? Color.Blue : Color.Red;
(row.Cells["colRelogin"] as DataGridViewLinkCell).LinkColor = canUse ? Color.Blue : Color.Red;
(row.Cells["colRelogin"] as DataGridViewLinkCell).ActiveLinkColor = canUse ? Color.LightBlue : Color.OrangeRed;
(row.Cells["colRelogin"] as DataGridViewLinkCell).VisitedLinkColor = canUse ? Color.DarkBlue : Color.DarkRed;
(row.Cells["colBindApi"] as DataGridViewLinkCell).Style.ForeColor = apiAuth ? Color.Blue : Color.Red;
(row.Cells["colBindApi"] as DataGridViewLinkCell).LinkColor = apiAuth ? Color.Blue : Color.Red;
(row.Cells["colBindApi"] as DataGridViewLinkCell).ActiveLinkColor = apiAuth ? Color.LightBlue : Color.OrangeRed;
(row.Cells["colBindApi"] as DataGridViewLinkCell).VisitedLinkColor = apiAuth ? Color.DarkBlue : Color.DarkRed;
}
}
/// <summary>
+23 -30
View File
@@ -28,9 +28,8 @@
/// </summary>
private void InitializeComponent()
{
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
this.splitContainer5 = new System.Windows.Forms.SplitContainer();
this.label1 = new System.Windows.Forms.Label();
this.btnRefresh = new TemuKJD.UserControls.ButtonEx();
@@ -185,10 +184,10 @@
this.label31.TabIndex = 32;
this.label31.Text = "*";
//
// repasstextBox
// txtRePass
//
this.txtRePass.Location = new System.Drawing.Point(112, 226);
this.txtRePass.Name = "repasstextBox";
this.txtRePass.Name = "txtRePass";
this.txtRePass.PasswordChar = '*';
this.txtRePass.Size = new System.Drawing.Size(148, 23);
this.txtRePass.TabIndex = 24;
@@ -243,7 +242,7 @@
this.label36.TabIndex = 27;
this.label36.Text = "*";
//
// groupIdcomboBox
// cmbGroup
//
this.cmbGroup.Enabled = false;
this.cmbGroup.FormattingEnabled = true;
@@ -254,7 +253,7 @@
"数据",
"登录"});
this.cmbGroup.Location = new System.Drawing.Point(112, 267);
this.cmbGroup.Name = "groupIdcomboBox";
this.cmbGroup.Name = "cmbGroup";
this.cmbGroup.Size = new System.Drawing.Size(148, 25);
this.cmbGroup.TabIndex = 26;
this.cmbGroup.Text = "客服";
@@ -269,10 +268,10 @@
this.label37.TabIndex = 25;
this.label37.Text = "分组:";
//
// passwordtextBox
// txtPassword
//
this.txtPassword.Location = new System.Drawing.Point(112, 184);
this.txtPassword.Name = "passwordtextBox";
this.txtPassword.Name = "txtPassword";
this.txtPassword.PasswordChar = '*';
this.txtPassword.Size = new System.Drawing.Size(148, 23);
this.txtPassword.TabIndex = 23;
@@ -325,19 +324,20 @@
//
this.dgvUser.AllowUserToAddRows = false;
this.dgvUser.AllowUserToDeleteRows = false;
dataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(249)))), ((int)(((byte)(249)))), ((int)(((byte)(249)))));
this.dgvUser.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle4;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(249)))), ((int)(((byte)(249)))), ((int)(((byte)(249)))));
this.dgvUser.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
this.dgvUser.AutoRowNumber = true;
this.dgvUser.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
this.dgvUser.BackgroundColor = System.Drawing.Color.White;
this.dgvUser.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle5.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle5.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle5.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle5.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvUser.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle5;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvUser.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
this.dgvUser.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvUser.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.UserIdColumn,
@@ -348,17 +348,10 @@
this.shopCountColumn,
this.editColumn,
this.deleteColumn});
dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle6.BackColor = System.Drawing.SystemColors.Window;
dataGridViewCellStyle6.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle6.ForeColor = System.Drawing.SystemColors.ControlText;
dataGridViewCellStyle6.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle6.SelectionForeColor = System.Drawing.SystemColors.ControlText;
dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvUser.DefaultCellStyle = dataGridViewCellStyle6;
this.dgvUser.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvUser.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(208)))), ((int)(((byte)(215)))), ((int)(((byte)(229)))));
this.dgvUser.Location = new System.Drawing.Point(0, 5);
this.dgvUser.MultiSelectCheckBox = true;
this.dgvUser.Name = "dgvUser";
this.dgvUser.ReadOnly = true;
this.dgvUser.RowTemplate.Height = 23;
@@ -419,16 +412,16 @@
this.deleteColumn.Name = "deleteColumn";
this.deleteColumn.ReadOnly = true;
//
// SubAccountListForm
// PDDSubAccountListForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(933, 445);
this.Controls.Add(this.splitContainer5);
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.KeyPreview = true;
this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.Name = "SubAccountListForm";
this.Name = "PDDSubAccountListForm";
this.Text = "子账号管理";
this.Load += new System.EventHandler(this.SubAccountForm_Load);
this.splitContainer5.Panel1.ResumeLayout(false);