供应商采集相关功能 10%

This commit is contained in:
wule committed 2026-01-23 19:09:56 +08:00
1 parent 84dbc94047
commit 1b15eda63c
12 files changed
+963 -62

No files matched your search

+372
View File
@@ -0,0 +1,372 @@
namespace TemuKJD.ToolForms
{
partial class GetJuShuitanProdForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.btnNext = new System.Windows.Forms.Button();
this.btnPrev = new System.Windows.Forms.Button();
this.txtAddress = new System.Windows.Forms.TextBox();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.pnlMultiLogin = new System.Windows.Forms.Panel();
this.cmbMultiCookieName = new DevComponents.DotNetBar.Controls.ComboBoxEx();
this.btnMultiLogin = new DevComponents.DotNetBar.PanelEx();
this.btnDel = new DevComponents.DotNetBar.PanelEx();
this.btnRefreshCookie = new DevComponents.DotNetBar.PanelEx();
this.txtCookie = new System.Windows.Forms.TextBox();
this.btnSaveCookie = new DevComponents.DotNetBar.PanelEx();
this.btnImportCookie = new DevComponents.DotNetBar.PanelEx();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit();
this.splitContainer2.Panel1.SuspendLayout();
this.splitContainer2.Panel2.SuspendLayout();
this.splitContainer2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.pnlMultiLogin.SuspendLayout();
this.SuspendLayout();
//
// tabControl1
//
this.tabControl1.Controls.Add(this.tabPage1);
this.tabControl1.Controls.Add(this.tabPage2);
this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tabControl1.Location = new System.Drawing.Point(0, 0);
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(1109, 558);
this.tabControl1.TabIndex = 0;
//
// tabPage1
//
this.tabPage1.Controls.Add(this.splitContainer2);
this.tabPage1.Location = new System.Drawing.Point(4, 26);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
this.tabPage1.Size = new System.Drawing.Size(1101, 528);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "商品页面";
this.tabPage1.UseVisualStyleBackColor = true;
//
// splitContainer2
//
this.splitContainer2.BackColor = System.Drawing.Color.White;
this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
this.splitContainer2.Location = new System.Drawing.Point(3, 3);
this.splitContainer2.Name = "splitContainer2";
this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer2.Panel1
//
this.splitContainer2.Panel1.Controls.Add(this.btnNext);
this.splitContainer2.Panel1.Controls.Add(this.btnPrev);
this.splitContainer2.Panel1.Controls.Add(this.txtAddress);
//
// splitContainer2.Panel2
//
this.splitContainer2.Panel2.Controls.Add(this.splitContainer1);
this.splitContainer2.Size = new System.Drawing.Size(1095, 522);
this.splitContainer2.SplitterDistance = 26;
this.splitContainer2.TabIndex = 6;
//
// btnNext
//
this.btnNext.Location = new System.Drawing.Point(35, 3);
this.btnNext.Name = "btnNext";
this.btnNext.Size = new System.Drawing.Size(32, 23);
this.btnNext.TabIndex = 9;
this.btnNext.Text = "→";
this.btnNext.UseVisualStyleBackColor = true;
//
// btnPrev
//
this.btnPrev.Location = new System.Drawing.Point(3, 3);
this.btnPrev.Name = "btnPrev";
this.btnPrev.Size = new System.Drawing.Size(32, 23);
this.btnPrev.TabIndex = 8;
this.btnPrev.Text = "←";
this.btnPrev.UseVisualStyleBackColor = true;
//
// txtAddress
//
this.txtAddress.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.txtAddress.Location = new System.Drawing.Point(68, 3);
this.txtAddress.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.txtAddress.Name = "txtAddress";
this.txtAddress.Size = new System.Drawing.Size(1024, 23);
this.txtAddress.TabIndex = 7;
//
// splitContainer1
//
this.splitContainer1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
this.splitContainer1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.splitContainer1.Name = "splitContainer1";
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.pnlMultiLogin);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.BackColor = System.Drawing.Color.White;
this.splitContainer1.Panel2.Controls.Add(this.btnRefreshCookie);
this.splitContainer1.Panel2.Controls.Add(this.txtCookie);
this.splitContainer1.Panel2.Controls.Add(this.btnSaveCookie);
this.splitContainer1.Panel2.Controls.Add(this.btnImportCookie);
this.splitContainer1.Size = new System.Drawing.Size(1095, 492);
this.splitContainer1.SplitterDistance = 400;
this.splitContainer1.SplitterWidth = 3;
this.splitContainer1.TabIndex = 4;
//
// pnlMultiLogin
//
this.pnlMultiLogin.Controls.Add(this.cmbMultiCookieName);
this.pnlMultiLogin.Controls.Add(this.btnMultiLogin);
this.pnlMultiLogin.Controls.Add(this.btnDel);
this.pnlMultiLogin.Location = new System.Drawing.Point(5, 634);
this.pnlMultiLogin.Name = "pnlMultiLogin";
this.pnlMultiLogin.Size = new System.Drawing.Size(251, 31);
this.pnlMultiLogin.TabIndex = 461;
this.pnlMultiLogin.Visible = false;
//
// cmbMultiCookieName
//
this.cmbMultiCookieName.DisplayMember = "Text";
this.cmbMultiCookieName.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.cmbMultiCookieName.FormattingEnabled = true;
this.cmbMultiCookieName.ItemHeight = 18;
this.cmbMultiCookieName.Location = new System.Drawing.Point(3, 3);
this.cmbMultiCookieName.Name = "cmbMultiCookieName";
this.cmbMultiCookieName.Size = new System.Drawing.Size(158, 24);
this.cmbMultiCookieName.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.cmbMultiCookieName.TabIndex = 379;
this.cmbMultiCookieName.Text = "cookie1";
//
// btnMultiLogin
//
this.btnMultiLogin.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnMultiLogin.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnMultiLogin.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnMultiLogin.DisabledBackColor = System.Drawing.Color.Empty;
this.btnMultiLogin.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnMultiLogin.Location = new System.Drawing.Point(185, 3);
this.btnMultiLogin.Name = "btnMultiLogin";
this.btnMultiLogin.Size = new System.Drawing.Size(60, 24);
this.btnMultiLogin.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnMultiLogin.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnMultiLogin.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnMultiLogin.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnMultiLogin.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnMultiLogin.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnMultiLogin.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnMultiLogin.Style.GradientAngle = 90;
this.btnMultiLogin.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnMultiLogin.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnMultiLogin.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnMultiLogin.TabIndex = 460;
this.btnMultiLogin.Text = "多重登录";
//
// btnDel
//
this.btnDel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnDel.CanvasColor = System.Drawing.SystemColors.Control;
this.btnDel.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnDel.DisabledBackColor = System.Drawing.Color.Empty;
this.btnDel.Location = new System.Drawing.Point(163, 3);
this.btnDel.Name = "btnDel";
this.btnDel.Size = new System.Drawing.Size(20, 24);
this.btnDel.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnDel.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
this.btnDel.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
this.btnDel.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
this.btnDel.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnDel.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
this.btnDel.Style.GradientAngle = 90;
this.btnDel.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center;
this.btnDel.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnDel.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnDel.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnDel.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White;
this.btnDel.TabIndex = 409;
this.btnDel.Text = "删";
//
// btnRefreshCookie
//
this.btnRefreshCookie.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnRefreshCookie.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnRefreshCookie.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnRefreshCookie.DisabledBackColor = System.Drawing.Color.Empty;
this.btnRefreshCookie.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnRefreshCookie.Location = new System.Drawing.Point(970, 3);
this.btnRefreshCookie.Name = "btnRefreshCookie";
this.btnRefreshCookie.Size = new System.Drawing.Size(125, 25);
this.btnRefreshCookie.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnRefreshCookie.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnRefreshCookie.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnRefreshCookie.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnRefreshCookie.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnRefreshCookie.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnRefreshCookie.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnRefreshCookie.Style.GradientAngle = 90;
this.btnRefreshCookie.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnRefreshCookie.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnRefreshCookie.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnRefreshCookie.TabIndex = 776;
this.btnRefreshCookie.Text = "刷新cookie";
this.btnRefreshCookie.Click += new System.EventHandler(this.btnRefreshCookie_Click);
//
// txtCookie
//
this.txtCookie.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.txtCookie.Location = new System.Drawing.Point(0, 4);
this.txtCookie.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.txtCookie.Multiline = true;
this.txtCookie.Name = "txtCookie";
this.txtCookie.Size = new System.Drawing.Size(711, 104);
this.txtCookie.TabIndex = 766;
//
// btnSaveCookie
//
this.btnSaveCookie.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnSaveCookie.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnSaveCookie.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnSaveCookie.DisabledBackColor = System.Drawing.Color.Empty;
this.btnSaveCookie.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSaveCookie.Location = new System.Drawing.Point(842, 3);
this.btnSaveCookie.Name = "btnSaveCookie";
this.btnSaveCookie.Size = new System.Drawing.Size(125, 25);
this.btnSaveCookie.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnSaveCookie.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnSaveCookie.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnSaveCookie.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnSaveCookie.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnSaveCookie.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnSaveCookie.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnSaveCookie.Style.GradientAngle = 90;
this.btnSaveCookie.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnSaveCookie.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnSaveCookie.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnSaveCookie.TabIndex = 765;
this.btnSaveCookie.Text = "保存网页cookie";
this.btnSaveCookie.Click += new System.EventHandler(this.btnSaveCookie_Click);
//
// btnImportCookie
//
this.btnImportCookie.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnImportCookie.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnImportCookie.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnImportCookie.DisabledBackColor = System.Drawing.Color.Empty;
this.btnImportCookie.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnImportCookie.Location = new System.Drawing.Point(714, 3);
this.btnImportCookie.Name = "btnImportCookie";
this.btnImportCookie.Size = new System.Drawing.Size(125, 25);
this.btnImportCookie.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnImportCookie.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnImportCookie.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnImportCookie.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnImportCookie.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnImportCookie.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnImportCookie.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnImportCookie.Style.GradientAngle = 90;
this.btnImportCookie.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnImportCookie.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnImportCookie.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnImportCookie.TabIndex = 761;
this.btnImportCookie.Text = "导入cookie并刷新";
this.btnImportCookie.Click += new System.EventHandler(this.btnImportCookie_Click);
//
// tabPage2
//
this.tabPage2.Location = new System.Drawing.Point(4, 22);
this.tabPage2.Name = "tabPage2";
this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
this.tabPage2.Size = new System.Drawing.Size(1101, 532);
this.tabPage2.TabIndex = 1;
this.tabPage2.Text = "商品列表";
this.tabPage2.UseVisualStyleBackColor = true;
//
// GetJuShuitanProdForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.ClientSize = new System.Drawing.Size(1109, 558);
this.Controls.Add(this.tabControl1);
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Name = "GetJuShuitanProdForm";
this.Text = "获取厂商产品";
this.Load += new System.EventHandler(this.GetJuShuitanProdForm_Load);
this.tabControl1.ResumeLayout(false);
this.tabPage1.ResumeLayout(false);
this.splitContainer2.Panel1.ResumeLayout(false);
this.splitContainer2.Panel1.PerformLayout();
this.splitContainer2.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
this.splitContainer2.ResumeLayout(false);
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel2.ResumeLayout(false);
this.splitContainer1.Panel2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
this.pnlMultiLogin.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.TabControl tabControl1;
private System.Windows.Forms.TabPage tabPage1;
private System.Windows.Forms.TabPage tabPage2;
private System.Windows.Forms.SplitContainer splitContainer2;
private System.Windows.Forms.Button btnNext;
private System.Windows.Forms.Button btnPrev;
private System.Windows.Forms.TextBox txtAddress;
private System.Windows.Forms.SplitContainer splitContainer1;
private System.Windows.Forms.Panel pnlMultiLogin;
private DevComponents.DotNetBar.Controls.ComboBoxEx cmbMultiCookieName;
private DevComponents.DotNetBar.PanelEx btnMultiLogin;
private DevComponents.DotNetBar.PanelEx btnDel;
private System.Windows.Forms.TextBox txtCookie;
private DevComponents.DotNetBar.PanelEx btnSaveCookie;
private DevComponents.DotNetBar.PanelEx btnImportCookie;
private DevComponents.DotNetBar.PanelEx btnRefreshCookie;
}
}
+162
View File
@@ -0,0 +1,162 @@
using AllBase;
using CefSharp;
using CefSharp.WinForms;
using NaiBa.CefHelper;
using NaiBa.CefHelper.Handler;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using TemuKJD.BaseForms;
using TemuKJD.Helper;
using Work;
namespace TemuKJD.ToolForms
{
public partial class GetJuShuitanProdForm : BaseForms.BaseForm
{
string InitUrl = "https://sc.scm121.com/suppliersManage/suppliersList/onlineSuppliers";
public ChromiumWebBrowser cefWebBrowser = null;
private string currentUrl = "";
public GetJuShuitanProdForm()
{
InitializeComponent();
}
private void GetJuShuitanProdForm_Load(object sender, EventArgs e)
{
InitCef();
}
void InitCef()
{
if (cefWebBrowser == null)
{
cefWebBrowser = CEFBrowser.CreateChromiumWebBrowser(InitUrl, false);
CustomResourceRequestHandlerLocal resourceRequestHandler = new CustomResourceRequestHandlerLocal();
resourceRequestHandler.ResourceLoadCompleteEvent += RequestHandler_ResourceLoadComplete;
resourceRequestHandler.BeforeResourceLoadEvent += RequestHandler_BeforeResourceLoad;
cefWebBrowser.RequestHandler = new CustomRequestHandler(resourceRequestHandler);
var lifeSapnHandler = new LifeSpanHandlerLocal(PopWindowType.SelfWindow);
cefWebBrowser.LifeSpanHandler = lifeSapnHandler;
cefWebBrowser.KeyboardHandler = new KeyboardHandler();
cefWebBrowser.FrameLoadEnd += CefWebBrowser_FrameLoadEnd;
cefWebBrowser.AddressChanged += CefWebBrowser_AddressChanged;
cefWebBrowser.LoadError += CefWebBrowser_LoadError;
cefWebBrowser.Dock = DockStyle.Fill;
Invoke(new Action(() =>
{
splitContainer1.Panel1.Controls.Add(cefWebBrowser);
//cefWebBrowser.Load(shopMainUrl);
}));
}
Task.Run(() =>
{
string serverCookie = "";
var url = BaseClass.BuildObjString("user/get_scm121_cookie");
var data = UserLogin.GetSignaturex();
var result = GetHtml.PostUtf8(url, data);
if (!result.Contains("\"code\":200"))
result = GetHtml.PostUtf8(url, data);
List<Cookie> cookieLst = new List<Cookie>();
try
{
serverCookie = JsonHelper.SerializeObject(JsonHelper.JObjectParse(result)["cookie"]);
cookieLst = JsonHelper.DeserializeJsonToList<CefSharp.Cookie>(serverCookie);
if (cookieLst == null)
cookieLst = new List<Cookie>();
}
catch
{
}
// cef138必须init后方可设置或删除cookie
while (!cefWebBrowser.IsBrowserInitialized || !cefWebBrowser.GetBrowser().MainFrame.IsValid)
Thread.Sleep(20);
CEFBrowser.DeleteCookie(cefWebBrowser.GetCookieManager(null));
//cef 138 如果没有设置RequestContext 可能为空,直接getCookieManager
//if (this.openType != EnumOpenType.login)
{
//var t = CEFBrowser.SetCookieAsync(JsonHelper.SerializeObject(cookieLst), cefWebBrowser.GetCookieManager(null));
foreach (var cook in cookieLst)
{
var t = CEFBrowser.SetCookieAsync(cook.Domain.Trim('.'), cook.Name + "=" + cook.Value + ";", cefWebBrowser.GetCookieManager(null));
t.Wait(5000);
}
}
cefWebBrowser.Load(InitUrl);
});
}
private void CefWebBrowser_FrameLoadEnd(object sender, CefSharp.FrameLoadEndEventArgs e)
{
}
private void RequestHandler_ResourceLoadComplete(object sender, string url, string postData, string responseData, IRequest request)
{
}
private bool RequestHandler_BeforeResourceLoad(object sender, string url, string postData, IRequest request)
{
return false;
}
private void CefWebBrowser_AddressChanged(object sender, CefSharp.AddressChangedEventArgs e)
{
if (this.Created && !this.Disposing && !this.IsDisposed)
Invoke(new Action(() =>
{
currentUrl = e.Address;
txtAddress.Text = e.Address;
}));
}
private void CefWebBrowser_LoadError(object sender, CefSharp.LoadErrorEventArgs e)
{
}
private void btnImportCookie_Click(object sender, EventArgs e)
{
Task.Run(() =>
{
var t = CEFBrowser.SetCookieAsync("scm121.com", txtCookie.Text, cefWebBrowser.GetCookieManager(null));
t.Wait(5000);
cefWebBrowser.Load(InitUrl);
});
}
private void btnSaveCookie_Click(object sender, EventArgs e)
{
List<Cookie> cookieList = CEFBrowser.GetCookieList(".scm121.com", cefWebBrowser.GetCookieManager(null));
var url = BaseClass.BuildObjString("user/update_scm121_cookie");
var data = UserLogin.GetSignaturex();
data += "&cookie=" + GetHtml.UrlEncodeUtf8(JsonHelper.SerializeObject(cookieList));
var result = GetHtml.PostUtf8(url, data);
if (!result.Contains("\"code\":200"))
result = GetHtml.PostUtf8(url, data);
if (result.Contains("\"code\":200"))
BaseMsgForm.ShowInfo("保存成功");
else
BaseMsgForm.ShowInfo("保存失败,请重试");
}
private void btnRefreshCookie_Click(object sender, EventArgs e)
{
//var result = GetHtml.PostUtf8("https://api.weixin.qq.com/shop/ec/basics/img/upload?access_token=100_Kn3u6mev0uip-WUPSgxXWHrHldjOP0Ewjw8n18LmGcq2pWbjn4BJukPkGZt0gzgJ1Hd6bRM2TXUDTEhwM7VULSl_P-pVHSVPHlE6ZvdXfD6djB1f2WEibY7jWaZLaD24cBUxLM-mSGxjR7i7IBBeAHDOHH&upload_type=http://img.alicdn.com/imgextra/i2/2215107627344/O1CN01eM6hZu247bV94MWKH_!!2215107627344.jpg&resp_type=1", "");
//
}
}
}
+120
View File
@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>