temu客户端程序
This commit is contained in:
commit
4aaf264e89
694 files changed
+263780
No files matched your search
+571
@@ -0,0 +1,571 @@
|
||||
namespace LittleRabbit.DashBoardForms
|
||||
{
|
||||
partial class DashBoardForm
|
||||
{
|
||||
/// <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.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.pnlBanner = new DevComponents.DotNetBar.PanelEx();
|
||||
this.txtChatWords = new System.Windows.Forms.TextBox();
|
||||
this.rbChat = new System.Windows.Forms.RadioButton();
|
||||
this.rbInvite = new System.Windows.Forms.RadioButton();
|
||||
this.label7 = new System.Windows.Forms.Label();
|
||||
this.btnSend = new LittleRabbit.UserControls.ButtonEx();
|
||||
this.pnlDetailForm = new DevComponents.DotNetBar.PanelEx();
|
||||
this.pnlMainForm = new DevComponents.DotNetBar.PanelEx();
|
||||
this.btnLoginDouyin = new LittleRabbit.UserControls.ButtonEx();
|
||||
this.cmbShop = new DevComponents.DotNetBar.Controls.ComboBoxEx();
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.txtSuccessCount = new System.Windows.Forms.TextBox();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.txtInterval = new System.Windows.Forms.TextBox();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.txtTotalPage = new System.Windows.Forms.TextBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.txtCurrentPage = new System.Windows.Forms.TextBox();
|
||||
this.textBox3 = new System.Windows.Forms.TextBox();
|
||||
this.max = new DevComponents.DotNetBar.PanelEx();
|
||||
this.min = new DevComponents.DotNetBar.PanelEx();
|
||||
this.close = new DevComponents.DotNetBar.PanelEx();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.line1 = new DevComponents.DotNetBar.Controls.Line();
|
||||
this.line2 = new DevComponents.DotNetBar.Controls.Line();
|
||||
this.line3 = new DevComponents.DotNetBar.Controls.Line();
|
||||
this.line4 = new DevComponents.DotNetBar.Controls.Line();
|
||||
this.label8 = new System.Windows.Forms.Label();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.SuspendLayout();
|
||||
this.pnlBanner.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// splitContainer1
|
||||
//
|
||||
this.splitContainer1.BackColor = System.Drawing.Color.White;
|
||||
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
|
||||
this.splitContainer1.Location = new System.Drawing.Point(2, 2);
|
||||
this.splitContainer1.Name = "splitContainer1";
|
||||
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
|
||||
//
|
||||
// splitContainer1.Panel1
|
||||
//
|
||||
this.splitContainer1.Panel1.Controls.Add(this.pnlBanner);
|
||||
//
|
||||
// splitContainer1.Panel2
|
||||
//
|
||||
this.splitContainer1.Panel2.BackColor = System.Drawing.Color.WhiteSmoke;
|
||||
this.splitContainer1.Size = new System.Drawing.Size(1196, 676);
|
||||
this.splitContainer1.SplitterDistance = 66;
|
||||
this.splitContainer1.SplitterWidth = 1;
|
||||
this.splitContainer1.TabIndex = 1;
|
||||
//
|
||||
// pnlBanner
|
||||
//
|
||||
this.pnlBanner.CanvasColor = System.Drawing.SystemColors.Control;
|
||||
this.pnlBanner.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.pnlBanner.Controls.Add(this.txtChatWords);
|
||||
this.pnlBanner.Controls.Add(this.rbChat);
|
||||
this.pnlBanner.Controls.Add(this.rbInvite);
|
||||
this.pnlBanner.Controls.Add(this.label7);
|
||||
this.pnlBanner.Controls.Add(this.btnSend);
|
||||
this.pnlBanner.Controls.Add(this.pnlDetailForm);
|
||||
this.pnlBanner.Controls.Add(this.pnlMainForm);
|
||||
this.pnlBanner.Controls.Add(this.btnLoginDouyin);
|
||||
this.pnlBanner.Controls.Add(this.cmbShop);
|
||||
this.pnlBanner.Controls.Add(this.label5);
|
||||
this.pnlBanner.Controls.Add(this.txtSuccessCount);
|
||||
this.pnlBanner.Controls.Add(this.label4);
|
||||
this.pnlBanner.Controls.Add(this.label3);
|
||||
this.pnlBanner.Controls.Add(this.txtInterval);
|
||||
this.pnlBanner.Controls.Add(this.label2);
|
||||
this.pnlBanner.Controls.Add(this.txtTotalPage);
|
||||
this.pnlBanner.Controls.Add(this.label1);
|
||||
this.pnlBanner.Controls.Add(this.txtCurrentPage);
|
||||
this.pnlBanner.Controls.Add(this.textBox3);
|
||||
this.pnlBanner.Controls.Add(this.max);
|
||||
this.pnlBanner.Controls.Add(this.min);
|
||||
this.pnlBanner.Controls.Add(this.close);
|
||||
this.pnlBanner.Controls.Add(this.label6);
|
||||
this.pnlBanner.Controls.Add(this.line1);
|
||||
this.pnlBanner.Controls.Add(this.line2);
|
||||
this.pnlBanner.Controls.Add(this.line3);
|
||||
this.pnlBanner.Controls.Add(this.line4);
|
||||
this.pnlBanner.Controls.Add(this.label8);
|
||||
this.pnlBanner.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.pnlBanner.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.pnlBanner.Location = new System.Drawing.Point(0, 0);
|
||||
this.pnlBanner.Name = "pnlBanner";
|
||||
this.pnlBanner.Size = new System.Drawing.Size(1196, 66);
|
||||
this.pnlBanner.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.pnlBanner.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.pnlBanner.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.pnlBanner.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
|
||||
this.pnlBanner.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
|
||||
this.pnlBanner.Style.BorderWidth = 0;
|
||||
this.pnlBanner.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
|
||||
this.pnlBanner.Style.GradientAngle = 90;
|
||||
this.pnlBanner.TabIndex = 0;
|
||||
this.pnlBanner.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.pnlBanner_MouseDoubleClick);
|
||||
this.pnlBanner.MouseDown += new System.Windows.Forms.MouseEventHandler(this.pnlBanner_MouseDown);
|
||||
this.pnlBanner.MouseMove += new System.Windows.Forms.MouseEventHandler(this.pnlBanner_MouseMove);
|
||||
this.pnlBanner.MouseUp += new System.Windows.Forms.MouseEventHandler(this.pnlBanner_MouseUp);
|
||||
//
|
||||
// txtChatWords
|
||||
//
|
||||
this.txtChatWords.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.txtChatWords.Location = new System.Drawing.Point(524, 26);
|
||||
this.txtChatWords.Name = "txtChatWords";
|
||||
this.txtChatWords.Size = new System.Drawing.Size(588, 21);
|
||||
this.txtChatWords.TabIndex = 405;
|
||||
this.txtChatWords.Visible = false;
|
||||
this.txtChatWords.TextChanged += new System.EventHandler(this.txtChatWords_TextChanged);
|
||||
//
|
||||
// rbChat
|
||||
//
|
||||
this.rbChat.AutoSize = true;
|
||||
this.rbChat.ForeColor = System.Drawing.Color.White;
|
||||
this.rbChat.Location = new System.Drawing.Point(364, 28);
|
||||
this.rbChat.Name = "rbChat";
|
||||
this.rbChat.Size = new System.Drawing.Size(71, 16);
|
||||
this.rbChat.TabIndex = 404;
|
||||
this.rbChat.Text = "在线沟通";
|
||||
this.rbChat.UseVisualStyleBackColor = true;
|
||||
this.rbChat.Visible = false;
|
||||
this.rbChat.CheckedChanged += new System.EventHandler(this.rbChat_CheckedChanged);
|
||||
//
|
||||
// rbInvite
|
||||
//
|
||||
this.rbInvite.AutoSize = true;
|
||||
this.rbInvite.ForeColor = System.Drawing.Color.White;
|
||||
this.rbInvite.Location = new System.Drawing.Point(287, 28);
|
||||
this.rbInvite.Name = "rbInvite";
|
||||
this.rbInvite.Size = new System.Drawing.Size(71, 16);
|
||||
this.rbInvite.TabIndex = 403;
|
||||
this.rbInvite.Text = "发送邀约";
|
||||
this.rbInvite.UseVisualStyleBackColor = true;
|
||||
this.rbInvite.Visible = false;
|
||||
this.rbInvite.CheckedChanged += new System.EventHandler(this.rbInvite_CheckedChanged);
|
||||
//
|
||||
// label7
|
||||
//
|
||||
this.label7.AutoSize = true;
|
||||
this.label7.ForeColor = System.Drawing.Color.White;
|
||||
this.label7.Location = new System.Drawing.Point(227, 30);
|
||||
this.label7.Name = "label7";
|
||||
this.label7.Size = new System.Drawing.Size(53, 12);
|
||||
this.label7.TabIndex = 402;
|
||||
this.label7.Text = "邀请方式";
|
||||
this.label7.Visible = false;
|
||||
//
|
||||
// btnSend
|
||||
//
|
||||
this.btnSend.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btnSend.BackColor = System.Drawing.Color.NavajoWhite;
|
||||
this.btnSend.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.btnSend.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
|
||||
this.btnSend.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.btnSend.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
|
||||
this.btnSend.Location = new System.Drawing.Point(1046, 2);
|
||||
this.btnSend.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.btnSend.Name = "btnSend";
|
||||
this.btnSend.Size = new System.Drawing.Size(66, 21);
|
||||
this.btnSend.TabIndex = 386;
|
||||
this.btnSend.Text = "开始邀约";
|
||||
this.btnSend.UseCompatibleTextRendering = true;
|
||||
this.btnSend.UseVisualStyleBackColor = false;
|
||||
this.btnSend.Click += new System.EventHandler(this.btnSend_Click);
|
||||
//
|
||||
// pnlDetailForm
|
||||
//
|
||||
this.pnlDetailForm.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.pnlDetailForm.CanvasColor = System.Drawing.SystemColors.Control;
|
||||
this.pnlDetailForm.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.pnlDetailForm.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.pnlDetailForm.Location = new System.Drawing.Point(77, 44);
|
||||
this.pnlDetailForm.Name = "pnlDetailForm";
|
||||
this.pnlDetailForm.Size = new System.Drawing.Size(76, 26);
|
||||
this.pnlDetailForm.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.pnlDetailForm.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(175)))), ((int)(((byte)(210)))), ((int)(((byte)(255)))));
|
||||
this.pnlDetailForm.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(175)))), ((int)(((byte)(210)))), ((int)(((byte)(255)))));
|
||||
this.pnlDetailForm.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
|
||||
this.pnlDetailForm.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
|
||||
this.pnlDetailForm.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
|
||||
this.pnlDetailForm.Style.GradientAngle = 90;
|
||||
this.pnlDetailForm.TabIndex = 382;
|
||||
this.pnlDetailForm.Text = "详情";
|
||||
this.pnlDetailForm.Visible = false;
|
||||
this.pnlDetailForm.Click += new System.EventHandler(this.btnDetailForm_Click);
|
||||
//
|
||||
// pnlMainForm
|
||||
//
|
||||
this.pnlMainForm.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.pnlMainForm.CanvasColor = System.Drawing.SystemColors.Control;
|
||||
this.pnlMainForm.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.pnlMainForm.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.pnlMainForm.Location = new System.Drawing.Point(2, 42);
|
||||
this.pnlMainForm.Name = "pnlMainForm";
|
||||
this.pnlMainForm.Size = new System.Drawing.Size(76, 26);
|
||||
this.pnlMainForm.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.pnlMainForm.Style.BackColor1.Color = System.Drawing.Color.White;
|
||||
this.pnlMainForm.Style.BackColor2.Color = System.Drawing.Color.White;
|
||||
this.pnlMainForm.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
|
||||
this.pnlMainForm.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
|
||||
this.pnlMainForm.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
|
||||
this.pnlMainForm.Style.GradientAngle = 90;
|
||||
this.pnlMainForm.TabIndex = 375;
|
||||
this.pnlMainForm.Text = "主页";
|
||||
this.pnlMainForm.Click += new System.EventHandler(this.btnMainForm_Click);
|
||||
//
|
||||
// btnLoginDouyin
|
||||
//
|
||||
this.btnLoginDouyin.BackColor = System.Drawing.Color.White;
|
||||
this.btnLoginDouyin.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.btnLoginDouyin.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
|
||||
this.btnLoginDouyin.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.btnLoginDouyin.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.btnLoginDouyin.Location = new System.Drawing.Point(159, 2);
|
||||
this.btnLoginDouyin.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.btnLoginDouyin.Name = "btnLoginDouyin";
|
||||
this.btnLoginDouyin.Size = new System.Drawing.Size(66, 21);
|
||||
this.btnLoginDouyin.TabIndex = 374;
|
||||
this.btnLoginDouyin.Text = "登录抖音";
|
||||
this.btnLoginDouyin.UseCompatibleTextRendering = true;
|
||||
this.btnLoginDouyin.UseVisualStyleBackColor = false;
|
||||
this.btnLoginDouyin.Click += new System.EventHandler(this.btnLoginDouyin_Click);
|
||||
//
|
||||
// cmbShop
|
||||
//
|
||||
this.cmbShop.DisplayMember = "Text";
|
||||
this.cmbShop.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
|
||||
this.cmbShop.FormattingEnabled = true;
|
||||
this.cmbShop.ItemHeight = 15;
|
||||
this.cmbShop.Location = new System.Drawing.Point(2, 2);
|
||||
this.cmbShop.Name = "cmbShop";
|
||||
this.cmbShop.Size = new System.Drawing.Size(156, 21);
|
||||
this.cmbShop.Style = DevComponents.DotNetBar.eDotNetBarStyle.Office2003;
|
||||
this.cmbShop.TabIndex = 76;
|
||||
//
|
||||
// label5
|
||||
//
|
||||
this.label5.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.label5.AutoSize = true;
|
||||
this.label5.ForeColor = System.Drawing.Color.White;
|
||||
this.label5.Location = new System.Drawing.Point(572, 6);
|
||||
this.label5.Name = "label5";
|
||||
this.label5.Size = new System.Drawing.Size(65, 12);
|
||||
this.label5.TabIndex = 66;
|
||||
this.label5.Text = "邀约成功数";
|
||||
//
|
||||
// txtSuccessCount
|
||||
//
|
||||
this.txtSuccessCount.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.txtSuccessCount.Enabled = false;
|
||||
this.txtSuccessCount.Location = new System.Drawing.Point(638, 2);
|
||||
this.txtSuccessCount.Name = "txtSuccessCount";
|
||||
this.txtSuccessCount.Size = new System.Drawing.Size(33, 21);
|
||||
this.txtSuccessCount.TabIndex = 65;
|
||||
this.txtSuccessCount.Text = "0";
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.ForeColor = System.Drawing.Color.White;
|
||||
this.label4.Location = new System.Drawing.Point(773, 6);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(17, 12);
|
||||
this.label4.TabIndex = 64;
|
||||
this.label4.Text = "秒";
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.ForeColor = System.Drawing.Color.White;
|
||||
this.label3.Location = new System.Drawing.Point(683, 6);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(53, 12);
|
||||
this.label3.TabIndex = 63;
|
||||
this.label3.Text = "邀约间隔";
|
||||
//
|
||||
// txtInterval
|
||||
//
|
||||
this.txtInterval.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.txtInterval.Location = new System.Drawing.Point(738, 2);
|
||||
this.txtInterval.Name = "txtInterval";
|
||||
this.txtInterval.Size = new System.Drawing.Size(33, 21);
|
||||
this.txtInterval.TabIndex = 62;
|
||||
this.txtInterval.Text = "10";
|
||||
this.txtInterval.TextChanged += new System.EventHandler(this.txtInterval_TextChanged);
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.ForeColor = System.Drawing.Color.White;
|
||||
this.label2.Location = new System.Drawing.Point(799, 6);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(77, 12);
|
||||
this.label2.TabIndex = 61;
|
||||
this.label2.Text = "预计邀约页数";
|
||||
//
|
||||
// txtTotalPage
|
||||
//
|
||||
this.txtTotalPage.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.txtTotalPage.Location = new System.Drawing.Point(878, 2);
|
||||
this.txtTotalPage.Name = "txtTotalPage";
|
||||
this.txtTotalPage.Size = new System.Drawing.Size(33, 21);
|
||||
this.txtTotalPage.TabIndex = 60;
|
||||
this.txtTotalPage.Text = "10";
|
||||
this.txtTotalPage.TextChanged += new System.EventHandler(this.txtTotalPage_TextChanged);
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.ForeColor = System.Drawing.Color.White;
|
||||
this.label1.Location = new System.Drawing.Point(922, 6);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(65, 12);
|
||||
this.label1.TabIndex = 59;
|
||||
this.label1.Text = "当前邀约第";
|
||||
//
|
||||
// txtCurrentPage
|
||||
//
|
||||
this.txtCurrentPage.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.txtCurrentPage.Enabled = false;
|
||||
this.txtCurrentPage.Location = new System.Drawing.Point(989, 2);
|
||||
this.txtCurrentPage.Name = "txtCurrentPage";
|
||||
this.txtCurrentPage.Size = new System.Drawing.Size(33, 21);
|
||||
this.txtCurrentPage.TabIndex = 58;
|
||||
this.txtCurrentPage.Text = "1";
|
||||
//
|
||||
// textBox3
|
||||
//
|
||||
this.textBox3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.textBox3.Location = new System.Drawing.Point(229, 2);
|
||||
this.textBox3.Name = "textBox3";
|
||||
this.textBox3.Size = new System.Drawing.Size(332, 21);
|
||||
this.textBox3.TabIndex = 36;
|
||||
this.textBox3.KeyDown += new System.Windows.Forms.KeyEventHandler(this.textBox3_KeyDown);
|
||||
//
|
||||
// max
|
||||
//
|
||||
this.max.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.max.CanvasColor = System.Drawing.SystemColors.Control;
|
||||
this.max.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.max.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.max.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.max.Location = new System.Drawing.Point(1149, 4);
|
||||
this.max.Name = "max";
|
||||
this.max.Size = new System.Drawing.Size(16, 16);
|
||||
this.max.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.max.Style.BackColor1.Alpha = ((byte)(0));
|
||||
this.max.Style.BackColor1.Color = System.Drawing.Color.Transparent;
|
||||
this.max.Style.BackColor2.Alpha = ((byte)(0));
|
||||
this.max.Style.BackColor2.Color = System.Drawing.Color.Transparent;
|
||||
this.max.Style.BackgroundImage = global::LittleRabbit.Properties.Resources.max;
|
||||
this.max.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
|
||||
this.max.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
|
||||
this.max.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
|
||||
this.max.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
|
||||
this.max.Style.GradientAngle = 90;
|
||||
this.max.StyleMouseOver.BackgroundImage = global::LittleRabbit.Properties.Resources.max_hover;
|
||||
this.max.TabIndex = 22;
|
||||
this.max.Click += new System.EventHandler(this.max_Click);
|
||||
//
|
||||
// min
|
||||
//
|
||||
this.min.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.min.CanvasColor = System.Drawing.SystemColors.Control;
|
||||
this.min.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.min.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.min.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.min.Location = new System.Drawing.Point(1123, 4);
|
||||
this.min.Name = "min";
|
||||
this.min.Size = new System.Drawing.Size(16, 16);
|
||||
this.min.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.min.Style.BackColor1.Alpha = ((byte)(0));
|
||||
this.min.Style.BackColor1.Color = System.Drawing.Color.Transparent;
|
||||
this.min.Style.BackColor2.Alpha = ((byte)(0));
|
||||
this.min.Style.BackColor2.Color = System.Drawing.Color.Transparent;
|
||||
this.min.Style.BackgroundImage = global::LittleRabbit.Properties.Resources.min;
|
||||
this.min.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
|
||||
this.min.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
|
||||
this.min.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
|
||||
this.min.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
|
||||
this.min.Style.GradientAngle = 90;
|
||||
this.min.StyleMouseOver.BackgroundImage = global::LittleRabbit.Properties.Resources.min_hover;
|
||||
this.min.TabIndex = 21;
|
||||
this.min.Click += new System.EventHandler(this.min_Click);
|
||||
//
|
||||
// close
|
||||
//
|
||||
this.close.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.close.CanvasColor = System.Drawing.SystemColors.Control;
|
||||
this.close.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.close.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.close.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.close.Location = new System.Drawing.Point(1175, 4);
|
||||
this.close.Name = "close";
|
||||
this.close.Size = new System.Drawing.Size(16, 16);
|
||||
this.close.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.close.Style.BackColor1.Alpha = ((byte)(0));
|
||||
this.close.Style.BackColor1.Color = System.Drawing.Color.Transparent;
|
||||
this.close.Style.BackColor2.Alpha = ((byte)(0));
|
||||
this.close.Style.BackColor2.Color = System.Drawing.Color.Transparent;
|
||||
this.close.Style.BackgroundImage = global::LittleRabbit.Properties.Resources.close;
|
||||
this.close.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
|
||||
this.close.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
|
||||
this.close.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
|
||||
this.close.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
|
||||
this.close.Style.GradientAngle = 90;
|
||||
this.close.StyleMouseOver.BackgroundImage = global::LittleRabbit.Properties.Resources.close_hover;
|
||||
this.close.TabIndex = 20;
|
||||
this.close.Click += new System.EventHandler(this.close_Click);
|
||||
//
|
||||
// label6
|
||||
//
|
||||
this.label6.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.label6.AutoSize = true;
|
||||
this.label6.ForeColor = System.Drawing.Color.White;
|
||||
this.label6.Location = new System.Drawing.Point(1024, 6);
|
||||
this.label6.Name = "label6";
|
||||
this.label6.Size = new System.Drawing.Size(17, 12);
|
||||
this.label6.TabIndex = 383;
|
||||
this.label6.Text = "页";
|
||||
//
|
||||
// line1
|
||||
//
|
||||
this.line1.ForeColor = System.Drawing.Color.White;
|
||||
this.line1.Location = new System.Drawing.Point(545, 2);
|
||||
this.line1.Name = "line1";
|
||||
this.line1.Size = new System.Drawing.Size(48, 21);
|
||||
this.line1.TabIndex = 387;
|
||||
this.line1.Text = "line1";
|
||||
this.line1.VerticalLine = true;
|
||||
//
|
||||
// line2
|
||||
//
|
||||
this.line2.ForeColor = System.Drawing.Color.White;
|
||||
this.line2.Location = new System.Drawing.Point(656, 2);
|
||||
this.line2.Name = "line2";
|
||||
this.line2.Size = new System.Drawing.Size(48, 21);
|
||||
this.line2.TabIndex = 388;
|
||||
this.line2.Text = "line2";
|
||||
this.line2.VerticalLine = true;
|
||||
//
|
||||
// line3
|
||||
//
|
||||
this.line3.ForeColor = System.Drawing.Color.White;
|
||||
this.line3.Location = new System.Drawing.Point(772, 2);
|
||||
this.line3.Name = "line3";
|
||||
this.line3.Size = new System.Drawing.Size(48, 21);
|
||||
this.line3.TabIndex = 389;
|
||||
this.line3.Text = "line3";
|
||||
this.line3.VerticalLine = true;
|
||||
//
|
||||
// line4
|
||||
//
|
||||
this.line4.ForeColor = System.Drawing.Color.White;
|
||||
this.line4.Location = new System.Drawing.Point(895, 2);
|
||||
this.line4.Name = "line4";
|
||||
this.line4.Size = new System.Drawing.Size(48, 21);
|
||||
this.line4.TabIndex = 390;
|
||||
this.line4.Text = "line4";
|
||||
this.line4.VerticalLine = true;
|
||||
//
|
||||
// label8
|
||||
//
|
||||
this.label8.AutoSize = true;
|
||||
this.label8.ForeColor = System.Drawing.Color.White;
|
||||
this.label8.Location = new System.Drawing.Point(442, 30);
|
||||
this.label8.Name = "label8";
|
||||
this.label8.Size = new System.Drawing.Size(89, 12);
|
||||
this.label8.TabIndex = 406;
|
||||
this.label8.Text = "沟通内容发送:";
|
||||
this.label8.Visible = false;
|
||||
//
|
||||
// DashBoardForm
|
||||
//
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
|
||||
this.ClientSize = new System.Drawing.Size(1200, 680);
|
||||
this.Controls.Add(this.splitContainer1);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
|
||||
this.Name = "DashBoardForm";
|
||||
this.Padding = new System.Windows.Forms.Padding(2);
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "DashBoardForm";
|
||||
this.Load += new System.EventHandler(this.DashBoardForm_Load);
|
||||
this.splitContainer1.Panel1.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
|
||||
this.splitContainer1.ResumeLayout(false);
|
||||
this.pnlBanner.ResumeLayout(false);
|
||||
this.pnlBanner.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.SplitContainer splitContainer1;
|
||||
private DevComponents.DotNetBar.PanelEx pnlBanner;
|
||||
private System.Windows.Forms.Label label5;
|
||||
private System.Windows.Forms.TextBox txtSuccessCount;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.TextBox txtInterval;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.TextBox txtTotalPage;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.TextBox txtCurrentPage;
|
||||
private System.Windows.Forms.TextBox textBox3;
|
||||
private DevComponents.DotNetBar.PanelEx max;
|
||||
private DevComponents.DotNetBar.PanelEx min;
|
||||
private DevComponents.DotNetBar.PanelEx close;
|
||||
private DevComponents.DotNetBar.Controls.ComboBoxEx cmbShop;
|
||||
private DevComponents.DotNetBar.PanelEx pnlMainForm;
|
||||
private DevComponents.DotNetBar.PanelEx pnlDetailForm;
|
||||
private UserControls.ButtonEx btnSend;
|
||||
private UserControls.ButtonEx btnLoginDouyin;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.Label label6;
|
||||
private DevComponents.DotNetBar.Controls.Line line1;
|
||||
private DevComponents.DotNetBar.Controls.Line line2;
|
||||
private DevComponents.DotNetBar.Controls.Line line3;
|
||||
private DevComponents.DotNetBar.Controls.Line line4;
|
||||
private System.Windows.Forms.TextBox txtChatWords;
|
||||
private System.Windows.Forms.RadioButton rbChat;
|
||||
private System.Windows.Forms.RadioButton rbInvite;
|
||||
private System.Windows.Forms.Label label7;
|
||||
private System.Windows.Forms.Label label8;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,828 @@
|
||||
using AllBase;
|
||||
using AllBase.Helper;
|
||||
using CefSharp;
|
||||
using CefSharp.WinForms;
|
||||
using LittleRabbit.Helper;
|
||||
using LittleRabbit.LittleRabbitForms.BaseForms;
|
||||
using NaiBa.CefHelper;
|
||||
using NaiBa.Util;
|
||||
using NaiBa.Util.Extension;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace LittleRabbit.DashBoardForms
|
||||
{
|
||||
public partial class DashBoardForm : Form
|
||||
{
|
||||
public enum InviteTypeEnum
|
||||
{
|
||||
Invite,
|
||||
Chat,
|
||||
}
|
||||
|
||||
public class DaRenSettings
|
||||
{
|
||||
/// <summary>
|
||||
/// 要采集的总页码数量
|
||||
/// </summary>
|
||||
public int TotalPage { get; set; } = 10;
|
||||
/// <summary>
|
||||
/// 发送邀约操作操作间隔时间
|
||||
/// </summary>
|
||||
public int Interval { get; set; } = 10;
|
||||
/// <summary>
|
||||
/// 翻页操作间隔时间
|
||||
/// </summary>
|
||||
public int PageInterval { get; set; } = 10;
|
||||
public string ChatWords { get; set; } = "老板您好!";
|
||||
public InviteTypeEnum InviteType { get; set; } = InviteTypeEnum.Invite;
|
||||
}
|
||||
|
||||
private Point mouseOffset; // 记录鼠标指针的坐标
|
||||
private bool isMouseDown; // 记录鼠标左键是否按下
|
||||
|
||||
private ChromiumWebBrowser cefWebBrowser = null;
|
||||
private ChromiumWebBrowser cefWebBrowserDetail = null;
|
||||
private DaRenSettings drSetting;
|
||||
private bool IsOpenDaRenPage = false;
|
||||
|
||||
public DashBoardForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
this.MaximumSize = new Size(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height);
|
||||
}
|
||||
|
||||
private void DashBoardForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (BaseClass.Ico != null)
|
||||
this.Icon = BaseClass.Ico;
|
||||
|
||||
this.WindowState = FormWindowState.Maximized;
|
||||
max.Style.BackgroundImage = Properties.Resources.normal;
|
||||
max.StyleMouseOver.BackgroundImage = Properties.Resources.normal_hover;
|
||||
this.Padding = new Padding(2);
|
||||
|
||||
this.drSetting = NaiBa.Util.Helper.ConfigHelper.LoadConfig<DaRenSettings>("daren_settings");
|
||||
if (drSetting == null)
|
||||
drSetting = new DaRenSettings();
|
||||
|
||||
this.txtChatWords.Text = drSetting.ChatWords;
|
||||
this.txtInterval.Text = drSetting.Interval.ToString();
|
||||
this.txtTotalPage.Text = drSetting.TotalPage.ToString();
|
||||
this.rbInvite.CheckedChanged -= rbInvite_CheckedChanged;
|
||||
this.rbChat.CheckedChanged -= rbChat_CheckedChanged;
|
||||
if (drSetting.InviteType == InviteTypeEnum.Invite)
|
||||
this.rbInvite.Checked = true;
|
||||
else
|
||||
this.rbChat.Checked = true;
|
||||
this.rbInvite.CheckedChanged += rbInvite_CheckedChanged;
|
||||
this.rbChat.CheckedChanged += rbChat_CheckedChanged;
|
||||
rbInvite.Checked = true;
|
||||
|
||||
for (int i = 0; i < GlobalConfig.DouShopLoginList.Count; i++)
|
||||
{
|
||||
var shop = GlobalConfig.DouShopLoginList[i];
|
||||
this.cmbShop.Items.Add(shop.ShopAccount);
|
||||
}
|
||||
this.cmbShop.SelectedIndex = 0;
|
||||
|
||||
string cookie = "";
|
||||
if (GlobalConfig.DouShopLoginList.Count > 0)
|
||||
{
|
||||
cookie = GlobalConfig.DouShopLoginList[0].Cookies;
|
||||
}
|
||||
InitCef(cookie);
|
||||
}
|
||||
|
||||
private void close_Click(object sender, EventArgs e)
|
||||
{
|
||||
{
|
||||
if (BaseMsgForm.ShowConfirm("是否关闭客户端?", "系统提示", FormLevel.SMALL).DialogResult.Equals(DialogResult.Cancel))
|
||||
return;
|
||||
else
|
||||
Process.GetCurrentProcess().Kill();
|
||||
}
|
||||
}
|
||||
|
||||
private void max_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (WindowState.Equals(FormWindowState.Normal))
|
||||
{
|
||||
WindowState = FormWindowState.Maximized;
|
||||
max.Style.BackgroundImage = Properties.Resources.normal;
|
||||
max.StyleMouseOver.BackgroundImage = Properties.Resources.normal_hover;
|
||||
this.Padding = new Padding(0);
|
||||
}
|
||||
else if (WindowState.Equals(FormWindowState.Maximized))
|
||||
{
|
||||
WindowState = FormWindowState.Normal;
|
||||
max.Style.BackgroundImage = Properties.Resources.max;
|
||||
max.StyleMouseOver.BackgroundImage = Properties.Resources.max_hover;
|
||||
this.Padding = new Padding(1);
|
||||
}
|
||||
}
|
||||
|
||||
private void min_Click(object sender, EventArgs e)
|
||||
{
|
||||
WindowState = FormWindowState.Minimized;
|
||||
ShowInTaskbar = true;
|
||||
}
|
||||
private void pnlBanner_MouseDoubleClick(object sender, MouseEventArgs e)
|
||||
{
|
||||
max_Click(null, null);
|
||||
}
|
||||
|
||||
private void pnlBanner_MouseDown(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (e.Button == MouseButtons.Left)
|
||||
{
|
||||
mouseOffset = new Point(-e.X, -e.Y);
|
||||
isMouseDown = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void pnlBanner_MouseMove(object sender, MouseEventArgs e)
|
||||
{
|
||||
if (isMouseDown)
|
||||
{
|
||||
//获取鼠标的位置
|
||||
Point mousePos = MousePosition;
|
||||
mousePos.Offset(mouseOffset.X, mouseOffset.Y);
|
||||
Location = mousePos;
|
||||
}
|
||||
}
|
||||
|
||||
private void pnlBanner_MouseUp(object sender, MouseEventArgs e)
|
||||
{
|
||||
isMouseDown = false;
|
||||
}
|
||||
|
||||
void InitCef(string cookie = "")
|
||||
{
|
||||
string mainUrl = "https://fxg.jinritemai.com/ffa/mshop/homepage/index";
|
||||
//mainUrl = "https://buyin.jinritemai.com/mpa/account/roles-select?target_url=/dashboard/servicehall/daren-square";
|
||||
string darenUrl = "https://buyin.jinritemai.com/dashboard/servicehall/daren-square";
|
||||
// GlobalConfig.DouUserCookies;
|
||||
if (cefWebBrowser == null)
|
||||
{
|
||||
cefWebBrowser = CEFBrowser.CreateChromiumWebBrowser("about:blank", true);
|
||||
var lifeSapnHandler = new LifeSpanHandlerLocal(PopWindowType.NewTitleWindow);
|
||||
lifeSapnHandler.OnPop += LifeSapnHandler_OnPop;
|
||||
cefWebBrowser.LifeSpanHandler = lifeSapnHandler;
|
||||
cefWebBrowser.KeyboardHandler = new NaiBa.CefHelper.Handler.KeyboardHandler();
|
||||
cefWebBrowser.FrameLoadEnd += CefWebBrowser_FrameLoadEnd;
|
||||
cefWebBrowser.AddressChanged += CefWebBrowser_AddressChanged;
|
||||
cefWebBrowser.Dock = DockStyle.Fill;
|
||||
|
||||
//var t = CEFBrowser.SetCookieAsync("jinritemai.com", cookie, cefWebBrowser.RequestContext.GetCookieManager(null));
|
||||
var cookieManager = Cef.GetGlobalCookieManager();
|
||||
//cookieManager.SetStoragePath(Environment.CurrentDirectory, true);
|
||||
var t = CEFBrowser.SetCookieAsync("jinritemai.com", cookie, cookieManager);
|
||||
|
||||
splitContainer1.Panel2.Controls.Add(cefWebBrowser);
|
||||
|
||||
Task.Run(() =>
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
Thread.Sleep(15000);
|
||||
|
||||
//var jsCode = "window.localStorage;";
|
||||
//var task = cefWebBrowser.GetMainFrame().EvaluateScriptAsync(jsCode, null);
|
||||
//task.Wait(5000);
|
||||
//var result = task.Result.Result;
|
||||
//var dic = result as IDictionary<string, object>;
|
||||
//GlobalConfig.dicLocalStorage = dic;
|
||||
//StartUp.SaveDouLocalStorage();
|
||||
}
|
||||
});
|
||||
|
||||
Task.Run(() =>
|
||||
{
|
||||
do
|
||||
{
|
||||
Thread.Sleep(10);
|
||||
}
|
||||
while (cefWebBrowser == null || !cefWebBrowser.IsBrowserInitialized || cefWebBrowser.IsLoading);
|
||||
|
||||
var jsCode = "";
|
||||
if (GlobalConfig.dicLocalStorage != null)
|
||||
{
|
||||
foreach (var key in GlobalConfig.dicLocalStorage.Keys)
|
||||
{
|
||||
if (GlobalConfig.dicLocalStorage[key] is string)
|
||||
{
|
||||
jsCode += "localStorage.setItem('" + key + "', '" + GlobalConfig.dicLocalStorage[key] + "');\r\n";
|
||||
}
|
||||
}
|
||||
var ta0 = cefWebBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(jsCode);
|
||||
ta0.Wait(5000);
|
||||
}
|
||||
|
||||
cefWebBrowser.Load("https://fxg.jinritemai.com/ffa/mshop/homepage/index");
|
||||
do
|
||||
{
|
||||
Thread.Sleep(1000);
|
||||
}
|
||||
while (cefWebBrowser.IsLoading);
|
||||
Thread.Sleep(AllBase.Randomx.GetId(5000, 6000));
|
||||
|
||||
var jsStr = clickJsElementStr + "getElement('精选联盟').click();";
|
||||
var ta2 = cefWebBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(jsStr);
|
||||
ta2.Wait(8000);
|
||||
do
|
||||
{
|
||||
Thread.Sleep(1000);
|
||||
}
|
||||
while (cefWebBrowser.IsLoading);
|
||||
Thread.Sleep(AllBase.Randomx.GetId(2000, 3000));
|
||||
|
||||
retry:
|
||||
jsStr = "window.location.href='" + darenUrl + "';";
|
||||
var ta3 = cefWebBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(jsStr);
|
||||
ta3.Wait(8000);
|
||||
do
|
||||
{
|
||||
Thread.Sleep(1000);
|
||||
}
|
||||
while (cefWebBrowser.IsLoading);
|
||||
Thread.Sleep(AllBase.Randomx.GetId(4000, 5000));
|
||||
|
||||
jsStr = clickJsElementStr +
|
||||
"function clickBtn(txt) {\r\n" +
|
||||
" if (document.body.innerHTML.indexOf('加载失败') >= 0)\r\n" +
|
||||
" return '加载失败';\r\n" +
|
||||
" return 'ok';\r\n" +
|
||||
"}\r\n" +
|
||||
"clickBtn('添加商品');\r\n";
|
||||
var ta4 = cefWebBrowser.GetBrowser().MainFrame.EvaluateScriptAsync(jsStr);
|
||||
ta4.Wait();
|
||||
if (ta4.Result?.Result?.ToString() == "加载失败" || ta4.Result?.Result?.ToString() == null)
|
||||
goto retry;
|
||||
|
||||
var sleepTime = 2500;
|
||||
while (true)
|
||||
{
|
||||
try
|
||||
{
|
||||
Thread.Sleep(sleepTime);
|
||||
var jsStr1 =
|
||||
"function ClosePopWindow(txt) {\r\n" +
|
||||
" var result = 'no_pop'\r\n" +
|
||||
" var item = document.getElementsByClassName(txt);\r\n" +
|
||||
" if (document.body.innerHTML.indexOf('重要消息') < 0) return result;\r\n" +
|
||||
" for(i = 0; i < item.length; i++) {\r\n" +
|
||||
" item[i].click();\r\n" +
|
||||
" result = 'success'\r\n" +
|
||||
" }\r\n" +
|
||||
" return result;\r\n" +
|
||||
"}\r\n" +
|
||||
"ClosePopWindow('anticon-close-circle');\r\n" +
|
||||
"ClosePopWindow('ant-modal-close-x');\r\n";
|
||||
var jsStr2 = "function clickPopWindow(txt) {\r\n"
|
||||
+ "var child = document.body.firstElementChild;\r\n"
|
||||
+ "var element1 = null;\r\n"
|
||||
+ " while (child) {\r\n"
|
||||
+ " if (child.innerHTML.indexOf(txt) >= 0) {\r\n"
|
||||
+ " element1 = child;\r\n"
|
||||
+ " if (child.firstElementChild) {\r\n"
|
||||
+ " child = child.firstElementChild; continue;\r\n"
|
||||
+ " } else break;\r\n"
|
||||
+ " }\r\n"
|
||||
+ " child = child.nextElementSibling;\r\n"
|
||||
+ " }\r\n"
|
||||
+ " if (element1 && element1.innerHTML === txt) {\r\n"
|
||||
+ " element1.click(); return 'success';\r\n"
|
||||
+ " } else return 'no_pop';\r\n"
|
||||
+ "}\r\n"
|
||||
//+ "clickPopWindow('我知道了');\r\n"
|
||||
+ "clickPopWindow('知道了');\r\n"
|
||||
+ "clickPopWindow('完 成');\r\n"
|
||||
+ "clickPopWindow('下一个');\r\n";
|
||||
var success1 = false;
|
||||
if (cefWebBrowser.IsBrowserInitialized && !cefWebBrowser.IsLoading)
|
||||
{
|
||||
var t1 = cefWebBrowser.GetMainFrame().EvaluateScriptAsync(jsStr1);
|
||||
t1.Wait(1000);
|
||||
var t2 = cefWebBrowser.GetMainFrame().EvaluateScriptAsync(jsStr2);
|
||||
t2.Wait(1000);
|
||||
if (t1.Result?.Result?.ToString() == "success" || t2.Result?.Result?.ToString() == "success")
|
||||
success1 = true;
|
||||
else
|
||||
success1 = false;
|
||||
}
|
||||
var success2 = false;
|
||||
if (cefWebBrowserDetail != null && cefWebBrowserDetail.IsBrowserInitialized && !cefWebBrowserDetail.IsLoading)
|
||||
{
|
||||
var t1 = cefWebBrowserDetail.GetMainFrame().EvaluateScriptAsync(jsStr1);
|
||||
t1.Wait(1000);
|
||||
var t2 = cefWebBrowserDetail.GetMainFrame().EvaluateScriptAsync(jsStr2);
|
||||
t2.Wait(1000);
|
||||
if (t1.Result?.Result?.ToString() == "success" || t2.Result?.Result?.ToString() == "success")
|
||||
success2 = true;
|
||||
else
|
||||
success2 = false;
|
||||
}
|
||||
if (success1 || success2)
|
||||
{
|
||||
sleepTime = Randomx.GetId(550, 650);
|
||||
}
|
||||
else
|
||||
sleepTime = Randomx.GetId(1500, 2000);
|
||||
}
|
||||
catch (Exception ex) { }
|
||||
}
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
//CEFBrowser.DeleteCookie(cefWebBrowser.RequestContext.GetCookieManager(null));
|
||||
CEFBrowser.DeleteCookie(Cef.GetGlobalCookieManager());
|
||||
|
||||
//var t = CEFBrowser.SetCookieAsync("jinritemai.com", cookie, cefWebBrowser.RequestContext.GetCookieManager(null));
|
||||
var t = CEFBrowser.SetCookieAsync("jinritemai.com", cookie, Cef.GetGlobalCookieManager());
|
||||
t.Wait(5000);
|
||||
|
||||
cefWebBrowser.Load(mainUrl);
|
||||
}
|
||||
}
|
||||
|
||||
private void LifeSapnHandler_OnPop(object sender, PopData e)
|
||||
{
|
||||
if (e.Url == "https://fxg.jinritemai.com/alliance/common/redirectBuyin?target_url=%2Fdashboard")
|
||||
{
|
||||
cefWebBrowser.Load(e.Url);
|
||||
return;
|
||||
}
|
||||
|
||||
string cookie = GlobalConfig.DouUserCookies;
|
||||
if (cefWebBrowserDetail == null)
|
||||
{
|
||||
//cefWebBrowserDetail = CEFBrowser.CreateChromiumWebBrowser(e.Url, false);
|
||||
cefWebBrowserDetail = CEFBrowser.CreateChromiumWebBrowser(e.Url);
|
||||
var lifeSapnHandler = new LifeSpanHandlerLocal(PopWindowType.NewTitleWindow);
|
||||
lifeSapnHandler.OnPop += LifeSapnHandler_OnPop;
|
||||
cefWebBrowserDetail.LifeSpanHandler = lifeSapnHandler;
|
||||
cefWebBrowserDetail.KeyboardHandler = new NaiBa.CefHelper.Handler.KeyboardHandler();
|
||||
cefWebBrowserDetail.FrameLoadEnd += CefWebBrowser_FrameLoadEnd;
|
||||
cefWebBrowserDetail.AddressChanged += CefWebBrowser_AddressChanged;
|
||||
cefWebBrowserDetail.Dock = DockStyle.Fill;
|
||||
|
||||
//var t = CEFBrowser.SetCookieAsync("jinritemai.com", cookie, cefWebBrowserDetail.RequestContext.GetCookieManager(null));
|
||||
//var t = CEFBrowser.SetCookieAsync("jinritemai.com", cookie, Cef.GetGlobalCookieManager());
|
||||
|
||||
Task.Run(() =>
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
Thread.Sleep(15000);
|
||||
|
||||
//var jsCode = "window.localStorage;";
|
||||
//var task = cefWebBrowserDetail.GetMainFrame().EvaluateScriptAsync(jsCode, null);
|
||||
//task.Wait(5000);
|
||||
//var result = task.Result.Result;
|
||||
//var dic = result as IDictionary<string, object>;
|
||||
//GlobalConfig.dicLocalDetailStorage = dic;
|
||||
//StartUp.SaveDouLocalDetailStorage();
|
||||
}
|
||||
});
|
||||
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
splitContainer1.Panel2.Controls.Add(cefWebBrowserDetail);
|
||||
btnDetailForm_Click(null, null);
|
||||
pnlDetailForm.Visible = true;
|
||||
}));
|
||||
}
|
||||
else
|
||||
{
|
||||
cefWebBrowserDetail.Load(e.Url);
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
btnDetailForm_Click(null, null);
|
||||
}));
|
||||
}
|
||||
|
||||
Task.Run(() =>
|
||||
{
|
||||
for (int i = 0; i < 1000 && (cefWebBrowserDetail.IsBrowserInitialized == false || cefWebBrowserDetail.IsLoading); i++)
|
||||
{
|
||||
Thread.Sleep(10);
|
||||
}
|
||||
|
||||
var jsCode = "";
|
||||
if (GlobalConfig.dicLocalDetailStorage != null)
|
||||
{
|
||||
foreach (var key in GlobalConfig.dicLocalDetailStorage.Keys)
|
||||
{
|
||||
if (GlobalConfig.dicLocalDetailStorage[key] is string)
|
||||
{
|
||||
jsCode += "localStorage.setItem('" + key + "', '" + GlobalConfig.dicLocalDetailStorage[key] + "');\r\n";
|
||||
}
|
||||
}
|
||||
cefWebBrowserDetail.GetBrowser().MainFrame.ExecuteJavaScriptAsync(jsCode);
|
||||
}
|
||||
|
||||
// 达人邀约
|
||||
if (drSetting.InviteType == InviteTypeEnum.Invite)
|
||||
{
|
||||
if (IsOpenDaRenPage)
|
||||
{
|
||||
while (cefWebBrowserDetail.IsLoading)
|
||||
Thread.Sleep(Randomx.GetId(500, 800));
|
||||
retry1:
|
||||
Thread.Sleep(Randomx.GetId(500, 1000));
|
||||
jsCode = "function jsFunc1() {" +
|
||||
" if (document.body.innerHTML.indexOf('>待回复</span>') > 0 || document.body.innerHTML.indexOf('>已同意</span>') > 0) " +
|
||||
" return 'had';" +
|
||||
" if (document.getElementsByClassName('contact-btn-text text4').length > 0) {" +
|
||||
" document.getElementsByClassName('contact-btn-text text4')[0].click(); " +
|
||||
" return 'ok';" +
|
||||
" }" +
|
||||
" return document.body.innerHTML.indexOf('加载失败,请稍后重试') >= 0 ? 'error' : 'noBtn'; " +
|
||||
"} " +
|
||||
"jsFunc1();";
|
||||
var t1 = cefWebBrowserDetail.GetBrowser().MainFrame.EvaluateScriptAsync(jsCode);
|
||||
t1.Wait(2000);
|
||||
if (t1.Result?.Result?.ToString() == "had")
|
||||
{
|
||||
IsOpenDaRenPage = false;
|
||||
return;
|
||||
}
|
||||
else if (t1.Result?.Result?.ToString() != "ok")
|
||||
{
|
||||
Thread.Sleep(Randomx.GetId(800, 1500));
|
||||
if (t1.Result?.Result?.ToString() == null || t1.Result?.Result?.ToString() == "error")
|
||||
{
|
||||
cefWebBrowserDetail.Reload();
|
||||
}
|
||||
goto retry1;
|
||||
}
|
||||
Thread.Sleep(Randomx.GetId(500, 800));
|
||||
}
|
||||
if (IsOpenDaRenPage)
|
||||
{
|
||||
Thread.Sleep(Randomx.GetId(500, 800));
|
||||
jsCode = "function jsFx() {var btns = document.getElementsByClassName('ant-btn ant-btn-primary');" +
|
||||
" for (i = 0; i < btns.length; i++) " +
|
||||
" {" +
|
||||
" if (btns[i].innerHTML.indexOf('我知道了') > 0)" +
|
||||
" {" +
|
||||
" btns[i].click();" +
|
||||
" }" +
|
||||
" }" +
|
||||
"} jsFx();";
|
||||
var tx = cefWebBrowserDetail.GetBrowser().MainFrame.EvaluateScriptAsync(jsCode);
|
||||
tx.Wait(2000);
|
||||
|
||||
Thread.Sleep(Randomx.GetId(500, 800));
|
||||
retry2:
|
||||
Thread.Sleep(Randomx.GetId(1200, 2400));
|
||||
jsCode = "function jsFunc2() { document.getElementsByClassName('text4 add-product-last-operate')[0].click(); return 'ok'} jsFunc2();";
|
||||
var t2 = cefWebBrowserDetail.GetBrowser().MainFrame.EvaluateScriptAsync(jsCode);
|
||||
t2.Wait(2000);
|
||||
if (t2.Result?.Result?.ToString() != "ok")
|
||||
{
|
||||
Thread.Sleep(Randomx.GetId(300, 500));
|
||||
goto retry2;
|
||||
}
|
||||
Thread.Sleep(Randomx.GetId(500, 800));
|
||||
}
|
||||
if (IsOpenDaRenPage)
|
||||
{
|
||||
Thread.Sleep(Randomx.GetId(500, 800));
|
||||
jsCode = "function jsFunc3() {" +
|
||||
" var btns = document.getElementsByClassName('auxo-btn auxo-btn-primary');" +
|
||||
" for (i = 0; i < btns.length; i++) " +
|
||||
" {" +
|
||||
" if (btns[i].innerHTML.indexOf('发送邀约') > 0)" +
|
||||
" {" +
|
||||
" btns[i].click(); return 'ok';" +
|
||||
" }" +
|
||||
" }" +
|
||||
"} " +
|
||||
"jsFunc3();";
|
||||
var t3 = cefWebBrowserDetail.GetBrowser().MainFrame.EvaluateScriptAsync(jsCode);
|
||||
t3.Wait(2000);
|
||||
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
this.txtSuccessCount.Text = (Convert.ToInt32(this.txtSuccessCount.Text) + 1).ToString();
|
||||
}));
|
||||
IsOpenDaRenPage = false;
|
||||
}
|
||||
}
|
||||
// 在线沟通
|
||||
else
|
||||
{
|
||||
// 点击沟通按钮
|
||||
if (IsOpenDaRenPage)
|
||||
{
|
||||
chatRetry:
|
||||
while (cefWebBrowserDetail.IsLoading)
|
||||
Thread.Sleep(Randomx.GetId(500, 1000));
|
||||
jsCode = "function jsFunc1() { " +
|
||||
" if (document.body.innerHTML.indexOf('>待回复</span>') > 0 || document.body.innerHTML.indexOf('>已同意</span>') > 0) {" +
|
||||
" return 'had';" +
|
||||
" }" +
|
||||
" var btns = document.getElementsByClassName('contact-btn-text text4');" +
|
||||
" for (i = 0; i < btns.length; i++) {" +
|
||||
" if (btns[i].innerHTML.indexOf('在线沟通') >= 0) {" +
|
||||
" btns[i].click(); return 'ok';" +
|
||||
" }" +
|
||||
" }" +
|
||||
" return document.body.innerHTML.indexOf('加载失败,请稍后重试') >= 0 ? 'error' : 'noBtn'; " +
|
||||
"}" +
|
||||
"jsFunc1();";
|
||||
var t1 = cefWebBrowserDetail.GetBrowser().MainFrame.EvaluateScriptAsync(jsCode);
|
||||
t1.Wait(2000);
|
||||
if (t1.Result?.Result?.ToString() == "had")
|
||||
{
|
||||
IsOpenDaRenPage = false;
|
||||
return;
|
||||
}
|
||||
else if (t1.Result?.Result?.ToString() != "ok")
|
||||
{
|
||||
Thread.Sleep(Randomx.GetId(800, 1500));
|
||||
if (t1.Result?.Result?.ToString() == "error")
|
||||
{
|
||||
cefWebBrowserDetail.Reload();
|
||||
}
|
||||
goto chatRetry;
|
||||
}
|
||||
Thread.Sleep(Randomx.GetId(500, 800));
|
||||
}
|
||||
|
||||
// 点击沟通对话框
|
||||
if (IsOpenDaRenPage)
|
||||
{
|
||||
chatRetry:
|
||||
while (cefWebBrowserDetail.IsLoading)
|
||||
Thread.Sleep(Randomx.GetId(500, 1000));
|
||||
Thread.Sleep(2500);
|
||||
jsCode = "function jsFuncChat() {" +
|
||||
" if (document.getElementsByClassName('im-textarea text-area')[0]) {" +
|
||||
" var txt1 = document.getElementsByClassName('im-textarea text-area')[0];" +
|
||||
" txt1.focus(); txt1.click(); txt1.innerHTML = '" + drSetting.ChatWords + " ';" +
|
||||
" return 'ok';" +
|
||||
" }" +
|
||||
" return 'noBtn'" +
|
||||
"}" +
|
||||
"jsFuncChat();";
|
||||
var t1 = cefWebBrowserDetail.GetBrowser().MainFrame.EvaluateScriptAsync(jsCode);
|
||||
t1.Wait(2000);
|
||||
if (t1.Result?.Result?.ToString() != "ok")
|
||||
{
|
||||
Thread.Sleep(Randomx.GetId(300, 500));
|
||||
if (t1.Result?.Result?.ToString() == null || t1.Result?.Result?.ToString() == "error")
|
||||
{
|
||||
//cefWebBrowserDetail.Reload();
|
||||
}
|
||||
goto chatRetry;
|
||||
}
|
||||
Thread.Sleep(Randomx.GetId(500, 800));
|
||||
|
||||
chatSendRetry:
|
||||
|
||||
var host = cefWebBrowserDetail.GetBrowser().GetHost();
|
||||
host.SendKeyEvent(new CefSharp.KeyEvent() { WindowsKeyCode = 8, Type = KeyEventType.RawKeyDown, Modifiers = CefEventFlags.None });
|
||||
Thread.Sleep(250 + new Random(DateTime.Now.Millisecond).Next(250));
|
||||
|
||||
while (cefWebBrowserDetail.IsLoading)
|
||||
Thread.Sleep(Randomx.GetId(500, 1000));
|
||||
while (true)
|
||||
{
|
||||
break;
|
||||
}
|
||||
Thread.Sleep(2500);
|
||||
jsCode = "function jsFuncChatSend() { " +
|
||||
" document.getElementsByClassName('send-button')[0].click();" +
|
||||
" return 'ok';" +
|
||||
"}" +
|
||||
"jsFuncChatSend();";
|
||||
var t2 = cefWebBrowserDetail.GetBrowser().MainFrame.EvaluateScriptAsync(jsCode);
|
||||
t2.Wait(2000);
|
||||
if (t2.Result?.Result?.ToString() != "ok")
|
||||
{
|
||||
Thread.Sleep(Randomx.GetId(300, 500));
|
||||
if (t2.Result?.Result?.ToString() == null || t2.Result?.Result?.ToString() == "error")
|
||||
{
|
||||
//cefWebBrowserDetail.Reload();
|
||||
}
|
||||
goto chatSendRetry;
|
||||
}
|
||||
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
this.txtSuccessCount.Text = (Convert.ToInt32(this.txtSuccessCount.Text) + 1).ToString();
|
||||
}));
|
||||
IsOpenDaRenPage = false;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void CefWebBrowser_AddressChanged(object sender, CefSharp.AddressChangedEventArgs e)
|
||||
{
|
||||
Invoke(new Action(() => { this.textBox3.Text = e.Address; }));
|
||||
if (e.Address.Contains("https://buyin.jinritemai.com/dashboard")) //https://fxg.jinritemai.com/ffa/mshop/homepage/index
|
||||
{
|
||||
Task.Run(() =>
|
||||
{
|
||||
//AllBase.Helper.GlobalConfig.DouUserCookies = CEFBrowser.GetCookie("", cefWebBrowser.RequestContext.GetCookieManager(null));
|
||||
GlobalConfig.DouUserCookies = CEFBrowser.GetCookie("jinritemai.com", Cef.GetGlobalCookieManager());
|
||||
StartUp.SaveDouUserCookies();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private void CefWebBrowser_FrameLoadEnd(object sender, CefSharp.FrameLoadEndEventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
//int totalPage = 10;
|
||||
int currentPage = 1;
|
||||
//int pageTimeInterval = 10; // 翻页间隔秒数
|
||||
private void btnSend_Click(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
this.txtSuccessCount.Text = "0";
|
||||
Task.Run(() => { GetDaRen(); });
|
||||
}
|
||||
catch
|
||||
{
|
||||
BaseMsgForm.ShowError("请注意参数格式。");
|
||||
}
|
||||
}
|
||||
|
||||
void GetDaRen()
|
||||
{
|
||||
while (currentPage <= drSetting.TotalPage)
|
||||
{
|
||||
var html = GetCefHtml(cefWebBrowser);
|
||||
var items = BaseRegex.GetMatchRegex(ref html, "data-item-uid=\"([\\s\\S]+?)\"");
|
||||
List<string> daRenIdList = new List<string>();
|
||||
foreach (Match m in items)
|
||||
{
|
||||
daRenIdList.Add(m.Groups[1].ToString());
|
||||
}
|
||||
|
||||
var jsCode = "";
|
||||
for (int i = 0; i < daRenIdList.Count; i++)
|
||||
{
|
||||
Invoke(new Action(() => { btnMainForm_Click(null, null); }));
|
||||
jsCode = "document.getElementsByClassName('daren-card')[" + i + "].click();";
|
||||
cefWebBrowser.GetMainFrame().EvaluateScriptAsync(jsCode, null);
|
||||
//i += 20; // 测试翻页
|
||||
|
||||
IsOpenDaRenPage = true;
|
||||
while (IsOpenDaRenPage)
|
||||
{
|
||||
Thread.Sleep(50);
|
||||
}
|
||||
//while (cefWebBrowserDetail == null || !daRenIdList.Any(d => cefWebBrowserDetail.Address.Contains(d)))
|
||||
//{
|
||||
// Thread.Sleep(50);
|
||||
//}
|
||||
//while (cefWebBrowserDetail.IsLoading)
|
||||
//{
|
||||
// Thread.Sleep(50);
|
||||
//}
|
||||
|
||||
Thread.Sleep(drSetting.Interval * Randomx.GetId(1000, 1200));
|
||||
}
|
||||
|
||||
Invoke(new Action(() => { btnMainForm_Click(null, null); }));
|
||||
Thread.Sleep(Randomx.GetId(1000, 1200));
|
||||
jsCode = "document.getElementsByClassName('anticon anticon-right')[0].click();";
|
||||
cefWebBrowser.GetMainFrame().EvaluateScriptAsync(jsCode, null);
|
||||
Thread.Sleep(drSetting.PageInterval * Randomx.GetId(1000, 1200));
|
||||
currentPage++;
|
||||
Invoke(new Action(() => { txtCurrentPage.Text = "" + currentPage; }));
|
||||
}
|
||||
}
|
||||
|
||||
string GetCefHtml(ChromiumWebBrowser browser)
|
||||
{
|
||||
if (browser.IsBrowserInitialized)
|
||||
{
|
||||
var task = browser.GetBrowser().MainFrame.GetSourceAsync();
|
||||
task.Wait();
|
||||
Thread.Sleep(50);
|
||||
return task.Result;
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
private void btnMainForm_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (cefWebBrowser != null)
|
||||
cefWebBrowser.BringToFront();
|
||||
|
||||
pnlDetailForm.Style.BackColor1.Color = pnlDetailForm.Style.BackColor2.Color = Color.FromArgb(175, 210, 255);
|
||||
pnlMainForm.Style.BackColor1.Color = pnlMainForm.Style.BackColor2.Color = Color.White;
|
||||
pnlDetailForm.Location = new Point(pnlDetailForm.Location.X, 44);
|
||||
pnlMainForm.Location = new Point(pnlMainForm.Location.X, 42);
|
||||
}
|
||||
|
||||
private void btnDetailForm_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (cefWebBrowserDetail != null)
|
||||
cefWebBrowserDetail.BringToFront();
|
||||
|
||||
pnlDetailForm.Style.BackColor1.Color = pnlDetailForm.Style.BackColor2.Color = Color.White;
|
||||
pnlMainForm.Style.BackColor1.Color = pnlMainForm.Style.BackColor2.Color = Color.FromArgb(175, 210, 255);
|
||||
pnlDetailForm.Location = new Point(pnlDetailForm.Location.X, 42);
|
||||
pnlMainForm.Location = new Point(pnlMainForm.Location.X, 44);
|
||||
}
|
||||
|
||||
private void btnLoginDouyin_Click(object sender, EventArgs e)
|
||||
{
|
||||
string cookie = "";
|
||||
var shop = GlobalConfig.DouShopLoginList.FirstOrDefault(s => s.ShopAccount == cmbShop.SelectedItem.ToString());
|
||||
if (shop != null)
|
||||
cookie = shop.Cookies;
|
||||
InitCef(cookie);
|
||||
}
|
||||
|
||||
private void rbInvite_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (rbInvite.Checked)
|
||||
{
|
||||
drSetting.InviteType = InviteTypeEnum.Invite;
|
||||
SaveDRSetting();
|
||||
}
|
||||
}
|
||||
|
||||
private void rbChat_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (rbChat.Checked)
|
||||
{
|
||||
drSetting.InviteType = InviteTypeEnum.Chat;
|
||||
SaveDRSetting();
|
||||
}
|
||||
}
|
||||
|
||||
private void txtChatWords_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
drSetting.ChatWords = txtChatWords.Text;
|
||||
SaveDRSetting();
|
||||
}
|
||||
|
||||
private void txtInterval_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (txtInterval.Text.ParseToInt() < 10)
|
||||
txtInterval.Text = "10";
|
||||
drSetting.Interval = drSetting.PageInterval = txtInterval.Text.ParseToInt();
|
||||
SaveDRSetting();
|
||||
}
|
||||
|
||||
private void txtTotalPage_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
drSetting.TotalPage = txtInterval.Text.ParseToInt();
|
||||
SaveDRSetting();
|
||||
}
|
||||
|
||||
private void SaveDRSetting()
|
||||
{
|
||||
NaiBa.Util.Helper.ConfigHelper.SaveConfig("daren_settings", drSetting);
|
||||
}
|
||||
|
||||
private void textBox3_KeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
if (e.KeyCode == Keys.Enter)
|
||||
{
|
||||
cefWebBrowser.Load(textBox3.Text);
|
||||
}
|
||||
}
|
||||
|
||||
public string clickJsElementStr = "function getElement(txt, elem) {\r\n" +
|
||||
" var child = document.body.firstElementChild;\r\n" +
|
||||
" if (elem) child = elem\r\n" +
|
||||
" var element1 = null;\r\n" +
|
||||
" while (child) {\r\n" +
|
||||
" if (child.innerHTML.indexOf(txt) >= 0) {\r\n" +
|
||||
" element1 = child;\r\n" +
|
||||
" if (child.firstElementChild) {\r\n" +
|
||||
" child = child.firstElementChild; continue;\r\n" +
|
||||
" } else break;\r\n" +
|
||||
" }\r\n" +
|
||||
" child = child.nextElementSibling;\r\n" +
|
||||
" }\r\n" +
|
||||
" if (element1) {\r\n" +
|
||||
" return element1;\r\n" +
|
||||
" } else return error;\r\n" +
|
||||
"}\r\n";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
<?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>
|
||||
<metadata name="splitContainer1.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
</root>
|
||||
Reference in new issue
Block a user