temu客户端程序

This commit is contained in:
wule committed 2025-06-29 19:38:31 +08:00
commit 4aaf264e89
694 files changed
+263780

No files matched your search

+91
View File
@@ -0,0 +1,91 @@
using AllBase;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace LittleRabbit.LittleRabbitForms.BaseForms
{
public partial class BaseMsgForm : LRBaseForm
{
public BaseMsgForm()
{
InitializeComponent();
this.ShowMinimizedBox = false;
this.AcceptButton = pnlConfirm;
}
public static BaseMsgForm ShowInfo(string msg, string caption = "", FormLevel fl = FormLevel.MEDIUM)
{
string title = string.IsNullOrEmpty(caption) ? "系统提示" : caption;
BaseMsgForm msgBox = CreateMsgForm(msg, fl, title);
msgBox.picTip.Image = global::LittleRabbit.Properties.Resources.BaseMsgInfo;
msgBox.ShowDialog();
return msgBox;
}
private static BaseMsgForm CreateMsgForm(string msg, FormLevel fl, string title)
{
BaseMsgForm msgBox = new BaseMsgForm { Text = title, lblMsg = { Text = msg }, TitleText = title };
if (fl.Equals(FormLevel.LARGE))
{
msgBox.Width = (int)FormLevel.LARGE;
msgBox.Height = 280;
}
msgBox.pnlConfirm.Location = msgBox.pnlCancel.Location; // 把确认按钮移到取消按钮上面
msgBox.pnlCancel.Visible = false;
return msgBox;
}
public static BaseMsgForm ShowError(string msg, string caption = "", FormLevel fl = FormLevel.MEDIUM)
{
string title = string.IsNullOrEmpty(caption) ? "系统错误" : caption;
BaseMsgForm msgBox = CreateMsgForm(msg, fl, title);
msgBox.picTip.Image = global::LittleRabbit.Properties.Resources.BaseMsgErr;
msgBox.ShowDialog();
return msgBox;
}
public static BaseMsgForm ShowConfirm(string msg, string caption = "", FormLevel fl = FormLevel.MEDIUM, bool isTopMost = false)
{
string title = string.IsNullOrEmpty(caption) ? "系统提示确认" : caption;
BaseMsgForm msgBox = new BaseMsgForm
{
Text = title,
lblMsg = { Text = msg },
TitleText = title,
picTip = { Image = global::LittleRabbit.Properties.Resources.BaseMsgQue },
TopMost = isTopMost
};
if (fl.Equals(FormLevel.LARGE))
{
msgBox.Width = (int)FormLevel.LARGE;
}
msgBox.ShowDialog();
return msgBox;
}
private void PnlConfirm_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.OK;
}
private void PnlCancel_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.Cancel;
}
}
public enum FormLevel
{
SMALL,
MEDIUM,
LARGE = 500
}
}
+143
View File
@@ -0,0 +1,143 @@
namespace LittleRabbit.LittleRabbitForms.BaseForms
{
partial class BaseMsgForm
{
/// <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.panel2 = new System.Windows.Forms.Panel();
this.pnlCancel = new DevComponents.DotNetBar.PanelEx();
this.pnlConfirm = new DevComponents.DotNetBar.PanelEx();
this.picTip = new System.Windows.Forms.PictureBox();
this.lblMsg = new System.Windows.Forms.Label();
this.panel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.picTip)).BeginInit();
this.SuspendLayout();
//
// panel2
//
this.panel2.BackColor = System.Drawing.Color.White;
this.panel2.Controls.Add(this.pnlCancel);
this.panel2.Controls.Add(this.pnlConfirm);
this.panel2.Controls.Add(this.picTip);
this.panel2.Controls.Add(this.lblMsg);
this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel2.Location = new System.Drawing.Point(1, 33);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(386, 183);
this.panel2.TabIndex = 1;
//
// pnlCancel
//
this.pnlCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.pnlCancel.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.pnlCancel.Cursor = System.Windows.Forms.Cursors.Hand;
this.pnlCancel.DisabledBackColor = System.Drawing.Color.Empty;
this.pnlCancel.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.pnlCancel.Location = new System.Drawing.Point(284, 132);
this.pnlCancel.Name = "pnlCancel";
this.pnlCancel.Size = new System.Drawing.Size(80, 30);
this.pnlCancel.Style.Alignment = System.Drawing.StringAlignment.Center;
this.pnlCancel.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
this.pnlCancel.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
this.pnlCancel.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
this.pnlCancel.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.pnlCancel.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Custom;
this.pnlCancel.Style.ForeColor.Color = System.Drawing.Color.Black;
this.pnlCancel.Style.GradientAngle = 90;
this.pnlCancel.TabIndex = 27;
this.pnlCancel.Text = "取 消";
this.pnlCancel.Click += new System.EventHandler(this.PnlCancel_Click);
//
// pnlConfirm
//
this.pnlConfirm.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.pnlConfirm.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.pnlConfirm.Cursor = System.Windows.Forms.Cursors.Hand;
this.pnlConfirm.DisabledBackColor = System.Drawing.Color.Empty;
this.pnlConfirm.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.pnlConfirm.Location = new System.Drawing.Point(167, 132);
this.pnlConfirm.Name = "pnlConfirm";
this.pnlConfirm.Size = new System.Drawing.Size(80, 30);
this.pnlConfirm.Style.Alignment = System.Drawing.StringAlignment.Center;
this.pnlConfirm.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.pnlConfirm.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.pnlConfirm.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.pnlConfirm.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.pnlConfirm.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.pnlConfirm.Style.ForeColor.Color = System.Drawing.Color.White;
this.pnlConfirm.Style.GradientAngle = 90;
this.pnlConfirm.TabIndex = 26;
this.pnlConfirm.Text = "确 定";
this.pnlConfirm.Click += new System.EventHandler(this.PnlConfirm_Click);
//
// picTip
//
this.picTip.Location = new System.Drawing.Point(21, 33);
this.picTip.Name = "picTip";
this.picTip.Size = new System.Drawing.Size(64, 64);
this.picTip.TabIndex = 19;
this.picTip.TabStop = false;
//
// lblMsg
//
this.lblMsg.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.lblMsg.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblMsg.Location = new System.Drawing.Point(110, 17);
this.lblMsg.Name = "lblMsg";
this.lblMsg.Size = new System.Drawing.Size(254, 100);
this.lblMsg.TabIndex = 18;
this.lblMsg.Text = "信息";
this.lblMsg.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// BaseMsgForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(388, 217);
this.Controls.Add(this.panel2);
this.Name = "BaseMsgForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "BaseMsgForm";
this.TitleText = "BaseMsgForm";
this.Controls.SetChildIndex(this.panel2, 0);
this.panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.picTip)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Panel panel2;
private DevComponents.DotNetBar.PanelEx pnlCancel;
private DevComponents.DotNetBar.PanelEx pnlConfirm;
private System.Windows.Forms.PictureBox picTip;
private System.Windows.Forms.Label lblMsg;
}
}
+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>
+361
View File
@@ -0,0 +1,361 @@
using AllBase;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace LittleRabbit.LittleRabbitForms.BaseForms
{
public partial class LRBaseForm : Form
{
const int WM_NCHITTEST = 0x0084;
const int HTLEFT = 10; //左边界
const int HTRIGHT = 11; //右边界
const int HTTOP = 12; //上边界
const int HTTOPLEFT = 13; //左上角
const int HTTOPRIGHT = 14; //右上角
const int HTBOTTOM = 15; //下边界
const int HTBOTTOMLEFT = 0x10; //左下角
const int HTBOTTOMRIGHT = 17; //右下角
public bool Dragable { get; set; } = true;
protected override void WndProc(ref Message m)
{
switch (m.Msg)
{
case WM_NCHITTEST:
base.WndProc(ref m);
Point vPoint = new Point((int)m.LParam & 0xFFFF,
(int)m.LParam >> 16 & 0xFFFF);
vPoint = PointToClient(vPoint);
if (vPoint.X <= 5)
if (vPoint.Y <= 5)
m.Result = (IntPtr)HTTOPLEFT;
else if (vPoint.Y >= ClientSize.Height - 5)
m.Result = (IntPtr)HTBOTTOMLEFT;
else m.Result = (IntPtr)HTLEFT;
else if (vPoint.X >= ClientSize.Width - 5)
if (vPoint.Y <= 5)
m.Result = (IntPtr)HTTOPRIGHT;
else if (vPoint.Y >= ClientSize.Height - 5)
m.Result = (IntPtr)HTBOTTOMRIGHT;
else m.Result = (IntPtr)HTRIGHT;
else if (vPoint.Y <= 5)
m.Result = (IntPtr)HTTOP;
else if (vPoint.Y >= ClientSize.Height - 5)
m.Result = (IntPtr)HTBOTTOM;
break;
default:
base.WndProc(ref m);
break;
}
this.Resize += LRBaseForm_Resize;
}
private void LRBaseForm_Resize(object sender, EventArgs e)
{
if (WindowState == FormWindowState.Maximized)
{
pbMaxBase.Visible = false;
pbNormalBase.Visible = true;
if (showMinimizedBox)
pbMinBase.Visible = true;
}
else if (WindowState == FormWindowState.Minimized)
{
}
else
{
if (showMaximizeBox)
pbMaxBase.Visible = true;
pbNormalBase.Visible = false;
if (showMinimizedBox)
pbMinBase.Visible = true;
}
if (!showMinimizedBox)
this.pbMinBase.Visible = false;
if (!showMaximizeBox)
{
this.pbMaxBase.Visible = false;
this.pbNormalBase.Visible = false;
}
}
public LRBaseForm()
{
InitializeComponent();
this.MaximumSize = new Size(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height);
}
private void LcBaseForm_Load(object sender, EventArgs e)
{
if (BaseClass.Ico != null)
Iconx = Icon = BaseClass.Ico;
else
Iconx = this.Icon = BaseClass.Ico = ImageBuild.ConvertToIcon(global::LittleRabbit.Properties.Resources.icon);
if (!this.ShowIcon)
{
this.pbLogo.Visible = false;
this.lbTitle.Location = new Point(this.pbLogo.Location.X, this.lbTitle.Location.Y);
}
if (this.ShowMaximizeBox)
{
if (this.WindowState == FormWindowState.Maximized)
{
this.pbMaxBase.Visible = false;
this.pbNormalBase.Visible = true;
}
else
{
this.pbMaxBase.Visible = true;
this.pbNormalBase.Visible = false;
}
}
if (this.TopLevel || DesignMode)
{
this.Padding = new Padding(1);
this.panel1.Visible = true;
}
else
{
this.Padding = new Padding(0);
this.panel1.Visible = false;
}
}
private void PictureBox2_Click(object sender, EventArgs e)
{
WindowState = FormWindowState.Minimized;
}
public virtual void PictureBox1_Click(object sender, EventArgs e)
{
//pictureBox3.Image?.Dispose();
Close();
}
private Icon _iconx;
public Icon Iconx
{
set
{
_iconx = value;
if (_iconx == null) return;
pbLogo.Image = _iconx.ToBitmap();
}
}
private bool showMinimizedBox = true;
[Browsable(true), Description("显示最小化按钮"), Category("自定义分组")]
public bool ShowMinimizedBox
{
get
{
return showMinimizedBox;
}
set
{
this.showMinimizedBox = value;
}
}
private bool showMaximizeBox = false;
[Browsable(true), Description("显示最大化按钮"), Category("自定义分组")]
public bool ShowMaximizeBox
{
get { return showMaximizeBox; }
set
{
showMaximizeBox = value;
if (showMaximizeBox)
{
if (this.WindowState == FormWindowState.Maximized)
{
this.pbMaxBase.Visible = false;
this.pbNormalBase.Visible = true;
}
else
{
this.pbMaxBase.Visible = true;
this.pbNormalBase.Visible = false;
}
}
else
{
this.pbMaxBase.Visible = false;
this.pbNormalBase.Visible = false;
}
}
}
public string TitleText
{
get
{
return Text;
}
set
{
lbTitle.Text = Text = value;
}
}
private Point mouseOffset;//记录鼠标指针的坐标
private bool isMouseDown;//记录鼠标左键是否按下
private void Panel1_MouseMove(object sender, MouseEventArgs e)
{
if (isMouseDown && Dragable)
{
//获取鼠标的位置
Point mousePos = MousePosition;
mousePos.Offset(mouseOffset.X, mouseOffset.Y);
Location = mousePos;
}
}
private void Panel1_MouseDown(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
mouseOffset = new Point(-e.X, -e.Y);
isMouseDown = true;
}
}
private void Panel1_MouseUp(object sender, MouseEventArgs e)
{
isMouseDown = false;
}
private void PictureBox1_MouseHover(object sender, EventArgs e)
{
this.pbCloseBase.Image = global::LittleRabbit.Properties.Resources.close_hover;
this.Cursor = Cursors.Hand;
}
private void PictureBox1_MouseLeave(object sender, EventArgs e)
{
this.pbCloseBase.Image = global::LittleRabbit.Properties.Resources.close;
this.Cursor = Cursors.Default;
}
private void PictureBox2_MouseHover(object sender, EventArgs e)
{
this.pbMinBase.Image = global::LittleRabbit.Properties.Resources.min_hover;
this.Cursor = Cursors.Hand;
}
private void PictureBox2_MouseLeave(object sender, EventArgs e)
{
this.pbMinBase.Image = global::LittleRabbit.Properties.Resources.min;
this.Cursor = Cursors.Default;
}
public virtual void HideTitle()
{
this.panel1.Visible = false;
}
#region 窗体提交数据完成事件
public event Action<object> SaveComplete;
protected virtual void OnSaveComplete(object param)
{
this.SaveComplete?.Invoke(param);
}
public event Action<object, object> SaveCompleteWithDescribe;
protected virtual void OnSaveComplete(object param, object describe)
{
this.SaveCompleteWithDescribe?.Invoke(param, describe);
}
#endregion
private void pbNormalBase_Click(object sender, EventArgs e)
{
WindowState = FormWindowState.Normal;
this.pbMaxBase.Visible = true;
this.pbNormalBase.Visible = false;
}
private void pbNormalBase_MouseHover(object sender, EventArgs e)
{
this.pbNormalBase.Image = global::LittleRabbit.Properties.Resources.normal_hover;
this.Cursor = Cursors.Hand;
}
private void pbNormalBase_MouseLeave(object sender, EventArgs e)
{
this.pbNormalBase.Image = global::LittleRabbit.Properties.Resources.normal;
this.Cursor = Cursors.Default;
}
private void pbMaxBase_Click(object sender, EventArgs e)
{
WindowState = FormWindowState.Maximized;
this.pbMaxBase.Visible = false;
this.pbNormalBase.Visible = true;
}
private void pbMaxBase_MouseHover(object sender, EventArgs e)
{
this.pbMaxBase.Image = global::LittleRabbit.Properties.Resources.max_hover;
this.Cursor = Cursors.Hand;
}
private void pbMaxBase_MouseLeave(object sender, EventArgs e)
{
this.pbMaxBase.Image = global::LittleRabbit.Properties.Resources.max;
this.Cursor = Cursors.Default;
}
private void lbTitle_MouseDown(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
mouseOffset = new Point(-e.X, -e.Y);
isMouseDown = true;
}
}
private void lbTitle_MouseMove(object sender, MouseEventArgs e)
{
if (isMouseDown && Dragable)
{
var control = sender as Control;
if (control == null)
return;
//获取鼠标的位置
Point mousePos = MousePosition;
var x = mouseOffset.X;
var y = mouseOffset.Y;
while (control.Parent != null && control.Parent != this)
{
x -= control.Location.X;
y -= control.Location.Y;
control = control.Parent;
}
mousePos.Offset(x, y);
Location = mousePos;
}
}
private void lbTitle_MouseUp(object sender, MouseEventArgs e)
{
isMouseDown = false;
}
}
}
+181
View File
@@ -0,0 +1,181 @@
namespace LittleRabbit.LittleRabbitForms.BaseForms
{
partial class LRBaseForm
{
/// <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.panel1 = new System.Windows.Forms.Panel();
this.pbMinBase = new System.Windows.Forms.PictureBox();
this.pbNormalBase = new System.Windows.Forms.PictureBox();
this.pbMaxBase = new System.Windows.Forms.PictureBox();
this.pbLogo = new System.Windows.Forms.PictureBox();
this.lbTitle = new System.Windows.Forms.Label();
this.pbCloseBase = new System.Windows.Forms.PictureBox();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pbMinBase)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pbNormalBase)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pbMaxBase)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pbLogo)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pbCloseBase)).BeginInit();
this.SuspendLayout();
//
// panel1
//
this.panel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.panel1.Controls.Add(this.pbMinBase);
this.panel1.Controls.Add(this.pbNormalBase);
this.panel1.Controls.Add(this.pbMaxBase);
this.panel1.Controls.Add(this.pbLogo);
this.panel1.Controls.Add(this.lbTitle);
this.panel1.Controls.Add(this.pbCloseBase);
this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
this.panel1.Location = new System.Drawing.Point(1, 1);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(657, 32);
this.panel1.TabIndex = 0;
this.panel1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.Panel1_MouseDown);
this.panel1.MouseMove += new System.Windows.Forms.MouseEventHandler(this.Panel1_MouseMove);
this.panel1.MouseUp += new System.Windows.Forms.MouseEventHandler(this.Panel1_MouseUp);
//
// pbMinBase
//
this.pbMinBase.Dock = System.Windows.Forms.DockStyle.Right;
this.pbMinBase.Image = global::LittleRabbit.Properties.Resources.min;
this.pbMinBase.Location = new System.Drawing.Point(529, 0);
this.pbMinBase.Name = "pbMinBase";
this.pbMinBase.Size = new System.Drawing.Size(32, 32);
this.pbMinBase.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
this.pbMinBase.TabIndex = 1;
this.pbMinBase.TabStop = false;
this.pbMinBase.Click += new System.EventHandler(this.PictureBox2_Click);
this.pbMinBase.MouseLeave += new System.EventHandler(this.PictureBox2_MouseLeave);
this.pbMinBase.MouseHover += new System.EventHandler(this.PictureBox2_MouseHover);
//
// pbNormalBase
//
this.pbNormalBase.Dock = System.Windows.Forms.DockStyle.Right;
this.pbNormalBase.Image = global::LittleRabbit.Properties.Resources.normal;
this.pbNormalBase.Location = new System.Drawing.Point(561, 0);
this.pbNormalBase.Name = "pbNormalBase";
this.pbNormalBase.Size = new System.Drawing.Size(32, 32);
this.pbNormalBase.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
this.pbNormalBase.TabIndex = 6;
this.pbNormalBase.TabStop = false;
this.pbNormalBase.Visible = false;
this.pbNormalBase.Click += new System.EventHandler(this.pbNormalBase_Click);
this.pbNormalBase.MouseLeave += new System.EventHandler(this.pbNormalBase_MouseLeave);
this.pbNormalBase.MouseHover += new System.EventHandler(this.pbNormalBase_MouseHover);
//
// pbMaxBase
//
this.pbMaxBase.Dock = System.Windows.Forms.DockStyle.Right;
this.pbMaxBase.Image = global::LittleRabbit.Properties.Resources.max;
this.pbMaxBase.Location = new System.Drawing.Point(593, 0);
this.pbMaxBase.Name = "pbMaxBase";
this.pbMaxBase.Size = new System.Drawing.Size(32, 32);
this.pbMaxBase.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
this.pbMaxBase.TabIndex = 5;
this.pbMaxBase.TabStop = false;
this.pbMaxBase.Visible = false;
this.pbMaxBase.Click += new System.EventHandler(this.pbMaxBase_Click);
this.pbMaxBase.MouseLeave += new System.EventHandler(this.pbMaxBase_MouseLeave);
this.pbMaxBase.MouseHover += new System.EventHandler(this.pbMaxBase_MouseHover);
//
// pbLogo
//
this.pbLogo.BackColor = System.Drawing.Color.Transparent;
this.pbLogo.Image = global::LittleRabbit.Properties.Resources.icon;
this.pbLogo.Location = new System.Drawing.Point(5, 4);
this.pbLogo.Name = "pbLogo";
this.pbLogo.Size = new System.Drawing.Size(23, 23);
this.pbLogo.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
this.pbLogo.TabIndex = 3;
this.pbLogo.TabStop = false;
//
// lbTitle
//
this.lbTitle.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.lbTitle.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lbTitle.ForeColor = System.Drawing.Color.White;
this.lbTitle.Location = new System.Drawing.Point(31, 7);
this.lbTitle.Name = "lbTitle";
this.lbTitle.Size = new System.Drawing.Size(588, 17);
this.lbTitle.TabIndex = 2;
this.lbTitle.Text = "label1";
this.lbTitle.MouseDown += new System.Windows.Forms.MouseEventHandler(this.lbTitle_MouseDown);
this.lbTitle.MouseMove += new System.Windows.Forms.MouseEventHandler(this.lbTitle_MouseMove);
this.lbTitle.MouseUp += new System.Windows.Forms.MouseEventHandler(this.lbTitle_MouseUp);
//
// pbCloseBase
//
this.pbCloseBase.Dock = System.Windows.Forms.DockStyle.Right;
this.pbCloseBase.Image = global::LittleRabbit.Properties.Resources.close;
this.pbCloseBase.Location = new System.Drawing.Point(625, 0);
this.pbCloseBase.Name = "pbCloseBase";
this.pbCloseBase.Size = new System.Drawing.Size(32, 32);
this.pbCloseBase.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
this.pbCloseBase.TabIndex = 0;
this.pbCloseBase.TabStop = false;
this.pbCloseBase.Click += new System.EventHandler(this.PictureBox1_Click);
this.pbCloseBase.MouseLeave += new System.EventHandler(this.PictureBox1_MouseLeave);
this.pbCloseBase.MouseHover += new System.EventHandler(this.PictureBox1_MouseHover);
//
// LRBaseForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(98)))), ((int)(((byte)(200)))));
this.ClientSize = new System.Drawing.Size(659, 535);
this.Controls.Add(this.panel1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Name = "LRBaseForm";
this.Padding = new System.Windows.Forms.Padding(1);
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "LcBaseForm";
this.Load += new System.EventHandler(this.LcBaseForm_Load);
this.panel1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pbMinBase)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pbNormalBase)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pbMaxBase)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pbLogo)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pbCloseBase)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.PictureBox pbMinBase;
private System.Windows.Forms.PictureBox pbCloseBase;
private System.Windows.Forms.Label lbTitle;
private System.Windows.Forms.PictureBox pbLogo;
private System.Windows.Forms.PictureBox pbNormalBase;
private System.Windows.Forms.PictureBox pbMaxBase;
}
}
+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>
@@ -0,0 +1,598 @@
namespace LittleRabbit.LittleRabbitForms.CollectForms
{
partial class CaiNiXiHuanCollectForm
{
/// <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.components = new System.ComponentModel.Container();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.btnExport = new LittleRabbit.UserControls.ButtonEx();
this.ucGroupBoxEx1 = new LittleRabbit.UserComponent.UcGroupBoxEx(this.components);
this.txtKeyWords = new DevComponents.DotNetBar.Controls.TextBoxX();
this.btnLoginDouyin = new LittleRabbit.UserControls.ButtonEx();
this.btnCollect = new LittleRabbit.UserControls.ButtonEx();
this.ucGroupBoxEx2 = new LittleRabbit.UserComponent.UcGroupBoxEx(this.components);
this.label4 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.txtRateMax = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.txtRateMin = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.txtCommentCountMax = new System.Windows.Forms.TextBox();
this.label9 = new System.Windows.Forms.Label();
this.txtTotalPage = new System.Windows.Forms.TextBox();
this.label10 = new System.Windows.Forms.Label();
this.txtCommentCountMin = new System.Windows.Forms.TextBox();
this.label12 = new System.Windows.Forms.Label();
this.txtSellCountMax = new System.Windows.Forms.TextBox();
this.txtPriceMax = new System.Windows.Forms.TextBox();
this.label13 = new System.Windows.Forms.Label();
this.txtPriceMin = new System.Windows.Forms.TextBox();
this.label14 = new System.Windows.Forms.Label();
this.label15 = new System.Windows.Forms.Label();
this.txtSellCountMin = new System.Windows.Forms.TextBox();
this.label16 = new System.Windows.Forms.Label();
this.dgvCollect = new LittleRabbit.UserComponent.DataGridViewEx();
this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.colProductId = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colProductName = new System.Windows.Forms.DataGridViewLinkColumn();
this.colImage = new System.Windows.Forms.DataGridViewImageColumn();
this.colPrice = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colSaleCount = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colCommentCount = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colRate = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colDelete = new System.Windows.Forms.DataGridViewLinkColumn();
this.statusBar = new LittleRabbit.UserControls.StatusBarUserControl();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit();
this.splitContainer2.Panel1.SuspendLayout();
this.splitContainer2.Panel2.SuspendLayout();
this.splitContainer2.SuspendLayout();
this.ucGroupBoxEx1.SuspendLayout();
this.ucGroupBoxEx2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvCollect)).BeginInit();
this.SuspendLayout();
//
// splitContainer1
//
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
this.splitContainer1.Name = "splitContainer1";
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.btnExport);
this.splitContainer1.Panel1.Controls.Add(this.ucGroupBoxEx1);
this.splitContainer1.Panel1.Controls.Add(this.btnLoginDouyin);
this.splitContainer1.Panel1.Controls.Add(this.btnCollect);
this.splitContainer1.Panel1.Controls.Add(this.ucGroupBoxEx2);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.splitContainer2);
this.splitContainer1.Size = new System.Drawing.Size(800, 450);
this.splitContainer1.SplitterDistance = 121;
this.splitContainer1.TabIndex = 377;
//
// splitContainer2
//
this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
this.splitContainer2.Location = new System.Drawing.Point(0, 0);
this.splitContainer2.Name = "splitContainer2";
this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer2.Panel1
//
this.splitContainer2.Panel1.Controls.Add(this.dgvCollect);
this.splitContainer2.Panel1.Padding = new System.Windows.Forms.Padding(5, 0, 5, 0);
//
// splitContainer2.Panel2
//
this.splitContainer2.Panel2.Controls.Add(this.statusBar);
this.splitContainer2.Size = new System.Drawing.Size(800, 325);
this.splitContainer2.SplitterDistance = 296;
this.splitContainer2.SplitterWidth = 1;
this.splitContainer2.TabIndex = 7;
//
// btnExport
//
this.btnExport.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnExport.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnExport.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnExport.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnExport.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnExport.ForeColor = System.Drawing.Color.White;
this.btnExport.Location = new System.Drawing.Point(720, 84);
this.btnExport.Margin = new System.Windows.Forms.Padding(2);
this.btnExport.Name = "btnExport";
this.btnExport.Size = new System.Drawing.Size(66, 26);
this.btnExport.TabIndex = 394;
this.btnExport.Text = "导出数据";
this.btnExport.UseVisualStyleBackColor = false;
this.btnExport.Click += new System.EventHandler(this.btnExport_Click);
//
// ucGroupBoxEx1
//
this.ucGroupBoxEx1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.ucGroupBoxEx1.BorderStyle = LittleRabbit.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND;
this.ucGroupBoxEx1.Controls.Add(this.txtKeyWords);
this.ucGroupBoxEx1.Location = new System.Drawing.Point(3, 2);
this.ucGroupBoxEx1.Name = "ucGroupBoxEx1";
this.ucGroupBoxEx1.Size = new System.Drawing.Size(222, 120);
this.ucGroupBoxEx1.TabIndex = 393;
this.ucGroupBoxEx1.TabStop = false;
this.ucGroupBoxEx1.Text = "采集商品 请输入商品ID或为空";
//
// txtKeyWords
//
//
//
//
this.txtKeyWords.Border.Class = "TextBoxBorder";
this.txtKeyWords.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.txtKeyWords.Location = new System.Drawing.Point(10, 21);
this.txtKeyWords.Multiline = true;
this.txtKeyWords.Name = "txtKeyWords";
this.txtKeyWords.PreventEnterBeep = true;
this.txtKeyWords.Size = new System.Drawing.Size(202, 88);
this.txtKeyWords.TabIndex = 7;
this.txtKeyWords.WatermarkText = "请输入要搜索的商品id或链接\r\n一行一个\r\n\r\n为空采集默认猜你喜欢商品";
//
// btnLoginDouyin
//
this.btnLoginDouyin.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnLoginDouyin.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnLoginDouyin.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnLoginDouyin.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnLoginDouyin.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnLoginDouyin.ForeColor = System.Drawing.Color.White;
this.btnLoginDouyin.Location = new System.Drawing.Point(720, 20);
this.btnLoginDouyin.Margin = new System.Windows.Forms.Padding(2);
this.btnLoginDouyin.Name = "btnLoginDouyin";
this.btnLoginDouyin.Size = new System.Drawing.Size(66, 26);
this.btnLoginDouyin.TabIndex = 373;
this.btnLoginDouyin.Text = "登录抖音";
this.btnLoginDouyin.UseVisualStyleBackColor = false;
this.btnLoginDouyin.Visible = false;
this.btnLoginDouyin.Click += new System.EventHandler(this.btnLoginDouyin_Click);
//
// btnCollect
//
this.btnCollect.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnCollect.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnCollect.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnCollect.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnCollect.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCollect.ForeColor = System.Drawing.Color.White;
this.btnCollect.Location = new System.Drawing.Point(720, 52);
this.btnCollect.Margin = new System.Windows.Forms.Padding(2);
this.btnCollect.Name = "btnCollect";
this.btnCollect.Size = new System.Drawing.Size(66, 26);
this.btnCollect.TabIndex = 374;
this.btnCollect.Text = "开始采集";
this.btnCollect.UseVisualStyleBackColor = false;
this.btnCollect.Click += new System.EventHandler(this.btnCollect_Click);
//
// ucGroupBoxEx2
//
this.ucGroupBoxEx2.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.ucGroupBoxEx2.BorderStyle = LittleRabbit.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND;
this.ucGroupBoxEx2.Controls.Add(this.label4);
this.ucGroupBoxEx2.Controls.Add(this.label3);
this.ucGroupBoxEx2.Controls.Add(this.txtRateMax);
this.ucGroupBoxEx2.Controls.Add(this.label1);
this.ucGroupBoxEx2.Controls.Add(this.txtRateMin);
this.ucGroupBoxEx2.Controls.Add(this.label2);
this.ucGroupBoxEx2.Controls.Add(this.txtCommentCountMax);
this.ucGroupBoxEx2.Controls.Add(this.label9);
this.ucGroupBoxEx2.Controls.Add(this.txtTotalPage);
this.ucGroupBoxEx2.Controls.Add(this.label10);
this.ucGroupBoxEx2.Controls.Add(this.txtCommentCountMin);
this.ucGroupBoxEx2.Controls.Add(this.label12);
this.ucGroupBoxEx2.Controls.Add(this.txtSellCountMax);
this.ucGroupBoxEx2.Controls.Add(this.txtPriceMax);
this.ucGroupBoxEx2.Controls.Add(this.label13);
this.ucGroupBoxEx2.Controls.Add(this.txtPriceMin);
this.ucGroupBoxEx2.Controls.Add(this.label14);
this.ucGroupBoxEx2.Controls.Add(this.label15);
this.ucGroupBoxEx2.Controls.Add(this.txtSellCountMin);
this.ucGroupBoxEx2.Controls.Add(this.label16);
this.ucGroupBoxEx2.Location = new System.Drawing.Point(231, 2);
this.ucGroupBoxEx2.Name = "ucGroupBoxEx2";
this.ucGroupBoxEx2.Size = new System.Drawing.Size(409, 120);
this.ucGroupBoxEx2.TabIndex = 395;
this.ucGroupBoxEx2.TabStop = false;
this.ucGroupBoxEx2.Text = "采集参数";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(183, 58);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(19, 17);
this.label4.TabIndex = 401;
this.label4.Text = "%";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(115, 58);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(19, 17);
this.label3.TabIndex = 400;
this.label3.Text = "%";
//
// txtRateMax
//
this.txtRateMax.Location = new System.Drawing.Point(139, 54);
this.txtRateMax.Name = "txtRateMax";
this.txtRateMax.Size = new System.Drawing.Size(40, 23);
this.txtRateMax.TabIndex = 399;
this.txtRateMax.Text = "100";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(127, 57);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(13, 17);
this.label1.TabIndex = 398;
this.label1.Text = "-";
//
// txtRateMin
//
this.txtRateMin.Location = new System.Drawing.Point(71, 54);
this.txtRateMin.Name = "txtRateMin";
this.txtRateMin.Size = new System.Drawing.Size(40, 23);
this.txtRateMin.TabIndex = 396;
this.txtRateMin.Text = "0";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(14, 58);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(44, 17);
this.label2.TabIndex = 397;
this.label2.Text = "好评率";
//
// txtCommentCountMax
//
this.txtCommentCountMax.Location = new System.Drawing.Point(335, 86);
this.txtCommentCountMax.Name = "txtCommentCountMax";
this.txtCommentCountMax.Size = new System.Drawing.Size(55, 23);
this.txtCommentCountMax.TabIndex = 391;
this.txtCommentCountMax.Text = "99999999";
//
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(323, 89);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(13, 17);
this.label9.TabIndex = 390;
this.label9.Text = "-";
//
// txtTotalPage
//
this.txtTotalPage.Location = new System.Drawing.Point(71, 22);
this.txtTotalPage.Name = "txtTotalPage";
this.txtTotalPage.Size = new System.Drawing.Size(123, 23);
this.txtTotalPage.TabIndex = 376;
this.txtTotalPage.Text = "5";
//
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(210, 90);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(56, 17);
this.label10.TabIndex = 389;
this.label10.Text = "评论数量";
//
// txtCommentCountMin
//
this.txtCommentCountMin.Location = new System.Drawing.Point(267, 86);
this.txtCommentCountMin.Name = "txtCommentCountMin";
this.txtCommentCountMin.Size = new System.Drawing.Size(55, 23);
this.txtCommentCountMin.TabIndex = 388;
this.txtCommentCountMin.Text = "0";
//
// label12
//
this.label12.AutoSize = true;
this.label12.Location = new System.Drawing.Point(13, 26);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(56, 17);
this.label12.TabIndex = 378;
this.label12.Text = "采集页数";
//
// txtSellCountMax
//
this.txtSellCountMax.Location = new System.Drawing.Point(335, 54);
this.txtSellCountMax.Name = "txtSellCountMax";
this.txtSellCountMax.Size = new System.Drawing.Size(55, 23);
this.txtSellCountMax.TabIndex = 387;
this.txtSellCountMax.Text = "99999999";
//
// txtPriceMax
//
this.txtPriceMax.Location = new System.Drawing.Point(335, 22);
this.txtPriceMax.Name = "txtPriceMax";
this.txtPriceMax.Size = new System.Drawing.Size(55, 23);
this.txtPriceMax.TabIndex = 383;
this.txtPriceMax.Text = "99999999";
//
// label13
//
this.label13.AutoSize = true;
this.label13.Location = new System.Drawing.Point(323, 57);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(13, 17);
this.label13.TabIndex = 386;
this.label13.Text = "-";
//
// txtPriceMin
//
this.txtPriceMin.Location = new System.Drawing.Point(267, 22);
this.txtPriceMin.Name = "txtPriceMin";
this.txtPriceMin.Size = new System.Drawing.Size(55, 23);
this.txtPriceMin.TabIndex = 379;
this.txtPriceMin.Text = "0";
//
// label14
//
this.label14.AutoSize = true;
this.label14.Location = new System.Drawing.Point(210, 58);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(56, 17);
this.label14.TabIndex = 385;
this.label14.Text = "宝贝销量";
//
// label15
//
this.label15.AutoSize = true;
this.label15.Location = new System.Drawing.Point(210, 26);
this.label15.Name = "label15";
this.label15.Size = new System.Drawing.Size(56, 17);
this.label15.TabIndex = 380;
this.label15.Text = "宝贝价格";
//
// txtSellCountMin
//
this.txtSellCountMin.Location = new System.Drawing.Point(267, 54);
this.txtSellCountMin.Name = "txtSellCountMin";
this.txtSellCountMin.Size = new System.Drawing.Size(55, 23);
this.txtSellCountMin.TabIndex = 384;
this.txtSellCountMin.Text = "0";
//
// label16
//
this.label16.AutoSize = true;
this.label16.Location = new System.Drawing.Point(323, 25);
this.label16.Name = "label16";
this.label16.Size = new System.Drawing.Size(13, 17);
this.label16.TabIndex = 382;
this.label16.Text = "-";
//
// dgvCollect
//
this.dgvCollect.AllowUserToAddRows = false;
this.dgvCollect.AllowUserToDeleteRows = false;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvCollect.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
this.dgvCollect.BackgroundColor = System.Drawing.Color.White;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvCollect.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
this.dgvCollect.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvCollect.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colSelect,
this.colProductId,
this.colProductName,
this.colImage,
this.colPrice,
this.colSaleCount,
this.colCommentCount,
this.colRate,
this.colDelete});
this.dgvCollect.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvCollect.Location = new System.Drawing.Point(5, 0);
this.dgvCollect.Name = "dgvCollect";
this.dgvCollect.ReadOnly = true;
dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.dgvCollect.RowsDefaultCellStyle = dataGridViewCellStyle3;
this.dgvCollect.RowTemplate.Height = 23;
this.dgvCollect.Size = new System.Drawing.Size(790, 296);
this.dgvCollect.TabIndex = 6;
this.dgvCollect.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvCollect_CellContentClick);
//
// colSelect
//
this.colSelect.FillWeight = 50F;
this.colSelect.HeaderText = "选";
this.colSelect.Name = "colSelect";
this.colSelect.ReadOnly = true;
this.colSelect.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colSelect.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colSelect.Visible = false;
this.colSelect.Width = 41;
//
// colProductId
//
this.colProductId.HeaderText = "商品Id";
this.colProductId.Name = "colProductId";
this.colProductId.ReadOnly = true;
this.colProductId.Width = 150;
//
// colProductName
//
this.colProductName.HeaderText = "商品名称";
this.colProductName.Name = "colProductName";
this.colProductName.ReadOnly = true;
this.colProductName.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colProductName.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colProductName.Width = 350;
//
// colImage
//
this.colImage.HeaderText = "图片";
this.colImage.Name = "colImage";
this.colImage.ReadOnly = true;
this.colImage.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colImage.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colImage.Visible = false;
this.colImage.Width = 70;
//
// colPrice
//
this.colPrice.HeaderText = "价格";
this.colPrice.Name = "colPrice";
this.colPrice.ReadOnly = true;
this.colPrice.Width = 80;
//
// colSaleCount
//
this.colSaleCount.HeaderText = "销量";
this.colSaleCount.Name = "colSaleCount";
this.colSaleCount.ReadOnly = true;
//
// colCommentCount
//
this.colCommentCount.HeaderText = "评论数量";
this.colCommentCount.Name = "colCommentCount";
this.colCommentCount.ReadOnly = true;
//
// colRate
//
this.colRate.HeaderText = "好评率";
this.colRate.Name = "colRate";
this.colRate.ReadOnly = true;
this.colRate.Width = 80;
//
// colDelete
//
this.colDelete.HeaderText = "删除";
this.colDelete.Name = "colDelete";
this.colDelete.ReadOnly = true;
this.colDelete.Visible = false;
this.colDelete.Width = 81;
//
// statusBar
//
this.statusBar.BackColor = System.Drawing.Color.White;
this.statusBar.Dock = System.Windows.Forms.DockStyle.Fill;
this.statusBar.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.statusBar.Location = new System.Drawing.Point(0, 0);
this.statusBar.Margin = new System.Windows.Forms.Padding(0);
this.statusBar.Name = "statusBar";
this.statusBar.Size = new System.Drawing.Size(800, 28);
this.statusBar.TabIndex = 3;
//
// CaiNiXiHuanCollectForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(800, 450);
this.Controls.Add(this.splitContainer1);
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Name = "CaiNiXiHuanCollectForm";
this.Text = "CaiNiXiHuanCollectForm";
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
this.splitContainer2.Panel1.ResumeLayout(false);
this.splitContainer2.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
this.splitContainer2.ResumeLayout(false);
this.ucGroupBoxEx1.ResumeLayout(false);
this.ucGroupBoxEx2.ResumeLayout(false);
this.ucGroupBoxEx2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvCollect)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.SplitContainer splitContainer1;
private UserControls.ButtonEx btnExport;
private UserComponent.UcGroupBoxEx ucGroupBoxEx1;
private DevComponents.DotNetBar.Controls.TextBoxX txtKeyWords;
private UserControls.ButtonEx btnLoginDouyin;
private UserControls.ButtonEx btnCollect;
private UserComponent.UcGroupBoxEx ucGroupBoxEx2;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox txtRateMax;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox txtRateMin;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox txtCommentCountMax;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.TextBox txtTotalPage;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.TextBox txtCommentCountMin;
private System.Windows.Forms.Label label12;
private System.Windows.Forms.TextBox txtSellCountMax;
private System.Windows.Forms.TextBox txtPriceMax;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.TextBox txtPriceMin;
private System.Windows.Forms.Label label14;
private System.Windows.Forms.Label label15;
private System.Windows.Forms.TextBox txtSellCountMin;
private System.Windows.Forms.Label label16;
private UserComponent.DataGridViewEx dgvCollect;
private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect;
private System.Windows.Forms.DataGridViewTextBoxColumn colProductId;
private System.Windows.Forms.DataGridViewLinkColumn colProductName;
private System.Windows.Forms.DataGridViewImageColumn colImage;
private System.Windows.Forms.DataGridViewTextBoxColumn colPrice;
private System.Windows.Forms.DataGridViewTextBoxColumn colSaleCount;
private System.Windows.Forms.DataGridViewTextBoxColumn colCommentCount;
private System.Windows.Forms.DataGridViewTextBoxColumn colRate;
private System.Windows.Forms.DataGridViewLinkColumn colDelete;
private System.Windows.Forms.SplitContainer splitContainer2;
private UserControls.StatusBarUserControl statusBar;
}
}
@@ -0,0 +1,326 @@
using AllBase;
using AllBase.Helper;
using AllBase.Model.Result;
using LittleRabbit.LittleRabbitForms.ToolForms;
using NaiBa.Util.Extension;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace LittleRabbit.LittleRabbitForms.CollectForms
{
public partial class CaiNiXiHuanCollectForm : Form
{
decimal priceMin = 0;
decimal priceMax = 99999999;
long sellCountMin = 0;
long sellCountMax = 99999999;
long commentCountMin = 0;
long commentCountMax = 99999999;
int rateMin = 0;
int rateMax = 100;
List<DouGoodsCollectInfo> lstProduct = new List<DouGoodsCollectInfo>();
CancellationTokenSource cancellationTokenSource = null;
public CaiNiXiHuanCollectForm()
{
InitializeComponent();
}
private void btnCollect_Click(object sender, EventArgs e)
{
if (btnCollect.Text != "开始采集")
{
cancellationTokenSource.Cancel();
}
else
{
var cookieShop = GlobalConfig.DouShopLoginList.FirstOrDefault(s => s.LoginStatus == "登录成功");
if (cookieShop == null)
{
BaseForms.BaseMsgForm.ShowError("请登录店铺账号后搜索");
return;
}
priceMin = this.txtPriceMin.Text.ParseToDecimal();
priceMax = this.txtPriceMax.Text.ParseToDecimal();
sellCountMin = this.txtSellCountMin.Text.ParseToLong();
sellCountMax = this.txtSellCountMax.Text.ParseToLong();
commentCountMin = this.txtCommentCountMin.Text.ParseToLong();
commentCountMax = this.txtCommentCountMax.Text.ParseToLong();
rateMin = this.txtRateMin.Text.ParseToInt();
rateMax = this.txtRateMax.Text.ParseToInt();
int pageTotal = txtTotalPage.Text.ParseToInt();
if (pageTotal < 1)
{
BaseForms.BaseMsgForm.ShowError("请至少查询一页以上数据");
return;
}
var searchTextArr = this.txtKeyWords.Text.Split(new string[] { "\r", "\n", ",", " " }, StringSplitOptions.RemoveEmptyEntries);
if (searchTextArr.Length == 0)
{
searchTextArr = new string[] { "" };
//BaseForms.BaseMsgForm.ShowError("请至少输入一个商品");
//return;
}
lstProduct.Clear();
this.dgvCollect.Rows.Clear();
cancellationTokenSource = new CancellationTokenSource();
int n = 0;
int total = searchTextArr.Count() * pageTotal;
this.statusBar.lblTaskStatus.Text = "开始采集...";
this.statusBar.pgbTaskProgress.Value = n;
this.statusBar.pgbTaskProgress.Text = n + "/" + total;
this.statusBar.pgbTaskProgress.Maximum = total;
btnCollect.Text = "停止采集";
Task.Run(() =>
{
if (!Directory.Exists("采集导出"))
Directory.CreateDirectory("采集导出");
var exportFileName = "采集导出\\猜你喜欢采集" + DateTime.Now.ToString("yyyyMMddHHmmss") + ".csv";
StreamWriter writer = new StreamWriter(exportFileName, true, Encoding.GetEncoding("gb2312"));
object[] objArray1 = new object[] { "商品ID,", "商品名称,", "价格,", "销量,", "评论数,", "好评率" };
writer.WriteLine(string.Concat(objArray1));
writer.Close();
foreach (var searchText in searchTextArr)
{
if (cancellationTokenSource.IsCancellationRequested)
break;
var text = searchText;
if (text.ParseToLong() == 0)
text = BaseRegex.GetMatchRegexString(ref text, "(\\d{10,22})");
for (int i = 1; i < pageTotal + 1; i++)
{
n++;
Invoke(new Action(() =>
{
this.statusBar.lblTaskStatus.Text = "正在采集商品" + text + "猜你喜欢,当前采集到第 " + i + " 页";
this.statusBar.pgbTaskProgress.Value = n;
this.statusBar.pgbTaskProgress.Text = n + "/" + total;
this.statusBar.pgbTaskProgress.Maximum = total;
}));
Thread.Sleep(Randomx.GetId(100, 500));
int pageNum = i;
var cnxhResult = CollectCaiNiXiHuan(cookieShop.Cookies, text, pageNum.ToString());
if (!string.IsNullOrEmpty(cnxhResult) && cnxhResult.Contains("\"status_code\":0"))
{
JObject jObj = JObject.Parse(cnxhResult);
if (jObj["item_cards"] == null)
return;
foreach (JObject pObj in jObj["item_cards"])
{
if (cancellationTokenSource.IsCancellationRequested)
break;
var pStr = JsonHelper.SerializeObject(pObj);
var pId = BaseRegex.GetStringJson(ref pStr, "product_id");
if (!string.IsNullOrEmpty(pId))
{
DouGoodsCollectInfo prod = new DouGoodsCollectInfo();
prod.Id = pId;
prod.GoodsName = BaseRegex.GetStringJson(ref pStr, "title");
if (string.IsNullOrEmpty(prod.GoodsName))
{
}
prod.Price = (BaseRegex.GetDecimalJson(ref pStr, "min_price") / 100).ToString();
prod.Sales = BaseRegex.GetIntJson(ref pStr, "sales").ToString();
// 筛选条件
if (prod.Price.ParseToDecimal() < this.priceMin || prod.Price.ParseToDecimal() > this.priceMax
|| prod.Sales.ParseToDecimal() < this.sellCountMin || prod.Sales.ParseToDecimal() > this.sellCountMax)
continue;
Thread.Sleep(Randomx.GetId(500, 1000));
var commentResult = GetComments(GlobalConfig.DouUserCookies, prod.Id);
if (!string.IsNullOrEmpty(commentResult) && commentResult.Contains("\"status_code\":0"))
{
prod.CommentsCount = BaseRegex.GetIntJson(ref commentResult, "total_comments_num");
prod.CommentsRate = BaseRegex.GetDecimalJson(ref commentResult, "good_comment_ratio").ParseToDouble() / 100;
}
// 筛选条件
if (prod.CommentsRate < this.rateMin || prod.CommentsRate > this.rateMax
|| prod.CommentsCount < this.commentCountMin || prod.CommentsCount > this.commentCountMax)
continue;
this.lstProduct.Add(prod);
try
{
StreamWriter writer1 = new StreamWriter(exportFileName, true, Encoding.GetEncoding("gb2312"));
object[] objArray2 = new object[15];
objArray2[1] = "https://haohuo.jinritemai.com/views/product/item2?id=" + prod.Id;
objArray2[2] = ",";
objArray2[3] = prod.GoodsName;
objArray2[4] = ",";
objArray2[5] = prod.Price;
objArray2[6] = ",";
objArray2[7] = prod.Sales;
objArray2[8] = ",";
objArray2[9] = prod.CommentsCount;
objArray2[10] = ",";
objArray2[11] = prod.CommentsRate;
writer1.WriteLine(string.Concat(objArray2));
writer1.Close();
}
catch (Exception ex)
{
}
Invoke(new Action(() =>
{
var index = this.dgvCollect.Rows.Add(false, prod.Id, prod.GoodsName, null, prod.Price, prod.Sales, prod.CommentsCount,
prod.CommentsRate, "删除");
}));
}
}
}
}
}
Invoke(new Action(() =>
{
btnCollect.Text = "开始采集";
this.statusBar.lblTaskStatus.Text = "采集结束,共采集到商品" + this.lstProduct.Count + "个";
this.statusBar.pgbTaskProgress.Value = n;
this.statusBar.pgbTaskProgress.Text = n + "/" + total;
this.statusBar.pgbTaskProgress.Maximum = total;
}));
}, cancellationTokenSource.Token);
}
}
private string CollectCaiNiXiHuan(string cookies, string productId, string pageNum = "1", string cursor = "20")
{
HttpWebResponse response = null;
string result;
try
{
string url = "https://api5-normal-c-lf.amemv.com/aweme/v2/commerce/favorite/feed?app_name=aweme&channel=App%20Store&slide_guide_has_shown=1&minor_status=0&product_id=" +
productId + "&page_num=" + pageNum + "&cursor=" + cursor + "&page_name=product_detail&feedbacks=&count=20&filters=&filter_type=";
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
request.ContentType = "application/x-www-form-urlencoded";
request.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36";
request.Headers.Set(HttpRequestHeader.Cookie, cookies);
response = (HttpWebResponse)request.GetResponse();
}
catch (WebException ex)
{
if (ex.Status == WebExceptionStatus.ProtocolError)
{
response = (HttpWebResponse)ex.Response;
result = GetProxyHtml.ReadResponse(response);
if (response != null) response.Close();
return result;
}
else return ex.Message;
}
catch (Exception e)
{
if (response != null) response.Close();
return e.Message;
}
result = GetProxyHtml.ReadResponse(response);
if (response != null) response.Close();
return result;
}
public static string GetComments(string cookies, string productId)
{
HttpWebResponse response = null;
string result;
try
{
string url = "http://lianmengapi.snssdk.com/ies/v2/decision/getProductComments?product_id=" + productId + "&aid=1128";
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
request.ContentType = "application/x-www-form-urlencoded";
request.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36 Edg/91.0.864.177";
request.Headers.Set(HttpRequestHeader.Cookie, cookies);
response = (HttpWebResponse)request.GetResponse();
}
catch (WebException ex)
{
if (ex.Status == WebExceptionStatus.ProtocolError)
{
response = (HttpWebResponse)ex.Response;
result = GetProxyHtml.ReadResponse(response);
if (response != null) response.Close();
return result;
}
else return ex.Message;
}
catch (Exception e)
{
if (response != null) response.Close();
return e.Message;
}
result = GetProxyHtml.ReadResponse(response);
if (response != null) response.Close();
return result;
}
private void btnLoginDouyin_Click(object sender, EventArgs e)
{
DouUserLoginForm dForm = new DouUserLoginForm();
dForm.ShowDialog();
}
private void btnExport_Click(object sender, EventArgs e)
{
try
{
SaveFileDialog saveFileDialog1 = new SaveFileDialog();
saveFileDialog1.Filter = "表格文件(*.csv)|*.csv";
saveFileDialog1.FileName = "猜你喜欢采集" + DateTime.Now.ToString("yyyyMMddHHmmss") + ".csv";
saveFileDialog1.FilterIndex = 2;
saveFileDialog1.RestoreDirectory = true;
if (saveFileDialog1.ShowDialog() == DialogResult.OK)
{
StringBuilder sb = new StringBuilder();
sb.AppendLine("商品ID," + "商品名称," + "价格," + "销量," + "评论数," + "好评率");
foreach (var goodsInfo in lstProduct)
{
sb.AppendLine("https://haohuo.jinritemai.com/views/product/item2?id=" + goodsInfo.Id + "," + goodsInfo.GoodsName + ","
+ goodsInfo.Price + "," + goodsInfo.Sales + "," + goodsInfo.CommentsCount + "," + goodsInfo.CommentsRate);
}
System.IO.File.WriteAllText(saveFileDialog1.FileName, sb.ToString(), Encoding.Default);
BaseForms.BaseMsgForm.ShowInfo("导出成功");
}
}
catch (Exception ex)
{
BaseForms.BaseMsgForm.ShowError(ex.Message);
}
}
private void dgvCollect_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
if (e.RowIndex < 0 || e.ColumnIndex < 0)
return;
var goodsId = dgvCollect.Rows[e.RowIndex].Cells["colProductId"].Value.ToString();
var columnName = dgvCollect.Columns[e.ColumnIndex].Name;
if (columnName == "colProductName")
{
string url = "https://haohuo.jinritemai.com/views/product/item2?id=" + goodsId;
GetHtml.OpenUrl(url);
}
}
}
}
@@ -0,0 +1,147 @@
<?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="colSelect.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colProductId.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colProductName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colImage.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colPrice.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colSaleCount.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colCommentCount.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colRate.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colDelete.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>
+180
View File
@@ -0,0 +1,180 @@
namespace LittleRabbit.LittleRabbitForms.CollectForms
{
partial class CollectForm
{
/// <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()
{
System.Windows.Forms.TreeNode treeNode1 = new System.Windows.Forms.TreeNode("好物采集");
System.Windows.Forms.TreeNode treeNode2 = new System.Windows.Forms.TreeNode("同行采集");
System.Windows.Forms.TreeNode treeNode3 = new System.Windows.Forms.TreeNode("整店采集");
System.Windows.Forms.TreeNode treeNode4 = new System.Windows.Forms.TreeNode("猜你喜欢采集");
System.Windows.Forms.TreeNode treeNode5 = new System.Windows.Forms.TreeNode("关键词采集");
System.Windows.Forms.TreeNode treeNode6 = new System.Windows.Forms.TreeNode("采集商品", new System.Windows.Forms.TreeNode[] {
treeNode1,
treeNode2,
treeNode3,
treeNode4,
treeNode5});
this.panel1 = new System.Windows.Forms.Panel();
this.panel3 = new System.Windows.Forms.Panel();
this.panel2 = new System.Windows.Forms.Panel();
this.lblName = new System.Windows.Forms.Label();
this.tv = new LittleRabbit.UserComponent.UcTreeView();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.panel1.SuspendLayout();
this.panel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.SuspendLayout();
//
// panel1
//
this.panel1.BackColor = System.Drawing.Color.White;
this.panel1.Controls.Add(this.panel3);
this.panel1.Controls.Add(this.panel2);
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(659, 450);
this.panel1.TabIndex = 4;
//
// panel3
//
this.panel3.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel3.Location = new System.Drawing.Point(0, 28);
this.panel3.Name = "panel3";
this.panel3.Size = new System.Drawing.Size(659, 422);
this.panel3.TabIndex = 1;
//
// panel2
//
this.panel2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(244)))), ((int)(((byte)(244)))), ((int)(((byte)(244)))));
this.panel2.Controls.Add(this.lblName);
this.panel2.Dock = System.Windows.Forms.DockStyle.Top;
this.panel2.Location = new System.Drawing.Point(0, 0);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(659, 28);
this.panel2.TabIndex = 0;
//
// lblName
//
this.lblName.AutoSize = true;
this.lblName.Location = new System.Drawing.Point(5, 6);
this.lblName.Name = "lblName";
this.lblName.Size = new System.Drawing.Size(57, 17);
this.lblName.TabIndex = 0;
this.lblName.Text = "lblName";
//
// tv
//
this.tv.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(251)))), ((int)(((byte)(251)))), ((int)(((byte)(251)))));
this.tv.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.tv.ChildNodeSelectedBgColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.tv.Cursor = System.Windows.Forms.Cursors.Hand;
this.tv.Dock = System.Windows.Forms.DockStyle.Fill;
this.tv.DrawMode = System.Windows.Forms.TreeViewDrawMode.OwnerDrawAll;
this.tv.ExpandButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
this.tv.FullRowSelect = true;
this.tv.GroupBgColor = System.Drawing.Color.FromArgb(((int)(((byte)(249)))), ((int)(((byte)(249)))), ((int)(((byte)(249)))));
this.tv.GroupFont = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.tv.GroupTitleColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(80)))), ((int)(((byte)(80)))));
this.tv.HideCollapsedGroup = false;
this.tv.ItemHeight = 32;
this.tv.Location = new System.Drawing.Point(0, 0);
this.tv.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.tv.Name = "tv";
treeNode1.Name = "好物采集";
treeNode1.Text = "好物采集";
treeNode2.Name = "同行采集";
treeNode2.Text = "同行采集";
treeNode3.Name = "整店采集";
treeNode3.Text = "整店采集";
treeNode4.Name = "猜你喜欢采集";
treeNode4.Text = "猜你喜欢采集";
treeNode5.Name = "关键词采集";
treeNode5.Text = "关键词采集";
treeNode6.Name = "采集商品";
treeNode6.Text = "采集商品";
this.tv.Nodes.AddRange(new System.Windows.Forms.TreeNode[] {
treeNode6});
this.tv.OverForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.tv.Size = new System.Drawing.Size(140, 450);
this.tv.TabIndex = 3;
this.tv.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.tv_AfterSelect);
//
// splitContainer1
//
this.splitContainer1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
this.splitContainer1.Name = "splitContainer1";
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.tv);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.panel1);
this.splitContainer1.Size = new System.Drawing.Size(800, 450);
this.splitContainer1.SplitterDistance = 140;
this.splitContainer1.SplitterWidth = 1;
this.splitContainer1.TabIndex = 5;
//
// CollectForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.ClientSize = new System.Drawing.Size(800, 450);
this.Controls.Add(this.splitContainer1);
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Name = "CollectForm";
this.Text = "CollectForm";
this.Load += new System.EventHandler(this.CollectForm_Load);
this.panel1.ResumeLayout(false);
this.panel2.ResumeLayout(false);
this.panel2.PerformLayout();
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Panel panel3;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.Label lblName;
private UserComponent.UcTreeView tv;
private System.Windows.Forms.SplitContainer splitContainer1;
}
}
@@ -0,0 +1,118 @@
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;
namespace LittleRabbit.LittleRabbitForms.CollectForms
{
public partial class CollectForm : Form
{
public Lazy<HaoWuCollectForm> haoWuCollectForm = new Lazy<HaoWuCollectForm>();
public Lazy<FriendShopCollectForm> friendShopCollectForm = new Lazy<FriendShopCollectForm>();
public Lazy<KeywordCollectForm> keywordCollectForm = new Lazy<KeywordCollectForm>();
public Lazy<CaiNiXiHuanCollectForm> caiNiXiHuanCollectForm = new Lazy<CaiNiXiHuanCollectForm>();
public Lazy<ShopProductCollectForm> shopProductCollectForm = new Lazy<ShopProductCollectForm>();
public CollectForm()
{
InitializeComponent();
}
private void tv_AfterSelect(object sender, TreeViewEventArgs e)
{
MainForm.sCurrentModule = e.Node.Name;
this.lblName.Text = e.Node.Text;
//如果是一级菜单,不做任何动作
if (e.Node.Parent == null) return;
new Thread(() =>
{
Thread.Sleep(200);
Invoke(new Action(() =>
{
switch (e.Node.Name)
{
case "好物采集":
SetForm(haoWuCollectForm.Value);
break;
case "同行采集":
SetForm(friendShopCollectForm.Value);
break;
case "整店采集":
SetForm(shopProductCollectForm.Value);
break;
case "关键词采集":
SetForm(keywordCollectForm.Value);
break;
case "猜你喜欢采集":
SetForm(caiNiXiHuanCollectForm.Value);
break;
}
}));
}).Start();
}
/// <summary>
/// 显示隐藏层
/// </summary>
/// <param name="f"></param>
private void SetForm(Form f)
{
if (f == null)
{
foreach (Control form in panel3.Controls)
{
form.Visible = false;
if (form is Form)
{
panel3.Controls.Remove(form as Form);
}
}
return;
}
bool had = false;
string sCurrentFormName = f.Name;
for (int i = 0; i < panel3.Controls.Count; i++)
{
if (sCurrentFormName == panel3.Controls[i].Name)
{
had = true;
panel3.Controls[i].Visible = true;
}
else
{
panel3.Controls[i].Visible = false;
}
}
if (had)
{
f = null;
return;
}
f.TopLevel = false;
f.Left = 0;
f.Top = 0;
f.FormBorderStyle = FormBorderStyle.None;
panel3.Controls.Add(f);
f.AutoSize = true;
f.Dock = DockStyle.Fill;
f.Show();
}
private void CollectForm_Load(object sender, EventArgs e)
{
try
{
tv.SelectedNode = tv.Nodes[0].Nodes[0];
tv.ExpandGroup(tv.Nodes[0].Name);
}
catch { }
}
}
}
@@ -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>
@@ -0,0 +1,566 @@
namespace LittleRabbit.LittleRabbitForms.CollectForms
{
partial class FriendShopCollectForm
{
/// <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.components = new System.ComponentModel.Container();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.btnExport = new LittleRabbit.UserControls.ButtonEx();
this.ucGroupBoxEx1 = new LittleRabbit.UserComponent.UcGroupBoxEx(this.components);
this.txtKeyWords = new DevComponents.DotNetBar.Controls.TextBoxX();
this.btnLoginDouyin = new LittleRabbit.UserControls.ButtonEx();
this.btnCollect = new LittleRabbit.UserControls.ButtonEx();
this.ucGroupBoxEx2 = new LittleRabbit.UserComponent.UcGroupBoxEx(this.components);
this.cmbSort = new System.Windows.Forms.ComboBox();
this.txtScoreRateMax = new System.Windows.Forms.TextBox();
this.checkBox1 = new System.Windows.Forms.CheckBox();
this.label9 = new System.Windows.Forms.Label();
this.txtTotalPage = new System.Windows.Forms.TextBox();
this.label10 = new System.Windows.Forms.Label();
this.label11 = new System.Windows.Forms.Label();
this.txtScoreRateMin = new System.Windows.Forms.TextBox();
this.label12 = new System.Windows.Forms.Label();
this.txtShopSalesMax = new System.Windows.Forms.TextBox();
this.txtProductCountMax = new System.Windows.Forms.TextBox();
this.label13 = new System.Windows.Forms.Label();
this.txtProductCountMin = new System.Windows.Forms.TextBox();
this.label14 = new System.Windows.Forms.Label();
this.label15 = new System.Windows.Forms.Label();
this.txtShopSalesMin = new System.Windows.Forms.TextBox();
this.label16 = new System.Windows.Forms.Label();
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.dgvCollect = new LittleRabbit.UserComponent.DataGridViewEx();
this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.colKeyword = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colShopId = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colShopName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colRate = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colSaleCount = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colShopCount = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colProductId = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colDelete = new System.Windows.Forms.DataGridViewLinkColumn();
this.statusBar = new LittleRabbit.UserControls.StatusBarUserControl();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.ucGroupBoxEx1.SuspendLayout();
this.ucGroupBoxEx2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit();
this.splitContainer2.Panel1.SuspendLayout();
this.splitContainer2.Panel2.SuspendLayout();
this.splitContainer2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvCollect)).BeginInit();
this.SuspendLayout();
//
// splitContainer1
//
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
this.splitContainer1.Name = "splitContainer1";
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.btnExport);
this.splitContainer1.Panel1.Controls.Add(this.ucGroupBoxEx1);
this.splitContainer1.Panel1.Controls.Add(this.btnLoginDouyin);
this.splitContainer1.Panel1.Controls.Add(this.btnCollect);
this.splitContainer1.Panel1.Controls.Add(this.ucGroupBoxEx2);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.splitContainer2);
this.splitContainer1.Size = new System.Drawing.Size(800, 450);
this.splitContainer1.SplitterDistance = 121;
this.splitContainer1.TabIndex = 376;
//
// btnExport
//
this.btnExport.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnExport.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnExport.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnExport.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnExport.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnExport.ForeColor = System.Drawing.Color.White;
this.btnExport.Location = new System.Drawing.Point(720, 84);
this.btnExport.Margin = new System.Windows.Forms.Padding(2);
this.btnExport.Name = "btnExport";
this.btnExport.Size = new System.Drawing.Size(66, 26);
this.btnExport.TabIndex = 394;
this.btnExport.Text = "导出数据";
this.btnExport.UseVisualStyleBackColor = false;
this.btnExport.Click += new System.EventHandler(this.btnExport_Click);
//
// ucGroupBoxEx1
//
this.ucGroupBoxEx1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.ucGroupBoxEx1.BorderStyle = LittleRabbit.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND;
this.ucGroupBoxEx1.Controls.Add(this.txtKeyWords);
this.ucGroupBoxEx1.Location = new System.Drawing.Point(3, 2);
this.ucGroupBoxEx1.Name = "ucGroupBoxEx1";
this.ucGroupBoxEx1.Size = new System.Drawing.Size(192, 120);
this.ucGroupBoxEx1.TabIndex = 393;
this.ucGroupBoxEx1.TabStop = false;
this.ucGroupBoxEx1.Text = "采集关键词";
//
// txtKeyWords
//
//
//
//
this.txtKeyWords.Border.Class = "TextBoxBorder";
this.txtKeyWords.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.txtKeyWords.Location = new System.Drawing.Point(10, 21);
this.txtKeyWords.Multiline = true;
this.txtKeyWords.Name = "txtKeyWords";
this.txtKeyWords.PreventEnterBeep = true;
this.txtKeyWords.Size = new System.Drawing.Size(171, 88);
this.txtKeyWords.TabIndex = 7;
this.txtKeyWords.WatermarkText = "请输入要搜索的商品名称\r\n如垃圾桶,连衣裙等\r\n一行一个";
//
// btnLoginDouyin
//
this.btnLoginDouyin.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnLoginDouyin.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnLoginDouyin.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnLoginDouyin.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnLoginDouyin.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnLoginDouyin.ForeColor = System.Drawing.Color.White;
this.btnLoginDouyin.Location = new System.Drawing.Point(720, 20);
this.btnLoginDouyin.Margin = new System.Windows.Forms.Padding(2);
this.btnLoginDouyin.Name = "btnLoginDouyin";
this.btnLoginDouyin.Size = new System.Drawing.Size(66, 26);
this.btnLoginDouyin.TabIndex = 373;
this.btnLoginDouyin.Text = "登录抖音";
this.btnLoginDouyin.UseVisualStyleBackColor = false;
this.btnLoginDouyin.Click += new System.EventHandler(this.btnLoginDouyin_Click);
//
// btnCollect
//
this.btnCollect.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnCollect.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnCollect.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnCollect.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnCollect.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCollect.ForeColor = System.Drawing.Color.White;
this.btnCollect.Location = new System.Drawing.Point(720, 52);
this.btnCollect.Margin = new System.Windows.Forms.Padding(2);
this.btnCollect.Name = "btnCollect";
this.btnCollect.Size = new System.Drawing.Size(66, 26);
this.btnCollect.TabIndex = 374;
this.btnCollect.Text = "开始采集";
this.btnCollect.UseVisualStyleBackColor = false;
this.btnCollect.Click += new System.EventHandler(this.btnCollect_Click);
//
// ucGroupBoxEx2
//
this.ucGroupBoxEx2.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.ucGroupBoxEx2.BorderStyle = LittleRabbit.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND;
this.ucGroupBoxEx2.Controls.Add(this.cmbSort);
this.ucGroupBoxEx2.Controls.Add(this.txtScoreRateMax);
this.ucGroupBoxEx2.Controls.Add(this.checkBox1);
this.ucGroupBoxEx2.Controls.Add(this.label9);
this.ucGroupBoxEx2.Controls.Add(this.txtTotalPage);
this.ucGroupBoxEx2.Controls.Add(this.label10);
this.ucGroupBoxEx2.Controls.Add(this.label11);
this.ucGroupBoxEx2.Controls.Add(this.txtScoreRateMin);
this.ucGroupBoxEx2.Controls.Add(this.label12);
this.ucGroupBoxEx2.Controls.Add(this.txtShopSalesMax);
this.ucGroupBoxEx2.Controls.Add(this.txtProductCountMax);
this.ucGroupBoxEx2.Controls.Add(this.label13);
this.ucGroupBoxEx2.Controls.Add(this.txtProductCountMin);
this.ucGroupBoxEx2.Controls.Add(this.label14);
this.ucGroupBoxEx2.Controls.Add(this.label15);
this.ucGroupBoxEx2.Controls.Add(this.txtShopSalesMin);
this.ucGroupBoxEx2.Controls.Add(this.label16);
this.ucGroupBoxEx2.Location = new System.Drawing.Point(196, 2);
this.ucGroupBoxEx2.Name = "ucGroupBoxEx2";
this.ucGroupBoxEx2.Size = new System.Drawing.Size(357, 120);
this.ucGroupBoxEx2.TabIndex = 395;
this.ucGroupBoxEx2.TabStop = false;
this.ucGroupBoxEx2.Text = "采集参数";
//
// cmbSort
//
this.cmbSort.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbSort.FormattingEnabled = true;
this.cmbSort.Items.AddRange(new object[] {
"综合",
"销量"});
this.cmbSort.Location = new System.Drawing.Point(68, 22);
this.cmbSort.Name = "cmbSort";
this.cmbSort.Size = new System.Drawing.Size(85, 25);
this.cmbSort.TabIndex = 375;
//
// txtScoreRateMax
//
this.txtScoreRateMax.Location = new System.Drawing.Point(287, 86);
this.txtScoreRateMax.Name = "txtScoreRateMax";
this.txtScoreRateMax.Size = new System.Drawing.Size(55, 23);
this.txtScoreRateMax.TabIndex = 391;
this.txtScoreRateMax.Text = "5";
//
// checkBox1
//
this.checkBox1.AutoSize = true;
this.checkBox1.Location = new System.Drawing.Point(13, 87);
this.checkBox1.Name = "checkBox1";
this.checkBox1.Size = new System.Drawing.Size(99, 21);
this.checkBox1.TabIndex = 392;
this.checkBox1.Text = "显示商品图片";
this.checkBox1.UseVisualStyleBackColor = true;
this.checkBox1.Visible = false;
//
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(275, 89);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(13, 17);
this.label9.TabIndex = 390;
this.label9.Text = "-";
//
// txtTotalPage
//
this.txtTotalPage.Location = new System.Drawing.Point(68, 54);
this.txtTotalPage.Name = "txtTotalPage";
this.txtTotalPage.Size = new System.Drawing.Size(85, 23);
this.txtTotalPage.TabIndex = 376;
this.txtTotalPage.Text = "5";
//
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(162, 90);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(56, 17);
this.label10.TabIndex = 389;
this.label10.Text = "体验分数";
//
// label11
//
this.label11.AutoSize = true;
this.label11.Location = new System.Drawing.Point(11, 26);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(56, 17);
this.label11.TabIndex = 377;
this.label11.Text = "排  序";
//
// txtScoreRateMin
//
this.txtScoreRateMin.Location = new System.Drawing.Point(219, 86);
this.txtScoreRateMin.Name = "txtScoreRateMin";
this.txtScoreRateMin.Size = new System.Drawing.Size(55, 23);
this.txtScoreRateMin.TabIndex = 388;
this.txtScoreRateMin.Text = "0";
//
// label12
//
this.label12.AutoSize = true;
this.label12.Location = new System.Drawing.Point(10, 58);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(56, 17);
this.label12.TabIndex = 378;
this.label12.Text = "采集页数";
//
// txtShopSalesMax
//
this.txtShopSalesMax.Location = new System.Drawing.Point(287, 54);
this.txtShopSalesMax.Name = "txtShopSalesMax";
this.txtShopSalesMax.Size = new System.Drawing.Size(55, 23);
this.txtShopSalesMax.TabIndex = 387;
this.txtShopSalesMax.Text = "99999999";
//
// txtProductCountMax
//
this.txtProductCountMax.Location = new System.Drawing.Point(287, 22);
this.txtProductCountMax.Name = "txtProductCountMax";
this.txtProductCountMax.Size = new System.Drawing.Size(55, 23);
this.txtProductCountMax.TabIndex = 383;
this.txtProductCountMax.Text = "99999999";
//
// label13
//
this.label13.AutoSize = true;
this.label13.Location = new System.Drawing.Point(275, 57);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(13, 17);
this.label13.TabIndex = 386;
this.label13.Text = "-";
//
// txtProductCountMin
//
this.txtProductCountMin.Location = new System.Drawing.Point(219, 22);
this.txtProductCountMin.Name = "txtProductCountMin";
this.txtProductCountMin.Size = new System.Drawing.Size(55, 23);
this.txtProductCountMin.TabIndex = 379;
this.txtProductCountMin.Text = "0";
//
// label14
//
this.label14.AutoSize = true;
this.label14.Location = new System.Drawing.Point(162, 58);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(56, 17);
this.label14.TabIndex = 385;
this.label14.Text = "店铺月销";
//
// label15
//
this.label15.AutoSize = true;
this.label15.Location = new System.Drawing.Point(162, 26);
this.label15.Name = "label15";
this.label15.Size = new System.Drawing.Size(56, 17);
this.label15.TabIndex = 380;
this.label15.Text = "宝贝数量";
//
// txtShopSalesMin
//
this.txtShopSalesMin.Location = new System.Drawing.Point(219, 54);
this.txtShopSalesMin.Name = "txtShopSalesMin";
this.txtShopSalesMin.Size = new System.Drawing.Size(55, 23);
this.txtShopSalesMin.TabIndex = 384;
this.txtShopSalesMin.Text = "0";
//
// label16
//
this.label16.AutoSize = true;
this.label16.Location = new System.Drawing.Point(275, 25);
this.label16.Name = "label16";
this.label16.Size = new System.Drawing.Size(13, 17);
this.label16.TabIndex = 382;
this.label16.Text = "-";
//
// splitContainer2
//
this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
this.splitContainer2.Location = new System.Drawing.Point(0, 0);
this.splitContainer2.Name = "splitContainer2";
this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer2.Panel1
//
this.splitContainer2.Panel1.Controls.Add(this.dgvCollect);
this.splitContainer2.Panel1.Padding = new System.Windows.Forms.Padding(5, 0, 5, 0);
//
// splitContainer2.Panel2
//
this.splitContainer2.Panel2.Controls.Add(this.statusBar);
this.splitContainer2.Size = new System.Drawing.Size(800, 325);
this.splitContainer2.SplitterDistance = 299;
this.splitContainer2.SplitterWidth = 1;
this.splitContainer2.TabIndex = 7;
//
// dgvCollect
//
this.dgvCollect.AllowUserToAddRows = false;
this.dgvCollect.AllowUserToDeleteRows = false;
dataGridViewCellStyle4.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvCollect.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle4;
this.dgvCollect.BackgroundColor = System.Drawing.Color.White;
dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle5.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle5.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle5.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle5.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvCollect.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle5;
this.dgvCollect.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvCollect.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colSelect,
this.colKeyword,
this.colShopId,
this.colShopName,
this.colRate,
this.colSaleCount,
this.colShopCount,
this.colProductId,
this.colDelete});
this.dgvCollect.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvCollect.Location = new System.Drawing.Point(5, 0);
this.dgvCollect.Name = "dgvCollect";
this.dgvCollect.ReadOnly = true;
dataGridViewCellStyle6.Font = new System.Drawing.Font("微软雅黑", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.dgvCollect.RowsDefaultCellStyle = dataGridViewCellStyle6;
this.dgvCollect.RowTemplate.Height = 23;
this.dgvCollect.Size = new System.Drawing.Size(790, 299);
this.dgvCollect.TabIndex = 6;
this.dgvCollect.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvCollect_CellContentClick);
//
// colSelect
//
this.colSelect.FillWeight = 50F;
this.colSelect.HeaderText = "选";
this.colSelect.Name = "colSelect";
this.colSelect.ReadOnly = true;
this.colSelect.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colSelect.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colSelect.Visible = false;
this.colSelect.Width = 41;
//
// colKeyword
//
this.colKeyword.HeaderText = "关键词";
this.colKeyword.Name = "colKeyword";
this.colKeyword.ReadOnly = true;
//
// colShopId
//
this.colShopId.HeaderText = "店铺Id";
this.colShopId.Name = "colShopId";
this.colShopId.ReadOnly = true;
//
// colShopName
//
this.colShopName.FillWeight = 150F;
this.colShopName.HeaderText = "店铺名称";
this.colShopName.Name = "colShopName";
this.colShopName.ReadOnly = true;
this.colShopName.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colShopName.Width = 150;
//
// colRate
//
this.colRate.HeaderText = "体验分数";
this.colRate.Name = "colRate";
this.colRate.ReadOnly = true;
this.colRate.Width = 80;
//
// colSaleCount
//
this.colSaleCount.HeaderText = "店铺销量";
this.colSaleCount.Name = "colSaleCount";
this.colSaleCount.ReadOnly = true;
this.colSaleCount.Width = 80;
//
// colShopCount
//
this.colShopCount.FillWeight = 150F;
this.colShopCount.HeaderText = "店铺宝贝数量";
this.colShopCount.Name = "colShopCount";
this.colShopCount.ReadOnly = true;
//
// colProductId
//
this.colProductId.HeaderText = "商品链接";
this.colProductId.Name = "colProductId";
this.colProductId.ReadOnly = true;
this.colProductId.Width = 300;
//
// colDelete
//
this.colDelete.HeaderText = "删除";
this.colDelete.Name = "colDelete";
this.colDelete.ReadOnly = true;
this.colDelete.Visible = false;
this.colDelete.Width = 81;
//
// statusBar
//
this.statusBar.BackColor = System.Drawing.Color.White;
this.statusBar.Dock = System.Windows.Forms.DockStyle.Fill;
this.statusBar.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.statusBar.Location = new System.Drawing.Point(0, 0);
this.statusBar.Margin = new System.Windows.Forms.Padding(0);
this.statusBar.Name = "statusBar";
this.statusBar.Size = new System.Drawing.Size(800, 25);
this.statusBar.TabIndex = 4;
//
// FriendShopCollectForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(800, 450);
this.Controls.Add(this.splitContainer1);
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Name = "FriendShopCollectForm";
this.Text = "同行采集";
this.Load += new System.EventHandler(this.FriendShopCollectForm_Load);
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
this.ucGroupBoxEx1.ResumeLayout(false);
this.ucGroupBoxEx2.ResumeLayout(false);
this.ucGroupBoxEx2.PerformLayout();
this.splitContainer2.Panel1.ResumeLayout(false);
this.splitContainer2.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
this.splitContainer2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dgvCollect)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.SplitContainer splitContainer1;
private UserControls.ButtonEx btnExport;
private UserComponent.UcGroupBoxEx ucGroupBoxEx1;
private UserControls.ButtonEx btnLoginDouyin;
private UserControls.ButtonEx btnCollect;
private UserComponent.DataGridViewEx dgvCollect;
private UserComponent.UcGroupBoxEx ucGroupBoxEx2;
private System.Windows.Forms.ComboBox cmbSort;
private System.Windows.Forms.TextBox txtScoreRateMax;
private System.Windows.Forms.CheckBox checkBox1;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.TextBox txtTotalPage;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.TextBox txtScoreRateMin;
private System.Windows.Forms.Label label12;
private System.Windows.Forms.TextBox txtShopSalesMax;
private System.Windows.Forms.TextBox txtProductCountMax;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.TextBox txtProductCountMin;
private System.Windows.Forms.Label label14;
private System.Windows.Forms.Label label15;
private System.Windows.Forms.TextBox txtShopSalesMin;
private System.Windows.Forms.Label label16;
private DevComponents.DotNetBar.Controls.TextBoxX txtKeyWords;
private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect;
private System.Windows.Forms.DataGridViewTextBoxColumn colKeyword;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopId;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopName;
private System.Windows.Forms.DataGridViewTextBoxColumn colRate;
private System.Windows.Forms.DataGridViewTextBoxColumn colSaleCount;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopCount;
private System.Windows.Forms.DataGridViewTextBoxColumn colProductId;
private System.Windows.Forms.DataGridViewLinkColumn colDelete;
private System.Windows.Forms.SplitContainer splitContainer2;
private UserControls.StatusBarUserControl statusBar;
}
}
@@ -0,0 +1,357 @@
using AllBase;
using AllBase.Helper;
using AllBase.Model.Result;
using LittleRabbit.LittleRabbitForms.BaseForms;
using LittleRabbit.LittleRabbitForms.ToolForms;
using NaiBa.Util.Extension;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace LittleRabbit.LittleRabbitForms.CollectForms
{
public partial class FriendShopCollectForm : Form
{
List<DouGoodsCollectInfo> lstProduct = new List<DouGoodsCollectInfo>();
CancellationTokenSource cancellationTokenSource = null;
long productCountMin = 0;
long productCountMax = 99999999;
long shopSaleCountMin = 0;
long shopSaleCountMax = 99999999;
/// <summary>
/// 体验分数最小值
/// </summary>
decimal scoreMin = 0;
/// <summary>
/// 体验分数最大值
/// </summary>
decimal scoreMax = 100;
public FriendShopCollectForm()
{
InitializeComponent();
}
/// <summary>
///
/// </summary>
/// <param name="cookies"></param>
/// <param name="searchText">搜索关键字</param>
/// <param name="cursor">当前搜索的游标</param>
/// <param name="count">要搜索的总数</param>
/// <param name="sort">排序依据 0:综合 2:销量</param>
/// <returns></returns>
private string GetFriendShops(string cookies, string searchText, string cursor = "0", string count = "50", string sort = "0")
{
HttpWebResponse response = null;
string result;
try
{
string url = "https://lianmengapi-lf.snssdk.com/selection/search/shop?channel=App%20Store&slide_guide_has_shown=1&minor_status=0"
+ "&cursor=" + cursor + "&count=" + count + "&search_text=" + GetHtml.UrlEncodeUtf8(searchText) + "&request_tag_from=m&order_by=&sort=" + sort;
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
//https://lianmengapi-lf.snssdk.com/selection/search/shop?channel=App%20Store&slide_guide_has_shown=1&minor_status=0&cursor=0&count=50&search_text=%e8%bf%9e%e8%a1%a3%e8%a3%99&request_tag_from=m&order_by=&sort=0
//https://lianmengapi-lf.snssdk.com/selection/search/shop?channel=App%20Store&slide_guide_has_shown=1&minor_status=0&cursor=80&count=100&search_text=%E8%BF%9E%E8%A1%A3%E8%A3%99&request_tag_from=m&order_by=&sort=0");
//gfsitesid=MTI1NzAyNzU1NHwxNjI2MDc2NDI1NDN8fDQyOTIxMTA1Mjk2MDgzNzUHBwcHBwcH; gfsitesid=MTI1NzAyNzU1NHwxNjI2MDc2NDI1NDN8fDQyOTIxMTA1Mjk2MDgzNzUHBwcHBwcH; gfsitesid=MTI1NzAyNzU1NHwxNjI2MDc2NDI1NDN8fDQyOTIxMTA1Mjk2MDgzNzUHBwcHBwcH; gfsitesid=MTI1NzAyNzU1NHwxNjI2MDc2NDI1NDN8fDQyOTIxMTA1Mjk2MDgzNzUHBwcHBwcH; gftoken=MTI1NzAyNzU1NHwxNjI2MDc2NDI1NDN8fDAGBgYGBgY; Hm_lvt_b6520b076191ab4b36812da4c90f7a5e=1626076426; MONITOR_WEB_ID=ff46fe79-c1bd-4d03-b18d-39e78c59e3cf; passport_csrf_token_default=7565758120670bc073d791d6c2516599; passport_csrf_token=7565758120670bc073d791d6c2516599; ttcid=84ce6ad7a7c54817876bc354ce50e63998; ttwid=1%7C6M4WENwiVxCUI00v2KqThQe4VmQM34O0AXRdgU3S7ns%7C1626076427%7C6238c10c68cd01bf99c1a8fa834c4250f32a8b2ccc2adc1029ef451cab53cd60; n_mh=7LrrRmeUceh3vjPZWa4C3h7B_APxodsUr7zuYy75V90; sso_uid_tt=2ef4d6078ca6ad08e04251ff869d1454; sso_uid_tt_ss=2ef4d6078ca6ad08e04251ff869d1454; toutiao_sso_user=1f5ff878e13850a8a76d1c5002053dbb; toutiao_sso_user_ss=1f5ff878e13850a8a76d1c5002053dbb; odin_tt=fa6e9e56199abc6fe54781e77c689540450d6e2513913a8b02ae5b1253072129714f9118b1da0c09bfb9397d4dc5c318604bae278e4cf15e9845340f22d65e69; uidpasaddaehruigqreajf=0; tt_scid=rx5XfMYxzTA66ZKDdmoMcC4qrQQzNeZh-wTo-K3sfH8pDdVFgiS9pBpGCcVx2ORX5bdd; ucas_sso_c0_ss=CkEKBTEuMC4wEJ6Ihe7Jof31YBjmJiC9k9DP4oyUBCiwITC39dDb7fTPB0CT6q-HBkiTnuyJBlCOvKLE77ansWBYbhIU5OPHMBH5sjM45bXzqY54qXYF2OY; ucas_sso_c0=CkEKBTEuMC4wEJ6Ihe7Jof31YBjmJiC9k9DP4oyUBCiwITC39dDb7fTPB0CT6q-HBkiTnuyJBlCOvKLE77ansWBYbhIU5OPHMBH5sjM45bXzqY54qXYF2OY; ucas_c0_ss=CkEKBTEuMC4wEKSIhsLaof31YBjmJiC9k9DP4oyUBCiwITC39dDb7fTPB0CT6q-HBkiTnuyJBlCOvKLE77ansWBYbhIUpAxRIGvlmWnW3egoiY9Qkn_jA-M; sid_guard=0f3e1676339ab15de4697e624ff85b58%7C1626076435%7C5184000%7CFri%2C+10-Sep-2021+07%3A53%3A55+GMT; uid_tt=40ce5c67070509846fb296d5d132a38a; uid_tt_ss=40ce5c67070509846fb296d5d132a38a; sid_tt=0f3e1676339ab15de4697e624ff85b58; sessionid=0f3e1676339ab15de4697e624ff85b58; sessionid_ss=0f3e1676339ab15de4697e624ff85b58; ucas_c0=CkEKBTEuMC4wEKSIhsLaof31YBjmJiC9k9DP4oyUBCiwITC39dDb7fTPB0CT6q-HBkiTnuyJBlCOvKLE77ansWBYbhIUpAxRIGvlmWnW3egoiY9Qkn_jA-M; PHPSESSID=ff529a6f01eaf19e6a00245e676d1fa0; PHPSESSID_SS=ff529a6f01eaf19e6a00245e676d1fa0; need_choose_shop=0; Hm_lpvt_b6520b076191ab4b36812da4c90f7a5e=1626076436; login_info=%7B%22for_im_reply%22%3A%22ff529a6f01eaf19e6a00245e676d1fa0%22%7D
//passport_csrf_token_default=b45f8a5deab82f55ee0a9b2452c78a2d; passport_csrf_token=b45f8a5deab82f55ee0a9b2452c78a2d; n_mh=7LrrRmeUceh3vjPZWa4C3h7B_APxodsUr7zuYy75V90; sso_uid_tt=77d4f2eb5023c34a6a9a7cebb2b382db; sso_uid_tt_ss=77d4f2eb5023c34a6a9a7cebb2b382db; toutiao_sso_user=a884ccbcc49dad835d33cdc613c62438; toutiao_sso_user_ss=a884ccbcc49dad835d33cdc613c62438; odin_tt=ef6c903d84d840d6849ac89bba2da6f261fd3ae8b722c34f3e85ac154b69709e145deb2aef4fa2dbb777d1d6c53146dcc3ade71ffb17f315e410d911b0eff5db; ucas_sso_c0_ss=CkEKBTEuMC4wEKSIiN6mnor2YBjmJiC9k9DP4oyUBCiwITC39dDb7fTPB0CG0rCHBkiGhu2JBlCOvKLE77ansWBYbhIUtfYvQwb4NE052EdbcrL95yHsFrs; ucas_sso_c0=CkEKBTEuMC4wEKSIiN6mnor2YBjmJiC9k9DP4oyUBCiwITC39dDb7fTPB0CG0rCHBkiGhu2JBlCOvKLE77ansWBYbhIUtfYvQwb4NE052EdbcrL95yHsFrs; ucas_c0_ss=CkEKBTEuMC4wEKSIid6mnor2YBjmJiC9k9DP4oyUBCiwITC39dDb7fTPB0CG0rCHBkiGhu2JBlCOvKLE77ansWBYbhIU-APRWpBUAsOmIf4repethZ5coPw; sid_guard=630400240480860367e63fa726e7238f%7C1626089734%7C5184000%7CFri%2C+10-Sep-2021+11%3A35%3A34+GMT; uid_tt=1b1612b50857532656f4f623275adb40; uid_tt_ss=1b1612b50857532656f4f623275adb40; sid_tt=630400240480860367e63fa726e7238f; sessionid=630400240480860367e63fa726e7238f; sessionid_ss=630400240480860367e63fa726e7238f; ucas_c0=CkEKBTEuMC4wEKSIid6mnor2YBjmJiC9k9DP4oyUBCiwITC39dDb7fTPB0CG0rCHBkiGhu2JBlCOvKLE77ansWBYbhIU-APRWpBUAsOmIf4repethZ5coPw; PHPSESSID=840c94272b784072021cecf2aefccb30; PHPSESSID_SS=840c94272b784072021cecf2aefccb30; MONITOR_WEB_ID=e8b18a1d-c085-4692-bba2-3972f9dc16e7; buyin_shop_type=24; ttwid=1%7CuycbM01qMO-TgJUFec3jiZ_znHlSLKDYKGuzE_vWz90%7C1626242695%7C4bccbd38df4bd7ff3265ca69959cdc6a6dd7df547437ab4e891149ff37a464cf; SASID=SID2_3492329951615696327; BUYIN_SASID=SID2_3492329951615696327");
request.ContentType = "application/x-www-form-urlencoded";
//request.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36";
request.Headers.Set(HttpRequestHeader.Cookie, cookies);
response = (HttpWebResponse)request.GetResponse();
}
catch (WebException ex)
{
if (ex.Status == WebExceptionStatus.ProtocolError)
{
response = (HttpWebResponse)ex.Response;
result = GetProxyHtml.ReadResponse(response);
return result;
}
else return ex.Message;
}
catch (Exception e)
{
if (response != null) response.Close();
return e.Message;
}
result = GetProxyHtml.ReadResponse(response);
return result;
}
private string GetShopDetail(string productId)
{
HttpWebResponse response = null;
string result;
try
{
string url = "http://ec.snssdk.com/product/ajaxitem?b_type_new=0&device_id=0&is_outside=1&id=" + productId + "&abParams=0";
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
request.ContentType = "application/x-www-form-urlencoded";
request.Referer = "https://haohuo.jinritemai.com/";
request.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36 Edg/91.0.864.509";
request.Headers.Add("origin", @"https://haohuo.jinritemai.com");
response = (HttpWebResponse)request.GetResponse();
}
catch (WebException ex)
{
if (ex.Status == WebExceptionStatus.ProtocolError)
{
response = (HttpWebResponse)ex.Response;
result = GetProxyHtml.ReadResponse(response);
return result;
}
else return ex.Message;
}
catch (Exception e)
{
if (response != null) response.Close();
return e.Message;
}
result = GetProxyHtml.ReadResponse(response);
return result;
}
private void btnCollect_Click(object sender, EventArgs e)
{
if (btnCollect.Text != "开始采集")
{
cancellationTokenSource.Cancel();
return;
}
var cookieShop = GlobalConfig.DouShopLoginList.FirstOrDefault(s => s.LoginStatus == "登录成功");
if (cookieShop == null)
{
BaseForms.BaseMsgForm.ShowError("请登录店铺账号后搜索");
return;
}
var searchTextArr = this.txtKeyWords.Text.Split(new string[] { "\r", "\n", ",", " " }, StringSplitOptions.RemoveEmptyEntries);
if (searchTextArr.Length == 0)
{
BaseForms.BaseMsgForm.ShowError("请至少输入一个关键词");
return;
}
productCountMin = txtProductCountMin.Text.ParseToLong();
productCountMax = txtProductCountMax.Text.ParseToLong();
shopSaleCountMin = txtShopSalesMin.Text.ParseToLong();
shopSaleCountMax = txtShopSalesMax.Text.ParseToLong();
scoreMin = txtScoreRateMin.Text.ParseToDecimal();
scoreMax = txtScoreRateMax.Text.ParseToDecimal();
int totalPage = txtTotalPage.Text.ParseToInt();
lstProduct.Clear();
this.dgvCollect.Rows.Clear();
var sortType = cmbSort.SelectedIndex <= 0 ? "0" : "2";
cancellationTokenSource = new CancellationTokenSource();
int n = 0;
int total = searchTextArr.Count() * totalPage;
this.statusBar.lblTaskStatus.Text = "开始采集...";
this.statusBar.pgbTaskProgress.Value = n;
this.statusBar.pgbTaskProgress.Text = n + "/" + total;
this.statusBar.pgbTaskProgress.Maximum = total;
btnCollect.Text = "停止采集";
Task.Run(() =>
{
foreach (var searchText in searchTextArr)
{
if (cancellationTokenSource.IsCancellationRequested)
break;
var exportFileName = "采集导出\\抖音同行采集" + DateTime.Now.ToString("yyyyMMddHHmmss") + ".csv";
try
{
if (!Directory.Exists("采集导出"))
Directory.CreateDirectory("采集导出");
StringBuilder sb = new StringBuilder();
sb.AppendLine("关键词,店铺编号,店铺名称,体验分数,店铺销量,店铺商品总数,商品链接");
File.AppendAllText(exportFileName, sb.ToString(), Encoding.Default);
}
catch (Exception ex) { }
for (int page = 0; page < totalPage; page++)
{
if (cancellationTokenSource.IsCancellationRequested)
break;
n++;
Invoke(new Action(() =>
{
this.statusBar.lblTaskStatus.Text = "正在采集同行商品:" + searchText + ",当前采集到第 " + (page + 1) + " 页";
this.statusBar.pgbTaskProgress.Value = n;
this.statusBar.pgbTaskProgress.Text = n + "/" + total;
this.statusBar.pgbTaskProgress.Maximum = total;
}));
//var friendProductResult = GetFriendShops(cookieShop.Cookies, searchText, (page * 10).ToString(), (totalPage * 10).ToString(), sortType);
var friendProductResult = GetFriendShops(GlobalConfig.DouUserCookies, searchText, (page * 10).ToString(), (totalPage * 10).ToString(), sortType);
if (friendProductResult.Contains("用户未登录"))
{
Invoke(new Action(() =>
{
ToolForms.DouUserLoginForm dForm = new ToolForms.DouUserLoginForm();
dForm.ShowDialog();
}));
}
friendProductResult = GetFriendShops(GlobalConfig.DouUserCookies, searchText, (page * 10).ToString(), (totalPage * 10).ToString(), sortType);
if (friendProductResult.Contains("用户未登录"))
{
BaseMsgForm.ShowError("用户登录失败,请登录抖音账号后再试!");
break;
}
else if (!string.IsNullOrEmpty(friendProductResult) && friendProductResult.Contains("\"status_code\":0"))
{
JObject jObj = JObject.Parse(friendProductResult);
if (jObj["shops"] == null)
continue;
foreach (var shop in jObj["shops"])
{
if (cancellationTokenSource.IsCancellationRequested)
break;
var shopStr = JsonHelper.SerializeObject(shop);
DouGoodsCollectInfo good = new DouGoodsCollectInfo();
good.Keyword = searchText;
good.Id = BaseRegex.GetStringJson(ref shopStr, "product_id");
good.ShopName = BaseRegex.GetStringJson(ref shopStr, "name");
//good.ShopId = BaseRegex.GetStringJson(ref shopStr, "shop_id");
good.CommentsRate = BaseRegex.GetStringJson(ref shopStr, "score").ParseToDouble();
good.Sales = BaseRegex.GetStringJson(ref shopStr, "sales");
// 筛选条件
if (good.Sales.ParseToLong() < this.shopSaleCountMin || good.Sales.ParseToLong() > this.shopSaleCountMax
|| good.CommentsRate.ParseToDecimal() < scoreMin || good.CommentsRate.ParseToDecimal() > scoreMax)
{
continue;
}
Thread.Sleep(Randomx.GetId(500, 1000));
string detailResult = GetShopDetail(good.Id);
if (string.IsNullOrEmpty(detailResult) || !detailResult.Contains("\"st\":0"))
{
Thread.Sleep(Randomx.GetId(500, 1000));
detailResult = GetShopDetail(good.Id);
}
if (!string.IsNullOrEmpty(detailResult) && detailResult.Contains("\"st\":0"))
{
good.ShopProductCount = BaseRegex.GetStringJson(ref detailResult, "shop_product_count").ParseToInt();
// 筛选条件
if (good.ShopProductCount < this.productCountMin || good.ShopProductCount > this.productCountMax)
{
continue;
}
}
// 获取可用于店铺查询的店铺ID
Thread.Sleep(Randomx.GetId(300, 600));
string shopResult = Work.BLL.Collect.HaoWuCollectBLL.getHtml("https://ec.snssdk.com/product/fxgajaxstaticitem?" +
"b_type_new=0&device_id=0&is_outside=1&id=" + good.Id + "&preview=0", "", "utf8");
if (!string.IsNullOrEmpty(shopResult))
good.ShopId = BaseRegex.GetStringJson(ref shopResult, "shop_id");
try
{
this.lstProduct.Add(good);
StringBuilder sb = new StringBuilder();
sb.AppendLine(good.Keyword + "," + good.ShopId + ","
+ good.ShopName + "," + good.CommentsRate + "," + good.Sales + "," + good.ShopProductCount + ","
+ "https://haohuo.jinritemai.com/views/product/item2?id=" + good.Id);
File.AppendAllText(exportFileName, sb.ToString(), Encoding.Default);
}
catch (Exception ex)
{
}
Invoke(new Action(() =>
{
var index = this.dgvCollect.Rows.Add(false, good.Keyword, good.ShopId, good.ShopName, good.CommentsRate, good.Sales,
good.ShopProductCount, "https://haohuo.jinritemai.com/views/product/item2?id=" + good.Id, "删除");
}));
}
}
}
}
Invoke(new Action(() =>
{
btnCollect.Text = "开始采集";
this.statusBar.lblTaskStatus.Text = "采集结束,共采集到商品" + this.lstProduct.Count + "个";
this.statusBar.pgbTaskProgress.Value = n;
this.statusBar.pgbTaskProgress.Text = n + "/" + total;
this.statusBar.pgbTaskProgress.Maximum = total;
}));
}, cancellationTokenSource.Token);
}
private void btnLoginDouyin_Click(object sender, EventArgs e)
{
DouUserLoginForm dForm = new DouUserLoginForm();
dForm.ShowDialog();
}
private void FriendShopCollectForm_Load(object sender, EventArgs e)
{
this.cmbSort.SelectedIndex = 0;
}
private void dgvCollect_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
if (e.RowIndex < 0 || e.ColumnIndex < 0)
return;
var goodsId = dgvCollect.Rows[e.RowIndex].Cells["colProductId"].Value.ToString();
var columnName = dgvCollect.Columns[e.ColumnIndex].Name;
if (columnName == "colProductId")
{
string url = goodsId;
GetHtml.OpenUrl(url);
}
}
private void btnExport_Click(object sender, EventArgs e)
{
try
{
SaveFileDialog saveFileDialog1 = new SaveFileDialog();
saveFileDialog1.Filter = "表格文件(*.csv)|*.csv";
saveFileDialog1.FileName = "抖音同行采集" + DateTime.Now.ToString("yyyyMMddHHmmss") + ".csv";
saveFileDialog1.FilterIndex = 2;
saveFileDialog1.RestoreDirectory = true;
if (saveFileDialog1.ShowDialog() == DialogResult.OK)
{
StringBuilder sb = new StringBuilder();
sb.AppendLine("关键词,店铺编号,店铺名称,体验分数,店铺销量,店铺商品总数,商品链接");
foreach (var goodsInfo in lstProduct)
{
sb.AppendLine(goodsInfo.Keyword + "," + goodsInfo.ShopId + ","
+ goodsInfo.ShopName + "," + goodsInfo.CommentsRate + "," + goodsInfo.Sales + "," + goodsInfo.ShopProductCount + ","
+ "https://haohuo.jinritemai.com/views/product/item2?id=" + goodsInfo.Id);
}
File.WriteAllText(saveFileDialog1.FileName, sb.ToString(), Encoding.Default);
BaseForms.BaseMsgForm.ShowInfo("导出成功");
}
}
catch (Exception ex)
{
BaseForms.BaseMsgForm.ShowError(ex.Message);
}
}
}
}
@@ -0,0 +1,144 @@
<?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="colSelect.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colKeyword.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colShopId.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colRate.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colSaleCount.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colShopCount.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colProductId.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colDelete.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>
+556
View File
@@ -0,0 +1,556 @@
namespace LittleRabbit.LittleRabbitForms.CollectForms
{
partial class HaoWuCollectForm
{
/// <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.components = new System.ComponentModel.Container();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.btnExport = new LittleRabbit.UserControls.ButtonEx();
this.ucGroupBoxEx1 = new LittleRabbit.UserComponent.UcGroupBoxEx(this.components);
this.cmbCategory = new System.Windows.Forms.ComboBox();
this.txtRateMax = new System.Windows.Forms.TextBox();
this.chkShowImage = new System.Windows.Forms.CheckBox();
this.label7 = new System.Windows.Forms.Label();
this.txtCollectPage = new System.Windows.Forms.TextBox();
this.label8 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.txtRateMin = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.txtSaleCountMax = new System.Windows.Forms.TextBox();
this.txtPriceMax = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.txtPriceMin = new System.Windows.Forms.TextBox();
this.label6 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.txtSaleCountMin = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.btnLoginDouyin = new LittleRabbit.UserControls.ButtonEx();
this.btnCollect = new LittleRabbit.UserControls.ButtonEx();
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.dgvCollect = new LittleRabbit.UserComponent.DataGridViewEx();
this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.colProductId = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colProductName = new System.Windows.Forms.DataGridViewLinkColumn();
this.colImage = new System.Windows.Forms.DataGridViewImageColumn();
this.colPrice = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colSaleCount = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colRate = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colShopId = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colShopName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colShopCount = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colDelete = new System.Windows.Forms.DataGridViewLinkColumn();
this.statusBar = new LittleRabbit.UserControls.StatusBarUserControl();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.ucGroupBoxEx1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit();
this.splitContainer2.Panel1.SuspendLayout();
this.splitContainer2.Panel2.SuspendLayout();
this.splitContainer2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvCollect)).BeginInit();
this.SuspendLayout();
//
// splitContainer1
//
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
this.splitContainer1.Name = "splitContainer1";
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.btnExport);
this.splitContainer1.Panel1.Controls.Add(this.ucGroupBoxEx1);
this.splitContainer1.Panel1.Controls.Add(this.btnLoginDouyin);
this.splitContainer1.Panel1.Controls.Add(this.btnCollect);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.splitContainer2);
this.splitContainer1.Size = new System.Drawing.Size(878, 472);
this.splitContainer1.SplitterDistance = 121;
this.splitContainer1.TabIndex = 375;
//
// btnExport
//
this.btnExport.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnExport.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnExport.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnExport.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnExport.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnExport.ForeColor = System.Drawing.Color.White;
this.btnExport.Location = new System.Drawing.Point(798, 84);
this.btnExport.Margin = new System.Windows.Forms.Padding(2);
this.btnExport.Name = "btnExport";
this.btnExport.Size = new System.Drawing.Size(66, 26);
this.btnExport.TabIndex = 394;
this.btnExport.Text = "导出数据";
this.btnExport.UseVisualStyleBackColor = false;
this.btnExport.Click += new System.EventHandler(this.btnExport_Click);
//
// ucGroupBoxEx1
//
this.ucGroupBoxEx1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.ucGroupBoxEx1.BorderStyle = LittleRabbit.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND;
this.ucGroupBoxEx1.Controls.Add(this.cmbCategory);
this.ucGroupBoxEx1.Controls.Add(this.txtRateMax);
this.ucGroupBoxEx1.Controls.Add(this.chkShowImage);
this.ucGroupBoxEx1.Controls.Add(this.label7);
this.ucGroupBoxEx1.Controls.Add(this.txtCollectPage);
this.ucGroupBoxEx1.Controls.Add(this.label8);
this.ucGroupBoxEx1.Controls.Add(this.label1);
this.ucGroupBoxEx1.Controls.Add(this.txtRateMin);
this.ucGroupBoxEx1.Controls.Add(this.label2);
this.ucGroupBoxEx1.Controls.Add(this.txtSaleCountMax);
this.ucGroupBoxEx1.Controls.Add(this.txtPriceMax);
this.ucGroupBoxEx1.Controls.Add(this.label5);
this.ucGroupBoxEx1.Controls.Add(this.txtPriceMin);
this.ucGroupBoxEx1.Controls.Add(this.label6);
this.ucGroupBoxEx1.Controls.Add(this.label3);
this.ucGroupBoxEx1.Controls.Add(this.txtSaleCountMin);
this.ucGroupBoxEx1.Controls.Add(this.label4);
this.ucGroupBoxEx1.Location = new System.Drawing.Point(3, 2);
this.ucGroupBoxEx1.Name = "ucGroupBoxEx1";
this.ucGroupBoxEx1.Size = new System.Drawing.Size(426, 120);
this.ucGroupBoxEx1.TabIndex = 393;
this.ucGroupBoxEx1.TabStop = false;
this.ucGroupBoxEx1.Text = "采集参数";
//
// cmbCategory
//
this.cmbCategory.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbCategory.FormattingEnabled = true;
this.cmbCategory.Location = new System.Drawing.Point(76, 21);
this.cmbCategory.Name = "cmbCategory";
this.cmbCategory.Size = new System.Drawing.Size(105, 25);
this.cmbCategory.TabIndex = 375;
//
// txtRateMax
//
this.txtRateMax.Location = new System.Drawing.Point(330, 86);
this.txtRateMax.Name = "txtRateMax";
this.txtRateMax.Size = new System.Drawing.Size(55, 23);
this.txtRateMax.TabIndex = 391;
this.txtRateMax.Text = "100";
//
// chkShowImage
//
this.chkShowImage.AutoSize = true;
this.chkShowImage.Location = new System.Drawing.Point(76, 87);
this.chkShowImage.Name = "chkShowImage";
this.chkShowImage.Size = new System.Drawing.Size(99, 21);
this.chkShowImage.TabIndex = 392;
this.chkShowImage.Text = "显示商品图片";
this.chkShowImage.UseVisualStyleBackColor = true;
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(314, 89);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(13, 17);
this.label7.TabIndex = 390;
this.label7.Text = "-";
//
// txtCollectPage
//
this.txtCollectPage.Location = new System.Drawing.Point(76, 54);
this.txtCollectPage.Name = "txtCollectPage";
this.txtCollectPage.Size = new System.Drawing.Size(105, 23);
this.txtCollectPage.TabIndex = 376;
this.txtCollectPage.Text = "5";
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(205, 89);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(44, 17);
this.label8.TabIndex = 389;
this.label8.Text = "好评率";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(14, 25);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(56, 17);
this.label1.TabIndex = 377;
this.label1.Text = "采集类目";
//
// txtRateMin
//
this.txtRateMin.Location = new System.Drawing.Point(256, 86);
this.txtRateMin.Name = "txtRateMin";
this.txtRateMin.Size = new System.Drawing.Size(55, 23);
this.txtRateMin.TabIndex = 388;
this.txtRateMin.Text = "0";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(14, 57);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(56, 17);
this.label2.TabIndex = 378;
this.label2.Text = "采集页数";
//
// txtSaleCountMax
//
this.txtSaleCountMax.Location = new System.Drawing.Point(330, 54);
this.txtSaleCountMax.Name = "txtSaleCountMax";
this.txtSaleCountMax.Size = new System.Drawing.Size(55, 23);
this.txtSaleCountMax.TabIndex = 387;
this.txtSaleCountMax.Text = "99999999";
//
// txtPriceMax
//
this.txtPriceMax.Location = new System.Drawing.Point(330, 22);
this.txtPriceMax.Name = "txtPriceMax";
this.txtPriceMax.Size = new System.Drawing.Size(55, 23);
this.txtPriceMax.TabIndex = 383;
this.txtPriceMax.Text = "99999999";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(314, 57);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(13, 17);
this.label5.TabIndex = 386;
this.label5.Text = "-";
//
// txtPriceMin
//
this.txtPriceMin.Location = new System.Drawing.Point(256, 22);
this.txtPriceMin.Name = "txtPriceMin";
this.txtPriceMin.Size = new System.Drawing.Size(55, 23);
this.txtPriceMin.TabIndex = 379;
this.txtPriceMin.Text = "0";
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(217, 57);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(32, 17);
this.label6.TabIndex = 385;
this.label6.Text = "销量";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(217, 25);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(32, 17);
this.label3.TabIndex = 380;
this.label3.Text = "价格";
//
// txtSaleCountMin
//
this.txtSaleCountMin.Location = new System.Drawing.Point(256, 54);
this.txtSaleCountMin.Name = "txtSaleCountMin";
this.txtSaleCountMin.Size = new System.Drawing.Size(55, 23);
this.txtSaleCountMin.TabIndex = 384;
this.txtSaleCountMin.Text = "0";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(314, 25);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(13, 17);
this.label4.TabIndex = 382;
this.label4.Text = "-";
//
// btnLoginDouyin
//
this.btnLoginDouyin.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnLoginDouyin.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnLoginDouyin.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnLoginDouyin.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnLoginDouyin.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnLoginDouyin.ForeColor = System.Drawing.Color.White;
this.btnLoginDouyin.Location = new System.Drawing.Point(798, 20);
this.btnLoginDouyin.Margin = new System.Windows.Forms.Padding(2);
this.btnLoginDouyin.Name = "btnLoginDouyin";
this.btnLoginDouyin.Size = new System.Drawing.Size(66, 26);
this.btnLoginDouyin.TabIndex = 373;
this.btnLoginDouyin.Text = "登录抖音";
this.btnLoginDouyin.UseVisualStyleBackColor = false;
this.btnLoginDouyin.Click += new System.EventHandler(this.btnLoginDouyin_Click);
//
// btnCollect
//
this.btnCollect.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnCollect.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnCollect.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnCollect.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnCollect.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCollect.ForeColor = System.Drawing.Color.White;
this.btnCollect.Location = new System.Drawing.Point(798, 52);
this.btnCollect.Margin = new System.Windows.Forms.Padding(2);
this.btnCollect.Name = "btnCollect";
this.btnCollect.Size = new System.Drawing.Size(66, 26);
this.btnCollect.TabIndex = 374;
this.btnCollect.Text = "开始采集";
this.btnCollect.UseVisualStyleBackColor = false;
this.btnCollect.Click += new System.EventHandler(this.btnCollect_Click);
//
// splitContainer2
//
this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
this.splitContainer2.Location = new System.Drawing.Point(0, 0);
this.splitContainer2.Name = "splitContainer2";
this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer2.Panel1
//
this.splitContainer2.Panel1.Controls.Add(this.dgvCollect);
this.splitContainer2.Panel1.Padding = new System.Windows.Forms.Padding(5, 0, 5, 0);
//
// splitContainer2.Panel2
//
this.splitContainer2.Panel2.Controls.Add(this.statusBar);
this.splitContainer2.Size = new System.Drawing.Size(878, 347);
this.splitContainer2.SplitterDistance = 318;
this.splitContainer2.SplitterWidth = 1;
this.splitContainer2.TabIndex = 7;
//
// dgvCollect
//
this.dgvCollect.AllowUserToAddRows = false;
this.dgvCollect.AllowUserToDeleteRows = false;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvCollect.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
this.dgvCollect.BackgroundColor = System.Drawing.Color.White;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvCollect.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
this.dgvCollect.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvCollect.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colSelect,
this.colProductId,
this.colProductName,
this.colImage,
this.colPrice,
this.colSaleCount,
this.colRate,
this.colShopId,
this.colShopName,
this.colShopCount,
this.colDelete});
this.dgvCollect.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvCollect.Location = new System.Drawing.Point(5, 0);
this.dgvCollect.Name = "dgvCollect";
this.dgvCollect.ReadOnly = true;
dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.dgvCollect.RowsDefaultCellStyle = dataGridViewCellStyle3;
this.dgvCollect.RowTemplate.Height = 23;
this.dgvCollect.Size = new System.Drawing.Size(868, 318);
this.dgvCollect.TabIndex = 6;
this.dgvCollect.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvShop_CellContentClick);
//
// colSelect
//
this.colSelect.FillWeight = 50F;
this.colSelect.HeaderText = "选";
this.colSelect.Name = "colSelect";
this.colSelect.ReadOnly = true;
this.colSelect.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colSelect.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colSelect.Visible = false;
this.colSelect.Width = 41;
//
// colProductId
//
this.colProductId.HeaderText = "商品Id";
this.colProductId.Name = "colProductId";
this.colProductId.ReadOnly = true;
//
// colProductName
//
this.colProductName.HeaderText = "商品名称";
this.colProductName.Name = "colProductName";
this.colProductName.ReadOnly = true;
this.colProductName.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colProductName.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colProductName.Width = 240;
//
// colImage
//
this.colImage.HeaderText = "图片";
this.colImage.Name = "colImage";
this.colImage.ReadOnly = true;
this.colImage.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colImage.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colImage.Visible = false;
this.colImage.Width = 70;
//
// colPrice
//
this.colPrice.HeaderText = "价格";
this.colPrice.Name = "colPrice";
this.colPrice.ReadOnly = true;
this.colPrice.Width = 80;
//
// colSaleCount
//
this.colSaleCount.HeaderText = "销量";
this.colSaleCount.Name = "colSaleCount";
this.colSaleCount.ReadOnly = true;
this.colSaleCount.Width = 80;
//
// colRate
//
this.colRate.HeaderText = "好评率";
this.colRate.Name = "colRate";
this.colRate.ReadOnly = true;
this.colRate.Width = 80;
//
// colShopId
//
this.colShopId.HeaderText = "店铺Id";
this.colShopId.Name = "colShopId";
this.colShopId.ReadOnly = true;
//
// colShopName
//
this.colShopName.FillWeight = 150F;
this.colShopName.HeaderText = "店铺名称";
this.colShopName.Name = "colShopName";
this.colShopName.ReadOnly = true;
this.colShopName.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colShopName.Width = 150;
//
// colShopCount
//
this.colShopCount.FillWeight = 150F;
this.colShopCount.HeaderText = "店铺商品总数";
this.colShopCount.Name = "colShopCount";
this.colShopCount.ReadOnly = true;
this.colShopCount.Width = 80;
//
// colDelete
//
this.colDelete.HeaderText = "删除";
this.colDelete.Name = "colDelete";
this.colDelete.ReadOnly = true;
this.colDelete.Visible = false;
this.colDelete.Width = 81;
//
// statusBar
//
this.statusBar.BackColor = System.Drawing.Color.White;
this.statusBar.Dock = System.Windows.Forms.DockStyle.Fill;
this.statusBar.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.statusBar.Location = new System.Drawing.Point(0, 0);
this.statusBar.Margin = new System.Windows.Forms.Padding(0);
this.statusBar.Name = "statusBar";
this.statusBar.Size = new System.Drawing.Size(878, 28);
this.statusBar.TabIndex = 4;
//
// HaoWuCollectForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(878, 472);
this.Controls.Add(this.splitContainer1);
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.Name = "HaoWuCollectForm";
this.Text = "好物采集";
this.Load += new System.EventHandler(this.HaoWuCollectForm_Load);
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
this.ucGroupBoxEx1.ResumeLayout(false);
this.ucGroupBoxEx1.PerformLayout();
this.splitContainer2.Panel1.ResumeLayout(false);
this.splitContainer2.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
this.splitContainer2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dgvCollect)).EndInit();
this.ResumeLayout(false);
}
#endregion
private UserControls.ButtonEx btnLoginDouyin;
private UserControls.ButtonEx btnCollect;
private System.Windows.Forms.SplitContainer splitContainer1;
private UserComponent.DataGridViewEx dgvCollect;
private System.Windows.Forms.ComboBox cmbCategory;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox txtCollectPage;
private System.Windows.Forms.TextBox txtRateMax;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.TextBox txtRateMin;
private System.Windows.Forms.TextBox txtSaleCountMax;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.TextBox txtSaleCountMin;
private System.Windows.Forms.TextBox txtPriceMax;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox txtPriceMin;
private System.Windows.Forms.CheckBox chkShowImage;
private UserComponent.UcGroupBoxEx ucGroupBoxEx1;
private UserControls.ButtonEx btnExport;
private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect;
private System.Windows.Forms.DataGridViewTextBoxColumn colProductId;
private System.Windows.Forms.DataGridViewLinkColumn colProductName;
private System.Windows.Forms.DataGridViewImageColumn colImage;
private System.Windows.Forms.DataGridViewTextBoxColumn colPrice;
private System.Windows.Forms.DataGridViewTextBoxColumn colSaleCount;
private System.Windows.Forms.DataGridViewTextBoxColumn colRate;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopId;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopName;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopCount;
private System.Windows.Forms.DataGridViewLinkColumn colDelete;
private System.Windows.Forms.SplitContainer splitContainer2;
private UserControls.StatusBarUserControl statusBar;
}
}
@@ -0,0 +1,436 @@
using AllBase;
using AllBase.Helper;
using AllBase.Model.Result;
using LittleRabbit.LittleRabbitForms.ToolForms;
using NaiBa.Util.Extension;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using Work.BLL.Collect;
namespace LittleRabbit.LittleRabbitForms.CollectForms
{
public partial class HaoWuCollectForm : Form
{
CancellationTokenSource cancellationTokenSource = null;
/// <summary>
/// 商品标题不包含的关键词列表
/// </summary>
private List<string> lstBanKeyText = new List<string>();
List<DouGoodsCollectInfo> lstProduct = new List<DouGoodsCollectInfo>();
/// <summary>
/// 商品过滤的最低销量
/// </summary>
private string minSaleCount = "0";
private string maxSaleCount = "99999999";
private string minPrice = "0";
private string maxPrice = "99999999";
/// <summary>
/// 好评率
/// </summary>
private double hplMin = -1;
private double hplMax = 100;
/// <summary>
/// 采集详情推荐中的商品
/// </summary>
private bool isXqtj = false;
/// <summary>
/// 是否显示图片
/// </summary>
private bool isShowImg = false;
private string exportFileName = "douyinhaowu_collect.csv";
private string[] cates = new string[] { "精选", "食品饮料", "生鲜", "女装", "鞋靴", "彩妆", "护肤", "珠宝文玩", "家电", "数码办公", "男装",
"家纺", "家装", "厨具", "图书", "配饰", "母婴", "运动", "百货", "洗护", "票务卡券", "车品", "绿植农资" };
public HaoWuCollectForm()
{
InitializeComponent();
}
private void HaoWuCollectForm_Load(object sender, EventArgs e)
{
foreach (var item in cates)
{
this.cmbCategory.Items.Add(item);
}
this.cmbCategory.SelectedIndex = 0;
this.splitContainer2.SplitterWidth = 1;
}
public void Collect(string dyCookies, int totalPage, string cateName, string cateIndex, ref List<DouGoodsCollectInfo> lstGoods, ref int currentPage)
{
int total = totalPage;
string str = "";
try
{
if (!Directory.Exists("采集导出"))
Directory.CreateDirectory("采集导出");
exportFileName = "采集导出\\抖音好物采集" + DateTime.Now.ToString("yyyyMMddHHmmss") + ".csv";
StreamWriter writer = new StreamWriter(this.exportFileName, true, Encoding.GetEncoding("gb2312"));
object[] objArray1 = new object[] { "商品名称,", "价格,", "销量,", "好评率,", "商品ID,", "店铺ID,", "店铺名称,", "店铺商品总数" };
writer.WriteLine(string.Concat(objArray1));
writer.Close();
int num = 0;
while (num < totalPage)
{
if (cancellationTokenSource.IsCancellationRequested)
break;
currentPage = num + 1;
Invoke(new Action(() =>
{
this.statusBar.lblTaskStatus.Text = "正在采集类目:" + cateName + ",当前采集到第 " + (num + 1) + " 页";
this.statusBar.pgbTaskProgress.Value = (num + 1);
this.statusBar.pgbTaskProgress.Text = (num + 1) + "/" + total;
this.statusBar.pgbTaskProgress.Maximum = total;
}));
str = $"[{DateTime.Now.ToString("MM-dd HH:mm:ss")}] 正在采集类目:{cateName} 第{num + 1}页,成功采集{lstGoods.Count}条。";
object[] objArray2 = new object[] { str };
//base.BeginInvoke(new showMessageDelegate(this.showMsg), objArray2);
int num2 = num * 10;
string str2 = "";
object[] objArray3 = new object[] { "https://aweme.snssdk.com/aweme/v2/commerce/favorite/feed?feature_version=new_operate_resource&tab_id=", cateIndex, "&entrances&cursor=", num2, "&request_tag_from=lynx&with_tabs=false&filters=2_3481030053603741229%2C2_3484212195024324357%2C1_6971768879194327844%2C2_3479930499084982767%2C2_3470779358002703750%2C1_6971770338224982791%2C2_3476553583086965127%2C2_3478793526744103385%2C1_6971747541322976035%2C2_3480664549739395118&page_num=2&feedbacks&page_name=order_homepage&only_entrance=false&os_api=22&device_type=TAS-AN00&ssmix=a&manifest_version_code=160002&dpi=240&uuid=865166029839340&app_name=aweme&version_name=16.0.1&ts=1623252303&cpu_support64=false&app_type=normal&appTheme=dark&ac=wifi&host_abi=armeabi-v7a&update_version_code=16019900&channel=aweGW&_rticket=1623252304036&device_platform=android&iid=1935603863652935&version_code=160001&cdid=61a31b75-b28a-448f-b688-2803bf62456b&openudid=2292f1eb6ba5f1c1&device_id=68214623104&resolution=1600*900&os_version=5.1.1&language=zh&device_brand=HUAWEI&aid=1128&minor_status=0&mcc_mnc=46000" };
string url = string.Concat(objArray3);
object[] objArray4 = new object[0x13];
objArray4[0] = "https://aweme.snssdk.com/aweme/v2/commerce/favorite/feed?feature_version=new_operate_resource&tab_id=";
objArray4[1] = cateIndex;
objArray4[2] = "&render_purchase=0&entrances&cursor=";
objArray4[3] = num2;
objArray4[4] = "&request_tag_from=lynx&with_tabs=false&filters&page_num=";
objArray4[5] = num + 1;
objArray4[6] = "&feedbacks&page_name=order_homepage&only_entrance=false&os_api=22&device_type=TAS-AN00&ssmix=a&manifest_version_code=160002&dpi=240&uuid=8651";
objArray4[7] = DateTime.Now.ToString("ff");
objArray4[8] = "02983";
objArray4[9] = DateTime.Now.ToString("ss");
objArray4[10] = "40&app_name=aweme&version_name=16.0.1&ts=";
objArray4[11] = ((DateTime.Now.ToUniversalTime().Ticks - 621355968000000000L) / 10000000L).ToString(); // Base.ConvertDateTimeToInt();
objArray4[12] = "&cpu_support64=false&app_type=normal&appTheme=dark&ac=wifi&host_abi=armeabi-v7a&update_version_code=16019900&channel=aweGW&_rticket=1623515082669&device_platform=android&iid=1935603863652935&version_code=160001&cdid=61a31b75-b28a-448f-b6";
objArray4[13] = DateTime.Now.ToString("ss");
objArray4[14] = "-2803bf62456b&openudid=22";
objArray4[15] = DateTime.Now.ToString("ss");
objArray4[16] = "f1eb6ba5f1c1&device_id=682";
objArray4[17] = DateTime.Now.ToString("ff");
objArray4[18] = "623104&resolution=1600*900&os_version=5.1.1&language=zh&device_brand=HUAWEI&aid=1128&minor_status=0&mcc_mnc=46000";
url = string.Concat(objArray4);
if (string.IsNullOrWhiteSpace(dyCookies))
{
dyCookies = "sid_guard=f7fbff5199b1bfe9de6eacb334368979|||";
}
str2 = GetHtml.GetUtf8(url, AllBase.BaseClass.ChromeUserAgent, dyCookies);
int num3 = 0;
if (str2.IndexOf("用户未登录") != -1)
{
DateTime now = DateTime.Now;
str = $"[{now.ToString("MM-dd HH:mm:ss")}] 请重新登入抖音.";
object[] objArray7 = new object[] { str };
//base.BeginInvoke(new showMessageDelegate(this.showMsg), objArray7);
//this.int_6 = 0x1_869f;
break;
}
while (true)
{
if (!(((str2.IndexOf("服务器打瞌睡了") != -1) || ((str2.IndexOf("你搜得太多啦") != -1) || (str2.Trim() == ""))) ? (num3 < 20) : false))
{
char[] separator = new char[] { 'ㄨ' };
string[] strArray = str2.Replace("\"product\":", "ㄨ\"product\":").Split(separator);
if (str2.Contains("\"item_cards\":"))
{
var jobj = Newtonsoft.Json.Linq.JObject.Parse(str2);
var sObj = jobj["item_cards"];
var sList = new List<string>();
foreach (var s in sObj)
{
sList.Add(JsonHelper.SerializeObject(s));
}
strArray = sList.ToArray();
}
int index = 0;
while (true)
{
if (cancellationTokenSource.IsCancellationRequested)
break;
if (index >= strArray.Length)
{
Thread.Sleep(1000);
num++;
break;
}
try
{
string goodStr = strArray[index];
DouGoodsCollectInfo item = new DouGoodsCollectInfo();
item.Id = AllBase.BaseRegex.GetStringJson(ref goodStr, "product_id");
if (!string.IsNullOrEmpty(item.Id) && !lstGoods.Any(g => g.Id == item.Id))
{
item.GoodsName = AllBase.BaseRegex.GetStringJson(ref goodStr, "title")?.Trim();
if (!string.IsNullOrEmpty(item.GoodsName))
{
if (lstBanKeyText.Count == 0 || !lstBanKeyText.Any(t => item.GoodsName.Contains(t)))
{
// 销量数据
item.Sales = AllBase.BaseRegex.GetStringJson(ref goodStr, "sales");
if (string.IsNullOrEmpty(item.Sales))
item.Sales = "0";
// 销量符合筛选条件
if (Convert.ToInt32(item.Sales) >= Convert.ToInt32(this.minSaleCount) && Convert.ToInt32(item.Sales) <= Convert.ToInt32(this.maxSaleCount))
{
string price = BaseRegex.GetStringJson(ref goodStr, "min_price");
if (string.IsNullOrEmpty(price))
price = "0";
item.Price = ((Convert.ToDouble(price) * 1.0) / 100.0).ToString("f2");
if (Convert.ToDouble(item.Price) >= Convert.ToDouble(this.minPrice) && Convert.ToDouble(item.Price) <= Convert.ToDouble(this.maxPrice))
{
var img = BaseRegex.GetStringJson(ref goodStr, "url_list");
if (item.img == null)
img = BaseRegex.GetMatchRegexString(ref goodStr, "\"cover\":[^\\[\\]]+?\"url_list\":\\[([^\\[\\]]+?)\\]");
if (!string.IsNullOrEmpty(img))
{
item.img = img.Split(',')[0].Trim('"');
}
// 获取商品评价
item.CommentsCount = this.GetRate(item.Id, ref item.ShopProductCount, ref item.CommentsRate);
if (item.CommentsRate >= this.hplMin && item.CommentsRate <= hplMax)
{
//Application.DoEvents();
Thread.Sleep(1000);
string content = HaoWuCollectBLL.getHtml(
"https://ec.snssdk.com/product/fxgajaxstaticitem?b_type_new=0&device_id=0&is_outside=1&id=" + item.Id + "&preview=0",
"", "utf8");
item.ShopId = BaseRegex.GetStringJson(ref content, "shop_id");
item.ShopName = BaseRegex.GetStringJson(ref content, "shop_name");
lstGoods.Add(item);
this.ShowData(lstGoods.Count, item);
if (this.isXqtj)
{
//this.method_3(spid);
}
if (((index % 2) == 0) && (index > 0))
Thread.Sleep(1000);
}
}
}
}
}
}
}
catch (Exception ex)
{
}
index++;
}
break;
}
str = $"[{DateTime.Now.ToString("MM-dd HH:mm:ss")}] 服务器打瞌睡了,重试...";
object[] objArray5 = new object[] { str };
//base.BeginInvoke(new showMessageDelegate(this.showMsg), objArray5);
//Application.DoEvents();
Thread.Sleep(3000);
num3++;
}
}
}
catch
{
}
str = $"[{DateTime.Now.ToString("MM-dd HH:mm:ss")}] 采集结束,成功采集{lstGoods.Count}个.";
object[] args = new object[] { str };
//base.BeginInvoke(new showMessageDelegate(this.showMsg), args);
}
private int GetRate(string productId, ref int productCount, ref double rate)
{
int num = 0;
string url = "https://ec.snssdk.com/product/ajaxitem?b_type_new=0&device_id=0&is_outside=1&id=" + productId + "&abParams=0";
string content = HaoWuCollectBLL.getHtml_fxg_20201220(url, "", "");
int num2 = 0;
string ip = "";
while ((num2 < 10) && (content.Trim().Length < 10))
{
//Application.DoEvents(); // 刷新界面
Thread.Sleep(500);
num2++;
content = HaoWuCollectBLL.getHtml_fxg_20201220(url, "", ip);
}
num = BaseRegex.GetIntJson(ref content, "count");
productCount = BaseRegex.GetIntJson(ref content, "shop_product_count");
rate = (double)BaseRegex.GetDecimalJson(ref content, "value");
return num;
}
private void ShowData(int totalCount, DouGoodsCollectInfo goodsInfo)
{
try
{
StreamWriter writer = new StreamWriter(this.exportFileName, true, Encoding.GetEncoding("gb2312"));
object[] objArray1 = new object[15];
objArray1[0] = goodsInfo.GoodsName;
objArray1[1] = ",";
objArray1[2] = goodsInfo.Price;
objArray1[3] = ",";
objArray1[4] = goodsInfo.Sales;
objArray1[5] = ",";
objArray1[6] = goodsInfo.CommentsRate;
objArray1[7] = ",";
objArray1[8] = "https://haohuo.jinritemai.com/views/product/item2?id=" + goodsInfo.Id;
objArray1[9] = ",";
objArray1[10] = goodsInfo.ShopId;
objArray1[11] = ",";
objArray1[12] = goodsInfo.ShopName;
objArray1[13] = ",";
objArray1[14] = goodsInfo.ShopProductCount;
writer.WriteLine(string.Concat(objArray1));
writer.Close();
}
catch
{
}
Invoke(new Action(() =>
{
var index = this.dgvCollect.Rows.Add(false, goodsInfo.Id, goodsInfo.GoodsName, null, goodsInfo.Price, goodsInfo.Sales, goodsInfo.CommentsRate,
goodsInfo.ShopId, goodsInfo.ShopName, goodsInfo.ShopProductCount, "删除");
if (this.isShowImg)
{
this.dgvCollect.Columns["colImage"].Visible = true;
var row = dgvCollect.Rows[index];
row.Cells["colImage"].Value = this.GetImage2(goodsInfo.img, 60);
row.Height = 70;
}
else
this.dgvCollect.Columns["colImage"].Visible = false;
}));
}
public Image GetImage2(string path, int size = 130)
{
try
{
return new Bitmap(Image.FromStream(WebRequest.Create(path).GetResponse().GetResponseStream()), size, size);
}
catch
{
return null;
}
}
private void btnLoginDouyin_Click(object sender, EventArgs e)
{
DouUserLoginForm dForm = new DouUserLoginForm();
dForm.ShowDialog();
}
private void btnCollect_Click(object sender, EventArgs e)
{
if (btnCollect.Text == "开始采集")
{
var cookie = GlobalConfig.DouUserCookies;
var cate = this.cmbCategory.Text;
var cid = this.cmbCategory.SelectedIndex.ToString();
var collectPage = this.txtCollectPage.Text.Trim().ParseToInt();
minSaleCount = this.txtSaleCountMin.Text.ParseToInt().ToString();
maxSaleCount = this.txtSaleCountMax.Text.ParseToInt().ToString();
minPrice = this.txtPriceMin.Text.ParseToDecimal().ToString();
maxPrice = this.txtPriceMax.Text.ParseToDecimal().ToString();
hplMin = this.txtRateMin.Text.ParseToDouble();
hplMax = this.txtRateMax.Text.ParseToDouble();
isShowImg = this.chkShowImage.Checked;
this.dgvCollect.Rows.Clear();
this.lstProduct.Clear();
cancellationTokenSource = new CancellationTokenSource();
btnCollect.Text = "停止采集";
int n = 0;
int total = collectPage;
this.statusBar.lblTaskStatus.Text = "开始采集...";
this.statusBar.pgbTaskProgress.Value = n;
this.statusBar.pgbTaskProgress.Text = n + "/" + total;
this.statusBar.pgbTaskProgress.Maximum = total;
Task.Run(() =>
{
Collect(cookie, collectPage, cate, cid, ref lstProduct, ref n);
Invoke(new Action(() =>
{
btnCollect.Text = "开始采集";
this.statusBar.lblTaskStatus.Text = "采集结束,共采集到商品" + this.lstProduct.Count + "个";
this.statusBar.pgbTaskProgress.Value = n;
this.statusBar.pgbTaskProgress.Text = n + "/" + total;
this.statusBar.pgbTaskProgress.Maximum = total;
}));
}, cancellationTokenSource.Token);
}
else
{
cancellationTokenSource.Cancel();
}
}
private void btnExport_Click(object sender, EventArgs e)
{
try
{
SaveFileDialog saveFileDialog1 = new SaveFileDialog();
saveFileDialog1.Filter = "表格文件(*.csv)|*.csv";
saveFileDialog1.FileName = "好物采集" + DateTime.Now.ToString("yyyyMMddHHmmss") + ".csv";
saveFileDialog1.FilterIndex = 2;
saveFileDialog1.RestoreDirectory = true;
if (saveFileDialog1.ShowDialog() == DialogResult.OK)
{
StringBuilder sb = new StringBuilder();
sb.AppendLine("商品名称," + "价格," + "销量," + "好评率," + "商品ID," + "店铺ID," + "店铺名称," + "店铺商品总数");
foreach (var goodsInfo in lstProduct)
{
sb.AppendLine(goodsInfo.GoodsName + "," + goodsInfo.Price + "," + goodsInfo.Sales + "," + goodsInfo.CommentsRate + ","
+ "https://haohuo.jinritemai.com/views/product/item2?id=" + goodsInfo.Id + "," + goodsInfo.ShopId + ","
+ goodsInfo.ShopName + "," + goodsInfo.ShopProductCount);
}
File.WriteAllText(saveFileDialog1.FileName, sb.ToString(), Encoding.Default);
BaseForms.BaseMsgForm.ShowInfo("导出成功");
}
}
catch (Exception ex)
{
BaseForms.BaseMsgForm.ShowError(ex.Message);
}
}
private void dgvShop_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
if (e.RowIndex < 0 || e.ColumnIndex < 0)
return;
var goodsId = dgvCollect.Rows[e.RowIndex].Cells["colProductId"].Value.ToString();
var columnName = dgvCollect.Columns[e.ColumnIndex].Name;
if (columnName == "colProductName")
{
string url = "https://haohuo.jinritemai.com/views/product/item2?id=" + goodsId;
GetHtml.OpenUrl(url);
}
}
}
}
@@ -0,0 +1,150 @@
<?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="colSelect.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colProductId.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colProductName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colImage.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colPrice.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colSaleCount.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colRate.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colShopId.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colShopCount.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colDelete.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>
@@ -0,0 +1,734 @@
namespace LittleRabbit.LittleRabbitForms.CollectForms
{
partial class KeywordCollectForm
{
/// <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.components = new System.ComponentModel.Container();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.btnExport = new LittleRabbit.UserControls.ButtonEx();
this.ucGroupBoxEx1 = new LittleRabbit.UserComponent.UcGroupBoxEx(this.components);
this.txtKeyWords = new DevComponents.DotNetBar.Controls.TextBoxX();
this.btnLoginDouyin = new LittleRabbit.UserControls.ButtonEx();
this.btnCollect = new LittleRabbit.UserControls.ButtonEx();
this.ucGroupBoxEx2 = new LittleRabbit.UserComponent.UcGroupBoxEx(this.components);
this.cmbCategory = new System.Windows.Forms.ComboBox();
this.label9 = new System.Windows.Forms.Label();
this.txtCommentRateMax = new System.Windows.Forms.TextBox();
this.txtCommentRateMin = new System.Windows.Forms.TextBox();
this.label7 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.txtCommentCountMax = new System.Windows.Forms.TextBox();
this.txtCommentCountMin = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.txtScoreMax = new System.Windows.Forms.TextBox();
this.txtScoreMin = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.txtYongJinMax = new System.Windows.Forms.TextBox();
this.txtYongJinMin = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label10 = new System.Windows.Forms.Label();
this.txtTotalPage = new System.Windows.Forms.TextBox();
this.txtSellCountMax = new System.Windows.Forms.TextBox();
this.txtPriceMax = new System.Windows.Forms.TextBox();
this.label13 = new System.Windows.Forms.Label();
this.txtPriceMin = new System.Windows.Forms.TextBox();
this.label14 = new System.Windows.Forms.Label();
this.label15 = new System.Windows.Forms.Label();
this.txtSellCountMin = new System.Windows.Forms.TextBox();
this.label16 = new System.Windows.Forms.Label();
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.dgvCollect = new LittleRabbit.UserComponent.DataGridViewEx();
this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.colKeyword = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colProductId = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colProductName = new System.Windows.Forms.DataGridViewLinkColumn();
this.colPrice = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colSaleCount = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colYongJin = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colYongJinLv = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colCommentCount = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colCommentRate = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colScore = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colShopNmae = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colDelete = new System.Windows.Forms.DataGridViewLinkColumn();
this.statusBar = new LittleRabbit.UserControls.StatusBarUserControl();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.ucGroupBoxEx1.SuspendLayout();
this.ucGroupBoxEx2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit();
this.splitContainer2.Panel1.SuspendLayout();
this.splitContainer2.Panel2.SuspendLayout();
this.splitContainer2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvCollect)).BeginInit();
this.SuspendLayout();
//
// splitContainer1
//
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
this.splitContainer1.Name = "splitContainer1";
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.BackColor = System.Drawing.Color.White;
this.splitContainer1.Panel1.Controls.Add(this.btnExport);
this.splitContainer1.Panel1.Controls.Add(this.ucGroupBoxEx1);
this.splitContainer1.Panel1.Controls.Add(this.btnLoginDouyin);
this.splitContainer1.Panel1.Controls.Add(this.btnCollect);
this.splitContainer1.Panel1.Controls.Add(this.ucGroupBoxEx2);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.splitContainer2);
this.splitContainer1.Size = new System.Drawing.Size(852, 468);
this.splitContainer1.SplitterDistance = 121;
this.splitContainer1.TabIndex = 379;
//
// btnExport
//
this.btnExport.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnExport.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnExport.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnExport.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnExport.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnExport.ForeColor = System.Drawing.Color.White;
this.btnExport.Location = new System.Drawing.Point(772, 84);
this.btnExport.Margin = new System.Windows.Forms.Padding(2);
this.btnExport.Name = "btnExport";
this.btnExport.Size = new System.Drawing.Size(66, 26);
this.btnExport.TabIndex = 394;
this.btnExport.Text = "导出数据";
this.btnExport.UseVisualStyleBackColor = false;
this.btnExport.Click += new System.EventHandler(this.btnExport_Click);
//
// ucGroupBoxEx1
//
this.ucGroupBoxEx1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.ucGroupBoxEx1.BorderStyle = LittleRabbit.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND;
this.ucGroupBoxEx1.Controls.Add(this.txtKeyWords);
this.ucGroupBoxEx1.Location = new System.Drawing.Point(3, 2);
this.ucGroupBoxEx1.Name = "ucGroupBoxEx1";
this.ucGroupBoxEx1.Size = new System.Drawing.Size(277, 120);
this.ucGroupBoxEx1.TabIndex = 393;
this.ucGroupBoxEx1.TabStop = false;
this.ucGroupBoxEx1.Text = "采集关键字";
//
// txtKeyWords
//
this.txtKeyWords.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
//
//
//
this.txtKeyWords.Border.Class = "TextBoxBorder";
this.txtKeyWords.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.txtKeyWords.Location = new System.Drawing.Point(10, 21);
this.txtKeyWords.Multiline = true;
this.txtKeyWords.Name = "txtKeyWords";
this.txtKeyWords.PreventEnterBeep = true;
this.txtKeyWords.Size = new System.Drawing.Size(257, 88);
this.txtKeyWords.TabIndex = 7;
this.txtKeyWords.WatermarkText = "请输入要搜索的关键词\r\n一行一个";
//
// btnLoginDouyin
//
this.btnLoginDouyin.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnLoginDouyin.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnLoginDouyin.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnLoginDouyin.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnLoginDouyin.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnLoginDouyin.ForeColor = System.Drawing.Color.White;
this.btnLoginDouyin.Location = new System.Drawing.Point(772, 20);
this.btnLoginDouyin.Margin = new System.Windows.Forms.Padding(2);
this.btnLoginDouyin.Name = "btnLoginDouyin";
this.btnLoginDouyin.Size = new System.Drawing.Size(66, 26);
this.btnLoginDouyin.TabIndex = 373;
this.btnLoginDouyin.Text = "登录抖音";
this.btnLoginDouyin.UseVisualStyleBackColor = false;
this.btnLoginDouyin.Visible = false;
//
// btnCollect
//
this.btnCollect.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnCollect.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnCollect.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnCollect.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnCollect.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCollect.ForeColor = System.Drawing.Color.White;
this.btnCollect.Location = new System.Drawing.Point(772, 52);
this.btnCollect.Margin = new System.Windows.Forms.Padding(2);
this.btnCollect.Name = "btnCollect";
this.btnCollect.Size = new System.Drawing.Size(66, 26);
this.btnCollect.TabIndex = 374;
this.btnCollect.Text = "开始采集";
this.btnCollect.UseVisualStyleBackColor = false;
this.btnCollect.Click += new System.EventHandler(this.btnCollect_Click);
//
// ucGroupBoxEx2
//
this.ucGroupBoxEx2.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.ucGroupBoxEx2.BorderStyle = LittleRabbit.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND;
this.ucGroupBoxEx2.Controls.Add(this.cmbCategory);
this.ucGroupBoxEx2.Controls.Add(this.label9);
this.ucGroupBoxEx2.Controls.Add(this.txtCommentRateMax);
this.ucGroupBoxEx2.Controls.Add(this.txtCommentRateMin);
this.ucGroupBoxEx2.Controls.Add(this.label7);
this.ucGroupBoxEx2.Controls.Add(this.label8);
this.ucGroupBoxEx2.Controls.Add(this.txtCommentCountMax);
this.ucGroupBoxEx2.Controls.Add(this.txtCommentCountMin);
this.ucGroupBoxEx2.Controls.Add(this.label5);
this.ucGroupBoxEx2.Controls.Add(this.label6);
this.ucGroupBoxEx2.Controls.Add(this.txtScoreMax);
this.ucGroupBoxEx2.Controls.Add(this.txtScoreMin);
this.ucGroupBoxEx2.Controls.Add(this.label3);
this.ucGroupBoxEx2.Controls.Add(this.label4);
this.ucGroupBoxEx2.Controls.Add(this.txtYongJinMax);
this.ucGroupBoxEx2.Controls.Add(this.txtYongJinMin);
this.ucGroupBoxEx2.Controls.Add(this.label1);
this.ucGroupBoxEx2.Controls.Add(this.label2);
this.ucGroupBoxEx2.Controls.Add(this.label10);
this.ucGroupBoxEx2.Controls.Add(this.txtTotalPage);
this.ucGroupBoxEx2.Controls.Add(this.txtSellCountMax);
this.ucGroupBoxEx2.Controls.Add(this.txtPriceMax);
this.ucGroupBoxEx2.Controls.Add(this.label13);
this.ucGroupBoxEx2.Controls.Add(this.txtPriceMin);
this.ucGroupBoxEx2.Controls.Add(this.label14);
this.ucGroupBoxEx2.Controls.Add(this.label15);
this.ucGroupBoxEx2.Controls.Add(this.txtSellCountMin);
this.ucGroupBoxEx2.Controls.Add(this.label16);
this.ucGroupBoxEx2.Location = new System.Drawing.Point(281, 2);
this.ucGroupBoxEx2.Name = "ucGroupBoxEx2";
this.ucGroupBoxEx2.Size = new System.Drawing.Size(409, 120);
this.ucGroupBoxEx2.TabIndex = 395;
this.ucGroupBoxEx2.TabStop = false;
this.ucGroupBoxEx2.Text = "采集参数";
//
// cmbCategory
//
this.cmbCategory.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbCategory.Font = new System.Drawing.Font("微软雅黑", 7.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.cmbCategory.FormattingEnabled = true;
this.cmbCategory.Items.AddRange(new object[] {
"综合",
"佣金排序",
"销量排序",
"价格降序",
"价格升序"});
this.cmbCategory.Location = new System.Drawing.Point(73, 14);
this.cmbCategory.Name = "cmbCategory";
this.cmbCategory.Size = new System.Drawing.Size(123, 24);
this.cmbCategory.TabIndex = 406;
//
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(16, 18);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(56, 17);
this.label9.TabIndex = 407;
this.label9.Text = "排  序";
//
// txtCommentRateMax
//
this.txtCommentRateMax.Location = new System.Drawing.Point(337, 90);
this.txtCommentRateMax.Name = "txtCommentRateMax";
this.txtCommentRateMax.Size = new System.Drawing.Size(55, 23);
this.txtCommentRateMax.TabIndex = 405;
this.txtCommentRateMax.Text = "100";
//
// txtCommentRateMin
//
this.txtCommentRateMin.Location = new System.Drawing.Point(269, 90);
this.txtCommentRateMin.Name = "txtCommentRateMin";
this.txtCommentRateMin.Size = new System.Drawing.Size(55, 23);
this.txtCommentRateMin.TabIndex = 402;
this.txtCommentRateMin.Text = "0";
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(224, 93);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(44, 17);
this.label7.TabIndex = 403;
this.label7.Text = "好评率";
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(325, 93);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(13, 17);
this.label8.TabIndex = 404;
this.label8.Text = "-";
//
// txtCommentCountMax
//
this.txtCommentCountMax.Location = new System.Drawing.Point(337, 65);
this.txtCommentCountMax.Name = "txtCommentCountMax";
this.txtCommentCountMax.Size = new System.Drawing.Size(55, 23);
this.txtCommentCountMax.TabIndex = 401;
this.txtCommentCountMax.Text = "99999999";
//
// txtCommentCountMin
//
this.txtCommentCountMin.Location = new System.Drawing.Point(269, 65);
this.txtCommentCountMin.Name = "txtCommentCountMin";
this.txtCommentCountMin.Size = new System.Drawing.Size(55, 23);
this.txtCommentCountMin.TabIndex = 398;
this.txtCommentCountMin.Text = "0";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(224, 68);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(44, 17);
this.label5.TabIndex = 399;
this.label5.Text = "评论数";
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(325, 68);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(13, 17);
this.label6.TabIndex = 400;
this.label6.Text = "-";
//
// txtScoreMax
//
this.txtScoreMax.Location = new System.Drawing.Point(337, 40);
this.txtScoreMax.Name = "txtScoreMax";
this.txtScoreMax.Size = new System.Drawing.Size(55, 23);
this.txtScoreMax.TabIndex = 397;
this.txtScoreMax.Text = "5";
//
// txtScoreMin
//
this.txtScoreMin.Location = new System.Drawing.Point(269, 40);
this.txtScoreMin.Name = "txtScoreMin";
this.txtScoreMin.Size = new System.Drawing.Size(55, 23);
this.txtScoreMin.TabIndex = 394;
this.txtScoreMin.Text = "0";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(212, 43);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(56, 17);
this.label3.TabIndex = 395;
this.label3.Text = "体验分数";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(325, 43);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(13, 17);
this.label4.TabIndex = 396;
this.label4.Text = "-";
//
// txtYongJinMax
//
this.txtYongJinMax.Location = new System.Drawing.Point(337, 15);
this.txtYongJinMax.Name = "txtYongJinMax";
this.txtYongJinMax.Size = new System.Drawing.Size(55, 23);
this.txtYongJinMax.TabIndex = 393;
this.txtYongJinMax.Text = "99999999";
//
// txtYongJinMin
//
this.txtYongJinMin.Location = new System.Drawing.Point(269, 15);
this.txtYongJinMin.Name = "txtYongJinMin";
this.txtYongJinMin.Size = new System.Drawing.Size(55, 23);
this.txtYongJinMin.TabIndex = 390;
this.txtYongJinMin.Text = "0";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(212, 18);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(56, 17);
this.label1.TabIndex = 391;
this.label1.Text = "宝贝佣金";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(325, 18);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(13, 17);
this.label2.TabIndex = 392;
this.label2.Text = "-";
//
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(16, 93);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(56, 17);
this.label10.TabIndex = 389;
this.label10.Text = "采集页数";
//
// txtTotalPage
//
this.txtTotalPage.Location = new System.Drawing.Point(73, 90);
this.txtTotalPage.Name = "txtTotalPage";
this.txtTotalPage.Size = new System.Drawing.Size(123, 23);
this.txtTotalPage.TabIndex = 388;
this.txtTotalPage.Text = "5";
//
// txtSellCountMax
//
this.txtSellCountMax.Location = new System.Drawing.Point(141, 65);
this.txtSellCountMax.Name = "txtSellCountMax";
this.txtSellCountMax.Size = new System.Drawing.Size(55, 23);
this.txtSellCountMax.TabIndex = 387;
this.txtSellCountMax.Text = "99999999";
//
// txtPriceMax
//
this.txtPriceMax.Location = new System.Drawing.Point(141, 40);
this.txtPriceMax.Name = "txtPriceMax";
this.txtPriceMax.Size = new System.Drawing.Size(55, 23);
this.txtPriceMax.TabIndex = 383;
this.txtPriceMax.Text = "99999999";
//
// label13
//
this.label13.AutoSize = true;
this.label13.Location = new System.Drawing.Point(129, 68);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(13, 17);
this.label13.TabIndex = 386;
this.label13.Text = "-";
//
// txtPriceMin
//
this.txtPriceMin.Location = new System.Drawing.Point(73, 40);
this.txtPriceMin.Name = "txtPriceMin";
this.txtPriceMin.Size = new System.Drawing.Size(55, 23);
this.txtPriceMin.TabIndex = 379;
this.txtPriceMin.Text = "0";
//
// label14
//
this.label14.AutoSize = true;
this.label14.Location = new System.Drawing.Point(16, 68);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(56, 17);
this.label14.TabIndex = 385;
this.label14.Text = "宝贝销量";
//
// label15
//
this.label15.AutoSize = true;
this.label15.Location = new System.Drawing.Point(16, 43);
this.label15.Name = "label15";
this.label15.Size = new System.Drawing.Size(56, 17);
this.label15.TabIndex = 380;
this.label15.Text = "宝贝价格";
//
// txtSellCountMin
//
this.txtSellCountMin.Location = new System.Drawing.Point(73, 65);
this.txtSellCountMin.Name = "txtSellCountMin";
this.txtSellCountMin.Size = new System.Drawing.Size(55, 23);
this.txtSellCountMin.TabIndex = 384;
this.txtSellCountMin.Text = "0";
//
// label16
//
this.label16.AutoSize = true;
this.label16.Location = new System.Drawing.Point(129, 43);
this.label16.Name = "label16";
this.label16.Size = new System.Drawing.Size(13, 17);
this.label16.TabIndex = 382;
this.label16.Text = "-";
//
// splitContainer2
//
this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
this.splitContainer2.Location = new System.Drawing.Point(0, 0);
this.splitContainer2.Name = "splitContainer2";
this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer2.Panel1
//
this.splitContainer2.Panel1.Controls.Add(this.dgvCollect);
this.splitContainer2.Panel1.Padding = new System.Windows.Forms.Padding(5, 0, 5, 0);
//
// splitContainer2.Panel2
//
this.splitContainer2.Panel2.Controls.Add(this.statusBar);
this.splitContainer2.Size = new System.Drawing.Size(852, 343);
this.splitContainer2.SplitterDistance = 314;
this.splitContainer2.SplitterWidth = 1;
this.splitContainer2.TabIndex = 7;
//
// dgvCollect
//
this.dgvCollect.AllowUserToAddRows = false;
this.dgvCollect.AllowUserToDeleteRows = false;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvCollect.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
this.dgvCollect.BackgroundColor = System.Drawing.Color.White;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvCollect.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
this.dgvCollect.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvCollect.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colSelect,
this.colKeyword,
this.colProductId,
this.colProductName,
this.colPrice,
this.colSaleCount,
this.colYongJin,
this.colYongJinLv,
this.colCommentCount,
this.colCommentRate,
this.colScore,
this.colShopNmae,
this.colDelete});
this.dgvCollect.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvCollect.Location = new System.Drawing.Point(5, 0);
this.dgvCollect.Name = "dgvCollect";
this.dgvCollect.ReadOnly = true;
dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.dgvCollect.RowsDefaultCellStyle = dataGridViewCellStyle3;
this.dgvCollect.RowTemplate.Height = 23;
this.dgvCollect.Size = new System.Drawing.Size(842, 314);
this.dgvCollect.TabIndex = 6;
this.dgvCollect.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvCollect_CellContentClick);
//
// colSelect
//
this.colSelect.FillWeight = 50F;
this.colSelect.HeaderText = "选";
this.colSelect.Name = "colSelect";
this.colSelect.ReadOnly = true;
this.colSelect.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colSelect.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colSelect.Visible = false;
this.colSelect.Width = 41;
//
// colKeyword
//
this.colKeyword.HeaderText = "关键词";
this.colKeyword.Name = "colKeyword";
this.colKeyword.ReadOnly = true;
//
// colProductId
//
this.colProductId.HeaderText = "商品Id";
this.colProductId.Name = "colProductId";
this.colProductId.ReadOnly = true;
this.colProductId.Width = 150;
//
// colProductName
//
this.colProductName.HeaderText = "商品名称";
this.colProductName.Name = "colProductName";
this.colProductName.ReadOnly = true;
this.colProductName.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colProductName.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colProductName.Width = 350;
//
// colPrice
//
this.colPrice.HeaderText = "价格";
this.colPrice.Name = "colPrice";
this.colPrice.ReadOnly = true;
this.colPrice.Width = 80;
//
// colSaleCount
//
this.colSaleCount.HeaderText = "销量";
this.colSaleCount.Name = "colSaleCount";
this.colSaleCount.ReadOnly = true;
//
// colYongJin
//
this.colYongJin.HeaderText = "佣金";
this.colYongJin.Name = "colYongJin";
this.colYongJin.ReadOnly = true;
//
// colYongJinLv
//
this.colYongJinLv.HeaderText = "佣金率";
this.colYongJinLv.Name = "colYongJinLv";
this.colYongJinLv.ReadOnly = true;
//
// colCommentCount
//
this.colCommentCount.HeaderText = "评论数";
this.colCommentCount.Name = "colCommentCount";
this.colCommentCount.ReadOnly = true;
//
// colCommentRate
//
this.colCommentRate.HeaderText = "好评率";
this.colCommentRate.Name = "colCommentRate";
this.colCommentRate.ReadOnly = true;
//
// colScore
//
this.colScore.HeaderText = "体验分数";
this.colScore.Name = "colScore";
this.colScore.ReadOnly = true;
//
// colShopNmae
//
this.colShopNmae.HeaderText = "店铺名称";
this.colShopNmae.Name = "colShopNmae";
this.colShopNmae.ReadOnly = true;
this.colShopNmae.Width = 150;
//
// colDelete
//
this.colDelete.HeaderText = "删除";
this.colDelete.Name = "colDelete";
this.colDelete.ReadOnly = true;
this.colDelete.Visible = false;
this.colDelete.Width = 81;
//
// statusBar
//
this.statusBar.BackColor = System.Drawing.Color.White;
this.statusBar.Dock = System.Windows.Forms.DockStyle.Fill;
this.statusBar.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.statusBar.Location = new System.Drawing.Point(0, 0);
this.statusBar.Margin = new System.Windows.Forms.Padding(0);
this.statusBar.Name = "statusBar";
this.statusBar.Size = new System.Drawing.Size(852, 28);
this.statusBar.TabIndex = 5;
//
// KeywordCollectForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(852, 468);
this.Controls.Add(this.splitContainer1);
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.Name = "KeywordCollectForm";
this.Text = "关键词采集";
this.Load += new System.EventHandler(this.KeywordCollectForm_Load);
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
this.ucGroupBoxEx1.ResumeLayout(false);
this.ucGroupBoxEx2.ResumeLayout(false);
this.ucGroupBoxEx2.PerformLayout();
this.splitContainer2.Panel1.ResumeLayout(false);
this.splitContainer2.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
this.splitContainer2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dgvCollect)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.SplitContainer splitContainer1;
private UserControls.ButtonEx btnExport;
private UserComponent.UcGroupBoxEx ucGroupBoxEx1;
private DevComponents.DotNetBar.Controls.TextBoxX txtKeyWords;
private UserControls.ButtonEx btnLoginDouyin;
private UserControls.ButtonEx btnCollect;
private UserComponent.UcGroupBoxEx ucGroupBoxEx2;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.TextBox txtTotalPage;
private System.Windows.Forms.TextBox txtSellCountMax;
private System.Windows.Forms.TextBox txtPriceMax;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.TextBox txtPriceMin;
private System.Windows.Forms.Label label14;
private System.Windows.Forms.Label label15;
private System.Windows.Forms.TextBox txtSellCountMin;
private System.Windows.Forms.Label label16;
private UserComponent.DataGridViewEx dgvCollect;
private System.Windows.Forms.TextBox txtCommentRateMax;
private System.Windows.Forms.TextBox txtCommentRateMin;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.TextBox txtCommentCountMax;
private System.Windows.Forms.TextBox txtCommentCountMin;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.TextBox txtScoreMax;
private System.Windows.Forms.TextBox txtScoreMin;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.TextBox txtYongJinMax;
private System.Windows.Forms.TextBox txtYongJinMin;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.ComboBox cmbCategory;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect;
private System.Windows.Forms.DataGridViewTextBoxColumn colKeyword;
private System.Windows.Forms.DataGridViewTextBoxColumn colProductId;
private System.Windows.Forms.DataGridViewLinkColumn colProductName;
private System.Windows.Forms.DataGridViewTextBoxColumn colPrice;
private System.Windows.Forms.DataGridViewTextBoxColumn colSaleCount;
private System.Windows.Forms.DataGridViewTextBoxColumn colYongJin;
private System.Windows.Forms.DataGridViewTextBoxColumn colYongJinLv;
private System.Windows.Forms.DataGridViewTextBoxColumn colCommentCount;
private System.Windows.Forms.DataGridViewTextBoxColumn colCommentRate;
private System.Windows.Forms.DataGridViewTextBoxColumn colScore;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopNmae;
private System.Windows.Forms.DataGridViewLinkColumn colDelete;
private System.Windows.Forms.SplitContainer splitContainer2;
private UserControls.StatusBarUserControl statusBar;
}
}
@@ -0,0 +1,327 @@
using AllBase;
using AllBase.Helper;
using AllBase.Model.Result;
using LittleRabbit.LittleRabbitForms.ToolForms;
using NaiBa.Util.Extension;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace LittleRabbit.LittleRabbitForms.CollectForms
{
public partial class KeywordCollectForm : Form
{
List<DouGoodsCollectInfo> lstProduct = new List<DouGoodsCollectInfo>();
CancellationTokenSource cancellationTokenSource = null;
decimal priceMin = 0;
decimal priceMax = 99999999;
long salesMin = 0;
long salesMax = 99999999;
decimal yongjinMin = 0;
decimal yongjinMax = 99999999;
decimal scoreMin = 0;
decimal scoreMax = 5;
long commentCountMin = 0;
long commentCountMax = 99999999;
decimal commentRateMin = 0;
decimal commentRateMax = 100;
public KeywordCollectForm()
{
InitializeComponent();
}
private string Collect(string cookies, string collectKeyword, string pageNum = "1", string sortText = "", string sortId = "0")
{
HttpWebResponse response = null;
string result;
try
{
string url = "https://lianmengapi.snssdk.com/selection_api/search/pmt?app_name=aweme&channel=App%20Store" +
"&slide_guide_has_shown=1&minor_status=0&cursor=" + (pageNum.ParseToInt() * 20 - 20) + "&count=20" +
"&search_text=" + AllBase.HttpUtility.UrlEncode(collectKeyword, Encoding.UTF8) + "&request_tag_from=m" +
"&aid=1128&order_by=" + sortText + "&sort=" + sortId;
url = "https://buyin.jinritemai.com/pc/selection/search/pmt?page=" + pageNum
+ "&page_size=20&search_text=" + HttpUtility.UrlEncode(collectKeyword, Encoding.UTF8)
+ "&order_by=" + sortText + "&sort=" + sortId;
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
request.ContentType = "application/x-www-form-urlencoded";
//request.Headers.Set(HttpRequestHeader.Cookie, @"sid_tt=e21290832ad2b7efaeceb9cdc6c20935");
request.Headers.Set(HttpRequestHeader.Cookie, cookies);
response = (HttpWebResponse)request.GetResponse();
}
catch (WebException ex)
{
if (ex.Status == WebExceptionStatus.ProtocolError)
{
response = (HttpWebResponse)ex.Response;
result = GetProxyHtml.ReadResponse(response);
if (response != null) response.Close();
return result;
}
else return ex.Message;
}
catch (Exception e)
{
if (response != null) response.Close();
return e.Message;
}
result = GetProxyHtml.ReadResponse(response);
if (response != null) response.Close();
return result;
}
private void btnCollect_Click(object sender, EventArgs e)
{
if (this.btnCollect.Text == "停止采集")
{
cancellationTokenSource.Cancel();
return;
}
var cookieShop = GlobalConfig.DouShopLoginList.FirstOrDefault(s => s.LoginStatus == "登录成功");
if (cookieShop == null)
{
BaseForms.BaseMsgForm.ShowError("请登录店铺账号后搜索");
return;
}
priceMin = this.txtPriceMin.Text.ParseToDecimal();
priceMax = this.txtPriceMax.Text.ParseToDecimal();
salesMin = this.txtSellCountMin.Text.ParseToLong();
salesMax = this.txtSellCountMax.Text.ParseToLong();
yongjinMin = this.txtYongJinMin.Text.ParseToDecimal();
yongjinMax = this.txtYongJinMax.Text.ParseToDecimal();
scoreMin = this.txtScoreMin.Text.ParseToDecimal();
scoreMax = this.txtScoreMax.Text.ParseToDecimal();
commentCountMin = this.txtCommentCountMin.Text.ParseToLong();
commentCountMax = this.txtCommentCountMax.Text.ParseToLong();
commentRateMin = this.txtCommentRateMin.Text.ParseToDecimal();
commentRateMax = this.txtCommentRateMax.Text.ParseToDecimal();
var totalPage = this.txtTotalPage.Text.ParseToInt();
var keywords = this.txtKeyWords.Text.Split(new string[] { "\r", "\n", " ", "," }, StringSplitOptions.RemoveEmptyEntries);
string sortText = "";
string sort = "0";
if (this.cmbCategory.SelectedItem.ToString() == "佣金排序")
{
sortText = "cos_ratio";
sort = "2";
}
else if (this.cmbCategory.SelectedItem.ToString() == "销量排序")
{
sortText = "sales";
sort = "2";
}
else if (this.cmbCategory.SelectedItem.ToString() == "价格降序")
{
sortText = "price";
sort = "2";
}
else if (this.cmbCategory.SelectedItem.ToString() == "价格升序")
{
sortText = "price";
sort = "1";
}
lstProduct.Clear();
this.dgvCollect.Rows.Clear();
cancellationTokenSource = new CancellationTokenSource();
btnCollect.Text = "停止采集";
int n = 0;
int total = totalPage * keywords.Count();
this.statusBar.lblTaskStatus.Text = "开始采集...";
this.statusBar.pgbTaskProgress.Value = n;
this.statusBar.pgbTaskProgress.Text = n + "/" + total;
this.statusBar.pgbTaskProgress.Maximum = total;
Task.Run(() =>
{
var exportFileName = "采集导出\\爆款关键词采集" + DateTime.Now.ToString("yyyyMMddHHmmss") + ".csv"; try
{
if (!Directory.Exists("采集导出"))
Directory.CreateDirectory("采集导出");
StringBuilder sb = new StringBuilder();
sb.AppendLine("关键词,商品ID,商品标题,价格,销量,佣金,佣金率,评论数,好评率,体验分数,店铺名称");
File.AppendAllText(exportFileName, sb.ToString(), Encoding.Default);
}
catch (Exception ex)
{
};
foreach (var keyword in keywords)
{
for (int i = 0; i < totalPage; i++)
{
if (cancellationTokenSource.IsCancellationRequested)
break;
n++;
int page = i + 1;
Invoke(new Action(() =>
{
this.statusBar.lblTaskStatus.Text = "正在采集关键词:\"" + keyword + "\",当前采集到第 " + page + " 页";
this.statusBar.pgbTaskProgress.Value = n;
this.statusBar.pgbTaskProgress.Text = n + "/" + total;
this.statusBar.pgbTaskProgress.Maximum = total;
}));
var listCollectResult = Collect(GlobalConfig.DouBuyinCookies, keyword, page.ToString(), sortText, sort);
if (listCollectResult.Contains("用户未登录") || listCollectResult.Contains("当前网络不稳定") || listCollectResult.Contains("操作异常"))
{
Invoke(new Action(() =>
{
DouUserLoginForm douLoginForm = new DouUserLoginForm("https://buyin.jinritemai.com/mpa/account/login?log_out=1&type=24");
//DouUserLoginForm douLoginForm = new DouUserLoginForm("https://buyin.jinritemai.com/dashboard/servicehall/daren-square");
douLoginForm.ShowDialog();
}));
cancellationTokenSource.Cancel();
break;
}
Thread.Sleep(Randomx.GetId(1000, 3000));
if (listCollectResult.Contains("\"code\":0"))
{
// todo
JObject jObj = JObject.Parse(listCollectResult);
if (jObj["data"] != null && jObj["data"]["promotions"] != null)
{
foreach (JObject obj in jObj["data"]["promotions"])
{
DouGoodsCollectInfo goodsInfo = new DouGoodsCollectInfo();
string goodStr = JsonHelper.SerializeObject(obj);
goodsInfo.Keyword = keyword;
goodsInfo.GoodsName = BaseRegex.GetStringJson(ref goodStr, "title");
goodsInfo.Id = BaseRegex.GetStringJson(ref goodStr, "product_id");
goodsInfo.Price = (BaseRegex.GetDecimalJson(ref goodStr, "price") / 100).ToString();
goodsInfo.yj = (BaseRegex.GetDecimalJson(ref goodStr, "cos_fee") / 100).ToString();
goodsInfo.yjl = (BaseRegex.GetDecimalJson(ref goodStr, "cos_ratio") / 100).ToString();
goodsInfo.Sales = BaseRegex.GetStringJson(ref goodStr, "month_sales"); // 月销量
goodsInfo.ShopId = BaseRegex.GetStringJson(ref goodStr, "shop_id");
goodsInfo.ShopName = BaseRegex.GetStringJson(ref goodStr, "shop_name");
goodsInfo.Score = BaseRegex.GetDecimalJson(ref goodStr, "exp_score").ParseToDouble();
if (goodsInfo.Price.ParseToDecimal() < priceMin || goodsInfo.Price.ParseToDecimal() > priceMax)
continue;
if (goodsInfo.yj.ParseToDecimal() < yongjinMin || goodsInfo.yj.ParseToDecimal() > yongjinMax)
continue;
if (goodsInfo.Sales.ParseToDecimal() < salesMin || goodsInfo.Sales.ParseToDecimal() > salesMax)
continue;
if (goodsInfo.Score.ParseToDecimal() < scoreMin || goodsInfo.Score.ParseToDecimal() > scoreMax)
continue;
var commentResult = CaiNiXiHuanCollectForm.GetComments(GlobalConfig.DouBuyinCookies, goodsInfo.Id);
Thread.Sleep(Randomx.GetId(400, 600));
if (!string.IsNullOrEmpty(commentResult) && commentResult.Contains("\"status_code\":0"))
{
goodsInfo.CommentsCount = BaseRegex.GetIntJson(ref commentResult, "total_comments_num");
goodsInfo.CommentsRate = BaseRegex.GetDecimalJson(ref commentResult, "good_comment_ratio").ParseToDouble() / 100;
}
// 筛选条件
if (goodsInfo.CommentsRate < this.commentRateMin.ParseToDouble() || goodsInfo.CommentsRate > this.commentRateMax.ParseToDouble()
|| goodsInfo.CommentsCount < this.commentCountMin || goodsInfo.CommentsCount > this.commentCountMax)
continue;
Invoke(new Action(() =>
{
this.dgvCollect.Rows.Add(false, keyword, goodsInfo.Id, goodsInfo.GoodsName, goodsInfo.Price, goodsInfo.Sales, goodsInfo.yj, goodsInfo.yjl,
goodsInfo.CommentsCount, goodsInfo.CommentsRate, goodsInfo.Score, goodsInfo.ShopName);
}));
try
{
lstProduct.Add(goodsInfo);
StringBuilder sb = new StringBuilder();
sb.AppendLine(goodsInfo.Keyword + ",https://haohuo.jinritemai.com/views/product/item2?id=" + goodsInfo.Id + "," + goodsInfo.GoodsName + ","
+ goodsInfo.Price + "," + goodsInfo.Sales + "," + goodsInfo.yj + "," + goodsInfo.yjl + "," + goodsInfo.CommentsCount + ","
+ goodsInfo.CommentsRate + "," + goodsInfo.Score + "," + goodsInfo.ShopName);
System.IO.File.WriteAllText(exportFileName, sb.ToString(), Encoding.Default);
}
catch (Exception ex) { }
}
}
}
}
}
Invoke(new Action(() =>
{
btnCollect.Text = "开始采集";
this.statusBar.lblTaskStatus.Text = "采集结束,共采集到商品" + this.lstProduct.Count + "个";
this.statusBar.pgbTaskProgress.Value = n;
this.statusBar.pgbTaskProgress.Text = n + "/" + total;
this.statusBar.pgbTaskProgress.Maximum = total;
}));
}, cancellationTokenSource.Token);
}
private void btnExport_Click(object sender, EventArgs e)
{
try
{
SaveFileDialog saveFileDialog1 = new SaveFileDialog();
saveFileDialog1.Filter = "表格文件(*.csv)|*.csv";
saveFileDialog1.FileName = "爆款关键词采集" + DateTime.Now.ToString("yyyyMMddHHmmss") + ".csv";
saveFileDialog1.FilterIndex = 2;
saveFileDialog1.RestoreDirectory = true;
if (saveFileDialog1.ShowDialog() == DialogResult.OK)
{
StringBuilder sb = new StringBuilder();
sb.AppendLine("关键词,商品ID,商品标题,价格,销量,佣金,佣金率,评论数,好评率,体验分数,店铺名称");
foreach (var goodsInfo in lstProduct)
{
sb.AppendLine(goodsInfo.Keyword + ",https://haohuo.jinritemai.com/views/product/item2?id=" + goodsInfo.Id + "," + goodsInfo.GoodsName + ","
+ goodsInfo.Price + "," + goodsInfo.Sales + "," + goodsInfo.yj + "," + goodsInfo.yjl + "," + goodsInfo.CommentsCount + ","
+ goodsInfo.CommentsRate + "," + goodsInfo.Score + "," + goodsInfo.ShopName);
}
System.IO.File.WriteAllText(saveFileDialog1.FileName, sb.ToString(), Encoding.Default);
BaseForms.BaseMsgForm.ShowInfo("导出成功");
}
}
catch (Exception ex)
{
BaseForms.BaseMsgForm.ShowError(ex.Message);
}
}
private void KeywordCollectForm_Load(object sender, EventArgs e)
{
this.cmbCategory.SelectedIndex = 0;
}
private void dgvCollect_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
if (e.RowIndex < 0 || e.ColumnIndex < 0)
return;
var goodsId = dgvCollect.Rows[e.RowIndex].Cells["colProductId"].Value.ToString();
var columnName = dgvCollect.Columns[e.ColumnIndex].Name;
if (columnName == "colProductName")
{
string url = "https://haohuo.jinritemai.com/views/product/item2?id=" + goodsId;
GetHtml.OpenUrl(url);
}
}
}
}
@@ -0,0 +1,159 @@
<?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="colSelect.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colKeyword.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colProductId.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colProductName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colPrice.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colSaleCount.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colYongJin.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colYongJinLv.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colCommentCount.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colCommentRate.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colScore.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colShopNmae.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colDelete.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>
@@ -0,0 +1,506 @@
namespace LittleRabbit.LittleRabbitForms.CollectForms
{
partial class ShopProductCollectForm
{
/// <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.components = new System.ComponentModel.Container();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.btnExport = new LittleRabbit.UserControls.ButtonEx();
this.ucGroupBoxEx1 = new LittleRabbit.UserComponent.UcGroupBoxEx(this.components);
this.txtKeyWords = new DevComponents.DotNetBar.Controls.TextBoxX();
this.btnLoginDouyin = new LittleRabbit.UserControls.ButtonEx();
this.btnCollect = new LittleRabbit.UserControls.ButtonEx();
this.ucGroupBoxEx2 = new LittleRabbit.UserComponent.UcGroupBoxEx(this.components);
this.txtFilter = new DevComponents.DotNetBar.Controls.TextBoxX();
this.label10 = new System.Windows.Forms.Label();
this.txtTotalPage = new System.Windows.Forms.TextBox();
this.label12 = new System.Windows.Forms.Label();
this.txtSellCountMax = new System.Windows.Forms.TextBox();
this.txtPriceMax = new System.Windows.Forms.TextBox();
this.label13 = new System.Windows.Forms.Label();
this.txtPriceMin = new System.Windows.Forms.TextBox();
this.label14 = new System.Windows.Forms.Label();
this.label15 = new System.Windows.Forms.Label();
this.txtSellCountMin = new System.Windows.Forms.TextBox();
this.label16 = new System.Windows.Forms.Label();
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.dgvCollect = new LittleRabbit.UserComponent.DataGridViewEx();
this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.colProductId = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colProductName = new System.Windows.Forms.DataGridViewLinkColumn();
this.colImage = new System.Windows.Forms.DataGridViewImageColumn();
this.colShopNmae = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colSaleCount = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colPrice = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colDelete = new System.Windows.Forms.DataGridViewLinkColumn();
this.statusBar = new LittleRabbit.UserControls.StatusBarUserControl();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.ucGroupBoxEx1.SuspendLayout();
this.ucGroupBoxEx2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit();
this.splitContainer2.Panel1.SuspendLayout();
this.splitContainer2.Panel2.SuspendLayout();
this.splitContainer2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvCollect)).BeginInit();
this.SuspendLayout();
//
// splitContainer1
//
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
this.splitContainer1.Name = "splitContainer1";
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.btnExport);
this.splitContainer1.Panel1.Controls.Add(this.ucGroupBoxEx1);
this.splitContainer1.Panel1.Controls.Add(this.btnLoginDouyin);
this.splitContainer1.Panel1.Controls.Add(this.btnCollect);
this.splitContainer1.Panel1.Controls.Add(this.ucGroupBoxEx2);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.splitContainer2);
this.splitContainer1.Size = new System.Drawing.Size(800, 450);
this.splitContainer1.SplitterDistance = 121;
this.splitContainer1.TabIndex = 378;
//
// btnExport
//
this.btnExport.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnExport.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnExport.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnExport.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnExport.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnExport.ForeColor = System.Drawing.Color.White;
this.btnExport.Location = new System.Drawing.Point(720, 84);
this.btnExport.Margin = new System.Windows.Forms.Padding(2);
this.btnExport.Name = "btnExport";
this.btnExport.Size = new System.Drawing.Size(66, 26);
this.btnExport.TabIndex = 394;
this.btnExport.Text = "导出数据";
this.btnExport.UseVisualStyleBackColor = false;
this.btnExport.Click += new System.EventHandler(this.btnExport_Click);
//
// ucGroupBoxEx1
//
this.ucGroupBoxEx1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.ucGroupBoxEx1.BorderStyle = LittleRabbit.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND;
this.ucGroupBoxEx1.Controls.Add(this.txtKeyWords);
this.ucGroupBoxEx1.Location = new System.Drawing.Point(3, 2);
this.ucGroupBoxEx1.Name = "ucGroupBoxEx1";
this.ucGroupBoxEx1.Size = new System.Drawing.Size(277, 120);
this.ucGroupBoxEx1.TabIndex = 393;
this.ucGroupBoxEx1.TabStop = false;
this.ucGroupBoxEx1.Text = "采集店铺";
//
// txtKeyWords
//
this.txtKeyWords.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
//
//
//
this.txtKeyWords.Border.Class = "TextBoxBorder";
this.txtKeyWords.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.txtKeyWords.Location = new System.Drawing.Point(10, 21);
this.txtKeyWords.Multiline = true;
this.txtKeyWords.Name = "txtKeyWords";
this.txtKeyWords.PreventEnterBeep = true;
this.txtKeyWords.Size = new System.Drawing.Size(257, 88);
this.txtKeyWords.TabIndex = 7;
this.txtKeyWords.WatermarkText = "请输入要搜索的店铺id或链接\r\n一行一个";
//
// btnLoginDouyin
//
this.btnLoginDouyin.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnLoginDouyin.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnLoginDouyin.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnLoginDouyin.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnLoginDouyin.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnLoginDouyin.ForeColor = System.Drawing.Color.White;
this.btnLoginDouyin.Location = new System.Drawing.Point(720, 20);
this.btnLoginDouyin.Margin = new System.Windows.Forms.Padding(2);
this.btnLoginDouyin.Name = "btnLoginDouyin";
this.btnLoginDouyin.Size = new System.Drawing.Size(66, 26);
this.btnLoginDouyin.TabIndex = 373;
this.btnLoginDouyin.Text = "登录抖音";
this.btnLoginDouyin.UseVisualStyleBackColor = false;
this.btnLoginDouyin.Click += new System.EventHandler(this.btnLoginDouyin_Click);
//
// btnCollect
//
this.btnCollect.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnCollect.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnCollect.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnCollect.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnCollect.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCollect.ForeColor = System.Drawing.Color.White;
this.btnCollect.Location = new System.Drawing.Point(720, 52);
this.btnCollect.Margin = new System.Windows.Forms.Padding(2);
this.btnCollect.Name = "btnCollect";
this.btnCollect.Size = new System.Drawing.Size(66, 26);
this.btnCollect.TabIndex = 374;
this.btnCollect.Text = "开始采集";
this.btnCollect.UseVisualStyleBackColor = false;
this.btnCollect.Click += new System.EventHandler(this.btnCollect_Click);
//
// ucGroupBoxEx2
//
this.ucGroupBoxEx2.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.ucGroupBoxEx2.BorderStyle = LittleRabbit.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND;
this.ucGroupBoxEx2.Controls.Add(this.txtFilter);
this.ucGroupBoxEx2.Controls.Add(this.label10);
this.ucGroupBoxEx2.Controls.Add(this.txtTotalPage);
this.ucGroupBoxEx2.Controls.Add(this.label12);
this.ucGroupBoxEx2.Controls.Add(this.txtSellCountMax);
this.ucGroupBoxEx2.Controls.Add(this.txtPriceMax);
this.ucGroupBoxEx2.Controls.Add(this.label13);
this.ucGroupBoxEx2.Controls.Add(this.txtPriceMin);
this.ucGroupBoxEx2.Controls.Add(this.label14);
this.ucGroupBoxEx2.Controls.Add(this.label15);
this.ucGroupBoxEx2.Controls.Add(this.txtSellCountMin);
this.ucGroupBoxEx2.Controls.Add(this.label16);
this.ucGroupBoxEx2.Location = new System.Drawing.Point(281, 2);
this.ucGroupBoxEx2.Name = "ucGroupBoxEx2";
this.ucGroupBoxEx2.Size = new System.Drawing.Size(409, 120);
this.ucGroupBoxEx2.TabIndex = 395;
this.ucGroupBoxEx2.TabStop = false;
this.ucGroupBoxEx2.Text = "采集参数";
//
// txtFilter
//
//
//
//
this.txtFilter.Border.Class = "TextBoxBorder";
this.txtFilter.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.txtFilter.Location = new System.Drawing.Point(16, 47);
this.txtFilter.Multiline = true;
this.txtFilter.Name = "txtFilter";
this.txtFilter.PreventEnterBeep = true;
this.txtFilter.Size = new System.Drawing.Size(176, 62);
this.txtFilter.TabIndex = 392;
this.txtFilter.WatermarkText = "请输入关键字,输入多个请用逗号隔开";
//
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(210, 90);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(56, 17);
this.label10.TabIndex = 389;
this.label10.Text = "采集页数";
//
// txtTotalPage
//
this.txtTotalPage.Location = new System.Drawing.Point(267, 86);
this.txtTotalPage.Name = "txtTotalPage";
this.txtTotalPage.Size = new System.Drawing.Size(123, 23);
this.txtTotalPage.TabIndex = 388;
this.txtTotalPage.Text = "5";
//
// label12
//
this.label12.AutoSize = true;
this.label12.Location = new System.Drawing.Point(13, 26);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(104, 17);
this.label12.TabIndex = 378;
this.label12.Text = "包含以下关键字:";
//
// txtSellCountMax
//
this.txtSellCountMax.Location = new System.Drawing.Point(335, 54);
this.txtSellCountMax.Name = "txtSellCountMax";
this.txtSellCountMax.Size = new System.Drawing.Size(55, 23);
this.txtSellCountMax.TabIndex = 387;
this.txtSellCountMax.Text = "99999999";
//
// txtPriceMax
//
this.txtPriceMax.Location = new System.Drawing.Point(335, 22);
this.txtPriceMax.Name = "txtPriceMax";
this.txtPriceMax.Size = new System.Drawing.Size(55, 23);
this.txtPriceMax.TabIndex = 383;
this.txtPriceMax.Text = "99999999";
//
// label13
//
this.label13.AutoSize = true;
this.label13.Location = new System.Drawing.Point(323, 57);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(13, 17);
this.label13.TabIndex = 386;
this.label13.Text = "-";
//
// txtPriceMin
//
this.txtPriceMin.Location = new System.Drawing.Point(267, 22);
this.txtPriceMin.Name = "txtPriceMin";
this.txtPriceMin.Size = new System.Drawing.Size(55, 23);
this.txtPriceMin.TabIndex = 379;
this.txtPriceMin.Text = "0";
//
// label14
//
this.label14.AutoSize = true;
this.label14.Location = new System.Drawing.Point(210, 58);
this.label14.Name = "label14";
this.label14.Size = new System.Drawing.Size(56, 17);
this.label14.TabIndex = 385;
this.label14.Text = "宝贝销量";
//
// label15
//
this.label15.AutoSize = true;
this.label15.Location = new System.Drawing.Point(210, 26);
this.label15.Name = "label15";
this.label15.Size = new System.Drawing.Size(56, 17);
this.label15.TabIndex = 380;
this.label15.Text = "宝贝价格";
//
// txtSellCountMin
//
this.txtSellCountMin.Location = new System.Drawing.Point(267, 54);
this.txtSellCountMin.Name = "txtSellCountMin";
this.txtSellCountMin.Size = new System.Drawing.Size(55, 23);
this.txtSellCountMin.TabIndex = 384;
this.txtSellCountMin.Text = "0";
//
// label16
//
this.label16.AutoSize = true;
this.label16.Location = new System.Drawing.Point(323, 25);
this.label16.Name = "label16";
this.label16.Size = new System.Drawing.Size(13, 17);
this.label16.TabIndex = 382;
this.label16.Text = "-";
//
// splitContainer2
//
this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
this.splitContainer2.Location = new System.Drawing.Point(0, 0);
this.splitContainer2.Name = "splitContainer2";
this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer2.Panel1
//
this.splitContainer2.Panel1.Controls.Add(this.dgvCollect);
this.splitContainer2.Panel1.Padding = new System.Windows.Forms.Padding(5, 0, 5, 0);
//
// splitContainer2.Panel2
//
this.splitContainer2.Panel2.Controls.Add(this.statusBar);
this.splitContainer2.Size = new System.Drawing.Size(800, 325);
this.splitContainer2.SplitterDistance = 299;
this.splitContainer2.SplitterWidth = 1;
this.splitContainer2.TabIndex = 7;
//
// dgvCollect
//
this.dgvCollect.AllowUserToAddRows = false;
this.dgvCollect.AllowUserToDeleteRows = false;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvCollect.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
this.dgvCollect.BackgroundColor = System.Drawing.Color.White;
this.dgvCollect.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvCollect.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
this.dgvCollect.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvCollect.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colSelect,
this.colProductId,
this.colProductName,
this.colImage,
this.colShopNmae,
this.colSaleCount,
this.colPrice,
this.colDelete});
this.dgvCollect.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvCollect.Location = new System.Drawing.Point(5, 0);
this.dgvCollect.Name = "dgvCollect";
this.dgvCollect.ReadOnly = true;
dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.dgvCollect.RowsDefaultCellStyle = dataGridViewCellStyle3;
this.dgvCollect.RowTemplate.Height = 23;
this.dgvCollect.Size = new System.Drawing.Size(790, 299);
this.dgvCollect.TabIndex = 6;
this.dgvCollect.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvCollect_CellContentClick);
//
// colSelect
//
this.colSelect.FillWeight = 50F;
this.colSelect.HeaderText = "选";
this.colSelect.Name = "colSelect";
this.colSelect.ReadOnly = true;
this.colSelect.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colSelect.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colSelect.Visible = false;
this.colSelect.Width = 41;
//
// colProductId
//
this.colProductId.HeaderText = "商品Id";
this.colProductId.Name = "colProductId";
this.colProductId.ReadOnly = true;
this.colProductId.Width = 150;
//
// colProductName
//
this.colProductName.HeaderText = "商品名称";
this.colProductName.Name = "colProductName";
this.colProductName.ReadOnly = true;
this.colProductName.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colProductName.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colProductName.Width = 350;
//
// colImage
//
this.colImage.HeaderText = "图片";
this.colImage.Name = "colImage";
this.colImage.ReadOnly = true;
this.colImage.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colImage.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colImage.Visible = false;
this.colImage.Width = 70;
//
// colShopNmae
//
this.colShopNmae.HeaderText = "店铺名称";
this.colShopNmae.Name = "colShopNmae";
this.colShopNmae.ReadOnly = true;
this.colShopNmae.Width = 150;
//
// colSaleCount
//
this.colSaleCount.HeaderText = "销量";
this.colSaleCount.Name = "colSaleCount";
this.colSaleCount.ReadOnly = true;
//
// colPrice
//
this.colPrice.HeaderText = "价格";
this.colPrice.Name = "colPrice";
this.colPrice.ReadOnly = true;
this.colPrice.Width = 80;
//
// colDelete
//
this.colDelete.HeaderText = "删除";
this.colDelete.Name = "colDelete";
this.colDelete.ReadOnly = true;
this.colDelete.Visible = false;
this.colDelete.Width = 81;
//
// statusBar
//
this.statusBar.BackColor = System.Drawing.Color.White;
this.statusBar.Dock = System.Windows.Forms.DockStyle.Fill;
this.statusBar.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.statusBar.Location = new System.Drawing.Point(0, 0);
this.statusBar.Margin = new System.Windows.Forms.Padding(0);
this.statusBar.Name = "statusBar";
this.statusBar.Size = new System.Drawing.Size(800, 25);
this.statusBar.TabIndex = 6;
//
// ShopProductCollectForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(800, 450);
this.Controls.Add(this.splitContainer1);
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Name = "ShopProductCollectForm";
this.Text = "抖音整店采集";
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
this.ucGroupBoxEx1.ResumeLayout(false);
this.ucGroupBoxEx2.ResumeLayout(false);
this.ucGroupBoxEx2.PerformLayout();
this.splitContainer2.Panel1.ResumeLayout(false);
this.splitContainer2.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
this.splitContainer2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dgvCollect)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.SplitContainer splitContainer1;
private UserControls.ButtonEx btnExport;
private UserComponent.UcGroupBoxEx ucGroupBoxEx1;
private DevComponents.DotNetBar.Controls.TextBoxX txtKeyWords;
private UserControls.ButtonEx btnLoginDouyin;
private UserControls.ButtonEx btnCollect;
private UserComponent.UcGroupBoxEx ucGroupBoxEx2;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.TextBox txtTotalPage;
private System.Windows.Forms.Label label12;
private System.Windows.Forms.TextBox txtSellCountMax;
private System.Windows.Forms.TextBox txtPriceMax;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.TextBox txtPriceMin;
private System.Windows.Forms.Label label14;
private System.Windows.Forms.Label label15;
private System.Windows.Forms.TextBox txtSellCountMin;
private System.Windows.Forms.Label label16;
private UserComponent.DataGridViewEx dgvCollect;
private DevComponents.DotNetBar.Controls.TextBoxX txtFilter;
private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect;
private System.Windows.Forms.DataGridViewTextBoxColumn colProductId;
private System.Windows.Forms.DataGridViewLinkColumn colProductName;
private System.Windows.Forms.DataGridViewImageColumn colImage;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopNmae;
private System.Windows.Forms.DataGridViewTextBoxColumn colSaleCount;
private System.Windows.Forms.DataGridViewTextBoxColumn colPrice;
private System.Windows.Forms.DataGridViewLinkColumn colDelete;
private System.Windows.Forms.SplitContainer splitContainer2;
private UserControls.StatusBarUserControl statusBar;
}
}
@@ -0,0 +1,358 @@
using AllBase;
using AllBase.Model.Result;
using LittleRabbit.LittleRabbitForms.ToolForms;
using NaiBa.Util.Extension;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using Work.BLL.Collect;
namespace LittleRabbit.LittleRabbitForms.CollectForms
{
public partial class ShopProductCollectForm : Form
{
List<string> lstFilterKeyword = new List<string>();
List<DouGoodsCollectInfo> lstProduct = new List<DouGoodsCollectInfo>();
decimal priceMin = 0;
decimal priceMax = 99999999;
long salesMin = 0;
long salesMax = 99999999;
int totalPage = 5;
CancellationTokenSource cancellationTokenSource = null;
public ShopProductCollectForm()
{
InitializeComponent();
}
private void btnCollect_Click(object sender, EventArgs e)
{
if (btnCollect.Text != "开始采集")
{
cancellationTokenSource.Cancel();
return;
}
priceMin = this.txtPriceMin.Text.ParseToDecimal();
priceMax = this.txtPriceMax.Text.ParseToDecimal();
salesMin = this.txtSellCountMin.Text.ParseToLong();
salesMax = this.txtSellCountMax.Text.ParseToLong();
totalPage = this.txtTotalPage.Text.ParseToInt();
lstFilterKeyword = this.txtFilter.Text.Trim().Split(new string[] { "\r", "\n", " ", "," }, StringSplitOptions.RemoveEmptyEntries).ToList();
if (string.IsNullOrWhiteSpace(txtKeyWords.Text))
{
BaseForms.BaseMsgForm.ShowError("请输入要搜索的Id或链接");
return;
}
if (totalPage < 1)
{
BaseForms.BaseMsgForm.ShowError("请至少查询一页以上数据");
return;
}
var searchTextArr = this.txtKeyWords.Text.Split(new string[] { "\r", "\n", ",", " " }, StringSplitOptions.RemoveEmptyEntries);
lstProduct.Clear();
this.dgvCollect.Rows.Clear();
cancellationTokenSource = new CancellationTokenSource();
btnCollect.Text = "停止采集";
int n = 0;
int total = searchTextArr.Count() * totalPage;
this.statusBar.lblTaskStatus.Text = "开始采集...";
this.statusBar.pgbTaskProgress.Value = n;
this.statusBar.pgbTaskProgress.Text = n + "/" + total;
this.statusBar.pgbTaskProgress.Maximum = total;
Task.Run(() =>
{
if (cancellationTokenSource.IsCancellationRequested)
return;
var exportFileName = "采集导出\\抖音整店采集" + DateTime.Now.ToString("yyyyMMddHHmmss") + ".csv";
try
{
if (!Directory.Exists("采集导出"))
Directory.CreateDirectory("采集导出");
StringBuilder sb = new StringBuilder();
sb.AppendLine("商品Id,商品名称,店铺名称,商品销量,商品价格");
File.AppendAllText(exportFileName, sb.ToString(), Encoding.Default);
}
catch (Exception ex) { }
foreach (var searchText in searchTextArr)
{
if (cancellationTokenSource.IsCancellationRequested)
break;
DouGoodsCollectInfo goodShop = new DouGoodsCollectInfo();
var text = searchText;
var goodId = BaseRegex.GetMatchRegexString(ref text, "(\\d{15,25})");
if (goodId != null && goodId.ParseToLong() > 0)
goodShop.Id = goodId;
else
{
var shopId = searchText;
if (searchText.Contains("shop/index?id="))
{
shopId = searchText.Substring(shopId.IndexOf("shop/index?id=") + "shop/index?id=".Length);
}
goodShop.ShopId = shopId;
}
if (goodShop.Id != null && goodShop.Id.ParseToLong() > 0)
{
string douShopResult = CollectDouShopDetailByProduct(goodShop.Id);
goodShop.ShopId = BaseRegex.GetStringJson(ref douShopResult, "shop_id");
goodShop.ShopName = BaseRegex.GetStringJson(ref douShopResult, "shop_name");
}
else
{
string douShopResult = CollectDouShopDetail(goodShop.ShopId);
goodShop.ShopName = BaseRegex.GetStringJson(ref douShopResult, "shop_name");
}
if (!string.IsNullOrEmpty(goodShop.ShopName) && !string.IsNullOrEmpty(goodShop.ShopId))
{
for (int i = 0; i < this.totalPage; i++)
{
if (i >= 19)
{
}
try
{
if (cancellationTokenSource.IsCancellationRequested)
break;
n++;
Invoke(new Action(() =>
{
this.statusBar.lblTaskStatus.Text = "正在采集店铺:" + goodShop.ShopId + ",当前采集到第 " + (i + 1) + " 页";
this.statusBar.pgbTaskProgress.Value = n;
this.statusBar.pgbTaskProgress.Text = n + "/" + total;
this.statusBar.pgbTaskProgress.Maximum = total;
}));
var goodsListResult = CollectShopGoodsList(goodShop.ShopId, i.ToString());
if (!string.IsNullOrEmpty(goodsListResult) && goodsListResult.Contains("用户未登录"))
{
BaseForms.BaseMsgForm.ShowError("请先未登录!");
break;
}
if (!string.IsNullOrEmpty(goodsListResult) && goodsListResult.Contains("\"st\":0"))
{
if (goodsListResult.Contains("\"list\":[]"))
break;
JObject jObj = JObject.Parse(goodsListResult);
if (jObj["data"]?["list"] != null)
{
foreach (JObject pObj in jObj["data"]?["list"])
{
string pStr = JsonHelper.SerializeObject(pObj);
DouGoodsCollectInfo good = new DouGoodsCollectInfo();
good.GoodsName = BaseRegex.GetStringJson(ref pStr, "goods_name");
good.Id = BaseRegex.GetStringJson(ref pStr, "product_id");
good.ShopName = goodShop.ShopName;
good.Sales = BaseRegex.GetStringJson(ref pStr, "sell_num");
good.Price = BaseRegex.GetDecimalJson(ref pStr, "goods_price").ToString();
var salesLong = good.Sales.Replace("+", "").Replace("万", "").ParseToDecimal();
if (good.Sales.Contains("万"))
salesLong = salesLong * 10000;
if (good.Price.ParseToDecimal() < priceMin || good.Price.ParseToDecimal() > priceMax
|| salesLong < salesMin || salesLong > salesMax)
{
continue;
}
if (lstFilterKeyword.Count > 0 && !lstFilterKeyword.Any(k => good.GoodsName.Contains(k)))
{
continue;
}
try
{
this.lstProduct.Add(good);
StringBuilder sb = new StringBuilder();
sb.AppendLine("https://haohuo.jinritemai.com/views/product/item2?id=" + good.Id + "," + good.GoodsName + "," + good.ShopName + ","
+ good.Sales + "," + good.Price);
File.AppendAllText(exportFileName, sb.ToString(), Encoding.Default);
}
catch (Exception ex) { }
Invoke(new Action(() =>
{
var index = this.dgvCollect.Rows.Add(false, good.Id, good.GoodsName, null, good.ShopName, good.Sales, good.Price, "删除");
}));
}
}
}
}
catch (Exception ex)
{
}
Thread.Sleep(Randomx.GetId(3000, 4000));
}
}
}
Invoke(new Action(() =>
{
btnCollect.Text = "开始采集";
this.statusBar.lblTaskStatus.Text = "采集结束,共采集到商品" + this.lstProduct.Count + "个";
this.statusBar.pgbTaskProgress.Value = n;
this.statusBar.pgbTaskProgress.Text = n + "/" + total;
this.statusBar.pgbTaskProgress.Maximum = total;
}));
});
}
private void btnExport_Click(object sender, EventArgs e)
{
try
{
SaveFileDialog saveFileDialog1 = new SaveFileDialog();
saveFileDialog1.Filter = "表格文件(*.csv)|*.csv";
saveFileDialog1.FileName = "抖音整店采集" + DateTime.Now.ToString("yyyyMMddHHmmss") + ".csv";
saveFileDialog1.FilterIndex = 2;
saveFileDialog1.RestoreDirectory = true;
if (saveFileDialog1.ShowDialog() == DialogResult.OK)
{
StringBuilder sb = new StringBuilder();
sb.AppendLine("商品Id,商品名称,店铺名称,商品销量,商品价格");
foreach (var good in lstProduct)
{
sb.AppendLine("https://haohuo.jinritemai.com/views/product/item2?id=" + good.Id + "," + good.GoodsName + "," + good.ShopName + ","
+ good.Sales + "," + good.Price);
}
File.WriteAllText(saveFileDialog1.FileName, sb.ToString(), Encoding.Default);
BaseForms.BaseMsgForm.ShowInfo("导出成功");
}
}
catch (Exception ex)
{
BaseForms.BaseMsgForm.ShowError(ex.Message);
}
}
/// <summary>
/// 获取店铺名称等信息
/// </summary>
/// <param name="shopId"></param>
/// <returns></returns>
private string CollectDouShopDetail(string shopId)
{
HttpWebResponse response = null;
string result;
try
{
HttpWebRequest request = (HttpWebRequest)WebRequest.Create("https://ec.snssdk.com/shop/getInfo?id=" + shopId + "&b_type_new=0&device_id=0&is_outside=1");
request.ContentType = "application/x-www-form-urlencoded";
request.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36";
response = (HttpWebResponse)request.GetResponse();
}
catch (WebException ex)
{
if (ex.Status == WebExceptionStatus.ProtocolError)
{
response = (HttpWebResponse)ex.Response;
result = GetProxyHtml.ReadResponse(response);
if (response != null) response.Close();
return result;
}
else return ex.Message;
}
catch (Exception e)
{
if (response != null) response.Close();
return e.Message;
}
result = GetProxyHtml.ReadResponse(response);
if (response != null) response.Close();
return result;
}
/// <summary>
/// 根据店铺商品获取店铺名称等信息
/// </summary>
/// <param name="shopId"></param>
/// <returns></returns>
private string CollectDouShopDetailByProduct(string productId)
{
return HaoWuCollectBLL.getHtml("https://ec.snssdk.com/product/fxgajaxstaticitem?b_type_new=0&device_id=0&is_outside=1&id=" + productId + "&preview=0", "", "utf8");
}
private string CollectShopGoodsList(string shopId, string page)
{
HttpWebResponse response = null;
string result;
try
{
string url = "https://ec.snssdk.com/shop/goodsList?shop_id=" + shopId + "&pageSize=20&page=" + page;
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
request.ContentType = "application/x-www-form-urlencoded";
request.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36";
request.Headers.Add("Cookie", AllBase.Helper.GlobalConfig.DouUserCookies);
response = (HttpWebResponse)request.GetResponse();
}
catch (WebException ex)
{
if (ex.Status == WebExceptionStatus.ProtocolError)
{
response = (HttpWebResponse)ex.Response;
result = GetProxyHtml.ReadResponse(response);
if (response != null) response.Close();
return result;
}
else return ex.Message;
}
catch (Exception e)
{
if (response != null) response.Close();
return e.Message;
}
result = GetProxyHtml.ReadResponse(response);
if (response != null) response.Close();
return result;
}
private void dgvCollect_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
if (e.RowIndex < 0 || e.ColumnIndex < 0)
return;
var goodsId = dgvCollect.Rows[e.RowIndex].Cells["colProductId"].Value.ToString();
var columnName = dgvCollect.Columns[e.ColumnIndex].Name;
if (columnName == "colProductId" || columnName == "colProductName")
{
string url = "https://haohuo.jinritemai.com/views/product/item2?id=" + goodsId;
GetHtml.OpenUrl(url);
}
}
private void btnLoginDouyin_Click(object sender, EventArgs e)
{
DouUserLoginForm dForm = new DouUserLoginForm();
dForm.ShowDialog();
}
}
}
@@ -0,0 +1,144 @@
<?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="colSelect.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colProductId.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colProductName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colImage.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colShopNmae.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colSaleCount.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colPrice.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colDelete.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>
+165
View File
@@ -0,0 +1,165 @@
namespace LittleRabbit.LittleRabbitForms.OrderForms
{
partial class OrderForm
{
/// <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()
{
System.Windows.Forms.TreeNode treeNode3 = new System.Windows.Forms.TreeNode("添加子节点");
System.Windows.Forms.TreeNode treeNode4 = new System.Windows.Forms.TreeNode("订单管理", new System.Windows.Forms.TreeNode[] {
treeNode3});
this.tv = new LittleRabbit.UserComponent.UcTreeView();
this.panel1 = new System.Windows.Forms.Panel();
this.panel3 = new System.Windows.Forms.Panel();
this.panel2 = new System.Windows.Forms.Panel();
this.lblName = new System.Windows.Forms.Label();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.panel1.SuspendLayout();
this.panel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.SuspendLayout();
//
// tv
//
this.tv.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.tv.ChildNodeSelectedBgColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.tv.Cursor = System.Windows.Forms.Cursors.Hand;
this.tv.Dock = System.Windows.Forms.DockStyle.Fill;
this.tv.DrawMode = System.Windows.Forms.TreeViewDrawMode.OwnerDrawAll;
this.tv.ExpandButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
this.tv.FullRowSelect = true;
this.tv.GroupBgColor = System.Drawing.Color.FromArgb(((int)(((byte)(249)))), ((int)(((byte)(249)))), ((int)(((byte)(249)))));
this.tv.GroupFont = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.tv.GroupTitleColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(80)))), ((int)(((byte)(80)))));
this.tv.HideCollapsedGroup = false;
this.tv.ItemHeight = 32;
this.tv.Location = new System.Drawing.Point(0, 0);
this.tv.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.tv.Name = "tv";
treeNode3.Name = "添加子节点";
treeNode3.Text = "添加子节点";
treeNode4.Name = "订单管理";
treeNode4.Text = "订单管理";
this.tv.Nodes.AddRange(new System.Windows.Forms.TreeNode[] {
treeNode4});
this.tv.OverForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.tv.Size = new System.Drawing.Size(140, 460);
this.tv.TabIndex = 2;
this.tv.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.tv_AfterSelect);
//
// panel1
//
this.panel1.BackColor = System.Drawing.Color.White;
this.panel1.Controls.Add(this.panel3);
this.panel1.Controls.Add(this.panel2);
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(792, 460);
this.panel1.TabIndex = 3;
//
// panel3
//
this.panel3.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel3.Location = new System.Drawing.Point(0, 28);
this.panel3.Name = "panel3";
this.panel3.Size = new System.Drawing.Size(792, 432);
this.panel3.TabIndex = 1;
//
// panel2
//
this.panel2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(244)))), ((int)(((byte)(244)))), ((int)(((byte)(244)))));
this.panel2.Controls.Add(this.lblName);
this.panel2.Dock = System.Windows.Forms.DockStyle.Top;
this.panel2.Location = new System.Drawing.Point(0, 0);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(792, 28);
this.panel2.TabIndex = 0;
//
// lblName
//
this.lblName.AutoSize = true;
this.lblName.Location = new System.Drawing.Point(5, 6);
this.lblName.Name = "lblName";
this.lblName.Size = new System.Drawing.Size(57, 17);
this.lblName.TabIndex = 0;
this.lblName.Text = "lblName";
//
// splitContainer1
//
this.splitContainer1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
this.splitContainer1.Name = "splitContainer1";
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.tv);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.panel1);
this.splitContainer1.Size = new System.Drawing.Size(933, 460);
this.splitContainer1.SplitterDistance = 140;
this.splitContainer1.SplitterWidth = 1;
this.splitContainer1.TabIndex = 4;
//
// OrderForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(933, 460);
this.Controls.Add(this.splitContainer1);
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.Name = "OrderForm";
this.Text = "OrderForm";
this.Load += new System.EventHandler(this.OrderForm_Load);
this.panel1.ResumeLayout(false);
this.panel2.ResumeLayout(false);
this.panel2.PerformLayout();
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private UserComponent.UcTreeView tv;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Panel panel3;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.Label lblName;
private System.Windows.Forms.SplitContainer splitContainer1;
}
}
+38
View File
@@ -0,0 +1,38 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace LittleRabbit.LittleRabbitForms.OrderForms
{
public partial class OrderForm : Form
{
public OrderForm()
{
InitializeComponent();
}
private void OrderForm_Load(object sender, EventArgs e)
{
try
{
tv.SelectedNode = tv.Nodes[0].Nodes[0];
tv.ExpandGroup(tv.Nodes[0].Name);
}
catch { }
}
private void tv_AfterSelect(object sender, TreeViewEventArgs e)
{
MainForm.sCurrentModule = e.Node.Name;
this.lblName.Text = e.Node.Text;
// todo: 参考 LittleCatDouDian.LittleCatForms.ShopForms.Shopform
}
}
}
+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>
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,630 @@
using AllBase;
using AllBase.Helper;
using AllBase.Model.Result;
using CefSharp;
using CefSharp.WinForms;
using LittleRabbit.Extension;
using LittleRabbit.Helper;
using LittleRabbit.LittleRabbitForms.BaseForms;
using NaiBa.CefHelper;
using NaiBa.CefHelper.Handler;
using NaiBa.Util.Extension;
using Newtonsoft.Json.Linq;
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;
namespace LittleRabbit.LittleRabbitForms.SalesCenterForms
{
public partial class CouponForm : Form
{
private CheckBox chkSelectAll = null;
public ChromiumWebBrowser webBrowser = null;
private List<string> lstShopId = new List<string>();
public List<string> keywords = null;
public List<string> filterWords = null;
public CancellationTokenSource cancellationTokenSource = null;
public CouponForm()
{
InitializeComponent();
}
private void CouponForm_Load(object sender, EventArgs e)
{
this.ucTabControl1.TabPages.Clear();
chkSelectAll = dgvShop.Columns["colSelect"].AddHeaderCheckBox(HorizontalAlignment.Center, 0, 0, null, null, false);
dgvShop.Columns["colSelect"].HeaderText = "";
chkSelectAll.Width = chkSelectAll.Height = 13;
chkSelectAll.CheckedChanged += chkSelectAll_CheckedChanged;
this.cmbType.SelectedIndex = 0;
this.cmbUserCountLimited.SelectedIndex = 0;
this.dtpStartApplyTime.Value = DateTime.Now.Date;
this.dtpEndApplyTime.Value = this.dtpStartApplyTime.Value.AddDays(1).AddSeconds(-1);
}
private void chkSelectAll_CheckedChanged(object sender, EventArgs e)
{
if (!chkSelectAll.Checked)
{
lstShopId.Clear();
foreach (DataGridViewRow row in dgvShop.Rows)
{
row.Cells["colSelect"].Value = false;
}
}
else
{
lstShopId.Clear();
var list = GlobalConfig.DouShopLoginList.Where(s => s.ApiAuthStatus == "授权成功" && s.LoginStatus == "登录成功").Select(ss => ss.ShopAccountId);
lstShopId.AddRange(list);
foreach (DataGridViewRow row in dgvShop.Rows)
{
if (list.Any(l => l == row.Cells["colShopId"]?.Value?.ToString()))
row.Cells["colSelect"].Value = true;
}
}
}
private void CouponForm_VisibleChanged(object sender, EventArgs e)
{
if (Visible == true)
RefreshShop();
}
private void btnRefreshShop_Click(object sender, EventArgs e)
{
RefreshShop();
}
private void RefreshShop()
{
// 更新选中的上货店铺Id
lstShopId = lstShopId.Where(id => GlobalConfig.DouShopLoginList.Any(s => s.ShopAccountId == id && s.LoginStatus == "已授权")).ToList();
// 获取被删除的店铺
List<DataGridViewRow> dgvRowList = dgvShop.Rows.Cast<DataGridViewRow>().Where(row
=> !GlobalConfig.DouShopLoginList.Any(s => s.ShopAccountId == row.Cells["colShopId"]?.Value?.ToString())).ToList();
// 更新被删除的店铺列表
foreach (var row in dgvRowList)
{
dgvShop.Rows.Remove(row);
}
// 绑定其他店铺(含新导入的店铺)
foreach (DouShopLoginInfo shopEntity in GlobalConfig.DouShopLoginList)
{
BindShop(shopEntity);
}
}
private void BindShop(DouShopLoginInfo shopEntity)
{
if (shopEntity == null)
return;
bool canUse = shopEntity.ApiAuthStatus == "授权成功" && shopEntity.LoginStatus == "登录成功";
var row = dgvShop.Rows.Cast<DataGridViewRow>().FirstOrDefault(p => p.Cells.GetCellValueFromColumnName("colShopId").ParseToString() == shopEntity.ShopAccountId);
if (row == null)
{
this.dgvShop.Rows.Add(
lstShopId.Contains(shopEntity.ShopAccountId) && canUse,
shopEntity.ShopAccountId,
shopEntity.ShopAccount,
shopEntity.ApiAuthStatus,
shopEntity.LoginStatus,
canUse,
string.Empty
);
}
else
{
row.Cells["colSelect"].Value = lstShopId.Contains(shopEntity.ShopAccountId) && canUse;
row.Cells["colShopName"].Value = shopEntity.ShopAccount;
row.Cells["colAuthStatus"].Value = shopEntity.ApiAuthStatus;
row.Cells["colLoginStatus"].Value = shopEntity.LoginStatus;
row.Cells["colCanUse"].Value = canUse;
}
}
private void dgvShop_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
if (e.ColumnIndex < 0 || e.RowIndex < 0)
return;
string headerText = dgvShop.Columns[e.ColumnIndex].HeaderText;
string columnName = dgvShop.Columns[e.ColumnIndex].Name;
long shopId = dgvShop.Rows[e.RowIndex].Cells["colShopId"].Value.ParseToLong();
string shopName = dgvShop.Rows[e.RowIndex].Cells["colShopId"].Value.ToString();
var shop = GlobalConfig.DouShopLoginList.FirstOrDefault(s => s.ShopAccountId == shopId.ToString());
var row = dgvShop.Rows[e.RowIndex];
switch (columnName)
{
case "colSelect":
if (row.Cells["colCanUse"].Value.ParseToBool())
{
row.Cells["colSelect"].Value = !row.Cells["colSelect"].Value.ParseToBool();
if (dgvShop.Rows[e.RowIndex].Cells["colSelect"].Value.ParseToBool())
lstShopId.Add(shopId.ToString());
else
lstShopId.Remove(shopId.ToString());
if (dgvShop.Rows.Cast<DataGridViewRow>().All(r => r.Cells["colSelect"].Value.ParseToBool()))
chkSelectAll.Checked = true;
else
chkSelectAll.Checked = false;
}
else
{
BaseMsgForm.ShowInfo("店铺未授权或未登录!");
}
break;
}
}
private void btnGetProduct_Click(object sender, EventArgs e)
{
if (lstShopId.Count == 0)
{
BaseMsgForm.ShowInfo("请选择店铺!");
return;
}
try
{
this.keywords = txtProductName.Text.Trim().Split(new string[] { "\r", "\n", ",", "," }, StringSplitOptions.RemoveEmptyEntries).ToList();
this.filterWords = txtFilter.Text.Trim().Split(new string[] { "\r", "\n", ",", "," }, StringSplitOptions.RemoveEmptyEntries).ToList();
}
catch (Exception ex)
{
}
cancellationTokenSource = new CancellationTokenSource();
Task.Run(() =>
{
foreach (var shopId in lstShopId)
{
if (cancellationTokenSource.IsCancellationRequested)
break;
var shop = GlobalConfig.DouShopLoginList.FirstOrDefault(s => s.ShopAccountId == shopId);
if (shop == null)
continue;
CouponShopForm couponShopForm = null;
Invoke(new Action(() =>
{
var tab = this.ucTabControl1.TabPages.Cast<TabPage>().FirstOrDefault(t => t.Text == shop.ShopAccount && t.Name == "tab" + shop.ShopAccountId);
if (tab == null)
{
tab = new TabPage();
tab.Name = "tab" + shop.ShopAccountId;
tab.Text = shop.ShopAccount;
this.ucTabControl1.TabPages.Add(tab);
var form = new CouponShopForm(shop);
form.couponForm = this;
form.TopLevel = false;
form.Left = 0;
form.Top = 0;
form.FormBorderStyle = FormBorderStyle.None;
form.AutoSize = true;
form.Dock = DockStyle.Fill;
form.Show();
tab.Controls.Add(form);
}
if (tab.Controls.Count > 0)
couponShopForm = tab.Controls[0] as CouponShopForm;
}));
if (couponShopForm != null)
{
couponShopForm.GetProduct(
txtPriceMin.Text.ParseToDecimal(),
txtPriceMax.Text.ParseToDecimal(),
txtSaleMin.Text.ParseToInt(),
txtSaleMax.Text.ParseToInt(),
this.keywords,
this.filterWords);
}
}
}, cancellationTokenSource.Token);
}
public void GetSales(DouShopLoginInfo shop, bool isSales = true)
{
if (webBrowser == null)
{
Invoke(new Action(() =>
{
webBrowser = CEFBrowser.CreateChromiumWebBrowser("about:blank", false);
webBrowser.KeyboardHandler = new KeyboardHandler();
webBrowser.Dock = DockStyle.Fill;
CustomResourceRequestHandlerLocal resourceRequestHandler = new Helper.CustomResourceRequestHandlerLocal();
resourceRequestHandler.ResourceLoadCompleteEvent += RequestHandler_ResourceLoadCompleteEvent;
webBrowser.RequestHandler = new CustomRequestHandler(resourceRequestHandler);
webBrowser.LifeSpanHandler = new LifeSpanHandlerLocal(PopWindowType.SelfWindow);
webBrowser.SendToBack();
this.splitContainer1.Panel2.Controls.Add(webBrowser);
}));
}
while (webBrowser.Tag != null)
{
Thread.Sleep(Randomx.GetId(50, 100));
}
if (cancellationTokenSource.IsCancellationRequested)
return;
webBrowser.Tag = shop;
while (!webBrowser.IsBrowserInitialized || webBrowser.IsLoading)
continue;
var cookie = shop.Cookies;
CEFBrowser.DeleteCookie(webBrowser.RequestContext.GetCookieManager(null));
var t = CEFBrowser.SetCookieAsync("jinritemai.com", cookie, webBrowser.RequestContext.GetCookieManager(null));
t.Wait(2000);
Thread.Sleep(500);
var targetUrl = "https://fxg.jinritemai.com/ffa/g/list";
webBrowser.Load(targetUrl);
while (webBrowser.IsLoading)
{
Thread.Sleep(1000);
}
Thread.Sleep(3000);
if (!isSales)
{
Thread.Sleep(3000);
var jsStrBase = "function clickProductAnalysis(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) {\r\n"
+ " element1.click(); return 'success';\r\n"
+ " } else return 'no_element';\r\n"
+ "}\r\n";
var jsStr = jsStrBase + "clickProductAnalysis('电商罗盘');\r\n";
t = webBrowser.GetMainFrame().EvaluateScriptAsync(jsStr);
t.Wait();
while (webBrowser.IsLoading)
{
Thread.Sleep(1000);
}
Thread.Sleep(Randomx.GetId(1500, 2500));
jsStr = jsStrBase + "clickProductAnalysis('商品概览');\r\n";
t = webBrowser.GetMainFrame().EvaluateScriptAsync(jsStr);
t.Wait();
while (webBrowser.IsLoading)
{
Thread.Sleep(1000);
}
Thread.Sleep(Randomx.GetId(1500, 2500));
}
while (webBrowser.Tag != null)
{
Thread.Sleep(Randomx.GetId(50, 100));
}
Thread.Sleep(3000);
}
private void RequestHandler_ResourceLoadCompleteEvent(object sender, string url, string postData, string responseData, CefSharp.IRequest iRequest)
{
if (url.StartsWith("https://fxg.jinritemai.com/product/tproduct/list?page=0") && url.Contains("&pay_type="))
{
var listUrl = url;
var referrerUrl = iRequest.ReferrerUrl;
var result = responseData;
Dictionary<string, string> Headers = new Dictionary<string, string>();
foreach (var hk in iRequest.Headers.AllKeys)
{
Headers[hk] = iRequest.Headers[hk];
}
if (webBrowser.Tag != null)
{
var shop = webBrowser.Tag as DouShopLoginInfo;
var tab = this.ucTabControl1.TabPages.Cast<TabPage>().FirstOrDefault(t => t.Text == shop.ShopAccount && t.Name == "tab" + shop.ShopAccountId);
var clearForm = tab.Controls[0] as CouponShopForm;
Task.Run(() =>
{
int total = -1;
int number = 0;
for (int i = 0; i < 10000; i++)
{
number += 20;
result = "";
for (int j = 0; j < 3 && !result.Contains("\"st\":0"); j++)
{
CommonSimRequest simRequest = new CommonSimRequest();
simRequest.Accept = "application/json, text/plain, */*";
if (Headers.ContainsKey("Accept"))
simRequest.Accept = Headers["Accept"];
if (Headers.ContainsKey("UserAgent"))
simRequest.UserAgent = Headers["UserAgent"];
var cookie = shop.Cookies;
var rUrl = listUrl.Replace("page=0", "page=" + i)
.Replace("&pay_type=", "&pay_type=&sell_num_min=1");
result = simRequest.Request_Get(rUrl, referrerUrl, new Dictionary<string, string>(), cookie);
if (j > 0)
{
Thread.Sleep(Randomx.GetId(2000, 3000));
}
}
if (result.Contains("\"st\":0") && !cancellationTokenSource.IsCancellationRequested)
{
clearForm.isGetProductSalesSuccess = true;
if (total == -1)
{
total = BaseRegex.GetIntJson(ref result, "total");
}
var jObj = JObject.Parse(result);
var jArr = jObj["data"] as JArray;
foreach (var productObj in jArr)
{
var prod = JsonHelper.SerializeObject(productObj);
var pId = BaseRegex.GetStringJson(ref prod, "product_id");
var sales = BaseRegex.GetIntJson(ref prod, "sell_num");
if (sales == 0)
{
number = 99999999;
break;
}
else
{
clearForm.dicProductSales[pId] = sales;
}
}
Thread.Sleep(Randomx.GetId(2000, 3000));
}
else
{
clearForm.isGetProductSalesSuccess = false;
webBrowser.Tag = null;
break;
}
if (number >= total)
break;
}
webBrowser.Tag = null;
Thread.Sleep(1000);
});
}
else
{
webBrowser.Tag = null;
}
}
}
private void lblProductName_Click(object sender, EventArgs e)
{
if (this.webBrowser != null)
{
webBrowser.SendToBack();
}
}
private void lblProductName_DoubleClick(object sender, EventArgs e)
{
if (this.webBrowser != null)
{
webBrowser.BringToFront();
}
}
private void btnSet_Click(object sender, EventArgs e)
{
cancellationTokenSource = new CancellationTokenSource();
int periodType = this.rbUseTypePeriod.Checked ? 1 : 2;
int favouredType = 41;
if (this.cmbType.Text == "商品直减券")
favouredType = 42;
else if (this.cmbType.Text == "商品满减券")
favouredType = 43;
int days = this.nudDays.Text.ParseToInt();
int startApplyTime = BaseClass.DateTimeToTimestampSeconds(this.dtpStartApplyTime.Value);
int endApplyTime = BaseClass.DateTimeToTimestampSeconds(this.dtpEndApplyTime.Value);
int startUseTime = BaseClass.DateTimeToTimestampSeconds(this.dtpStartUseTime.Value.Date);
int endUseTime = BaseClass.DateTimeToTimestampSeconds(this.dtpEndUseTime.Value.Date.AddDays(1).AddSeconds(-1));
int totalCount = nudTotalCount.Value.ParseToInt();
int countLimit = 1;
decimal discount = this.nudCredit.Value.ParseToDecimal(); // 折扣
int thresHold = this.nudThresHold.Value.ParseToInt(); // 满x元 单位元
int credit = this.nudCredit.Value.ParseToInt(); // 减x元 单位元
bool igonre = rbNotReckonIn.Checked;
bool oneProductEachCoupon = this.rbOneProductEachCoupon.Checked;
Task.Run(() =>
{
int i = 0;
List<Task> tList = new List<Task>();
foreach (TabPage tp in ucTabControl1.TabPages)
{
i++;
Invoke(new Action(() =>
{
this.statusBar.lblTaskStatus.Text = "正在设置优惠券";
this.statusBar.pgbTaskProgress.Value = i;
this.statusBar.pgbTaskProgress.Text = i + "/" + ucTabControl1.TabPages.Count;
this.statusBar.pgbTaskProgress.Maximum = ucTabControl1.TabPages.Count;
}));
if (tp.Controls.Count > 0)
{
var cForm = tp.Controls[0] as CouponShopForm;
if (cForm != null)
{
var t = Task.Run(() =>
{
cForm.SetCoupon(periodType, favouredType, startApplyTime, endApplyTime, startUseTime, endUseTime, days, totalCount, countLimit, discount, thresHold, credit, igonre, oneProductEachCoupon);
});
tList.Add(t);
if (tList.Count >= 10)
Task.WaitAny(tList.ToArray());
var ts = tList.Where(t1 => t1.IsCompleted || t1.IsCanceled || t1.IsFaulted);
foreach (var t1 in ts)
{
tList.Remove(t1);
}
}
}
}
Task.WaitAll(tList.ToArray());
tList.Clear();
Invoke(new Action(() =>
{
if (cancellationTokenSource.IsCancellationRequested)
{
this.statusBar.lblTaskStatus.Text = "设置中断";
}
else
{
this.statusBar.lblTaskStatus.Text = "设置完成";
}
this.statusBar.pgbTaskProgress.Value = 0;
this.statusBar.pgbTaskProgress.Text = 0 + "/" + 0;
this.statusBar.pgbTaskProgress.Maximum = 0;
}));
}, cancellationTokenSource.Token);
}
private void btnStopOperate_Click(object sender, EventArgs e)
{
if (cancellationTokenSource != null)
cancellationTokenSource.Cancel();
}
private void btnStopGetProduct_Click(object sender, EventArgs e)
{
if (cancellationTokenSource != null)
cancellationTokenSource.Cancel();
}
private void rbUseTypePeriod_CheckedChanged(object sender, EventArgs e)
{
if (rbUseTypePeriod.Checked)
{
pnlTimePeriod.Visible = true;
lblUseTypeText.Text = "日期范围";
}
else
{
pnlTimePeriod.Visible = false;
lblUseTypeText.Text = "领券当日起";
}
}
private void pbPaste1_Click(object sender, EventArgs e)
{
IDataObject iData = Clipboard.GetDataObject();
if (iData != null && iData.GetDataPresent(DataFormats.Text))
{
txtProductName.Text = (string)iData.GetData(DataFormats.Text);
}
}
private void pbPaste2_Click(object sender, EventArgs e)
{
IDataObject iData = Clipboard.GetDataObject();
if (iData != null && iData.GetDataPresent(DataFormats.Text))
{
txtFilter.Text = (string)iData.GetData(DataFormats.Text);
}
}
private void btnClear_Click(object sender, EventArgs e)
{
if (BaseMsgForm.ShowConfirm("确定要清空结果吗?清空后需要重新获取!").DialogResult == DialogResult.OK)
{
foreach (TabPage tp in ucTabControl1.TabPages)
{
if (tp.Controls.Count > 0)
{
if (tp.Text.Contains("活动管理"))
{
//var managerActiveForm = tp.Controls[0] as LimitedSalesManagerActiveForm;
//if (managerActiveForm != null)
// managerActiveForm.ClearData();
//if (splitContainer4.Panel1.Controls.Count == 2)
// splitContainer4.Panel1.Controls.RemoveAt(1);
}
else
{
var salesForm = tp.Controls[0] as CouponShopForm;
if (salesForm != null)
salesForm.ClearData();
}
}
}
}
}
private void cmbType_SelectedIndexChanged(object sender, EventArgs e)
{
if (cmbType.Text == "商品折扣券")
{
this.lblDiscountText.Text = "  折扣";
nudCredit.Minimum = 0.1M;
nudCredit.Increment = 0.1M;
nudCredit.Maximum = 9.9M;
nudCredit.DecimalPlaces = 1;
nudCredit.Value = 9.9M;
lblCreditText.Text = "折";
nudThresHold.Visible = false;
lblThresHold.Visible = false;
}
else if (cmbType.Text == "商品直减券")
{
this.lblDiscountText.Text = "直减面额";
nudCredit.Minimum = 1;
nudCredit.Increment = 1;
nudCredit.Maximum = 1000;
nudCredit.DecimalPlaces = 0;
nudCredit.Value = 1;
lblCreditText.Text = "元";
nudThresHold.Visible = false;
lblThresHold.Visible = false;
}
else
{
this.lblDiscountText.Text = "满减 满";
nudCredit.Minimum = 1;
nudCredit.Increment = 1;
nudCredit.Maximum = 99999;
nudCredit.DecimalPlaces = 0;
nudCredit.Value = 1;
lblCreditText.Text = "元";
nudThresHold.Visible = true;
lblThresHold.Visible = true;
}
}
}
}
@@ -0,0 +1,138 @@
<?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="colSelect.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colShopId.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colAuthStatus.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colLoginStatus.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colCanUse.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colMessage.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>
@@ -0,0 +1,335 @@
namespace LittleRabbit.LittleRabbitForms.SalesCenterForms
{
partial class CouponMulitAddForm
{
/// <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()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CouponMulitAddForm));
this.panel2 = new System.Windows.Forms.Panel();
this.panel4 = new System.Windows.Forms.Panel();
this.rbUseTypeDays = new System.Windows.Forms.RadioButton();
this.rbUseTypePeriod = new System.Windows.Forms.RadioButton();
this.label17 = new System.Windows.Forms.Label();
this.rbAllProductEachCoupon = new System.Windows.Forms.RadioButton();
this.rbOneProductEachCoupon = new System.Windows.Forms.RadioButton();
this.btnSet = new DevComponents.DotNetBar.PanelEx();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.label10 = new System.Windows.Forms.Label();
this.label9 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.lblUseTypeText = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.label13 = new System.Windows.Forms.Label();
this.label11 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.panel3 = new System.Windows.Forms.Panel();
this.lblAdd = new System.Windows.Forms.LinkLabel();
this.ucCouponAddParam = new LittleRabbit.LittleRabbitForms.SalesCenterForms.UcCouponAddParam();
this.panel2.SuspendLayout();
this.panel4.SuspendLayout();
this.panel3.SuspendLayout();
this.SuspendLayout();
//
// panel2
//
this.panel2.BackColor = System.Drawing.Color.White;
this.panel2.Controls.Add(this.panel4);
this.panel2.Controls.Add(this.label17);
this.panel2.Controls.Add(this.rbAllProductEachCoupon);
this.panel2.Controls.Add(this.rbOneProductEachCoupon);
this.panel2.Controls.Add(this.btnSet);
this.panel2.Controls.Add(this.label2);
this.panel2.Controls.Add(this.label1);
this.panel2.Controls.Add(this.label10);
this.panel2.Controls.Add(this.label9);
this.panel2.Controls.Add(this.label8);
this.panel2.Controls.Add(this.lblUseTypeText);
this.panel2.Controls.Add(this.label4);
this.panel2.Controls.Add(this.label13);
this.panel2.Controls.Add(this.label11);
this.panel2.Controls.Add(this.label6);
this.panel2.Controls.Add(this.panel3);
this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel2.Location = new System.Drawing.Point(1, 33);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(1198, 666);
this.panel2.TabIndex = 1;
//
// panel4
//
this.panel4.Controls.Add(this.rbUseTypeDays);
this.panel4.Controls.Add(this.rbUseTypePeriod);
this.panel4.Location = new System.Drawing.Point(621, 14);
this.panel4.Name = "panel4";
this.panel4.Size = new System.Drawing.Size(174, 21);
this.panel4.TabIndex = 575;
//
// rbUseTypeDays
//
this.rbUseTypeDays.AutoSize = true;
this.rbUseTypeDays.Location = new System.Drawing.Point(81, 0);
this.rbUseTypeDays.Name = "rbUseTypeDays";
this.rbUseTypeDays.Size = new System.Drawing.Size(74, 21);
this.rbUseTypeDays.TabIndex = 466;
this.rbUseTypeDays.Text = "有效天数";
this.rbUseTypeDays.UseVisualStyleBackColor = true;
//
// rbUseTypePeriod
//
this.rbUseTypePeriod.AutoSize = true;
this.rbUseTypePeriod.Checked = true;
this.rbUseTypePeriod.Location = new System.Drawing.Point(4, 0);
this.rbUseTypePeriod.Name = "rbUseTypePeriod";
this.rbUseTypePeriod.Size = new System.Drawing.Size(74, 21);
this.rbUseTypePeriod.TabIndex = 465;
this.rbUseTypePeriod.TabStop = true;
this.rbUseTypePeriod.Text = "日期范围";
this.rbUseTypePeriod.UseVisualStyleBackColor = true;
this.rbUseTypePeriod.CheckedChanged += new System.EventHandler(this.rbUseTypePeriod_CheckedChanged);
//
// label17
//
this.label17.AutoSize = true;
this.label17.Location = new System.Drawing.Point(562, 16);
this.label17.Name = "label17";
this.label17.Size = new System.Drawing.Size(68, 17);
this.label17.TabIndex = 574;
this.label17.Text = "使用时间:";
//
// rbAllProductEachCoupon
//
this.rbAllProductEachCoupon.AutoSize = true;
this.rbAllProductEachCoupon.Checked = true;
this.rbAllProductEachCoupon.Location = new System.Drawing.Point(212, 14);
this.rbAllProductEachCoupon.Name = "rbAllProductEachCoupon";
this.rbAllProductEachCoupon.Size = new System.Drawing.Size(307, 21);
this.rbAllProductEachCoupon.TabIndex = 570;
this.rbAllProductEachCoupon.TabStop = true;
this.rbAllProductEachCoupon.Text = "所有商品设置同一组优惠券(每200件商品一组优惠券)";
this.rbAllProductEachCoupon.UseVisualStyleBackColor = true;
//
// rbOneProductEachCoupon
//
this.rbOneProductEachCoupon.AutoSize = true;
this.rbOneProductEachCoupon.Location = new System.Drawing.Point(52, 14);
this.rbOneProductEachCoupon.Name = "rbOneProductEachCoupon";
this.rbOneProductEachCoupon.Size = new System.Drawing.Size(146, 21);
this.rbOneProductEachCoupon.TabIndex = 569;
this.rbOneProductEachCoupon.Text = "每件商品单独置优惠券";
this.rbOneProductEachCoupon.UseVisualStyleBackColor = true;
//
// btnSet
//
this.btnSet.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnSet.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnSet.DisabledBackColor = System.Drawing.Color.Empty;
this.btnSet.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSet.Location = new System.Drawing.Point(23, 621);
this.btnSet.Name = "btnSet";
this.btnSet.Size = new System.Drawing.Size(80, 23);
this.btnSet.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnSet.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnSet.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnSet.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnSet.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnSet.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnSet.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnSet.Style.GradientAngle = 90;
this.btnSet.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnSet.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnSet.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnSet.TabIndex = 565;
this.btnSet.Text = "批量设置";
this.btnSet.Click += new System.EventHandler(this.btnGetProduct_Click);
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(32, 45);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(68, 17);
this.label2.TabIndex = 558;
this.label2.Text = "优惠券名称";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(1127, 45);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(56, 17);
this.label1.TabIndex = 557;
this.label1.Text = "设置状态";
//
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(851, 45);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(56, 17);
this.label10.TabIndex = 554;
this.label10.Text = "优惠条件";
//
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(748, 45);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(56, 17);
this.label9.TabIndex = 553;
this.label9.Text = "优惠内容";
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(640, 45);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(80, 17);
this.label8.TabIndex = 552;
this.label8.Text = "价格风险预警";
//
// lblUseTypeText
//
this.lblUseTypeText.AutoSize = true;
this.lblUseTypeText.Location = new System.Drawing.Point(453, 45);
this.lblUseTypeText.Name = "lblUseTypeText";
this.lblUseTypeText.Size = new System.Drawing.Size(56, 17);
this.lblUseTypeText.TabIndex = 550;
this.lblUseTypeText.Text = "日期范围";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(126, 45);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(56, 17);
this.label4.TabIndex = 549;
this.label4.Text = "领取开始";
//
// label13
//
this.label13.AutoSize = true;
this.label13.Location = new System.Drawing.Point(1057, 45);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(56, 17);
this.label13.TabIndex = 556;
this.label13.Text = "每人限领";
//
// label11
//
this.label11.AutoSize = true;
this.label11.Location = new System.Drawing.Point(990, 45);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(44, 17);
this.label11.TabIndex = 555;
this.label11.Text = "发放量";
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(289, 45);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(56, 17);
this.label6.TabIndex = 551;
this.label6.Text = "领取结束";
//
// panel3
//
this.panel3.AutoScroll = true;
this.panel3.Controls.Add(this.lblAdd);
this.panel3.Controls.Add(this.ucCouponAddParam);
this.panel3.Location = new System.Drawing.Point(10, 70);
this.panel3.Name = "panel3";
this.panel3.Size = new System.Drawing.Size(1180, 545);
this.panel3.TabIndex = 1;
//
// lblAdd
//
this.lblAdd.AutoSize = true;
this.lblAdd.Location = new System.Drawing.Point(22, 56);
this.lblAdd.Name = "lblAdd";
this.lblAdd.Size = new System.Drawing.Size(92, 17);
this.lblAdd.TabIndex = 1;
this.lblAdd.TabStop = true;
this.lblAdd.Text = "增加优惠券设置";
this.lblAdd.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.lblAdd_LinkClicked);
//
// ucCouponAddParam
//
this.ucCouponAddParam.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.ucCouponAddParam.Location = new System.Drawing.Point(0, 0);
this.ucCouponAddParam.Name = "ucCouponAddParam";
this.ucCouponAddParam.Size = new System.Drawing.Size(1180, 40);
this.ucCouponAddParam.TabIndex = 0;
this.ucCouponAddParam.OnClose += new LittleRabbit.LittleRabbitForms.SalesCenterForms.UcCouponAddParam.CloseCouponAdd(this.couponAddParamControl1_OnClose);
//
// CouponMulitAddForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.ClientSize = new System.Drawing.Size(1200, 700);
this.Controls.Add(this.panel2);
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "CouponMulitAddForm";
this.Text = "批量设置";
this.TitleText = "批量设置";
this.Controls.SetChildIndex(this.panel2, 0);
this.panel2.ResumeLayout(false);
this.panel2.PerformLayout();
this.panel4.ResumeLayout(false);
this.panel4.PerformLayout();
this.panel3.ResumeLayout(false);
this.panel3.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Panel panel2;
private UcCouponAddParam ucCouponAddParam;
private System.Windows.Forms.Panel panel3;
private System.Windows.Forms.LinkLabel lblAdd;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.Label lblUseTypeText;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private DevComponents.DotNetBar.PanelEx btnSet;
private System.Windows.Forms.RadioButton rbAllProductEachCoupon;
private System.Windows.Forms.RadioButton rbOneProductEachCoupon;
private System.Windows.Forms.Panel panel4;
private System.Windows.Forms.RadioButton rbUseTypeDays;
private System.Windows.Forms.RadioButton rbUseTypePeriod;
private System.Windows.Forms.Label label17;
}
}
@@ -0,0 +1,163 @@
using AllBase;
using LittleRabbit.LittleRabbitForms.BaseForms;
using NaiBa.Util.Extension;
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;
namespace LittleRabbit.LittleRabbitForms.SalesCenterForms
{
public partial class CouponMulitAddForm : LRBaseForm
{
int number = 1;
public CouponShopForm couponShopForm = null;
public CouponMulitAddForm()
{
InitializeComponent();
}
private void couponAddParamControl1_OnClose(object obj)
{
int i = 0;
foreach (var c in panel3.Controls)
{
var couponControl = c as UcCouponAddParam;
if (couponControl == null)
continue;
couponControl.Location = new Point(0, i * (couponControl.Height + 2));
lblAdd.Location = new Point(20, (i + 1) * (couponControl.Height + 2) + 10);
i++;
}
if (panel3.Controls.Count == 1)
lblAdd.Location = new Point(20, 12);
}
private void lblAdd_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
this.number++;
UcCouponAddParam co = new UcCouponAddParam(number);
if (rbUseTypePeriod.Checked)
co.pnlTimePeriod.Visible = true;
else
co.pnlTimePeriod.Visible = false;
panel3.Controls.Add(co);
co.OnClose += couponAddParamControl1_OnClose;
int i = 0;
foreach (var c in panel3.Controls)
{
var couponControl = c as UcCouponAddParam;
if (couponControl == null)
continue;
couponControl.Location = new Point(0, i * (couponControl.Height + 2));
lblAdd.Location = new Point(20, (i + 1) * (couponControl.Height + 2) + 10);
i++;
}
}
private void btnGetProduct_Click(object sender, EventArgs e)
{
if (couponShopForm == null)
return;
this.btnSet.Enabled = false;
Task.Run(() =>
{
foreach (var c in this.panel3.Controls)
{
var couponControl = c as UcCouponAddParam;
if (couponControl == null)
continue;
int periodType = this.rbUseTypePeriod.Checked ? 1 : 2;
int favouredType = 41;
Invoke(new Action(() =>
{
if (couponControl.cmbType.Text == "商品直减券")
favouredType = 42;
else if (couponControl.cmbType.Text == "商品满减券")
favouredType = 43;
}));
int days = couponControl.nudDays.Text.ParseToInt();
int startApplyTime = BaseClass.DateTimeToTimestampSeconds(couponControl.dtpStartApplyTime.Value);
int endApplyTime = BaseClass.DateTimeToTimestampSeconds(couponControl.dtpEndApplyTime.Value);
int startUseTime = BaseClass.DateTimeToTimestampSeconds(couponControl.dtpStartUseTime.Value.Date);
int endUseTime = BaseClass.DateTimeToTimestampSeconds(couponControl.dtpEndUseTime.Value.Date.AddDays(1).AddSeconds(-1));
int totalCount = couponControl.nudTotalCount.Value.ParseToInt();
int countLimit = 1;
decimal discount = couponControl.nudCredit.Value.ParseToDecimal();
int thresHold = couponControl.nudThresHold.Value.ParseToInt(); // 满x元 单位元
int credit = couponControl.nudCredit.Value.ParseToInt(); // 减x元 单位元
bool ignore = couponControl.rbNotReckonIn.Checked;
string couponName = couponControl.txtName.Text;
bool oneProductEachCoupon = this.rbOneProductEachCoupon.Checked;
var result = couponShopForm.SetCoupon(periodType, favouredType, startApplyTime, endApplyTime, startUseTime, endUseTime, days, totalCount, countLimit, discount, thresHold, credit, ignore, oneProductEachCoupon, couponName);
//if (result.Contains("\"msg\":\"成功\""))
// Invoke(new Action(() => { couponControl.lblMsg.Text = "设置成功"; }));
//else
// Invoke(new Action(() => { couponControl.lblMsg.Text = "设置失败"; }));
if (result.Contains("success") && !result.Contains("error"))
Invoke(new Action(() => { couponControl.lblMsg.Text = "设置成功"; }));
else if (result.Contains("success") && result.Contains("error"))
Invoke(new Action(() => { couponControl.lblMsg.Text = "部分成功"; }));
else
Invoke(new Action(() => { couponControl.lblMsg.Text = "设置失败"; }));
if ("18565722666,13928836672,18565722666,13928836672,18937517772,18135637272,18888888888".Contains(BaseClass.UserName))
Thread.Sleep(Randomx.GetId(200, 700));
else
Thread.Sleep(Randomx.GetId(1000, 2000));
}
BaseMsgForm.ShowInfo("优惠券批量设置结束!");
Invoke(new Action(() =>
{
this.btnSet.Enabled = true;
}));
});
}
private void rbUseTypePeriod_CheckedChanged(object sender, EventArgs e)
{
if (rbUseTypePeriod.Checked)
{
lblUseTypeText.Text = "日期范围";
foreach (var c in this.panel3.Controls)
{
var couponControl = c as UcCouponAddParam;
if (couponControl == null)
continue;
couponControl.pnlTimePeriod.Visible = true;
}
}
else
{
lblUseTypeText.Text = "领券当日起";
foreach (var c in this.panel3.Controls)
{
var couponControl = c as UcCouponAddParam;
if (couponControl == null)
continue;
couponControl.pnlTimePeriod.Visible = false;
}
}
}
}
}
@@ -0,0 +1,298 @@
<?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>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAgIAQcwAAAABoKAAAFgAAACgAAACAAAAAAAEAAAEABAAAAAAAACgAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAACAAACAAAAAgIAAgAAAAIAAgACAgAAAgICAAMDAwAAAAP8AAP8AAAD//wD/AAAA/wD/AP//
AAD///8AAAAAAAAAAAAAAAAABEZmbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMZmZkQAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAZszMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM
zMxmAAAAAAAAAAAAAAAAAAAAAAAAAAAEbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM
zMzMzMzMzMZAAAAAAAAAAAAAAAAAAAAAAAAEbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM
zMzMzMzMzMzMzMzMxkAAAAAAAAAAAAAAAAAAAAAEbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM
zMzMzMzMzMzMzMzMzMzMzMzGQAAAAAAAAAAAAAAAAAAAbMzMzMzMzMzMzMzMzMzMzMzMzMd3d3d3d3d3
d3d3fMzMzMzMzMzMzMzMzMzMzMzMzMYAAAAAAAAAAAAAAAAARszMzMzMzMzMzMzMzMzMzMd3d3iIiIiI
iIiIiIiIiIh3d3d8zMzMzMzMzMzMzMzMzMzMZAAAAAAAAAAAAAAABszMzMzMzMzMzMzMzMzMx3eIiIiI
iIiIiIiIiIiIiIiIiIiIiHd8zMzMzMzMzMzMzMzMzMxgAAAAAAAAAAAAAGzMzMzMzMzMzMzMzMzMd4iI
iIiIiIiIiIiIiIiIiIiIiIiIiIiIiHfMzMzMzMzMzMzMzMzMxgAAAAAAAAAAAAbMzMzMzMzMzMzMzMzH
eIiIiIiIiIiHZmZmZmZmZmZmZ3eIiIiIiIiIiHzMzMzMzMzMzMzMzMxgAAAAAAAAAABszMzMzMzMzMzM
zMzHiIiIiIiHZmZmZmZmZmZmZmZmZmZmZmZmeIiIiIiIfMzMzMzMzMzMzMzMxgAAAAAAAAAGzMzMzMzM
zMzMzMzHiIiIiIdmZmZmZgAAAAAAAAAAAAZmZmZmZmZmeIiIiIh8zMzMzMzMzMzMzMxgAAAAAAAATMzM
zMzMzMzMzMzHiIiIiHZmZgAAAAAAAAAAAAEAAAAAAAAAAGZmZmZniIiIiHzMzMzMzMzMzMzMxAAAAAAA
AGzMzMzMzMzMzMzMeIiIiGZmAAAAAAERERmZmZmZmZmZkRERERAAAGZmZmZ4iIiIfMzMzMzMzMzMzMYA
AAAAAAbMzMzMzMzMzMzMeIiIiGZgAAAAERmZmZmZmZmZmZmZmZmZmZmZkREAAGZmZniIiIfMzMzMzMzM
zMzMYAAAAABMzMzMzMzMzMzMzIiIiHYAAAARGZmZiIiIj///////+IiIiIeZmZmZkREAZmZmiIiIfMzM
zMzMzMzMzMQAAAAAbMzMzMzMzMzMzO6IiIYAAAARmYiI/////////////////////4iHmZmZEQBmZmeI
iIh8zMzMzMzMzMzGAAAABMzMzMzMzMzMzMeIiIdgAAAZmI////////////////////////////iJmZmR
EGZmZ4iIh8zMzMzMzMzMzEAAAAbMzMzMzMzMzMzoiIhwAAAZeP//////////////////////////////
/4iZmZEAZmZ4iIh8zMzMzMzMzMxgAABMzMzMzMzMzMzOiIiGAAABiP//////////////////////////
////////+JmZkQZmZ4iIh8zMzMzMzMzMxAAAbMzMzMzMzMzM7oiIYAABeP//////////////////////
///////////////4mZkQZmZ4iIjMzMzMzMzMzMYAAMzMzMzMzMzMzu6IhwAAGP//////////////////
/////////////////////4iZmRZmZ4iIfMzMzMzMzMzMAAbMzMzMzMzMzM7oiHAAB4//////////////
////////////////////////////iZmRBmZ4iIfMzMzMzMzMzGAGzMzMzMzMzMzuiIcAAHj/////////
//////////////////////////////////iZmRZmZ4iIzMzMzMzMzMxgDMzMzMzMzMzM7ohwAAf/////
////////////////////////////////////////95mRZmaIiHzMzMzMzMzMwEzMzMzMzMzMzuiIEABo
//////////////////////////////////////////////95mRZmaIiMzMzMzMzMzMRszMzMzMzMzM7o
hwAGj///////////////////////////////////////////////95kQZmeIh8zMzMzMzMzGbMzMzMzM
zMzu6HEAB/////////////////////////////////////////////////+ZkQZmiIjMzMzMzMzMxmzM
zMzMzMzM7ohwAGj/////////////////////////////////////////////////iZkWZniIfMzMzMzM
zMZszMzMzMzMxu6HEAbv/4iI/////////////////////////////////////////4iP//iZEGZoiHzM
zMzMzMzGbMzMzMzMzM7uhxAGj/iIiIj//////////////////////////////////////4iIiI//mZFm
aIiMzMzMzMzMxszMzMzMzMzO6IEAbv+IiIiIj/////////////////////////////////////iIiIiP
/4mRBmeIh8zMzMzMzMbMzMzMzMzMbuhxAG7/iIiIiI////////////////iIj///j//////////////4
iIiIiP/5mQZmiIfMzMzMzMzMzMzMzMzMzO7ocQDo+IiIiIiP///////////////u7u7u7u7o////////
////iIiIiIj/+JkWZoiHzMzMzMzMzMzMzMzMzMzu6BEG7/iIiIiIj/////////////+Hd3ju5maO7v//
/////////4iIiIiI//iZEGaIh8zMzMzMzMzMzMzMzMzM7ugRBu//iIiIiI//////////////kZmZdmAZ
mP/////////////4iIiIiP//mRBmeIjMzMzMzMzMzMzMzMzMzO7nEAbv/4iIiIiP////////////+HiI
mZEBd5n/////////////+IiIiIj//4mQZniIzMzMzMzMzMzMzMzMzMzu5xAO7//4iIiI//ju7o//////
//j//4mZeP/4//////////////iIiIiP//+JkGZ4iHzMzMzMzMzMzMzMzMzG7ocQDu///4iI//ju7u7u
j//////////4mP//////////////7u7uiIiI////iZBmaIh8zMzMzMzMzMzMzMzMzu6HEG7v//////+G
ZmZ47u7//////////4//////////////7u7u7u6P/////4mQBmiIfMzMzMzMzMzMzMzMzM7uhRBu7///
///3AAAAF37u7///////////////////////h2AABm7u7v/////5kAZ4iHzMzMzMzMzMzMzMzMzO7oUQ
bu//////gQAAZgEG7u//////////////////////+BAAAAAFfu6P////+ZAGeIjMzMzMzMzMzMzMzMzM
zu6FEG7v////+JEAAXhwAG7o/////////////////////4gAABEGARbu7/////kQBoiIzMzMzMzMzMzM
zMzMzM7uhRBu7/////iZABmZkQBm6P////////////////////+JABGZF2AAbo////+JEGaIiMzMzMzM
zMzMzMzMzMzO7ucRbu/////4mRZ4iZkQBu//////////////////////mQB5mZdgAG7/////iRBmiIfM
zMzMzMzMzMzMzMzMxu7nEQ7v////+Bl+j/iZEAaP/////////////////////5l2/4mRAABu/////4kQ
ZoiHzMzMzMzMzMzMzMzMzMzu5xEO6P//+Phgbu/4kQAI//////////////////////+Zfo/4kQAAeIiP
//+JEGaIh8zMzMzMzMzMzMzMzMzM7ucRBu7///iOYHiI+HAAf///////////////////////mYjv+BAA
BuiIj///iQBniIfMzMzMzMzMzMzMzMzMzO7nEQbu///3EAAG6IcRF4iP/////////////////////4GP
/4cQAAZnbv///5EAaIiMzMzMzMzMzMzMzMzMzMzu5xEW7v//iRF3dmZgAXjmj///////////////////
///3ePiBEQAHdm7///iRAGiIfMzMzMzMzMzMzMzMzMzM7u5xFu6P/5EZmXZmZmbmaP//////////////
///////4/4d2cRAAFwbuj//4kQZoiHzMzMzMzMzMzMzMzMzMzG7ucRDu7/iXiZkQAAZmAH//////////
////////////+IiIdmYABmAX//j/+BAGeIh8zMzMzMzMzMzMzMzMzMzO7nEQbu/4iP+BERkREZf/////
//////////////////+JmXdxEBEAB3////kQBoiIzMzMzMzMzMzMzMzMzMzMzu5xEW7o+P//gZmZmZmP
////////////////////////+JmZmZmZl453//+JAGaIh8zMzMzMzMzMzMzMzMzMzM7u5xEO7vj/+IeP
iIj////////////////////////////4iZmZmZiPiP//cQBoiIfMzMzMzMzMzMzMzMzMzMzM7ucRFu6P
//iP//////////////////////////////////////+Jn/j/+JAAaIiMzMzMzMzMzMzMzMzMzMzMzO7n
ERbu7//4/////////////////////////////////////////4j///gQBoiIfMzMzMzMzMzMzMzMzMzM
zMzu7nERbuj////////////////////////////////////////////4//+BAAaIiMzMzMzMzMzMzMzM
zMzMzMzMzu5xEW7u////////////////////////////////////////////////cQBoiIfMzMzMzMzM
zMzMzMzMzMzMzM7u5xEW7u//////////////////////////////////////////////+BAAaIiMzMzM
zMzMzMzMzMzMzMzMzMzO7uYREO7o//7v//////////////////////////////////////////cABoiI
fMzMzMzMzMzMzMzMzMzMzMzMzO7ucRFu7oj/7o////////////////////////////////////////9x
AAeIiMzMzMzMzMzMzMzMzMzMzMzMzMzO7ucRFu7nePju7u7v////////////////////////////////
6P/4EAB4iIfMzMzMzMzMzMzMzMzMzMzMzMzMzu7nERBu7nmIiO7oj///////////////////////////
ju7u7o//hwAGiIh8zMzMzMzMzMzMzMzMzMzMzMzMzMzu7nERbu7nmZl5eP//////////////////////
///4iPiO5nj/+HAAaIiIzMzMzMzMzMzMzMzMzMzMzMzMzMzM7u7nERbu7oiZeI//////////////////
////////+ImXd5mP/4cAAHiIh8zMzMzMzMzMzMzMzMzMzMzMzMzMzM7u53ERbu7v////////////////
///////////////4iZl4//hgAAeIiHzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM7u53ERBu7v//////////
//////////////////////////+GAAB4iI7MzMzMzMzMzMzMzMzMzMzMzMzMzMzMzO7uiHEADujv////
///////////////////////////////3AAAGiIh8zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzO7ohwABmP
////////////////////////////////////iREAZniIjMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzuiI
EAB4f///////////////////////////////////+JmZkWZoiIfMzMzMzMzMzMzMzMzMzMzMzMzMzMzM
zO6IhwBo//////////////////////////////////////iImZl2ZoiIzMzMzMzMzMzMzMzMzMzMzMzM
zMzMzMzuiHAA7////////////////////////////////////////4iZFmZ4iHzMzMzMzMzMzMzMzMzM
zMzMzMzMzMzO6IgQBo/////4j///////////////////////////////////mZFmaIiMzMzMzMzMzMzM
zMzMzMzMzMzMzMzMzuiHAA7/////iIiP//////7o//////////////////iI/////4mRZmeIh8zMzMzM
zMzMzMzMzMzMzMzMzMzMzO6IcQBo////+IiIiI/////+7u7u7uiIiI7u7v////iIiI/////5mRZmiIjM
zMzMzMzMzMzMzMzMzMzMzMzMzMzuiHAA7////4iIiIiIj//3d2bu7u7u7u7u7u7//4iIiIiP////+JkW
ZniIfMzMzMzMzMzMzMzMzMzMzMzMzMzO6IcQBo////+IiIiIiI//+ZkAAGZmZmZmZmbv//iIiIiIiP//
//+ZkWZoiIzMzMzMzMzMzMzMzMzMzMzMzMzMzuiFAG7////4iIiIiIj///iZABEREREREBAG7//4iIiI
iIj/////iZFmaIiMzMzMzMzMzMzMzMzMzMzMzMzMzO6IcQBo////+IiIiIiI///4kQARERERERERDo//
+IiIiIiIj/////mZBmeIh8zMzMzMzMzMzMzMzMzMzMzMzMzuiHAG7////4iIiIiIiP//+JFmeHd3d3dx
EW6P//iIiIiIiI/////4mRZmiIfMzMzMzMzMzMzMzMzMzMzMzMzO7ocQBo////+IiIiIiIj///iQZoiO
7u7u5xFu7//4iIiIiIiI////+JkWZniIzMzMzMzMzMzMzMzMzMzMzMzMzuiHEA7////4iIiIiIiP///5
kGaIju7u7ucRbu///4iIiIiIiP////95kGZ4iHzMzMzMzMzMzMzMzMzMzMzMzM7ogQBu////+IiIiIiI
j///+RBmiI7u7u7nEW7v//+IiIiIiIiP////iZFmaIh8zMzMzMzMzMzMzMzMzMzMzMzu6HEAaP////iI
iIiIiI////kQZoiHzMzu5xEO6P//iIiIiIiIj////4mRZmiIjMzMzMzMzMzMzMzMzMzMzMzM7ugRBu//
///4iIiIiIj///+JEGaIh8zM7ucRBu7//4iIiIiIiI/////5kQZniIzMzMzMzMzMzMzMzMzMzMzMzO6I
EAbv////iIiIiIiI////iQBniIzMzO7oERbu///4iIiIiIiP////+JkGZ4iHzMzMzMzMzMzMzMzMzMzM
zMbuhxAGj////4iIiIiIj////3kAaIiMzMzu7nEW7v//+IiIiIiIiP////iZFmaIh8zMzMzMzMzMzMzM
zMzMzMzO7oUQbv////+IiIiIiI////+RBmiIfMzMzu5xFu6P//+IiIiIiIj////4mRZmiIfMzMzMzMzM
zMzMzMzMzMzMzu6BAG7////4iIiIiIj////4kQZoiHzMzM7ucRDu7///iIiIiIiIj////5kQZoiHzMzM
zMzMzMzMzMzMzMzMzM7ocQBu////+IiIiIiI////+JAGeIh8zMzO7nERbu///4iIiIiIiI////95EGaI
h8zMzMzMzMzMzMzMzMzMzMxu6HEA7v////iIiIiIiP////cQBoiIzMzMzu7lEW7v///4iIiIiIiP////
iRBmeIjMzMzMzMzMzMzMzMzMzMzM7uhxBuj////4iIiIiI/////5EAaIiMzMzMbu5xEO7v//+IiIiIiI
j////4kQZniIzMzMzMzMzMzMzMzMzMzMzO7oEQbv////+IiIiIj/////iQBmiIfMzMzM7ucRBu7///iI
iIiIiIj///+JkGZ4iMzMzMzMzMzMzMzMzMzMzMzu6BEG7/////iIiIiI/////4EAaIiHzMzMzO7nERbu
j///iIiIiIiI////iZBmaIh8zMzMzMzMzMzMzMzMzMzM7ucRBu/////4iIiIj/////+RAGiIjMzMzMzu
7nEQ7u////iIiIiIiP///4mQBmiIfMzMzMzMzMzMzMzMzMzMzO7nEAbv////+IiIiP/////4EAZ4iHzM
zMzMzu5xEG7v///4iIiIiIj///+JkAZoiHzMzMzMzMzMxmzMzMzMzMzu5xAO7/////+IiI//////+RAG
iIjMzMzMzM7ucRFu7v///4iIiIiI////+ZAGaIh8zMzMzMzMzMZszMzMzMzG7ocQDu//////+I//////
/4EAZoiIzMzMzMzO7ucRBu7////4iIiIiP////mQBmiIfMzMzMzMzMzGbMzMzMzMzu6HEA7v////////
//////9xAGiIh8zMzMzMzO7nERbu7///+IiIiI/////5kAZoiHzMzMzMzMzMxmzMzMzMzM7uhxAO7///
///////////4EABoiIzMzMzMzMzu7nEQbu////+IiIiP////+ZAGaIh8zMzMzMzMzMZszMzMzMzO7oUQ
Du//////////////9xAGiIh8zMzMzMzM7u5xEW7u/////4iI//////mQBmiIfMzMzMzMzMzGTMzMzMzM
zu6HEA7v/////////////4EABoiIzMzMzMzMzM7u5xEG7v/////////////5kAZoiHzMzMzMzMzMxAzM
zMzMzM7uhxEO7/////////////9wAGiIh8zMzMzMzMzO7ucRFu7v////////////+RAGeIh8zMzMzMzM
zMAGzMzMzMzO7ucRDuj////////////4EAB4iIzMzMzMzMzMzO7ucRBu6P///////////4kQBoiIzMzM
zMzMzMxgBszMzMzMxu7nEQbo////////////gQAGiIh8zMzMzMzMzMzu7nERDu7///////////+JEAaI
iMzMzMzMzMzMYADMzMzMzMzu5xEG7v///////////3EAZ4iIzMzMzMzMzMzMzu7nERbu7///////////
gQBmiIfMzMzMzMzMzAAAbMzMzMzM7ucRBu7///////////gQAGiIh8zMzMzMzMzMzM7u5xEQbu7/////
/////5EAZ4iHzMzMzMzMzMYAAEzMzMzMzO7nERDu7/////////+HAAaIiIzMzMzMzMzMzMzM7u5xEQ7u
7/////////gQAGiIjMzMzMzMzMzEAAAGzMzMzMzu7nEQbuj////////4cAAHiIh8zMzMzMzMzMzMzO7u
dxEW7uj////////3AAZoiHzMzMzMzMzMYAAABMzMzMzM7u5xEG7u////////hgAAeIiHzMzMzMzMzMzM
zMzO7ucREW7u7///////gQAGiIh8zMzMzMzMzEAAAABszMzMzM7ucREG7uj/////hmAAB4iI7MzMzMzM
zMzMzMzMzu7ucREG7u6P////+AAAB4iIzMzMzMzMzMYAAAAATMzMzMzO7ucREG7u7oiO7mAAAHiIiMzM
zMzMzMzMzMzMzMzu7ucREG7u7o//+HYAAHiIh8zMzMzMzMzEAAAAAAbMzMzMzu7nEREG7u7u5mAAAAeI
iIfMzMzMzMzMzMzMzMzMzu7ucREQbu7u7uYAAAeIiHzMzMzMzMzMYAAAAAAAbMzMzMzu7nEREAZmZgAA
AAF4iI58zMzMzMzMzMzMzMzMzMzu7ncREQZm7mZgAAB4iI7MzMzMzMzMxgAAAAAAAEzMzMzM7u7nEREQ
AAAAABF4iI7uzMzMzMzMzMzMzMzMzMzM7u7ucRERAAAAAAAHiIiMzMzMzMzMzMQAAAAAAAAGzMzMzM7u
7nERERERERF3iIju7MzMzMzMzMzMzMzMzMzMzM7u7udREREQAAAReIiIfMzMzMzMzMxgAAAAAAAAAGzM
zMzM7u7udRERERV4iI7u7MzMzMzMzMzMzMzMzMzMzMzM7u7u5xEREREReIiO7MzMzMzMzMzGAAAAAAAA
AAAGzMzMzM7u7u53d3eIiO7u7szMzMzMzMzMzMzMzMzMzMzMzM7u7u7nd1F3eIiO7uzMzMzMzMzMYAAA
AAAAAAAAAGzMzMzM7u7u7u7u7u7u7szMzMzMzMzMzMzMzMzMzMzMzMzMzu7u7u6IiI7u7uzMzMzMzMzM
xgAAAAAAAAAAAAAGzMzMzMzu7u7u7u7u5szMzMzMzMzMzMzMzMzMzMzMzMzMzMzO7u7u7u7u7u7MzMzM
zMzMzGAAAAAAAAAAAAAAAEbMzMzMzG7u7u7ubMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM7u7u7u7uzM
zMzMzMzMzGQAAAAAAAAAAAAAAAAAbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzG7u
7szMzMzMzMzMzMYAAAAAAAAAAAAAAAAAAARszMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM
zMzMzMzMzMzMzMzMzMZAAAAAAAAAAAAAAAAAAAAABGzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM
zMzMzMzMzMzMzMzMzMzMzMZAAAAAAAAAAAAAAAAAAAAAAAAEbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM
zMzMzMzMzMzMzMzMzMzMzMzMzMZAAAAAAAAAAAAAAAAAAAAAAAAAAABmzMzMzMzMzMzMzMzMzMzMzMzM
zMzMzMzMzMzMzMzMzMzMzMzMzMzMzGYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARGZmzMzMzMzMzMzMzM
zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMZmZEAAAAAAAAAAAAAAAAD////+AAAAAAAAAAD/////////AAAA
AAAAAAAAAP//////+AAAAAAAAAAAAAAf/////+AAAAAAAAAAAAAAB/////+AAAAAAAAAAAAAAAH////+
AAAAAAAAAAAAAAAAf////AAAAAAAAAAAAAAAAD////AAAAAAAAAAAAAAAAAP///gAAAAAAAAAAAAAAAA
B///wAAAAAAAAAAAAAAAAAP//4AAAAAAAAAAAAAAAAAB//8AAAAAAAAAAAAAAAAAAP/+AAAAAAAAAAAA
AAAAAAB//gAAAAAAAAAAAAAAAAAAf/wAAAAAAAAAAAAAAAAAAD/4AAAAAAAAAAAAAAAAAAAf+AAAAAAA
AAAAAAAAAAAAH/AAAAAAAAAAAAAAAAAAAA/wAAAAAAAAAAAAAAAAAAAP4AAAAAAAAAAAAAAAAAAAB+AA
AAAAAAAAAAAAAAAAAAfAAAAAAAAAAAAAAAAAAAADwAAAAAAAAAAAAAAAAAAAA8AAAAAAAAAAAAAAAAAA
AAOAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAA
AAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAABAAAAAAAA
AAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAA
AAGAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAA
AAAAAAABgAAAAAAAAAAAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAPAAAAAAAAAAAAAAAAAAAADwAAAAAAA
AAAAAAAAAAAAA+AAAAAAAAAAAAAAAAAAAAfgAAAAAAAAAAAAAAAAAAAH8AAAAAAAAAAAAAAAAAAAD/AA
AAAAAAAAAAAAAAAAAA/4AAAAAAAAAAAAAAAAAAAf+AAAAAAAAAAAAAAAAAAAH/wAAAAAAAAAAAAAAAAA
AD/+AAAAAAAAAAAAAAAAAAB//gAAAAAAAAAAAAAAAAAAf/8AAAAAAAAAAAAAAAAAAP//gAAAAAAAAAAA
AAAAAAH//8AAAAAAAAAAAAAAAAAD///gAAAAAAAAAAAAAAAAB///8AAAAAAAAAAAAAAAAA////wAAAAA
AAAAAAAAAAA////+AAAAAAAAAAAAAAAAf////4AAAAAAAAAAAAAAAf/////gAAAAAAAAAAAAAAf/////
+AAAAAAAAAAAAAAf//////8AAAAAAAAAAAAA/////////gAAAAAAAAAAf////w==
</value>
</data>
</root>
@@ -0,0 +1,296 @@
namespace LittleRabbit.LittleRabbitForms.SalesCenterForms
{
partial class CouponShopForm
{
/// <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.components = new System.ComponentModel.Container();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.dgvProduct = new LittleRabbit.UserComponent.DataGridViewEx();
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
this.编辑ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.label1 = new System.Windows.Forms.Label();
this.statusBar = new LittleRabbit.UserControls.StatusBarUserControl();
this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.colProductId = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colProductName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colSales = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colPrice = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colCreateTime = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colOrderCount = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colShowCount = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colShowPeopleCount = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colClickCount = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colClickPeopleCount = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colMessage = new System.Windows.Forms.DataGridViewTextBoxColumn();
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit();
this.splitContainer2.Panel1.SuspendLayout();
this.splitContainer2.Panel2.SuspendLayout();
this.splitContainer2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvProduct)).BeginInit();
this.contextMenuStrip1.SuspendLayout();
this.SuspendLayout();
//
// splitContainer2
//
this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
this.splitContainer2.Location = new System.Drawing.Point(0, 0);
this.splitContainer2.Name = "splitContainer2";
this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer2.Panel1
//
this.splitContainer2.Panel1.Controls.Add(this.dgvProduct);
this.splitContainer2.Panel1.Padding = new System.Windows.Forms.Padding(4, 4, 4, 0);
//
// splitContainer2.Panel2
//
this.splitContainer2.Panel2.Controls.Add(this.label1);
this.splitContainer2.Panel2.Controls.Add(this.statusBar);
this.splitContainer2.Size = new System.Drawing.Size(1201, 634);
this.splitContainer2.SplitterDistance = 604;
this.splitContainer2.TabIndex = 9;
//
// dgvProduct
//
this.dgvProduct.AllowUserToAddRows = false;
this.dgvProduct.AllowUserToDeleteRows = false;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
this.dgvProduct.BackgroundColor = System.Drawing.Color.White;
this.dgvProduct.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
this.dgvProduct.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvProduct.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colSelect,
this.colProductId,
this.colProductName,
this.colSales,
this.colPrice,
this.colCreateTime,
this.colOrderCount,
this.colShowCount,
this.colShowPeopleCount,
this.colClickCount,
this.colClickPeopleCount,
this.colMessage});
this.dgvProduct.ContextMenuStrip = this.contextMenuStrip1;
this.dgvProduct.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvProduct.Location = new System.Drawing.Point(4, 4);
this.dgvProduct.Name = "dgvProduct";
this.dgvProduct.ReadOnly = true;
dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.dgvProduct.RowsDefaultCellStyle = dataGridViewCellStyle3;
this.dgvProduct.RowTemplate.Height = 23;
this.dgvProduct.Size = new System.Drawing.Size(1193, 600);
this.dgvProduct.TabIndex = 6;
this.dgvProduct.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvProduct_CellContentClick);
this.dgvProduct.CellMouseDown += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.dgvProduct_CellMouseDown);
this.dgvProduct.CellMouseEnter += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvProduct_CellMouseEnter);
this.dgvProduct.CellMouseUp += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.dgvProduct_CellMouseUp);
//
// contextMenuStrip1
//
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.编辑ToolStripMenuItem});
this.contextMenuStrip1.Name = "contextMenuStrip1";
this.contextMenuStrip1.Size = new System.Drawing.Size(209, 26);
//
// 编辑ToolStripMenuItem
//
this.编辑ToolStripMenuItem.Name = "编辑ToolStripMenuItem";
this.编辑ToolStripMenuItem.Size = new System.Drawing.Size(208, 22);
this.编辑ToolStripMenuItem.Text = "选中商品批量设置优惠券";
this.编辑ToolStripMenuItem.Click += new System.EventHandler(this.编辑ToolStripMenuItem_Click);
//
// label1
//
this.label1.AutoSize = true;
this.label1.ForeColor = System.Drawing.Color.MidnightBlue;
this.label1.Location = new System.Drawing.Point(656, 2);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(43, 17);
this.label1.TabIndex = 3;
this.label1.Text = "label1";
//
// statusBar
//
this.statusBar.BackColor = System.Drawing.Color.White;
this.statusBar.Dock = System.Windows.Forms.DockStyle.Fill;
this.statusBar.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.statusBar.Location = new System.Drawing.Point(0, 0);
this.statusBar.Margin = new System.Windows.Forms.Padding(0);
this.statusBar.Name = "statusBar";
this.statusBar.Size = new System.Drawing.Size(1201, 26);
this.statusBar.TabIndex = 2;
//
// colSelect
//
this.colSelect.FillWeight = 50F;
this.colSelect.HeaderText = "选";
this.colSelect.Name = "colSelect";
this.colSelect.ReadOnly = true;
this.colSelect.Resizable = System.Windows.Forms.DataGridViewTriState.False;
this.colSelect.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colSelect.Width = 41;
//
// colProductId
//
this.colProductId.HeaderText = "商品Id";
this.colProductId.Name = "colProductId";
this.colProductId.ReadOnly = true;
this.colProductId.Width = 150;
//
// colProductName
//
this.colProductName.HeaderText = "商品名称";
this.colProductName.Name = "colProductName";
this.colProductName.ReadOnly = true;
this.colProductName.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colProductName.Width = 250;
//
// colSales
//
this.colSales.HeaderText = "销量";
this.colSales.Name = "colSales";
this.colSales.ReadOnly = true;
this.colSales.Width = 60;
//
// colPrice
//
this.colPrice.HeaderText = "价格";
this.colPrice.Name = "colPrice";
this.colPrice.ReadOnly = true;
this.colPrice.Width = 60;
//
// colCreateTime
//
this.colCreateTime.HeaderText = "创建时间";
this.colCreateTime.Name = "colCreateTime";
this.colCreateTime.ReadOnly = true;
//
// colOrderCount
//
this.colOrderCount.HeaderText = "成交订单数";
this.colOrderCount.Name = "colOrderCount";
this.colOrderCount.ReadOnly = true;
this.colOrderCount.Visible = false;
this.colOrderCount.Width = 90;
//
// colShowCount
//
this.colShowCount.HeaderText = "商品曝光次数";
this.colShowCount.Name = "colShowCount";
this.colShowCount.ReadOnly = true;
this.colShowCount.Visible = false;
this.colShowCount.Width = 90;
//
// colShowPeopleCount
//
this.colShowPeopleCount.HeaderText = "商品曝光人数";
this.colShowPeopleCount.Name = "colShowPeopleCount";
this.colShowPeopleCount.ReadOnly = true;
this.colShowPeopleCount.Visible = false;
this.colShowPeopleCount.Width = 90;
//
// colClickCount
//
this.colClickCount.HeaderText = "商品点击次数";
this.colClickCount.Name = "colClickCount";
this.colClickCount.ReadOnly = true;
this.colClickCount.Visible = false;
this.colClickCount.Width = 90;
//
// colClickPeopleCount
//
this.colClickPeopleCount.HeaderText = "商品点击人数";
this.colClickPeopleCount.Name = "colClickPeopleCount";
this.colClickPeopleCount.ReadOnly = true;
this.colClickPeopleCount.Visible = false;
this.colClickPeopleCount.Width = 90;
//
// colMessage
//
this.colMessage.HeaderText = "消息";
this.colMessage.Name = "colMessage";
this.colMessage.ReadOnly = true;
this.colMessage.Width = 200;
//
// CouponShopForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(1201, 634);
this.Controls.Add(this.splitContainer2);
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Name = "CouponShopForm";
this.Text = "CouponShopForm";
this.Load += new System.EventHandler(this.CouponShopForm_Load);
this.splitContainer2.Panel1.ResumeLayout(false);
this.splitContainer2.Panel2.ResumeLayout(false);
this.splitContainer2.Panel2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
this.splitContainer2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dgvProduct)).EndInit();
this.contextMenuStrip1.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.SplitContainer splitContainer2;
private UserComponent.DataGridViewEx dgvProduct;
private System.Windows.Forms.Label label1;
private UserControls.StatusBarUserControl statusBar;
private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
private System.Windows.Forms.ToolStripMenuItem 编辑ToolStripMenuItem;
private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect;
private System.Windows.Forms.DataGridViewTextBoxColumn colProductId;
private System.Windows.Forms.DataGridViewTextBoxColumn colProductName;
private System.Windows.Forms.DataGridViewTextBoxColumn colSales;
private System.Windows.Forms.DataGridViewTextBoxColumn colPrice;
private System.Windows.Forms.DataGridViewTextBoxColumn colCreateTime;
private System.Windows.Forms.DataGridViewTextBoxColumn colOrderCount;
private System.Windows.Forms.DataGridViewTextBoxColumn colShowCount;
private System.Windows.Forms.DataGridViewTextBoxColumn colShowPeopleCount;
private System.Windows.Forms.DataGridViewTextBoxColumn colClickCount;
private System.Windows.Forms.DataGridViewTextBoxColumn colClickPeopleCount;
private System.Windows.Forms.DataGridViewTextBoxColumn colMessage;
}
}
@@ -0,0 +1,518 @@
using AllBase;
using AllBase.Extension;
using AllBase.Helper;
using AllBase.Model.Result;
using LittleRabbit.Extension;
using LittleRabbit.LittleRabbitForms.BaseForms;
using NaiBa.Util.Extension;
using Newtonsoft.Json.Linq;
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 Work.BLL.Product;
namespace LittleRabbit.LittleRabbitForms.SalesCenterForms
{
public partial class CouponShopForm : Form
{
private CheckBox chkSelectAll = null;
DouShopLoginInfo shop = null;
public CouponForm couponForm = null;
public bool isGetProductSalesSuccess = false;
public Dictionary<string, int> dicProductSales = new Dictionary<string, int>();
public List<DouProductWithSalesListInfo> productList = new List<DouProductWithSalesListInfo>();
public CouponShopForm(DouShopLoginInfo _shop)
{
InitializeComponent();
shop = _shop;
}
private void CouponShopForm_Load(object sender, EventArgs e)
{
chkSelectAll = dgvProduct.Columns["colSelect"].AddHeaderCheckBox(HorizontalAlignment.Center, 0, 0, null, null, false);
dgvProduct.Columns["colSelect"].HeaderText = "";
chkSelectAll.Width = chkSelectAll.Height = 13;
chkSelectAll.CheckedChanged += chkSelectAll_CheckedChanged;
}
private void chkSelectAll_CheckedChanged(object sender, EventArgs e)
{
if (!chkSelectAll.Checked)
{
foreach (DataGridViewRow row in dgvProduct.Rows)
{
row.Cells["colSelect"].Value = false;
}
}
else
{
foreach (DataGridViewRow row in dgvProduct.Rows)
{
row.Cells["colSelect"].Value = true;
}
}
}
public void GetProduct(decimal priceMin, decimal priceMax, int salesMin, int salesMax, List<string> productName = null, List<string> filterWords = null)
{
if (shop == null)
return;
ShowVisitorMessage("");
foreach (DataGridViewRow r in this.dgvProduct.Rows)
{
r.Cells["colSales"].Value = "获取中";
}
foreach (var p in productList)
{
p.sell_num = null;
}
List<Task> tList = new List<Task>();
var t1 = Task.Run(() =>
{
int page = 0;
int pageSize = 100;
int totalNum = 99999;
while (page < 100)
{
if (couponForm == null || couponForm.cancellationTokenSource.IsCancellationRequested)
break;
page++;
var html = new ShopProductBLL().GetShopProductListData(shop, 0, page, pageSize);
//测试查找商品详情
//Work.DouyinApiClass.DouyinApi api = new Work.DouyinApiClass.DouyinApi(shop);
//api.JsonData = new Dictionary<string, string>();
//api.JsonData["product_id"] = "3558439046600598747";
//var detail = api.GetProductDetail();
while (!html.Contains("\"code\":10000"))
{
Thread.Sleep(1000);
html = new ShopProductBLL().GetShopProductListData(shop, 0, page, pageSize);
}
totalNum = BaseRegex.GetIntJson(ref html, "total");
try
{
JObject jObj = JObject.Parse(html);
var jObjDataStr = jObj["data"]?["data"]?.ToString();
if (!string.IsNullOrEmpty(jObjDataStr))
{
var addList = JsonHelper.DeserializeJsonToList<DouProductWithSalesListInfo>(jObjDataStr);
if (addList != null)
{
// 有关键词或商品id的,过滤符合关键词
if (productName != null && productName.Any())
addList = addList.Where(p => productName.Any(n => p.name.Contains(n) || p.product_id.ToString().Contains(n))).ToList();
if (filterWords != null && filterWords.Any())
addList = addList.Where(p => !filterWords.Any(f => p.name.Contains(f) || p.product_id.ToString().Contains(f))).ToList();
productList.AddRange(addList);
productList = productList.DistinctBy(p => p.product_id).ToList();
}
foreach (var prod in addList)
{
var row = dgvProduct.Rows.Cast<DataGridViewRow>().FirstOrDefault(r => r.Cells["colProductId"].Value.ToString() == prod.product_id.ToString());
Invoke(new Action(() =>
{
if (row == null)
{
dgvProduct.Rows.Add(
false,
prod.product_id,
prod.name,
"获取中",
prod.discount_price / 100,
BaseClass.StampToDateTime((int)prod.create_time));
}
else
{
row.Cells["colSales"].Value = "获取中";
row.Cells["colPrice"].Value = prod.discount_price / 100;
row.Cells["colCreateTime"].Value = BaseClass.StampToDateTime((int)prod.create_time);
}
}));
}
}
var totalPage = Math.Ceiling(totalNum / (pageSize * 1M));
var message = "已获取:" + page + "页,共" + Math.Ceiling(totalNum / (pageSize * 1M)) + "页,商品获取中...";
Invoke(new Action(() =>
{
this.statusBar.lblTaskStatus.Text = message;
this.statusBar.pgbTaskProgress.Value = page;
this.statusBar.pgbTaskProgress.Text = page + "/" + totalPage;
this.statusBar.pgbTaskProgress.Maximum = (int)totalPage;
}));
}
catch (Exception ex)
{
BaseMsgForm.ShowError("获取商品发生错误:" + ex.Message);
}
if (page * pageSize >= totalNum)
break;
}
});
tList.Add(t1);
if (ShopForms.ShopListForm.Instance == null)
ShopForms.ShopListForm.Instance = new ShopForms.ShopListForm();
ShopForms.ShopListForm.Instance.CheckShopLogin(new string[] { shop.ShopAccount }, false);
var t2 = Task.Run(() =>
{
if (shop.LoginStatus == "登录成功")
couponForm.GetSales(this.shop);
var rowsTemp = dgvProduct.Rows.Cast<DataGridViewRow>().ToList();
rowsTemp.Reverse();
foreach (var r in rowsTemp)
{
try
{
if (r.Cells["colPrice"].Value.ParseToDecimal() < priceMin || r.Cells["colPrice"].Value.ParseToDecimal() > priceMax
|| r.Cells["colSales"].Value.ParseToDecimal() < salesMin || r.Cells["colSales"].Value.ParseToDecimal() > salesMax
|| (productName?.Count > 0 && !productName.Any(n => r.Cells["colProductName"].Value.ToString().Contains(n) || r.Cells["colProductId"].Value.ToString().Contains(n)))
|| (filterWords?.Count > 0 && filterWords.Any(f => r.Cells["colProductName"].Value.ToString().Contains(f) || r.Cells["colProductId"].Value.ToString().Contains(f))))
{
Invoke(new Action(() =>
{
dgvProduct.Rows.Remove(r);
}));
}
}
catch (Exception ex)
{
}
}
});
tList.Add(t2);
t2.Wait();
SetSalesCount();
//SetVisitorCount();
productList = productList.Where(p => p.discount_price >= priceMin && p.discount_price <= priceMax && p.sell_num >= salesMin && p.sell_num <= salesMax
&& (productName?.Count > 0 == false || productName.Any(n => p.name.Contains(n) || p.product_id.ToString().Contains(n)))
&& (filterWords?.Count > 0 == false || !filterWords.Any(f => p.name.Contains(f) || p.product_id.ToString().Contains(f)))).ToList();
Invoke(new Action(() =>
{
if (couponForm == null || couponForm.cancellationTokenSource.IsCancellationRequested)
{
this.statusBar.lblTaskStatus.Text = "获取中断";
}
else
{
this.statusBar.lblTaskStatus.Text = "获取完成";
}
this.statusBar.pgbTaskProgress.Value = 0;
this.statusBar.pgbTaskProgress.Text = 0 + "/" + 0;
this.statusBar.pgbTaskProgress.Maximum = 0;
}));
var errMsg = "";
if (shop.LoginStatus != "登录成功")
errMsg += " 店铺掉线,请重新登录!";
if (shop.ApiAuthStatus != "授权成功")
errMsg += " 授权过期,请重新授权!";
ShowVisitorMessage(errMsg);
}
public void ShowVisitorMessage(string msg)
{
Invoke(new Action(() => { this.label1.Text = msg; }));
}
public void SetSalesCount()
{
foreach (var key in dicProductSales.Keys)
{
var row = this.dgvProduct.Rows.Cast<DataGridViewRow>().FirstOrDefault(r => r.Cells["colProductId"].Value.ToString() == key);
if (row != null)
{
Invoke(new Action(() =>
{
row.Cells["colSales"].Value = dicProductSales[key];
}));
}
var product = this.productList.Find(p => p.product_id.ToString() == key);
if (product != null)
product.sell_num = dicProductSales[key];
}
foreach (DataGridViewRow row in dgvProduct.Rows)
{
if (row.Cells["colSales"].Value.ToString() == "获取中")
{
Invoke(new Action(() =>
{
if (isGetProductSalesSuccess)
{
row.Cells["colSales"].Value = 0;
}
else
{
row.Cells["colSales"].Value = "获取失败";
}
}));
}
}
if (isGetProductSalesSuccess)
{
foreach (var prod in this.productList)
{
if (prod.sell_num == null)
prod.sell_num = 0;
}
}
}
private void dgvProduct_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
if (e.ColumnIndex < 0 || e.RowIndex < 0)
return;
string headerText = dgvProduct.Columns[e.ColumnIndex].HeaderText;
string columnName = dgvProduct.Columns[e.ColumnIndex].Name;
var row = dgvProduct.Rows[e.RowIndex];
switch (columnName)
{
case "colSelect":
//row.Cells["colSelect"].Value = !row.Cells["colSelect"].Value.ParseToBool();
//chkSelectAll.CheckedChanged -= chkSelectAll_CheckedChanged;
//if (dgvProduct.Rows.Cast<DataGridViewRow>().All(r => r.Cells["colSelect"].Value.ParseToBool()))
// chkSelectAll.Checked = true;
//else
// chkSelectAll.Checked = false;
//chkSelectAll.CheckedChanged += chkSelectAll_CheckedChanged;
break;
}
}
bool isSelecting = false;
bool isCheck = true;
private void dgvProduct_CellMouseDown(object sender, DataGridViewCellMouseEventArgs e)
{
if (e.ColumnIndex < 0 || e.RowIndex < 0)
return;
var columnName = dgvProduct.Columns[e.ColumnIndex].Name;
if (MouseButtons == MouseButtons.Left)
{
if (columnName == "colSelect")
{
dgvProduct.Rows[e.RowIndex].Cells["colSelect"].Value = !dgvProduct.Rows[e.RowIndex].Cells["colSelect"].Value.ParseToBool();
isSelecting = true;
isCheck = dgvProduct.Rows[e.RowIndex].Cells["colSelect"].Value.ParseToBool();
chkSelectAll.CheckedChanged -= chkSelectAll_CheckedChanged;
if (dgvProduct.Rows.Cast<DataGridViewRow>().All(r => r.Cells["colSelect"].Value.ParseToBool()))
chkSelectAll.Checked = true;
else
chkSelectAll.Checked = false;
chkSelectAll.CheckedChanged += chkSelectAll_CheckedChanged;
}
}
}
private void dgvProduct_CellMouseUp(object sender, DataGridViewCellMouseEventArgs e)
{
isSelecting = false;
}
private void dgvProduct_CellMouseEnter(object sender, DataGridViewCellEventArgs e)
{
if (e.ColumnIndex < 0 || e.RowIndex < 0)
return;
var row = dgvProduct.Rows[e.RowIndex];
if (MouseButtons == MouseButtons.Left)
{
var columnName = dgvProduct.Columns[e.ColumnIndex].Name;
if (isSelecting)
{
dgvProduct.Rows[e.RowIndex].Cells["colSelect"].Value = isCheck;
chkSelectAll.CheckedChanged -= chkSelectAll_CheckedChanged;
if (dgvProduct.Rows.Cast<DataGridViewRow>().All(r => r.Cells["colSelect"].Value.ParseToBool()))
chkSelectAll.Checked = true;
else
chkSelectAll.Checked = false;
chkSelectAll.CheckedChanged += chkSelectAll_CheckedChanged;
}
}
}
public string SetCoupon(int periodType,
int favouredType,
long startApplyStamps,
long endApplyStamps,
long startUseStamps,
long endUseStamps,
int validDays,
int totalCount,
int countLimit,
decimal discount, // (折扣券的)折扣
int threshold, // 满x元
int credit, // 减x元
bool ignore,
bool oneProductEachCoupon,
string couponName = "")
{
List<DataGridViewRow> rows = this.dgvProduct.Rows.Cast<DataGridViewRow>().Where(r => r.Cells["colSelect"].Value?.ParseToBool() == true).ToList();
var goodsIdList = rows.Select(r => r.Cells["colProductId"].Value?.ToString()).ToList();
var goodsIds = "\"" + string.Join("\",\"", goodsIdList) + "\"";
if (!oneProductEachCoupon)
{
var goodsIdListTemp = new List<string>();
goodsIdListTemp.AddRange(goodsIdList);
goodsIdList.Clear();
int numCount = 0;
goodsIds = "";
foreach (var goodsId in goodsIdListTemp)
{
numCount++;
goodsIds += "\"" + goodsId + "\",";
if (numCount % 200 == 0 || numCount >= goodsIdListTemp.Count)
{
goodsIdList.Add(goodsIds.Trim(','));
goodsIds = "";
}
}
}
if (string.IsNullOrEmpty(couponName))
couponName = DateTime.Now.ToString("yyMMddHHmm");
string setResult = "";
foreach (var id in goodsIdList)
{
// 指定商品折扣券
//string body = @"{""support_type"":4,""shop_omp_activity_id"":"""",""channel"":3,""coupon_name"":""优惠123"",""period_type"":2,""ignore"":false,""favoured_type"":41,""total_amount"":13,""max_apply_times"":1,""valid_period"":""3"",""discount"":95,""goods"":[""3552987839555832450"",""3552273829277663255"",""3552271209347574338""],""start_apply_time"":1654531200,""end_apply_time"":1654617599,""jump_type"":4}";
//string body = @"{""support_type"":4,""shop_omp_activity_id"":""7086106181462163749"",""shop_omp_activity_type"":8,""channel"":3,""coupon_name"":""111"",""period_type"":1,""ignore"":false,""favoured_type"":41,""total_amount"":1,""max_apply_times"":1,""goods"":[""3554315317469660534"",""3553784680702692298""],""discount"":90,""start_time"":1655395200,""expire_time"":1655481599,""start_apply_time"":1655395200,""end_apply_time"":1655481599,""jump_type"":4}";
// 指定商品直减券
//string body = @"{""support_type"":4,""shop_omp_activity_id"":""7086106181462163749"",""shop_omp_activity_type"":8,""channel"":3,""coupon_name"":""2131"",""period_type"":1,""ignore"":false,""favoured_type"":42,""total_amount"":1,""max_apply_times"":1,""goods"":[""3557115286081690584""],""credit"":200,""start_time"":1657123200,""expire_time"":1657209599,""start_apply_time"":1657123200,""end_apply_time"":1657209599,""jump_type"":2,""jump_product_id"":""3557115286081690584""}";
//string body = @"{""support_type"":4,""shop_omp_activity_id"":""7086106181462163749"",""shop_omp_activity_type"":8,""channel"":3,""coupon_name"":""1223"",""period_type"":1,""ignore"":false,""favoured_type"":42,""total_amount"":1,""max_apply_times"":1,""goods"":[""3554511661782200678""],""credit"":200,""start_time"":1657123200,""expire_time"":1657209599,""start_apply_time"":1657123200,""end_apply_time"":1657209599,""jump_type"":2,""jump_product_id"":""3554511661782200678""}";
//string body = @"{""support_type"":4,""shop_omp_activity_id"":""7086106181462163749"",""shop_omp_activity_type"":8,""channel"":3,""coupon_name"":""2311"",""period_type"":1,""ignore"":false,""favoured_type"":42,""total_amount"":1,""max_apply_times"":1,""goods"":[""3554333221040862310"",""3554511661782200678""],""credit"":200,""start_time"":1657123200,""expire_time"":1657209599,""start_apply_time"":1657123200,""end_apply_time"":1657209599,""jump_type"":4}";
// 指定商品满减券
//string body = @"{""support_type"":4,""shop_omp_activity_id"":""7086106181462163749"",""shop_omp_activity_type"":8,""channel"":3,""coupon_name"":""1ad"",""period_type"":1,""ignore"":false,""favoured_type"":43,""total_amount"":1,""max_apply_times"":1,""goods"":[""3556136493124815095"",""3558423829472753852""],""threshold"":9900,""credit"":1100,""start_time"":1657123200,""expire_time"":1657209599,""start_apply_time"":1657123200,""end_apply_time"":1657209599,""jump_type"":4}";
string body = "{\"support_type\":4," +
"\"shop_omp_activity_id\":\"\"," +
"\"channel\":3," +
"\"coupon_name\":\"" + couponName + "\"," + // 优惠券名称
"\"period_type\":" + periodType + "," + // 使用时间 1=限制日期范围 2=限制有效天数
"\"ignore\":" + ignore.ToString().ToLower() + "," + // 价格风险预警 true=不计入 false=计入
"\"favoured_type\":" + favouredType + "," + // 优惠内容 41=指定商品折扣券 42=指定商品直减券 43=指定商品满减券
"\"total_amount\":" + totalCount + "," + // 发放量
"\"max_apply_times\":" + countLimit + ","; // 每人限领
if (periodType == 2)
body += "\"valid_period\":\"" + validDays + "\","; // 有效期天数
if (periodType == 1)
{
body += "\"start_time\":" + startUseStamps + ","; // 开始日期
body += "\"expire_time\":" + endUseStamps + ","; // 结束日期
}
if (favouredType == 41)
{
body += "\"discount\":" + (int)(10 * discount) + ","; // 折扣
}
else if (favouredType == 42)
{
body += "\"credit\":" + 100 * credit + ","; // 减x元 单位分
}
else if (favouredType == 43)
{
body += "\"threshold\":" + 100 * threshold + ","; // 满x元 单位分
body += "\"credit\":" + 100 * credit + ","; // 减x元 单位分
}
body += "\"goods\":[" + id + "]," + // 商品编号
"\"start_apply_time\":" + startApplyStamps + "," + // 领取开始时间
"\"end_apply_time\":" + endApplyStamps + "," + // 领取结束时间
"\"jump_type\":4}";
string url = "https://fxg.jinritemai.com/marketing/coupons/v1/check?_bid=ecom_market_shop&appid=1&_=" + BaseClass.DateTimeToTimestampSeconds(DateTime.Now);
string referer = "https://fxg.jinritemai.com/market/center/coupon/detail?type=4";
CommonSimRequest simRequest = new CommonSimRequest();
simRequest.Accept = "application/json, text/plain, */*";
simRequest.ContentType = "application/json";
var result = simRequest.Request_Post(url, referer, new Dictionary<string, string>(), shop.Cookies, body);
if (!result.Contains("成功") && !result.Contains("Gateway Timeout"))
{
foreach (DataGridViewRow row in rows)
{
if (id.Contains(row.Cells["colProductId"].Value.ToString()))
Invoke(new Action(() => { row.Cells["colMessage"].Value = "优惠券 " + couponName + " 规则校验失败,无法设置。"; }));
}
setResult += id + "|error^";
continue;
}
if ("18565722666|13928836672,18565722666,13928836672,18937517772,18135637272,18888888888".Contains(BaseClass.UserName))
Thread.Sleep(Randomx.GetId(10, 20));
else
Thread.Sleep(Randomx.GetId(100, 500));
url = "https://fxg.jinritemai.com/marketing/coupons/v1/shopcoupons?_bid=ecom_market_shop&appid=1&_=" + BaseClass.DateTimeToTimestampSeconds(DateTime.Now);
result = simRequest.Request_Post(url, referer, new Dictionary<string, string>(), shop.Cookies, body);
if (!result.Contains("成功"))
{
var msg = BaseRegex.GetStringJson(ref result, "msg");
foreach (DataGridViewRow row in rows)
{
if (id.Contains(row.Cells["colProductId"].Value.ToString()))
Invoke(new Action(() => { row.Cells["colMessage"].Value = "优惠券 " + couponName + " 设置失败。" + msg; }));
}
setResult += id + "|error^";
continue;
}
foreach (DataGridViewRow row in rows)
{
if (id.Contains(row.Cells["colProductId"].Value.ToString()))
Invoke(new Action(() => { row.Cells["colMessage"].Value = "优惠券 " + couponName + " 设置成功。"; }));
}
setResult += id + "|success^";
if (goodsIdList.Count > 1)
{
if ("18565722666|13928836672,18565722666,13928836672,18937517772,18135637272,18888888888".Contains(BaseClass.UserName))
Thread.Sleep(Randomx.GetId(50, 150));
else
Thread.Sleep(Randomx.GetId(200, 700));
}
}
return setResult;
}
private void 编辑ToolStripMenuItem_Click(object sender, EventArgs e)
{
List<DataGridViewRow> rows = this.dgvProduct.Rows.Cast<DataGridViewRow>().Where(r => r.Cells["colSelect"].Value?.ParseToBool() == true).ToList();
var goodsIdList = rows.Select(r => r.Cells["colProductId"].Value?.ToString()).ToList();
var goodsIds = "\"" + string.Join("\",\"", goodsIdList) + "\"";
CouponMulitAddForm form = new CouponMulitAddForm();
form.couponShopForm = this;
form.Show();
}
public void ClearData()
{
this.dgvProduct.Rows.Clear();
this.productList.Clear();
}
}
}
@@ -0,0 +1,159 @@
<?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="colSelect.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colProductId.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colProductName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colSales.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colPrice.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colCreateTime.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colOrderCount.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colShowCount.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colShowPeopleCount.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colClickCount.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colClickPeopleCount.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colMessage.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>
@@ -0,0 +1,293 @@
namespace LittleRabbit.LittleRabbitForms.SalesCenterForms
{
partial class DouProductProPromotionListSkuInfoForm
{
/// <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.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.colSkuId = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colSku = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colOldPrice = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colSetPrice = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colNowStock = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colActiveStock = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colLimited = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colMessage = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.btnSave = new DevComponents.DotNetBar.PanelEx();
this.panel6 = new System.Windows.Forms.Panel();
this.cmbLimit = new DevComponents.DotNetBar.Controls.ComboBoxEx();
this.lblLimit = new System.Windows.Forms.Label();
this.panel5 = new System.Windows.Forms.Panel();
this.txtStock = new System.Windows.Forms.TextBox();
this.lblStock = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit();
this.splitContainer2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.panel6.SuspendLayout();
this.panel5.SuspendLayout();
this.SuspendLayout();
//
// splitContainer2
//
this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
this.splitContainer2.Location = new System.Drawing.Point(0, 0);
this.splitContainer2.Name = "splitContainer2";
this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer2.Panel1
//
this.splitContainer2.Panel1.Padding = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.splitContainer2.Size = new System.Drawing.Size(1084, 521);
this.splitContainer2.SplitterDistance = 492;
this.splitContainer2.TabIndex = 10;
//
// colSelect
//
this.colSelect.FillWeight = 50F;
this.colSelect.HeaderText = "选择";
this.colSelect.Name = "colSelect";
this.colSelect.ReadOnly = true;
this.colSelect.Resizable = System.Windows.Forms.DataGridViewTriState.False;
this.colSelect.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colSelect.Width = 45;
//
// colSkuId
//
this.colSkuId.HeaderText = "SkuId";
this.colSkuId.Name = "colSkuId";
this.colSkuId.ReadOnly = true;
this.colSkuId.Visible = false;
this.colSkuId.Width = 150;
//
// colSku
//
this.colSku.HeaderText = "SKU";
this.colSku.Name = "colSku";
this.colSku.ReadOnly = true;
this.colSku.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colSku.Width = 300;
//
// colOldPrice
//
this.colOldPrice.HeaderText = "原价";
this.colOldPrice.Name = "colOldPrice";
this.colOldPrice.ReadOnly = true;
this.colOldPrice.Width = 90;
//
// colSetPrice
//
this.colSetPrice.HeaderText = "打折";
this.colSetPrice.Name = "colSetPrice";
this.colSetPrice.ReadOnly = true;
this.colSetPrice.Width = 80;
//
// colNowStock
//
this.colNowStock.HeaderText = "当前库存";
this.colNowStock.Name = "colNowStock";
this.colNowStock.ReadOnly = true;
this.colNowStock.Width = 90;
//
// colActiveStock
//
this.colActiveStock.HeaderText = "活动库存";
this.colActiveStock.Name = "colActiveStock";
this.colActiveStock.ReadOnly = true;
this.colActiveStock.Width = 80;
//
// colLimited
//
this.colLimited.HeaderText = "每人限购";
this.colLimited.Name = "colLimited";
this.colLimited.ReadOnly = true;
this.colLimited.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colLimited.Width = 80;
//
// colMessage
//
this.colMessage.HeaderText = "消息提示";
this.colMessage.Name = "colMessage";
this.colMessage.ReadOnly = true;
this.colMessage.Width = 200;
//
// splitContainer1
//
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
this.splitContainer1.Name = "splitContainer1";
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.btnSave);
this.splitContainer1.Panel1.Controls.Add(this.panel6);
this.splitContainer1.Panel1.Controls.Add(this.lblLimit);
this.splitContainer1.Panel1.Controls.Add(this.panel5);
this.splitContainer1.Panel1.Controls.Add(this.lblStock);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.splitContainer2);
this.splitContainer1.Size = new System.Drawing.Size(1084, 561);
this.splitContainer1.SplitterDistance = 36;
this.splitContainer1.TabIndex = 12;
//
// btnSave
//
this.btnSave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)));
this.btnSave.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnSave.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnSave.DisabledBackColor = System.Drawing.Color.Empty;
this.btnSave.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSave.Location = new System.Drawing.Point(654, 7);
this.btnSave.Name = "btnSave";
this.btnSave.Size = new System.Drawing.Size(80, 23);
this.btnSave.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnSave.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnSave.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnSave.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnSave.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnSave.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnSave.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnSave.Style.GradientAngle = 90;
this.btnSave.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnSave.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnSave.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnSave.TabIndex = 561;
this.btnSave.Text = "保存";
this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
//
// panel6
//
this.panel6.Controls.Add(this.cmbLimit);
this.panel6.Location = new System.Drawing.Point(476, 6);
this.panel6.Name = "panel6";
this.panel6.Size = new System.Drawing.Size(60, 24);
this.panel6.TabIndex = 547;
//
// cmbLimit
//
this.cmbLimit.DisplayMember = "Text";
this.cmbLimit.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.cmbLimit.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbLimit.FormattingEnabled = true;
this.cmbLimit.ItemHeight = 18;
this.cmbLimit.Location = new System.Drawing.Point(0, 0);
this.cmbLimit.Name = "cmbLimit";
this.cmbLimit.Size = new System.Drawing.Size(57, 24);
this.cmbLimit.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.cmbLimit.TabIndex = 520;
//
// lblLimit
//
this.lblLimit.AutoSize = true;
this.lblLimit.Location = new System.Drawing.Point(421, 13);
this.lblLimit.Name = "lblLimit";
this.lblLimit.Size = new System.Drawing.Size(53, 12);
this.lblLimit.TabIndex = 546;
this.lblLimit.Text = "每人限购";
//
// panel5
//
this.panel5.Controls.Add(this.txtStock);
this.panel5.Location = new System.Drawing.Point(322, 8);
this.panel5.Name = "panel5";
this.panel5.Size = new System.Drawing.Size(82, 21);
this.panel5.TabIndex = 543;
//
// txtStock
//
this.txtStock.Location = new System.Drawing.Point(0, 0);
this.txtStock.Name = "txtStock";
this.txtStock.Size = new System.Drawing.Size(80, 21);
this.txtStock.TabIndex = 481;
//
// lblStock
//
this.lblStock.AutoSize = true;
this.lblStock.Location = new System.Drawing.Point(263, 13);
this.lblStock.Name = "lblStock";
this.lblStock.Size = new System.Drawing.Size(53, 12);
this.lblStock.TabIndex = 542;
this.lblStock.Text = "活动库存";
//
// DouProductProPromotionListSkuInfoForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(1084, 561);
this.Controls.Add(this.splitContainer1);
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "DouProductProPromotionListSkuInfoForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "设置单个SKU";
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
this.splitContainer2.ResumeLayout(false);
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel1.PerformLayout();
this.splitContainer1.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
this.panel6.ResumeLayout(false);
this.panel5.ResumeLayout(false);
this.panel5.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.SplitContainer splitContainer2;
private System.Windows.Forms.SplitContainer splitContainer1;
private System.Windows.Forms.Panel panel5;
private System.Windows.Forms.TextBox txtStock;
private System.Windows.Forms.Label lblStock;
private System.Windows.Forms.Panel panel6;
private DevComponents.DotNetBar.Controls.ComboBoxEx cmbLimit;
private System.Windows.Forms.Label lblLimit;
private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect;
private System.Windows.Forms.DataGridViewTextBoxColumn colSkuId;
private System.Windows.Forms.DataGridViewTextBoxColumn colSku;
private System.Windows.Forms.DataGridViewTextBoxColumn colOldPrice;
private System.Windows.Forms.DataGridViewTextBoxColumn colSetPrice;
private System.Windows.Forms.DataGridViewTextBoxColumn colNowStock;
private System.Windows.Forms.DataGridViewTextBoxColumn colActiveStock;
private System.Windows.Forms.DataGridViewTextBoxColumn colLimited;
private System.Windows.Forms.DataGridViewTextBoxColumn colMessage;
private DevComponents.DotNetBar.PanelEx btnSave;
}
}
@@ -0,0 +1,27 @@
using AllBase;
using AllBase.Model.Result;
using LittleRabbit.LittleRabbitForms.BaseForms;
using NaiBa.Util.Extension;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
namespace LittleRabbit.LittleRabbitForms.SalesCenterForms
{
public partial class DouProductProPromotionListSkuInfoForm : Form
{
public List<DouProductProPromotionListSkuInfo> skuList = null;
private List<string> strList = new List<string>();
public DouProductProPromotionListSkuInfoForm(string data, string shop_stype = "3", string setPrice = "95", int StockNum = 1, string limited = "1")
{
InitializeComponent();
}
private void btnSave_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.OK;
}
}
}
@@ -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>
@@ -0,0 +1,454 @@
namespace LittleRabbit.LittleRabbitForms.SalesCenterForms
{
partial class DouProductPromotionListSkuInfoEditForm
{
/// <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()
{
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.btnSave = new DevComponents.DotNetBar.PanelEx();
this.btnFill = new DevComponents.DotNetBar.PanelEx();
this.panel6 = new System.Windows.Forms.Panel();
this.cmbLimit = new DevComponents.DotNetBar.Controls.ComboBoxEx();
this.lblLimit = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.panel1 = new System.Windows.Forms.Panel();
this.txtSetPrice = new System.Windows.Forms.TextBox();
this.panel5 = new System.Windows.Forms.Panel();
this.txtStock = new System.Windows.Forms.TextBox();
this.lblStock = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.btnDelete = new DevComponents.DotNetBar.PanelEx();
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.dgvActiveSku = new LittleRabbit.UserComponent.DataGridViewEx();
this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.colSkuId = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colSku = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colOldPrice = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colSetPrice = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colNowStock = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colActiveStock = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colLeftStock = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colLimited = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colMessage = new System.Windows.Forms.DataGridViewTextBoxColumn();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.panel6.SuspendLayout();
this.panel1.SuspendLayout();
this.panel5.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit();
this.splitContainer2.Panel1.SuspendLayout();
this.splitContainer2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvActiveSku)).BeginInit();
this.SuspendLayout();
//
// splitContainer1
//
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
this.splitContainer1.Name = "splitContainer1";
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.btnSave);
this.splitContainer1.Panel1.Controls.Add(this.btnFill);
this.splitContainer1.Panel1.Controls.Add(this.panel6);
this.splitContainer1.Panel1.Controls.Add(this.lblLimit);
this.splitContainer1.Panel1.Controls.Add(this.label3);
this.splitContainer1.Panel1.Controls.Add(this.panel1);
this.splitContainer1.Panel1.Controls.Add(this.panel5);
this.splitContainer1.Panel1.Controls.Add(this.lblStock);
this.splitContainer1.Panel1.Controls.Add(this.label2);
this.splitContainer1.Panel1.Controls.Add(this.btnDelete);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.splitContainer2);
this.splitContainer1.Size = new System.Drawing.Size(1084, 561);
this.splitContainer1.SplitterDistance = 36;
this.splitContainer1.TabIndex = 13;
//
// btnSave
//
this.btnSave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)));
this.btnSave.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnSave.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnSave.DisabledBackColor = System.Drawing.Color.Empty;
this.btnSave.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSave.Location = new System.Drawing.Point(654, 7);
this.btnSave.Name = "btnSave";
this.btnSave.Size = new System.Drawing.Size(80, 23);
this.btnSave.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnSave.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnSave.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnSave.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnSave.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnSave.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnSave.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnSave.Style.GradientAngle = 90;
this.btnSave.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnSave.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnSave.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnSave.TabIndex = 561;
this.btnSave.Text = "保存";
this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
//
// btnFill
//
this.btnFill.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)));
this.btnFill.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnFill.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnFill.DisabledBackColor = System.Drawing.Color.Empty;
this.btnFill.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnFill.Location = new System.Drawing.Point(557, 7);
this.btnFill.Name = "btnFill";
this.btnFill.Size = new System.Drawing.Size(80, 23);
this.btnFill.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnFill.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnFill.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnFill.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnFill.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnFill.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnFill.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnFill.Style.GradientAngle = 90;
this.btnFill.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnFill.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnFill.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnFill.TabIndex = 551;
this.btnFill.Text = "批量填充";
this.btnFill.Click += new System.EventHandler(this.btnFill_Click);
//
// panel6
//
this.panel6.Controls.Add(this.cmbLimit);
this.panel6.Location = new System.Drawing.Point(476, 6);
this.panel6.Name = "panel6";
this.panel6.Size = new System.Drawing.Size(60, 24);
this.panel6.TabIndex = 547;
//
// cmbLimit
//
this.cmbLimit.DisplayMember = "Text";
this.cmbLimit.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.cmbLimit.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbLimit.FormattingEnabled = true;
this.cmbLimit.ItemHeight = 18;
this.cmbLimit.Location = new System.Drawing.Point(0, 0);
this.cmbLimit.Name = "cmbLimit";
this.cmbLimit.Size = new System.Drawing.Size(57, 24);
this.cmbLimit.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.cmbLimit.TabIndex = 520;
//
// lblLimit
//
this.lblLimit.AutoSize = true;
this.lblLimit.Location = new System.Drawing.Point(421, 13);
this.lblLimit.Name = "lblLimit";
this.lblLimit.Size = new System.Drawing.Size(53, 12);
this.lblLimit.TabIndex = 546;
this.lblLimit.Text = "每人限购";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(103, 13);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(29, 12);
this.label3.TabIndex = 545;
this.label3.Text = "优惠";
//
// panel1
//
this.panel1.Controls.Add(this.txtSetPrice);
this.panel1.Location = new System.Drawing.Point(138, 8);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(83, 21);
this.panel1.TabIndex = 544;
//
// txtSetPrice
//
this.txtSetPrice.Location = new System.Drawing.Point(0, 0);
this.txtSetPrice.Name = "txtSetPrice";
this.txtSetPrice.Size = new System.Drawing.Size(83, 21);
this.txtSetPrice.TabIndex = 0;
//
// panel5
//
this.panel5.Controls.Add(this.txtStock);
this.panel5.Location = new System.Drawing.Point(322, 8);
this.panel5.Name = "panel5";
this.panel5.Size = new System.Drawing.Size(82, 21);
this.panel5.TabIndex = 543;
//
// txtStock
//
this.txtStock.Location = new System.Drawing.Point(0, 0);
this.txtStock.Name = "txtStock";
this.txtStock.Size = new System.Drawing.Size(80, 21);
this.txtStock.TabIndex = 481;
//
// lblStock
//
this.lblStock.AutoSize = true;
this.lblStock.Location = new System.Drawing.Point(263, 13);
this.lblStock.Name = "lblStock";
this.lblStock.Size = new System.Drawing.Size(53, 12);
this.lblStock.TabIndex = 542;
this.lblStock.Text = "追加库存";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(226, 13);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(17, 12);
this.label2.TabIndex = 541;
this.label2.Text = "折";
//
// btnDelete
//
this.btnDelete.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)));
this.btnDelete.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnDelete.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnDelete.DisabledBackColor = System.Drawing.Color.Empty;
this.btnDelete.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnDelete.Location = new System.Drawing.Point(902, 7);
this.btnDelete.Name = "btnDelete";
this.btnDelete.Size = new System.Drawing.Size(90, 23);
this.btnDelete.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnDelete.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnDelete.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnDelete.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnDelete.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnDelete.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnDelete.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnDelete.Style.GradientAngle = 90;
this.btnDelete.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnDelete.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnDelete.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnDelete.TabIndex = 536;
this.btnDelete.Text = "删除";
this.btnDelete.Click += new System.EventHandler(this.btnDelete_Click);
//
// splitContainer2
//
this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
this.splitContainer2.Location = new System.Drawing.Point(0, 0);
this.splitContainer2.Name = "splitContainer2";
this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer2.Panel1
//
this.splitContainer2.Panel1.Controls.Add(this.dgvActiveSku);
this.splitContainer2.Panel1.Padding = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.splitContainer2.Size = new System.Drawing.Size(1084, 521);
this.splitContainer2.SplitterDistance = 492;
this.splitContainer2.TabIndex = 10;
//
// dgvActiveSku
//
this.dgvActiveSku.AllowUserToAddRows = false;
this.dgvActiveSku.AllowUserToDeleteRows = false;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvActiveSku.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
this.dgvActiveSku.BackgroundColor = System.Drawing.Color.White;
this.dgvActiveSku.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvActiveSku.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
this.dgvActiveSku.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvActiveSku.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colSelect,
this.colSkuId,
this.colSku,
this.colOldPrice,
this.colSetPrice,
this.colNowStock,
this.colActiveStock,
this.colLeftStock,
this.colLimited,
this.colMessage});
this.dgvActiveSku.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvActiveSku.Location = new System.Drawing.Point(4, 0);
this.dgvActiveSku.Name = "dgvActiveSku";
this.dgvActiveSku.ReadOnly = true;
dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.dgvActiveSku.RowsDefaultCellStyle = dataGridViewCellStyle3;
this.dgvActiveSku.RowTemplate.Height = 23;
this.dgvActiveSku.Size = new System.Drawing.Size(1076, 492);
this.dgvActiveSku.TabIndex = 6;
this.dgvActiveSku.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvActiveSku_CellContentClick);
//
// colSelect
//
this.colSelect.FillWeight = 50F;
this.colSelect.HeaderText = "选择";
this.colSelect.Name = "colSelect";
this.colSelect.ReadOnly = true;
this.colSelect.Resizable = System.Windows.Forms.DataGridViewTriState.False;
this.colSelect.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colSelect.Width = 45;
//
// colSkuId
//
this.colSkuId.HeaderText = "SkuId";
this.colSkuId.Name = "colSkuId";
this.colSkuId.ReadOnly = true;
this.colSkuId.Visible = false;
this.colSkuId.Width = 150;
//
// colSku
//
this.colSku.HeaderText = "SKU";
this.colSku.Name = "colSku";
this.colSku.ReadOnly = true;
this.colSku.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colSku.Width = 300;
//
// colOldPrice
//
this.colOldPrice.HeaderText = "原价";
this.colOldPrice.Name = "colOldPrice";
this.colOldPrice.ReadOnly = true;
this.colOldPrice.Width = 75;
//
// colSetPrice
//
this.colSetPrice.HeaderText = "打折";
this.colSetPrice.Name = "colSetPrice";
this.colSetPrice.ReadOnly = true;
this.colSetPrice.Width = 80;
//
// colNowStock
//
this.colNowStock.HeaderText = "当前库存";
this.colNowStock.Name = "colNowStock";
this.colNowStock.ReadOnly = true;
this.colNowStock.Width = 75;
//
// colActiveStock
//
this.colActiveStock.HeaderText = "活动库存";
this.colActiveStock.Name = "colActiveStock";
this.colActiveStock.ReadOnly = true;
this.colActiveStock.Width = 80;
//
// colLeftStock
//
this.colLeftStock.HeaderText = "活动剩余库存";
this.colLeftStock.Name = "colLeftStock";
this.colLeftStock.ReadOnly = true;
this.colLeftStock.Width = 90;
//
// colLimited
//
this.colLimited.HeaderText = "每人限购";
this.colLimited.Name = "colLimited";
this.colLimited.ReadOnly = true;
this.colLimited.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colLimited.Width = 80;
//
// colMessage
//
this.colMessage.HeaderText = "消息提示";
this.colMessage.Name = "colMessage";
this.colMessage.ReadOnly = true;
this.colMessage.Width = 150;
//
// DouProductPromotionListSkuInfoEditForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(1084, 561);
this.Controls.Add(this.splitContainer1);
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "DouProductPromotionListSkuInfoEditForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "活动编辑";
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel1.PerformLayout();
this.splitContainer1.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
this.panel6.ResumeLayout(false);
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.panel5.ResumeLayout(false);
this.panel5.PerformLayout();
this.splitContainer2.Panel1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
this.splitContainer2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dgvActiveSku)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.SplitContainer splitContainer1;
private DevComponents.DotNetBar.PanelEx btnSave;
private DevComponents.DotNetBar.PanelEx btnFill;
private System.Windows.Forms.Panel panel6;
private DevComponents.DotNetBar.Controls.ComboBoxEx cmbLimit;
private System.Windows.Forms.Label lblLimit;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.TextBox txtSetPrice;
private System.Windows.Forms.Panel panel5;
private System.Windows.Forms.TextBox txtStock;
private System.Windows.Forms.Label lblStock;
private System.Windows.Forms.Label label2;
private DevComponents.DotNetBar.PanelEx btnDelete;
private System.Windows.Forms.SplitContainer splitContainer2;
private UserComponent.DataGridViewEx dgvActiveSku;
private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect;
private System.Windows.Forms.DataGridViewTextBoxColumn colSkuId;
private System.Windows.Forms.DataGridViewTextBoxColumn colSku;
private System.Windows.Forms.DataGridViewTextBoxColumn colOldPrice;
private System.Windows.Forms.DataGridViewTextBoxColumn colSetPrice;
private System.Windows.Forms.DataGridViewTextBoxColumn colNowStock;
private System.Windows.Forms.DataGridViewTextBoxColumn colActiveStock;
private System.Windows.Forms.DataGridViewTextBoxColumn colLeftStock;
private System.Windows.Forms.DataGridViewTextBoxColumn colLimited;
private System.Windows.Forms.DataGridViewTextBoxColumn colMessage;
}
}
@@ -0,0 +1,315 @@
using LittleRabbit.LittleRabbitForms.BaseForms;
using NaiBa.Util.Extension;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
namespace LittleRabbit.LittleRabbitForms.SalesCenterForms
{
public partial class DouProductPromotionListSkuInfoEditForm : Form
{
public List<Promotion_Skus> skuList = null;
private List<string> strList = new List<string>();
private TextBox textBox = null;
private ComboBox comboBox = null;
public DouProductPromotionListSkuInfoEditForm(Promotion_Goods goods, string shop_stype)
{
InitializeComponent();
if (shop_stype == "3")
{
this.dgvActiveSku.Columns["colSetPrice"].HeaderText = "打折";
this.label2.Text = "折";
}
else if (shop_stype == "2")
{
this.dgvActiveSku.Columns["colSetPrice"].HeaderText = "直降";
this.label2.Text = "元";
}
else if (shop_stype == "1")
{
this.dgvActiveSku.Columns["colSetPrice"].HeaderText = "一口价";
this.label2.Text = "元";
}
this.txtSetPrice.Text = "";
this.txtStock.Text = "";
//设置限购数
for (int x = 1; x <= 20; x++)
{
cmbLimit.Items.Add(x);
if (x == goods.promotion_skus[0].user_limit.ParseToInt())
cmbLimit.SelectedIndex = x - 1;
}
foreach (var sku in goods.promotion_skus)
{
if (shop_stype == "3")
this.dgvActiveSku.Rows.Add(false, sku.id, sku.specification, sku.origin_price.ParseToDecimal() / 100, sku.shop_svalue.ParseToDecimal() / 10, sku.stock, sku.camp_stock_num, sku.camp_left_stock_num, sku.user_limit);
else
this.dgvActiveSku.Rows.Add(false, sku.id, sku.specification, sku.origin_price.ParseToDecimal() / 100, sku.shop_svalue.ParseToDecimal() / 100, sku.stock, sku.camp_stock_num, sku.camp_left_stock_num, sku.user_limit);
}
dgvActiveSku.Sort(dgvActiveSku.Columns["colSkuId"], System.ComponentModel.ListSortDirection.Descending);
skuList = goods.promotion_skus;
}
private void dgvActiveSku_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
if (e.ColumnIndex < 0 || e.RowIndex < 0)
return;
string headerText = dgvActiveSku.Columns[e.ColumnIndex].HeaderText;
string columnName = dgvActiveSku.Columns[e.ColumnIndex].Name;
long SkuId = dgvActiveSku.Rows[e.RowIndex].Cells["colSkuId"].Value.ParseToLong();
var row = dgvActiveSku.Rows[e.RowIndex];
switch (columnName)
{
case "colSelect":
row.Cells["colSelect"].Value = !row.Cells["colSelect"].Value.ParseToBool();
if (dgvActiveSku.Rows[e.RowIndex].Cells["colSelect"].Value.ParseToBool())
{
if (strList.Any(p => p == SkuId.ToString()))
strList.RemoveAll(p => p == SkuId.ToString());
strList.Add(SkuId.ToString());
}
else
strList.Remove(SkuId.ToString());
break;
case "colSetPrice":
getTextBox();
textBox.Visible = true;
textBox.Location = dgvActiveSku.GetCellDisplayRectangle(dgvActiveSku.CurrentCell.ColumnIndex, dgvActiveSku.CurrentCell.RowIndex, true).Location;
textBox.Location.Offset(0, 1);
textBox.Width = dgvActiveSku.GetCellDisplayRectangle(dgvActiveSku.CurrentCell.ColumnIndex, dgvActiveSku.CurrentCell.RowIndex, true).Width - 2;
textBox.Height = dgvActiveSku.GetCellDisplayRectangle(dgvActiveSku.CurrentCell.ColumnIndex, dgvActiveSku.CurrentCell.RowIndex, true).Height - 2;
textBox.Text = row.Cells["colSetPrice"].Value.ToString();
textBox.Focus();
textBox.LostFocus += new EventHandler((obj, ex) => {
var setPriceRes = (obj as TextBox).Text.Trim();
if(setPriceRes != "")
{
var SetPrice = returnPrice(setPriceRes);
Promotion_Skus skuInfo = skuList.Where(x => x.id == SkuId.ToString()).FirstOrDefault();
if (skuInfo != null)
skuInfo.shop_svalue = SetPrice.ParseToInt();
row.Cells["colSetPrice"].Value = setPriceRes;
}
if (textBox != null)
{
dgvActiveSku.Controls.Remove(textBox);
textBox = null;
}
});
break;
case "colActiveStock":
getTextBox();
textBox.Visible = true;
textBox.Location = dgvActiveSku.GetCellDisplayRectangle(dgvActiveSku.CurrentCell.ColumnIndex, dgvActiveSku.CurrentCell.RowIndex, true).Location;
textBox.Location.Offset(0, 1);
textBox.Width = dgvActiveSku.GetCellDisplayRectangle(dgvActiveSku.CurrentCell.ColumnIndex, dgvActiveSku.CurrentCell.RowIndex, true).Width - 2;
textBox.Height = dgvActiveSku.GetCellDisplayRectangle(dgvActiveSku.CurrentCell.ColumnIndex, dgvActiveSku.CurrentCell.RowIndex, true).Height - 2;
textBox.Text = row.Cells["colActiveStock"].Value.ToString();
textBox.Focus();
textBox.LostFocus += new EventHandler((obj, ex) => {
var Stock = (obj as TextBox).Text.Trim();
if (Stock != "")
{
Promotion_Skus skuInfo = skuList.Where(x => x.id == SkuId.ToString()).FirstOrDefault();
if (skuInfo != null)
skuInfo.camp_stock_num = Stock.ParseToInt();
row.Cells["colActiveStock"].Value = skuInfo.camp_stock_num;
}
if (textBox != null)
{
dgvActiveSku.Controls.Remove(textBox);
textBox = null;
}
});
break;
case "colLimited":
getComboBox();
comboBox.Visible = true;
comboBox.Location = dgvActiveSku.GetCellDisplayRectangle(dgvActiveSku.CurrentCell.ColumnIndex, dgvActiveSku.CurrentCell.RowIndex, true).Location;
comboBox.Width = dgvActiveSku.GetCellDisplayRectangle(dgvActiveSku.CurrentCell.ColumnIndex, dgvActiveSku.CurrentCell.RowIndex, true).Width - 2;
comboBox.Height = dgvActiveSku.GetCellDisplayRectangle(dgvActiveSku.CurrentCell.ColumnIndex, dgvActiveSku.CurrentCell.RowIndex, true).Height - 2;
for (int a = 0; a < comboBox.Items.Count; a++)
{
if (comboBox.Items[a].ToString() == row.Cells["colLimited"].Value.ToString())
{
comboBox.SelectedIndex = a;
break;
}
}
comboBox.ItemHeight = 20;
comboBox.Focus();
try
{
comboBox.LostFocus += new EventHandler((obj, ex) => {
var setLimit = (obj as ComboBox).Text;
Promotion_Skus skuInfo = skuList.Where(x => x.id == SkuId.ToString()).FirstOrDefault();
if (skuInfo != null)
skuInfo.user_limit = setLimit;
if (comboBox != null)
{
dgvActiveSku.Controls.Remove(comboBox);
comboBox = null;
}
row.Cells["colLimited"].Value = setLimit;
});
}
catch (Exception)
{
if (comboBox != null)
{
dgvActiveSku.Controls.Remove(comboBox);
comboBox = null;
}
Promotion_Skus skuInfo = skuList.Where(x => x.id == SkuId.ToString()).FirstOrDefault();
row.Cells["colLimited"].Value = skuInfo.user_limit;
}
break;
default:
if (textBox != null)
{
dgvActiveSku.Controls.Remove(textBox);
textBox = null;
}
if (comboBox != null)
{
dgvActiveSku.Controls.Remove(comboBox);
comboBox = null;
}
break;
}
}
private void btnFill_Click(object sender, System.EventArgs e)
{
var setPriceRes = txtSetPrice.Text.Trim();
var ActiveStock = txtStock.Text.Trim();
var LimitedNum = cmbLimit.Text;
foreach (DataGridViewRow row in dgvActiveSku.Rows)
{
var skuId = row.Cells["colSkuId"].Value.ToString();
Promotion_Skus skuInfo = skuList.Where(x => x.id == skuId).FirstOrDefault();
if (skuInfo != null)
{
if (setPriceRes != "")
{
row.Cells["colSetPrice"].Value = setPriceRes;
skuInfo.shop_svalue = returnPrice(setPriceRes).ParseToInt();
}
if (ActiveStock != "")
{
skuInfo.camp_stock_num = skuInfo.camp_stock_num + ActiveStock.ParseToInt();
row.Cells["colActiveStock"].Value = skuInfo.camp_stock_num;
}
row.Cells["colLimited"].Value = LimitedNum;
skuInfo.user_limit = LimitedNum;
}
}
}
public string returnPrice(string price)
{
var SetPrice = "";
if (label2.Text == "折")
SetPrice = (price.ParseToDouble() * 10).ToString(); //打折精确到小数点后一位(0-10之间)
else if (label2.Text == "元")
SetPrice = (price.ParseToDouble() * 100).ToString(); //直降、一口价精确到小数点后两位(0-原价之间)
return SetPrice;
}
private void btnDelete_Click(object sender, System.EventArgs e)
{
if (strList.Count == 0)
{
BaseMsgForm.ShowInfo("请选择待删除的单品!");
return;
}
if (BaseMsgForm.ShowConfirm("确定要删除吗?").DialogResult == DialogResult.OK)
{
for (int i = 0; i < dgvActiveSku.Rows.Count; i++)
{
DataGridViewRow row = dgvActiveSku.Rows[i];
long SkuId = row.Cells["colSkuId"].Value.ParseToLong();
if (strList.Any(p => p == SkuId.ToString()))
{
dgvActiveSku.Rows.Remove(row);
strList.Remove(SkuId.ToString());
skuList.Remove(skuList.Where(x => x.id == SkuId.ToString()).FirstOrDefault());
i--;
}
}
}
}
public void getTextBox()
{
textBox = new TextBox();
textBox.Visible = false;
dgvActiveSku.Controls.Add(textBox);
}
public void getComboBox()
{
comboBox = new ComboBox();
for (int i = 1; i <= 20; i++)
{
comboBox.Items.Add(i);
}
comboBox.DropDownStyle = ComboBoxStyle.DropDownList;
comboBox.Visible = false;
dgvActiveSku.Controls.Add(comboBox);
}
private void btnSave_Click(object sender, System.EventArgs e)
{
this.DialogResult = DialogResult.OK;
}
}
public class ActiveInfoEdit
{
public string campaign_id { get; set; }
public int sub_stype { get; set; }
/// <summary>
/// 活动名称
/// </summary>
public string title { get; set; }
public string pre_begin_time { get; set; }
public string begin_time { get; set; }
public string end_time { get; set; }
public string order_expire_time { get; set; }
/// <summary>
/// 优惠方式
/// </summary>
public string shop_stype { get; set; }
public string time_set_type { get; set; }
public int status { get; set; }
public string stock_type { get; set; }
public string sold_out_type { get; set; }
public List<Promotion_Goods> promotion_goods { get; set; }
}
public class Promotion_Goods
{
public string product_id { get; set; }
public string title { get; set; }
public string cover { get; set; }
public int config_scope { get; set; }
public List<Promotion_Skus> promotion_skus { get; set; }
}
public class Promotion_Skus
{
public string id { get; set; }
public int camp_stock_num { get; set; }
public int camp_left_stock_num { get; set; }
public int price { get; set; }
public string user_limit { get; set; }
public int origin_price { get; set; }
public int stock { get; set; }
public string specification { get; set; }
public int shop_svalue { get; set; }
public int redline_price { get; set; }
}
}
@@ -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="colLeftStock.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>
@@ -0,0 +1,437 @@
namespace LittleRabbit.LittleRabbitForms.SalesCenterForms
{
partial class FullMinusActiveForm
{
/// <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()
{
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
this.panel1 = new System.Windows.Forms.Panel();
this.cmbActState = new DevComponents.DotNetBar.Controls.ComboBoxEx();
this.comboItem1 = new DevComponents.Editors.ComboItem();
this.comboItem2 = new DevComponents.Editors.ComboItem();
this.comboItem3 = new DevComponents.Editors.ComboItem();
this.comboItem4 = new DevComponents.Editors.ComboItem();
this.comboItem5 = new DevComponents.Editors.ComboItem();
this.btnFailed = new DevComponents.DotNetBar.PanelEx();
this.btnSearch = new DevComponents.DotNetBar.PanelEx();
this.label2 = new System.Windows.Forms.Label();
this.panel4 = new System.Windows.Forms.Panel();
this.txtActName = new System.Windows.Forms.TextBox();
this.lblActivity = new System.Windows.Forms.Label();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.dgvActive = new LittleRabbit.UserComponent.DataGridViewEx();
this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.colActiveId = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colActiveName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colPreStartTime = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colPrefereType = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colStartTime = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colEndTime = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colActiveState = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colMessage = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.label1 = new System.Windows.Forms.Label();
this.statusBar = new LittleRabbit.UserControls.StatusBarUserControl();
this.panel1.SuspendLayout();
this.panel4.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit();
this.splitContainer2.Panel1.SuspendLayout();
this.splitContainer2.Panel2.SuspendLayout();
this.splitContainer2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvActive)).BeginInit();
this.SuspendLayout();
//
// panel1
//
this.panel1.Controls.Add(this.cmbActState);
this.panel1.Location = new System.Drawing.Point(368, 7);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(76, 24);
this.panel1.TabIndex = 522;
//
// cmbActState
//
this.cmbActState.DisplayMember = "Text";
this.cmbActState.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.cmbActState.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbActState.FormattingEnabled = true;
this.cmbActState.ItemHeight = 18;
this.cmbActState.Items.AddRange(new object[] {
this.comboItem1,
this.comboItem2,
this.comboItem3,
this.comboItem4,
this.comboItem5});
this.cmbActState.Location = new System.Drawing.Point(0, 0);
this.cmbActState.Name = "cmbActState";
this.cmbActState.Size = new System.Drawing.Size(75, 24);
this.cmbActState.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.cmbActState.TabIndex = 520;
//
// comboItem1
//
this.comboItem1.Text = "全部";
//
// comboItem2
//
this.comboItem2.Text = "未开始";
this.comboItem2.Value = "1";
//
// comboItem3
//
this.comboItem3.Text = "进行中";
this.comboItem3.Value = "2";
//
// comboItem4
//
this.comboItem4.Text = "已结束";
this.comboItem4.Value = "3";
//
// comboItem5
//
this.comboItem5.Text = "已失效";
this.comboItem5.Value = "4";
//
// btnFailed
//
this.btnFailed.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnFailed.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnFailed.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnFailed.DisabledBackColor = System.Drawing.Color.Empty;
this.btnFailed.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnFailed.Location = new System.Drawing.Point(692, 9);
this.btnFailed.Name = "btnFailed";
this.btnFailed.Size = new System.Drawing.Size(75, 21);
this.btnFailed.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnFailed.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
this.btnFailed.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
this.btnFailed.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnFailed.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnFailed.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnFailed.Style.ForeColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(8)))), ((int)(((byte)(55)))), ((int)(((byte)(114)))));
this.btnFailed.Style.GradientAngle = 90;
this.btnFailed.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnFailed.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnFailed.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnFailed.TabIndex = 546;
this.btnFailed.Text = "失效";
this.btnFailed.Click += new System.EventHandler(this.btnFailed_Click);
//
// btnSearch
//
this.btnSearch.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnSearch.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnSearch.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnSearch.DisabledBackColor = System.Drawing.Color.Empty;
this.btnSearch.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSearch.Location = new System.Drawing.Point(596, 9);
this.btnSearch.Name = "btnSearch";
this.btnSearch.Size = new System.Drawing.Size(80, 21);
this.btnSearch.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnSearch.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnSearch.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnSearch.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnSearch.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnSearch.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnSearch.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnSearch.Style.GradientAngle = 90;
this.btnSearch.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnSearch.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnSearch.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnSearch.TabIndex = 536;
this.btnSearch.Text = "查询/刷新";
this.btnSearch.Click += new System.EventHandler(this.btnSearch_Click);
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(314, 11);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(56, 17);
this.label2.TabIndex = 521;
this.label2.Text = "活动状态";
//
// panel4
//
this.panel4.Controls.Add(this.txtActName);
this.panel4.Location = new System.Drawing.Point(195, 8);
this.panel4.Name = "panel4";
this.panel4.Size = new System.Drawing.Size(96, 23);
this.panel4.TabIndex = 516;
//
// txtActName
//
this.txtActName.Location = new System.Drawing.Point(0, 0);
this.txtActName.Name = "txtActName";
this.txtActName.Size = new System.Drawing.Size(95, 23);
this.txtActName.TabIndex = 481;
//
// lblActivity
//
this.lblActivity.AutoSize = true;
this.lblActivity.Location = new System.Drawing.Point(141, 11);
this.lblActivity.Name = "lblActivity";
this.lblActivity.Size = new System.Drawing.Size(56, 17);
this.lblActivity.TabIndex = 515;
this.lblActivity.Text = "活动名称";
//
// splitContainer1
//
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
this.splitContainer1.Name = "splitContainer1";
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.btnFailed);
this.splitContainer1.Panel1.Controls.Add(this.btnSearch);
this.splitContainer1.Panel1.Controls.Add(this.panel1);
this.splitContainer1.Panel1.Controls.Add(this.label2);
this.splitContainer1.Panel1.Controls.Add(this.panel4);
this.splitContainer1.Panel1.Controls.Add(this.lblActivity);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.splitContainer2);
this.splitContainer1.Size = new System.Drawing.Size(1034, 459);
this.splitContainer1.SplitterDistance = 38;
this.splitContainer1.TabIndex = 12;
//
// splitContainer2
//
this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
this.splitContainer2.Location = new System.Drawing.Point(0, 0);
this.splitContainer2.Name = "splitContainer2";
this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer2.Panel1
//
this.splitContainer2.Panel1.Controls.Add(this.dgvActive);
this.splitContainer2.Panel1.Padding = new System.Windows.Forms.Padding(4, 0, 4, 0);
//
// splitContainer2.Panel2
//
this.splitContainer2.Panel2.Controls.Add(this.label1);
this.splitContainer2.Panel2.Controls.Add(this.statusBar);
this.splitContainer2.Size = new System.Drawing.Size(1034, 417);
this.splitContainer2.SplitterDistance = 386;
this.splitContainer2.TabIndex = 10;
//
// dgvActive
//
this.dgvActive.AllowUserToAddRows = false;
this.dgvActive.AllowUserToDeleteRows = false;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvActive.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
this.dgvActive.BackgroundColor = System.Drawing.Color.White;
this.dgvActive.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvActive.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
this.dgvActive.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvActive.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colSelect,
this.colActiveId,
this.colActiveName,
this.colPreStartTime,
this.colPrefereType,
this.colStartTime,
this.colEndTime,
this.colActiveState,
this.colMessage});
this.dgvActive.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvActive.Location = new System.Drawing.Point(4, 0);
this.dgvActive.Name = "dgvActive";
this.dgvActive.ReadOnly = true;
dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.dgvActive.RowsDefaultCellStyle = dataGridViewCellStyle3;
this.dgvActive.RowTemplate.Height = 23;
this.dgvActive.Size = new System.Drawing.Size(1026, 386);
this.dgvActive.TabIndex = 6;
this.dgvActive.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvActive_CellContentClick);
//
// colSelect
//
this.colSelect.FillWeight = 50F;
this.colSelect.HeaderText = "选";
this.colSelect.Name = "colSelect";
this.colSelect.ReadOnly = true;
this.colSelect.Resizable = System.Windows.Forms.DataGridViewTriState.False;
this.colSelect.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colSelect.Width = 30;
//
// colActiveId
//
this.colActiveId.HeaderText = "活动Id";
this.colActiveId.Name = "colActiveId";
this.colActiveId.ReadOnly = true;
this.colActiveId.Visible = false;
//
// colActiveName
//
this.colActiveName.HeaderText = "活动名称";
this.colActiveName.Name = "colActiveName";
this.colActiveName.ReadOnly = true;
this.colActiveName.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colActiveName.Width = 75;
//
// colPreStartTime
//
this.colPreStartTime.HeaderText = "优惠信息";
this.colPreStartTime.Name = "colPreStartTime";
this.colPreStartTime.ReadOnly = true;
this.colPreStartTime.Width = 250;
//
// colPrefereType
//
this.colPrefereType.HeaderText = "活动商品";
this.colPrefereType.Name = "colPrefereType";
this.colPrefereType.ReadOnly = true;
this.colPrefereType.Width = 240;
//
// colStartTime
//
this.colStartTime.HeaderText = "活动开始时间";
this.colStartTime.Name = "colStartTime";
this.colStartTime.ReadOnly = true;
this.colStartTime.Width = 110;
//
// colEndTime
//
this.colEndTime.HeaderText = "活动结束时间";
this.colEndTime.Name = "colEndTime";
this.colEndTime.ReadOnly = true;
this.colEndTime.Width = 110;
//
// colActiveState
//
this.colActiveState.HeaderText = "活动状态";
this.colActiveState.Name = "colActiveState";
this.colActiveState.ReadOnly = true;
this.colActiveState.Width = 65;
//
// colMessage
//
this.colMessage.HeaderText = "消息提示";
this.colMessage.Name = "colMessage";
this.colMessage.ReadOnly = true;
this.colMessage.Width = 240;
//
// label1
//
this.label1.AutoSize = true;
this.label1.ForeColor = System.Drawing.Color.MidnightBlue;
this.label1.Location = new System.Drawing.Point(651, 5);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(43, 17);
this.label1.TabIndex = 5;
this.label1.Text = "label1";
//
// statusBar
//
this.statusBar.BackColor = System.Drawing.Color.White;
this.statusBar.Dock = System.Windows.Forms.DockStyle.Fill;
this.statusBar.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.statusBar.Location = new System.Drawing.Point(0, 0);
this.statusBar.Margin = new System.Windows.Forms.Padding(0);
this.statusBar.Name = "statusBar";
this.statusBar.Size = new System.Drawing.Size(1034, 27);
this.statusBar.TabIndex = 4;
//
// FullMinusActiveForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(1034, 459);
this.Controls.Add(this.splitContainer1);
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Name = "FullMinusActiveForm";
this.Text = "FullMinusActiveForm";
this.Load += new System.EventHandler(this.FullMinusActiveForm_Load);
this.panel1.ResumeLayout(false);
this.panel4.ResumeLayout(false);
this.panel4.PerformLayout();
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel1.PerformLayout();
this.splitContainer1.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
this.splitContainer2.Panel1.ResumeLayout(false);
this.splitContainer2.Panel2.ResumeLayout(false);
this.splitContainer2.Panel2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
this.splitContainer2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dgvActive)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Panel panel1;
private DevComponents.DotNetBar.Controls.ComboBoxEx cmbActState;
private DevComponents.Editors.ComboItem comboItem1;
private DevComponents.Editors.ComboItem comboItem2;
private DevComponents.Editors.ComboItem comboItem3;
private DevComponents.Editors.ComboItem comboItem4;
private DevComponents.Editors.ComboItem comboItem5;
private DevComponents.DotNetBar.PanelEx btnFailed;
private DevComponents.DotNetBar.PanelEx btnSearch;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Panel panel4;
private System.Windows.Forms.TextBox txtActName;
private System.Windows.Forms.Label lblActivity;
private System.Windows.Forms.SplitContainer splitContainer1;
private System.Windows.Forms.SplitContainer splitContainer2;
private UserComponent.DataGridViewEx dgvActive;
private System.Windows.Forms.Label label1;
private UserControls.StatusBarUserControl statusBar;
private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect;
private System.Windows.Forms.DataGridViewTextBoxColumn colActiveId;
private System.Windows.Forms.DataGridViewTextBoxColumn colActiveName;
private System.Windows.Forms.DataGridViewTextBoxColumn colPreStartTime;
private System.Windows.Forms.DataGridViewTextBoxColumn colPrefereType;
private System.Windows.Forms.DataGridViewTextBoxColumn colStartTime;
private System.Windows.Forms.DataGridViewTextBoxColumn colEndTime;
private System.Windows.Forms.DataGridViewTextBoxColumn colActiveState;
private System.Windows.Forms.DataGridViewTextBoxColumn colMessage;
}
}
@@ -0,0 +1,353 @@
using AllBase;
using AllBase.Helper;
using AllBase.Model.Result;
using LittleRabbit.LittleRabbitForms.BaseForms;
using NaiBa.Util.Extension;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace LittleRabbit.LittleRabbitForms.SalesCenterForms
{
public partial class FullMinusActiveForm : Form
{
private DouShopLoginInfo shop = null;
public List<long> lstActiveId = new List<long>();
public FullMinusForm fullMinusForm = null;
private string _signature = "";
private string _underline = "";
public bool isGetActiveSuccess = false;
public List<FullMinusActiveInfo> activeList = new List<FullMinusActiveInfo>();
public FullMinusActiveForm(DouShopLoginInfo _shop = null)
{
InitializeComponent();
shop = _shop;
}
private void FullMinusActiveForm_Load(object sender, EventArgs e)
{
cmbActState.SelectedIndex = 0;
txtActName.Focus();
}
private void dgvActive_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
if (e.ColumnIndex < 0 || e.RowIndex < 0)
return;
string columnName = dgvActive.Columns[e.ColumnIndex].Name;
long ActiveId = dgvActive.Rows[e.RowIndex].Cells["colActiveId"].Value.ParseToLong();
var row = dgvActive.Rows[e.RowIndex];
switch (columnName)
{
case "colSelect":
row.Cells["colSelect"].Value = !row.Cells["colSelect"].Value.ParseToBool();
if (dgvActive.Rows[e.RowIndex].Cells["colSelect"].Value.ParseToBool())
{
if (lstActiveId.Any(p => p == ActiveId))
lstActiveId.RemoveAll(p => p == ActiveId);
lstActiveId.Add(ActiveId);
}
else
lstActiveId.Remove(ActiveId);
break;
}
}
public void GetActive()
{
if (shop == null)
return;
ShowVisitorMessage("");
Task.Run(() =>
{
if (shop.LoginStatus == "登录成功")
fullMinusForm.GetActiveByCef(this.shop);
var rowsTemp = dgvActive.Rows.Cast<DataGridViewRow>().ToList();
rowsTemp.Reverse();
});
}
public void GetActiveSim(string listUrl, string referrerUrl, Dictionary<string, string> headers, string firstPageData = "")
{
ShowVisitorMessage("");
int total = -1;
int number = 0;
string result = "";
if (!string.IsNullOrEmpty(firstPageData))
result = firstPageData;
//获取所有活动
if (string.IsNullOrEmpty(_underline))
_underline = BaseRegex.GetMatchRegexString(ref listUrl, "&_=([\\s\\S]+?)&");
if (string.IsNullOrEmpty(_underline))
_underline = BaseRegex.GetMatchRegexString(ref listUrl, "&_=([\\s\\S]+?)");
if (string.IsNullOrEmpty(_underline))
_underline = BaseClass.DateTimeToTimestampMilliseconds(DateTime.Now).ToString();
if (string.IsNullOrEmpty(_signature))
_signature = BaseRegex.GetMatchRegexString(ref listUrl, "&_signature=([\\s\\S]+?)&");
if (string.IsNullOrEmpty(_signature))
{
var listUrl2 = listUrl + "&";
_signature = BaseRegex.GetMatchRegexString(ref listUrl2, "&_signature=([\\s\\S]+?)&");
}
listUrl = "https://fxg.jinritemai.com/marketing/activity/v1/query_full_discount_activity?activity_status=0&page=1&pageSize=20&_bid=ecom_market_shop&appid=1&_=" + _underline + "&_signature=" + _signature;
for (int i = 1; i < 9999; i++)
{
number += 20;
for (int j = 0; j < 3 && !result.Contains("\"st\":0"); j++)
{
CommonSimRequest simRequest = new CommonSimRequest();
simRequest.Accept = "application/json, text/plain, */*";
if (headers.ContainsKey("Accept"))
simRequest.Accept = headers["Accept"];
if (headers.ContainsKey("UserAgent"))
simRequest.UserAgent = headers["UserAgent"];
var cookie = shop.Cookies;
var rUrl = listUrl.Replace("page=1", "page=" + i);
result = simRequest.Request_Get(rUrl, referrerUrl, new Dictionary<string, string>(), cookie);
if (j > 0)
{
Thread.Sleep(Randomx.GetId(2000, 3000));
}
}
if (result.Contains(",\"msg\":\"成功\",\"st\":0") && !fullMinusForm.cancellationTokenSource.IsCancellationRequested)
{
this.isGetActiveSuccess = true;
if (total == -1)
{
total = BaseRegex.GetIntJson(ref result, "total");
}
var jObj = JObject.Parse(result);
var aList = JsonHelper.DeserializeJsonToList<FullMinusActiveInfo>(jObj["data"]["data"]?.ToString());
foreach (var info in aList)
{
if (this.activeList.Any(p => p.activity_id == info.activity_id))
this.activeList.RemoveAll(p => p.activity_id == info.activity_id);
this.activeList.Add(info);
}
Thread.Sleep(Randomx.GetId(1500, 2000));
}
else
{
isGetActiveSuccess = false;
break;
}
result = "";
if (number >= total)
break;
}
Invoke(new Action(() =>
{
if (fullMinusForm.cancellationTokenSource.IsCancellationRequested)
{
this.statusBar.lblTaskStatus.Text = "获取中断";
}
else if (!isGetActiveSuccess)
{
this.statusBar.lblTaskStatus.Text = "获取活动信息失败";
}
else
{
this.statusBar.lblTaskStatus.Text = "获取完成";
}
this.statusBar.pgbTaskProgress.Value = 0;
this.statusBar.pgbTaskProgress.Text = 0 + "/" + 0;
this.statusBar.pgbTaskProgress.Maximum = 0;
}));
}
public void ShowVisitorMessage(string msg)
{
Invoke(new Action(() => { this.label1.Text = msg; }));
}
private void btnSearch_Click(object sender, EventArgs e)
{
ShowVisitorMessage("");
ShowVisitorMessage("查询开始");
if (this.activeList.Count == 0)
{
if (fullMinusForm.cancellationTokenSource.IsCancellationRequested)
fullMinusForm.cancellationTokenSource = new CancellationTokenSource();
GetActiveSim("https://fxg.jinritemai.com/marketing/activity/v1/query_full_discount_activity?page=1&pageSize=20&activity_status=0&_bid=ecom_market_shop&appid=1&_=" + _underline + "&_signature=" + _signature, "https://fxg.jinritemai.com/market/center/tools/moneyoff", new Dictionary<string, string>());
}
var name = txtActName.Text.Trim();
var stateText = cmbActState.SelectedItem.ToString();
var stateVal = stateText == "全部" ? "0" : (stateText == "进行中" ? "2" : (stateText == "已结束" ? "3" : (stateText == "未开始" ? "1" : "4")));
if ((name == "" && stateVal == "0" && this.dgvActive.Rows.Count == this.activeList.Count) || this.activeList.Count == 0)
{
ShowVisitorMessage("查询完成!");
return;
}
Task.Run(() => {
List<FullMinusActiveInfo> infos = new List<FullMinusActiveInfo>();
infos = this.activeList;
if (!string.IsNullOrEmpty(name))
infos = infos.Where(x => x.activity_name == name).ToList();
if (stateVal != "0")
infos = infos.Where(x => x.activity_status == stateVal.ParseToInt()).ToList();
int totals = infos.Count;
Invoke(new Action(() => {
this.dgvActive.Rows.Clear();
for (int j = 0; j < totals; j++)
{
var info = infos[j];
var status = info.activity_status == 3 ? "已结束" : (info.activity_status == 2 ? "进行中" : (info.activity_status == 1 ? "未开始" : "已失效"));
string activeOff = string.Empty;
if (info.discounts != null)
{
if (info.activity_type == 1)
{
foreach (var dis in info.discounts)
{
activeOff += "满" + dis.condition_value.ParseToDecimal() / 100 + "元减" + dis.discount.ParseToDecimal() / 100 + "元;";
}
}
else if (info.discount_type == 1)
{
foreach (var dis in info.discounts)
{
activeOff += "满" + dis.condition_value + "件打" + dis.discount.ParseToDecimal() / 10 + "折;";
}
}
else
{
foreach (var dis in info.discounts)
{
activeOff += "满" + dis.condition_value + "件减" + dis.discount.ParseToDecimal() / 100 + "元;";
}
}
activeOff = activeOff.TrimEnd(';');
}
string activePro = string.Empty;
if (info.activity_products != null)
{
foreach (var pro in info.activity_products)
{
activePro += pro.name + ";";
}
activePro = activePro.TrimEnd(';');
}
if (lstActiveId.Contains(info.activity_id.ParseToLong()))
this.dgvActive.Rows.Add(true, info.activity_id, info.activity_name, activeOff, activePro, BaseClass.StampToDateTime(info.start_time.ParseToInt()), BaseClass.StampToDateTime(info.end_time.ParseToInt()), status);
else
this.dgvActive.Rows.Add(false, info.activity_id, info.activity_name, activeOff, activePro, BaseClass.StampToDateTime(info.start_time.ParseToInt()), BaseClass.StampToDateTime(info.end_time.ParseToInt()), status);
}
}));
ShowVisitorMessage("查询完成!");
});
}
private void btnFailed_Click(object sender, EventArgs e)
{
if (dgvActive.Rows.Count == 0 || lstActiveId.Count == 0)
{
BaseMsgForm.ShowInfo("请选择待失效的活动!");
return;
}
if (BaseMsgForm.ShowConfirm("确定将该活动设置为失效?").DialogResult == DialogResult.OK)
{
var failUrl = "https://fxg.jinritemai.com/marketing/activity/v1/disable_product_activity?activity_id={0}&_bid=ecom_market_shop&appid=1&_=" + _underline + "&_signature=" + _signature;
var cookies = shop.Cookies;
Task.Run(() =>
{
for (int i = 0; i < dgvActive.Rows.Count; i++)
{
DataGridViewRow row = dgvActive.Rows[i];
long ActiveId = row.Cells["colActiveId"].Value.ParseToLong();
if (lstActiveId.Any(p => p == ActiveId))
{
string name = row.Cells["colActiveName"].Value.ToString();
var colActiveState = row.Cells["colActiveState"].Value.ToString();
if (colActiveState != "进行中" && colActiveState != "未开始")
{
Invoke(new Action(() => { row.Cells["colMessage"].Value = name + "活动" + colActiveState + ",无需设置失效!"; }));
continue;
}
CommonSimRequest request = new CommonSimRequest();
request.ContentType = "application/json";
Dictionary<string, string> dicts = new Dictionary<string, string>();
var reqUrl = string.Format(failUrl, ActiveId);
string result = request.Request_Get(reqUrl, "https://fxg.jinritemai.com/market/center/tools/moneyoff", dicts, cookies);
if (result.Contains(",\"msg\":\"成功\",\"st\":0"))
{
Invoke(new Action(() =>
{
var activeInfo = activeList.Where(x => x.activity_id == ActiveId.ToString()).FirstOrDefault();
if (activeInfo != null)
{
activeInfo.activity_status = 4;
row.Cells["colActiveState"].Value = "已失效";
row.Cells["colMessage"].Value = "设置失效已完成!";
}
}));
Thread.Sleep(1000);
}
else
{
Invoke(new Action(() => { row.Cells["colMessage"].Value = "设置失效失败 :" + BaseRegex.GetStringJson(ref result, "msg"); }));
}
}
}
});
}
}
public void ClearData()
{
this.lstActiveId.Clear();
this.activeList.Clear();
this.dgvActive.Rows.Clear();
}
}
public class FullMinusActiveInfo
{
public string activity_id { get; set; }
public int activity_type { get; set; }
public string activity_name { get; set; }
public long start_time { get; set; }
public long end_time { get; set; }
public int discount_type { get; set; }
public int activity_status { get; set; }
public string enable_use_coupon { get; set; }
public List<ActiveDiscounts> discounts { get; set; }
public List<ActiveProducts> activity_products { get; set; }
}
public class ActiveDiscounts
{
public long activity_id { get; set; }
public long discount_id { get; set; }
public int condition_type { get; set; }
public string condition_value { get; set; }
public int discount_type { get; set; }
public string discount { get; set; }
public int discount_level { get; set; }
}
public class ActiveProducts
{
public string activity_id { get; set; }
public long shop_id { get; set; }
public string product_id { get; set; }
public int status { get; set; }
public string name { get; set; }
public string img { get; set; }
public long stock_num { get; set; }
public long max_price { get; set; }
public long min_price { get; set; }
}
}
@@ -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>
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,138 @@
<?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="colSelect.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colShopId.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colAuthStatus.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colLoginStatus.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colCanUse.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colMessage.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>
@@ -0,0 +1,206 @@
namespace LittleRabbit.LittleRabbitForms.SalesCenterForms
{
partial class FullMinusShopForm
{
/// <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()
{
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.dgvProduct = new LittleRabbit.UserComponent.DataGridViewEx();
this.label1 = new System.Windows.Forms.Label();
this.statusBar = new LittleRabbit.UserControls.StatusBarUserControl();
this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.colProductId = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colProductName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colStock = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colPrice = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colMessage = new System.Windows.Forms.DataGridViewTextBoxColumn();
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit();
this.splitContainer2.Panel1.SuspendLayout();
this.splitContainer2.Panel2.SuspendLayout();
this.splitContainer2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvProduct)).BeginInit();
this.SuspendLayout();
//
// splitContainer2
//
this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
this.splitContainer2.Location = new System.Drawing.Point(0, 0);
this.splitContainer2.Name = "splitContainer2";
this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer2.Panel1
//
this.splitContainer2.Panel1.Controls.Add(this.dgvProduct);
this.splitContainer2.Panel1.Padding = new System.Windows.Forms.Padding(4, 4, 4, 0);
//
// splitContainer2.Panel2
//
this.splitContainer2.Panel2.Controls.Add(this.label1);
this.splitContainer2.Panel2.Controls.Add(this.statusBar);
this.splitContainer2.Size = new System.Drawing.Size(1021, 469);
this.splitContainer2.SplitterDistance = 439;
this.splitContainer2.TabIndex = 10;
//
// dgvProduct
//
this.dgvProduct.AllowUserToAddRows = false;
this.dgvProduct.AllowUserToDeleteRows = false;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
this.dgvProduct.BackgroundColor = System.Drawing.Color.White;
this.dgvProduct.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
this.dgvProduct.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvProduct.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colSelect,
this.colProductId,
this.colProductName,
this.colStock,
this.colPrice,
this.colMessage});
this.dgvProduct.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvProduct.Location = new System.Drawing.Point(4, 4);
this.dgvProduct.Name = "dgvProduct";
this.dgvProduct.ReadOnly = true;
dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.dgvProduct.RowsDefaultCellStyle = dataGridViewCellStyle3;
this.dgvProduct.RowTemplate.Height = 23;
this.dgvProduct.Size = new System.Drawing.Size(1013, 435);
this.dgvProduct.TabIndex = 6;
this.dgvProduct.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvProduct_CellContentClick);
//
// label1
//
this.label1.AutoSize = true;
this.label1.ForeColor = System.Drawing.Color.MidnightBlue;
this.label1.Location = new System.Drawing.Point(536, 2);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(41, 12);
this.label1.TabIndex = 3;
this.label1.Text = "label1";
//
// statusBar
//
this.statusBar.BackColor = System.Drawing.Color.White;
this.statusBar.Dock = System.Windows.Forms.DockStyle.Fill;
this.statusBar.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.statusBar.Location = new System.Drawing.Point(0, 0);
this.statusBar.Margin = new System.Windows.Forms.Padding(0);
this.statusBar.Name = "statusBar";
this.statusBar.Size = new System.Drawing.Size(1021, 26);
this.statusBar.TabIndex = 2;
//
// colSelect
//
this.colSelect.FillWeight = 50F;
this.colSelect.HeaderText = "选";
this.colSelect.Name = "colSelect";
this.colSelect.ReadOnly = true;
this.colSelect.Resizable = System.Windows.Forms.DataGridViewTriState.False;
this.colSelect.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colSelect.Width = 41;
//
// colProductId
//
this.colProductId.HeaderText = "商品Id";
this.colProductId.Name = "colProductId";
this.colProductId.ReadOnly = true;
this.colProductId.Width = 150;
//
// colProductName
//
this.colProductName.HeaderText = "商品名称";
this.colProductName.Name = "colProductName";
this.colProductName.ReadOnly = true;
this.colProductName.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colProductName.Width = 450;
//
// colStock
//
this.colStock.HeaderText = "库存";
this.colStock.Name = "colStock";
this.colStock.ReadOnly = true;
this.colStock.Width = 60;
//
// colPrice
//
this.colPrice.HeaderText = "价格(¥)";
this.colPrice.Name = "colPrice";
this.colPrice.ReadOnly = true;
//
// colMessage
//
this.colMessage.HeaderText = "提示消息";
this.colMessage.Name = "colMessage";
this.colMessage.ReadOnly = true;
this.colMessage.Width = 300;
//
// FullMinusShopForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(1021, 469);
this.Controls.Add(this.splitContainer2);
this.Name = "FullMinusShopForm";
this.Text = "FullMinusShopForm";
this.splitContainer2.Panel1.ResumeLayout(false);
this.splitContainer2.Panel2.ResumeLayout(false);
this.splitContainer2.Panel2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
this.splitContainer2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dgvProduct)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.SplitContainer splitContainer2;
private UserComponent.DataGridViewEx dgvProduct;
private System.Windows.Forms.Label label1;
public UserControls.StatusBarUserControl statusBar;
private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect;
private System.Windows.Forms.DataGridViewTextBoxColumn colProductId;
private System.Windows.Forms.DataGridViewTextBoxColumn colProductName;
private System.Windows.Forms.DataGridViewTextBoxColumn colStock;
private System.Windows.Forms.DataGridViewTextBoxColumn colPrice;
private System.Windows.Forms.DataGridViewTextBoxColumn colMessage;
}
}
@@ -0,0 +1,307 @@
using AllBase;
using AllBase.Helper;
using AllBase.Model.Result;
using LittleRabbit.Extension;
using NaiBa.Util.Extension;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace LittleRabbit.LittleRabbitForms.SalesCenterForms
{
public partial class FullMinusShopForm : Form
{
private DouShopLoginInfo shop = null;
private CheckBox chkSelectAll = null;
public List<string> lstProductId = new List<string>();
public FullMinusForm fullMinusForm = null;
public List<DouProductPromotionListInfo> productList = new List<DouProductPromotionListInfo>();
private string _signature = "";
private string _underline = "";
public bool isGetProductSuccess = false;
public FullMinusShopForm(DouShopLoginInfo _shop = null)
{
InitializeComponent();
shop = _shop;
//设置全选按钮
chkSelectAll = dgvProduct.Columns["colSelect"].AddHeaderCheckBox(HorizontalAlignment.Center, 0, 0, null, null, false);
dgvProduct.Columns["colSelect"].HeaderText = "";
chkSelectAll.Width = chkSelectAll.Height = 13;
chkSelectAll.CheckedChanged += chkSelectAll_CheckedChanged; //全选事件
}
private void chkSelectAll_CheckedChanged(object sender, EventArgs e)
{
if (!chkSelectAll.Checked)
{
lstProductId.Clear();
foreach (DataGridViewRow row in dgvProduct.Rows)
{
row.Cells["colSelect"].Value = false;
}
}
else
{
lstProductId.Clear(); //先清空,然后把id加入list
foreach (DataGridViewRow row in dgvProduct.Rows)
{
row.Cells["colSelect"].Value = true;
long ProductId = row.Cells["colProductId"].Value.ParseToLong();
lstProductId.Add(ProductId.ToString());
}
}
}
public void ShowVisitorMessage(string msg)
{
Invoke(new Action(() => { this.label1.Text = msg; }));
}
public void GetProduct()
{
if (shop == null)
return;
ShowVisitorMessage("");
foreach (DataGridViewRow r in dgvProduct.Rows)
{
r.Cells["colStock"].Value = "获取中";
r.Cells["colMessage"].Value = "";
}
Task.Run(() =>
{
if (shop.LoginStatus == "登录成功")
fullMinusForm.GetProductByCef(shop);
var rowsTemp = dgvProduct.Rows.Cast<DataGridViewRow>().ToList();
rowsTemp.Reverse();
}).Wait();
}
public void GetProductSim(string listUrl, string referrerUrl, Dictionary<string, string> headers, string firstPageData = "", string campaign_start_time = "", string campaign_end_time = "")
{
ShowVisitorMessage("");
foreach (DataGridViewRow r in dgvProduct.Rows)
{
Invoke(new Action(() =>
{
r.Cells["colStock"].Value = "获取中";
r.Cells["colMessage"].Value = "";
}));
}
ShowVisitorMessage("正在准备获取商品");
int total = -1;
int number = 0;
string result = "";
if (!string.IsNullOrEmpty(firstPageData))
result = firstPageData;
referrerUrl = "https://fxg.jinritemai.com/market/center/tools/moneyoff";
_underline = BaseRegex.GetMatchRegexString(ref listUrl, "&_=([\\s\\S]+?)&");
if (string.IsNullOrEmpty(_underline))
_underline = BaseRegex.GetMatchRegexString(ref listUrl, "&_=([\\s\\S]+?)");
if (string.IsNullOrEmpty(_underline))
_underline = BaseClass.DateTimeToTimestampMilliseconds(DateTime.Now).ToString();
_signature = BaseRegex.GetMatchRegexString(ref listUrl, "&_signature=([\\s\\S]+?)&");
if (string.IsNullOrEmpty(_signature))
{
var listUrl2 = listUrl + "&";
_signature = BaseRegex.GetMatchRegexString(ref listUrl2, "&_signature=([\\s\\S]+?)&");
}
listUrl = "https://fxg.jinritemai.com/marketing/activity/v1/query_product?name=&page=1&pageSize=15&start_time=" + BaseClass.DateTimeToTimestampSeconds(campaign_start_time.ParseToDateTime()) + "&end_time=" + BaseClass.DateTimeToTimestampSeconds(campaign_end_time.ParseToDateTime()) + "&_bid=ecom_market_shop&appid=1&_=" + _underline + "&_signature=" + _signature;
for (int i = 1; i < 9999; i++)
{
if (i == 666)
{
}
result = "";
number += 15;
for (int j = 0; j < 3 && !result.Contains("\"st\":0"); j++)
{
CommonSimRequest simRequest = new CommonSimRequest();
simRequest.Accept = "application/json, text/plain, */*";
if (headers.ContainsKey("Accept"))
simRequest.Accept = headers["Accept"];
if (headers.ContainsKey("UserAgent"))
simRequest.UserAgent = headers["UserAgent"];
var cookie = shop.Cookies;
var rUrl = listUrl.Replace("page=1", "page=" + i);
int pageSize = 15;
if (number > 10000)
{
pageSize = 15 - (number - 10000);
if (pageSize < 0)
pageSize = 0;
rUrl = rUrl.Replace("pageSize=15", "pageSize=" + pageSize);
}
result = simRequest.Request_Get(rUrl, referrerUrl, new Dictionary<string, string>(), cookie);
if (j > 0)
{
Thread.Sleep(Randomx.GetId(250, 500));
}
ShowVisitorMessage("正在获取商品第" + i + "页");
}
if (result.Contains("\"st\":0") && !fullMinusForm.cancellationTokenSource.IsCancellationRequested)
{
this.isGetProductSuccess = true;
if (total == -1)
total = BaseRegex.GetIntJson(ref result, "total");
int totalPage = Math.Ceiling(total / 15M).ParseToInt();
string message = "正在获取商品第" + i + "页,共" + totalPage + "页";
ShowVisitorMessage("");
Invoke(new Action(() =>
{
this.statusBar.lblTaskStatus.Text = message;
this.statusBar.pgbTaskProgress.Value = i;
this.statusBar.pgbTaskProgress.Text = i + "/" + totalPage;
this.statusBar.pgbTaskProgress.Maximum = totalPage;
}));
try
{
var jObj = JObject.Parse(result);
var pList = JsonHelper.DeserializeJsonToList<DouProductPromotionListInfo>(jObj["data"]["data"]?.ToString());
foreach (var product in pList)
{
if (product.allow == false)
continue;
if (productList.Any(p => p.product_id == product.product_id))
productList.RemoveAll(p => p.product_id == product.product_id);
productList.Add(product);
Invoke(new Action(() =>
{
if (this.dgvProduct.Rows.Count >= productList.Count)
{
DataGridViewRow row = dgvProduct.Rows.Cast<DataGridViewRow>().FirstOrDefault(x => x.Cells["colProductId"].Value.ToString() == product.product_id);
if (row != null)
{
row.Cells["colStock"].Value = product.stock_num;
row.Cells["colMessage"].Value = "";
}
else
dgvProduct.Rows.Add(false, product.product_id, product.name, product.stock_num,
product.min_price / 100M + " - " + product.max_price / 100M);
}
else
dgvProduct.Rows.Add(false, product.product_id, product.name, product.stock_num,
product.min_price / 100M + " - " + product.max_price / 100M);
}));
}
Thread.Sleep(Randomx.GetId(250, 500));
}
catch (Exception)
{
isGetProductSuccess = false;
break;
}
}
else
{
isGetProductSuccess = false;
break;
}
if (number >= total)
break;
}
Invoke(new Action(() =>
{
if (fullMinusForm.cancellationTokenSource.IsCancellationRequested)
{
this.statusBar.lblTaskStatus.Text = "获取中断";
}
else if (!isGetProductSuccess)
{
this.statusBar.lblTaskStatus.Text = "获取商品信息失败";
}
else
{
this.statusBar.lblTaskStatus.Text = "获取完成";
}
//this.statusBar.pgbTaskProgress.Value = 0;
//this.statusBar.pgbTaskProgress.Text = 0 + "/" + 0;
//this.statusBar.pgbTaskProgress.Maximum = 0;
}));
}
private void dgvProduct_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
if (e.ColumnIndex < 0 || e.RowIndex < 0)
return;
string columnName = dgvProduct.Columns[e.ColumnIndex].Name;
long ProductId = dgvProduct.Rows[e.RowIndex].Cells["colProductId"].Value.ParseToLong();
var row = dgvProduct.Rows[e.RowIndex];
switch (columnName)
{
case "colSelect":
row.Cells["colSelect"].Value = !row.Cells["colSelect"].Value.ParseToBool();
if (dgvProduct.Rows[e.RowIndex].Cells["colSelect"].Value.ParseToBool())
lstProductId.Add(ProductId.ToString());
else
lstProductId.Remove(ProductId.ToString());
break;
}
}
public void ClearData()
{
this.productList.Clear();
this.lstProductId.Clear();
this.dgvProduct.Rows.Clear();
}
public string checkFullDiscountActivity(string postData, string cookies)
{
CommonSimRequest request = new CommonSimRequest();
request.ContentType = "application/json";
Dictionary<string, string> dicts = new Dictionary<string, string>();
string reqUrl = "https://fxg.jinritemai.com/marketing/activity/v1/check_full_discount_activity?_bid=ecom_market_shop&appid=1&_=" + _underline + "&_signature=" + _signature;
string result = request.Request_PostByBigLength(reqUrl, "https://fxg.jinritemai.com/market/center/tools/moneyoffCreate?refer=1&newFeature=true", dicts, cookies, postData);
return result;
}
public string createFullDiscountActivity(string postData, string cookies)
{
CommonSimRequest request = new CommonSimRequest();
request.ContentType = "application/json";
Dictionary<string, string> dicts = new Dictionary<string, string>();
string reqUrl = "https://fxg.jinritemai.com/marketing/activity/v1/create_full_discount_activity?_bid=ecom_market_shop&appid=1&_=" + _underline + "&_signature=" + _signature;
string result = request.Request_PostByBigLength(reqUrl, "https://fxg.jinritemai.com/market/center/tools/moneyoffCreate?refer=1&newFeature=true", dicts, cookies, postData);
return result;
}
public void RefreshdgvProduct(List<string> strList)
{
if (strList != null && strList.Count > 0)
{
Invoke(new Action(() =>
{
for (int i = 0; i < dgvProduct.Rows.Count; i++)
{
DataGridViewRow row = dgvProduct.Rows[i];
long ActiveId = row.Cells["colProductId"].Value.ParseToLong();
if (strList.Any(p => p == ActiveId.ToString()))
{
dgvProduct.Rows.Remove(row);
lstProductId.Remove(ActiveId.ToString());
}
}
}));
}
}
}
}
@@ -0,0 +1,138 @@
<?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="colSelect.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colProductId.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colProductName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colStock.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colPrice.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colMessage.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>
@@ -0,0 +1,131 @@
namespace LittleRabbit.LittleRabbitForms.SalesCenterForms
{
partial class GroupBuyCustomActivityNameForm
{
/// <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()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(GroupBuyCustomActivityNameForm));
this.panel2 = new System.Windows.Forms.Panel();
this.labelX1 = new DevComponents.DotNetBar.LabelX();
this.textBoxX1 = new DevComponents.DotNetBar.Controls.TextBoxX();
this.btnSave = new DevComponents.DotNetBar.PanelEx();
this.panel2.SuspendLayout();
this.SuspendLayout();
//
// panel2
//
this.panel2.BackColor = System.Drawing.Color.White;
this.panel2.Controls.Add(this.labelX1);
this.panel2.Controls.Add(this.textBoxX1);
this.panel2.Controls.Add(this.btnSave);
this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel2.Location = new System.Drawing.Point(1, 33);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(383, 416);
this.panel2.TabIndex = 1;
//
// labelX1
//
this.labelX1.AutoSize = true;
//
//
//
this.labelX1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.labelX1.ForeColor = System.Drawing.Color.Gray;
this.labelX1.Location = new System.Drawing.Point(16, 11);
this.labelX1.Name = "labelX1";
this.labelX1.Size = new System.Drawing.Size(359, 18);
this.labelX1.TabIndex = 462;
this.labelX1.Text = "请输入自定义活动名称,一行一个(长度1-5个字,必须为中文):";
//
// textBoxX1
//
this.textBoxX1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
//
//
//
this.textBoxX1.Border.Class = "TextBoxBorder";
this.textBoxX1.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.textBoxX1.Location = new System.Drawing.Point(16, 35);
this.textBoxX1.Multiline = true;
this.textBoxX1.Name = "textBoxX1";
this.textBoxX1.PreventEnterBeep = true;
this.textBoxX1.Size = new System.Drawing.Size(351, 338);
this.textBoxX1.TabIndex = 461;
//
// btnSave
//
this.btnSave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnSave.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnSave.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnSave.DisabledBackColor = System.Drawing.Color.Empty;
this.btnSave.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSave.Location = new System.Drawing.Point(309, 379);
this.btnSave.Name = "btnSave";
this.btnSave.Size = new System.Drawing.Size(58, 23);
this.btnSave.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnSave.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnSave.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnSave.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnSave.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnSave.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnSave.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnSave.Style.GradientAngle = 90;
this.btnSave.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnSave.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnSave.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnSave.TabIndex = 460;
this.btnSave.Text = "保存";
this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
//
// GroupBuyCustomActivityNameForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(385, 450);
this.Controls.Add(this.panel2);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "GroupBuyCustomActivityNameForm";
this.Text = "自定义拼团活动名称";
this.TitleText = "自定义拼团活动名称";
this.Controls.SetChildIndex(this.panel2, 0);
this.panel2.ResumeLayout(false);
this.panel2.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Panel panel2;
private DevComponents.DotNetBar.LabelX labelX1;
private DevComponents.DotNetBar.Controls.TextBoxX textBoxX1;
private DevComponents.DotNetBar.PanelEx btnSave;
}
}
@@ -0,0 +1,36 @@
using LittleRabbit.LittleRabbitForms.BaseForms;
using NaiBa.Util;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace LittleRabbit.LittleRabbitForms.SalesCenterForms
{
public partial class GroupBuyCustomActivityNameForm : LRBaseForm
{
public GroupBuyCustomActivityNameForm()
{
InitializeComponent();
this.Load += GroupBuyCustomActivityNameForm_Load;
}
private void GroupBuyCustomActivityNameForm_Load(object sender, EventArgs e)
{
this.textBoxX1.Text = string.Join("\r\n", GroupBuyForm.CustomActivityNames) + "\r\n";
}
private void btnSave_Click(object sender, EventArgs e)
{
GroupBuyForm.CustomActivityNames = this.textBoxX1.Text.Trim().Split(new string[] { "\r", "\n" }, StringSplitOptions.RemoveEmptyEntries).ToList();
NaiBa.Util.Helper.ConfigHelper.SaveConfig<List<string>>("group_buy_custom_names", GroupBuyForm.CustomActivityNames);
this.Close();
}
}
}
@@ -0,0 +1,298 @@
<?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>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAgIAQcgAAAABoKAAAFgAAACgAAACAAAAAAAEAAAEABAAAAAAAACgAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAACAAACAAAAAgIAAgAAAAIAAgACAgAAAgICAAMDAwAAAAP8AAP8AAAD//wD/AAAA/wD/AP//
AAD///8AAAAAAAAAAAAAAAAABEZmbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMZmZkQAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAZszMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM
zMxmAAAAAAAAAAAAAAAAAAAAAAAAAAAEbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM
zMzMzMzMzMZAAAAAAAAAAAAAAAAAAAAAAAAEbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM
zMzMzMzMzMzMzMzMxkAAAAAAAAAAAAAAAAAAAAAEbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM
zMzMzMzMzMzMzMzMzMzMzMzGQAAAAAAAAAAAAAAAAAAAbMzMzMzMzMzMzMzMzMzMzMzMzMd3d3d3d3d3
d3d3fMzMzMzMzMzMzMzMzMzMzMzMzMYAAAAAAAAAAAAAAAAARszMzMzMzMzMzMzMzMzMzMd3d3iIiIiI
iIiIiIiIiIh3d3d8zMzMzMzMzMzMzMzMzMzMZAAAAAAAAAAAAAAABszMzMzMzMzMzMzMzMzMx3eIiIiI
iIiIiIiIiIiIiIiIiIiIiHd8zMzMzMzMzMzMzMzMzMxgAAAAAAAAAAAAAGzMzMzMzMzMzMzMzMzMd4iI
iIiIiIiIiIiIiIiIiIiIiIiIiIiIiHfMzMzMzMzMzMzMzMzMxgAAAAAAAAAAAAbMzMzMzMzMzMzMzMzH
eIiIiIiIiIiHZmZmZmZmZmZmZ3eIiIiIiIiIiHzMzMzMzMzMzMzMzMxgAAAAAAAAAABszMzMzMzMzMzM
zMzHiIiIiIiHZmZmZmZmZmZmZmZmZmZmZmZmeIiIiIiIfMzMzMzMzMzMzMzMxgAAAAAAAAAGzMzMzMzM
zMzMzMzHiIiIiIdmZmZmZgAAAAAAAAAAAAZmZmZmZmZmeIiIiIh8zMzMzMzMzMzMzMxgAAAAAAAATMzM
zMzMzMzMzMzHiIiIiHZmZgAAAAAAAAAAAAEAAAAAAAAAAGZmZmZniIiIiHzMzMzMzMzMzMzMxAAAAAAA
AGzMzMzMzMzMzMzMeIiIiGZmAAAAAAERERmZmZmZmZmZkRERERAAAGZmZmZ4iIiIfMzMzMzMzMzMzMYA
AAAAAAbMzMzMzMzMzMzMeIiIiGZgAAAAERmZmZmZmZmZmZmZmZmZmZmZkREAAGZmZniIiIfMzMzMzMzM
zMzMYAAAAABMzMzMzMzMzMzMzIiIiHYAAAARGZmZiIiIj///////+IiIiIeZmZmZkREAZmZmiIiIfMzM
zMzMzMzMzMQAAAAAbMzMzMzMzMzMzO6IiIYAAAARmYiI/////////////////////4iHmZmZEQBmZmeI
iIh8zMzMzMzMzMzGAAAABMzMzMzMzMzMzMeIiIdgAAAZmI////////////////////////////iJmZmR
EGZmZ4iIh8zMzMzMzMzMzEAAAAbMzMzMzMzMzMzoiIhwAAAZeP//////////////////////////////
/4iZmZEAZmZ4iIh8zMzMzMzMzMxgAABMzMzMzMzMzMzOiIiGAAABiP//////////////////////////
////////+JmZkQZmZ4iIh8zMzMzMzMzMxAAAbMzMzMzMzMzM7oiIYAABeP//////////////////////
///////////////4mZkQZmZ4iIjMzMzMzMzMzMYAAMzMzMzMzMzMzu6IhwAAGP//////////////////
/////////////////////4iZmRZmZ4iIfMzMzMzMzMzMAAbMzMzMzMzMzM7oiHAAB4//////////////
////////////////////////////iZmRBmZ4iIfMzMzMzMzMzGAGzMzMzMzMzMzuiIcAAHj/////////
//////////////////////////////////iZmRZmZ4iIzMzMzMzMzMxgDMzMzMzMzMzM7ohwAAf/////
////////////////////////////////////////95mRZmaIiHzMzMzMzMzMwEzMzMzMzMzMzuiIEABo
//////////////////////////////////////////////95mRZmaIiMzMzMzMzMzMRszMzMzMzMzM7o
hwAGj///////////////////////////////////////////////95kQZmeIh8zMzMzMzMzGbMzMzMzM
zMzu6HEAB/////////////////////////////////////////////////+ZkQZmiIjMzMzMzMzMxmzM
zMzMzMzM7ohwAGj/////////////////////////////////////////////////iZkWZniIfMzMzMzM
zMZszMzMzMzMxu6HEAbv/4iI/////////////////////////////////////////4iP//iZEGZoiHzM
zMzMzMzGbMzMzMzMzM7uhxAGj/iIiIj//////////////////////////////////////4iIiI//mZFm
aIiMzMzMzMzMxszMzMzMzMzO6IEAbv+IiIiIj/////////////////////////////////////iIiIiP
/4mRBmeIh8zMzMzMzMbMzMzMzMzMbuhxAG7/iIiIiI////////////////iIj///j//////////////4
iIiIiP/5mQZmiIfMzMzMzMzMzMzMzMzMzO7ocQDo+IiIiIiP///////////////u7u7u7u7o////////
////iIiIiIj/+JkWZoiHzMzMzMzMzMzMzMzMzMzu6BEG7/iIiIiIj/////////////+Hd3ju5maO7v//
/////////4iIiIiI//iZEGaIh8zMzMzMzMzMzMzMzMzM7ugRBu//iIiIiI//////////////kZmZdmAZ
mP/////////////4iIiIiP//mRBmeIjMzMzMzMzMzMzMzMzMzO7nEAbv/4iIiIiP////////////+HiI
mZEBd5n/////////////+IiIiIj//4mQZniIzMzMzMzMzMzMzMzMzMzu5xAO7//4iIiI//ju7o//////
//j//4mZeP/4//////////////iIiIiP//+JkGZ4iHzMzMzMzMzMzMzMzMzG7ocQDu///4iI//ju7u7u
j//////////4mP//////////////7u7uiIiI////iZBmaIh8zMzMzMzMzMzMzMzMzu6HEG7v//////+G
ZmZ47u7//////////4//////////////7u7u7u6P/////4mQBmiIfMzMzMzMzMzMzMzMzM7uhRBu7///
///3AAAAF37u7///////////////////////h2AABm7u7v/////5kAZ4iHzMzMzMzMzMzMzMzMzO7oUQ
bu//////gQAAZgEG7u//////////////////////+BAAAAAFfu6P////+ZAGeIjMzMzMzMzMzMzMzMzM
zu6FEG7v////+JEAAXhwAG7o/////////////////////4gAABEGARbu7/////kQBoiIzMzMzMzMzMzM
zMzMzM7uhRBu7/////iZABmZkQBm6P////////////////////+JABGZF2AAbo////+JEGaIiMzMzMzM
zMzMzMzMzMzO7ucRbu/////4mRZ4iZkQBu//////////////////////mQB5mZdgAG7/////iRBmiIfM
zMzMzMzMzMzMzMzMxu7nEQ7v////+Bl+j/iZEAaP/////////////////////5l2/4mRAABu/////4kQ
ZoiHzMzMzMzMzMzMzMzMzMzu5xEO6P//+Phgbu/4kQAI//////////////////////+Zfo/4kQAAeIiP
//+JEGaIh8zMzMzMzMzMzMzMzMzM7ucRBu7///iOYHiI+HAAf///////////////////////mYjv+BAA
BuiIj///iQBniIfMzMzMzMzMzMzMzMzMzO7nEQbu///3EAAG6IcRF4iP/////////////////////4GP
/4cQAAZnbv///5EAaIiMzMzMzMzMzMzMzMzMzMzu5xEW7v//iRF3dmZgAXjmj///////////////////
///3ePiBEQAHdm7///iRAGiIfMzMzMzMzMzMzMzMzMzM7u5xFu6P/5EZmXZmZmbmaP//////////////
///////4/4d2cRAAFwbuj//4kQZoiHzMzMzMzMzMzMzMzMzMzG7ucRDu7/iXiZkQAAZmAH//////////
////////////+IiIdmYABmAX//j/+BAGeIh8zMzMzMzMzMzMzMzMzMzO7nEQbu/4iP+BERkREZf/////
//////////////////+JmXdxEBEAB3////kQBoiIzMzMzMzMzMzMzMzMzMzMzu5xEW7o+P//gZmZmZmP
////////////////////////+JmZmZmZl453//+JAGaIh8zMzMzMzMzMzMzMzMzMzM7u5xEO7vj/+IeP
iIj////////////////////////////4iZmZmZiPiP//cQBoiIfMzMzMzMzMzMzMzMzMzMzM7ucRFu6P
//iP//////////////////////////////////////+Jn/j/+JAAaIiMzMzMzMzMzMzMzMzMzMzMzO7n
ERbu7//4/////////////////////////////////////////4j///gQBoiIfMzMzMzMzMzMzMzMzMzM
zMzu7nERbuj////////////////////////////////////////////4//+BAAaIiMzMzMzMzMzMzMzM
zMzMzMzMzu5xEW7u////////////////////////////////////////////////cQBoiIfMzMzMzMzM
zMzMzMzMzMzMzM7u5xEW7u//////////////////////////////////////////////+BAAaIiMzMzM
zMzMzMzMzMzMzMzMzMzO7uYREO7o//7v//////////////////////////////////////////cABoiI
fMzMzMzMzMzMzMzMzMzMzMzMzO7ucRFu7oj/7o////////////////////////////////////////9x
AAeIiMzMzMzMzMzMzMzMzMzMzMzMzMzO7ucRFu7nePju7u7v////////////////////////////////
6P/4EAB4iIfMzMzMzMzMzMzMzMzMzMzMzMzMzu7nERBu7nmIiO7oj///////////////////////////
ju7u7o//hwAGiIh8zMzMzMzMzMzMzMzMzMzMzMzMzMzu7nERbu7nmZl5eP//////////////////////
///4iPiO5nj/+HAAaIiIzMzMzMzMzMzMzMzMzMzMzMzMzMzM7u7nERbu7oiZeI//////////////////
////////+ImXd5mP/4cAAHiIh8zMzMzMzMzMzMzMzMzMzMzMzMzMzM7u53ERbu7v////////////////
///////////////4iZl4//hgAAeIiHzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM7u53ERBu7v//////////
//////////////////////////+GAAB4iI7MzMzMzMzMzMzMzMzMzMzMzMzMzMzMzO7uiHEADujv////
///////////////////////////////3AAAGiIh8zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzO7ohwABmP
////////////////////////////////////iREAZniIjMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzuiI
EAB4f///////////////////////////////////+JmZkWZoiIfMzMzMzMzMzMzMzMzMzMzMzMzMzMzM
zO6IhwBo//////////////////////////////////////iImZl2ZoiIzMzMzMzMzMzMzMzMzMzMzMzM
zMzMzMzuiHAA7////////////////////////////////////////4iZFmZ4iHzMzMzMzMzMzMzMzMzM
zMzMzMzMzMzO6IgQBo/////4j///////////////////////////////////mZFmaIiMzMzMzMzMzMzM
zMzMzMzMzMzMzMzMzuiHAA7/////iIiP//////7o//////////////////iI/////4mRZmeIh8zMzMzM
zMzMzMzMzMzMzMzMzMzMzO6IcQBo////+IiIiI/////+7u7u7uiIiI7u7v////iIiI/////5mRZmiIjM
zMzMzMzMzMzMzMzMzMzMzMzMzMzuiHAA7////4iIiIiIj//3d2bu7u7u7u7u7u7//4iIiIiP////+JkW
ZniIfMzMzMzMzMzMzMzMzMzMzMzMzMzO6IcQBo////+IiIiIiI//+ZkAAGZmZmZmZmbv//iIiIiIiP//
//+ZkWZoiIzMzMzMzMzMzMzMzMzMzMzMzMzMzuiFAG7////4iIiIiIj///iZABEREREREBAG7//4iIiI
iIj/////iZFmaIiMzMzMzMzMzMzMzMzMzMzMzMzMzO6IcQBo////+IiIiIiI///4kQARERERERERDo//
+IiIiIiIj/////mZBmeIh8zMzMzMzMzMzMzMzMzMzMzMzMzuiHAG7////4iIiIiIiP//+JFmeHd3d3dx
EW6P//iIiIiIiI/////4mRZmiIfMzMzMzMzMzMzMzMzMzMzMzMzO7ocQBo////+IiIiIiIj///iQZoiO
7u7u5xFu7//4iIiIiIiI////+JkWZniIzMzMzMzMzMzMzMzMzMzMzMzMzuiHEA7////4iIiIiIiP///5
kGaIju7u7ucRbu///4iIiIiIiP////95kGZ4iHzMzMzMzMzMzMzMzMzMzMzMzM7ogQBu////+IiIiIiI
j///+RBmiI7u7u7nEW7v//+IiIiIiIiP////iZFmaIh8zMzMzMzMzMzMzMzMzMzMzMzu6HEAaP////iI
iIiIiI////kQZoiHzMzu5xEO6P//iIiIiIiIj////4mRZmiIjMzMzMzMzMzMzMzMzMzMzMzM7ugRBu//
///4iIiIiIj///+JEGaIh8zM7ucRBu7//4iIiIiIiI/////5kQZniIzMzMzMzMzMzMzMzMzMzMzMzO6I
EAbv////iIiIiIiI////iQBniIzMzO7oERbu///4iIiIiIiP////+JkGZ4iHzMzMzMzMzMzMzMzMzMzM
zMbuhxAGj////4iIiIiIj////3kAaIiMzMzu7nEW7v//+IiIiIiIiP////iZFmaIh8zMzMzMzMzMzMzM
zMzMzMzO7oUQbv////+IiIiIiI////+RBmiIfMzMzu5xFu6P//+IiIiIiIj////4mRZmiIfMzMzMzMzM
zMzMzMzMzMzMzu6BAG7////4iIiIiIj////4kQZoiHzMzM7ucRDu7///iIiIiIiIj////5kQZoiHzMzM
zMzMzMzMzMzMzMzMzM7ocQBu////+IiIiIiI////+JAGeIh8zMzO7nERbu///4iIiIiIiI////95EGaI
h8zMzMzMzMzMzMzMzMzMzMxu6HEA7v////iIiIiIiP////cQBoiIzMzMzu7lEW7v///4iIiIiIiP////
iRBmeIjMzMzMzMzMzMzMzMzMzMzM7uhxBuj////4iIiIiI/////5EAaIiMzMzMbu5xEO7v//+IiIiIiI
j////4kQZniIzMzMzMzMzMzMzMzMzMzMzO7oEQbv////+IiIiIj/////iQBmiIfMzMzM7ucRBu7///iI
iIiIiIj///+JkGZ4iMzMzMzMzMzMzMzMzMzMzMzu6BEG7/////iIiIiI/////4EAaIiHzMzMzO7nERbu
j///iIiIiIiI////iZBmaIh8zMzMzMzMzMzMzMzMzMzM7ucRBu/////4iIiIj/////+RAGiIjMzMzMzu
7nEQ7u////iIiIiIiP///4mQBmiIfMzMzMzMzMzMzMzMzMzMzO7nEAbv////+IiIiP/////4EAZ4iHzM
zMzMzu5xEG7v///4iIiIiIj///+JkAZoiHzMzMzMzMzMxmzMzMzMzMzu5xAO7/////+IiI//////+RAG
iIjMzMzMzM7ucRFu7v///4iIiIiI////+ZAGaIh8zMzMzMzMzMZszMzMzMzG7ocQDu//////+I//////
/4EAZoiIzMzMzMzO7ucRBu7////4iIiIiP////mQBmiIfMzMzMzMzMzGbMzMzMzMzu6HEA7v////////
//////9xAGiIh8zMzMzMzO7nERbu7///+IiIiI/////5kAZoiHzMzMzMzMzMxmzMzMzMzM7uhxAO7///
///////////4EABoiIzMzMzMzMzu7nEQbu////+IiIiP////+ZAGaIh8zMzMzMzMzMZszMzMzMzO7oUQ
Du//////////////9xAGiIh8zMzMzMzM7u5xEW7u/////4iI//////mQBmiIfMzMzMzMzMzGTMzMzMzM
zu6HEA7v/////////////4EABoiIzMzMzMzMzM7u5xEG7v/////////////5kAZoiHzMzMzMzMzMxAzM
zMzMzM7uhxEO7/////////////9wAGiIh8zMzMzMzMzO7ucRFu7v////////////+RAGeIh8zMzMzMzM
zMAGzMzMzMzO7ucRDuj////////////4EAB4iIzMzMzMzMzMzO7ucRBu6P///////////4kQBoiIzMzM
zMzMzMxgBszMzMzMxu7nEQbo////////////gQAGiIh8zMzMzMzMzMzu7nERDu7///////////+JEAaI
iMzMzMzMzMzMYADMzMzMzMzu5xEG7v///////////3EAZ4iIzMzMzMzMzMzMzu7nERbu7///////////
gQBmiIfMzMzMzMzMzAAAbMzMzMzM7ucRBu7///////////gQAGiIh8zMzMzMzMzMzM7u5xEQbu7/////
/////5EAZ4iHzMzMzMzMzMYAAEzMzMzMzO7nERDu7/////////+HAAaIiIzMzMzMzMzMzMzM7u5xEQ7u
7/////////gQAGiIjMzMzMzMzMzEAAAGzMzMzMzu7nEQbuj////////4cAAHiIh8zMzMzMzMzMzMzO7u
dxEW7uj////////3AAZoiHzMzMzMzMzMYAAABMzMzMzM7u5xEG7u////////hgAAeIiHzMzMzMzMzMzM
zMzO7ucREW7u7///////gQAGiIh8zMzMzMzMzEAAAABszMzMzM7ucREG7uj/////hmAAB4iI7MzMzMzM
zMzMzMzMzu7ucREG7u6P////+AAAB4iIzMzMzMzMzMYAAAAATMzMzMzO7ucREG7u7oiO7mAAAHiIiMzM
zMzMzMzMzMzMzMzu7ucREG7u7o//+HYAAHiIh8zMzMzMzMzEAAAAAAbMzMzMzu7nEREG7u7u5mAAAAeI
iIfMzMzMzMzMzMzMzMzMzu7ucREQbu7u7uYAAAeIiHzMzMzMzMzMYAAAAAAAbMzMzMzu7nEREAZmZgAA
AAF4iI58zMzMzMzMzMzMzMzMzMzu7ncREQZm7mZgAAB4iI7MzMzMzMzMxgAAAAAAAEzMzMzM7u7nEREQ
AAAAABF4iI7uzMzMzMzMzMzMzMzMzMzM7u7ucRERAAAAAAAHiIiMzMzMzMzMzMQAAAAAAAAGzMzMzM7u
7nERERERERF3iIju7MzMzMzMzMzMzMzMzMzMzM7u7udREREQAAAReIiIfMzMzMzMzMxgAAAAAAAAAGzM
zMzM7u7udRERERV4iI7u7MzMzMzMzMzMzMzMzMzMzMzM7u7u5xEREREReIiO7MzMzMzMzMzGAAAAAAAA
AAAGzMzMzM7u7u53d3eIiO7u7szMzMzMzMzMzMzMzMzMzMzMzM7u7u7nd1F3eIiO7uzMzMzMzMzMYAAA
AAAAAAAAAGzMzMzM7u7u7u7u7u7u7szMzMzMzMzMzMzMzMzMzMzMzMzMzu7u7u6IiI7u7uzMzMzMzMzM
xgAAAAAAAAAAAAAGzMzMzMzu7u7u7u7u5szMzMzMzMzMzMzMzMzMzMzMzMzMzMzO7u7u7u7u7u7MzMzM
zMzMzGAAAAAAAAAAAAAAAEbMzMzMzG7u7u7ubMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM7u7u7u7uzM
zMzMzMzMzGQAAAAAAAAAAAAAAAAAbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzG7u
7szMzMzMzMzMzMYAAAAAAAAAAAAAAAAAAARszMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM
zMzMzMzMzMzMzMzMzMZAAAAAAAAAAAAAAAAAAAAABGzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM
zMzMzMzMzMzMzMzMzMzMzMZAAAAAAAAAAAAAAAAAAAAAAAAEbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM
zMzMzMzMzMzMzMzMzMzMzMzMzMZAAAAAAAAAAAAAAAAAAAAAAAAAAABmzMzMzMzMzMzMzMzMzMzMzMzM
zMzMzMzMzMzMzMzMzMzMzMzMzMzMzGYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARGZmzMzMzMzMzMzMzM
zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMZmZEAAAAAAAAAAAAAAAAD////+AAAAAAAAAAD/////////AAAA
AAAAAAAAAP//////+AAAAAAAAAAAAAAf/////+AAAAAAAAAAAAAAB/////+AAAAAAAAAAAAAAAH////+
AAAAAAAAAAAAAAAAf////AAAAAAAAAAAAAAAAD////AAAAAAAAAAAAAAAAAP///gAAAAAAAAAAAAAAAA
B///wAAAAAAAAAAAAAAAAAP//4AAAAAAAAAAAAAAAAAB//8AAAAAAAAAAAAAAAAAAP/+AAAAAAAAAAAA
AAAAAAB//gAAAAAAAAAAAAAAAAAAf/wAAAAAAAAAAAAAAAAAAD/4AAAAAAAAAAAAAAAAAAAf+AAAAAAA
AAAAAAAAAAAAH/AAAAAAAAAAAAAAAAAAAA/wAAAAAAAAAAAAAAAAAAAP4AAAAAAAAAAAAAAAAAAAB+AA
AAAAAAAAAAAAAAAAAAfAAAAAAAAAAAAAAAAAAAADwAAAAAAAAAAAAAAAAAAAA8AAAAAAAAAAAAAAAAAA
AAOAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAA
AAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAABAAAAAAAA
AAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAA
AAGAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAA
AAAAAAABgAAAAAAAAAAAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAPAAAAAAAAAAAAAAAAAAAADwAAAAAAA
AAAAAAAAAAAAA+AAAAAAAAAAAAAAAAAAAAfgAAAAAAAAAAAAAAAAAAAH8AAAAAAAAAAAAAAAAAAAD/AA
AAAAAAAAAAAAAAAAAA/4AAAAAAAAAAAAAAAAAAAf+AAAAAAAAAAAAAAAAAAAH/wAAAAAAAAAAAAAAAAA
AD/+AAAAAAAAAAAAAAAAAAB//gAAAAAAAAAAAAAAAAAAf/8AAAAAAAAAAAAAAAAAAP//gAAAAAAAAAAA
AAAAAAH//8AAAAAAAAAAAAAAAAAD///gAAAAAAAAAAAAAAAAB///8AAAAAAAAAAAAAAAAA////wAAAAA
AAAAAAAAAAA////+AAAAAAAAAAAAAAAAf////4AAAAAAAAAAAAAAAf/////gAAAAAAAAAAAAAAf/////
+AAAAAAAAAAAAAAf//////8AAAAAAAAAAAAA/////////gAAAAAAAAAAf////w==
</value>
</data>
</root>
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,902 @@
using AllBase;
using AllBase.Helper;
using AllBase.Model.Result;
using CefSharp;
using CefSharp.WinForms;
using LittleRabbit.Extension;
using LittleRabbit.Helper;
using LittleRabbit.LittleRabbitForms.BaseForms;
using LittleRabbit.LittleRabbitForms.ShopForms;
using NaiBa.CefHelper;
using NaiBa.CefHelper.Handler;
using NaiBa.Util;
using NaiBa.Util.Extension;
using Newtonsoft.Json.Linq;
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;
namespace LittleRabbit.LittleRabbitForms.SalesCenterForms
{
public partial class GroupBuyForm : Form
{
public static List<string> CustomActivityNames = new List<string>();
private CheckBox chkSelectAll = null;
public ChromiumWebBrowser webBrowser = null;
private List<string> lstShopId = new List<string>();
public List<string> keywords = null;
public List<string> filterWords = null;
public decimal priceMin;
public decimal priceMax;
public int saleMin;
public int saleMax;
public int getPage;
public CancellationTokenSource cancellationTokenSource = null;
public GroupBuyForm()
{
InitializeComponent();
}
private void GroupBuyFrom_Load(object sender, EventArgs e)
{
dtpStartTime.Value = DateTime.Now;
dtpEndTime.Value = dtpStartTime.Value.AddDays(1);
CustomActivityNames = NaiBa.Util.Helper.ConfigHelper.LoadConfig<List<string>>("group_buy_custom_names");
if (CustomActivityNames == null)
{
CustomActivityNames = new List<string>();
}
for (int i = 1; i <= 20; i++)
{
this.cmbLimitCount.Items.Add(i + "个");
}
this.cmbLimitCount.SelectedIndex = 0;
this.cmbCancelTime.SelectedIndex = 1;
this.cmbStockType.SelectedIndex = 1;
this.cmbDiscountType.SelectedIndex = 0;
this.cmbSkuOptionType.SelectedIndex = 0;
this.ucTabControl1.TabPages.Clear();
chkSelectAll = dgvShop.Columns["colSelect"].AddHeaderCheckBox(HorizontalAlignment.Center, 0, 0, null, null, false);
dgvShop.Columns["colSelect"].HeaderText = "";
chkSelectAll.Width = chkSelectAll.Height = 13;
chkSelectAll.CheckedChanged += chkSelectAll_CheckedChanged;
}
private void chkSelectAll_CheckedChanged(object sender, EventArgs e)
{
if (!chkSelectAll.Checked)
{
lstShopId.Clear();
foreach (DataGridViewRow row in dgvShop.Rows)
{
row.Cells["colSelect"].Value = false;
}
}
else
{
lstShopId.Clear();
var list = GlobalConfig.DouShopLoginList.Where(s => s.ApiAuthStatus == "授权成功" && s.LoginStatus == "登录成功").Select(ss => ss.ShopAccountId);
lstShopId.AddRange(list);
foreach (DataGridViewRow row in dgvShop.Rows)
{
if (list.Any(l => l == row.Cells["colShopId"]?.Value?.ToString()))
row.Cells["colSelect"].Value = true;
}
}
}
private void chkAutoGroup_CheckedChanged(object sender, EventArgs e)
{
}
private void cmbDiscountType_SelectedValueChanged(object sender, EventArgs e)
{
}
private void GroupBuyForm_VisibleChanged(object sender, EventArgs e)
{
if (Visible == true)
RefreshShop();
}
private void btnRefreshShop_Click(object sender, EventArgs e)
{
RefreshShop();
}
private void RefreshShop()
{
// 更新选中的上货店铺Id
lstShopId = lstShopId.Where(id => GlobalConfig.DouShopLoginList.Any(s => s.ShopAccountId == id && s.LoginStatus == "已授权")).ToList();
// 获取被删除的店铺
List<DataGridViewRow> dgvRowList = dgvShop.Rows.Cast<DataGridViewRow>().Where(row
=> !GlobalConfig.DouShopLoginList.Any(s => s.ShopAccountId == row.Cells["colShopId"]?.Value?.ToString())).ToList();
// 更新被删除的店铺列表
foreach (var row in dgvRowList)
{
dgvShop.Rows.Remove(row);
}
// 绑定其他店铺(含新导入的店铺)
foreach (DouShopLoginInfo shopEntity in GlobalConfig.DouShopLoginList)
{
BindShop(shopEntity);
}
}
private void BindShop(DouShopLoginInfo shopEntity)
{
if (shopEntity == null)
return;
bool canUse = shopEntity.ApiAuthStatus == "授权成功" && shopEntity.LoginStatus == "登录成功";
var row = dgvShop.Rows.Cast<DataGridViewRow>().FirstOrDefault(p => p.Cells.GetCellValueFromColumnName("colShopId").ParseToString() == shopEntity.ShopAccountId);
if (row == null)
{
this.dgvShop.Rows.Add(
lstShopId.Contains(shopEntity.ShopAccountId) && canUse,
shopEntity.ShopAccountId,
shopEntity.ShopAccount,
shopEntity.ApiAuthStatus,
shopEntity.LoginStatus,
canUse,
string.Empty
);
}
else
{
row.Cells["colSelect"].Value = lstShopId.Contains(shopEntity.ShopAccountId) && canUse;
row.Cells["colShopName"].Value = shopEntity.ShopAccount;
row.Cells["colAuthStatus"].Value = shopEntity.ApiAuthStatus;
row.Cells["colLoginStatus"].Value = shopEntity.LoginStatus;
row.Cells["colCanUse"].Value = canUse;
}
}
private void cmbDiscountType_SelectedIndexChanged(object sender, EventArgs e)
{
if (cmbDiscountType.Text == "打折")
{
nudDiscountValue.Maximum = 9.9m;
nudDiscountValue.Minimum = 0.1m;
nudDiscountValue.Increment = 0.1m;
nudDiscountValue.DecimalPlaces = 1;
nudDiscountValue.Value = 9.9m;
}
else if (cmbDiscountType.Text == "直降")
{
nudDiscountValue.Maximum = 10000m;
nudDiscountValue.Minimum = 0.00m;
nudDiscountValue.Increment = 1m;
nudDiscountValue.DecimalPlaces = 2;
nudDiscountValue.Value = 1m;
}
else if (cmbDiscountType.Text == "一口价")
{
BaseMsgForm.ShowInfo("确定所有商品及Sku价格都按照统一价格设置,请谨慎操作!");
nudDiscountValue.Maximum = 10000m;
nudDiscountValue.Minimum = 0.00m;
nudDiscountValue.Increment = 1m;
nudDiscountValue.DecimalPlaces = 2;
nudDiscountValue.Value = 100m;
}
}
private void cmbStockType_SelectedIndexChanged(object sender, EventArgs e)
{
if (cmbStockType.Text == "全部库存")
{
nudStockValue.Enabled = false;
nudStockValue.Value = 100;
nudStockValue.Width = 48;
lblPercentSign.Visible = true;
}
else if (cmbStockType.Text == "百分比库存")
{
nudStockValue.Enabled = true;
nudStockValue.Maximum = 100m;
nudStockValue.Minimum = 1m;
nudStockValue.Increment = 1m;
nudStockValue.DecimalPlaces = 0;
nudStockValue.Value = 50m;
nudStockValue.Width = 48;
lblPercentSign.Visible = true;
}
else if (cmbStockType.Text == "统一库存")
{
nudStockValue.Enabled = true;
nudStockValue.Maximum = 10000m;
nudStockValue.Minimum = 1m;
nudStockValue.Increment = 1m;
nudStockValue.DecimalPlaces = 0;
nudStockValue.Value = 100m;
nudStockValue.Width = 65;
lblPercentSign.Visible = false;
}
}
private void btnGetProduct_Click(object sender, EventArgs e)
{
if (lstShopId.Count == 0)
{
BaseMsgForm.ShowInfo("请选择店铺!");
return;
}
try
{
this.keywords = txtProductName.Text.Trim().Split(new string[] { "\r", "\n", ",", "," }, StringSplitOptions.RemoveEmptyEntries).ToList();
this.filterWords = txtFilter.Text.Trim().Split(new string[] { "\r", "\n", ",", "," }, StringSplitOptions.RemoveEmptyEntries).ToList();
this.priceMin = txtPriceMin.Text.ParseToDecimal();
this.priceMax = txtPriceMax.Text.ParseToDecimal();
this.saleMin = txtSaleMin.Text.ParseToInt();
this.saleMax = txtSaleMax.Text.ParseToInt();
this.getPage = txtGetPage.Text.ParseToInt();
}
catch (Exception ex)
{
BaseMsgForm.ShowError("请正确填写搜索参数!");
return;
}
btnGetProduct.Enabled = false;
cancellationTokenSource = new CancellationTokenSource();
Task.Run(() =>
{
foreach (var shopId in lstShopId)
{
if (cancellationTokenSource.IsCancellationRequested)
break;
var shop = GlobalConfig.DouShopLoginList.FirstOrDefault(s => s.ShopAccountId == shopId);
if (shop == null)
continue;
if (ShopListForm.Instance == null)
ShopListForm.Instance = new ShopListForm();
ShopListForm.Instance.CheckShopLogin(new string[] { shop.ShopAccount }, false);
if (shop.LoginStatus != "登录成功")
{
Invoke(new Action(() =>
{
var row = this.dgvShop.Rows.Cast<DataGridViewRow>().FirstOrDefault(r => r.Cells["colShopId"].Value.ToString() == shop.ShopAccountId);
if (row != null)
{
row.Cells["colLoginStatus"].Value = "未登录";
row.Cells["colCanUse"].Value = false;
}
}));
continue;
}
GroupBuyShopForm groupBuyShopForm = null;
Invoke(new Action(() =>
{
var tab = this.ucTabControl1.TabPages.Cast<TabPage>().FirstOrDefault(t => t.Text == shop.ShopAccount && t.Name == "tab" + shop.ShopAccountId);
if (tab == null)
{
tab = new TabPage();
tab.Name = "tab" + shop.ShopAccountId;
tab.Text = shop.ShopAccount;
this.ucTabControl1.TabPages.Add(tab);
var form = new GroupBuyShopForm(shop);
form.groupBuyForm = this;
form.TopLevel = false;
form.Left = 0;
form.Top = 0;
form.FormBorderStyle = FormBorderStyle.None;
form.AutoSize = true;
form.Dock = DockStyle.Fill;
form.Show();
tab.Controls.Add(form);
}
if (tab.Controls.Count > 0)
{
groupBuyShopForm = tab.Controls[0] as GroupBuyShopForm;
this.ucTabControl1.SelectedTab = tab;
}
}));
if (groupBuyShopForm != null)
{
groupBuyShopForm.InitGetProduct();
GetProductByCef(shop);
}
}
Invoke(new Action(() => { btnGetProduct.Enabled = true; }));
}, cancellationTokenSource.Token);
}
public void GetSales(DouShopLoginInfo shop, bool isSales = true)
{
if (webBrowser == null)
{
Invoke(new Action(() =>
{
webBrowser = CEFBrowser.CreateChromiumWebBrowser("about:blank", false);
webBrowser.KeyboardHandler = new KeyboardHandler();
webBrowser.Dock = DockStyle.Fill;
Helper.CustomResourceRequestHandlerLocal resourceRequestHandler = new Helper.CustomResourceRequestHandlerLocal();
resourceRequestHandler.ResourceLoadCompleteEvent += RequestHandler_ResourceLoadCompleteEvent;
webBrowser.RequestHandler = new CustomRequestHandler(resourceRequestHandler);
webBrowser.LifeSpanHandler = new LifeSpanHandlerLocal(PopWindowType.SelfWindow);
webBrowser.SendToBack();
this.splitContainer1.Panel2.Controls.Add(webBrowser);
}));
}
while (webBrowser.Tag != null)
{
Thread.Sleep(Randomx.GetId(50, 100));
}
if (cancellationTokenSource.IsCancellationRequested)
return;
webBrowser.Tag = shop;
while (!webBrowser.IsBrowserInitialized || webBrowser.IsLoading)
continue;
var cookie = shop.Cookies;
CEFBrowser.DeleteCookie(webBrowser.RequestContext.GetCookieManager(null));
var t = CEFBrowser.SetCookieAsync("jinritemai.com", cookie, webBrowser.RequestContext.GetCookieManager(null));
t.Wait(2000);
Thread.Sleep(500);
var targetUrl = "https://fxg.jinritemai.com/ffa/g/list";
webBrowser.Load(targetUrl);
while (webBrowser.IsLoading)
{
Thread.Sleep(1000);
}
Thread.Sleep(3000);
if (!isSales)
{
Thread.Sleep(3000);
var jsStrBase = "function clickProductAnalysis(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) {\r\n"
+ " element1.click(); return 'success';\r\n"
+ " } else return 'no_element';\r\n"
+ "}\r\n";
var jsStr = jsStrBase + "clickProductAnalysis('电商罗盘');\r\n";
t = webBrowser.GetMainFrame().EvaluateScriptAsync(jsStr);
t.Wait();
while (webBrowser.IsLoading)
{
Thread.Sleep(1000);
}
Thread.Sleep(Randomx.GetId(1500, 2500));
jsStr = jsStrBase + "clickProductAnalysis('商品概览');\r\n";
t = webBrowser.GetMainFrame().EvaluateScriptAsync(jsStr);
t.Wait();
while (webBrowser.IsLoading)
{
Thread.Sleep(1000);
}
Thread.Sleep(Randomx.GetId(1500, 2500));
}
while (webBrowser.Tag != null)
{
Thread.Sleep(Randomx.GetId(50, 100));
}
Thread.Sleep(3000);
}
public void GetProductByCef(DouShopLoginInfo shop)
{
if (webBrowser == null)
{
Invoke(new Action(() =>
{
webBrowser = CEFBrowser.CreateChromiumWebBrowser("about:blank", false);
webBrowser.KeyboardHandler = new KeyboardHandler();
webBrowser.Dock = DockStyle.Fill;
CustomResourceRequestHandlerLocal resourceRequestHandler = new CustomResourceRequestHandlerLocal();
resourceRequestHandler.ResourceLoadCompleteEvent += RequestHandler_ResourceLoadCompleteEvent;
webBrowser.RequestHandler = new CustomRequestHandler(resourceRequestHandler);
webBrowser.LifeSpanHandler = new LifeSpanHandlerLocal(PopWindowType.SelfWindow);
webBrowser.SendToBack();
this.splitContainer1.Panel2.Controls.Add(webBrowser);
}));
}
while (webBrowser.Tag != null)
{
Thread.Sleep(Randomx.GetId(50, 100));
}
if (cancellationTokenSource.IsCancellationRequested)
return;
webBrowser.Tag = shop;
while (!webBrowser.IsBrowserInitialized || webBrowser.IsLoading)
continue;
var cookie = shop.Cookies;
CEFBrowser.DeleteCookie(webBrowser.RequestContext.GetCookieManager(null));
var t = CEFBrowser.SetCookieAsync("jinritemai.com", cookie, webBrowser.RequestContext.GetCookieManager(null));
t.Wait(2000);
Thread.Sleep(500);
var targetUrl = "https://fxg.jinritemai.com/ffa/g/list";
webBrowser.Load(targetUrl);
while (webBrowser.IsLoading)
{
Thread.Sleep(1000);
}
Thread.Sleep(3000);
while (webBrowser.Tag != null)
{
Thread.Sleep(Randomx.GetId(50, 100));
}
Thread.Sleep(3000);
}
private void RequestHandler_ResourceLoadCompleteEvent(object sender, string url, string postData, string responseData, CefSharp.IRequest iRequest)
{
if (url.StartsWith("https://fxg.jinritemai.com/product/tproduct/list?page=0") && url.Contains("&pay_type="))
{
if (webBrowser.Tag != null)
{
var listUrl = url;
var referrerUrl = iRequest.ReferrerUrl;
var result = responseData;
Dictionary<string, string> headers = new Dictionary<string, string>();
foreach (var hk in iRequest.Headers.AllKeys)
{
headers[hk] = iRequest.Headers[hk];
}
Task.Run(() =>
{
var cookies = CEFBrowser.GetCookie("", webBrowser.RequestContext.GetCookieManager(null));
GroupBuyShopForm salesForm = null;
Invoke(new Action(() =>
{
var shop = webBrowser.Tag as DouShopLoginInfo;
var tab = this.ucTabControl1.TabPages.Cast<TabPage>().FirstOrDefault(t => t.Text == shop.ShopAccount && t.Name == "tab" + shop.ShopAccountId);
salesForm = tab.Controls[0] as GroupBuyShopForm;
}));
if (salesForm != null)
salesForm.GetProductSim(listUrl, referrerUrl, headers, "");
Invoke(new Action(() =>
{
webBrowser.Tag = null;
}));
Thread.Sleep(1000);
});
}
}
}
private void btnSetName_Click(object sender, EventArgs e)
{
GroupBuyCustomActivityNameForm customNameForm = new GroupBuyCustomActivityNameForm();
customNameForm.ShowDialog();
}
private void label14_Click(object sender, EventArgs e)
{
if (this.webBrowser != null)
{
webBrowser.SendToBack();
}
}
private void label14_DoubleClick(object sender, EventArgs e)
{
if (this.webBrowser != null)
{
webBrowser.BringToFront();
}
}
private void btnStopGetProduct_Click(object sender, EventArgs e)
{
if (cancellationTokenSource != null)
cancellationTokenSource.Cancel();
webBrowser.Tag = null;
}
private void dgvShop_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
if (e.ColumnIndex < 0 || e.RowIndex < 0)
return;
string headerText = dgvShop.Columns[e.ColumnIndex].HeaderText;
string columnName = dgvShop.Columns[e.ColumnIndex].Name;
long shopId = dgvShop.Rows[e.RowIndex].Cells["colShopId"].Value.ParseToLong();
string shopName = dgvShop.Rows[e.RowIndex].Cells["colShopId"].Value.ToString();
var shop = GlobalConfig.DouShopLoginList.FirstOrDefault(s => s.ShopAccountId == shopId.ToString());
var row = dgvShop.Rows[e.RowIndex];
switch (columnName)
{
case "colSelect":
if (row.Cells["colCanUse"].Value.ParseToBool())
{
row.Cells["colSelect"].Value = !row.Cells["colSelect"].Value.ParseToBool();
if (dgvShop.Rows[e.RowIndex].Cells["colSelect"].Value.ParseToBool())
{
if (lstShopId.Any(p => p == shopId.ToString()))
lstShopId.RemoveAll(p => p == shopId.ToString());
lstShopId.Add(shopId.ToString());
}
else
lstShopId.Remove(shopId.ToString());
if (dgvShop.Rows.Cast<DataGridViewRow>().All(r => r.Cells["colSelect"].Value.ParseToBool()))
chkSelectAll.Checked = true;
else
chkSelectAll.Checked = false;
}
else
{
BaseMsgForm.ShowInfo("店铺未授权或未登录!");
}
break;
}
}
private void btnSetActivity_Click(object sender, EventArgs e)
{
// 每个活动商品数量
var eachActivityProductNum = nudEachActivityProductNum.Text.ParseToInt();
// 是否使用自定义活动名称
var isUseCustomActivityNames = rbCustomNames.Checked;
// 自定义活动名称临时列表
List<string> customNamesTemp = new List<string>(CustomActivityNames);
if (rbCustomNames.Checked && customNamesTemp.Count == 0)
{
BaseMsgForm.ShowInfo("请设置自定义活动名称!");
return;
}
// 开始时间
var startTime = dtpStartTime.Value.ToString("yyyy-MM-dd HH:mm:ss");
// 结束时间
var endTime = dtpEndTime.Value.ToString("yyyy-MM-dd HH:mm:ss");
// 订单取消时间
var orderExpireTime = cmbCancelTime.Text.Replace("分钟", "").ParseToInt() * 60;
// 成团数量
var groupNum = nudGroupCount.Value.ToString();
if (nudGroupCount.Value < 5)
{
nudGroupCount.Value = 5;
BaseMsgForm.ShowError("成团数量需大于等于5,已为您自动修改");
return;
}
// 自动成团
var autoGroup = this.chkAutoGroup.Checked ? "1" : "0";
// 设置单个sku
var isSetSkuOption = this.chkSetSkuOption.Checked;
var skuOptionType = this.cmbSkuOptionType.Text;
// 库存类型
var stockType = this.cmbStockType.Text;
// 库存数量
var stockValue = nudStockValue.Text.ParseToInt();
// 每人限购
var userLimit = this.cmbLimitCount.Text.Replace("个", "").Replace("不限购", "0");
// 折扣类型
var discountType = this.cmbDiscountType.Text;
// 折扣数值
var discountValue = this.nudDiscountValue.Text.ParseToDecimal();
cancellationTokenSource = new CancellationTokenSource();
Task.Run(() =>
{
foreach (var shopId in lstShopId)
{
var shop = GlobalConfig.DouShopLoginList.FirstOrDefault(s => s.ShopAccountId == shopId);
if (shop == null)
continue;
if (ucTabControl1.TabPages["tab" + shopId] != null && ucTabControl1.TabPages["tab" + shopId].Controls.Count > 0)
{
var salesForm = ucTabControl1.TabPages["tab" + shopId].Controls[0] as GroupBuyShopForm;
if (salesForm == null)
continue;
Invoke(new Action(() =>
{
salesForm.statusBar.lblTaskStatus.Text = "正在创建拼团活动";
}));
List<string> productIdList = salesForm.lstProductId;
if (productIdList.Count == 0)
{
BaseMsgForm.ShowInfo("请选择店铺 " + shop.ShopAccount + " 参加活动的商品!");
continue;
}
else
{
List<string> pIdListTemp = new List<string>();
for (int i = 0; i < productIdList.Count; i++)
{
var pid = productIdList[i];
pIdListTemp.Add(pid);
if ((i + 1) % eachActivityProductNum == 0 || i == productIdList.Count - 1)
{
var pIdsStrTemp = "\"" + string.Join("\",\"", pIdListTemp) + "\"";
pIdListTemp.Clear();
#region 获取活动商品的所有Sku
string pIdData = @"{ ""product_ids"":[" + pIdsStrTemp + "]}";
var cookies = shop.Cookies;
var result = salesForm.GetSkusByProductIds(pIdData, cookies);
#endregion
#region 生成活动名称
string activityId = Math.Ceiling((i + 1m) / eachActivityProductNum).ToString();
activityId = activityId.Replace("1", "一").Replace("2", "二").Replace("3", "三").Replace("4", "四").Replace("5", "五");
activityId = activityId.Replace("6", "六").Replace("7", "七").Replace("8", "八").Replace("9", "九").Replace("0", "零");
var actvityName = "活动" + activityId;
#region 自定义活动
if (isUseCustomActivityNames)
{
if (customNamesTemp != null && customNamesTemp.Count > 0)
{
actvityName = customNamesTemp[0];
customNamesTemp.RemoveAt(0);
}
else
{
Invoke(new Action(() => { salesForm.ShowVisitorMessage("活动创建中断,自定义名称活动数量不足!"); }));
break;
}
}
#endregion
#endregion
//string postData = "{\"stype\":\"120\",\"title\":\"活动一\",
//\"begin_time\":\"2022-06-23 13:49:54\",\"end_time\":\"2022-06-24 13:49:54\",\"order_expire_time\":\"300\",
//\"group_num\":\"9\",\"auto_group\":\"1\",\"promotion_goods\":[
//{\"product_id\":\"3556136493124815095\",\"promotion_skus\":[
// {\"camp_stock_num\":\"33\",\"id\":\"1736394771542030\",\"price\":\"27100\",\"user_limit\":\"19\",\"spec_detail_id1\":\"1736394770390024\",\"spec_detail_id2\":\"1736394770391096\",\"spec_detail_id3\":\"0\"},{\"camp_stock_num\":\"44\",\"id\":\"1736394771275831\",\"price\":\"26100\",\"user_limit\":\"14\",\"spec_detail_id1\":\"1736394770390024\",\"spec_detail_id2\":\"1736394770391080\",\"spec_detail_id3\":\"0\"}]},{\"product_id\":\"3554645628321712559\",\"promotion_skus\":[{\"camp_stock_num\":\"11\",\"id\":\"1735666808135704\",\"price\":\"3700\",\"user_limit\":\"0\",\"spec_detail_id1\":\"1735666809832616\",\"spec_detail_id2\":\"0\",\"spec_detail_id3\":\"0\"},{\"camp_stock_num\":\"22\",\"id\":\"1735666808135688\",\"price\":\"4100\",\"user_limit\":\"0\",\"spec_detail_id1\":\"1735666809832600\",\"spec_detail_id2\":\"0\",\"spec_detail_id3\":\"0\"}]}]}";
var postData = "{\"stype\":\"120\",\"title\":\"" + actvityName + "\"," +
"\"begin_time\":\"" + startTime + "\",\"end_time\":\"" + endTime + "\",\"order_expire_time\":\"" + orderExpireTime + "\"," +
"\"group_num\":\"" + groupNum + "\",\"auto_group\":\"" + autoGroup + "\",\"promotion_goods\":[";
JObject jObj = JObject.Parse(result);
foreach (JProperty jProp in jObj["data"])
{
var id = jProp.Name;
DouProductPromotionListInfo info = salesForm.productList.FirstOrDefault(q => q.product_id == id);
if (info != null)
{
postData = postData + "{\"product_id\":\"" + id + "\",\"promotion_skus\":[";
if (isSetSkuOption)
{
JArray arr = jObj["data"][id] as JArray;
var objs = new List<JToken>() { arr.FirstOrDefault(o => o["stock"]?.ParseToInt() > 0) };
if (skuOptionType == "最后一个")
objs = new List<JToken>() { arr.LastOrDefault(o => o["stock"]?.ParseToInt() > 0) };
if (skuOptionType == "最贵")
objs = new List<JToken>() { arr.OrderBy(o => o["origin_price"]).LastOrDefault(o => o["stock"]?.ParseToInt() > 0) };
if (skuOptionType == "最便宜")
objs = new List<JToken>() { arr.OrderBy(o => o["origin_price"]).FirstOrDefault(o => o["stock"]?.ParseToInt() > 0) };
if (skuOptionType == "不设置最便宜")
{
objs = arr.OrderBy(o => o["origin_price"]).Skip(1).ToList();
}
if (skuOptionType == "不设置最贵")
{
objs = arr.OrderBy(o => o["origin_price"]).Take(objs.Count).ToList();
}
foreach (var obj in objs)
{
var totalStock = obj["stock"].ParseToInt();
var stock = totalStock;
if (stockType == "百分比库存")
{
stock = stockValue * totalStock / 100;
}
else if (stockType == "统一库存")
{
stock = stockValue;
}
if (stock <= groupNum.ParseToInt())
stock = groupNum.ParseToInt();
if (stock > totalStock)
stock = totalStock;
if (stock < 5) // 跳过库存不足的sku
continue;
var newPrice = obj["origin_price"].ParseToInt() * discountValue / 10; // 打折
if (discountType == "直降")
{
newPrice = obj["origin_price"].ParseToInt() - discountValue * 100;
}
else if (discountType == "一口价")
{
newPrice = discountValue * 100;
}
postData = postData + "{\"camp_stock_num\":\"" + stock +
"\",\"id\":\"" + obj["id"] + "\",\"price\":\"" + (int)newPrice +
"\",\"user_limit\":\"" + userLimit + "\",\"spec_detail_id1\":\"" + obj["spec_detail_id1"] +
"\",\"spec_detail_id2\":\"" + obj["spec_detail_id2"] + "\",\"spec_detail_id3\":\"" + obj["spec_detail_id3"] + "\"},";
}
}
else
{
JArray arr = jObj["data"][id] as JArray;
foreach (JObject obj in arr)
{
var totalStock = obj["stock"].ParseToInt();
var stock = totalStock;
if (stockType == "百分比库存")
{
stock = stockValue * totalStock / 100;
}
else if (stockType == "统一库存")
{
stock = stockValue;
}
if (stock <= groupNum.ParseToInt())
stock = groupNum.ParseToInt();
if (stock > totalStock)
stock = totalStock;
if (stock < 5) // 跳过库存不足的sku
continue;
var newPrice = obj["origin_price"].ParseToInt() * discountValue / 10; // 打折
if (discountType == "直降")
{
newPrice = obj["origin_price"].ParseToInt() - discountValue * 100;
}
else if (discountType == "一口价")
{
newPrice = discountValue * 100;
}
postData = postData + "{\"camp_stock_num\":\"" + stock +
"\",\"id\":\"" + obj["id"] + "\",\"price\":\"" + (int)newPrice +
"\",\"user_limit\":\"" + userLimit + "\",\"spec_detail_id1\":\"" + obj["spec_detail_id1"] +
"\",\"spec_detail_id2\":\"" + obj["spec_detail_id2"] + "\",\"spec_detail_id3\":\"" + obj["spec_detail_id3"] + "\"},";
}
}
postData = postData.TrimEnd(',') + "]},";
}
}
postData = postData.TrimEnd(',') + "]}";
string checkPro = salesForm.checkGroupBuyGoods(postData, cookies);
if (checkPro.Contains("{\"st\":0,\"msg\":\"\",\"code\":0,"))
{
string createPro = salesForm.createGroupBuyGoods(postData, cookies);
if (createPro.Contains("{\"st\":0,\"msg\":\"\",\"code\":0,"))
{
Invoke(new Action(() => { salesForm.ShowVisitorMessage("活动 " + actvityName + " 创建成功!", pIdsStrTemp); }));
}
else
{
Invoke(new Action(() => { salesForm.ShowVisitorMessage(actvityName + "拼团创建失败!原因:" + BaseRegex.GetStringJson(ref createPro, "msg"), pIdsStrTemp); }));
}
}
else
{
Invoke(new Action(() => { salesForm.ShowVisitorMessage(actvityName + "拼团创建失败!原因:" + BaseRegex.GetStringJson(ref checkPro, "msg"), pIdsStrTemp); }));
}
Thread.Sleep(Randomx.GetId(1500, 3500));
}
}
}
Invoke(new Action(() => { salesForm.statusBar.lblTaskStatus.Text = "创建拼团活动完成"; }));
}
}
}, cancellationTokenSource.Token);
}
private void dtpStartTime_ValueChanged(object sender, EventArgs e)
{
if (dtpEndTime.Value > dtpStartTime.Value.AddDays(1) || dtpEndTime.Value <= dtpStartTime.Value)
dtpEndTime.Value = dtpStartTime.Value.AddDays(1);
}
private void btnClear_Click(object sender, EventArgs e)
{
if (BaseMsgForm.ShowConfirm("确定要清空结果吗?清空后需要重新获取!").DialogResult == DialogResult.OK)
{
foreach (TabPage tp in ucTabControl1.TabPages)
{
if (tp.Controls.Count > 0)
{
if (tp.Text.Contains("活动管理"))
{
//var managerActiveForm = tp.Controls[0] as LimitedSalesManagerActiveForm;
//if (managerActiveForm != null)
// managerActiveForm.ClearData();
//if (splitContainer4.Panel1.Controls.Count == 2)
// splitContainer4.Panel1.Controls.RemoveAt(1);
}
else
{
var salesForm = tp.Controls[0] as GroupBuyShopForm;
if (salesForm != null)
salesForm.ClearData();
}
}
}
}
}
private void btnStopOperate_Click(object sender, EventArgs e)
{
if (cancellationTokenSource != null)
cancellationTokenSource.Cancel();
webBrowser.Tag = null;
}
private void pbPaste1_Click(object sender, EventArgs e)
{
IDataObject iData = Clipboard.GetDataObject();
if (iData != null && iData.GetDataPresent(DataFormats.Text))
{
txtProductName.Text = (string)iData.GetData(DataFormats.Text);
}
}
private void pbPaste2_Click(object sender, EventArgs e)
{
IDataObject iData = Clipboard.GetDataObject();
if (iData != null && iData.GetDataPresent(DataFormats.Text))
{
txtFilter.Text = (string)iData.GetData(DataFormats.Text);
}
}
private void nudGroupCount_ValueChanged(object sender, EventArgs e)
{
}
List<Keys> keyList = new List<Keys>();
private void nudGroupCount_KeyDown(object sender, KeyEventArgs e)
{
var x = nudGroupCount.Value;
//if (e.KeyData == (Keys.Alt | Keys.Add))
//{
// this.nudGroupCount.Maximum = 10000m;
//}
if (keyList.LastOrDefault() != e.KeyData)
keyList.Clear();
keyList.Add(e.KeyData);
if (keyList.Count >= 5 && e.KeyData == (Keys.Menu | Keys.Alt))
this.nudGroupCount.Maximum = 10000m;
}
}
}
@@ -0,0 +1,138 @@
<?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="colSelect.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colShopId.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colAuthStatus.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colLoginStatus.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colCanUse.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colMessage.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>
@@ -0,0 +1,906 @@
namespace LittleRabbit.LittleRabbitForms.SalesCenterForms
{
partial class GroupBuyMonitorForm
{
/// <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.components = new System.ComponentModel.Container();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.ucGroupBoxEx2 = new LittleRabbit.UserComponent.UcGroupBoxEx(this.components);
this.panelEx2 = new DevComponents.DotNetBar.PanelEx();
this.label2 = new System.Windows.Forms.Label();
this.numericUpDown2 = new System.Windows.Forms.NumericUpDown();
this.label1 = new System.Windows.Forms.Label();
this.numericUpDown1 = new System.Windows.Forms.NumericUpDown();
this.checkBox1 = new System.Windows.Forms.CheckBox();
this.cmbSkuOptionType = new DevComponents.DotNetBar.Controls.ComboBoxEx();
this.第一个 = new DevComponents.Editors.ComboItem();
this.最后一个 = new DevComponents.Editors.ComboItem();
this.最便宜 = new DevComponents.Editors.ComboItem();
this.最贵 = new DevComponents.Editors.ComboItem();
this.不设置最便宜 = new DevComponents.Editors.ComboItem();
this.不设置最贵 = new DevComponents.Editors.ComboItem();
this.lblPercentSign = new System.Windows.Forms.Label();
this.label9 = new System.Windows.Forms.Label();
this.nudEachActivityProductNum = new System.Windows.Forms.NumericUpDown();
this.label8 = new System.Windows.Forms.Label();
this.nudStockValue = new System.Windows.Forms.NumericUpDown();
this.cmbDiscountType = new DevComponents.DotNetBar.Controls.ComboBoxEx();
this.打折 = new DevComponents.Editors.ComboItem();
this.直降 = new DevComponents.Editors.ComboItem();
this.一口价 = new DevComponents.Editors.ComboItem();
this.cmbStockType = new DevComponents.DotNetBar.Controls.ComboBoxEx();
this.全部库存 = new DevComponents.Editors.ComboItem();
this.百分比库存 = new DevComponents.Editors.ComboItem();
this.统一库存 = new DevComponents.Editors.ComboItem();
this.label5 = new System.Windows.Forms.Label();
this.cmbLimitCount = new DevComponents.DotNetBar.Controls.ComboBoxEx();
this.不限购 = new DevComponents.Editors.ComboItem();
this.label7 = new System.Windows.Forms.Label();
this.nudDiscountValue = new System.Windows.Forms.NumericUpDown();
this.label17 = new System.Windows.Forms.Label();
this.nudGroupCount = new System.Windows.Forms.NumericUpDown();
this.label11 = new System.Windows.Forms.Label();
this.btnSetActivity = new DevComponents.DotNetBar.PanelEx();
this.btnStopOperate = new DevComponents.DotNetBar.PanelEx();
this.ucGroupBoxEx1 = new LittleRabbit.UserComponent.UcGroupBoxEx(this.components);
this.btnRefreshShop = new LittleRabbit.UserControls.ButtonEx();
this.splitContainer3 = new System.Windows.Forms.SplitContainer();
this.splitContainer4 = new System.Windows.Forms.SplitContainer();
this.statusBar = new LittleRabbit.UserControls.StatusBarUserControl();
this.btnClear = new DevComponents.DotNetBar.PanelEx();
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.dgvShop = new LittleRabbit.UserComponent.DataGridViewEx();
this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.colShopId = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colShopName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colAuthStatus = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colLoginStatus = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colCanUse = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.colMessage = new System.Windows.Forms.DataGridViewTextBoxColumn();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.ucGroupBoxEx2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.nudEachActivityProductNum)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.nudStockValue)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.nudDiscountValue)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.nudGroupCount)).BeginInit();
this.ucGroupBoxEx1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).BeginInit();
this.splitContainer3.Panel1.SuspendLayout();
this.splitContainer3.Panel2.SuspendLayout();
this.splitContainer3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer4)).BeginInit();
this.splitContainer4.Panel1.SuspendLayout();
this.splitContainer4.Panel2.SuspendLayout();
this.splitContainer4.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit();
this.splitContainer2.Panel1.SuspendLayout();
this.splitContainer2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvShop)).BeginInit();
this.SuspendLayout();
//
// splitContainer1
//
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
this.splitContainer1.Name = "splitContainer1";
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.ucGroupBoxEx2);
this.splitContainer1.Panel1.Controls.Add(this.ucGroupBoxEx1);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.splitContainer3);
this.splitContainer1.Size = new System.Drawing.Size(1246, 552);
this.splitContainer1.SplitterDistance = 150;
this.splitContainer1.TabIndex = 8;
//
// ucGroupBoxEx2
//
this.ucGroupBoxEx2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.ucGroupBoxEx2.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.ucGroupBoxEx2.BorderStyle = LittleRabbit.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND;
this.ucGroupBoxEx2.Controls.Add(this.panelEx2);
this.ucGroupBoxEx2.Controls.Add(this.label2);
this.ucGroupBoxEx2.Controls.Add(this.numericUpDown2);
this.ucGroupBoxEx2.Controls.Add(this.label1);
this.ucGroupBoxEx2.Controls.Add(this.numericUpDown1);
this.ucGroupBoxEx2.Controls.Add(this.checkBox1);
this.ucGroupBoxEx2.Controls.Add(this.cmbSkuOptionType);
this.ucGroupBoxEx2.Controls.Add(this.lblPercentSign);
this.ucGroupBoxEx2.Controls.Add(this.label9);
this.ucGroupBoxEx2.Controls.Add(this.nudEachActivityProductNum);
this.ucGroupBoxEx2.Controls.Add(this.label8);
this.ucGroupBoxEx2.Controls.Add(this.nudStockValue);
this.ucGroupBoxEx2.Controls.Add(this.cmbDiscountType);
this.ucGroupBoxEx2.Controls.Add(this.cmbStockType);
this.ucGroupBoxEx2.Controls.Add(this.label5);
this.ucGroupBoxEx2.Controls.Add(this.cmbLimitCount);
this.ucGroupBoxEx2.Controls.Add(this.label7);
this.ucGroupBoxEx2.Controls.Add(this.nudDiscountValue);
this.ucGroupBoxEx2.Controls.Add(this.label17);
this.ucGroupBoxEx2.Controls.Add(this.nudGroupCount);
this.ucGroupBoxEx2.Controls.Add(this.label11);
this.ucGroupBoxEx2.Controls.Add(this.btnSetActivity);
this.ucGroupBoxEx2.Controls.Add(this.btnStopOperate);
this.ucGroupBoxEx2.Location = new System.Drawing.Point(147, 2);
this.ucGroupBoxEx2.Name = "ucGroupBoxEx2";
this.ucGroupBoxEx2.Size = new System.Drawing.Size(1097, 150);
this.ucGroupBoxEx2.TabIndex = 469;
this.ucGroupBoxEx2.TabStop = false;
this.ucGroupBoxEx2.Text = "商品操作";
//
// panelEx2
//
this.panelEx2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.panelEx2.CanvasColor = System.Drawing.SystemColors.Control;
this.panelEx2.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.panelEx2.DisabledBackColor = System.Drawing.Color.Empty;
this.panelEx2.Location = new System.Drawing.Point(153, 56);
this.panelEx2.Name = "panelEx2";
this.panelEx2.Size = new System.Drawing.Size(84, 23);
this.panelEx2.Style.Alignment = System.Drawing.StringAlignment.Center;
this.panelEx2.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
this.panelEx2.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
this.panelEx2.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
this.panelEx2.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.panelEx2.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
this.panelEx2.Style.GradientAngle = 90;
this.panelEx2.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center;
this.panelEx2.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.panelEx2.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.panelEx2.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.panelEx2.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White;
this.panelEx2.TabIndex = 602;
this.panelEx2.Text = "获取运费模板";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(118, 59);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(20, 17);
this.label2.TabIndex = 598;
this.label2.Text = "秒";
//
// numericUpDown2
//
this.numericUpDown2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.numericUpDown2.Location = new System.Drawing.Point(72, 56);
this.numericUpDown2.Maximum = new decimal(new int[] {
10000,
0,
0,
0});
this.numericUpDown2.Minimum = new decimal(new int[] {
1,
0,
0,
0});
this.numericUpDown2.Name = "numericUpDown2";
this.numericUpDown2.Size = new System.Drawing.Size(46, 23);
this.numericUpDown2.TabIndex = 597;
this.numericUpDown2.Value = new decimal(new int[] {
5,
0,
0,
0});
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(16, 59);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(56, 17);
this.label1.TabIndex = 596;
this.label1.Text = "刷新间隔";
//
// numericUpDown1
//
this.numericUpDown1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.numericUpDown1.Location = new System.Drawing.Point(241, 27);
this.numericUpDown1.Maximum = new decimal(new int[] {
10000,
0,
0,
0});
this.numericUpDown1.Minimum = new decimal(new int[] {
1,
0,
0,
0});
this.numericUpDown1.Name = "numericUpDown1";
this.numericUpDown1.Size = new System.Drawing.Size(46, 23);
this.numericUpDown1.TabIndex = 595;
this.numericUpDown1.Value = new decimal(new int[] {
5,
0,
0,
0});
//
// checkBox1
//
this.checkBox1.AutoSize = true;
this.checkBox1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.checkBox1.Location = new System.Drawing.Point(153, 28);
this.checkBox1.Name = "checkBox1";
this.checkBox1.Size = new System.Drawing.Size(90, 21);
this.checkBox1.TabIndex = 594;
this.checkBox1.Text = "支付订单>=";
this.checkBox1.UseVisualStyleBackColor = true;
//
// cmbSkuOptionType
//
this.cmbSkuOptionType.DisplayMember = "Text";
this.cmbSkuOptionType.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.cmbSkuOptionType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbSkuOptionType.FormattingEnabled = true;
this.cmbSkuOptionType.ItemHeight = 18;
this.cmbSkuOptionType.Items.AddRange(new object[] {
this.第一个,
this.最后一个,
this.最便宜,
this.最贵,
this.不设置最便宜,
this.不设置最贵});
this.cmbSkuOptionType.Location = new System.Drawing.Point(241, 56);
this.cmbSkuOptionType.Name = "cmbSkuOptionType";
this.cmbSkuOptionType.Size = new System.Drawing.Size(135, 24);
this.cmbSkuOptionType.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.cmbSkuOptionType.TabIndex = 587;
//
// 第一个
//
this.第一个.Text = "第一个";
//
// 最后一个
//
this.最后一个.Text = "最后一个";
//
// 最便宜
//
this.最便宜.Text = "最便宜";
//
// 最贵
//
this.最贵.Text = "最贵";
//
// 不设置最便宜
//
this.不设置最便宜.Text = "不设置最便宜";
//
// 不设置最贵
//
this.不设置最贵.Text = "不设置最贵";
//
// lblPercentSign
//
this.lblPercentSign.AutoSize = true;
this.lblPercentSign.Location = new System.Drawing.Point(826, 120);
this.lblPercentSign.Name = "lblPercentSign";
this.lblPercentSign.Size = new System.Drawing.Size(19, 17);
this.lblPercentSign.TabIndex = 577;
this.lblPercentSign.Text = "%";
//
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(972, 120);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(44, 17);
this.label9.TabIndex = 569;
this.label9.Text = "个商品";
//
// nudEachActivityProductNum
//
this.nudEachActivityProductNum.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.nudEachActivityProductNum.Location = new System.Drawing.Point(913, 117);
this.nudEachActivityProductNum.Maximum = new decimal(new int[] {
20,
0,
0,
0});
this.nudEachActivityProductNum.Minimum = new decimal(new int[] {
1,
0,
0,
0});
this.nudEachActivityProductNum.Name = "nudEachActivityProductNum";
this.nudEachActivityProductNum.Size = new System.Drawing.Size(56, 23);
this.nudEachActivityProductNum.TabIndex = 568;
this.nudEachActivityProductNum.Value = new decimal(new int[] {
10,
0,
0,
0});
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(854, 120);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(56, 17);
this.label8.TabIndex = 567;
this.label8.Text = "一个活动";
//
// nudStockValue
//
this.nudStockValue.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.nudStockValue.Location = new System.Drawing.Point(776, 117);
this.nudStockValue.Minimum = new decimal(new int[] {
1,
0,
0,
0});
this.nudStockValue.Name = "nudStockValue";
this.nudStockValue.Size = new System.Drawing.Size(48, 23);
this.nudStockValue.TabIndex = 566;
this.nudStockValue.Value = new decimal(new int[] {
50,
0,
0,
0});
//
// cmbDiscountType
//
this.cmbDiscountType.DisplayMember = "Text";
this.cmbDiscountType.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.cmbDiscountType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbDiscountType.FormattingEnabled = true;
this.cmbDiscountType.ItemHeight = 18;
this.cmbDiscountType.Items.AddRange(new object[] {
this.打折,
this.直降,
this.一口价});
this.cmbDiscountType.Location = new System.Drawing.Point(686, 85);
this.cmbDiscountType.Name = "cmbDiscountType";
this.cmbDiscountType.Size = new System.Drawing.Size(84, 24);
this.cmbDiscountType.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.cmbDiscountType.TabIndex = 565;
//
// 打折
//
this.打折.Text = "打折";
//
// 直降
//
this.直降.Text = "直降";
//
// 一口价
//
this.一口价.Text = "一口价";
//
// cmbStockType
//
this.cmbStockType.DisplayMember = "Text";
this.cmbStockType.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.cmbStockType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbStockType.FormattingEnabled = true;
this.cmbStockType.ItemHeight = 18;
this.cmbStockType.Items.AddRange(new object[] {
this.全部库存,
this.百分比库存,
this.统一库存});
this.cmbStockType.Location = new System.Drawing.Point(686, 116);
this.cmbStockType.Name = "cmbStockType";
this.cmbStockType.Size = new System.Drawing.Size(84, 24);
this.cmbStockType.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.cmbStockType.TabIndex = 564;
//
// 全部库存
//
this.全部库存.Text = "全部库存";
//
// 百分比库存
//
this.百分比库存.Text = "百分比库存";
//
// 统一库存
//
this.统一库存.Text = "统一库存";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(627, 120);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(56, 17);
this.label5.TabIndex = 563;
this.label5.Text = "活动库存";
//
// cmbLimitCount
//
this.cmbLimitCount.DisplayMember = "Text";
this.cmbLimitCount.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.cmbLimitCount.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbLimitCount.FormattingEnabled = true;
this.cmbLimitCount.ItemHeight = 18;
this.cmbLimitCount.Items.AddRange(new object[] {
this.不限购});
this.cmbLimitCount.Location = new System.Drawing.Point(889, 85);
this.cmbLimitCount.Name = "cmbLimitCount";
this.cmbLimitCount.Size = new System.Drawing.Size(123, 24);
this.cmbLimitCount.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.cmbLimitCount.TabIndex = 556;
//
// 不限购
//
this.不限购.Text = "不限购";
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(854, 89);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(32, 17);
this.label7.TabIndex = 555;
this.label7.Text = "限购";
//
// nudDiscountValue
//
this.nudDiscountValue.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.nudDiscountValue.DecimalPlaces = 1;
this.nudDiscountValue.Increment = new decimal(new int[] {
1,
0,
0,
65536});
this.nudDiscountValue.Location = new System.Drawing.Point(776, 86);
this.nudDiscountValue.Maximum = new decimal(new int[] {
99,
0,
0,
65536});
this.nudDiscountValue.Minimum = new decimal(new int[] {
1,
0,
0,
65536});
this.nudDiscountValue.Name = "nudDiscountValue";
this.nudDiscountValue.Size = new System.Drawing.Size(65, 23);
this.nudDiscountValue.TabIndex = 554;
this.nudDiscountValue.Value = new decimal(new int[] {
99,
0,
0,
65536});
//
// label17
//
this.label17.AutoSize = true;
this.label17.Location = new System.Drawing.Point(627, 89);
this.label17.Name = "label17";
this.label17.Size = new System.Drawing.Size(56, 17);
this.label17.TabIndex = 542;
this.label17.Text = "优惠方式";
//
// nudGroupCount
//
this.nudGroupCount.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.nudGroupCount.Location = new System.Drawing.Point(72, 27);
this.nudGroupCount.Maximum = new decimal(new int[] {
10000,
0,
0,
0});
this.nudGroupCount.Minimum = new decimal(new int[] {
1,
0,
0,
0});
this.nudGroupCount.Name = "nudGroupCount";
this.nudGroupCount.Size = new System.Drawing.Size(46, 23);
this.nudGroupCount.TabIndex = 533;
this.nudGroupCount.Value = new decimal(new int[] {
20,
0,
0,
0});
//
// label11
//
this.label11.AutoSize = true;
this.label11.Location = new System.Drawing.Point(18, 30);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(54, 17);
this.label11.TabIndex = 525;
this.label11.Text = "数量 <=";
//
// btnSetActivity
//
this.btnSetActivity.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnSetActivity.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnSetActivity.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnSetActivity.DisabledBackColor = System.Drawing.Color.Empty;
this.btnSetActivity.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSetActivity.Location = new System.Drawing.Point(1007, 22);
this.btnSetActivity.Name = "btnSetActivity";
this.btnSetActivity.Size = new System.Drawing.Size(80, 23);
this.btnSetActivity.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnSetActivity.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnSetActivity.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnSetActivity.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnSetActivity.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnSetActivity.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnSetActivity.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnSetActivity.Style.GradientAngle = 90;
this.btnSetActivity.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnSetActivity.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnSetActivity.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnSetActivity.TabIndex = 427;
this.btnSetActivity.Text = "设置拼团";
this.btnSetActivity.Click += new System.EventHandler(this.btnSetActivity_Click);
//
// btnStopOperate
//
this.btnStopOperate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnStopOperate.CanvasColor = System.Drawing.SystemColors.Control;
this.btnStopOperate.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnStopOperate.DisabledBackColor = System.Drawing.Color.Empty;
this.btnStopOperate.Location = new System.Drawing.Point(1007, 52);
this.btnStopOperate.Name = "btnStopOperate";
this.btnStopOperate.Size = new System.Drawing.Size(80, 23);
this.btnStopOperate.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnStopOperate.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
this.btnStopOperate.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
this.btnStopOperate.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
this.btnStopOperate.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnStopOperate.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
this.btnStopOperate.Style.GradientAngle = 90;
this.btnStopOperate.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center;
this.btnStopOperate.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnStopOperate.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnStopOperate.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnStopOperate.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White;
this.btnStopOperate.TabIndex = 405;
this.btnStopOperate.Text = "停止设置";
//
// ucGroupBoxEx1
//
this.ucGroupBoxEx1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.ucGroupBoxEx1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.ucGroupBoxEx1.BorderStyle = LittleRabbit.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND;
this.ucGroupBoxEx1.Controls.Add(this.btnRefreshShop);
this.ucGroupBoxEx1.Location = new System.Drawing.Point(3, 2);
this.ucGroupBoxEx1.Name = "ucGroupBoxEx1";
this.ucGroupBoxEx1.Size = new System.Drawing.Size(144, 150);
this.ucGroupBoxEx1.TabIndex = 399;
this.ucGroupBoxEx1.TabStop = false;
this.ucGroupBoxEx1.Text = "基础";
//
// btnRefreshShop
//
this.btnRefreshShop.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnRefreshShop.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnRefreshShop.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnRefreshShop.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnRefreshShop.ForeColor = System.Drawing.Color.White;
this.btnRefreshShop.Location = new System.Drawing.Point(16, 30);
this.btnRefreshShop.Margin = new System.Windows.Forms.Padding(2);
this.btnRefreshShop.Name = "btnRefreshShop";
this.btnRefreshShop.Size = new System.Drawing.Size(112, 26);
this.btnRefreshShop.TabIndex = 375;
this.btnRefreshShop.Text = "刷新店铺状态";
this.btnRefreshShop.UseVisualStyleBackColor = false;
//
// splitContainer3
//
this.splitContainer3.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer3.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
this.splitContainer3.Location = new System.Drawing.Point(0, 0);
this.splitContainer3.Name = "splitContainer3";
this.splitContainer3.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer3.Panel1
//
this.splitContainer3.Panel1.Controls.Add(this.splitContainer2);
//
// splitContainer3.Panel2
//
this.splitContainer3.Panel2.Controls.Add(this.splitContainer4);
this.splitContainer3.Size = new System.Drawing.Size(1246, 398);
this.splitContainer3.SplitterDistance = 368;
this.splitContainer3.TabIndex = 1;
//
// splitContainer4
//
this.splitContainer4.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer4.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
this.splitContainer4.Location = new System.Drawing.Point(0, 0);
this.splitContainer4.Name = "splitContainer4";
//
// splitContainer4.Panel1
//
this.splitContainer4.Panel1.Controls.Add(this.statusBar);
//
// splitContainer4.Panel2
//
this.splitContainer4.Panel2.Controls.Add(this.btnClear);
this.splitContainer4.Size = new System.Drawing.Size(1246, 26);
this.splitContainer4.SplitterDistance = 1131;
this.splitContainer4.TabIndex = 3;
//
// statusBar
//
this.statusBar.BackColor = System.Drawing.Color.White;
this.statusBar.Dock = System.Windows.Forms.DockStyle.Fill;
this.statusBar.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.statusBar.Location = new System.Drawing.Point(0, 0);
this.statusBar.Margin = new System.Windows.Forms.Padding(0);
this.statusBar.Name = "statusBar";
this.statusBar.Size = new System.Drawing.Size(1131, 26);
this.statusBar.TabIndex = 2;
//
// btnClear
//
this.btnClear.Anchor = System.Windows.Forms.AnchorStyles.Right;
this.btnClear.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnClear.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnClear.DisabledBackColor = System.Drawing.Color.Empty;
this.btnClear.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnClear.Location = new System.Drawing.Point(17, 0);
this.btnClear.Name = "btnClear";
this.btnClear.Size = new System.Drawing.Size(90, 21);
this.btnClear.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnClear.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnClear.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnClear.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnClear.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnClear.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnClear.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnClear.Style.GradientAngle = 90;
this.btnClear.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnClear.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnClear.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnClear.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White;
this.btnClear.TabIndex = 440;
this.btnClear.Text = "清空结果";
//
// splitContainer2
//
this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
this.splitContainer2.Location = new System.Drawing.Point(0, 0);
this.splitContainer2.Name = "splitContainer2";
//
// splitContainer2.Panel1
//
this.splitContainer2.Panel1.Controls.Add(this.dgvShop);
this.splitContainer2.Panel1.Padding = new System.Windows.Forms.Padding(4, 0, 0, 0);
//
// splitContainer2.Panel2
//
this.splitContainer2.Panel2.Padding = new System.Windows.Forms.Padding(0, 0, 4, 0);
this.splitContainer2.Size = new System.Drawing.Size(1246, 368);
this.splitContainer2.SplitterDistance = 270;
this.splitContainer2.TabIndex = 0;
//
// dgvShop
//
this.dgvShop.AllowUserToAddRows = false;
this.dgvShop.AllowUserToDeleteRows = false;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
this.dgvShop.BackgroundColor = System.Drawing.Color.White;
this.dgvShop.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
this.dgvShop.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvShop.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colSelect,
this.colShopId,
this.colShopName,
this.colAuthStatus,
this.colLoginStatus,
this.colCanUse,
this.colMessage});
this.dgvShop.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvShop.Location = new System.Drawing.Point(4, 0);
this.dgvShop.Name = "dgvShop";
this.dgvShop.ReadOnly = true;
this.dgvShop.RowHeadersWidth = 30;
dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.dgvShop.RowsDefaultCellStyle = dataGridViewCellStyle3;
this.dgvShop.RowTemplate.Height = 23;
this.dgvShop.Size = new System.Drawing.Size(266, 368);
this.dgvShop.TabIndex = 6;
this.dgvShop.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvShop_CellContentClick);
//
// colSelect
//
this.colSelect.HeaderText = "选择";
this.colSelect.Name = "colSelect";
this.colSelect.ReadOnly = true;
this.colSelect.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colSelect.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colSelect.Width = 28;
//
// colShopId
//
this.colShopId.HeaderText = "店铺";
this.colShopId.Name = "colShopId";
this.colShopId.ReadOnly = true;
this.colShopId.Visible = false;
this.colShopId.Width = 55;
//
// colShopName
//
this.colShopName.FillWeight = 150F;
this.colShopName.HeaderText = "店铺名称";
this.colShopName.Name = "colShopName";
this.colShopName.ReadOnly = true;
this.colShopName.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colShopName.Width = 75;
//
// colAuthStatus
//
this.colAuthStatus.HeaderText = "授权状态";
this.colAuthStatus.Name = "colAuthStatus";
this.colAuthStatus.ReadOnly = true;
this.colAuthStatus.Width = 65;
//
// colLoginStatus
//
this.colLoginStatus.HeaderText = "登录状态";
this.colLoginStatus.Name = "colLoginStatus";
this.colLoginStatus.ReadOnly = true;
this.colLoginStatus.Width = 65;
//
// colCanUse
//
this.colCanUse.HeaderText = "可用";
this.colCanUse.Name = "colCanUse";
this.colCanUse.ReadOnly = true;
this.colCanUse.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colCanUse.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colCanUse.Visible = false;
//
// colMessage
//
this.colMessage.HeaderText = "消息";
this.colMessage.Name = "colMessage";
this.colMessage.ReadOnly = true;
this.colMessage.Visible = false;
this.colMessage.Width = 120;
//
// GroupBuyMonitorForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(1246, 552);
this.Controls.Add(this.splitContainer1);
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Name = "GroupBuyMonitorForm";
this.Text = "GroupBuyMonitorForm";
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
this.ucGroupBoxEx2.ResumeLayout(false);
this.ucGroupBoxEx2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.nudEachActivityProductNum)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.nudStockValue)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.nudDiscountValue)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.nudGroupCount)).EndInit();
this.ucGroupBoxEx1.ResumeLayout(false);
this.splitContainer3.Panel1.ResumeLayout(false);
this.splitContainer3.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).EndInit();
this.splitContainer3.ResumeLayout(false);
this.splitContainer4.Panel1.ResumeLayout(false);
this.splitContainer4.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer4)).EndInit();
this.splitContainer4.ResumeLayout(false);
this.splitContainer2.Panel1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
this.splitContainer2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dgvShop)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.SplitContainer splitContainer1;
private UserComponent.UcGroupBoxEx ucGroupBoxEx2;
private DevComponents.DotNetBar.Controls.ComboBoxEx cmbSkuOptionType;
private DevComponents.Editors.ComboItem 第一个;
private DevComponents.Editors.ComboItem 最后一个;
private DevComponents.Editors.ComboItem 最便宜;
private DevComponents.Editors.ComboItem 最贵;
private DevComponents.Editors.ComboItem 不设置最便宜;
private DevComponents.Editors.ComboItem 不设置最贵;
private System.Windows.Forms.Label lblPercentSign;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.NumericUpDown nudEachActivityProductNum;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.NumericUpDown nudStockValue;
private DevComponents.DotNetBar.Controls.ComboBoxEx cmbDiscountType;
private DevComponents.Editors.ComboItem 打折;
private DevComponents.Editors.ComboItem 直降;
private DevComponents.Editors.ComboItem 一口价;
private DevComponents.DotNetBar.Controls.ComboBoxEx cmbStockType;
private DevComponents.Editors.ComboItem 全部库存;
private DevComponents.Editors.ComboItem 百分比库存;
private DevComponents.Editors.ComboItem 统一库存;
private System.Windows.Forms.Label label5;
private DevComponents.DotNetBar.Controls.ComboBoxEx cmbLimitCount;
private DevComponents.Editors.ComboItem 不限购;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.NumericUpDown nudDiscountValue;
private System.Windows.Forms.Label label17;
private System.Windows.Forms.NumericUpDown nudGroupCount;
private System.Windows.Forms.Label label11;
private DevComponents.DotNetBar.PanelEx btnSetActivity;
private DevComponents.DotNetBar.PanelEx btnStopOperate;
private UserComponent.UcGroupBoxEx ucGroupBoxEx1;
private UserControls.ButtonEx btnRefreshShop;
private System.Windows.Forms.SplitContainer splitContainer3;
private System.Windows.Forms.SplitContainer splitContainer4;
private UserControls.StatusBarUserControl statusBar;
private DevComponents.DotNetBar.PanelEx btnClear;
private System.Windows.Forms.NumericUpDown numericUpDown1;
private System.Windows.Forms.CheckBox checkBox1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.NumericUpDown numericUpDown2;
private System.Windows.Forms.Label label1;
private DevComponents.DotNetBar.PanelEx panelEx2;
private System.Windows.Forms.SplitContainer splitContainer2;
private UserComponent.DataGridViewEx dgvShop;
private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopId;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopName;
private System.Windows.Forms.DataGridViewTextBoxColumn colAuthStatus;
private System.Windows.Forms.DataGridViewTextBoxColumn colLoginStatus;
private System.Windows.Forms.DataGridViewCheckBoxColumn colCanUse;
private System.Windows.Forms.DataGridViewTextBoxColumn colMessage;
}
}
@@ -0,0 +1,50 @@
using NaiBa.Util.Extension;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace LittleRabbit.LittleRabbitForms.SalesCenterForms
{
public partial class GroupBuyMonitorForm : Form
{
public GroupBuyMonitorForm()
{
InitializeComponent();
}
private void btnSetActivity_Click(object sender, EventArgs e)
{
}
private void dgvShop_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
if (e.ColumnIndex < 0 || e.RowIndex < 0)
return;
var colName = dgvShop.Columns[e.ColumnIndex].Name;
if (colName == "colSelect")
{
// 只允许单选
if (dgvShop.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ParseToBool() == true)
{
dgvShop.Rows[e.RowIndex].Cells[e.ColumnIndex].Value = false;
}
else
{
foreach (DataGridViewRow row in dgvShop.Rows)
{
row.Cells[e.ColumnIndex].Value = false;
}
dgvShop.Rows[e.RowIndex].Cells[e.ColumnIndex].Value = true;
}
}
}
}
}
@@ -0,0 +1,138 @@
<?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="colSelect.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colShopId.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colAuthStatus.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colLoginStatus.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colCanUse.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colMessage.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>
@@ -0,0 +1,232 @@
namespace LittleRabbit.LittleRabbitForms.SalesCenterForms
{
partial class GroupBuyShopForm
{
/// <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()
{
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.dgvProduct = new LittleRabbit.UserComponent.DataGridViewEx();
this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.colProductId = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colProductName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colStock = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colSales = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colPrice = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colCreateTime = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colMessage = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.label1 = new System.Windows.Forms.Label();
this.statusBar = new LittleRabbit.UserControls.StatusBarUserControl();
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit();
this.splitContainer2.Panel1.SuspendLayout();
this.splitContainer2.Panel2.SuspendLayout();
this.splitContainer2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvProduct)).BeginInit();
this.SuspendLayout();
//
// splitContainer2
//
this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
this.splitContainer2.Location = new System.Drawing.Point(0, 0);
this.splitContainer2.Name = "splitContainer2";
this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer2.Panel1
//
this.splitContainer2.Panel1.Controls.Add(this.dgvProduct);
this.splitContainer2.Panel1.Padding = new System.Windows.Forms.Padding(4, 4, 4, 0);
//
// splitContainer2.Panel2
//
this.splitContainer2.Panel2.Controls.Add(this.label1);
this.splitContainer2.Panel2.Controls.Add(this.statusBar);
this.splitContainer2.Size = new System.Drawing.Size(1160, 597);
this.splitContainer2.SplitterDistance = 567;
this.splitContainer2.TabIndex = 10;
this.splitContainer2.SplitterMoved += new System.Windows.Forms.SplitterEventHandler(this.splitContainer2_SplitterMoved);
//
// dgvProduct
//
this.dgvProduct.AllowUserToAddRows = false;
this.dgvProduct.AllowUserToDeleteRows = false;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
this.dgvProduct.BackgroundColor = System.Drawing.Color.White;
this.dgvProduct.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
this.dgvProduct.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvProduct.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colSelect,
this.colProductId,
this.colProductName,
this.colStock,
this.colSales,
this.colPrice,
this.colCreateTime,
this.colMessage});
this.dgvProduct.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvProduct.Location = new System.Drawing.Point(4, 4);
this.dgvProduct.Name = "dgvProduct";
this.dgvProduct.ReadOnly = true;
dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.dgvProduct.RowsDefaultCellStyle = dataGridViewCellStyle3;
this.dgvProduct.RowTemplate.Height = 23;
this.dgvProduct.Size = new System.Drawing.Size(1152, 563);
this.dgvProduct.TabIndex = 6;
this.dgvProduct.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvProduct_CellContentClick);
this.dgvProduct.CellMouseDown += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.dgvProduct_CellMouseDown);
this.dgvProduct.CellMouseEnter += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvProduct_CellMouseEnter);
this.dgvProduct.CellMouseUp += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.dgvProduct_CellMouseUp);
//
// colSelect
//
this.colSelect.FillWeight = 50F;
this.colSelect.HeaderText = "选";
this.colSelect.Name = "colSelect";
this.colSelect.ReadOnly = true;
this.colSelect.Resizable = System.Windows.Forms.DataGridViewTriState.False;
this.colSelect.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colSelect.Width = 41;
//
// colProductId
//
this.colProductId.HeaderText = "商品Id";
this.colProductId.Name = "colProductId";
this.colProductId.ReadOnly = true;
this.colProductId.Width = 150;
//
// colProductName
//
this.colProductName.HeaderText = "商品名称";
this.colProductName.Name = "colProductName";
this.colProductName.ReadOnly = true;
this.colProductName.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colProductName.Width = 350;
//
// colStock
//
this.colStock.HeaderText = "库存";
this.colStock.Name = "colStock";
this.colStock.ReadOnly = true;
this.colStock.Width = 60;
//
// colSales
//
this.colSales.HeaderText = "销量";
this.colSales.Name = "colSales";
this.colSales.ReadOnly = true;
this.colSales.Width = 60;
//
// colPrice
//
this.colPrice.HeaderText = "价格";
this.colPrice.Name = "colPrice";
this.colPrice.ReadOnly = true;
this.colPrice.Width = 60;
//
// colCreateTime
//
this.colCreateTime.HeaderText = "创建时间";
this.colCreateTime.Name = "colCreateTime";
this.colCreateTime.ReadOnly = true;
//
// colMessage
//
this.colMessage.HeaderText = "消息";
this.colMessage.Name = "colMessage";
this.colMessage.ReadOnly = true;
this.colMessage.Width = 300;
//
// label1
//
this.label1.AutoSize = true;
this.label1.ForeColor = System.Drawing.Color.MidnightBlue;
this.label1.Location = new System.Drawing.Point(656, 2);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(43, 17);
this.label1.TabIndex = 3;
this.label1.Text = "label1";
this.label1.Click += new System.EventHandler(this.label1_Click);
//
// statusBar
//
this.statusBar.BackColor = System.Drawing.Color.White;
this.statusBar.Dock = System.Windows.Forms.DockStyle.Fill;
this.statusBar.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.statusBar.Location = new System.Drawing.Point(0, 0);
this.statusBar.Margin = new System.Windows.Forms.Padding(0);
this.statusBar.Name = "statusBar";
this.statusBar.Size = new System.Drawing.Size(1160, 26);
this.statusBar.TabIndex = 2;
this.statusBar.Load += new System.EventHandler(this.statusBar_Load);
//
// GroupBuyShopForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(1160, 597);
this.Controls.Add(this.splitContainer2);
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Name = "GroupBuyShopForm";
this.Text = "GroupBuyShopForm";
this.Load += new System.EventHandler(this.GroupBuyShopForm_Load);
this.splitContainer2.Panel1.ResumeLayout(false);
this.splitContainer2.Panel2.ResumeLayout(false);
this.splitContainer2.Panel2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
this.splitContainer2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dgvProduct)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.SplitContainer splitContainer2;
private UserComponent.DataGridViewEx dgvProduct;
private System.Windows.Forms.Label label1;
public UserControls.StatusBarUserControl statusBar;
private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect;
private System.Windows.Forms.DataGridViewTextBoxColumn colProductId;
private System.Windows.Forms.DataGridViewTextBoxColumn colProductName;
private System.Windows.Forms.DataGridViewTextBoxColumn colStock;
private System.Windows.Forms.DataGridViewTextBoxColumn colSales;
private System.Windows.Forms.DataGridViewTextBoxColumn colPrice;
private System.Windows.Forms.DataGridViewTextBoxColumn colCreateTime;
private System.Windows.Forms.DataGridViewTextBoxColumn colMessage;
}
}
@@ -0,0 +1,560 @@
using AllBase;
using AllBase.Extension;
using AllBase.Helper;
using AllBase.Model.Result;
using LittleRabbit.Extension;
using LittleRabbit.LittleRabbitForms.BaseForms;
using NaiBa.Util.Extension;
using Newtonsoft.Json.Linq;
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 Work.BLL.Product;
namespace LittleRabbit.LittleRabbitForms.SalesCenterForms
{
public partial class GroupBuyShopForm : Form
{
public List<string> lstProductId
{
get
{
return this.dgvProduct.Rows.Cast<DataGridViewRow>().Where(r => r.Cells["colSelect"].Value.ParseToBool() == true && r.Visible == true)
.Select(r => r.Cells["colProductId"].Value.ToString()).ToList();
}
}
private CheckBox chkSelectAll = null;
DouShopLoginInfo shop = null;
public GroupBuyForm groupBuyForm = null;
public bool isGetProductSuccess = false;
public bool isGetSalesSuccess = false;
string _signature = "";
string _timeSpan = "";
public Dictionary<long, int> dicProductSales = new Dictionary<long, int>();
public List<DouProductPromotionListInfo> productList = new List<DouProductPromotionListInfo>();
public GroupBuyShopForm(DouShopLoginInfo _shop = null)
{
InitializeComponent();
shop = _shop;
}
private void GroupBuyShopForm_Load(object sender, EventArgs e)
{
chkSelectAll = dgvProduct.Columns["colSelect"].AddHeaderCheckBox(HorizontalAlignment.Center, 0, 0, null, null, false);
dgvProduct.Columns["colSelect"].HeaderText = "";
chkSelectAll.Width = chkSelectAll.Height = 13;
chkSelectAll.CheckedChanged += chkSelectAll_CheckedChanged;
}
private void chkSelectAll_CheckedChanged(object sender, EventArgs e)
{
if (!chkSelectAll.Checked)
{
foreach (DataGridViewRow row in dgvProduct.Rows)
{
row.Cells["colSelect"].Value = false;
}
}
else
{
foreach (DataGridViewRow row in dgvProduct.Rows)
{
row.Cells["colSelect"].Value = true;
}
}
}
public void InitGetProduct()
{
if (shop == null)
return;
ShowVisitorMessage("");
foreach (DataGridViewRow r in this.dgvProduct.Rows)
{
r.Cells["colSales"].Value = "获取中";
r.Cells["colStock"].Value = "获取中";
r.Cells["colMessage"].Value = "";
}
foreach (var p in productList)
{
p.sell_num = null;
}
}
public void GetProductSim(string listUrl, string referrerUrl, Dictionary<string, string> headers, string firstPageData = "", string campaign_start_time = "", string campaign_end_time = "")
{
ShowVisitorMessage("");
var salesUrl = listUrl;
foreach (DataGridViewRow r in this.dgvProduct.Rows)
{
Invoke(new Action(() =>
{
r.Cells["colSales"].Value = "获取中";
r.Cells["colStock"].Value = "获取中";
r.Cells["colMessage"].Value = "";
}));
}
foreach (var p in productList)
{
p.sell_num = null;
}
bool isGetSalesOver = false;
var t1 = Task.Run(() =>
{
int totalx = -1;
int totalPagex = 0;
int numberx = 0;
string resultx = "";
if (!string.IsNullOrEmpty(firstPageData))
resultx = firstPageData;
ShowVisitorMessage("正在初始化商品获取");
// 获取有销量的商品
for (int i = 0; i < 10000; i++)
{
numberx += 20;
for (int j = 0; j < 3 && !resultx.Contains("\"st\":0"); j++)
{
CommonSimRequest simRequest = new CommonSimRequest();
simRequest.Accept = "application/json, text/plain, */*";
if (headers.ContainsKey("Accept"))
simRequest.Accept = headers["Accept"];
if (headers.ContainsKey("UserAgent"))
simRequest.UserAgent = headers["UserAgent"];
var cookie = shop.Cookies;
ShowVisitorMessage("商品销量获取中,第 " + (i + 1) + " 页");
var rUrl = salesUrl.Replace("page=0", "page=" + i).Replace("&pay_type=", "&pay_type=&sell_num_min=1"); // 获取所有有销量的商品,Replace不可注释!!
resultx = simRequest.Request_Get(rUrl, referrerUrl, new Dictionary<string, string>(), cookie);
if (j > 0)
{
Thread.Sleep(Randomx.GetId(250, 750));
Thread.Sleep(Randomx.GetId(250, 750));
}
}
if (resultx.Contains("\"st\":0") && !groupBuyForm.cancellationTokenSource.IsCancellationRequested)
{
this.isGetSalesSuccess = true;
if (totalx == -1)
{
totalx = BaseRegex.GetIntJson(ref resultx, "total");
}
var jObj = JObject.Parse(resultx);
var jArr = jObj["data"] as JArray;
foreach (var productObj in jArr)
{
var prod = JsonHelper.SerializeObject(productObj);
var product_id = BaseRegex.GetLongJson(ref prod, "product_id");
var sell_num = BaseRegex.GetIntJson(ref prod, "sell_num");
this.dicProductSales[product_id] = sell_num;
}
Thread.Sleep(Randomx.GetId(250, 750));
Thread.Sleep(Randomx.GetId(250, 750));
resultx = "";
}
else
{
isGetSalesSuccess = false;
ShowVisitorMessage("获取商品销量完成");
isGetSalesOver = true;
break;
}
if (numberx >= totalx)
{
ShowVisitorMessage("获取商品销量完成");
isGetSalesOver = true;
break;
}
}
});
var total = -1;
var totalPage = 1;
var number = 0;
var result = "";
referrerUrl = "https://fxg.jinritemai.com/market/center/group/create?type=1";
DateTime date = DateTime.Now.Date;
if (string.IsNullOrEmpty(campaign_start_time))
campaign_start_time = date.ToString("yyyy-MM-dd") + "+00:00:00";
if (string.IsNullOrEmpty(campaign_end_time))
campaign_end_time = date.ToString("yyyy-MM-dd") + "+23:59:59";
_timeSpan = BaseRegex.GetMatchRegexString(ref listUrl, "&_=([\\s\\S]+?)&");
if (string.IsNullOrEmpty(_timeSpan))
_timeSpan = BaseRegex.GetMatchRegexString(ref listUrl, "&_=([\\s\\S]+?)");
if (string.IsNullOrEmpty(_timeSpan))
_timeSpan = BaseClass.DateTimeToTimestampMilliseconds(DateTime.Now).ToString();
_signature = BaseRegex.GetMatchRegexString(ref listUrl, "&_signature=([\\s\\S]+?)&");
if (string.IsNullOrEmpty(_signature))
{
var listUrl2 = listUrl + "&";
_signature = BaseRegex.GetMatchRegexString(ref listUrl2, "&_signature=([\\s\\S]+?)&");
}
//https://fxg.jinritemai.com/byteshop/promotion/queryAvailableGoods?pageSize=15&page=2&page_size=15&campaign_start_time=2022-06-21+19:14:51&campaign_end_time=2022-06-22+19:14:51&_bid=ecom_market_shop&appid=1&_=1655887384070&_signature=_02B4Z6wo001018eSLdwAAIDCpJjttu0f6uPHlilAAJNfj1ao1TeKBkwmWorJ02UXEJ65nOUW80KDl7BCnks4QRQn4NSiCgbDAn0lDv-DZLnjG2jU-ZN-lFYs9ZV8k8yacuCAeWC7HN1lMk3576");
listUrl = "https://fxg.jinritemai.com/byteshop/promotion/queryAvailableGoods?pageSize=15&page=0&page_size=15&campaign_start_time="
+ campaign_start_time + "&campaign_end_time=" + campaign_end_time + "&_bid=ecom_market_shop&appid=1"
+ "&_=" + _timeSpan + "&_signature=" + _signature;
for (int i = 1; i <= groupBuyForm.getPage; i++)
{
if (i > totalPage)
break;
result = "";
number += 15;
for (int j = 0; j < 3 && !result.Contains("\"st\":0") || result.Contains("\"msg\":\"账号未登录\""); j++)
{
CommonSimRequest simRequest = new CommonSimRequest();
simRequest.Accept = "application/json, text/plain, */*";
if (headers.ContainsKey("Accept"))
simRequest.Accept = headers["Accept"];
if (headers.ContainsKey("UserAgent"))
simRequest.UserAgent = headers["UserAgent"];
var cookie = shop.Cookies;
var rUrl = listUrl.Replace("page=0", "page=" + i);
result = simRequest.Request_Get(rUrl, referrerUrl, new Dictionary<string, string>(), cookie);
if (j > 0)
{
Thread.Sleep(Randomx.GetId(250, 500));
}
ShowVisitorMessage("正在获取商品第" + i + "页");
}
if (result.Contains("\"st\":0") && !groupBuyForm.cancellationTokenSource.IsCancellationRequested)
{
this.isGetProductSuccess = true;
if (total == -1)
{
total = BaseRegex.GetIntJson(ref result, "total");
}
totalPage = Math.Ceiling(total / 15M).ParseToInt();
if (totalPage > groupBuyForm.getPage)
totalPage = groupBuyForm.getPage;
string message = "正在获取商品第 " + i + " 页,共获取 " + totalPage + " 页";
ShowVisitorMessage("");
Invoke(new Action(() =>
{
this.statusBar.lblTaskStatus.Text = message;
this.statusBar.pgbTaskProgress.Value = i;
this.statusBar.pgbTaskProgress.Text = i + "/" + totalPage;
this.statusBar.pgbTaskProgress.Maximum = totalPage;
}));
try
{
var jObj = JObject.Parse(result);
var pList = JsonHelper.DeserializeJsonToList<DouProductPromotionListInfo>(jObj["data"]?.ToString());
foreach (var product in pList)
{
if (product.allow == false)
continue;
if (dicProductSales.ContainsKey(product.product_id.ParseToLong()))
product.sell_num = dicProductSales[product.product_id.ParseToLong()];
else if (isGetSalesOver && isGetSalesSuccess)
product.sell_num = 0;
else if (isGetSalesOver)
product.sell_num = -1;
if (this.productList.Any(p => p.product_id == product.product_id))
this.productList.RemoveAll(p => p.product_id == product.product_id);
this.productList.Add(product);
Invoke(new Action(() =>
{
var rowId = -1;
var rowExist = this.dgvProduct.Rows.Cast<DataGridViewRow>().FirstOrDefault(r => r.Cells["colProductId"].Value.ToString() == product.product_id);
if (rowExist != null)
{
rowId = rowExist.Index;
dgvProduct.Rows.Insert(rowExist.Index, false, product.product_id, product.name, product.stock_num, product.sell_num,
product.min_price / 100M + " - " + product.max_price / 100M);
dgvProduct.Rows.Remove(rowExist);
}
else
rowId = dgvProduct.Rows.Add(false, product.product_id, product.name, product.stock_num, product.sell_num,
product.min_price / 100M + " - " + product.max_price / 100M);
// 过滤数据
if (groupBuyForm.keywords?.Count > 0 && !groupBuyForm.keywords.Any(k => product.name.Contains(k) || product.product_id.Contains(k)))
dgvProduct.Rows[rowId].Visible = false;
if (groupBuyForm.filterWords?.Count > 0 && groupBuyForm.filterWords.Any(k => product.name.Contains(k) || product.product_id.Contains(k)))
dgvProduct.Rows[rowId].Visible = false;
if (groupBuyForm.priceMin > product.max_price || groupBuyForm.priceMax < product.min_price)
dgvProduct.Rows[rowId].Visible = false;
if (groupBuyForm.saleMin > product.sell_num || groupBuyForm.saleMax < product.sell_num)
dgvProduct.Rows[rowId].Visible = false;
}));
}
Thread.Sleep(Randomx.GetId(250, 500));
}
catch (Exception)
{
isGetProductSuccess = false;
break;
}
}
else
{
isGetProductSuccess = false;
break;
}
if (number >= total)
break;
}
t1.Wait();
// 最后填写商品销量
foreach (var product in this.productList)
{
if (dicProductSales.ContainsKey(product.product_id.ParseToLong()))
product.sell_num = dicProductSales[product.product_id.ParseToLong()];
else if (isGetSalesSuccess)
product.sell_num = 0;
else
product.sell_num = -1;
var row = this.dgvProduct.Rows.Cast<DataGridViewRow>().FirstOrDefault(r => r.Cells["colProductId"].Value.ToString() == product.product_id);
if (row != null && row.Cells["colSales"].Value?.ToString() == "获取中")
{
if (product.sell_num >= 0)
row.Cells["colSales"].Value = product.sell_num;
if (product.sell_num >= 0)
row.Cells["colSales"].Value = product.sell_num;
}
}
Invoke(new Action(() =>
{
if (groupBuyForm.cancellationTokenSource.IsCancellationRequested)
{
this.statusBar.lblTaskStatus.Text = "获取中断";
}
else if (!isGetSalesSuccess)
{
this.statusBar.lblTaskStatus.Text = "获取完成,但获取销量信息失败";
}
else if (!isGetProductSuccess)
{
this.statusBar.lblTaskStatus.Text = "获取商品信息失败";
}
else
{
this.statusBar.lblTaskStatus.Text = "获取完成";
}
//this.statusBar.pgbTaskProgress.Value = 0;
//this.statusBar.pgbTaskProgress.Text = 0 + "/" + 0;
//this.statusBar.pgbTaskProgress.Maximum = 0;
}));
}
public void SetSalesCount()
{
foreach (var key in dicProductSales.Keys)
{
var row = this.dgvProduct.Rows.Cast<DataGridViewRow>().FirstOrDefault(r => r.Cells["colProductId"].Value.ToString() == key.ToString());
if (row != null)
{
Invoke(new Action(() =>
{
row.Cells["colSales"].Value = dicProductSales[key];
}));
}
var product = this.productList.Find(p => p.product_id.ToString() == key.ToString());
if (product != null)
product.sell_num = dicProductSales[key];
}
foreach (DataGridViewRow row in dgvProduct.Rows)
{
if (row.Cells["colSales"].Value.ToString() == "获取中")
{
Invoke(new Action(() =>
{
if (isGetSalesSuccess)
{
row.Cells["colSales"].Value = 0;
}
else
{
row.Cells["colSales"].Value = "获取失败";
}
}));
}
}
if (isGetSalesSuccess)
{
foreach (var prod in this.productList)
{
if (prod.sell_num == null)
prod.sell_num = 0;
}
}
}
public void ShowVisitorMessage(string msg, string ids = "")
{
Invoke(new Action(() =>
{
this.label1.Text = msg;
if (!string.IsNullOrEmpty(ids))
{
var idList = ids.Split(new string[] { "\",\"", "\"" }, StringSplitOptions.RemoveEmptyEntries);
var rows = this.dgvProduct.Rows.Cast<DataGridViewRow>().Where(r => idList.Contains(r.Cells["colProductId"].Value?.ToString()));
foreach (var row in rows)
{
row.Cells["colMessage"].Value = msg;
}
}
}));
}
private void dgvProduct_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
if (e.ColumnIndex < 0 || e.RowIndex < 0)
return;
string headerText = dgvProduct.Columns[e.ColumnIndex].HeaderText;
string columnName = dgvProduct.Columns[e.ColumnIndex].Name;
var row = dgvProduct.Rows[e.RowIndex];
switch (columnName)
{
case "colSelect":
break;
}
}
private void label1_Click(object sender, EventArgs e)
{
}
private void splitContainer2_SplitterMoved(object sender, SplitterEventArgs e)
{
}
private void statusBar_Load(object sender, EventArgs e)
{
}
bool isSelecting = false;
bool isCheck = true;
private void dgvProduct_CellMouseDown(object sender, DataGridViewCellMouseEventArgs e)
{
if (e.ColumnIndex < 0 || e.RowIndex < 0)
return;
var columnName = dgvProduct.Columns[e.ColumnIndex].Name;
if (MouseButtons == MouseButtons.Left)
{
if (columnName == "colSelect")
{
dgvProduct.Rows[e.RowIndex].Cells["colSelect"].Value = !dgvProduct.Rows[e.RowIndex].Cells["colSelect"].Value.ParseToBool();
isSelecting = true;
isCheck = dgvProduct.Rows[e.RowIndex].Cells["colSelect"].Value.ParseToBool();
chkSelectAll.CheckedChanged -= chkSelectAll_CheckedChanged;
if (dgvProduct.Rows.Cast<DataGridViewRow>().All(r => r.Cells["colSelect"].Value.ParseToBool()))
chkSelectAll.Checked = true;
else
chkSelectAll.Checked = false;
chkSelectAll.CheckedChanged += chkSelectAll_CheckedChanged;
}
}
}
private void dgvProduct_CellMouseEnter(object sender, DataGridViewCellEventArgs e)
{
if (e.ColumnIndex < 0 || e.RowIndex < 0)
return;
var row = dgvProduct.Rows[e.RowIndex];
if (MouseButtons == MouseButtons.Left)
{
var columnName = dgvProduct.Columns[e.ColumnIndex].Name;
if (isSelecting)
{
dgvProduct.Rows[e.RowIndex].Cells["colSelect"].Value = isCheck;
chkSelectAll.CheckedChanged -= chkSelectAll_CheckedChanged;
if (dgvProduct.Rows.Cast<DataGridViewRow>().All(r => r.Cells["colSelect"].Value.ParseToBool()))
chkSelectAll.Checked = true;
else
chkSelectAll.Checked = false;
chkSelectAll.CheckedChanged += chkSelectAll_CheckedChanged;
}
}
}
private void dgvProduct_CellMouseUp(object sender, DataGridViewCellMouseEventArgs e)
{
isSelecting = false;
}
//根据id获取sku
public string GetSkusByProductIds(string postData, string cookies)
{
CommonSimRequest request = new CommonSimRequest();
request.ContentType = "application/json";
Dictionary<string, string> dicts = new Dictionary<string, string>();
string reqUrl = "https://fxg.jinritemai.com/byteshop/promotion/batchGetSkuByProductIds?_bid=ecom_market_shop&appid=1&_=" + _timeSpan + "&_signature=" + _signature;
string referer = "https://fxg.jinritemai.com/market/center/group/create?type=1";
string result = request.Request_PostByBigLength(reqUrl, referer, dicts, cookies, postData);
return result;
}
public string checkGroupBuyGoods(string postData, string cookies)
{
CommonSimRequest request = new CommonSimRequest();
request.ContentType = "application/json";
Dictionary<string, string> dicts = new Dictionary<string, string>();
string reqUrl = "https://fxg.jinritemai.com/byteshop/promotion/checkGroupBuy?_bid=ecom_market_shop&appid=1&_=" + _timeSpan + "&_signature=" + _signature;
string referer = "https://fxg.jinritemai.com/market/center/group/create?type=1";
string result = request.Request_PostByBigLength(reqUrl, referer, dicts, cookies, postData);
return result;
}
public string createGroupBuyGoods(string postData, string cookies)
{
CommonSimRequest request = new CommonSimRequest();
request.ContentType = "application/json";
Dictionary<string, string> dicts = new Dictionary<string, string>();
string reqUrl = "https://fxg.jinritemai.com/byteshop/promotion/createGroupBuy?_bid=ecom_market_shop&appid=1&_=" + _timeSpan + "&_signature=" + _signature;
string result = request.Request_PostByBigLength(reqUrl, "https://fxg.jinritemai.com/market/center/tools/limitsales/detail?refer=new", dicts, cookies, postData);
return result;
}
public void ClearData()
{
this.dgvProduct.Rows.Clear();
this.productList.Clear();
}
}
}
@@ -0,0 +1,144 @@
<?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="colSelect.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colProductId.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colProductName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colStock.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colSales.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colPrice.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colCreateTime.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colMessage.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>
@@ -0,0 +1,131 @@
namespace LittleRabbit.LittleRabbitForms.SalesCenterForms
{
partial class LimitedSalesActivityNameForm
{
/// <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()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(LimitedSalesActivityNameForm));
this.panel2 = new System.Windows.Forms.Panel();
this.labelX1 = new DevComponents.DotNetBar.LabelX();
this.textBoxX1 = new DevComponents.DotNetBar.Controls.TextBoxX();
this.btnSave = new DevComponents.DotNetBar.PanelEx();
this.panel2.SuspendLayout();
this.SuspendLayout();
//
// panel2
//
this.panel2.BackColor = System.Drawing.Color.White;
this.panel2.Controls.Add(this.labelX1);
this.panel2.Controls.Add(this.textBoxX1);
this.panel2.Controls.Add(this.btnSave);
this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel2.Location = new System.Drawing.Point(1, 33);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(383, 416);
this.panel2.TabIndex = 1;
//
// labelX1
//
this.labelX1.AutoSize = true;
//
//
//
this.labelX1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.labelX1.ForeColor = System.Drawing.Color.Gray;
this.labelX1.Location = new System.Drawing.Point(16, 11);
this.labelX1.Name = "labelX1";
this.labelX1.Size = new System.Drawing.Size(303, 18);
this.labelX1.TabIndex = 462;
this.labelX1.Text = "请输入自定义活动名称,一行一个(长度1-10个字符):";
//
// textBoxX1
//
this.textBoxX1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
//
//
//
this.textBoxX1.Border.Class = "TextBoxBorder";
this.textBoxX1.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.textBoxX1.Location = new System.Drawing.Point(16, 35);
this.textBoxX1.Multiline = true;
this.textBoxX1.Name = "textBoxX1";
this.textBoxX1.PreventEnterBeep = true;
this.textBoxX1.Size = new System.Drawing.Size(351, 338);
this.textBoxX1.TabIndex = 461;
//
// btnSave
//
this.btnSave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnSave.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnSave.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnSave.DisabledBackColor = System.Drawing.Color.Empty;
this.btnSave.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSave.Location = new System.Drawing.Point(309, 379);
this.btnSave.Name = "btnSave";
this.btnSave.Size = new System.Drawing.Size(58, 23);
this.btnSave.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnSave.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnSave.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnSave.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnSave.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnSave.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnSave.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnSave.Style.GradientAngle = 90;
this.btnSave.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnSave.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnSave.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnSave.TabIndex = 460;
this.btnSave.Text = "保存";
this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
//
// LimitedSalesActivityNameForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(385, 450);
this.Controls.Add(this.panel2);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "LimitedSalesActivityNameForm";
this.Text = "自定义限时限量购活动名称";
this.TitleText = "自定义限时限量购活动名称";
this.Controls.SetChildIndex(this.panel2, 0);
this.panel2.ResumeLayout(false);
this.panel2.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Panel panel2;
private DevComponents.DotNetBar.LabelX labelX1;
private DevComponents.DotNetBar.Controls.TextBoxX textBoxX1;
private DevComponents.DotNetBar.PanelEx btnSave;
}
}
@@ -0,0 +1,36 @@
using LittleRabbit.LittleRabbitForms.BaseForms;
using NaiBa.Util;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace LittleRabbit.LittleRabbitForms.SalesCenterForms
{
public partial class LimitedSalesActivityNameForm : LRBaseForm
{
public LimitedSalesActivityNameForm()
{
InitializeComponent();
this.Load += GroupBuyCustomActivityNameForm_Load;
}
private void GroupBuyCustomActivityNameForm_Load(object sender, EventArgs e)
{
this.textBoxX1.Text = string.Join("\r\n", SeckillingAndLimitedSalesForm.CustomActivityNames) + "\r\n";
}
private void btnSave_Click(object sender, EventArgs e)
{
SeckillingAndLimitedSalesForm.CustomActivityNames = this.textBoxX1.Text.Trim().Split(new string[] { "\r", "\n" }, StringSplitOptions.RemoveEmptyEntries).ToList();
NaiBa.Util.Helper.ConfigHelper.SaveConfig<List<string>>("limited_sales_custom_names", SeckillingAndLimitedSalesForm.CustomActivityNames);
this.Close();
}
}
}
@@ -0,0 +1,298 @@
<?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>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAgIAQcgAAAABoKAAAFgAAACgAAACAAAAAAAEAAAEABAAAAAAAACgAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAACAAACAAAAAgIAAgAAAAIAAgACAgAAAgICAAMDAwAAAAP8AAP8AAAD//wD/AAAA/wD/AP//
AAD///8AAAAAAAAAAAAAAAAABEZmbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMZmZkQAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAZszMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM
zMxmAAAAAAAAAAAAAAAAAAAAAAAAAAAEbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM
zMzMzMzMzMZAAAAAAAAAAAAAAAAAAAAAAAAEbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM
zMzMzMzMzMzMzMzMxkAAAAAAAAAAAAAAAAAAAAAEbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM
zMzMzMzMzMzMzMzMzMzMzMzGQAAAAAAAAAAAAAAAAAAAbMzMzMzMzMzMzMzMzMzMzMzMzMd3d3d3d3d3
d3d3fMzMzMzMzMzMzMzMzMzMzMzMzMYAAAAAAAAAAAAAAAAARszMzMzMzMzMzMzMzMzMzMd3d3iIiIiI
iIiIiIiIiIh3d3d8zMzMzMzMzMzMzMzMzMzMZAAAAAAAAAAAAAAABszMzMzMzMzMzMzMzMzMx3eIiIiI
iIiIiIiIiIiIiIiIiIiIiHd8zMzMzMzMzMzMzMzMzMxgAAAAAAAAAAAAAGzMzMzMzMzMzMzMzMzMd4iI
iIiIiIiIiIiIiIiIiIiIiIiIiIiIiHfMzMzMzMzMzMzMzMzMxgAAAAAAAAAAAAbMzMzMzMzMzMzMzMzH
eIiIiIiIiIiHZmZmZmZmZmZmZ3eIiIiIiIiIiHzMzMzMzMzMzMzMzMxgAAAAAAAAAABszMzMzMzMzMzM
zMzHiIiIiIiHZmZmZmZmZmZmZmZmZmZmZmZmeIiIiIiIfMzMzMzMzMzMzMzMxgAAAAAAAAAGzMzMzMzM
zMzMzMzHiIiIiIdmZmZmZgAAAAAAAAAAAAZmZmZmZmZmeIiIiIh8zMzMzMzMzMzMzMxgAAAAAAAATMzM
zMzMzMzMzMzHiIiIiHZmZgAAAAAAAAAAAAEAAAAAAAAAAGZmZmZniIiIiHzMzMzMzMzMzMzMxAAAAAAA
AGzMzMzMzMzMzMzMeIiIiGZmAAAAAAERERmZmZmZmZmZkRERERAAAGZmZmZ4iIiIfMzMzMzMzMzMzMYA
AAAAAAbMzMzMzMzMzMzMeIiIiGZgAAAAERmZmZmZmZmZmZmZmZmZmZmZkREAAGZmZniIiIfMzMzMzMzM
zMzMYAAAAABMzMzMzMzMzMzMzIiIiHYAAAARGZmZiIiIj///////+IiIiIeZmZmZkREAZmZmiIiIfMzM
zMzMzMzMzMQAAAAAbMzMzMzMzMzMzO6IiIYAAAARmYiI/////////////////////4iHmZmZEQBmZmeI
iIh8zMzMzMzMzMzGAAAABMzMzMzMzMzMzMeIiIdgAAAZmI////////////////////////////iJmZmR
EGZmZ4iIh8zMzMzMzMzMzEAAAAbMzMzMzMzMzMzoiIhwAAAZeP//////////////////////////////
/4iZmZEAZmZ4iIh8zMzMzMzMzMxgAABMzMzMzMzMzMzOiIiGAAABiP//////////////////////////
////////+JmZkQZmZ4iIh8zMzMzMzMzMxAAAbMzMzMzMzMzM7oiIYAABeP//////////////////////
///////////////4mZkQZmZ4iIjMzMzMzMzMzMYAAMzMzMzMzMzMzu6IhwAAGP//////////////////
/////////////////////4iZmRZmZ4iIfMzMzMzMzMzMAAbMzMzMzMzMzM7oiHAAB4//////////////
////////////////////////////iZmRBmZ4iIfMzMzMzMzMzGAGzMzMzMzMzMzuiIcAAHj/////////
//////////////////////////////////iZmRZmZ4iIzMzMzMzMzMxgDMzMzMzMzMzM7ohwAAf/////
////////////////////////////////////////95mRZmaIiHzMzMzMzMzMwEzMzMzMzMzMzuiIEABo
//////////////////////////////////////////////95mRZmaIiMzMzMzMzMzMRszMzMzMzMzM7o
hwAGj///////////////////////////////////////////////95kQZmeIh8zMzMzMzMzGbMzMzMzM
zMzu6HEAB/////////////////////////////////////////////////+ZkQZmiIjMzMzMzMzMxmzM
zMzMzMzM7ohwAGj/////////////////////////////////////////////////iZkWZniIfMzMzMzM
zMZszMzMzMzMxu6HEAbv/4iI/////////////////////////////////////////4iP//iZEGZoiHzM
zMzMzMzGbMzMzMzMzM7uhxAGj/iIiIj//////////////////////////////////////4iIiI//mZFm
aIiMzMzMzMzMxszMzMzMzMzO6IEAbv+IiIiIj/////////////////////////////////////iIiIiP
/4mRBmeIh8zMzMzMzMbMzMzMzMzMbuhxAG7/iIiIiI////////////////iIj///j//////////////4
iIiIiP/5mQZmiIfMzMzMzMzMzMzMzMzMzO7ocQDo+IiIiIiP///////////////u7u7u7u7o////////
////iIiIiIj/+JkWZoiHzMzMzMzMzMzMzMzMzMzu6BEG7/iIiIiIj/////////////+Hd3ju5maO7v//
/////////4iIiIiI//iZEGaIh8zMzMzMzMzMzMzMzMzM7ugRBu//iIiIiI//////////////kZmZdmAZ
mP/////////////4iIiIiP//mRBmeIjMzMzMzMzMzMzMzMzMzO7nEAbv/4iIiIiP////////////+HiI
mZEBd5n/////////////+IiIiIj//4mQZniIzMzMzMzMzMzMzMzMzMzu5xAO7//4iIiI//ju7o//////
//j//4mZeP/4//////////////iIiIiP//+JkGZ4iHzMzMzMzMzMzMzMzMzG7ocQDu///4iI//ju7u7u
j//////////4mP//////////////7u7uiIiI////iZBmaIh8zMzMzMzMzMzMzMzMzu6HEG7v//////+G
ZmZ47u7//////////4//////////////7u7u7u6P/////4mQBmiIfMzMzMzMzMzMzMzMzM7uhRBu7///
///3AAAAF37u7///////////////////////h2AABm7u7v/////5kAZ4iHzMzMzMzMzMzMzMzMzO7oUQ
bu//////gQAAZgEG7u//////////////////////+BAAAAAFfu6P////+ZAGeIjMzMzMzMzMzMzMzMzM
zu6FEG7v////+JEAAXhwAG7o/////////////////////4gAABEGARbu7/////kQBoiIzMzMzMzMzMzM
zMzMzM7uhRBu7/////iZABmZkQBm6P////////////////////+JABGZF2AAbo////+JEGaIiMzMzMzM
zMzMzMzMzMzO7ucRbu/////4mRZ4iZkQBu//////////////////////mQB5mZdgAG7/////iRBmiIfM
zMzMzMzMzMzMzMzMxu7nEQ7v////+Bl+j/iZEAaP/////////////////////5l2/4mRAABu/////4kQ
ZoiHzMzMzMzMzMzMzMzMzMzu5xEO6P//+Phgbu/4kQAI//////////////////////+Zfo/4kQAAeIiP
//+JEGaIh8zMzMzMzMzMzMzMzMzM7ucRBu7///iOYHiI+HAAf///////////////////////mYjv+BAA
BuiIj///iQBniIfMzMzMzMzMzMzMzMzMzO7nEQbu///3EAAG6IcRF4iP/////////////////////4GP
/4cQAAZnbv///5EAaIiMzMzMzMzMzMzMzMzMzMzu5xEW7v//iRF3dmZgAXjmj///////////////////
///3ePiBEQAHdm7///iRAGiIfMzMzMzMzMzMzMzMzMzM7u5xFu6P/5EZmXZmZmbmaP//////////////
///////4/4d2cRAAFwbuj//4kQZoiHzMzMzMzMzMzMzMzMzMzG7ucRDu7/iXiZkQAAZmAH//////////
////////////+IiIdmYABmAX//j/+BAGeIh8zMzMzMzMzMzMzMzMzMzO7nEQbu/4iP+BERkREZf/////
//////////////////+JmXdxEBEAB3////kQBoiIzMzMzMzMzMzMzMzMzMzMzu5xEW7o+P//gZmZmZmP
////////////////////////+JmZmZmZl453//+JAGaIh8zMzMzMzMzMzMzMzMzMzM7u5xEO7vj/+IeP
iIj////////////////////////////4iZmZmZiPiP//cQBoiIfMzMzMzMzMzMzMzMzMzMzM7ucRFu6P
//iP//////////////////////////////////////+Jn/j/+JAAaIiMzMzMzMzMzMzMzMzMzMzMzO7n
ERbu7//4/////////////////////////////////////////4j///gQBoiIfMzMzMzMzMzMzMzMzMzM
zMzu7nERbuj////////////////////////////////////////////4//+BAAaIiMzMzMzMzMzMzMzM
zMzMzMzMzu5xEW7u////////////////////////////////////////////////cQBoiIfMzMzMzMzM
zMzMzMzMzMzMzM7u5xEW7u//////////////////////////////////////////////+BAAaIiMzMzM
zMzMzMzMzMzMzMzMzMzO7uYREO7o//7v//////////////////////////////////////////cABoiI
fMzMzMzMzMzMzMzMzMzMzMzMzO7ucRFu7oj/7o////////////////////////////////////////9x
AAeIiMzMzMzMzMzMzMzMzMzMzMzMzMzO7ucRFu7nePju7u7v////////////////////////////////
6P/4EAB4iIfMzMzMzMzMzMzMzMzMzMzMzMzMzu7nERBu7nmIiO7oj///////////////////////////
ju7u7o//hwAGiIh8zMzMzMzMzMzMzMzMzMzMzMzMzMzu7nERbu7nmZl5eP//////////////////////
///4iPiO5nj/+HAAaIiIzMzMzMzMzMzMzMzMzMzMzMzMzMzM7u7nERbu7oiZeI//////////////////
////////+ImXd5mP/4cAAHiIh8zMzMzMzMzMzMzMzMzMzMzMzMzMzM7u53ERbu7v////////////////
///////////////4iZl4//hgAAeIiHzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM7u53ERBu7v//////////
//////////////////////////+GAAB4iI7MzMzMzMzMzMzMzMzMzMzMzMzMzMzMzO7uiHEADujv////
///////////////////////////////3AAAGiIh8zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzO7ohwABmP
////////////////////////////////////iREAZniIjMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzuiI
EAB4f///////////////////////////////////+JmZkWZoiIfMzMzMzMzMzMzMzMzMzMzMzMzMzMzM
zO6IhwBo//////////////////////////////////////iImZl2ZoiIzMzMzMzMzMzMzMzMzMzMzMzM
zMzMzMzuiHAA7////////////////////////////////////////4iZFmZ4iHzMzMzMzMzMzMzMzMzM
zMzMzMzMzMzO6IgQBo/////4j///////////////////////////////////mZFmaIiMzMzMzMzMzMzM
zMzMzMzMzMzMzMzMzuiHAA7/////iIiP//////7o//////////////////iI/////4mRZmeIh8zMzMzM
zMzMzMzMzMzMzMzMzMzMzO6IcQBo////+IiIiI/////+7u7u7uiIiI7u7v////iIiI/////5mRZmiIjM
zMzMzMzMzMzMzMzMzMzMzMzMzMzuiHAA7////4iIiIiIj//3d2bu7u7u7u7u7u7//4iIiIiP////+JkW
ZniIfMzMzMzMzMzMzMzMzMzMzMzMzMzO6IcQBo////+IiIiIiI//+ZkAAGZmZmZmZmbv//iIiIiIiP//
//+ZkWZoiIzMzMzMzMzMzMzMzMzMzMzMzMzMzuiFAG7////4iIiIiIj///iZABEREREREBAG7//4iIiI
iIj/////iZFmaIiMzMzMzMzMzMzMzMzMzMzMzMzMzO6IcQBo////+IiIiIiI///4kQARERERERERDo//
+IiIiIiIj/////mZBmeIh8zMzMzMzMzMzMzMzMzMzMzMzMzuiHAG7////4iIiIiIiP//+JFmeHd3d3dx
EW6P//iIiIiIiI/////4mRZmiIfMzMzMzMzMzMzMzMzMzMzMzMzO7ocQBo////+IiIiIiIj///iQZoiO
7u7u5xFu7//4iIiIiIiI////+JkWZniIzMzMzMzMzMzMzMzMzMzMzMzMzuiHEA7////4iIiIiIiP///5
kGaIju7u7ucRbu///4iIiIiIiP////95kGZ4iHzMzMzMzMzMzMzMzMzMzMzMzM7ogQBu////+IiIiIiI
j///+RBmiI7u7u7nEW7v//+IiIiIiIiP////iZFmaIh8zMzMzMzMzMzMzMzMzMzMzMzu6HEAaP////iI
iIiIiI////kQZoiHzMzu5xEO6P//iIiIiIiIj////4mRZmiIjMzMzMzMzMzMzMzMzMzMzMzM7ugRBu//
///4iIiIiIj///+JEGaIh8zM7ucRBu7//4iIiIiIiI/////5kQZniIzMzMzMzMzMzMzMzMzMzMzMzO6I
EAbv////iIiIiIiI////iQBniIzMzO7oERbu///4iIiIiIiP////+JkGZ4iHzMzMzMzMzMzMzMzMzMzM
zMbuhxAGj////4iIiIiIj////3kAaIiMzMzu7nEW7v//+IiIiIiIiP////iZFmaIh8zMzMzMzMzMzMzM
zMzMzMzO7oUQbv////+IiIiIiI////+RBmiIfMzMzu5xFu6P//+IiIiIiIj////4mRZmiIfMzMzMzMzM
zMzMzMzMzMzMzu6BAG7////4iIiIiIj////4kQZoiHzMzM7ucRDu7///iIiIiIiIj////5kQZoiHzMzM
zMzMzMzMzMzMzMzMzM7ocQBu////+IiIiIiI////+JAGeIh8zMzO7nERbu///4iIiIiIiI////95EGaI
h8zMzMzMzMzMzMzMzMzMzMxu6HEA7v////iIiIiIiP////cQBoiIzMzMzu7lEW7v///4iIiIiIiP////
iRBmeIjMzMzMzMzMzMzMzMzMzMzM7uhxBuj////4iIiIiI/////5EAaIiMzMzMbu5xEO7v//+IiIiIiI
j////4kQZniIzMzMzMzMzMzMzMzMzMzMzO7oEQbv////+IiIiIj/////iQBmiIfMzMzM7ucRBu7///iI
iIiIiIj///+JkGZ4iMzMzMzMzMzMzMzMzMzMzMzu6BEG7/////iIiIiI/////4EAaIiHzMzMzO7nERbu
j///iIiIiIiI////iZBmaIh8zMzMzMzMzMzMzMzMzMzM7ucRBu/////4iIiIj/////+RAGiIjMzMzMzu
7nEQ7u////iIiIiIiP///4mQBmiIfMzMzMzMzMzMzMzMzMzMzO7nEAbv////+IiIiP/////4EAZ4iHzM
zMzMzu5xEG7v///4iIiIiIj///+JkAZoiHzMzMzMzMzMxmzMzMzMzMzu5xAO7/////+IiI//////+RAG
iIjMzMzMzM7ucRFu7v///4iIiIiI////+ZAGaIh8zMzMzMzMzMZszMzMzMzG7ocQDu//////+I//////
/4EAZoiIzMzMzMzO7ucRBu7////4iIiIiP////mQBmiIfMzMzMzMzMzGbMzMzMzMzu6HEA7v////////
//////9xAGiIh8zMzMzMzO7nERbu7///+IiIiI/////5kAZoiHzMzMzMzMzMxmzMzMzMzM7uhxAO7///
///////////4EABoiIzMzMzMzMzu7nEQbu////+IiIiP////+ZAGaIh8zMzMzMzMzMZszMzMzMzO7oUQ
Du//////////////9xAGiIh8zMzMzMzM7u5xEW7u/////4iI//////mQBmiIfMzMzMzMzMzGTMzMzMzM
zu6HEA7v/////////////4EABoiIzMzMzMzMzM7u5xEG7v/////////////5kAZoiHzMzMzMzMzMxAzM
zMzMzM7uhxEO7/////////////9wAGiIh8zMzMzMzMzO7ucRFu7v////////////+RAGeIh8zMzMzMzM
zMAGzMzMzMzO7ucRDuj////////////4EAB4iIzMzMzMzMzMzO7ucRBu6P///////////4kQBoiIzMzM
zMzMzMxgBszMzMzMxu7nEQbo////////////gQAGiIh8zMzMzMzMzMzu7nERDu7///////////+JEAaI
iMzMzMzMzMzMYADMzMzMzMzu5xEG7v///////////3EAZ4iIzMzMzMzMzMzMzu7nERbu7///////////
gQBmiIfMzMzMzMzMzAAAbMzMzMzM7ucRBu7///////////gQAGiIh8zMzMzMzMzMzM7u5xEQbu7/////
/////5EAZ4iHzMzMzMzMzMYAAEzMzMzMzO7nERDu7/////////+HAAaIiIzMzMzMzMzMzMzM7u5xEQ7u
7/////////gQAGiIjMzMzMzMzMzEAAAGzMzMzMzu7nEQbuj////////4cAAHiIh8zMzMzMzMzMzMzO7u
dxEW7uj////////3AAZoiHzMzMzMzMzMYAAABMzMzMzM7u5xEG7u////////hgAAeIiHzMzMzMzMzMzM
zMzO7ucREW7u7///////gQAGiIh8zMzMzMzMzEAAAABszMzMzM7ucREG7uj/////hmAAB4iI7MzMzMzM
zMzMzMzMzu7ucREG7u6P////+AAAB4iIzMzMzMzMzMYAAAAATMzMzMzO7ucREG7u7oiO7mAAAHiIiMzM
zMzMzMzMzMzMzMzu7ucREG7u7o//+HYAAHiIh8zMzMzMzMzEAAAAAAbMzMzMzu7nEREG7u7u5mAAAAeI
iIfMzMzMzMzMzMzMzMzMzu7ucREQbu7u7uYAAAeIiHzMzMzMzMzMYAAAAAAAbMzMzMzu7nEREAZmZgAA
AAF4iI58zMzMzMzMzMzMzMzMzMzu7ncREQZm7mZgAAB4iI7MzMzMzMzMxgAAAAAAAEzMzMzM7u7nEREQ
AAAAABF4iI7uzMzMzMzMzMzMzMzMzMzM7u7ucRERAAAAAAAHiIiMzMzMzMzMzMQAAAAAAAAGzMzMzM7u
7nERERERERF3iIju7MzMzMzMzMzMzMzMzMzMzM7u7udREREQAAAReIiIfMzMzMzMzMxgAAAAAAAAAGzM
zMzM7u7udRERERV4iI7u7MzMzMzMzMzMzMzMzMzMzMzM7u7u5xEREREReIiO7MzMzMzMzMzGAAAAAAAA
AAAGzMzMzM7u7u53d3eIiO7u7szMzMzMzMzMzMzMzMzMzMzMzM7u7u7nd1F3eIiO7uzMzMzMzMzMYAAA
AAAAAAAAAGzMzMzM7u7u7u7u7u7u7szMzMzMzMzMzMzMzMzMzMzMzMzMzu7u7u6IiI7u7uzMzMzMzMzM
xgAAAAAAAAAAAAAGzMzMzMzu7u7u7u7u5szMzMzMzMzMzMzMzMzMzMzMzMzMzMzO7u7u7u7u7u7MzMzM
zMzMzGAAAAAAAAAAAAAAAEbMzMzMzG7u7u7ubMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM7u7u7u7uzM
zMzMzMzMzGQAAAAAAAAAAAAAAAAAbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzG7u
7szMzMzMzMzMzMYAAAAAAAAAAAAAAAAAAARszMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM
zMzMzMzMzMzMzMzMzMZAAAAAAAAAAAAAAAAAAAAABGzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM
zMzMzMzMzMzMzMzMzMzMzMZAAAAAAAAAAAAAAAAAAAAAAAAEbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM
zMzMzMzMzMzMzMzMzMzMzMzMzMZAAAAAAAAAAAAAAAAAAAAAAAAAAABmzMzMzMzMzMzMzMzMzMzMzMzM
zMzMzMzMzMzMzMzMzMzMzMzMzMzMzGYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARGZmzMzMzMzMzMzMzM
zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMZmZEAAAAAAAAAAAAAAAAD////+AAAAAAAAAAD/////////AAAA
AAAAAAAAAP//////+AAAAAAAAAAAAAAf/////+AAAAAAAAAAAAAAB/////+AAAAAAAAAAAAAAAH////+
AAAAAAAAAAAAAAAAf////AAAAAAAAAAAAAAAAD////AAAAAAAAAAAAAAAAAP///gAAAAAAAAAAAAAAAA
B///wAAAAAAAAAAAAAAAAAP//4AAAAAAAAAAAAAAAAAB//8AAAAAAAAAAAAAAAAAAP/+AAAAAAAAAAAA
AAAAAAB//gAAAAAAAAAAAAAAAAAAf/wAAAAAAAAAAAAAAAAAAD/4AAAAAAAAAAAAAAAAAAAf+AAAAAAA
AAAAAAAAAAAAH/AAAAAAAAAAAAAAAAAAAA/wAAAAAAAAAAAAAAAAAAAP4AAAAAAAAAAAAAAAAAAAB+AA
AAAAAAAAAAAAAAAAAAfAAAAAAAAAAAAAAAAAAAADwAAAAAAAAAAAAAAAAAAAA8AAAAAAAAAAAAAAAAAA
AAOAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAA
AAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAABAAAAAAAA
AAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAA
AAGAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAA
AAAAAAABgAAAAAAAAAAAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAPAAAAAAAAAAAAAAAAAAAADwAAAAAAA
AAAAAAAAAAAAA+AAAAAAAAAAAAAAAAAAAAfgAAAAAAAAAAAAAAAAAAAH8AAAAAAAAAAAAAAAAAAAD/AA
AAAAAAAAAAAAAAAAAA/4AAAAAAAAAAAAAAAAAAAf+AAAAAAAAAAAAAAAAAAAH/wAAAAAAAAAAAAAAAAA
AD/+AAAAAAAAAAAAAAAAAAB//gAAAAAAAAAAAAAAAAAAf/8AAAAAAAAAAAAAAAAAAP//gAAAAAAAAAAA
AAAAAAH//8AAAAAAAAAAAAAAAAAD///gAAAAAAAAAAAAAAAAB///8AAAAAAAAAAAAAAAAA////wAAAAA
AAAAAAAAAAA////+AAAAAAAAAAAAAAAAf////4AAAAAAAAAAAAAAAf/////gAAAAAAAAAAAAAAf/////
+AAAAAAAAAAAAAAf//////8AAAAAAAAAAAAA/////////gAAAAAAAAAAf////w==
</value>
</data>
</root>
@@ -0,0 +1,576 @@
namespace LittleRabbit.LittleRabbitForms.SalesCenterForms
{
partial class LimitedSalesManagerActiveForm
{
/// <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()
{
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.dgvActive = new LittleRabbit.UserComponent.DataGridViewEx();
this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.colActivityId = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colActivityName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colPreStartTime = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colStartTime = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colEndTime = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colPrefereType = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colActiveState = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colMessage = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.label1 = new System.Windows.Forms.Label();
this.statusBar = new LittleRabbit.UserControls.StatusBarUserControl();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.txtProID = new System.Windows.Forms.TextBox();
this.cmbType = new DevComponents.DotNetBar.Controls.ComboBoxEx();
this.comboItem6 = new DevComponents.Editors.ComboItem();
this.comboItem7 = new DevComponents.Editors.ComboItem();
this.comboItem8 = new DevComponents.Editors.ComboItem();
this.comboItem9 = new DevComponents.Editors.ComboItem();
this.cmbActState = new DevComponents.DotNetBar.Controls.ComboBoxEx();
this.comboItem1 = new DevComponents.Editors.ComboItem();
this.comboItem2 = new DevComponents.Editors.ComboItem();
this.comboItem3 = new DevComponents.Editors.ComboItem();
this.comboItem4 = new DevComponents.Editors.ComboItem();
this.comboItem5 = new DevComponents.Editors.ComboItem();
this.txtActivity = new System.Windows.Forms.TextBox();
this.btnReload = new DevComponents.DotNetBar.PanelEx();
this.btnEdit = new DevComponents.DotNetBar.PanelEx();
this.btnInvalid = new DevComponents.DotNetBar.PanelEx();
this.btnDelete = new DevComponents.DotNetBar.PanelEx();
this.btnSearch = new DevComponents.DotNetBar.PanelEx();
this.label3 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.lblLimit = new System.Windows.Forms.Label();
this.lblActivity = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit();
this.splitContainer2.Panel1.SuspendLayout();
this.splitContainer2.Panel2.SuspendLayout();
this.splitContainer2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvActive)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.SuspendLayout();
//
// splitContainer2
//
this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
this.splitContainer2.Location = new System.Drawing.Point(0, 0);
this.splitContainer2.Name = "splitContainer2";
this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer2.Panel1
//
this.splitContainer2.Panel1.Controls.Add(this.dgvActive);
this.splitContainer2.Panel1.Padding = new System.Windows.Forms.Padding(4, 0, 4, 0);
//
// splitContainer2.Panel2
//
this.splitContainer2.Panel2.Controls.Add(this.label1);
this.splitContainer2.Panel2.Controls.Add(this.statusBar);
this.splitContainer2.Size = new System.Drawing.Size(1021, 417);
this.splitContainer2.SplitterDistance = 387;
this.splitContainer2.TabIndex = 10;
//
// dgvActive
//
this.dgvActive.AllowUserToAddRows = false;
this.dgvActive.AllowUserToDeleteRows = false;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvActive.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
this.dgvActive.BackgroundColor = System.Drawing.Color.White;
this.dgvActive.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvActive.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
this.dgvActive.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvActive.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colSelect,
this.colActivityId,
this.colActivityName,
this.colPreStartTime,
this.colStartTime,
this.colEndTime,
this.colPrefereType,
this.colActiveState,
this.colMessage});
this.dgvActive.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvActive.Location = new System.Drawing.Point(4, 0);
this.dgvActive.Name = "dgvActive";
this.dgvActive.ReadOnly = true;
dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.dgvActive.RowsDefaultCellStyle = dataGridViewCellStyle3;
this.dgvActive.RowTemplate.Height = 23;
this.dgvActive.Size = new System.Drawing.Size(1013, 387);
this.dgvActive.TabIndex = 6;
this.dgvActive.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvActive_CellContentClick);
//
// colSelect
//
this.colSelect.FillWeight = 50F;
this.colSelect.HeaderText = "选";
this.colSelect.Name = "colSelect";
this.colSelect.ReadOnly = true;
this.colSelect.Resizable = System.Windows.Forms.DataGridViewTriState.False;
this.colSelect.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colSelect.Width = 40;
//
// colActivityId
//
this.colActivityId.HeaderText = "活动Id";
this.colActivityId.Name = "colActivityId";
this.colActivityId.ReadOnly = true;
this.colActivityId.Visible = false;
//
// colActivityName
//
this.colActivityName.HeaderText = "活动名称";
this.colActivityName.Name = "colActivityName";
this.colActivityName.ReadOnly = true;
this.colActivityName.Resizable = System.Windows.Forms.DataGridViewTriState.True;
//
// colPreStartTime
//
this.colPreStartTime.HeaderText = "预热开始时间";
this.colPreStartTime.Name = "colPreStartTime";
this.colPreStartTime.ReadOnly = true;
this.colPreStartTime.Width = 130;
//
// colStartTime
//
this.colStartTime.HeaderText = "活动开始时间";
this.colStartTime.Name = "colStartTime";
this.colStartTime.ReadOnly = true;
this.colStartTime.Width = 130;
//
// colEndTime
//
this.colEndTime.HeaderText = "活动结束时间";
this.colEndTime.Name = "colEndTime";
this.colEndTime.ReadOnly = true;
this.colEndTime.Width = 130;
//
// colPrefereType
//
this.colPrefereType.HeaderText = "优惠类型";
this.colPrefereType.Name = "colPrefereType";
this.colPrefereType.ReadOnly = true;
this.colPrefereType.Width = 85;
//
// colActiveState
//
this.colActiveState.HeaderText = "活动状态";
this.colActiveState.Name = "colActiveState";
this.colActiveState.ReadOnly = true;
this.colActiveState.Width = 85;
//
// colMessage
//
this.colMessage.HeaderText = "消息提示";
this.colMessage.Name = "colMessage";
this.colMessage.ReadOnly = true;
this.colMessage.Width = 250;
//
// label1
//
this.label1.AutoSize = true;
this.label1.ForeColor = System.Drawing.Color.MidnightBlue;
this.label1.Location = new System.Drawing.Point(651, 7);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(43, 17);
this.label1.TabIndex = 5;
this.label1.Text = "label1";
//
// statusBar
//
this.statusBar.BackColor = System.Drawing.Color.White;
this.statusBar.Dock = System.Windows.Forms.DockStyle.Fill;
this.statusBar.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.statusBar.Location = new System.Drawing.Point(0, 0);
this.statusBar.Margin = new System.Windows.Forms.Padding(0);
this.statusBar.Name = "statusBar";
this.statusBar.Size = new System.Drawing.Size(1021, 26);
this.statusBar.TabIndex = 4;
//
// splitContainer1
//
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
this.splitContainer1.Name = "splitContainer1";
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.txtProID);
this.splitContainer1.Panel1.Controls.Add(this.cmbType);
this.splitContainer1.Panel1.Controls.Add(this.cmbActState);
this.splitContainer1.Panel1.Controls.Add(this.txtActivity);
this.splitContainer1.Panel1.Controls.Add(this.btnReload);
this.splitContainer1.Panel1.Controls.Add(this.btnEdit);
this.splitContainer1.Panel1.Controls.Add(this.btnInvalid);
this.splitContainer1.Panel1.Controls.Add(this.btnDelete);
this.splitContainer1.Panel1.Controls.Add(this.btnSearch);
this.splitContainer1.Panel1.Controls.Add(this.label3);
this.splitContainer1.Panel1.Controls.Add(this.label2);
this.splitContainer1.Panel1.Controls.Add(this.lblLimit);
this.splitContainer1.Panel1.Controls.Add(this.lblActivity);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.splitContainer2);
this.splitContainer1.Size = new System.Drawing.Size(1021, 459);
this.splitContainer1.SplitterDistance = 38;
this.splitContainer1.TabIndex = 11;
//
// txtProID
//
this.txtProID.Location = new System.Drawing.Point(470, 7);
this.txtProID.Name = "txtProID";
this.txtProID.Size = new System.Drawing.Size(95, 23);
this.txtProID.TabIndex = 481;
//
// cmbType
//
this.cmbType.DisplayMember = "Text";
this.cmbType.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.cmbType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbType.FormattingEnabled = true;
this.cmbType.ItemHeight = 18;
this.cmbType.Items.AddRange(new object[] {
this.comboItem6,
this.comboItem7,
this.comboItem8,
this.comboItem9});
this.cmbType.Location = new System.Drawing.Point(348, 6);
this.cmbType.Name = "cmbType";
this.cmbType.Size = new System.Drawing.Size(75, 24);
this.cmbType.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.cmbType.TabIndex = 520;
//
// comboItem6
//
this.comboItem6.Text = "全部";
//
// comboItem7
//
this.comboItem7.Text = "打折";
this.comboItem7.Value = "3";
//
// comboItem8
//
this.comboItem8.Text = "直降";
this.comboItem8.Value = "2";
//
// comboItem9
//
this.comboItem9.Text = "一口价";
this.comboItem9.Value = "1";
//
// cmbActState
//
this.cmbActState.DisplayMember = "Text";
this.cmbActState.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.cmbActState.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbActState.FormattingEnabled = true;
this.cmbActState.ItemHeight = 18;
this.cmbActState.Items.AddRange(new object[] {
this.comboItem1,
this.comboItem2,
this.comboItem3,
this.comboItem4,
this.comboItem5});
this.cmbActState.Location = new System.Drawing.Point(218, 6);
this.cmbActState.Name = "cmbActState";
this.cmbActState.Size = new System.Drawing.Size(75, 24);
this.cmbActState.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.cmbActState.TabIndex = 520;
//
// comboItem1
//
this.comboItem1.Text = "全部";
//
// comboItem2
//
this.comboItem2.Text = "未开始";
this.comboItem2.Value = "0";
//
// comboItem3
//
this.comboItem3.Text = "进行中";
this.comboItem3.Value = "1";
//
// comboItem4
//
this.comboItem4.Text = "已结束";
this.comboItem4.Value = "2";
//
// comboItem5
//
this.comboItem5.Text = "已失效";
this.comboItem5.Value = "3";
//
// txtActivity
//
this.txtActivity.Location = new System.Drawing.Point(66, 7);
this.txtActivity.Name = "txtActivity";
this.txtActivity.Size = new System.Drawing.Size(95, 23);
this.txtActivity.TabIndex = 481;
//
// btnReload
//
this.btnReload.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnReload.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnReload.DisabledBackColor = System.Drawing.Color.Empty;
this.btnReload.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnReload.Location = new System.Drawing.Point(577, 7);
this.btnReload.Name = "btnReload";
this.btnReload.Size = new System.Drawing.Size(75, 23);
this.btnReload.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnReload.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
this.btnReload.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
this.btnReload.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnReload.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnReload.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnReload.Style.ForeColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(8)))), ((int)(((byte)(55)))), ((int)(((byte)(114)))));
this.btnReload.Style.GradientAngle = 90;
this.btnReload.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnReload.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnReload.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnReload.TabIndex = 575;
this.btnReload.Text = "重填";
this.btnReload.Click += new System.EventHandler(this.btnReload_Click);
//
// btnEdit
//
this.btnEdit.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnEdit.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnEdit.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnEdit.DisabledBackColor = System.Drawing.Color.Empty;
this.btnEdit.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnEdit.Location = new System.Drawing.Point(767, 7);
this.btnEdit.Name = "btnEdit";
this.btnEdit.Size = new System.Drawing.Size(80, 23);
this.btnEdit.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnEdit.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnEdit.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnEdit.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnEdit.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnEdit.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnEdit.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnEdit.Style.GradientAngle = 90;
this.btnEdit.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnEdit.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnEdit.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnEdit.TabIndex = 559;
this.btnEdit.Text = "编辑";
this.btnEdit.Visible = false;
this.btnEdit.Click += new System.EventHandler(this.btnEdit_Click);
//
// btnInvalid
//
this.btnInvalid.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnInvalid.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnInvalid.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnInvalid.DisabledBackColor = System.Drawing.Color.Empty;
this.btnInvalid.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnInvalid.Location = new System.Drawing.Point(935, 7);
this.btnInvalid.Name = "btnInvalid";
this.btnInvalid.Size = new System.Drawing.Size(75, 23);
this.btnInvalid.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnInvalid.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
this.btnInvalid.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
this.btnInvalid.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnInvalid.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnInvalid.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnInvalid.Style.ForeColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(8)))), ((int)(((byte)(55)))), ((int)(((byte)(114)))));
this.btnInvalid.Style.GradientAngle = 90;
this.btnInvalid.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnInvalid.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnInvalid.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnInvalid.TabIndex = 546;
this.btnInvalid.Text = "失效";
this.btnInvalid.Click += new System.EventHandler(this.btnInvalid_Click);
//
// btnDelete
//
this.btnDelete.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnDelete.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnDelete.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnDelete.DisabledBackColor = System.Drawing.Color.Empty;
this.btnDelete.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnDelete.Location = new System.Drawing.Point(851, 7);
this.btnDelete.Name = "btnDelete";
this.btnDelete.Size = new System.Drawing.Size(80, 23);
this.btnDelete.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnDelete.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnDelete.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnDelete.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnDelete.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnDelete.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnDelete.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnDelete.Style.GradientAngle = 90;
this.btnDelete.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnDelete.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnDelete.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnDelete.TabIndex = 536;
this.btnDelete.Text = "删除";
this.btnDelete.Click += new System.EventHandler(this.btnDelete_Click);
//
// btnSearch
//
this.btnSearch.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnSearch.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnSearch.DisabledBackColor = System.Drawing.Color.Empty;
this.btnSearch.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSearch.Location = new System.Drawing.Point(656, 7);
this.btnSearch.Name = "btnSearch";
this.btnSearch.Size = new System.Drawing.Size(80, 23);
this.btnSearch.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnSearch.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnSearch.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnSearch.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnSearch.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnSearch.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnSearch.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnSearch.Style.GradientAngle = 90;
this.btnSearch.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnSearch.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnSearch.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnSearch.TabIndex = 536;
this.btnSearch.Text = "查询/刷新";
this.btnSearch.Click += new System.EventHandler(this.btnSearch_Click);
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(428, 10);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(45, 17);
this.label3.TabIndex = 517;
this.label3.Text = "商品ID";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(163, 10);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(56, 17);
this.label2.TabIndex = 521;
this.label2.Text = "活动状态";
//
// lblLimit
//
this.lblLimit.AutoSize = true;
this.lblLimit.Location = new System.Drawing.Point(295, 10);
this.lblLimit.Name = "lblLimit";
this.lblLimit.Size = new System.Drawing.Size(56, 17);
this.lblLimit.TabIndex = 517;
this.lblLimit.Text = "优惠类型";
//
// lblActivity
//
this.lblActivity.AutoSize = true;
this.lblActivity.Location = new System.Drawing.Point(11, 10);
this.lblActivity.Name = "lblActivity";
this.lblActivity.Size = new System.Drawing.Size(56, 17);
this.lblActivity.TabIndex = 515;
this.lblActivity.Text = "活动名称";
//
// LimitedSalesManagerActiveForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(1021, 459);
this.Controls.Add(this.splitContainer1);
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Name = "LimitedSalesManagerActiveForm";
this.Text = "活动管理";
this.Load += new System.EventHandler(this.LimitedSalesManagerActiveForm_Load);
this.splitContainer2.Panel1.ResumeLayout(false);
this.splitContainer2.Panel2.ResumeLayout(false);
this.splitContainer2.Panel2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
this.splitContainer2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dgvActive)).EndInit();
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel1.PerformLayout();
this.splitContainer1.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.SplitContainer splitContainer2;
private UserComponent.DataGridViewEx dgvActive;
private System.Windows.Forms.SplitContainer splitContainer1;
private System.Windows.Forms.TextBox txtActivity;
private System.Windows.Forms.Label lblActivity;
private DevComponents.DotNetBar.Controls.ComboBoxEx cmbActState;
private System.Windows.Forms.Label label2;
private DevComponents.DotNetBar.Controls.ComboBoxEx cmbType;
private System.Windows.Forms.Label lblLimit;
private System.Windows.Forms.TextBox txtProID;
private System.Windows.Forms.Label label3;
private DevComponents.DotNetBar.PanelEx btnDelete;
private DevComponents.DotNetBar.PanelEx btnSearch;
private DevComponents.Editors.ComboItem comboItem1;
private DevComponents.Editors.ComboItem comboItem2;
private DevComponents.Editors.ComboItem comboItem3;
private DevComponents.Editors.ComboItem comboItem4;
private DevComponents.Editors.ComboItem comboItem5;
private DevComponents.Editors.ComboItem comboItem6;
private DevComponents.Editors.ComboItem comboItem7;
private DevComponents.Editors.ComboItem comboItem8;
private DevComponents.Editors.ComboItem comboItem9;
private System.Windows.Forms.Label label1;
private DevComponents.DotNetBar.PanelEx btnInvalid;
private DevComponents.DotNetBar.PanelEx btnEdit;
private DevComponents.DotNetBar.PanelEx btnReload;
private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect;
private System.Windows.Forms.DataGridViewTextBoxColumn colActivityId;
private System.Windows.Forms.DataGridViewTextBoxColumn colActivityName;
private System.Windows.Forms.DataGridViewTextBoxColumn colPreStartTime;
private System.Windows.Forms.DataGridViewTextBoxColumn colStartTime;
private System.Windows.Forms.DataGridViewTextBoxColumn colEndTime;
private System.Windows.Forms.DataGridViewTextBoxColumn colPrefereType;
private System.Windows.Forms.DataGridViewTextBoxColumn colActiveState;
private System.Windows.Forms.DataGridViewTextBoxColumn colMessage;
public UserControls.StatusBarUserControl statusBar;
}
}
@@ -0,0 +1,694 @@
using AllBase;
using AllBase.Helper;
using AllBase.Model.Result;
using LittleRabbit.Extension;
using LittleRabbit.LittleRabbitForms.BaseForms;
using NaiBa.Util.Extension;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace LittleRabbit.LittleRabbitForms.SalesCenterForms
{
public partial class LimitedSalesManagerActiveForm : Form
{
private DouShopLoginInfo shop = null;
private CheckBox chkSelectAll = null;
public List<string> lstActiveId = new List<string>();
public SeckillingAndLimitedSalesForm seckillingAndLimitedSalesForm = null;
string _signature = "";
string _timeSpan = "";
public bool isGetActiveSuccess = false;
public List<ActiveInfo> activeList = new List<ActiveInfo>();
bool isAll = true;
public LimitedSalesManagerActiveForm(DouShopLoginInfo _shop = null)
{
InitializeComponent();
shop = _shop;
cmbActState.SelectedIndex = 0;
cmbType.SelectedIndex = 0;
txtActivity.Focus();
//设置全选按钮
chkSelectAll = dgvActive.Columns["colSelect"].AddHeaderCheckBox(HorizontalAlignment.Center, 0, 0, null, null, false);
dgvActive.Columns["colSelect"].HeaderText = "";
chkSelectAll.Width = chkSelectAll.Height = 13;
chkSelectAll.CheckedChanged += chkSelectAll_CheckedChanged; //全选事件
}
private void LimitedSalesManagerActiveForm_Load(object sender, EventArgs e)
{
Task.Run(() =>
{
this.SearchActivitys();
});
}
private void chkSelectAll_CheckedChanged(object sender, EventArgs e)
{
if (!chkSelectAll.Checked)
{
if (isAll)
{
foreach (DataGridViewRow row in dgvActive.Rows)
{
long ActiveId = row.Cells["colActivityId"].Value.ParseToLong();
row.Cells["colSelect"].Value = false;
lstActiveId.Remove(ActiveId.ToString());
}
}
else
{
isAll = true;
foreach (DataGridViewRow row in dgvActive.Rows)
{
long ActiveId = row.Cells["colActivityId"].Value.ParseToLong();
if (lstActiveId.Contains(ActiveId.ToString()))
row.Cells["colSelect"].Value = true;
else
row.Cells["colSelect"].Value = false;
}
}
}
else
{
foreach (DataGridViewRow row in dgvActive.Rows)
{
row.Cells["colSelect"].Value = true;
long ActiveId = row.Cells["colActivityId"].Value.ParseToLong();
if (!lstActiveId.Any(p => p == ActiveId.ToString()))
lstActiveId.Add(ActiveId.ToString());
}
}
}
private void dgvActive_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
if (e.ColumnIndex < 0 || e.RowIndex < 0)
return;
string headerText = dgvActive.Columns[e.ColumnIndex].HeaderText;
string columnName = dgvActive.Columns[e.ColumnIndex].Name;
long ActiveId = dgvActive.Rows[e.RowIndex].Cells["colActivityId"].Value.ParseToLong();
var row = dgvActive.Rows[e.RowIndex];
switch (columnName)
{
case "colSelect":
row.Cells["colSelect"].Value = !row.Cells["colSelect"].Value.ParseToBool();
if (dgvActive.Rows[e.RowIndex].Cells["colSelect"].Value.ParseToBool())
{
if (lstActiveId.Any(p => p == ActiveId.ToString()))
lstActiveId.RemoveAll(p => p == ActiveId.ToString());
lstActiveId.Add(ActiveId.ToString());
}
else
lstActiveId.Remove(ActiveId.ToString());
if (dgvActive.Rows.Cast<DataGridViewRow>().All(r => r.Cells["colSelect"].Value.ParseToBool()))
chkSelectAll.Checked = true;
else
{
isAll = false;
chkSelectAll.Checked = false;
}
break;
}
}
public void GetActive()
{
if (shop == null)
return;
ShowVisitorMessage("");
Task.Run(() =>
{
if (shop.LoginStatus == "登录成功")
seckillingAndLimitedSalesForm.GetActiveByCef(this.shop);
var rowsTemp = dgvActive.Rows.Cast<DataGridViewRow>().ToList();
rowsTemp.Reverse();
});
}
public void GetActiveSim(string listUrl, string referrerUrl, Dictionary<string, string> headers, string firstPageData = "")
{
ShowVisitorMessage("");
int total = -1;
int number = 0;
string result = "";
if (!string.IsNullOrEmpty(firstPageData))
result = firstPageData;
//获取所有活动
DateTime date = DateTime.Now.Date;
_timeSpan = BaseRegex.GetMatchRegexString(ref listUrl, "&_=([\\s\\S]+?)&");
if (string.IsNullOrEmpty(_timeSpan))
_timeSpan = BaseRegex.GetMatchRegexString(ref listUrl, "&_=([\\s\\S]+?)");
if (string.IsNullOrEmpty(_timeSpan))
_timeSpan = BaseClass.DateTimeToTimestampMilliseconds(DateTime.Now).ToString();
_signature = BaseRegex.GetMatchRegexString(ref listUrl, "&_signature=([\\s\\S]+?)&");
if (string.IsNullOrEmpty(_signature))
{
var listUrl2 = listUrl + "&";
_signature = BaseRegex.GetMatchRegexString(ref listUrl2, "&_signature=([\\s\\S]+?)&");
}
listUrl = "https://fxg.jinritemai.com/shop/promotion/listFlashWithTimeLimit?campaign_status=&shop_stype=&page=1&pageSize=20&_bid=ecom_market_shop&appid=1&_=" + _timeSpan + "&_signature=" + _signature;
for (int i = 1; i < 9999; i++)
{
result = "";
number += 20;
for (int j = 0; j < 3 && !result.Contains("\"st\":0"); j++)
{
CommonSimRequest simRequest = new CommonSimRequest();
simRequest.Accept = "application/json, text/plain, */*";
if (headers.ContainsKey("Accept"))
simRequest.Accept = headers["Accept"];
if (headers.ContainsKey("UserAgent"))
simRequest.UserAgent = headers["UserAgent"];
var cookie = shop.Cookies;
var rUrl = listUrl.Replace("page=1", "page=" + i);
result = simRequest.Request_Get(rUrl, referrerUrl, new Dictionary<string, string>(), cookie);
if (j > 0)
{
Thread.Sleep(Randomx.GetId(2000, 3000));
}
}
if (result.Contains("\"st\":0,\"msg\":\"\",\"code\":0,") && !seckillingAndLimitedSalesForm.cancellationTokenSource.IsCancellationRequested)
{
this.isGetActiveSuccess = true;
var jObj = JObject.Parse(result);
var aList = JsonHelper.DeserializeJsonToList<ActiveInfo>(jObj["data"]["flash_list"]?.ToString());
foreach (var info in aList)
{
if (this.activeList.Any(p => p.campaign_id == info.campaign_id))
this.activeList.RemoveAll(p => p.campaign_id == info.campaign_id);
this.activeList.Add(info);
}
Thread.Sleep(Randomx.GetId(1500, 2000));
}
else
{
isGetActiveSuccess = false;
break;
}
if (number >= total)
break;
}
Invoke(new Action(() =>
{
if (seckillingAndLimitedSalesForm.cancellationTokenSource.IsCancellationRequested)
{
this.statusBar.lblTaskStatus.Text = "获取中断";
}
else if (!isGetActiveSuccess)
{
this.statusBar.lblTaskStatus.Text = "获取活动信息失败";
}
else
{
this.statusBar.lblTaskStatus.Text = "获取完成";
}
this.statusBar.pgbTaskProgress.Value = 0;
this.statusBar.pgbTaskProgress.Text = 0 + "/" + 0;
this.statusBar.pgbTaskProgress.Maximum = 0;
}));
}
public void ShowVisitorMessage(string msg, string activityId = "")
{
Invoke(new Action(() =>
{
this.label1.Text = msg;
if (!string.IsNullOrEmpty(activityId))
{
var row = this.dgvActive.Rows.Cast<DataGridViewRow>().FirstOrDefault(r => activityId == r.Cells["colActivityId"].Value?.ToString());
if (row != null)
{
row.Cells["colMessage"].Value = msg;
if (msg.EndsWith("修改成功!")) {
row.Cells["colActiveState"].Value = "待查询";
row.Cells["colPreStartTime"].Value = "待查询";
row.Cells["colStartTime"].Value = "待查询";
row.Cells["colEndTime"].Value = "待查询";
row.Cells["colPrefereType"].Value = "待查询";
}
}
}
}));
}
public void ClearData()
{
this.lstActiveId.Clear();
this.activeList.Clear();
this.dgvActive.Rows.Clear();
}
private void btnSearch_Click(object sender, EventArgs e)
{
SearchActivitys();
}
private void SearchActivitys()
{
ClearData();
ShowVisitorMessage("");
ShowVisitorMessage("查询开始");
if (this.activeList.Count == 0)
{
if (seckillingAndLimitedSalesForm.cancellationTokenSource.IsCancellationRequested)
seckillingAndLimitedSalesForm.cancellationTokenSource = new CancellationTokenSource();
GetActiveSim("https://fxg.jinritemai.com/shop/promotion/listFlashWithTimeLimit?campaign_status=&shop_stype=&page=1&pageSize=20&_bid=ecom_market_shop&appid=1&_=" + _timeSpan + "&_signature=" + _signature, "https://fxg.jinritemai.com/market/center/tools/limitsales", new Dictionary<string, string>());
}
string name = "", id = "", stateText = "", stateVal = "", typeText = "", typeVal = "";
Invoke(new Action(() =>
{
name = txtActivity.Text.Trim();
id = txtProID.Text.Trim();
stateText = cmbActState.SelectedItem.ToString();
stateVal = stateText == "全部" ? "" : (stateText == "进行中" ? "1" : (stateText == "已结束" ? "2" : (stateText == "未开始" ? "0" : "3")));
typeText = cmbType.SelectedItem.ToString();
typeVal = typeText == "全部" ? "" : (typeText == "打折" ? "3" : (typeText == "直降" ? "2" : "1"));
}));
if ((name == "" && id == "" && stateVal == "" && typeVal == "" && this.dgvActive.Rows.Count == activeList.Count) || activeList.Count == 0)
{
ShowVisitorMessage("查询完成!");
return;
}
Task.Run(() =>
{
List<ActiveInfo> infos = new List<ActiveInfo>();
var listUrl = "https://fxg.jinritemai.com/shop/promotion/listFlashWithTimeLimit?title=&campaign_status=&shop_stype=&product_id=" + id + "&page=1&pageSize=20&_bid=ecom_market_shop&appid=1&_=" + _timeSpan + "&_signature=" + _signature;
int total = -1;
int number = 0;
string result = "";
for (int i = 1; i < 9999; i++)
{
result = "";
number += 20;
for (int j = 0; j < 3 && !result.Contains("\"st\":0"); j++)
{
CommonSimRequest simRequest = new CommonSimRequest();
simRequest.Accept = "application/json, text/plain, */*";
var cookie = shop.Cookies;
var rUrl = listUrl.Replace("page=1", "page=" + i);
result = simRequest.Request_Get(rUrl, "https://fxg.jinritemai.com/market/center/tools/limitsales", new Dictionary<string, string>(), cookie);
if (j > 0)
{
Thread.Sleep(Randomx.GetId(1000, 2000));
}
}
if (result.Contains("\"st\":0") && !seckillingAndLimitedSalesForm.cancellationTokenSource.IsCancellationRequested)
{
if (total == -1)
{
total = BaseRegex.GetIntJson(ref result, "total");
}
var jObj = JObject.Parse(result);
var aList = JsonHelper.DeserializeJsonToList<ActiveInfo>(jObj["data"]["flash_list"]?.ToString());
if (!string.IsNullOrEmpty(name))
aList = aList.Where(x => x.title == name).ToList();
if (!string.IsNullOrEmpty(stateVal))
aList = aList.Where(x => x.campaign_status == stateVal).ToList();
if (!string.IsNullOrEmpty(typeVal))
aList = aList.Where(x => x.shop_stype == typeVal).ToList();
int totals = aList.Count;
Invoke(new Action(() =>
{
//dgvActive.Rows.Clear();
isAll = false;
for (int j = 0; j < totals; j++)
{
var info = aList[j];
var shop_stype = info.shop_stype == "1" ? "一口价" : (info.shop_stype == "3" ? "打折" : "直降");
var status = info.campaign_status == "2" ? "已结束" : (info.campaign_status == "1" ? "进行中" : (info.campaign_status == "0" ? "未开始" : "已失效"));
if (lstActiveId.Contains(info.campaign_id))
this.dgvActive.Rows.Add(true, info.campaign_id, info.title, info.pre_begin_time, info.begin_time, info.end_time, shop_stype, status);
else
this.dgvActive.Rows.Add(false, info.campaign_id, info.title, info.pre_begin_time, info.begin_time, info.end_time, shop_stype, status);
}
}));
foreach (var info in aList)
{
infos.Add(info);
}
Thread.Sleep(Randomx.GetId(1500, 2000));
}
if (number >= total)
break;
}
ShowVisitorMessage("查询完成!");
});
}
private void btnReload_Click(object sender, EventArgs e)
{
this.txtActivity.Text = string.Empty;
this.txtProID.Text = string.Empty;
this.cmbActState.SelectedIndex = 0;
this.cmbType.SelectedIndex = 0;
}
private void btnDelete_Click(object sender, EventArgs e)
{
lstActiveId = dgvActive.Rows.Cast<DataGridViewRow>()
.Where(r => r.Cells["colSelect"].Value.ParseToBool() == true)
.Select(r => r.Cells["colActivityId"].Value.ToString()).ToList();
if (lstActiveId.Count == 0 || dgvActive.Rows.Count == 0)
{
BaseMsgForm.ShowInfo("请选择待删除的活动!");
return;
}
if (BaseMsgForm.ShowConfirm("确定要删除活动吗?确认删除后,将永久删除,无法恢复!").DialogResult == DialogResult.OK)
{
ShowVisitorMessage("");
Task.Run(() =>
{
List<string> lstActiveIdTemp = new List<string>();
lstActiveIdTemp.AddRange(lstActiveId);
foreach (var id in lstActiveIdTemp)
{
long ActiveId = id.ParseToLong();
DelActive(ActiveId);
}
});
}
}
public void DelActive(long ActiveId, bool isRemoveInDgv = true)
{
var deleteUrl = "https://fxg.jinritemai.com/shop/promotion/setFlashStatus?_bid=ecom_market_shop&appid=1&_=" + _timeSpan + "&_signature=" + _signature;
var cookies = shop.Cookies;
DataGridViewRow row = null;
row = dgvActive.Rows.Cast<DataGridViewRow>().FirstOrDefault(r => r.Cells["colActivityId"].Value.ParseToLong() == ActiveId);
if (row == null)
return;
string name = row.Cells["colActivityName"].Value.ToString();
var colActiveState = row.Cells["colActiveState"].Value.ToString();
// 未失效活动先设置失效
if (colActiveState == "进行中" || colActiveState == "未开始")
{
//Invoke(new Action(() => { row.Cells["colMessage"].Value = name + "活动" + colActiveState + ",请先设置失效,再删除!"; }));
//continue;
SetActiveInvalid(ActiveId.ToString());
Thread.Sleep(Randomx.GetId(250, 500));
}
CommonSimRequest request = new CommonSimRequest();
request.ContentType = "application/json";
Dictionary<string, string> dicts = new Dictionary<string, string>();
var postData = "{\"campaign_id\":\"" + ActiveId + "\",\"status\":3}";
string result = request.Request_PostByBigLength(deleteUrl, "https://fxg.jinritemai.com/market/center/tools/limitsales", dicts, cookies, postData, false);
if (result.Contains("{\"st\":0,\"msg\":\"\",\"code\":0,"))
{
if (isRemoveInDgv)
{
Invoke(new Action(() => { row.Cells["colMessage"].Value = "删除完成,活动已删除!"; }));
ShowVisitorMessage("删除完成,活动" + name + "已删除!");
}
Thread.Sleep(Randomx.GetId(250, 500));
if (isRemoveInDgv)
{
lstActiveId.Remove(ActiveId.ToString());
activeList.Remove(activeList.Where(x => x.campaign_id == ActiveId.ToString()).FirstOrDefault());
}
}
else
{
Invoke(new Action(() => { row.Cells["colMessage"].Value = "删除失败:" + BaseRegex.GetStringJson(ref result, "msg"); }));
}
}
private void btnInvalid_Click(object sender, EventArgs e)
{
if (lstActiveId.Count == 0 || dgvActive.Rows.Count == 0)
{
BaseMsgForm.ShowInfo("请选择待失效的活动!");
return;
}
if (BaseMsgForm.ShowConfirm("确定要把活动设置为失效吗?").DialogResult == DialogResult.OK)
{
Task.Run(() =>
{
for (int i = 0; i < dgvActive.Rows.Count; i++)
{
DataGridViewRow row = dgvActive.Rows[i];
SetActiveInvalid(row.Cells["colActivityId"].Value.ToString());
}
});
}
}
private void SetActiveInvalid(string activityId)
{
var row = this.dgvActive.Rows.Cast<DataGridViewRow>().FirstOrDefault(r => r.Cells["colActivityId"].Value.ToString() == activityId);
if (row == null)
return;
var failUrl = "https://fxg.jinritemai.com/shop/promotion/setFlashStatus?_bid=ecom_market_shop&appid=1&_=" + _timeSpan + "&_signature=" + _signature;
var cookies = shop.Cookies;
long ActiveId = row.Cells["colActivityId"].Value.ParseToLong();
if (lstActiveId.Any(p => p == ActiveId.ToString()))
{
string name = row.Cells["colActivityName"].Value.ToString();
var colActiveState = row.Cells["colActiveState"].Value.ToString();
if (colActiveState != "进行中" && colActiveState != "未开始")
{
Invoke(new Action(() => { row.Cells["colMessage"].Value = name + "活动" + colActiveState + ",无需再设置失效!"; }));
return;
}
CommonSimRequest request = new CommonSimRequest();
request.ContentType = "application/json";
Dictionary<string, string> dicts = new Dictionary<string, string>();
var postData = "{\"campaign_id\":\"" + ActiveId + "\",\"status\":2}";
string result = request.Request_PostByBigLength(failUrl, "https://fxg.jinritemai.com/market/center/tools/limitsales", dicts, cookies, postData, false);
if (result.Contains("{\"st\":0,\"msg\":\"\",\"code\":0,"))
{
Invoke(new Action(() =>
{
var activeInfo = activeList.Where(x => x.campaign_id == ActiveId.ToString()).FirstOrDefault();
if (activeInfo != null)
{
activeInfo.campaign_status = "3";
row.Cells["colActiveState"].Value = "已失效";
row.Cells["colMessage"].Value = "设置失效已完成!";
}
}));
Thread.Sleep(Randomx.GetId(250, 500));
}
else
{
Invoke(new Action(() => { row.Cells["colMessage"].Value = "设置失效失败 :" + BaseRegex.GetStringJson(ref result, "msg"); }));
}
}
}
private void btnEdit_Click(object sender, EventArgs e)
{
//if (dgvActive.Rows.Count == 0)
//{
// BaseMsgForm.ShowInfo("请先获取活动列表!");
// return;
//}
//if (lstActiveId.Count == 0)
//{
// BaseMsgForm.ShowInfo("请选择待失效的活动!");
// return;
//}
//var cookies = shop.Cookies;
//for (int i = 0; i < dgvActive.Rows.Count; i++)
//{
// DataGridViewRow row = dgvActive.Rows[i];
// long ActiveId = row.Cells["colActivityId"].Value.ParseToLong();
// if (lstActiveId.Any(p => p == ActiveId.ToString()))
// {
// string name = row.Cells["colActivityName"].Value.ToString();
// var colActiveState = row.Cells["colActiveState"].Value.ToString();
// if (colActiveState != "进行中" && colActiveState != "未开始")
// {
// BaseMsgForm.ShowInfo("只能编辑进行中或者未开始的活动," + name + "活动" + colActiveState + "!");
// continue;
// }
// ShowVisitorMessage("");
// var status = 1;
// if (colActiveState == "未开始")
// status = 0;
// CommonSimRequest simRequest = new CommonSimRequest();
// var rUrl = "https://fxg.jinritemai.com/byteshop/promotion/detailFlashAndGoods?campaign_id=" + ActiveId + "&filter_unable_product=0&_bid=ecom_market_shop&appid=1&_= " + _underline + " & _signature = " + _signature;
// var result = simRequest.Request_Get(rUrl, "https://fxg.jinritemai.com/market/center/tools/limitsales/detail?id=" + ActiveId + "&refer=edit&status=" + status, new Dictionary<string, string>(), cookies);
// if (result.Contains("{\"st\":0,\"msg\":\"\",\"code\":0,"))
// {
// ActiveInfoEdit infoEdit = new ActiveInfoEdit();
// infoEdit.campaign_id = ActiveId.ToString();
// JObject o1 = JObject.Parse(result);
// JObject o2 = JObject.Parse(o1["data"]?.ToString());
// infoEdit.sub_stype = o2["sub_stype"].ToString().ParseToInt();
// infoEdit.title = o2["title"].ToString();
// infoEdit.pre_begin_time = o2["pre_begin_time"].ToString();
// infoEdit.begin_time = o2["begin_time"].ToString();
// infoEdit.end_time = o2["end_time"].ToString();
// infoEdit.order_expire_time = o2["order_expire_time"].ToString();
// infoEdit.shop_stype = o2["shop_stype"].ToString();
// infoEdit.time_set_type = o2["time_set_type"].ToString();
// infoEdit.status = o2["status"].ToString().ParseToInt();
// infoEdit.stock_type = o2["stock_type"].ToString();
// infoEdit.sold_out_type = o2["sold_out_type"].ToString();
// infoEdit.promotion_goods = new List<Promotion_Goods>();
// JArray arr = JArray.Parse(o2["promotion_goods"].ToString());
// for (int x = 0; x < arr.Count; x++)
// {
// JObject ox = JObject.Parse(arr[x].ToString());
// Promotion_Goods _Goods = new Promotion_Goods();
// _Goods.product_id = ox["product_id"].ToString();
// _Goods.title = ox["title"].ToString();
// _Goods.cover = ox["cover"].ToString();
// _Goods.config_scope = ox["config_scope"].ToString().ParseToInt();
// _Goods.promotion_skus = new List<Promotion_Skus>();
// JArray arrSku = JArray.Parse(ox["promotion_skus"].ToString());
// for (int j = 0; j < arrSku.Count; j++)
// {
// JObject oj = JObject.Parse(arrSku[j].ToString());
// Promotion_Skus skus = new Promotion_Skus();
// skus.id = oj["id"].ToString();
// skus.camp_stock_num = oj["camp_stock_num"].ToString().ParseToInt();
// skus.camp_left_stock_num = oj["camp_left_stock_num"].ToString().ParseToInt();
// skus.price = oj["price"].ToString().ParseToInt();
// skus.user_limit = oj["user_limit"].ToString();
// skus.origin_price = oj["origin_price"].ToString().ParseToInt();
// skus.stock = oj["stock"].ToString().ParseToInt();
// skus.specification = oj["specification"].ToString();
// skus.shop_svalue = oj["shop_svalue"].ToString().ParseToInt();
// skus.redline_price = oj["redline_price"].ToString().ParseToInt();
// _Goods.promotion_skus.Add(skus);
// }
// infoEdit.promotion_goods.Add(_Goods);
// }
// var editUrl = "https://fxg.jinritemai.com/byteshop/promotion/editFlashAndGoods?_bid=ecom_market_shop&appid=1&_= " + _underline + " & _signature = " + _signature;
// var postProData = string.Empty;
// postProData = postProData + "{\"sub_stype\":\"" + infoEdit.sub_stype + "\",\"shop_stype\":\"" + infoEdit.shop_stype + "\",\"title\":\"" + infoEdit.title + "\",\"time_set_type\":\"" + infoEdit.time_set_type + "\",\"promotion_goods\":[";
// foreach (var goods in infoEdit.promotion_goods)
// {
// postProData = postProData + "{\"product_id\":\"" + goods.product_id + "\",\"title\":\"" + goods.title + "\",\"cover\":\"" + goods.cover + "\",\"config_scope\":\"" + goods.config_scope + "\",\"promotion_skus\":[";
// if (goods.promotion_skus.Count > 0)
// {
// DouProductPromotionListSkuInfoEditForm skuInfoEdit = new DouProductPromotionListSkuInfoEditForm(goods, infoEdit.shop_stype);
// skuInfoEdit.ShowDialog();
// if (skuInfoEdit.DialogResult == DialogResult.OK)
// {
// foreach (var skus in skuInfoEdit.skuList)
// {
// postProData = postProData + "{\"id\":\"" + skus.id + "\",\"camp_stock_num\":\"" + skus.camp_stock_num + "\",\"user_limit\":\"" + skus.user_limit + "\",\"price\":\"" + skus.price + "\",\"shop_svalue\":\"" + skus.shop_svalue + "\"},";
// }
// }
// }
// postProData = postProData.Trim(',') + "]},";
// }
// postProData = postProData.Trim(',') + "],\"order_expire_time\":\"" + infoEdit.order_expire_time + "\",\"pre_begin_time\":\"" + infoEdit.pre_begin_time + "\",\"begin_time\":\"" + infoEdit.begin_time + "\",\"end_time\":\"" + infoEdit.end_time + "\",\"sold_out_type\":\"" + infoEdit.sold_out_type + "\",\"create_action_type\":\"0\",\"campaign_id\":\"" + infoEdit.campaign_id + "\"}";
// CommonSimRequest simRequest1 = new CommonSimRequest();
// simRequest1.ContentType = "application/json";
// var editResult = simRequest1.Request_PostByBigLength(editUrl, "https://fxg.jinritemai.com/market/center/tools/limitsales/detail?id=" + ActiveId + "&refer=edit&status=" + status, new Dictionary<string, string>(), cookies, postProData, false);
// if (editResult.Contains("{\"st\":0,\"msg\":\"\",\"code\":0,"))
// {
// ShowVisitorMessage("修改完成,活动已修改!");
// Thread.Sleep(1000);
// }
// else
// {
// Invoke(new Action(() => { row.Cells["colMessage"].Value = "修改失败:" + BaseRegex.GetStringJson(ref editResult, "msg"); }));
// }
// }
// }
//}
}
public string GetProductByActivityId(string activityId, string cookies)
{
CommonSimRequest request = new CommonSimRequest();
request.ContentType = "application/json";
Dictionary<string, string> dicts = new Dictionary<string, string>();
string reqUrl = "https://fxg.jinritemai.com/byteshop/promotion/detailFlashAndGoods?campaign_id=" + activityId + "&filter_unable_product=0&_bid=ecom_market_shop&appid=1&_=" + _timeSpan + "&_signature=" + _signature;
string refUrl = "https://fxg.jinritemai.com/market/center/tools/limitsales/detail?id=" + activityId + "&refer=edit&status=1";
string result = request.Request_Get(reqUrl, refUrl, dicts, cookies);
return result;
//https://fxg.jinritemai.com/byteshop/promotion/detailFlashAndGoods?campaign_id=7129422311865811232&filter_unable_product=0&_bid=ecom_market_shop&appid=1
//https://fxg.jinritemai.com/market/center/tools/limitsales/detail?id=7129422311865811232&refer=edit&status=1
}
//根据id获取sku
public string GetSkusByProductIds(string postData, string cookies)
{
CommonSimRequest request = new CommonSimRequest();
request.ContentType = "application/json";
Dictionary<string, string> dicts = new Dictionary<string, string>();
string reqUrl = "https://fxg.jinritemai.com/byteshop/promotion/batchGetSkuByProductIds?_bid=ecom_market_shop&appid=1&_=" + _timeSpan + "&_signature=" + _signature;
string result = request.Request_PostByBigLength(reqUrl, "https://fxg.jinritemai.com/market/center/tools/limitsales/detail?refer=new", dicts, cookies, postData);
return result;
}
public string checkFlashAndGoods(string postData, string cookies)
{
CommonSimRequest request = new CommonSimRequest();
request.ContentType = "application/json";
Dictionary<string, string> dicts = new Dictionary<string, string>();
string reqUrl = "https://fxg.jinritemai.com/byteshop/promotion/checkFlashAndGoods?_bid=ecom_market_shop&appid=1&_=" + _timeSpan + "&_signature=" + _signature;
string result = request.Request_PostByBigLength(reqUrl, "https://fxg.jinritemai.com/market/center/tools/limitsales/detail?refer=new", dicts, cookies, postData);
return result;
}
public string createFlashAndGoods(string postData, string cookies)
{
CommonSimRequest request = new CommonSimRequest();
request.ContentType = "application/json";
Dictionary<string, string> dicts = new Dictionary<string, string>();
string reqUrl = "https://fxg.jinritemai.com/byteshop/promotion/createFlashAndGoods?_bid=ecom_market_shop&appid=1&_=" + _timeSpan + "&_signature=" + _signature;
string result = request.Request_PostByBigLength(reqUrl, "https://fxg.jinritemai.com/market/center/tools/limitsales/detail?refer=new", dicts, cookies, postData);
return result;
}
}
public class ActiveInfo
{
public string campaign_id { get; set; }
public string stype { get; set; }
public string title { get; set; }
public string pre_begin_time { get; set; }
public string begin_time { get; set; }
public string end_time { get; set; }
public string status { get; set; }
public string shop_stype { get; set; }
public string intro { get; set; }
public string campaign_status { get; set; }
public string warm_up { get; set; }
}
}
@@ -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>
@@ -0,0 +1,179 @@
namespace LittleRabbit.LittleRabbitForms.SalesCenterForms
{
partial class SalesCenterForm
{
/// <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()
{
System.Windows.Forms.TreeNode treeNode1 = new System.Windows.Forms.TreeNode("新人券");
System.Windows.Forms.TreeNode treeNode2 = new System.Windows.Forms.TreeNode("限时限量购");
System.Windows.Forms.TreeNode treeNode3 = new System.Windows.Forms.TreeNode("满减");
System.Windows.Forms.TreeNode treeNode4 = new System.Windows.Forms.TreeNode("拼团");
System.Windows.Forms.TreeNode treeNode5 = new System.Windows.Forms.TreeNode("拼团监控");
System.Windows.Forms.TreeNode treeNode6 = new System.Windows.Forms.TreeNode("营销中心", new System.Windows.Forms.TreeNode[] {
treeNode1,
treeNode2,
treeNode3,
treeNode4,
treeNode5});
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.tv = new LittleRabbit.UserComponent.UcTreeView();
this.panel1 = new System.Windows.Forms.Panel();
this.panel3 = new System.Windows.Forms.Panel();
this.panel2 = new System.Windows.Forms.Panel();
this.lblName = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.panel1.SuspendLayout();
this.panel2.SuspendLayout();
this.SuspendLayout();
//
// splitContainer1
//
this.splitContainer1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
this.splitContainer1.Name = "splitContainer1";
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.tv);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.panel1);
this.splitContainer1.Size = new System.Drawing.Size(800, 450);
this.splitContainer1.SplitterDistance = 140;
this.splitContainer1.SplitterWidth = 1;
this.splitContainer1.TabIndex = 8;
//
// tv
//
this.tv.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(251)))), ((int)(((byte)(251)))), ((int)(((byte)(251)))));
this.tv.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.tv.ChildNodeSelectedBgColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.tv.Cursor = System.Windows.Forms.Cursors.Hand;
this.tv.Dock = System.Windows.Forms.DockStyle.Fill;
this.tv.DrawMode = System.Windows.Forms.TreeViewDrawMode.OwnerDrawAll;
this.tv.ExpandButtonColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
this.tv.FullRowSelect = true;
this.tv.GroupBgColor = System.Drawing.Color.FromArgb(((int)(((byte)(249)))), ((int)(((byte)(249)))), ((int)(((byte)(249)))));
this.tv.GroupFont = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.tv.GroupTitleColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(80)))), ((int)(((byte)(80)))));
this.tv.HideCollapsedGroup = false;
this.tv.ItemHeight = 32;
this.tv.Location = new System.Drawing.Point(0, 0);
this.tv.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.tv.Name = "tv";
treeNode1.Name = "新人券";
treeNode1.Text = "新人券";
treeNode2.Name = "限时限量购";
treeNode2.Text = "限时限量购";
treeNode3.Name = "满减";
treeNode3.Text = "满减";
treeNode4.Name = "拼团";
treeNode4.Text = "拼团";
treeNode5.Name = "拼团监控";
treeNode5.Text = "拼团监控";
treeNode6.Name = "营销中心";
treeNode6.Text = "营销中心";
this.tv.Nodes.AddRange(new System.Windows.Forms.TreeNode[] {
treeNode6});
this.tv.OverForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235)))));
this.tv.Size = new System.Drawing.Size(140, 450);
this.tv.TabIndex = 4;
this.tv.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.tv_AfterSelect);
//
// panel1
//
this.panel1.BackColor = System.Drawing.Color.White;
this.panel1.Controls.Add(this.panel3);
this.panel1.Controls.Add(this.panel2);
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(659, 450);
this.panel1.TabIndex = 5;
//
// panel3
//
this.panel3.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel3.Location = new System.Drawing.Point(0, 28);
this.panel3.Name = "panel3";
this.panel3.Size = new System.Drawing.Size(659, 422);
this.panel3.TabIndex = 1;
//
// panel2
//
this.panel2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(244)))), ((int)(((byte)(244)))), ((int)(((byte)(244)))));
this.panel2.Controls.Add(this.lblName);
this.panel2.Dock = System.Windows.Forms.DockStyle.Top;
this.panel2.Location = new System.Drawing.Point(0, 0);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(659, 28);
this.panel2.TabIndex = 0;
//
// lblName
//
this.lblName.AutoSize = true;
this.lblName.Location = new System.Drawing.Point(5, 6);
this.lblName.Name = "lblName";
this.lblName.Size = new System.Drawing.Size(47, 12);
this.lblName.TabIndex = 0;
this.lblName.Text = "lblName";
//
// SalesCenterForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.ClientSize = new System.Drawing.Size(800, 450);
this.Controls.Add(this.splitContainer1);
this.Name = "SalesCenterForm";
this.Text = "SalesCenterForm";
this.Load += new System.EventHandler(this.SaleCenterForm_Load);
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
this.panel1.ResumeLayout(false);
this.panel2.ResumeLayout(false);
this.panel2.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.SplitContainer splitContainer1;
private UserComponent.UcTreeView tv;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Panel panel3;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.Label lblName;
}
}
@@ -0,0 +1,130 @@
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;
namespace LittleRabbit.LittleRabbitForms.SalesCenterForms
{
public partial class SalesCenterForm : Form
{
public Lazy<SeckillingAndLimitedSalesForm> seckillingAndLimitedSalesForm = new Lazy<SeckillingAndLimitedSalesForm>();
public Lazy<FullMinusForm> fullMinusForm = new Lazy<FullMinusForm>();
public Lazy<GroupBuyForm> groupBuyFrom = new Lazy<GroupBuyForm>();
public Lazy<CouponForm> couponForm = new Lazy<CouponForm>();
public SalesCenterForm()
{
InitializeComponent();
}
private void SaleCenterForm_Load(object sender, EventArgs e)
{
try
{
tv.SelectedNode = tv.Nodes[0].Nodes[0];
tv.ExpandGroup(tv.Nodes[0].Name);
}
catch { }
try
{
tv.SelectedNode = tv.Nodes[0].Nodes[0];
tv.ExpandGroup(tv.Nodes[0].Name);
List<string> hideName = new List<string>() { "拼团监控"/*, "清理无流量"*/ };
foreach (var item in hideName)
{
var n = tv.Nodes[0].Nodes.Find(item, true);
if (n.Count() > 0)
n[0].Remove();
}
}
catch { }
}
/// <summary>
/// 显示隐藏层
/// </summary>
/// <param name="f"></param>
private void SetForm(Form f)
{
if (f == null)
{
foreach (Control form in panel3.Controls)
{
form.Visible = false;
if (form is Form)
{
panel3.Controls.Remove(form as Form);
}
}
return;
}
bool had = false;
string sCurrentFormName = f.Name;
for (int i = 0; i < panel3.Controls.Count; i++)
{
if (sCurrentFormName == panel3.Controls[i].Name)
{
had = true;
panel3.Controls[i].Visible = true;
}
else
{
panel3.Controls[i].Visible = false;
}
}
if (had)
{
f = null;
return;
}
f.TopLevel = false;
f.Left = 0;
f.Top = 0;
f.FormBorderStyle = FormBorderStyle.None;
panel3.Controls.Add(f);
f.AutoSize = true;
f.Dock = DockStyle.Fill;
f.Show();
}
private void tv_AfterSelect(object sender, TreeViewEventArgs e)
{
MainForm.sCurrentModule = e.Node.Name;
this.lblName.Text = e.Node.Text;
// 如果是一级菜单,不做任何动作
if (e.Node.Parent == null) return;
new Thread(() =>
{
Thread.Sleep(200);
Invoke(new Action(() =>
{
switch (e.Node.Name)
{
case "新人券":
SetForm(couponForm.Value);
break;
case "限时限量购":
SetForm(seckillingAndLimitedSalesForm.Value);
break;
case "满减":
SetForm(fullMinusForm.Value);
break;
case "拼团":
SetForm(groupBuyFrom.Value);
break;
}
}));
}).Start();
}
}
}
@@ -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>
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,138 @@
<?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="colSelect.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colShopId.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colAuthStatus.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colLoginStatus.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colCanUse.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colMessage.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>
@@ -0,0 +1,235 @@
namespace LittleRabbit.LittleRabbitForms.SalesCenterForms
{
partial class SeckillingAndLimitedSalesShopForm
{
/// <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()
{
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.dgvProduct = new LittleRabbit.UserComponent.DataGridViewEx();
this.label1 = new System.Windows.Forms.Label();
this.statusBar = new LittleRabbit.UserControls.StatusBarUserControl();
this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.colProductId = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colProductName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colStock = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colSales = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colPrice = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colCreateTime = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colAllow = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colMessage = new System.Windows.Forms.DataGridViewTextBoxColumn();
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit();
this.splitContainer2.Panel1.SuspendLayout();
this.splitContainer2.Panel2.SuspendLayout();
this.splitContainer2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvProduct)).BeginInit();
this.SuspendLayout();
//
// splitContainer2
//
this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
this.splitContainer2.Location = new System.Drawing.Point(0, 0);
this.splitContainer2.Name = "splitContainer2";
this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer2.Panel1
//
this.splitContainer2.Panel1.Controls.Add(this.dgvProduct);
this.splitContainer2.Panel1.Padding = new System.Windows.Forms.Padding(4, 4, 4, 0);
//
// splitContainer2.Panel2
//
this.splitContainer2.Panel2.Controls.Add(this.label1);
this.splitContainer2.Panel2.Controls.Add(this.statusBar);
this.splitContainer2.Size = new System.Drawing.Size(1021, 469);
this.splitContainer2.SplitterDistance = 439;
this.splitContainer2.TabIndex = 9;
//
// dgvProduct
//
this.dgvProduct.AllowUserToAddRows = false;
this.dgvProduct.AllowUserToDeleteRows = false;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvProduct.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
this.dgvProduct.BackgroundColor = System.Drawing.Color.White;
this.dgvProduct.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvProduct.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
this.dgvProduct.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvProduct.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colSelect,
this.colProductId,
this.colProductName,
this.colStock,
this.colSales,
this.colPrice,
this.colCreateTime,
this.colAllow,
this.colMessage});
this.dgvProduct.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvProduct.Location = new System.Drawing.Point(4, 4);
this.dgvProduct.Name = "dgvProduct";
this.dgvProduct.ReadOnly = true;
dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.dgvProduct.RowsDefaultCellStyle = dataGridViewCellStyle3;
this.dgvProduct.RowTemplate.Height = 23;
this.dgvProduct.Size = new System.Drawing.Size(1013, 435);
this.dgvProduct.TabIndex = 6;
this.dgvProduct.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvProduct_CellContentClick);
//
// label1
//
this.label1.AutoSize = true;
this.label1.ForeColor = System.Drawing.Color.MidnightBlue;
this.label1.Location = new System.Drawing.Point(656, 2);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(43, 17);
this.label1.TabIndex = 3;
this.label1.Text = "label1";
//
// statusBar
//
this.statusBar.BackColor = System.Drawing.Color.White;
this.statusBar.Dock = System.Windows.Forms.DockStyle.Fill;
this.statusBar.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.statusBar.Location = new System.Drawing.Point(0, 0);
this.statusBar.Margin = new System.Windows.Forms.Padding(0);
this.statusBar.Name = "statusBar";
this.statusBar.Size = new System.Drawing.Size(1021, 26);
this.statusBar.TabIndex = 2;
//
// colSelect
//
this.colSelect.FillWeight = 50F;
this.colSelect.HeaderText = "选";
this.colSelect.Name = "colSelect";
this.colSelect.ReadOnly = true;
this.colSelect.Resizable = System.Windows.Forms.DataGridViewTriState.False;
this.colSelect.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colSelect.Width = 41;
//
// colProductId
//
this.colProductId.HeaderText = "商品Id";
this.colProductId.Name = "colProductId";
this.colProductId.ReadOnly = true;
this.colProductId.Width = 150;
//
// colProductName
//
this.colProductName.HeaderText = "商品名称";
this.colProductName.Name = "colProductName";
this.colProductName.ReadOnly = true;
this.colProductName.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colProductName.Width = 350;
//
// colStock
//
this.colStock.HeaderText = "库存";
this.colStock.Name = "colStock";
this.colStock.ReadOnly = true;
this.colStock.Width = 60;
//
// colSales
//
this.colSales.HeaderText = "销量";
this.colSales.Name = "colSales";
this.colSales.ReadOnly = true;
this.colSales.Width = 60;
//
// colPrice
//
this.colPrice.HeaderText = "价格";
this.colPrice.Name = "colPrice";
this.colPrice.ReadOnly = true;
this.colPrice.Width = 60;
//
// colCreateTime
//
this.colCreateTime.HeaderText = "创建时间";
this.colCreateTime.Name = "colCreateTime";
this.colCreateTime.ReadOnly = true;
this.colCreateTime.Visible = false;
//
// colAllow
//
this.colAllow.HeaderText = "可用";
this.colAllow.Name = "colAllow";
this.colAllow.ReadOnly = true;
//
// colMessage
//
this.colMessage.HeaderText = "消息";
this.colMessage.Name = "colMessage";
this.colMessage.ReadOnly = true;
this.colMessage.Width = 300;
//
// SeckillingAndLimitedSalesShopForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(1021, 469);
this.Controls.Add(this.splitContainer2);
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Name = "SeckillingAndLimitedSalesShopForm";
this.Text = "SeckillingAndLimitedSalesShopForm";
this.splitContainer2.Panel1.ResumeLayout(false);
this.splitContainer2.Panel2.ResumeLayout(false);
this.splitContainer2.Panel2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
this.splitContainer2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dgvProduct)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.SplitContainer splitContainer2;
private UserComponent.DataGridViewEx dgvProduct;
private System.Windows.Forms.Label label1;
public UserControls.StatusBarUserControl statusBar;
private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect;
private System.Windows.Forms.DataGridViewTextBoxColumn colProductId;
private System.Windows.Forms.DataGridViewTextBoxColumn colProductName;
private System.Windows.Forms.DataGridViewTextBoxColumn colStock;
private System.Windows.Forms.DataGridViewTextBoxColumn colSales;
private System.Windows.Forms.DataGridViewTextBoxColumn colPrice;
private System.Windows.Forms.DataGridViewTextBoxColumn colCreateTime;
private System.Windows.Forms.DataGridViewTextBoxColumn colAllow;
private System.Windows.Forms.DataGridViewTextBoxColumn colMessage;
}
}
@@ -0,0 +1,563 @@
using AllBase;
using AllBase.Extension;
using AllBase.Helper;
using AllBase.Model.Result;
using LittleRabbit.Extension;
using LittleRabbit.LittleRabbitForms.BaseForms;
using NaiBa.Util.Extension;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using Work.BLL.Product;
namespace LittleRabbit.LittleRabbitForms.SalesCenterForms
{
public partial class SeckillingAndLimitedSalesShopForm : Form
{
private DouShopLoginInfo shop = null;
private CheckBox chkSelectAll = null;
private string _signature = "";
private string _timeSpan = "";
private bool isGetSalesSuccess = false;
private bool isGetProductSuccess = false;
private Dictionary<long, int> dicProductSales = new Dictionary<long, int>();
public SeckillingAndLimitedSalesForm SeckillingAndLimitedSalesForm { get; set; } = null;
public List<DouProductPromotionListInfo> ProductList { get; set; } = new List<DouProductPromotionListInfo>();
public List<string> LstProductId
{
get
{
return this.dgvProduct.Rows.Cast<DataGridViewRow>().Where(r => r.Cells["colSelect"].Value.ParseToBool()).Select(r => r.Cells["colProductId"].Value.ToString()).ToList();
}
}
public SeckillingAndLimitedSalesShopForm(DouShopLoginInfo _shop = null)
{
InitializeComponent();
shop = _shop;
//设置全选按钮
chkSelectAll = dgvProduct.Columns["colSelect"].AddHeaderCheckBox(HorizontalAlignment.Center, 0, 0, null, null, false);
dgvProduct.Columns["colSelect"].HeaderText = "";
chkSelectAll.Width = chkSelectAll.Height = 13;
chkSelectAll.CheckedChanged += chkSelectAll_CheckedChanged; //全选事件
}
private void chkSelectAll_CheckedChanged(object sender, EventArgs e)
{
if (!chkSelectAll.Checked)
{
foreach (DataGridViewRow row in dgvProduct.Rows)
{
row.Cells["colSelect"].Value = false;
}
}
else
{
foreach (DataGridViewRow row in dgvProduct.Rows)
{
if (row.Cells["colAllow"].Value?.ToString() == "可用")
row.Cells["colSelect"].Value = true;
}
}
}
public void GetProductSim(string listUrl, string referrerUrl, Dictionary<string, string> headers, string firstPageData = "", string campaign_start_time = "", string campaign_end_time = "")
{
ShowVisitorMessage("");
string salesUrl = listUrl;
foreach (DataGridViewRow r in this.dgvProduct.Rows)
{
Invoke(new Action(() =>
{
r.Cells["colSales"].Value = "获取中";
r.Cells["colStock"].Value = "获取中";
r.Cells["colAllow"].Value = "获取中";
r.Cells["colMessage"].Value = "";
}));
}
foreach (var p in ProductList)
{
p.sell_num = null;
}
bool isGetSalesOver = false;
Task t1 = Task.Run(() =>
{
int totalT1 = -1;
int numberT1 = 0;
string resultT1 = "";
if (!string.IsNullOrEmpty(firstPageData))
resultT1 = firstPageData;
ShowVisitorMessage("正在准备获取商品销量");
// 获取有销量的商品
for (int i = 0; i < 10000; i++)
{
numberT1 += 20;
for (int j = 0; j < 3 && !resultT1.Contains("\"st\":0"); j++)
{
CommonSimRequest simRequest = new CommonSimRequest();
simRequest.Accept = "application/json, text/plain, */*";
if (headers.ContainsKey("Accept"))
simRequest.Accept = headers["Accept"];
if (headers.ContainsKey("UserAgent"))
simRequest.UserAgent = headers["UserAgent"];
var cookie = shop.Cookies;
ShowVisitorMessage("商品销量获取中,第 " + (i + 1) + " 页");
var rUrl = salesUrl.Replace("page=0", "page=" + i).Replace("&pay_type=", "&pay_type=&sell_num_min=1"); // 获取所有有销量的商品,Replace不可注释!!
resultT1 = simRequest.Request_Get(rUrl, referrerUrl, new Dictionary<string, string>(), cookie);
if (j > 0)
{
Thread.Sleep(Randomx.GetId(250, 750));
Thread.Sleep(Randomx.GetId(250, 750));
}
}
if (resultT1.Contains("\"st\":0") && !SeckillingAndLimitedSalesForm.cancellationTokenSource.IsCancellationRequested)
{
this.isGetSalesSuccess = true;
if (totalT1 == -1)
{
totalT1 = BaseRegex.GetIntJson(ref resultT1, "total");
}
var jObj = JObject.Parse(resultT1);
var jArr = jObj["data"] as JArray;
foreach (var productObj in jArr)
{
//DouProductWithSalesListInfo product = new DouProductWithSalesListInfo();
var prod = JsonHelper.SerializeObject(productObj);
//product.product_id = BaseRegex.GetLongJson(ref prod, "product_id");
//product.sell_num = BaseRegex.GetIntJson(ref prod, "sell_num");
//product.stock_num = BaseRegex.GetIntJson(ref prod, "stock_num");
//product.name = BaseRegex.GetStringJson(ref prod, "name");
//product.discount_price = BaseRegex.GetDecimalJson(ref prod, "discount_price") / 100;
//product.create_time_str = BaseRegex.GetStringJson(ref prod, "create_time");
//product.create_time = BaseClass.DateTimeToTimestampSeconds(product.create_time_str.ParseToDateTime());
//Invoke(new Action(() =>
//{
// this.dgvProduct.Rows.Add(false, product.product_id, product.name, product.stock_num, product.sell_num, product.discount_price, product.create_time_str);
//}));
var product_id = BaseRegex.GetLongJson(ref prod, "product_id");
var sell_num = BaseRegex.GetIntJson(ref prod, "sell_num");
this.dicProductSales[product_id] = sell_num;
}
Thread.Sleep(Randomx.GetId(250, 750));
Thread.Sleep(Randomx.GetId(250, 750));
resultT1 = "";
}
else
{
isGetSalesSuccess = false;
ShowVisitorMessage("获取商品销量失败");
isGetSalesOver = true;
break;
}
if (numberT1 >= totalT1)
{
ShowVisitorMessage("获取商品销量完成");
isGetSalesOver = true;
// 填写商品销量
foreach (var product in this.ProductList)
{
if (dicProductSales.ContainsKey(product.product_id.ParseToLong()))
product.sell_num = dicProductSales[product.product_id.ParseToLong()];
else if (isGetSalesSuccess)
product.sell_num = 0;
else
product.sell_num = -1;
var row = this.dgvProduct.Rows.Cast<DataGridViewRow>().FirstOrDefault(r => r.Cells["colProductId"].Value.ToString() == product.product_id);
if (row != null && row.Cells["colSales"].Value.ToString() == "获取中")
{
if (product.sell_num >= 0)
row.Cells["colSales"].Value = product.sell_num;
if (product.sell_num >= 0)
row.Cells["colSales"].Value = product.sell_num;
}
}
break;
}
}
});
var total = -1;
var number = 0;
var result = "";
referrerUrl = "https://fxg.jinritemai.com/market/center/tools/limitsales/detail?refer=new";
DateTime date = DateTime.Now.Date;
if (string.IsNullOrEmpty(campaign_start_time))
campaign_start_time = date.ToString("yyyy-MM-dd") + "+00:00:00";
if (string.IsNullOrEmpty(campaign_end_time))
campaign_end_time = date.ToString("yyyy-MM-dd") + "+23:59:59";
_timeSpan = BaseRegex.GetMatchRegexString(ref listUrl, "&_=([\\s\\S]+?)&");
if (string.IsNullOrEmpty(_timeSpan))
_timeSpan = BaseRegex.GetMatchRegexString(ref listUrl, "&_=([\\s\\S]+?)");
if (string.IsNullOrEmpty(_timeSpan))
_timeSpan = BaseClass.DateTimeToTimestampMilliseconds(DateTime.Now).ToString();
_signature = BaseRegex.GetMatchRegexString(ref listUrl, "&_signature=([\\s\\S]+?)&");
if (string.IsNullOrEmpty(_signature))
{
var listUrl2 = listUrl + "&";
_signature = BaseRegex.GetMatchRegexString(ref listUrl2, "&_signature=([\\s\\S]+?)&");
}
// 查询单件商品
// https://fxg.jinritemai.com/byteshop/promotion/queryAvailableGoods?name=3550481296776157865&page=1&pageSize=15&campaign_start_time=2022-07-12+13:53:58&campaign_end_time=2022-07-13+13:53:58&stype=7&_bid=ecom_market_shop&appid=1&_=1657605277264&_signature=_02B4Z6wo00901vPj2jgAAIDAgf3-u.2wcb7z596AAN5DTpZAb6P6BWjbWf6p.E8w0icSl9d8vqMw9VdyRVtMyHUP25-fyQJA9.JSE1OQhQnubxfnISMkVfqQ0u80uuh3ezzpRpzTvt0UVyVyfa
// 查询列表
listUrl = "https://fxg.jinritemai.com/byteshop/promotion/queryAvailableGoods?name=&page=0&pageSize=15&campaign_start_time=" + campaign_start_time +
"&campaign_end_time=" + campaign_end_time + "&stype=7&_bid=ecom_market_shop&appid=1" +
"&_=" + _timeSpan + "&_signature=" + _signature;
int num = 9999;
// 是否获取指定商品
bool getWithName = false;
if (SeckillingAndLimitedSalesForm.LstSearthProductId.Count > 0 && !string.IsNullOrEmpty(SeckillingAndLimitedSalesForm.LstSearthProductId[0]))
{
num = SeckillingAndLimitedSalesForm.LstSearthProductId.Count;
getWithName = true;
}
for (int i = 1; i <= num; i++)
{
result = "";
number += 15;
// {\"st\":0,\"msg\":\"账号未登录\",\"code\":10008,\"data\":{},\"page\":0,\"size\":0,\"total\":0}
for (int j = 0; j < 3 && !result.Contains("\"st\":0") || result.Contains("\"msg\":\"账号未登录\""); j++)
{
CommonSimRequest simRequest = new CommonSimRequest();
simRequest.Accept = "application/json, text/plain, */*";
if (headers.ContainsKey("Accept"))
simRequest.Accept = headers["Accept"];
if (headers.ContainsKey("UserAgent"))
simRequest.UserAgent = headers["UserAgent"];
var cookie = shop.Cookies;
var rUrl = "";
//int pageSize = 15;
//if (number > 10000)
//{
// pageSize = 15 - (number - 10000);
// if (pageSize < 0)
// pageSize = 0;
// rUrl = rUrl.Replace("pageSize=15", "pageSize=" + pageSize);
//}
// 获取列表商品
if (!getWithName)
{
rUrl = listUrl.Replace("page=0", "page=" + i);
}
// 获取指定商品
else
{
rUrl = listUrl.Replace("page=0", "page=1").Replace("name=&", "name=" + SeckillingAndLimitedSalesForm.LstSearthProductId[i - 1] + "&");
}
result = simRequest.Request_Get(rUrl, referrerUrl, new Dictionary<string, string>(), cookie);
if (result.Contains("账号未登录"))
{
}
if (j > 0)
{
Thread.Sleep(Randomx.GetId(200, 500));
}
}
if (!result.Contains("\"st\":0"))
{
}
if (result.Contains("\"st\":0") && !SeckillingAndLimitedSalesForm.cancellationTokenSource.IsCancellationRequested)
{
this.isGetProductSuccess = true;
if (total == -1)
{
total = BaseRegex.GetIntJson(ref result, "total");
}
int totalPage = Math.Ceiling(total / 15M).ParseToInt();
string message = "";
if (!getWithName)
message = "正在获取商品第" + i + "页,共" + totalPage + "页";
else
message = "正在获取商品第" + i + "条,共" + num + "条";
Invoke(new Action(() =>
{
this.statusBar.lblTaskStatus.Text = message;
this.statusBar.pgbTaskProgress.Value = i;
if (!getWithName)
{
this.statusBar.pgbTaskProgress.Text = i + "/" + totalPage;
this.statusBar.pgbTaskProgress.Maximum = totalPage;
}
else
{
this.statusBar.pgbTaskProgress.Text = i + "/" + num;
this.statusBar.pgbTaskProgress.Maximum = num;
}
}));
try
{
var jObj = JObject.Parse(result);
var pList = JsonHelper.DeserializeJsonToList<DouProductPromotionListInfo>(jObj["data"]?.ToString());
foreach (var product in pList)
{
if (product.allow == false && product.reject_msg == "不可售卖商品")
{
continue;
}
if (dicProductSales.ContainsKey(product.product_id.ParseToLong()))
product.sell_num = dicProductSales[product.product_id.ParseToLong()];
else if (isGetSalesOver && isGetSalesSuccess)
product.sell_num = 0;
else if (isGetSalesOver)
product.sell_num = -1;
if (this.ProductList.Any(p => p.product_id == product.product_id))
this.ProductList.RemoveAll(p => p.product_id == product.product_id);
this.ProductList.Add(product);
var row = this.dgvProduct.Rows.Cast<DataGridViewRow>().FirstOrDefault(r => r.Cells["colProductId"].Value.ToString() == product.product_id);
Invoke(new Action(() =>
{
if (row != null)
{
dgvProduct.Rows.Remove(row);
}
var priceText = product.min_price / 100M + " - " + product.max_price / 100M;
object sellNum = "获取中";
if (product.sell_num != null && product.sell_num != -1)
sellNum = product.sell_num;
else if (product.sell_num == -1)
sellNum = "获取失败";
var rejectMsg = "可用";
if (product.allow == false)
rejectMsg = product.reject_msg;
DataGridViewRow r = new DataGridViewRow();
r.Cells.Add(new DataGridViewCheckBoxCell() { Value = false, });
r.Cells.Add(new DataGridViewTextBoxCell() { Value = product.product_id, });
r.Cells.Add(new DataGridViewTextBoxCell() { Value = product.name, });
r.Cells.Add(new DataGridViewTextBoxCell() { Value = product.stock_num, }); // 库存
r.Cells.Add(new DataGridViewTextBoxCell() { Value = sellNum, }); // 销量
r.Cells.Add(new DataGridViewTextBoxCell() { Value = priceText, }); // 价格区间
r.Cells.Add(new DataGridViewTextBoxCell() { Value = "", }); // 创建时间
r.Cells.Add(new DataGridViewTextBoxCell() { Value = rejectMsg });
this.dgvProduct.Rows.Add(r);
if (product.allow == false)
{
r.Cells["colSelect"].ReadOnly = true;
r.Cells["colAllow"].Style.ForeColor = Color.Red;
}
else
{
r.Cells["colSelect"].ReadOnly = false;
r.Cells["colAllow"].Style.ForeColor = Color.Green;
}
}));
}
Thread.Sleep(Randomx.GetId(100, 250));
}
catch (Exception ex)
{
isGetProductSuccess = false;
break;
}
}
else
{
isGetProductSuccess = false;
break;
}
// 列表获取超过最大数值后跳出
if (!getWithName && number >= total)
break;
}
t1.Wait();
// 最后填写商品销量
foreach (var product in this.ProductList)
{
if (dicProductSales.ContainsKey(product.product_id.ParseToLong()))
product.sell_num = dicProductSales[product.product_id.ParseToLong()];
else if (isGetSalesSuccess)
product.sell_num = 0;
else
product.sell_num = -1;
var row = this.dgvProduct.Rows.Cast<DataGridViewRow>().FirstOrDefault(r => r.Cells["colProductId"].Value.ToString() == product.product_id);
if (row != null && row.Cells["colSales"].Value.ToString() == "获取中")
{
if (product.sell_num >= 0)
row.Cells["colSales"].Value = product.sell_num;
if (product.sell_num >= 0)
row.Cells["colSales"].Value = product.sell_num;
}
}
Invoke(new Action(() =>
{
if (SeckillingAndLimitedSalesForm.cancellationTokenSource.IsCancellationRequested)
{
this.statusBar.lblTaskStatus.Text = "获取中断";
}
else if (!isGetSalesSuccess)
{
this.statusBar.lblTaskStatus.Text = "获取完成,但获取销量信息失败";
}
else if (!isGetProductSuccess)
{
this.statusBar.lblTaskStatus.Text = "获取商品信息失败";
}
else
{
this.statusBar.lblTaskStatus.Text = "获取完成";
}
ShowVisitorMessage("");
//this.statusBar.pgbTaskProgress.Value = 0;
//this.statusBar.pgbTaskProgress.Text = 0 + "/" + 0;
//this.statusBar.pgbTaskProgress.Maximum = 0;
}));
}
public void GetProduct()
{
if (shop == null)
return;
ShowVisitorMessage("");
foreach (DataGridViewRow r in this.dgvProduct.Rows)
{
r.Cells["colSales"].Value = "获取中";
r.Cells["colStock"].Value = "获取中";
r.Cells["colMessage"].Value = "";
}
foreach (var p in ProductList)
{
p.sell_num = null;
}
List<Task> tList = new List<Task>();
var t2 = Task.Run(() =>
{
if (shop.LoginStatus == "登录成功")
SeckillingAndLimitedSalesForm.GetProductByCef(this.shop);
var rowsTemp = dgvProduct.Rows.Cast<DataGridViewRow>().ToList();
rowsTemp.Reverse();
foreach (var r in rowsTemp)
{
try
{
//if (r.Cells["colPrice"].Value.ParseToDecimal() < priceMin || r.Cells["colPrice"].Value.ParseToDecimal() > priceMax
// || r.Cells["colSales"].Value.ParseToDecimal() < salesMin || r.Cells["colSales"].Value.ParseToDecimal() > salesMax
// || (productName?.Count > 0 && !productName.Any(n => r.Cells["colProductName"].Value.ToString().Contains(n))))
//{
// Invoke(new Action(() =>
// {
// dgvProduct.Rows.Remove(r);
// }));
//}
}
catch (Exception ex)
{
}
}
});
tList.Add(t2);
t2.Wait();
}
//根据id获取sku
public string GetSkusByProductIds(string postData, string cookies)
{
CommonSimRequest request = new CommonSimRequest();
request.ContentType = "application/json";
Dictionary<string, string> dicts = new Dictionary<string, string>();
string reqUrl = "https://fxg.jinritemai.com/byteshop/promotion/batchGetSkuByProductIds?_bid=ecom_market_shop&appid=1&_=" + _timeSpan + "&_signature=" + _signature;
string result = request.Request_PostByBigLength(reqUrl, "https://fxg.jinritemai.com/market/center/tools/limitsales/detail?refer=new", dicts, cookies, postData);
return result;
}
public string checkFlashAndGoods(string postData, string cookies)
{
CommonSimRequest request = new CommonSimRequest();
request.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36";
request.ContentType = "application/json";
Dictionary<string, string> dicts = new Dictionary<string, string>();
string reqUrl = "https://fxg.jinritemai.com/byteshop/promotion/checkFlashAndGoods?_bid=ecom_market_shop&appid=1&_=" + _timeSpan + "&_signature=" + _signature;
string result = request.Request_PostByBigLength(reqUrl, "https://fxg.jinritemai.com/market/center/tools/limitsales/detail?refer=new", dicts, cookies, postData);
return result;
}
public string createFlashAndGoods(string postData, string cookies)
{
CommonSimRequest request = new CommonSimRequest();
request.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36";
request.ContentType = "application/json";
Dictionary<string, string> dicts = new Dictionary<string, string>();
string reqUrl = "https://fxg.jinritemai.com/byteshop/promotion/createFlashAndGoods?_bid=ecom_market_shop&appid=1&_=" + _timeSpan + "&_signature=" + _signature;
string result = request.Request_PostByBigLength(reqUrl, "https://fxg.jinritemai.com/market/center/tools/limitsales/detail?refer=new", dicts, cookies, postData);
return result;
}
public void ShowVisitorMessage(string msg, string ids = "", bool onlyShowInGrid = false)
{
Invoke(new Action(() =>
{
this.label1.Text = msg;
if (!string.IsNullOrEmpty(ids))
{
var idList = ids.Split(new string[] { "\",\"", "\"" }, StringSplitOptions.RemoveEmptyEntries);
var rows = this.dgvProduct.Rows.Cast<DataGridViewRow>().Where(r => idList.Contains(r.Cells["colProductId"].Value?.ToString()));
foreach (var row in rows)
{
row.Cells["colMessage"].Value = msg;
}
}
}));
}
public void ClearData()
{
this.ProductList.Clear();
this.dicProductSales.Clear();
this.dgvProduct.Rows.Clear();
}
//选择参与活动的商品
private void dgvProduct_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
if (e.ColumnIndex < 0 || e.RowIndex < 0)
return;
string headerText = dgvProduct.Columns[e.ColumnIndex].HeaderText;
string columnName = dgvProduct.Columns[e.ColumnIndex].Name;
long ProductId = dgvProduct.Rows[e.RowIndex].Cells["colProductId"].Value.ParseToLong();
var row = dgvProduct.Rows[e.RowIndex];
switch (columnName)
{
case "colSelect":
row.Cells["colSelect"].Value = !row.Cells["colSelect"].Value.ParseToBool();
break;
}
}
}
}
@@ -0,0 +1,147 @@
<?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="colSelect.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colProductId.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colProductName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colStock.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colSales.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colPrice.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colCreateTime.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colAllow.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colMessage.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>
@@ -0,0 +1,528 @@
namespace LittleRabbit.LittleRabbitForms.SalesCenterForms
{
partial class UcCouponAddParam
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region 组件设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.cmbUserCountLimited = new DevComponents.DotNetBar.Controls.ComboBoxEx();
this.cbi1 = new DevComponents.Editors.ComboItem();
this.nudDays = new System.Windows.Forms.NumericUpDown();
this.nudTotalCount = new System.Windows.Forms.NumericUpDown();
this.label15 = new System.Windows.Forms.Label();
this.label13 = new System.Windows.Forms.Label();
this.label11 = new System.Windows.Forms.Label();
this.label10 = new System.Windows.Forms.Label();
this.cmbType = new DevComponents.DotNetBar.Controls.ComboBoxEx();
this.商品折扣券 = new DevComponents.Editors.ComboItem();
this.label9 = new System.Windows.Forms.Label();
this.rbNotReckonIn = new System.Windows.Forms.RadioButton();
this.rbReckonIn = new System.Windows.Forms.RadioButton();
this.label8 = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.dtpEndApplyTime = new System.Windows.Forms.DateTimePicker();
this.dtpStartApplyTime = new System.Windows.Forms.DateTimePicker();
this.label4 = new System.Windows.Forms.Label();
this.lblClose = new System.Windows.Forms.Label();
this.line1 = new DevComponents.DotNetBar.Controls.Line();
this.lblMsg = new System.Windows.Forms.Label();
this.txtName = new System.Windows.Forms.TextBox();
this.pnlTimePeriod = new System.Windows.Forms.Panel();
this.dtpStartUseTime = new System.Windows.Forms.DateTimePicker();
this.dtpEndUseTime = new System.Windows.Forms.DateTimePicker();
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
this.nudThresHold = new System.Windows.Forms.NumericUpDown();
this.lblThresHold = new System.Windows.Forms.Label();
this.nudCredit = new System.Windows.Forms.NumericUpDown();
this.lblCreditText = new System.Windows.Forms.Label();
this.lblDiscountText = new System.Windows.Forms.Label();
this.商品直减券 = new DevComponents.Editors.ComboItem();
this.商品满减券 = new DevComponents.Editors.ComboItem();
((System.ComponentModel.ISupportInitialize)(this.nudDays)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.nudTotalCount)).BeginInit();
this.pnlTimePeriod.SuspendLayout();
this.flowLayoutPanel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.nudThresHold)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.nudCredit)).BeginInit();
this.SuspendLayout();
//
// cmbUserCountLimited
//
this.cmbUserCountLimited.DisplayMember = "Text";
this.cmbUserCountLimited.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.cmbUserCountLimited.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbUserCountLimited.FormattingEnabled = true;
this.cmbUserCountLimited.ItemHeight = 18;
this.cmbUserCountLimited.Items.AddRange(new object[] {
this.cbi1});
this.cmbUserCountLimited.Location = new System.Drawing.Point(1050, 7);
this.cmbUserCountLimited.Name = "cmbUserCountLimited";
this.cmbUserCountLimited.Size = new System.Drawing.Size(60, 24);
this.cmbUserCountLimited.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.cmbUserCountLimited.TabIndex = 554;
//
// cbi1
//
this.cbi1.Text = "1张";
this.cbi1.Value = "5分钟";
//
// nudDays
//
this.nudDays.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.nudDays.Location = new System.Drawing.Point(446, 8);
this.nudDays.Name = "nudDays";
this.nudDays.Size = new System.Drawing.Size(86, 23);
this.nudDays.TabIndex = 553;
this.nudDays.Value = new decimal(new int[] {
1,
0,
0,
0});
//
// nudTotalCount
//
this.nudTotalCount.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.nudTotalCount.Location = new System.Drawing.Point(983, 8);
this.nudTotalCount.Name = "nudTotalCount";
this.nudTotalCount.Size = new System.Drawing.Size(40, 23);
this.nudTotalCount.TabIndex = 552;
this.nudTotalCount.Value = new decimal(new int[] {
1,
0,
0,
0});
//
// label15
//
this.label15.AutoSize = true;
this.label15.Location = new System.Drawing.Point(1025, 11);
this.label15.Name = "label15";
this.label15.Size = new System.Drawing.Size(20, 17);
this.label15.TabIndex = 549;
this.label15.Text = "张";
//
// label13
//
this.label13.AutoSize = true;
this.label13.Location = new System.Drawing.Point(1048, -2);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(56, 17);
this.label13.TabIndex = 548;
this.label13.Text = "每人限领";
this.label13.Visible = false;
//
// label11
//
this.label11.AutoSize = true;
this.label11.Location = new System.Drawing.Point(981, -2);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(44, 17);
this.label11.TabIndex = 547;
this.label11.Text = "发放量";
this.label11.Visible = false;
//
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(838, -2);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(32, 17);
this.label10.TabIndex = 546;
this.label10.Text = "折扣";
this.label10.Visible = false;
//
// cmbType
//
this.cmbType.DisplayMember = "Text";
this.cmbType.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.cmbType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cmbType.FormattingEnabled = true;
this.cmbType.ItemHeight = 18;
this.cmbType.Items.AddRange(new object[] {
this.商品折扣券,
this.商品直减券,
this.商品满减券});
this.cmbType.Location = new System.Drawing.Point(741, 7);
this.cmbType.Name = "cmbType";
this.cmbType.Size = new System.Drawing.Size(90, 24);
this.cmbType.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.cmbType.TabIndex = 545;
this.cmbType.SelectedIndexChanged += new System.EventHandler(this.cmbType_SelectedIndexChanged);
//
// 商品折扣券
//
this.商品折扣券.Text = "商品折扣券";
this.商品折扣券.Value = "5分钟";
//
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(738, -2);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(56, 17);
this.label9.TabIndex = 544;
this.label9.Text = "优惠内容";
this.label9.Visible = false;
//
// rbNotReckonIn
//
this.rbNotReckonIn.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.rbNotReckonIn.Location = new System.Drawing.Point(677, 8);
this.rbNotReckonIn.Name = "rbNotReckonIn";
this.rbNotReckonIn.Size = new System.Drawing.Size(60, 22);
this.rbNotReckonIn.TabIndex = 466;
this.rbNotReckonIn.Text = "不计入";
this.rbNotReckonIn.UseVisualStyleBackColor = true;
//
// rbReckonIn
//
this.rbReckonIn.Checked = true;
this.rbReckonIn.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.rbReckonIn.Location = new System.Drawing.Point(632, 8);
this.rbReckonIn.Name = "rbReckonIn";
this.rbReckonIn.Size = new System.Drawing.Size(50, 22);
this.rbReckonIn.TabIndex = 465;
this.rbReckonIn.TabStop = true;
this.rbReckonIn.Text = "计入";
this.rbReckonIn.UseVisualStyleBackColor = true;
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(629, -2);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(80, 17);
this.label8.TabIndex = 542;
this.label8.Text = "价格风险预警";
this.label8.Visible = false;
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(531, 11);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(68, 17);
this.label7.TabIndex = 541;
this.label7.Text = "天内可使用";
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(281, -2);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(56, 17);
this.label6.TabIndex = 540;
this.label6.Text = "领取结束";
this.label6.Visible = false;
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(445, -2);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(56, 17);
this.label5.TabIndex = 539;
this.label5.Text = "日期范围";
this.label5.Visible = false;
//
// dtpEndApplyTime
//
this.dtpEndApplyTime.CustomFormat = "yyyy\'/\'MM\'/\'dd HH:mm:ss";
this.dtpEndApplyTime.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
this.dtpEndApplyTime.Location = new System.Drawing.Point(283, 8);
this.dtpEndApplyTime.Name = "dtpEndApplyTime";
this.dtpEndApplyTime.Size = new System.Drawing.Size(155, 23);
this.dtpEndApplyTime.TabIndex = 538;
//
// dtpStartApplyTime
//
this.dtpStartApplyTime.CustomFormat = "yyyy\'/\'MM\'/\'dd HH:mm:ss";
this.dtpStartApplyTime.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
this.dtpStartApplyTime.Location = new System.Drawing.Point(119, 8);
this.dtpStartApplyTime.Name = "dtpStartApplyTime";
this.dtpStartApplyTime.Size = new System.Drawing.Size(155, 23);
this.dtpStartApplyTime.TabIndex = 537;
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(117, -2);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(56, 17);
this.label4.TabIndex = 536;
this.label4.Text = "领取开始";
this.label4.Visible = false;
//
// lblClose
//
this.lblClose.AutoSize = true;
this.lblClose.Cursor = System.Windows.Forms.Cursors.Hand;
this.lblClose.Font = new System.Drawing.Font("微软雅黑", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblClose.ForeColor = System.Drawing.Color.RoyalBlue;
this.lblClose.Location = new System.Drawing.Point(7, 12);
this.lblClose.Name = "lblClose";
this.lblClose.Size = new System.Drawing.Size(16, 16);
this.lblClose.TabIndex = 555;
this.lblClose.Text = "X";
this.lblClose.Click += new System.EventHandler(this.lblClose_Click);
//
// line1
//
this.line1.Dock = System.Windows.Forms.DockStyle.Bottom;
this.line1.ForeColor = System.Drawing.Color.LightGray;
this.line1.Location = new System.Drawing.Point(0, 38);
this.line1.Name = "line1";
this.line1.Size = new System.Drawing.Size(1180, 2);
this.line1.TabIndex = 556;
this.line1.Text = "line1";
//
// lblMsg
//
this.lblMsg.AutoSize = true;
this.lblMsg.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.lblMsg.Location = new System.Drawing.Point(1118, 11);
this.lblMsg.Name = "lblMsg";
this.lblMsg.Size = new System.Drawing.Size(44, 17);
this.lblMsg.TabIndex = 557;
this.lblMsg.Text = "待设置";
//
// txtName
//
this.txtName.Location = new System.Drawing.Point(25, 8);
this.txtName.Name = "txtName";
this.txtName.Size = new System.Drawing.Size(85, 23);
this.txtName.TabIndex = 558;
this.txtName.Text = "新人券1";
//
// pnlTimePeriod
//
this.pnlTimePeriod.Controls.Add(this.dtpStartUseTime);
this.pnlTimePeriod.Controls.Add(this.dtpEndUseTime);
this.pnlTimePeriod.Location = new System.Drawing.Point(446, 7);
this.pnlTimePeriod.Name = "pnlTimePeriod";
this.pnlTimePeriod.Size = new System.Drawing.Size(174, 25);
this.pnlTimePeriod.TabIndex = 559;
//
// dtpStartUseTime
//
this.dtpStartUseTime.CustomFormat = "yyyy\'/\'MM\'/\'dd";
this.dtpStartUseTime.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
this.dtpStartUseTime.Location = new System.Drawing.Point(0, 1);
this.dtpStartUseTime.Name = "dtpStartUseTime";
this.dtpStartUseTime.Size = new System.Drawing.Size(86, 23);
this.dtpStartUseTime.TabIndex = 544;
//
// dtpEndUseTime
//
this.dtpEndUseTime.CustomFormat = "yyyy\'/\'MM\'/\'dd";
this.dtpEndUseTime.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
this.dtpEndUseTime.Location = new System.Drawing.Point(88, 1);
this.dtpEndUseTime.Name = "dtpEndUseTime";
this.dtpEndUseTime.Size = new System.Drawing.Size(86, 23);
this.dtpEndUseTime.TabIndex = 551;
//
// flowLayoutPanel1
//
this.flowLayoutPanel1.Controls.Add(this.lblDiscountText);
this.flowLayoutPanel1.Controls.Add(this.nudThresHold);
this.flowLayoutPanel1.Controls.Add(this.lblThresHold);
this.flowLayoutPanel1.Controls.Add(this.nudCredit);
this.flowLayoutPanel1.Controls.Add(this.lblCreditText);
this.flowLayoutPanel1.Location = new System.Drawing.Point(840, 8);
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
this.flowLayoutPanel1.Size = new System.Drawing.Size(205, 23);
this.flowLayoutPanel1.TabIndex = 560;
//
// nudThresHold
//
this.nudThresHold.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.nudThresHold.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.nudThresHold.Location = new System.Drawing.Point(32, 0);
this.nudThresHold.Margin = new System.Windows.Forms.Padding(0);
this.nudThresHold.Maximum = new decimal(new int[] {
99999,
0,
0,
0});
this.nudThresHold.Minimum = new decimal(new int[] {
1,
0,
0,
0});
this.nudThresHold.Name = "nudThresHold";
this.nudThresHold.Size = new System.Drawing.Size(50, 23);
this.nudThresHold.TabIndex = 560;
this.nudThresHold.Value = new decimal(new int[] {
10,
0,
0,
0});
this.nudThresHold.Visible = false;
//
// lblThresHold
//
this.lblThresHold.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.lblThresHold.Location = new System.Drawing.Point(82, 3);
this.lblThresHold.Margin = new System.Windows.Forms.Padding(0);
this.lblThresHold.Name = "lblThresHold";
this.lblThresHold.Size = new System.Drawing.Size(16, 17);
this.lblThresHold.TabIndex = 559;
this.lblThresHold.Text = "减";
this.lblThresHold.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
this.lblThresHold.Visible = false;
//
// nudCredit
//
this.nudCredit.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.nudCredit.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.nudCredit.DecimalPlaces = 1;
this.nudCredit.Increment = new decimal(new int[] {
1,
0,
0,
65536});
this.nudCredit.Location = new System.Drawing.Point(98, 0);
this.nudCredit.Margin = new System.Windows.Forms.Padding(0);
this.nudCredit.Name = "nudCredit";
this.nudCredit.Size = new System.Drawing.Size(50, 23);
this.nudCredit.TabIndex = 532;
this.nudCredit.Value = new decimal(new int[] {
99,
0,
0,
65536});
//
// lblCreditText
//
this.lblCreditText.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.lblCreditText.Location = new System.Drawing.Point(148, 3);
this.lblCreditText.Margin = new System.Windows.Forms.Padding(0);
this.lblCreditText.Name = "lblCreditText";
this.lblCreditText.Size = new System.Drawing.Size(16, 17);
this.lblCreditText.TabIndex = 531;
this.lblCreditText.Text = "折";
this.lblCreditText.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// lblDiscountText
//
this.lblDiscountText.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.lblDiscountText.Location = new System.Drawing.Point(0, 3);
this.lblDiscountText.Margin = new System.Windows.Forms.Padding(0);
this.lblDiscountText.Name = "lblDiscountText";
this.lblDiscountText.Size = new System.Drawing.Size(32, 17);
this.lblDiscountText.TabIndex = 561;
this.lblDiscountText.Text = "折扣";
this.lblDiscountText.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// 商品直减券
//
this.商品直减券.Text = "商品直减券";
//
// 商品满减券
//
this.商品满减券.Text = "商品满减券";
//
// UcCouponAddParam
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.Controls.Add(this.label5);
this.Controls.Add(this.pnlTimePeriod);
this.Controls.Add(this.txtName);
this.Controls.Add(this.label8);
this.Controls.Add(this.rbNotReckonIn);
this.Controls.Add(this.lblMsg);
this.Controls.Add(this.rbReckonIn);
this.Controls.Add(this.line1);
this.Controls.Add(this.lblClose);
this.Controls.Add(this.label10);
this.Controls.Add(this.label9);
this.Controls.Add(this.label4);
this.Controls.Add(this.label13);
this.Controls.Add(this.label11);
this.Controls.Add(this.label6);
this.Controls.Add(this.cmbUserCountLimited);
this.Controls.Add(this.nudDays);
this.Controls.Add(this.nudTotalCount);
this.Controls.Add(this.label15);
this.Controls.Add(this.cmbType);
this.Controls.Add(this.label7);
this.Controls.Add(this.dtpEndApplyTime);
this.Controls.Add(this.dtpStartApplyTime);
this.Controls.Add(this.flowLayoutPanel1);
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Name = "UcCouponAddParam";
this.Size = new System.Drawing.Size(1180, 40);
((System.ComponentModel.ISupportInitialize)(this.nudDays)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.nudTotalCount)).EndInit();
this.pnlTimePeriod.ResumeLayout(false);
this.flowLayoutPanel1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.nudThresHold)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.nudCredit)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private DevComponents.Editors.ComboItem cbi1;
private System.Windows.Forms.Label label15;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.Label label10;
private DevComponents.Editors.ComboItem 商品折扣券;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label lblClose;
private DevComponents.DotNetBar.Controls.Line line1;
public DevComponents.DotNetBar.Controls.ComboBoxEx cmbUserCountLimited;
public System.Windows.Forms.NumericUpDown nudDays;
public System.Windows.Forms.NumericUpDown nudTotalCount;
public DevComponents.DotNetBar.Controls.ComboBoxEx cmbType;
public System.Windows.Forms.RadioButton rbNotReckonIn;
public System.Windows.Forms.RadioButton rbReckonIn;
public System.Windows.Forms.DateTimePicker dtpEndApplyTime;
public System.Windows.Forms.DateTimePicker dtpStartApplyTime;
public System.Windows.Forms.Label lblMsg;
public System.Windows.Forms.TextBox txtName;
public System.Windows.Forms.Panel pnlTimePeriod;
public System.Windows.Forms.DateTimePicker dtpStartUseTime;
public System.Windows.Forms.DateTimePicker dtpEndUseTime;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
public System.Windows.Forms.NumericUpDown nudThresHold;
public System.Windows.Forms.Label lblThresHold;
public System.Windows.Forms.NumericUpDown nudCredit;
public System.Windows.Forms.Label lblCreditText;
public System.Windows.Forms.Label lblDiscountText;
private DevComponents.Editors.ComboItem 商品直减券;
private DevComponents.Editors.ComboItem 商品满减券;
}
}
@@ -0,0 +1,101 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace LittleRabbit.LittleRabbitForms.SalesCenterForms
{
public partial class UcCouponAddParam : UserControl
{
int number = 1;
public UcCouponAddParam()
{
InitializeComponent();
this.Load += CouponAddParamControl_Load;
}
public UcCouponAddParam(int _number)
{
InitializeComponent();
number = _number;
this.Load += CouponAddParamControl_Load;
}
public delegate void CloseCouponAdd(object obj);
public event CloseCouponAdd OnClose;
private void CouponAddParamControl_Load(object sender, EventArgs e)
{
cmbType.SelectedIndex = cmbUserCountLimited.SelectedIndex = 0;
txtName.Text = "新人券" + number;
this.dtpStartApplyTime.Value = DateTime.Now.Date;
this.dtpEndApplyTime.Value = this.dtpStartApplyTime.Value.AddDays(1).AddSeconds(-1);
}
private void lblClose_Click(object sender, EventArgs e)
{
if (this.Parent != null)
{
this.Parent.Controls.Remove(this);
OnClose?.Invoke(this);
}
}
private void cmbType_SelectedIndexChanged(object sender, EventArgs e)
{
if (cmbType.Text == "商品折扣券")
{
this.lblDiscountText.Text = "折扣";
this.lblDiscountText.AutoSize = true;
this.lblDiscountText.Width = 32;
nudCredit.Minimum = 0.1M;
nudCredit.Increment = 0.1M;
nudCredit.Maximum = 9.9M;
nudCredit.DecimalPlaces = 1;
nudCredit.Value = 9.9M;
lblCreditText.Text = "折";
lblCreditText.Visible = true;
nudThresHold.Visible = false;
lblThresHold.Visible = false;
}
else if (cmbType.Text == "商品直减券")
{
this.lblDiscountText.Text = "直减";
this.lblDiscountText.AutoSize = true;
this.lblDiscountText.Width = 32;
nudCredit.Minimum = 1;
nudCredit.Increment = 1;
nudCredit.Maximum = 1000;
nudCredit.DecimalPlaces = 0;
nudCredit.Value = 1;
lblCreditText.Text = "元";
lblCreditText.Visible = true;
nudThresHold.Visible = false;
lblThresHold.Visible = false;
}
else
{
this.lblDiscountText.Text = "满";
this.lblDiscountText.AutoSize = false;
this.lblDiscountText.Width = 16;
nudCredit.Minimum = 1;
nudCredit.Increment = 1;
nudCredit.Maximum = 99999;
nudCredit.DecimalPlaces = 0;
nudCredit.Value = 1;
lblCreditText.Text = "元";
lblCreditText.Visible = false;
nudThresHold.Visible = true;
lblThresHold.Visible = true;
}
}
}
}
@@ -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>
@@ -0,0 +1,572 @@
namespace LittleRabbit.LittleRabbitForms.ShopForms
{
partial class FreightTemplateAddForm
{
/// <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.components = new System.ComponentModel.Container();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.label12 = new System.Windows.Forms.Label();
this.panel2 = new System.Windows.Forms.Panel();
this.rbcost0 = new System.Windows.Forms.RadioButton();
this.rbcost1 = new System.Windows.Forms.RadioButton();
this.rbcost2 = new System.Windows.Forms.RadioButton();
this.panel1 = new System.Windows.Forms.Panel();
this.label10 = new System.Windows.Forms.Label();
this.label11 = new System.Windows.Forms.Label();
this.txtFixCost = new System.Windows.Forms.TextBox();
this.groupTemplate = new LittleRabbit.UserComponent.UcGroupBoxEx(this.components);
this.label4 = new System.Windows.Forms.Label();
this.rbtype1 = new System.Windows.Forms.RadioButton();
this.rbtype2 = new System.Windows.Forms.RadioButton();
this.txtNum = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.txtPrice = new System.Windows.Forms.TextBox();
this.txtAddPrcie = new System.Windows.Forms.TextBox();
this.label6 = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.txtAddNum = new System.Windows.Forms.TextBox();
this.cobCity = new System.Windows.Forms.ComboBox();
this.cobProvince = new System.Windows.Forms.ComboBox();
this.label9 = new System.Windows.Forms.Label();
this.btnSave = new LittleRabbit.UserControls.ButtonEx();
this.label2 = new System.Windows.Forms.Label();
this.txtTemplate = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.dgvShop = new LittleRabbit.UserComponent.DataGridViewEx();
this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.colShopId = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colShopName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colStatus = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.statusBar = new LittleRabbit.UserControls.StatusBarUserControl();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.panel2.SuspendLayout();
this.panel1.SuspendLayout();
this.groupTemplate.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit();
this.splitContainer2.Panel1.SuspendLayout();
this.splitContainer2.Panel2.SuspendLayout();
this.splitContainer2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvShop)).BeginInit();
this.SuspendLayout();
//
// splitContainer1
//
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
this.splitContainer1.Name = "splitContainer1";
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.label12);
this.splitContainer1.Panel1.Controls.Add(this.panel2);
this.splitContainer1.Panel1.Controls.Add(this.panel1);
this.splitContainer1.Panel1.Controls.Add(this.groupTemplate);
this.splitContainer1.Panel1.Controls.Add(this.cobCity);
this.splitContainer1.Panel1.Controls.Add(this.cobProvince);
this.splitContainer1.Panel1.Controls.Add(this.label9);
this.splitContainer1.Panel1.Controls.Add(this.btnSave);
this.splitContainer1.Panel1.Controls.Add(this.label2);
this.splitContainer1.Panel1.Controls.Add(this.txtTemplate);
this.splitContainer1.Panel1.Controls.Add(this.label1);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.splitContainer2);
this.splitContainer1.Size = new System.Drawing.Size(894, 564);
this.splitContainer1.SplitterDistance = 110;
this.splitContainer1.TabIndex = 1;
//
// label12
//
this.label12.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.label12.AutoSize = true;
this.label12.BackColor = System.Drawing.Color.Transparent;
this.label12.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label12.ForeColor = System.Drawing.Color.Red;
this.label12.Location = new System.Drawing.Point(12, 73);
this.label12.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(248, 17);
this.label12.TabIndex = 421;
this.label12.Text = "运费模板设置,店铺需要登录,才能设置成功";
this.label12.Visible = false;
//
// panel2
//
this.panel2.Controls.Add(this.rbcost0);
this.panel2.Controls.Add(this.rbcost1);
this.panel2.Controls.Add(this.rbcost2);
this.panel2.Location = new System.Drawing.Point(346, 8);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(230, 25);
this.panel2.TabIndex = 401;
//
// rbcost0
//
this.rbcost0.AutoSize = true;
this.rbcost0.Checked = true;
this.rbcost0.Location = new System.Drawing.Point(3, 3);
this.rbcost0.Name = "rbcost0";
this.rbcost0.Size = new System.Drawing.Size(74, 21);
this.rbcost0.TabIndex = 340;
this.rbcost0.TabStop = true;
this.rbcost0.Text = "阶梯计价";
this.rbcost0.UseVisualStyleBackColor = true;
this.rbcost0.CheckedChanged += new System.EventHandler(this.rbcost0_CheckedChanged);
//
// rbcost1
//
this.rbcost1.AutoSize = true;
this.rbcost1.Location = new System.Drawing.Point(78, 3);
this.rbcost1.Name = "rbcost1";
this.rbcost1.Size = new System.Drawing.Size(74, 21);
this.rbcost1.TabIndex = 341;
this.rbcost1.Text = "固定运费";
this.rbcost1.UseVisualStyleBackColor = true;
this.rbcost1.CheckedChanged += new System.EventHandler(this.rbcost1_CheckedChanged);
//
// rbcost2
//
this.rbcost2.AutoSize = true;
this.rbcost2.Location = new System.Drawing.Point(153, 3);
this.rbcost2.Name = "rbcost2";
this.rbcost2.Size = new System.Drawing.Size(74, 21);
this.rbcost2.TabIndex = 342;
this.rbcost2.Text = "卖家包邮";
this.rbcost2.UseVisualStyleBackColor = true;
this.rbcost2.CheckedChanged += new System.EventHandler(this.rbcost2_CheckedChanged);
//
// panel1
//
this.panel1.Controls.Add(this.label10);
this.panel1.Controls.Add(this.label11);
this.panel1.Controls.Add(this.txtFixCost);
this.panel1.Location = new System.Drawing.Point(346, 35);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(142, 30);
this.panel1.TabIndex = 400;
this.panel1.Visible = false;
//
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(2, 6);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(56, 17);
this.label10.TabIndex = 397;
this.label10.Text = "固定运费";
//
// label11
//
this.label11.AutoSize = true;
this.label11.Location = new System.Drawing.Point(117, 7);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(20, 17);
this.label11.TabIndex = 399;
this.label11.Text = "元";
//
// txtFixCost
//
this.txtFixCost.Location = new System.Drawing.Point(63, 3);
this.txtFixCost.Name = "txtFixCost";
this.txtFixCost.Size = new System.Drawing.Size(49, 23);
this.txtFixCost.TabIndex = 398;
//
// groupTemplate
//
this.groupTemplate.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.groupTemplate.BorderStyle = LittleRabbit.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND;
this.groupTemplate.Controls.Add(this.label4);
this.groupTemplate.Controls.Add(this.rbtype1);
this.groupTemplate.Controls.Add(this.rbtype2);
this.groupTemplate.Controls.Add(this.txtNum);
this.groupTemplate.Controls.Add(this.label5);
this.groupTemplate.Controls.Add(this.label3);
this.groupTemplate.Controls.Add(this.label8);
this.groupTemplate.Controls.Add(this.txtPrice);
this.groupTemplate.Controls.Add(this.txtAddPrcie);
this.groupTemplate.Controls.Add(this.label6);
this.groupTemplate.Controls.Add(this.label7);
this.groupTemplate.Controls.Add(this.txtAddNum);
this.groupTemplate.Location = new System.Drawing.Point(282, 35);
this.groupTemplate.Name = "groupTemplate";
this.groupTemplate.Size = new System.Drawing.Size(514, 61);
this.groupTemplate.TabIndex = 396;
this.groupTemplate.TabStop = false;
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(5, 35);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(56, 17);
this.label4.TabIndex = 346;
this.label4.Text = "默认运费";
//
// rbtype1
//
this.rbtype1.AutoSize = true;
this.rbtype1.Checked = true;
this.rbtype1.Location = new System.Drawing.Point(67, 4);
this.rbtype1.Name = "rbtype1";
this.rbtype1.Size = new System.Drawing.Size(62, 21);
this.rbtype1.TabIndex = 344;
this.rbtype1.TabStop = true;
this.rbtype1.Text = "按件数";
this.rbtype1.UseVisualStyleBackColor = true;
this.rbtype1.CheckedChanged += new System.EventHandler(this.rbtype1_CheckedChanged);
//
// rbtype2
//
this.rbtype2.AutoSize = true;
this.rbtype2.Location = new System.Drawing.Point(142, 4);
this.rbtype2.Name = "rbtype2";
this.rbtype2.Size = new System.Drawing.Size(62, 21);
this.rbtype2.TabIndex = 345;
this.rbtype2.Text = "按重量";
this.rbtype2.UseVisualStyleBackColor = true;
this.rbtype2.CheckedChanged += new System.EventHandler(this.rbtype2_CheckedChanged);
//
// txtNum
//
this.txtNum.Location = new System.Drawing.Point(66, 32);
this.txtNum.Name = "txtNum";
this.txtNum.Size = new System.Drawing.Size(49, 23);
this.txtNum.TabIndex = 347;
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(118, 35);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(56, 17);
this.label5.TabIndex = 348;
this.label5.Text = "件以内,";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(4, 4);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(56, 17);
this.label3.TabIndex = 343;
this.label3.Text = "计价方式";
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(489, 35);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(20, 17);
this.label8.TabIndex = 354;
this.label8.Text = "元";
//
// txtPrice
//
this.txtPrice.Location = new System.Drawing.Point(178, 32);
this.txtPrice.Name = "txtPrice";
this.txtPrice.Size = new System.Drawing.Size(49, 23);
this.txtPrice.TabIndex = 349;
//
// txtAddPrcie
//
this.txtAddPrcie.Location = new System.Drawing.Point(437, 32);
this.txtAddPrcie.Name = "txtAddPrcie";
this.txtAddPrcie.Size = new System.Drawing.Size(49, 23);
this.txtAddPrcie.TabIndex = 353;
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(230, 35);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(68, 17);
this.label6.TabIndex = 350;
this.label6.Text = "元,每增加";
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(353, 35);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(80, 17);
this.label7.TabIndex = 352;
this.label7.Text = "件,增加运费";
//
// txtAddNum
//
this.txtAddNum.Location = new System.Drawing.Point(301, 32);
this.txtAddNum.Name = "txtAddNum";
this.txtAddNum.Size = new System.Drawing.Size(49, 23);
this.txtAddNum.TabIndex = 351;
//
// cobCity
//
this.cobCity.FormattingEnabled = true;
this.cobCity.Location = new System.Drawing.Point(181, 33);
this.cobCity.Name = "cobCity";
this.cobCity.Size = new System.Drawing.Size(87, 25);
this.cobCity.TabIndex = 376;
//
// cobProvince
//
this.cobProvince.FormattingEnabled = true;
this.cobProvince.Location = new System.Drawing.Point(75, 33);
this.cobProvince.Name = "cobProvince";
this.cobProvince.Size = new System.Drawing.Size(101, 25);
this.cobProvince.TabIndex = 375;
this.cobProvince.SelectedIndexChanged += new System.EventHandler(this.cobProvince_SelectedIndexChanged);
//
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(12, 35);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(56, 17);
this.label9.TabIndex = 374;
this.label9.Text = "发货地区";
//
// btnSave
//
this.btnSave.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnSave.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnSave.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSave.ForeColor = System.Drawing.Color.White;
this.btnSave.Location = new System.Drawing.Point(814, 37);
this.btnSave.Margin = new System.Windows.Forms.Padding(2);
this.btnSave.Name = "btnSave";
this.btnSave.Size = new System.Drawing.Size(66, 26);
this.btnSave.TabIndex = 373;
this.btnSave.Text = "保存";
this.btnSave.UseVisualStyleBackColor = false;
this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(284, 9);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(56, 17);
this.label2.TabIndex = 339;
this.label2.Text = "运费设置";
//
// txtTemplate
//
this.txtTemplate.Location = new System.Drawing.Point(74, 6);
this.txtTemplate.Name = "txtTemplate";
this.txtTemplate.Size = new System.Drawing.Size(195, 23);
this.txtTemplate.TabIndex = 338;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(12, 9);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(56, 17);
this.label1.TabIndex = 337;
this.label1.Text = "模板名称";
//
// splitContainer2
//
this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
this.splitContainer2.Location = new System.Drawing.Point(0, 0);
this.splitContainer2.Name = "splitContainer2";
this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer2.Panel1
//
this.splitContainer2.Panel1.Controls.Add(this.dgvShop);
this.splitContainer2.Panel1.Padding = new System.Windows.Forms.Padding(4, 0, 4, 0);
//
// splitContainer2.Panel2
//
this.splitContainer2.Panel2.Controls.Add(this.statusBar);
this.splitContainer2.Size = new System.Drawing.Size(894, 450);
this.splitContainer2.SplitterDistance = 420;
this.splitContainer2.TabIndex = 0;
//
// dgvShop
//
this.dgvShop.AllowUserToAddRows = false;
this.dgvShop.AllowUserToDeleteRows = false;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
this.dgvShop.BackgroundColor = System.Drawing.Color.White;
this.dgvShop.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.dgvShop.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.dgvShop.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
this.dgvShop.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvShop.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colSelect,
this.colShopId,
this.colShopName,
this.colStatus});
this.dgvShop.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvShop.Location = new System.Drawing.Point(4, 0);
this.dgvShop.Name = "dgvShop";
this.dgvShop.ReadOnly = true;
dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.dgvShop.RowsDefaultCellStyle = dataGridViewCellStyle3;
this.dgvShop.RowTemplate.Height = 23;
this.dgvShop.Size = new System.Drawing.Size(886, 420);
this.dgvShop.TabIndex = 7;
this.dgvShop.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvShop_CellContentClick);
//
// colSelect
//
this.colSelect.FillWeight = 50F;
this.colSelect.HeaderText = "全选";
this.colSelect.Name = "colSelect";
this.colSelect.ReadOnly = true;
this.colSelect.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colSelect.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colSelect.Width = 60;
//
// colShopId
//
this.colShopId.HeaderText = "店铺";
this.colShopId.Name = "colShopId";
this.colShopId.ReadOnly = true;
this.colShopId.Width = 80;
//
// colShopName
//
this.colShopName.FillWeight = 150F;
this.colShopName.HeaderText = "店铺名称";
this.colShopName.Name = "colShopName";
this.colShopName.ReadOnly = true;
this.colShopName.Resizable = System.Windows.Forms.DataGridViewTriState.True;
//
// colStatus
//
this.colStatus.HeaderText = "消息";
this.colStatus.Name = "colStatus";
this.colStatus.ReadOnly = true;
this.colStatus.Width = 120;
//
// statusBar
//
this.statusBar.BackColor = System.Drawing.Color.White;
this.statusBar.Dock = System.Windows.Forms.DockStyle.Fill;
this.statusBar.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.statusBar.Location = new System.Drawing.Point(0, 0);
this.statusBar.Margin = new System.Windows.Forms.Padding(0);
this.statusBar.Name = "statusBar";
this.statusBar.Size = new System.Drawing.Size(894, 26);
this.statusBar.TabIndex = 3;
//
// ShopFreightTemplateForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(894, 564);
this.Controls.Add(this.splitContainer1);
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Name = "ShopFreightTemplateForm";
this.Text = "运费模板";
this.Load += new System.EventHandler(this.ShopFreightTemplateForm_Load);
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel1.PerformLayout();
this.splitContainer1.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
this.panel2.ResumeLayout(false);
this.panel2.PerformLayout();
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.groupTemplate.ResumeLayout(false);
this.groupTemplate.PerformLayout();
this.splitContainer2.Panel1.ResumeLayout(false);
this.splitContainer2.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
this.splitContainer2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dgvShop)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.SplitContainer splitContainer1;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.TextBox txtAddPrcie;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.TextBox txtAddNum;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.TextBox txtPrice;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.TextBox txtNum;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.RadioButton rbtype2;
private System.Windows.Forms.RadioButton rbtype1;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.RadioButton rbcost2;
private System.Windows.Forms.RadioButton rbcost1;
private System.Windows.Forms.RadioButton rbcost0;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox txtTemplate;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.ComboBox cobCity;
private System.Windows.Forms.ComboBox cobProvince;
private System.Windows.Forms.Label label9;
private UserControls.ButtonEx btnSave;
private UserComponent.UcGroupBoxEx groupTemplate;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.TextBox txtFixCost;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.SplitContainer splitContainer2;
private UserComponent.DataGridViewEx dgvShop;
private UserControls.StatusBarUserControl statusBar;
private System.Windows.Forms.Label label12;
private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopId;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopName;
private System.Windows.Forms.DataGridViewTextBoxColumn colStatus;
}
}
@@ -0,0 +1,337 @@
using AllBase;
using AllBase.Helper;
using AllBase.Model.Result;
using LittleRabbit.Extension;
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.Web.UI.WebControls;
using System.Windows.Forms;
using Work;
namespace LittleRabbit.LittleRabbitForms.ShopForms
{
/// <summary>
/// 运费模板管理窗口
/// </summary>
public partial class FreightTemplateAddForm : Form
{
public static List<string> ids = new List<string>();
public FreightTemplateAddForm()
{
InitializeComponent();
}
private void btnSave_Click(object sender, EventArgs e)
{
string template_name = txtTemplate.Text.ToString();
int num =0;
decimal price = 0;
int addnum = 0;
decimal addPrcie = 0;
if (rbcost0.Checked)
{
num = Convert.ToInt32(txtNum.Text);
price = Convert.ToDecimal(txtPrice.Text);
addnum = Convert.ToInt32(txtAddNum.Text);
addPrcie = Convert.ToDecimal(txtAddPrcie.Text);
}
var prov = cobProvince.SelectedItem as ListItem;
int pid = int.Parse(prov.Value);
var city = cobCity.SelectedItem as ListItem;
int cid = int.Parse(city.Value);
ids = dgvShop.Rows.Cast<DataGridViewRow>()
.Where(r1 => r1.Cells["colSelect"].Value.ToString().ToLower() == "true")
.Select(r2 => r2.Cells["colShopId"].Value?.ToString()).ToList();
Task.Run(()=> {
for (int i = 0; i < GlobalConfig.DouShopLoginList.Count; i++)
{
var shop = GlobalConfig.DouShopLoginList[i];
if (!ids.Any(id => id == shop.ShopAccountId) || shop.LoginStatus != "登录成功")
continue;
string data = "template_name=" + template_name + "&product_province=" + pid + "&product_city=" + cid;
//固定运费
if (rbcost1.Checked)
{
decimal fix = Convert.ToDecimal(txtFixCost.Text);
data += "&rule_type=1&calculate_type=2&fixed_amount=" + fix * 100 + "&appid=1&__token=" + shop.ShopToken + "&_bid=ffa_order&aid=4272&_lid=478386445810";
}
//卖家包邮
if (rbcost2.Checked)
{
data += "&rule_type=2&calculate_type=2&fixed_amount=0&appid=1&__token=" + shop.ShopToken + "&_bid=ffa_order&aid=4272&_lid=478386445810";
}
// 阶梯计价
if (rbcost0.Checked)
{
if (rbtype1.Checked)
{
data += "&rule_type=0&calculate_type=2&fixed_amount=0&columns[0][calculate_type]=2&columns[0][first_weight]=&columns[0][first_weight_price]=&columns[0][first_num]=" + num
+ "&columns[0][first_num_price]=" + price
+ "&columns[0][add_weight]=&columns[0][add_weight_price]=&columns[0][add_num]=" + addnum
+ "&columns[0][add_num_price]=" + addPrcie
+ "&columns[0][is_default]=1&columns[0][is_limited]=0&columns[0][is_over_free]=0&appid=1&__token=" + shop.ShopToken
+ "&_bid=ffa_order&aid=4272&_lid=390305557852";
}
else
{
data += "&rule_type=0&calculate_type=1&fixed_amount=0&columns[0][calculate_type]=1&columns[0][first_weight]=" + num
+ "&columns[0][first_weight_price]=" + price
+ "&columns[0][first_num]=&columns[0][first_num_price]=&columns[0][add_weight]=" + addnum
+ "&columns[0][add_weight_price]=" + addPrcie + "&columns[0][add_num]=&columns[0][add_num_price]=&columns[0][is_default]=1&columns[0][is_limited]=0&columns[0][is_over_free]=0&appid=1&__token=" + shop.ShopToken
+ "&_bid=ffa_order&aid=4272&_lid=482676755100";
}
}
//提交
string url = "https://fxg.jinritemai.com/freight/template/createShopFreightTemplate?appid=1&__token=" + shop.ShopToken
+ "&_bid=ffa_order&aid=4272&_lid=390305621361&_signature=" + shop.Signature + "";
string refere = "https://fxg.jinritemai.com/ffa/morder/logistics/freight-edit";
data = HttpUtility.UrlEncode(data, Encoding.UTF8).Replace("%3d", "=").Replace("%26", "&");
string html = GetPostTaobaoHtml.UploadFxgPost(url, refere, true, data, shop.Cookies);
long template_id = BaseRegex.GetLongJson(ref html, "template_id");
if (template_id>0)
{
RefreshDataGridView(shop, "运费模板设置成功");
RefreshLog(shop.ShopAccount+"运费模板设置成功");
}
else
{
RefreshDataGridView(shop, "运费模板设置失败");
RefreshLog(shop.ShopAccount + "运费模板设置失败");
}
}
});
}
int count = 0;
public void RefreshDataGridView(DouShopLoginInfo shop,string message)
{
this.Invoke(new Action(() =>
{
count++;
for (int i = 0; i < dgvShop.Rows.Count; i++)
{
if (shop.ShopAccountId== dgvShop.Rows[i].Cells["colShopId"].Value.ToString())
{
dgvShop.Rows[i].Cells["colStatus"].Value = message;
break;
}
}
}));
}
public void RefreshLog(string message)
{
Task.Run(() =>
{
if (this.Created)
{
this.Invoke(new Action(() =>
{
this.statusBar.lblTaskStatus.Text = message;
this.statusBar.pgbTaskProgress.Maximum = ids.Count;
this.statusBar.pgbTaskProgress.Value = count;
this.statusBar.pgbTaskProgress.Text = count + "/" + ids.Count;
}));
}
});
}
private void rbcost1_CheckedChanged(object sender, EventArgs e)
{
if (rbcost1.Checked)
{
panel1.Visible = true;
}
else
{
panel1.Visible = false;
}
}
private void rbcost0_CheckedChanged(object sender, EventArgs e)
{
if (rbcost0.Checked)
{
groupTemplate.Visible = true;
}
else
{
groupTemplate.Visible = false;
}
}
private void rbcost2_CheckedChanged(object sender, EventArgs e)
{
if (rbcost2.Checked)
{
groupTemplate.Visible = false;
panel1.Visible = false;
}
}
private void rbtype1_CheckedChanged(object sender, EventArgs e)
{
if (rbtype1.Checked)
{
label5.Text= "件以内,";
label7.Text = "件,增加运费";
}
}
private void rbtype2_CheckedChanged(object sender, EventArgs e)
{
if (rbtype2.Checked)
{
label5.Text = "kg以内,";
label7.Text = "kg,增加运费";
}
}
private void cobProvince_SelectedIndexChanged(object sender, EventArgs e)
{
var area = cobProvince.SelectedItem as ListItem;
int id = int.Parse(area.Value);
var shop = GlobalConfig.DouShopLoginList.Where(s=>s.LoginStatus=="登录成功").FirstOrDefault();
if (shop == null)
return;
List<ListItem> list = new List<ListItem>();
//获取市区
string url = "https://fxg.jinritemai.com/common/index/getCity?version=1&id=" + id + "&appid=1&__token=" + shop?.ShopToken
+ "&_bid=ffa_order&aid=4272&_lid=368236870254&_signature=" + shop?.Signature + "";
string refere = "https://fxg.jinritemai.com/ffa/morder/logistics/freight-edit";
string html = GetPostTaobaoHtml.UploadTaobao(url, refere, true, shop?.Cookies);
long catId = BaseRegex.GetLongJson(ref html, "id");
var m = BaseRegex.GetMatchRegex(ref html, @"{""city_id""[\w\W]+?}");
for (int i = 0; m != null && i < m.Count; i++)
{
string temp = m[i].Groups[0].Value;
long pid = BaseRegex.GetLongJson(ref temp, "city_id");
string pname = BaseRegex.GetStringJson(ref temp, "city");
list.Add(new ListItem(pname,pid.ToString()));
}
cobCity.DisplayMember = "Text";
cobCity.ValueMember = "Value";
cobCity.DataSource = list;
}
private void ShopFreightTemplateForm_Load(object sender, EventArgs e)
{
this.dgvShop.AddSelectorColumn("colSelect");
ReadLoad();
loadArea();
}
string temp = "";
public void loadArea()
{
//var shop = GlobalConfig.DouShopLoginList[0];
//List<ListItem> list = new List<ListItem>();
//cobProvince.Items.Clear();
//string url = "https://fxg.jinritemai.com/common/index/getProvince?version=1&only_mainland=1&appid=1&__token=" + shop.ShopToken
// + "&_bid=ffa_order&aid=4272&_lid=468369728881&_signature=" + shop.Signature;
//string refere = "https://fxg.jinritemai.com/ffa/morder/logistics/freight-edit";
//string html = GetPostTaobaoHtml.UploadTaobao(url, refere, true, shop.Cookies);
//var m = BaseRegex.GetMatchRegex(ref html, @"{""province_id""[\w\W]+?}");
//for (int i = 0; m != null && i < m.Count; i++)
//{
// string item = m[i].Groups[0].Value;
// long pid = BaseRegex.GetLongJson(ref item, "province_id");
// string pname = BaseRegex.GetStringJson(ref item, "province");
// list.Add(new ListItem(pname, pid.ToString()));
// temp += pname+":"+pid+"\r\n";
//}
List<ListItem> list = new List<ListItem>();
List<string> striparr = prov.Split(new string[] { "\r\n" }, StringSplitOptions.None).ToList();
for (int i = 0; i < striparr.Count; i++)
{
string item = striparr[i];
string pname = item.Split(':')[0];
string pid= item.Split(':')[1];
list.Add(new ListItem(pname, pid));
}
cobProvince.DisplayMember = "Text";
cobProvince.ValueMember = "Value";
cobProvince.DataSource = list;
}
public void ReadLoad()
{
for (int i = 0; i < GlobalConfig.DouShopLoginList.Count; i++)
{
var shop = GlobalConfig.DouShopLoginList[i];
dgvShop.Rows.Add(false, shop.ShopAccountId, shop.ShopAccount, 0, shop.LoginStatus);
}
}
private void dgvShop_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
if (e.ColumnIndex < 0 || e.RowIndex < 0)
return;
//string name = dgvShop.Columns[e.ColumnIndex].HeaderText;
string colId = dgvShop.Columns[e.ColumnIndex].Name;
if (colId == "colSelect")
{
bool ok = !bool.Parse(dgvShop.Rows[e.RowIndex].Cells["colSelect"].Value.ToString());
dgvShop.Rows[e.RowIndex].Cells["colSelect"].Value = ok;
}
//if (name == "全选")
//{
// bool ok = !bool.Parse(dgvShop.Rows[e.RowIndex].Cells["colSelect"].Value.ToString());
// string shopName = dgvShop.Rows[e.RowIndex].Cells["colShopId"].Value.ToString();
// dgvShop.Rows[e.RowIndex].Cells["colSelect"].Value = ok;
// if (ok)
// {
// ids.Add(shopName);
// }
// else
// {
// if (ids.Select(id => id == shopName).FirstOrDefault())
// {
// ids.Remove(shopName);
// }
// }
//}
}
string prov = @"安徽省:34
北京市:11
重庆市:50
福建省:35
广东省:44
甘肃省:62
广西壮族自治区:45
贵州省:52
河北省:13
湖北省:42
黑龙江省:23
河南省:41
湖南省:43
海南省:46
吉林省:22
江苏省:32
江西省:36
辽宁省:21
内蒙古自治区:15
宁夏回族自治区:64
青海省:63
四川省:51
山东省:37
上海市:31
山西省:14
陕西省:61
天津市:12
新疆维吾尔自治区:65
西藏自治区:54
云南省:53
浙江省:33";
}
}
@@ -0,0 +1,129 @@
<?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="colSelect.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colShopId.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colStatus.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,665 @@
using AllBase;
using AllBase.Helper;
using AllBase.Model.Param.OrderManage;
using AllBase.Model.Result;
using LittleRabbit.Extension;
using LittleRabbit.LittleRabbitForms.BaseForms;
using NaiBa.Util.Extension;
using NaiBa.Util.Helper;
using Newtonsoft.Json.Linq;
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 Work;
using Work.DouyinApiClass;
namespace LittleRabbit.LittleRabbitForms.ShopForms
{
public partial class FreightTemplateForm : Form
{
public static List<AddressAreaInfo> LstAddress = new List<AddressAreaInfo>();
public static List<string> CustomFreightTemplateNames { get; set; } = new List<string>();
public static Dictionary<string, string> AreaNotSendDict = new Dictionary<string, string>();
private CheckBox chkSelectAll = null;
public CancellationTokenSource cancellationTokenSource { get; set; } = null;
public FreightTemplateForm()
{
InitializeComponent();
}
private void FreightTemplateForm_Load(object sender, EventArgs e)
{
pnlSamePostage.Location = pnlStepPostage.Location;
this.ucTabControl1.TabPages.Clear();
CustomFreightTemplateNames = ConfigHelper.LoadConfig<List<string>>("freight_template_custom_names");
if (CustomFreightTemplateNames == null)
{
CustomFreightTemplateNames = new List<string>();
}
AreaNotSendDict = ConfigHelper.LoadConfig<Dictionary<string, string>>("not_send_address");
if (AreaNotSendDict == null)
AreaNotSendDict = new Dictionary<string, string>();
chkSelectAll = dgvShop.Columns["colSelect"].AddHeaderCheckBox(HorizontalAlignment.Center, 0, 0, null, null, false);
dgvShop.Columns["colSelect"].HeaderText = "";
chkSelectAll.Width = chkSelectAll.Height = 13;
chkSelectAll.CheckedChanged += chkSelectAll_CheckedChanged;
GetAddress("0");
var provinceNames = LstAddress.Where(a => a.level == "Province").Select(a => a.name as object).ToArray();
this.cmbProvince.Items.Clear();
this.cmbProvince.Items.AddRange(provinceNames);
this.cmbProvince.SelectedIndex = 0;
}
private void FreightTemplateForm_VisibleChanged(object sender, EventArgs e)
{
if (Visible == true)
RefreshShop();
}
private void btnRefreshShop_Click(object sender, EventArgs e)
{
RefreshShop();
}
private void RefreshShop()
{
// 店铺Id
var selectIds = dgvShop.Rows.Cast<DataGridViewRow>().Where(row
=> row.Cells["colSelect"]?.Value.ParseToBool() == true).Select(r => r.Cells["colShopId"]?.Value.ToString()).ToList();
// 获取被删除的店铺
List<DataGridViewRow> dgvRowList = dgvShop.Rows.Cast<DataGridViewRow>().Where(row
=> !GlobalConfig.DouShopLoginList.Any(s => s.ShopAccountId == row.Cells["colShopId"]?.Value?.ToString())).ToList();
// 更新被删除的店铺列表
foreach (var row in dgvRowList)
{
dgvShop.Rows.Remove(row);
}
// 绑定其他店铺(含新导入的店铺)
foreach (DouShopLoginInfo shopEntity in GlobalConfig.DouShopLoginList)
{
BindShop(shopEntity, selectIds);
}
}
private void BindShop(DouShopLoginInfo shopEntity, List<string> selectShopId = null)
{
if (shopEntity == null)
return;
if (selectShopId == null)
selectShopId = new List<string>();
bool canUse = shopEntity.BuyApiAuth.ApiAuthStatus == "授权成功" && shopEntity.LoginStatus == "登录成功";
var row = dgvShop.Rows.Cast<DataGridViewRow>().FirstOrDefault(p => p.Cells.GetCellValueFromColumnName("colShopId").ParseToString() == shopEntity.ShopAccountId);
if (row == null)
{
this.dgvShop.Rows.Add(
selectShopId.Contains(shopEntity.ShopAccountId) && canUse,
shopEntity.ShopAccountId,
shopEntity.ShopAccount,
shopEntity.BuyApiAuth.ApiAuthStatus,
shopEntity.LoginStatus,
canUse,
string.Empty
);
}
else
{
row.Cells["colSelect"].Value = selectShopId.Contains(shopEntity.ShopAccountId) && canUse;
row.Cells["colShopName"].Value = shopEntity.ShopAccount;
row.Cells["colBuyAuthStatus"].Value = shopEntity.BuyApiAuth.ApiAuthStatus;
row.Cells["colLoginStatus"].Value = shopEntity.LoginStatus;
row.Cells["colCanUse"].Value = canUse;
}
}
private void chkSelectAll_CheckedChanged(object sender, EventArgs e)
{
if (!chkSelectAll.Checked)
{
foreach (DataGridViewRow row in dgvShop.Rows)
{
row.Cells["colSelect"].Value = false;
}
}
else
{
var list = GlobalConfig.DouShopLoginList.Where(s => s.ApiAuthStatus == "授权成功" && s.LoginStatus == "登录成功").Select(ss => ss.ShopAccountId);
foreach (DataGridViewRow row in dgvShop.Rows)
{
if (list.Any(l => l == row.Cells["colShopId"]?.Value?.ToString()))
row.Cells["colSelect"].Value = true;
}
}
}
private void dgvShop_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
if (e.ColumnIndex < 0 || e.RowIndex < 0)
return;
string headerText = dgvShop.Columns[e.ColumnIndex].HeaderText;
string columnName = dgvShop.Columns[e.ColumnIndex].Name;
long shopId = dgvShop.Rows[e.RowIndex].Cells["colShopId"].Value.ParseToLong();
string shopName = dgvShop.Rows[e.RowIndex].Cells["colShopId"].Value.ToString();
var shop = GlobalConfig.DouShopLoginList.FirstOrDefault(s => s.ShopAccountId == shopId.ToString());
var row = dgvShop.Rows[e.RowIndex];
switch (columnName)
{
case "colSelect":
if (row.Cells["colCanUse"].Value.ParseToBool())
{
row.Cells["colSelect"].Value = !row.Cells["colSelect"].Value.ParseToBool();
if (dgvShop.Rows.Cast<DataGridViewRow>().All(r => r.Cells["colSelect"].Value.ParseToBool()))
chkSelectAll.Checked = true;
else
chkSelectAll.Checked = false;
}
else
{
BaseMsgForm.ShowInfo("店铺未授权或未登录!");
}
break;
}
}
private void btnSearch_Click(object sender, EventArgs e)
{
var lstShopId = dgvShop.Rows.Cast<DataGridViewRow>().Where(row
=> row.Cells["colSelect"]?.Value.ParseToBool() == true).Select(r => r.Cells["colShopId"]?.Value.ToString()).ToList();
if (lstShopId.Count == 0)
{
BaseMsgForm.ShowInfo("请选择店铺!");
return;
}
string searchText = txtSearchText.Text.Trim();
btnSearch.Enabled = false;
cancellationTokenSource = new CancellationTokenSource();
Task.Run(() =>
{
var lstShopIdTemp = new List<string>();
lstShopIdTemp.AddRange(lstShopId);
foreach (var shopId in lstShopIdTemp)
{
if (cancellationTokenSource.IsCancellationRequested)
break;
var shop = GlobalConfig.DouShopLoginList.FirstOrDefault(s => s.ShopAccountId == shopId);
if (shop == null)
continue;
if (ShopListForm.Instance == null)
ShopListForm.Instance = new ShopListForm();
ShopListForm.Instance.CheckShopLogin(new string[] { shop.ShopAccount }, false);
if (shop.LoginStatus != "登录成功")
{
Invoke(new Action(() =>
{
var row = this.dgvShop.Rows.Cast<DataGridViewRow>().FirstOrDefault(r => r.Cells["colShopId"].Value.ToString() == shop.ShopAccountId);
if (row != null)
{
row.Cells["colLoginStatus"].Value = "未登录";
row.Cells["colCanUse"].Value = false;
}
}));
continue;
}
FreightTemplateListForm templateListForm = null;
Invoke(new Action(() =>
{
var tab = this.ucTabControl1.TabPages.Cast<TabPage>().FirstOrDefault(t => t.Text == shop.ShopAccount && t.Name == "tab" + shop.ShopAccountId);
if (tab == null)
{
tab = new TabPage();
tab.Name = "tab" + shop.ShopAccountId;
tab.Text = shop.ShopAccount;
this.ucTabControl1.TabPages.Add(tab);
var freightTemplateListForm = new FreightTemplateListForm(shop);
//freightTemplateListForm.SeckillingAndLimitedSalesForm = this;
freightTemplateListForm.TopLevel = false;
freightTemplateListForm.Left = 0;
freightTemplateListForm.Top = 0;
freightTemplateListForm.FormBorderStyle = FormBorderStyle.None;
freightTemplateListForm.AutoSize = true;
freightTemplateListForm.Dock = DockStyle.Fill;
freightTemplateListForm.Show();
tab.Controls.Add(freightTemplateListForm);
templateListForm = freightTemplateListForm;
}
if (tab.Controls.Count > 0)
{
templateListForm = tab.Controls[0] as FreightTemplateListForm;
this.ucTabControl1.SelectedTab = tab;
}
}));
if (templateListForm != null)
{
templateListForm.GetTemplate(this.txtSearchText.Text);
}
}
Invoke(new Action(() =>
{
btnSearch.Enabled = true;
}));
}, cancellationTokenSource.Token);
}
public static AddressAreaInfo GetAddress(string areaId)
{
if (LstAddress.Count == 0)
LstAddress = ConfigHelper.LoadConfig<List<AddressAreaInfo>>("address_area");
if (LstAddress == null)
LstAddress = new List<AddressAreaInfo>();
if (string.IsNullOrEmpty(areaId) || areaId == "0")
{
if (LstAddress.Count > 0)
return null;
}
var addr = LstAddress.FirstOrDefault(a => a.code.ToString() == areaId);
if (addr != null && (addr.sub_districts != null || addr.level == "Town"))
return addr;
var shop = GlobalConfig.DouShopLoginList.FirstOrDefault(s => s.BuyApiAuth.ApiAuthStatus == "授权成功");
if (shop == null)
{
BaseMsgForm.ShowError("请确保有店铺拍单授权成功!");
return null;
}
DouyinApi api = new DouyinApi(shop);
var result = api.GetDouyinAddressAreaByBuyApi(areaId);
if (!result.Contains("\"code\":10000"))
{
var msg = BaseRegex.GetStringJson(ref result, "msg") + ":" + BaseRegex.GetStringJson(ref result, "sub_msg");
BaseMsgForm.ShowError(msg);
return null;
}
if (string.IsNullOrEmpty(areaId) || areaId == "0")
{
JObject obj = JObject.Parse(result);
List<AddressProvinceInfo> provinceList = AllBase.JsonHelper.DeserializeJsonToList<AddressProvinceInfo>(obj["data"].ToString());
foreach (var province in provinceList)
{
LstAddress.Add(new AddressAreaInfo()
{
father_code = 1,
code = province.province_id.ParseToInt(),
level = "Province",
name = province.province,
});
}
ConfigHelper.SaveConfig("address_area", LstAddress);
return LstAddress.FirstOrDefault();
}
else
{
JObject obj = JObject.Parse(result);
AddressAreaInfo area = AllBase.JsonHelper.DeserializeJsonToObject<AddressAreaInfo>(obj["data"].FirstOrDefault().ToString());
if (area != null)
{
var areaExist = LstAddress.FirstOrDefault(a => a.name == area.name && a.level == area.level);
if (areaExist == null)
{
LstAddress.Add(area);
ConfigHelper.SaveConfig("address_area", LstAddress);
return area;
}
else
{
areaExist.sub_districts = area.sub_districts;
areaExist.father_code = area.father_code;
ConfigHelper.SaveConfig("address_area", LstAddress);
return areaExist;
}
foreach (var area1 in area.sub_districts)
{
}
}
}
return null;
}
private void cmbProvince_SelectedIndexChanged(object sender, EventArgs e)
{
var area = LstAddress.FirstOrDefault(a => a.name == cmbProvince.Text && a.level == "Province");
if (area != null)
{
if (area.sub_districts == null || area.sub_districts.Count == 0)
{
area = GetAddress(area.code.ToString());
}
var cityArr = area.sub_districts.Select(a => a.name).ToArray();
this.cmbCity.Items.Clear();
this.cmbCity.Items.AddRange(cityArr);
this.cmbCity.SelectedIndex = 0;
}
}
private void btnStopSearch_Click(object sender, EventArgs e)
{
if (cancellationTokenSource != null)
cancellationTokenSource.Cancel();
}
private void btnSetName_Click(object sender, EventArgs e)
{
FreightTemplateNameForm customNameForm = new FreightTemplateNameForm();
customNameForm.ShowDialog();
}
private void rbStepPostage_CheckedChanged(object sender, EventArgs e)
{
pnlStepPostage.Visible = rbStepPostage.Checked;
}
private void rbSamePostage_CheckedChanged(object sender, EventArgs e)
{
pnlSamePostage.Visible = rbSamePostage.Checked;
}
private void rbWithWeight_CheckedChanged(object sender, EventArgs e)
{
if (rbWithWeight.Checked)
{
lblWeightOrCountStep1.Text = "kg以内,";
lblWeightOrCountStep2.Text = "kg,增加运费";
}
else
{
lblWeightOrCountStep1.Text = "件以内,";
lblWeightOrCountStep2.Text = "件,增加运费";
}
}
private void btnSetNotArea_Click(object sender, EventArgs e)
{
FreightTemplateNotSendAreaForm form = new FreightTemplateNotSendAreaForm();
form.ShowDialog();
}
private void btnAdd_Click(object sender, EventArgs e)
{
var lstShopId = dgvShop.Rows.Cast<DataGridViewRow>().Where(row
=> row.Cells["colSelect"]?.Value.ParseToBool() == true).Select(r => r.Cells["colShopId"]?.Value.ToString()).ToList();
if (lstShopId.Count == 0)
{
BaseMsgForm.ShowInfo("请选择店铺!");
return;
}
int templateCount = nudGroupCount.Value.ParseToInt();
bool isLimit = chkLimited.Checked;
List<string> nameList = new List<string>();
if (rbCustomName.Checked)
{
if (CustomFreightTemplateNames.Count < templateCount)
{
BaseMsgForm.ShowError("自定义模板名称数量不足");
return;
}
for (int i = 0; i < templateCount; i++)
{
nameList.Add(CustomFreightTemplateNames[i]);
}
}
else
{
var name = "模板" + DateTime.Now.ToString("yyMMddHHmmss");
for (int i = 0; i < templateCount; i++)
{
nameList.Add(name + "-" + i.ToString());
}
}
TemplateParam templateParam = new TemplateParam();
var area = LstAddress.FirstOrDefault(a => a.name == cmbProvince.Text && a.level == "Province");
if (area != null)
{
templateParam.product_province = area.code;
templateParam.product_city = (area.sub_districts.FirstOrDefault(a => a.name == cmbCity.Text && a.level == "City")?.code).ParseToLong();
}
if (rbStepPostage.Checked && rbWithWeight.Checked)
templateParam.calculate_type = 1;
templateParam.transfer_type = 1;
templateParam.rule_type = rbStepPostage.Checked ? 0 : rbSamePostage.Checked ? 1 : 2;
templateParam.fixed_amount = (int)(txtSamePostagePrice.Text.ParseToDecimal() * 100);
List<TemplateRulesParam> ruleList = new List<TemplateRulesParam>();
if (templateParam.rule_type == 0)
{
TemplateRulesParam defaultRules = new TemplateRulesParam();
defaultRules.is_default = 1;
if (rbWithCount.Checked)
{
defaultRules.first_num = txtWeightOrCountStep1.Text.ParseToInt();
defaultRules.first_num_price = txtWeightOrCountPrice1.Text.ParseToDecimal();
defaultRules.add_num = txtWeightOrCountStep2.Text.ParseToInt();
defaultRules.add_num_price = txtWeightOrCountPrice2.Text.ParseToDecimal();
}
else
{
defaultRules.first_weight = txtWeightOrCountStep1.Text.ParseToInt();
defaultRules.first_weight_price = txtWeightOrCountPrice1.Text.ParseToDecimal();
defaultRules.add_weight = txtWeightOrCountStep2.Text.ParseToInt();
defaultRules.add_weight_price = txtWeightOrCountPrice2.Text.ParseToDecimal();
}
ruleList.Add(defaultRules);
}
if (isLimit)
{
TemplateRulesParam rules = new TemplateRulesParam();
if (ruleList.Count == 0)
{
//rules.is_default = 1;
}
rules.is_limited = true;
Dictionary<string, object> pDict = new Dictionary<string, object>();
foreach (var key in AreaNotSendDict.Keys)
{
var keys = key.Trim('p').Split('c', 'd', 't');
if (!pDict.Keys.Contains(keys[0]))
pDict[keys[0]] = null;
if (keys.Length > 1)
{
var cDict = pDict[keys[0]] as Dictionary<string, object>;
if (cDict == null)
{
cDict = new Dictionary<string, object>();
pDict[keys[0]] = cDict;
}
if (!cDict.Keys.Contains(keys[1]))
cDict[keys[1]] = null;
if (keys.Length > 2)
{
var dDict = cDict[keys[1]] as Dictionary<string, object>;
if (dDict == null)
{
dDict = new Dictionary<string, object>();
cDict[keys[1]] = dDict;
}
if (!dDict.Keys.Contains(keys[2]))
dDict[keys[2]] = null;
if (keys.Length > 3)
{
var tList = new List<string>();
tList.Add(keys[3]);
if (dDict[keys[2]] == null)
dDict[keys[2]] = tList;
else
(dDict[keys[2]] as List<string>).AddRange(tList);
}
}
}
}
var str = AllBase.JsonHelper.SerializeObject(pDict);
//rules.rule_address = str.Replace("\"", "\\\"");
List<ProvinceInfo> areaInfos = new List<ProvinceInfo>();
foreach (var key in AreaNotSendDict.Keys)
{
var keys = key.Trim('p').Split('c', 'd', 't');
ProvinceInfo pInfo = areaInfos.FirstOrDefault(p => p.id == keys[0]);
if (pInfo == null)
{
pInfo = new ProvinceInfo() { id = keys[0] };
areaInfos.Add(pInfo);
}
if (keys.Length > 1)
{
if (pInfo.children == null)
pInfo.children = new List<ProvinceInfo>();
var cInfo = pInfo.children.FirstOrDefault(c => c.id == keys[1]);
if (cInfo == null)
{
cInfo = new ProvinceInfo() { id = keys[1] };
pInfo.children.Add(cInfo);
}
if (keys.Length > 2)
{
if (cInfo.children == null)
cInfo.children = new List<ProvinceInfo>();
var dInfo = cInfo.children.FirstOrDefault(d => d.id == keys[2]);
if (dInfo == null)
{
dInfo = new ProvinceInfo() { id = keys[2] };
cInfo.children.Add(dInfo);
}
if (keys.Length > 3)
{
if (dInfo.children == null)
dInfo.children = new List<ProvinceInfo>();
var tInfo = dInfo.children.FirstOrDefault(t => t.id == keys[3]);
if (tInfo == null)
{
tInfo = new ProvinceInfo() { id = keys[3] };
dInfo.children.Add(tInfo);
}
}
}
}
}
rules.province_infos = areaInfos;
ruleList.Add(rules);
}
btnSearch.Enabled = false;
cancellationTokenSource = new CancellationTokenSource();
Task.Run(() =>
{
var lstShopIdTemp = new List<string>();
lstShopIdTemp.AddRange(lstShopId);
foreach (var shopId in lstShopIdTemp)
{
if (cancellationTokenSource.IsCancellationRequested)
break;
var shop = GlobalConfig.DouShopLoginList.FirstOrDefault(s => s.ShopAccountId == shopId);
if (shop == null)
continue;
if (ShopListForm.Instance == null)
ShopListForm.Instance = new ShopListForm();
ShopListForm.Instance.CheckShopLogin(new string[] { shop.ShopAccount }, false);
if (shop.LoginStatus != "登录成功")
{
Invoke(new Action(() =>
{
var row = this.dgvShop.Rows.Cast<DataGridViewRow>().FirstOrDefault(r => r.Cells["colShopId"].Value.ToString() == shop.ShopAccountId);
if (row != null)
{
row.Cells["colLoginStatus"].Value = "未登录";
row.Cells["colCanUse"].Value = false;
}
}));
continue;
}
FreightTemplateListForm templateListForm = null;
Invoke(new Action(() =>
{
var tab = this.ucTabControl1.TabPages.Cast<TabPage>().FirstOrDefault(t => t.Text == shop.ShopAccount && t.Name == "tab" + shop.ShopAccountId);
if (tab == null)
{
tab = new TabPage();
tab.Name = "tab" + shop.ShopAccountId;
tab.Text = shop.ShopAccount;
this.ucTabControl1.TabPages.Add(tab);
var freightTemplateListForm = new FreightTemplateListForm(shop);
//freightTemplateListForm.SeckillingAndLimitedSalesForm = this;
freightTemplateListForm.TopLevel = false;
freightTemplateListForm.Left = 0;
freightTemplateListForm.Top = 0;
freightTemplateListForm.FormBorderStyle = FormBorderStyle.None;
freightTemplateListForm.AutoSize = true;
freightTemplateListForm.Dock = DockStyle.Fill;
freightTemplateListForm.Show();
tab.Controls.Add(freightTemplateListForm);
templateListForm = freightTemplateListForm;
}
if (tab.Controls.Count > 0)
{
templateListForm = tab.Controls[0] as FreightTemplateListForm;
this.ucTabControl1.SelectedTab = tab;
}
}));
if (templateListForm != null)
{
templateListForm.AddTemplate(nameList, templateParam, ruleList);
}
}
Invoke(new Action(() =>
{
btnSearch.Enabled = true;
}));
}, cancellationTokenSource.Token);
}
private void btnStopAdd_Click(object sender, EventArgs e)
{
}
}
}
@@ -0,0 +1,138 @@
<?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="colSelect.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colShopId.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colLoginStatus.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colCanUse.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colMessage.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>
@@ -0,0 +1,233 @@

namespace LittleRabbit.LittleRabbitForms.ShopForms
{
partial class FreightTemplateListForm
{
/// <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()
{
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.dgvTemplate = new LittleRabbit.UserComponent.DataGridViewEx();
this.label1 = new System.Windows.Forms.Label();
this.statusBar = new LittleRabbit.UserControls.StatusBarUserControl();
this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.colTemplateId = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colTemplateName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colProvince = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colCity = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colTemplateType = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colCalculateType = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colFixedAmount = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colMessage = new System.Windows.Forms.DataGridViewTextBoxColumn();
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit();
this.splitContainer2.Panel1.SuspendLayout();
this.splitContainer2.Panel2.SuspendLayout();
this.splitContainer2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvTemplate)).BeginInit();
this.SuspendLayout();
//
// splitContainer2
//
this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
this.splitContainer2.Location = new System.Drawing.Point(0, 0);
this.splitContainer2.Name = "splitContainer2";
this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer2.Panel1
//
this.splitContainer2.Panel1.Controls.Add(this.dgvTemplate);
this.splitContainer2.Panel1.Padding = new System.Windows.Forms.Padding(4, 4, 4, 0);
//
// splitContainer2.Panel2
//
this.splitContainer2.Panel2.Controls.Add(this.label1);
this.splitContainer2.Panel2.Controls.Add(this.statusBar);
this.splitContainer2.Size = new System.Drawing.Size(800, 450);
this.splitContainer2.SplitterDistance = 420;
this.splitContainer2.TabIndex = 10;
//
// dgvProduct
//
this.dgvTemplate.AllowUserToAddRows = false;
this.dgvTemplate.AllowUserToDeleteRows = false;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvTemplate.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
this.dgvTemplate.BackgroundColor = System.Drawing.Color.White;
this.dgvTemplate.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvTemplate.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
this.dgvTemplate.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvTemplate.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colSelect,
this.colTemplateId,
this.colTemplateName,
this.colProvince,
this.colCity,
this.colTemplateType,
this.colCalculateType,
this.colFixedAmount,
this.colMessage});
this.dgvTemplate.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvTemplate.Location = new System.Drawing.Point(4, 4);
this.dgvTemplate.Name = "dgvProduct";
this.dgvTemplate.ReadOnly = true;
dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.dgvTemplate.RowsDefaultCellStyle = dataGridViewCellStyle3;
this.dgvTemplate.RowTemplate.Height = 23;
this.dgvTemplate.Size = new System.Drawing.Size(792, 416);
this.dgvTemplate.TabIndex = 6;
//
// label1
//
this.label1.AutoSize = true;
this.label1.ForeColor = System.Drawing.Color.MidnightBlue;
this.label1.Location = new System.Drawing.Point(656, 2);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(43, 17);
this.label1.TabIndex = 3;
this.label1.Text = "label1";
//
// statusBar
//
this.statusBar.BackColor = System.Drawing.Color.White;
this.statusBar.Dock = System.Windows.Forms.DockStyle.Fill;
this.statusBar.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.statusBar.Location = new System.Drawing.Point(0, 0);
this.statusBar.Margin = new System.Windows.Forms.Padding(0);
this.statusBar.Name = "statusBar";
this.statusBar.Size = new System.Drawing.Size(800, 26);
this.statusBar.TabIndex = 2;
//
// colSelect
//
this.colSelect.FillWeight = 50F;
this.colSelect.HeaderText = "选";
this.colSelect.Name = "colSelect";
this.colSelect.ReadOnly = true;
this.colSelect.Resizable = System.Windows.Forms.DataGridViewTriState.False;
this.colSelect.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colSelect.Width = 41;
//
// colTemplateId
//
this.colTemplateId.HeaderText = "模板Id";
this.colTemplateId.Name = "colTemplateId";
this.colTemplateId.ReadOnly = true;
this.colTemplateId.Width = 150;
//
// colTemplateName
//
this.colTemplateName.HeaderText = "模板名称";
this.colTemplateName.Name = "colTemplateName";
this.colTemplateName.ReadOnly = true;
this.colTemplateName.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colTemplateName.Width = 250;
//
// colProvince
//
this.colProvince.HeaderText = "发货省份";
this.colProvince.Name = "colProvince";
this.colProvince.ReadOnly = true;
this.colProvince.Width = 80;
//
// colCity
//
this.colCity.HeaderText = "发货城市";
this.colCity.Name = "colCity";
this.colCity.ReadOnly = true;
this.colCity.Width = 80;
//
// colTemplateType
//
this.colTemplateType.HeaderText = "模板类型";
this.colTemplateType.Name = "colTemplateType";
this.colTemplateType.ReadOnly = true;
//
// colCalculateType
//
this.colCalculateType.HeaderText = "计价方式";
this.colCalculateType.Name = "colCalculateType";
this.colCalculateType.ReadOnly = true;
//
// colFixedAmount
//
this.colFixedAmount.HeaderText = "固定运费金额";
this.colFixedAmount.Name = "colFixedAmount";
this.colFixedAmount.ReadOnly = true;
this.colFixedAmount.Width = 120;
//
// colMessage
//
this.colMessage.HeaderText = "消息";
this.colMessage.Name = "colMessage";
this.colMessage.ReadOnly = true;
this.colMessage.Width = 300;
//
// FreightTemplateListForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.ClientSize = new System.Drawing.Size(800, 450);
this.Controls.Add(this.splitContainer2);
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Name = "FreightTemplateListForm";
this.Text = "FreightTemplateListForm";
this.splitContainer2.Panel1.ResumeLayout(false);
this.splitContainer2.Panel2.ResumeLayout(false);
this.splitContainer2.Panel2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
this.splitContainer2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dgvTemplate)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.SplitContainer splitContainer2;
private UserComponent.DataGridViewEx dgvTemplate;
private System.Windows.Forms.Label label1;
public UserControls.StatusBarUserControl statusBar;
private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect;
private System.Windows.Forms.DataGridViewTextBoxColumn colTemplateId;
private System.Windows.Forms.DataGridViewTextBoxColumn colTemplateName;
private System.Windows.Forms.DataGridViewTextBoxColumn colProvince;
private System.Windows.Forms.DataGridViewTextBoxColumn colCity;
private System.Windows.Forms.DataGridViewTextBoxColumn colTemplateType;
private System.Windows.Forms.DataGridViewTextBoxColumn colCalculateType;
private System.Windows.Forms.DataGridViewTextBoxColumn colFixedAmount;
private System.Windows.Forms.DataGridViewTextBoxColumn colMessage;
}
}
@@ -0,0 +1,159 @@
using AllBase;
using AllBase.Model.Param.OrderManage;
using AllBase.Model.Result;
using Newtonsoft.Json.Linq;
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 Work.DouyinApiClass;
namespace LittleRabbit.LittleRabbitForms.ShopForms
{
public partial class FreightTemplateListForm : Form
{
public DouShopLoginInfo Shop = null;
public List<FreightTemplateInfo> LstTemplate = new List<FreightTemplateInfo>();
public FreightTemplateListForm(DouShopLoginInfo shop = null)
{
InitializeComponent();
Shop = shop;
}
public void GetTemplate(string text = null)
{
if (Shop != null)
{
int total = 0;
int page = 0;
this.LstTemplate.Clear();
Invoke(new Action(() => { this.dgvTemplate.Rows.Clear(); }));
while (true)
{
DouyinApi api = new DouyinApi(Shop);
api.JsonData["page"] = page.ToString();
if (!string.IsNullOrEmpty(text))
api.JsonData["name"] = text;
var result = api.GetFreightTemplateListByBuyApi();
for (int i = 0; i < 10 && !result.Contains("\"code\":10000"); i++)
{
Thread.Sleep(100);
result = api.GetFreightTemplateListByBuyApi();
}
total = BaseRegex.GetIntJson(ref result, "Count");
JObject JObj = JObject.Parse(result);
var listStr = JObj["data"]?["List"]?.ToString();
if (!string.IsNullOrEmpty(listStr))
{
var templateList = JsonHelper.DeserializeJsonToList<FreightTemplateInfo>(listStr);
this.LstTemplate.AddRange(templateList);
foreach (var t in templateList)
{
Invoke(new Action(() =>
{
string province = t.template.product_province;
string city = t.template.product_city;
var area = FreightTemplateForm.GetAddress(t.template.product_province);
if (area != null)
{
province = area.name;
city = area.sub_districts.FirstOrDefault(a => a.code.ToString() == t.template.product_city)?.name;
}
string ruleType = "";
if (t.template.rule_type == 0)
ruleType = "阶梯计价";
if (t.template.rule_type == 1)
ruleType = "固定运费";
if (t.template.rule_type == 2)
ruleType = "卖家包邮";
if (t.template.rule_type == 3)
ruleType = "货到付款";
string calculateType = "";
if (t.template.rule_type == 0 && t.template.calculate_type == 1)
calculateType = "按重量计价";
if (t.template.rule_type == 0 && t.template.calculate_type == 2)
calculateType = "按数量计价";
var fixedAmount = "";
if (t.template.fixed_amount > 0)
fixedAmount = (t.template.fixed_amount / 100m).ToString();
if (t.template.id == 0)
this.dgvTemplate.Rows.Add(false, t.template.id, "默认模板", "全国", "", "", "", "全国包邮");
else
this.dgvTemplate.Rows.Add(false, t.template.id, t.template.template_name, province, city, ruleType, calculateType, fixedAmount);
}));
}
}
page++;
if (this.LstTemplate.Count >= total)
break;
}
}
}
public void AddTemplate(List<string> nameList, TemplateParam templateParam, List<TemplateRulesParam> ruleList)
{
foreach (var name in nameList)
{
TemplateParam temp = JsonHelper.DeserializeJsonToObject<TemplateParam>(JsonHelper.SerializeObject(templateParam));
temp.template_name = name;
DouyinApi api = new DouyinApi(Shop);
api.JsonData["template"] = JsonHelper.SerializeObject(temp).Replace("\\", "\\\\").Replace("\"", "\\\"");
api.JsonData["columns"] = JsonHelper.SerializeObject(ruleList).Replace("\\", "\\\\").Replace("\"", "\\\"");
var result = api.AddFreightTemplateListByBuyApi();
for (int i = 0; i < 5 && !result.Contains("\"code\":10000"); i++)
{
Thread.Sleep(100);
result = api.AddFreightTemplateListByBuyApi();
}
if (result.Contains("\"code\":10000"))
{
var tempId = BaseRegex.GetStringJson(ref result, "template_id");
Invoke(new Action(() =>
{
string province = temp.product_province.ToString();
string city = temp.product_city.ToString();
var area = FreightTemplateForm.GetAddress(temp.product_province.ToString());
if (area != null)
{
province = area.name;
city = area.sub_districts.FirstOrDefault(a => a.code.ToString() == temp.product_city.ToString())?.name;
}
string ruleType = "";
if (temp.rule_type == 0)
ruleType = "阶梯计价";
if (temp.rule_type == 1)
ruleType = "固定运费";
if (temp.rule_type == 2)
ruleType = "卖家包邮";
if (temp.rule_type == 3)
ruleType = "货到付款";
string calculateType = "";
if (temp.rule_type == 0 && temp.calculate_type == 1)
calculateType = "按重量计价";
if (temp.rule_type == 0 && temp.calculate_type == 2)
calculateType = "按数量计价";
var fixedAmount = "";
if (temp.fixed_amount > 0)
fixedAmount = (temp.fixed_amount / 100m).ToString();
this.dgvTemplate.Rows.Add(false, tempId, temp.template_name, province, city, ruleType, calculateType, fixedAmount, "添加成功");
}));
}
}
}
}
}
@@ -0,0 +1,147 @@
<?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="colSelect.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colTemplateId.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colTemplateName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colProvince.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colCity.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colTemplateType.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colCalculateType.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colFixedAmount.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colMessage.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>
@@ -0,0 +1,135 @@

namespace LittleRabbit.LittleRabbitForms.ShopForms
{
partial class FreightTemplateNameForm
{
/// <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()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FreightTemplateNameForm));
this.panel2 = new System.Windows.Forms.Panel();
this.labelX1 = new DevComponents.DotNetBar.LabelX();
this.textBoxX1 = new DevComponents.DotNetBar.Controls.TextBoxX();
this.btnSave = new DevComponents.DotNetBar.PanelEx();
this.panel2.SuspendLayout();
this.SuspendLayout();
//
// panel2
//
this.panel2.BackColor = System.Drawing.Color.White;
this.panel2.Controls.Add(this.labelX1);
this.panel2.Controls.Add(this.textBoxX1);
this.panel2.Controls.Add(this.btnSave);
this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel2.Location = new System.Drawing.Point(1, 33);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(383, 416);
this.panel2.TabIndex = 2;
//
// labelX1
//
this.labelX1.AutoSize = true;
//
//
//
this.labelX1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.labelX1.ForeColor = System.Drawing.Color.Gray;
this.labelX1.Location = new System.Drawing.Point(16, 11);
this.labelX1.Name = "labelX1";
this.labelX1.Size = new System.Drawing.Size(229, 18);
this.labelX1.TabIndex = 462;
this.labelX1.Text = "请输入自定义运费模板名称,一行一个:";
//
// textBoxX1
//
this.textBoxX1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
//
//
//
this.textBoxX1.Border.Class = "TextBoxBorder";
this.textBoxX1.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.textBoxX1.Location = new System.Drawing.Point(16, 35);
this.textBoxX1.Multiline = true;
this.textBoxX1.Name = "textBoxX1";
this.textBoxX1.PreventEnterBeep = true;
this.textBoxX1.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.textBoxX1.Size = new System.Drawing.Size(351, 338);
this.textBoxX1.TabIndex = 461;
//
// btnSave
//
this.btnSave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnSave.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnSave.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnSave.DisabledBackColor = System.Drawing.Color.Empty;
this.btnSave.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSave.Location = new System.Drawing.Point(309, 379);
this.btnSave.Name = "btnSave";
this.btnSave.Size = new System.Drawing.Size(58, 23);
this.btnSave.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnSave.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnSave.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnSave.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnSave.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnSave.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnSave.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnSave.Style.GradientAngle = 90;
this.btnSave.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnSave.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnSave.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnSave.TabIndex = 460;
this.btnSave.Text = "保存";
this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
//
// FreightTemplateNameForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(385, 450);
this.Controls.Add(this.panel2);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "FreightTemplateNameForm";
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
this.Text = "自定义运费模板名称";
this.TitleText = "自定义运费模板名称";
this.Load += new System.EventHandler(this.FreightTemplateNameForm_Load);
this.Controls.SetChildIndex(this.panel2, 0);
this.panel2.ResumeLayout(false);
this.panel2.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Panel panel2;
private DevComponents.DotNetBar.LabelX labelX1;
private DevComponents.DotNetBar.Controls.TextBoxX textBoxX1;
private DevComponents.DotNetBar.PanelEx btnSave;
}
}
@@ -0,0 +1,32 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace LittleRabbit.LittleRabbitForms.ShopForms
{
public partial class FreightTemplateNameForm : BaseForms.LRBaseForm
{
public FreightTemplateNameForm()
{
InitializeComponent();
}
private void FreightTemplateNameForm_Load(object sender, EventArgs e)
{
this.textBoxX1.Text = string.Join("\r\n", FreightTemplateForm.CustomFreightTemplateNames) + "\r\n";
}
private void btnSave_Click(object sender, EventArgs e)
{
FreightTemplateForm.CustomFreightTemplateNames = this.textBoxX1.Text.Trim().Split(new string[] { "\r", "\n" }, StringSplitOptions.RemoveEmptyEntries).ToList();
NaiBa.Util.Helper.ConfigHelper.SaveConfig<List<string>>("freight_template_custom_names", FreightTemplateForm.CustomFreightTemplateNames);
this.Close();
}
}
}
@@ -0,0 +1,298 @@
<?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>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAgIAQcwAAAABoKAAAFgAAACgAAACAAAAAAAEAAAEABAAAAAAAACgAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAACAAACAAAAAgIAAgAAAAIAAgACAgAAAgICAAMDAwAAAAP8AAP8AAAD//wD/AAAA/wD/AP//
AAD///8AAAAAAAAAAAAAAAAABEZmbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMZmZkQAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAZszMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM
zMxmAAAAAAAAAAAAAAAAAAAAAAAAAAAEbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM
zMzMzMzMzMZAAAAAAAAAAAAAAAAAAAAAAAAEbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM
zMzMzMzMzMzMzMzMxkAAAAAAAAAAAAAAAAAAAAAEbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM
zMzMzMzMzMzMzMzMzMzMzMzGQAAAAAAAAAAAAAAAAAAAbMzMzMzMzMzMzMzMzMzMzMzMzMd3d3d3d3d3
d3d3fMzMzMzMzMzMzMzMzMzMzMzMzMYAAAAAAAAAAAAAAAAARszMzMzMzMzMzMzMzMzMzMd3d3iIiIiI
iIiIiIiIiIh3d3d8zMzMzMzMzMzMzMzMzMzMZAAAAAAAAAAAAAAABszMzMzMzMzMzMzMzMzMx3eIiIiI
iIiIiIiIiIiIiIiIiIiIiHd8zMzMzMzMzMzMzMzMzMxgAAAAAAAAAAAAAGzMzMzMzMzMzMzMzMzMd4iI
iIiIiIiIiIiIiIiIiIiIiIiIiIiIiHfMzMzMzMzMzMzMzMzMxgAAAAAAAAAAAAbMzMzMzMzMzMzMzMzH
eIiIiIiIiIiHZmZmZmZmZmZmZ3eIiIiIiIiIiHzMzMzMzMzMzMzMzMxgAAAAAAAAAABszMzMzMzMzMzM
zMzHiIiIiIiHZmZmZmZmZmZmZmZmZmZmZmZmeIiIiIiIfMzMzMzMzMzMzMzMxgAAAAAAAAAGzMzMzMzM
zMzMzMzHiIiIiIdmZmZmZgAAAAAAAAAAAAZmZmZmZmZmeIiIiIh8zMzMzMzMzMzMzMxgAAAAAAAATMzM
zMzMzMzMzMzHiIiIiHZmZgAAAAAAAAAAAAEAAAAAAAAAAGZmZmZniIiIiHzMzMzMzMzMzMzMxAAAAAAA
AGzMzMzMzMzMzMzMeIiIiGZmAAAAAAERERmZmZmZmZmZkRERERAAAGZmZmZ4iIiIfMzMzMzMzMzMzMYA
AAAAAAbMzMzMzMzMzMzMeIiIiGZgAAAAERmZmZmZmZmZmZmZmZmZmZmZkREAAGZmZniIiIfMzMzMzMzM
zMzMYAAAAABMzMzMzMzMzMzMzIiIiHYAAAARGZmZiIiIj///////+IiIiIeZmZmZkREAZmZmiIiIfMzM
zMzMzMzMzMQAAAAAbMzMzMzMzMzMzO6IiIYAAAARmYiI/////////////////////4iHmZmZEQBmZmeI
iIh8zMzMzMzMzMzGAAAABMzMzMzMzMzMzMeIiIdgAAAZmI////////////////////////////iJmZmR
EGZmZ4iIh8zMzMzMzMzMzEAAAAbMzMzMzMzMzMzoiIhwAAAZeP//////////////////////////////
/4iZmZEAZmZ4iIh8zMzMzMzMzMxgAABMzMzMzMzMzMzOiIiGAAABiP//////////////////////////
////////+JmZkQZmZ4iIh8zMzMzMzMzMxAAAbMzMzMzMzMzM7oiIYAABeP//////////////////////
///////////////4mZkQZmZ4iIjMzMzMzMzMzMYAAMzMzMzMzMzMzu6IhwAAGP//////////////////
/////////////////////4iZmRZmZ4iIfMzMzMzMzMzMAAbMzMzMzMzMzM7oiHAAB4//////////////
////////////////////////////iZmRBmZ4iIfMzMzMzMzMzGAGzMzMzMzMzMzuiIcAAHj/////////
//////////////////////////////////iZmRZmZ4iIzMzMzMzMzMxgDMzMzMzMzMzM7ohwAAf/////
////////////////////////////////////////95mRZmaIiHzMzMzMzMzMwEzMzMzMzMzMzuiIEABo
//////////////////////////////////////////////95mRZmaIiMzMzMzMzMzMRszMzMzMzMzM7o
hwAGj///////////////////////////////////////////////95kQZmeIh8zMzMzMzMzGbMzMzMzM
zMzu6HEAB/////////////////////////////////////////////////+ZkQZmiIjMzMzMzMzMxmzM
zMzMzMzM7ohwAGj/////////////////////////////////////////////////iZkWZniIfMzMzMzM
zMZszMzMzMzMxu6HEAbv/4iI/////////////////////////////////////////4iP//iZEGZoiHzM
zMzMzMzGbMzMzMzMzM7uhxAGj/iIiIj//////////////////////////////////////4iIiI//mZFm
aIiMzMzMzMzMxszMzMzMzMzO6IEAbv+IiIiIj/////////////////////////////////////iIiIiP
/4mRBmeIh8zMzMzMzMbMzMzMzMzMbuhxAG7/iIiIiI////////////////iIj///j//////////////4
iIiIiP/5mQZmiIfMzMzMzMzMzMzMzMzMzO7ocQDo+IiIiIiP///////////////u7u7u7u7o////////
////iIiIiIj/+JkWZoiHzMzMzMzMzMzMzMzMzMzu6BEG7/iIiIiIj/////////////+Hd3ju5maO7v//
/////////4iIiIiI//iZEGaIh8zMzMzMzMzMzMzMzMzM7ugRBu//iIiIiI//////////////kZmZdmAZ
mP/////////////4iIiIiP//mRBmeIjMzMzMzMzMzMzMzMzMzO7nEAbv/4iIiIiP////////////+HiI
mZEBd5n/////////////+IiIiIj//4mQZniIzMzMzMzMzMzMzMzMzMzu5xAO7//4iIiI//ju7o//////
//j//4mZeP/4//////////////iIiIiP//+JkGZ4iHzMzMzMzMzMzMzMzMzG7ocQDu///4iI//ju7u7u
j//////////4mP//////////////7u7uiIiI////iZBmaIh8zMzMzMzMzMzMzMzMzu6HEG7v//////+G
ZmZ47u7//////////4//////////////7u7u7u6P/////4mQBmiIfMzMzMzMzMzMzMzMzM7uhRBu7///
///3AAAAF37u7///////////////////////h2AABm7u7v/////5kAZ4iHzMzMzMzMzMzMzMzMzO7oUQ
bu//////gQAAZgEG7u//////////////////////+BAAAAAFfu6P////+ZAGeIjMzMzMzMzMzMzMzMzM
zu6FEG7v////+JEAAXhwAG7o/////////////////////4gAABEGARbu7/////kQBoiIzMzMzMzMzMzM
zMzMzM7uhRBu7/////iZABmZkQBm6P////////////////////+JABGZF2AAbo////+JEGaIiMzMzMzM
zMzMzMzMzMzO7ucRbu/////4mRZ4iZkQBu//////////////////////mQB5mZdgAG7/////iRBmiIfM
zMzMzMzMzMzMzMzMxu7nEQ7v////+Bl+j/iZEAaP/////////////////////5l2/4mRAABu/////4kQ
ZoiHzMzMzMzMzMzMzMzMzMzu5xEO6P//+Phgbu/4kQAI//////////////////////+Zfo/4kQAAeIiP
//+JEGaIh8zMzMzMzMzMzMzMzMzM7ucRBu7///iOYHiI+HAAf///////////////////////mYjv+BAA
BuiIj///iQBniIfMzMzMzMzMzMzMzMzMzO7nEQbu///3EAAG6IcRF4iP/////////////////////4GP
/4cQAAZnbv///5EAaIiMzMzMzMzMzMzMzMzMzMzu5xEW7v//iRF3dmZgAXjmj///////////////////
///3ePiBEQAHdm7///iRAGiIfMzMzMzMzMzMzMzMzMzM7u5xFu6P/5EZmXZmZmbmaP//////////////
///////4/4d2cRAAFwbuj//4kQZoiHzMzMzMzMzMzMzMzMzMzG7ucRDu7/iXiZkQAAZmAH//////////
////////////+IiIdmYABmAX//j/+BAGeIh8zMzMzMzMzMzMzMzMzMzO7nEQbu/4iP+BERkREZf/////
//////////////////+JmXdxEBEAB3////kQBoiIzMzMzMzMzMzMzMzMzMzMzu5xEW7o+P//gZmZmZmP
////////////////////////+JmZmZmZl453//+JAGaIh8zMzMzMzMzMzMzMzMzMzM7u5xEO7vj/+IeP
iIj////////////////////////////4iZmZmZiPiP//cQBoiIfMzMzMzMzMzMzMzMzMzMzM7ucRFu6P
//iP//////////////////////////////////////+Jn/j/+JAAaIiMzMzMzMzMzMzMzMzMzMzMzO7n
ERbu7//4/////////////////////////////////////////4j///gQBoiIfMzMzMzMzMzMzMzMzMzM
zMzu7nERbuj////////////////////////////////////////////4//+BAAaIiMzMzMzMzMzMzMzM
zMzMzMzMzu5xEW7u////////////////////////////////////////////////cQBoiIfMzMzMzMzM
zMzMzMzMzMzMzM7u5xEW7u//////////////////////////////////////////////+BAAaIiMzMzM
zMzMzMzMzMzMzMzMzMzO7uYREO7o//7v//////////////////////////////////////////cABoiI
fMzMzMzMzMzMzMzMzMzMzMzMzO7ucRFu7oj/7o////////////////////////////////////////9x
AAeIiMzMzMzMzMzMzMzMzMzMzMzMzMzO7ucRFu7nePju7u7v////////////////////////////////
6P/4EAB4iIfMzMzMzMzMzMzMzMzMzMzMzMzMzu7nERBu7nmIiO7oj///////////////////////////
ju7u7o//hwAGiIh8zMzMzMzMzMzMzMzMzMzMzMzMzMzu7nERbu7nmZl5eP//////////////////////
///4iPiO5nj/+HAAaIiIzMzMzMzMzMzMzMzMzMzMzMzMzMzM7u7nERbu7oiZeI//////////////////
////////+ImXd5mP/4cAAHiIh8zMzMzMzMzMzMzMzMzMzMzMzMzMzM7u53ERbu7v////////////////
///////////////4iZl4//hgAAeIiHzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM7u53ERBu7v//////////
//////////////////////////+GAAB4iI7MzMzMzMzMzMzMzMzMzMzMzMzMzMzMzO7uiHEADujv////
///////////////////////////////3AAAGiIh8zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzO7ohwABmP
////////////////////////////////////iREAZniIjMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzuiI
EAB4f///////////////////////////////////+JmZkWZoiIfMzMzMzMzMzMzMzMzMzMzMzMzMzMzM
zO6IhwBo//////////////////////////////////////iImZl2ZoiIzMzMzMzMzMzMzMzMzMzMzMzM
zMzMzMzuiHAA7////////////////////////////////////////4iZFmZ4iHzMzMzMzMzMzMzMzMzM
zMzMzMzMzMzO6IgQBo/////4j///////////////////////////////////mZFmaIiMzMzMzMzMzMzM
zMzMzMzMzMzMzMzMzuiHAA7/////iIiP//////7o//////////////////iI/////4mRZmeIh8zMzMzM
zMzMzMzMzMzMzMzMzMzMzO6IcQBo////+IiIiI/////+7u7u7uiIiI7u7v////iIiI/////5mRZmiIjM
zMzMzMzMzMzMzMzMzMzMzMzMzMzuiHAA7////4iIiIiIj//3d2bu7u7u7u7u7u7//4iIiIiP////+JkW
ZniIfMzMzMzMzMzMzMzMzMzMzMzMzMzO6IcQBo////+IiIiIiI//+ZkAAGZmZmZmZmbv//iIiIiIiP//
//+ZkWZoiIzMzMzMzMzMzMzMzMzMzMzMzMzMzuiFAG7////4iIiIiIj///iZABEREREREBAG7//4iIiI
iIj/////iZFmaIiMzMzMzMzMzMzMzMzMzMzMzMzMzO6IcQBo////+IiIiIiI///4kQARERERERERDo//
+IiIiIiIj/////mZBmeIh8zMzMzMzMzMzMzMzMzMzMzMzMzuiHAG7////4iIiIiIiP//+JFmeHd3d3dx
EW6P//iIiIiIiI/////4mRZmiIfMzMzMzMzMzMzMzMzMzMzMzMzO7ocQBo////+IiIiIiIj///iQZoiO
7u7u5xFu7//4iIiIiIiI////+JkWZniIzMzMzMzMzMzMzMzMzMzMzMzMzuiHEA7////4iIiIiIiP///5
kGaIju7u7ucRbu///4iIiIiIiP////95kGZ4iHzMzMzMzMzMzMzMzMzMzMzMzM7ogQBu////+IiIiIiI
j///+RBmiI7u7u7nEW7v//+IiIiIiIiP////iZFmaIh8zMzMzMzMzMzMzMzMzMzMzMzu6HEAaP////iI
iIiIiI////kQZoiHzMzu5xEO6P//iIiIiIiIj////4mRZmiIjMzMzMzMzMzMzMzMzMzMzMzM7ugRBu//
///4iIiIiIj///+JEGaIh8zM7ucRBu7//4iIiIiIiI/////5kQZniIzMzMzMzMzMzMzMzMzMzMzMzO6I
EAbv////iIiIiIiI////iQBniIzMzO7oERbu///4iIiIiIiP////+JkGZ4iHzMzMzMzMzMzMzMzMzMzM
zMbuhxAGj////4iIiIiIj////3kAaIiMzMzu7nEW7v//+IiIiIiIiP////iZFmaIh8zMzMzMzMzMzMzM
zMzMzMzO7oUQbv////+IiIiIiI////+RBmiIfMzMzu5xFu6P//+IiIiIiIj////4mRZmiIfMzMzMzMzM
zMzMzMzMzMzMzu6BAG7////4iIiIiIj////4kQZoiHzMzM7ucRDu7///iIiIiIiIj////5kQZoiHzMzM
zMzMzMzMzMzMzMzMzM7ocQBu////+IiIiIiI////+JAGeIh8zMzO7nERbu///4iIiIiIiI////95EGaI
h8zMzMzMzMzMzMzMzMzMzMxu6HEA7v////iIiIiIiP////cQBoiIzMzMzu7lEW7v///4iIiIiIiP////
iRBmeIjMzMzMzMzMzMzMzMzMzMzM7uhxBuj////4iIiIiI/////5EAaIiMzMzMbu5xEO7v//+IiIiIiI
j////4kQZniIzMzMzMzMzMzMzMzMzMzMzO7oEQbv////+IiIiIj/////iQBmiIfMzMzM7ucRBu7///iI
iIiIiIj///+JkGZ4iMzMzMzMzMzMzMzMzMzMzMzu6BEG7/////iIiIiI/////4EAaIiHzMzMzO7nERbu
j///iIiIiIiI////iZBmaIh8zMzMzMzMzMzMzMzMzMzM7ucRBu/////4iIiIj/////+RAGiIjMzMzMzu
7nEQ7u////iIiIiIiP///4mQBmiIfMzMzMzMzMzMzMzMzMzMzO7nEAbv////+IiIiP/////4EAZ4iHzM
zMzMzu5xEG7v///4iIiIiIj///+JkAZoiHzMzMzMzMzMxmzMzMzMzMzu5xAO7/////+IiI//////+RAG
iIjMzMzMzM7ucRFu7v///4iIiIiI////+ZAGaIh8zMzMzMzMzMZszMzMzMzG7ocQDu//////+I//////
/4EAZoiIzMzMzMzO7ucRBu7////4iIiIiP////mQBmiIfMzMzMzMzMzGbMzMzMzMzu6HEA7v////////
//////9xAGiIh8zMzMzMzO7nERbu7///+IiIiI/////5kAZoiHzMzMzMzMzMxmzMzMzMzM7uhxAO7///
///////////4EABoiIzMzMzMzMzu7nEQbu////+IiIiP////+ZAGaIh8zMzMzMzMzMZszMzMzMzO7oUQ
Du//////////////9xAGiIh8zMzMzMzM7u5xEW7u/////4iI//////mQBmiIfMzMzMzMzMzGTMzMzMzM
zu6HEA7v/////////////4EABoiIzMzMzMzMzM7u5xEG7v/////////////5kAZoiHzMzMzMzMzMxAzM
zMzMzM7uhxEO7/////////////9wAGiIh8zMzMzMzMzO7ucRFu7v////////////+RAGeIh8zMzMzMzM
zMAGzMzMzMzO7ucRDuj////////////4EAB4iIzMzMzMzMzMzO7ucRBu6P///////////4kQBoiIzMzM
zMzMzMxgBszMzMzMxu7nEQbo////////////gQAGiIh8zMzMzMzMzMzu7nERDu7///////////+JEAaI
iMzMzMzMzMzMYADMzMzMzMzu5xEG7v///////////3EAZ4iIzMzMzMzMzMzMzu7nERbu7///////////
gQBmiIfMzMzMzMzMzAAAbMzMzMzM7ucRBu7///////////gQAGiIh8zMzMzMzMzMzM7u5xEQbu7/////
/////5EAZ4iHzMzMzMzMzMYAAEzMzMzMzO7nERDu7/////////+HAAaIiIzMzMzMzMzMzMzM7u5xEQ7u
7/////////gQAGiIjMzMzMzMzMzEAAAGzMzMzMzu7nEQbuj////////4cAAHiIh8zMzMzMzMzMzMzO7u
dxEW7uj////////3AAZoiHzMzMzMzMzMYAAABMzMzMzM7u5xEG7u////////hgAAeIiHzMzMzMzMzMzM
zMzO7ucREW7u7///////gQAGiIh8zMzMzMzMzEAAAABszMzMzM7ucREG7uj/////hmAAB4iI7MzMzMzM
zMzMzMzMzu7ucREG7u6P////+AAAB4iIzMzMzMzMzMYAAAAATMzMzMzO7ucREG7u7oiO7mAAAHiIiMzM
zMzMzMzMzMzMzMzu7ucREG7u7o//+HYAAHiIh8zMzMzMzMzEAAAAAAbMzMzMzu7nEREG7u7u5mAAAAeI
iIfMzMzMzMzMzMzMzMzMzu7ucREQbu7u7uYAAAeIiHzMzMzMzMzMYAAAAAAAbMzMzMzu7nEREAZmZgAA
AAF4iI58zMzMzMzMzMzMzMzMzMzu7ncREQZm7mZgAAB4iI7MzMzMzMzMxgAAAAAAAEzMzMzM7u7nEREQ
AAAAABF4iI7uzMzMzMzMzMzMzMzMzMzM7u7ucRERAAAAAAAHiIiMzMzMzMzMzMQAAAAAAAAGzMzMzM7u
7nERERERERF3iIju7MzMzMzMzMzMzMzMzMzMzM7u7udREREQAAAReIiIfMzMzMzMzMxgAAAAAAAAAGzM
zMzM7u7udRERERV4iI7u7MzMzMzMzMzMzMzMzMzMzMzM7u7u5xEREREReIiO7MzMzMzMzMzGAAAAAAAA
AAAGzMzMzM7u7u53d3eIiO7u7szMzMzMzMzMzMzMzMzMzMzMzM7u7u7nd1F3eIiO7uzMzMzMzMzMYAAA
AAAAAAAAAGzMzMzM7u7u7u7u7u7u7szMzMzMzMzMzMzMzMzMzMzMzMzMzu7u7u6IiI7u7uzMzMzMzMzM
xgAAAAAAAAAAAAAGzMzMzMzu7u7u7u7u5szMzMzMzMzMzMzMzMzMzMzMzMzMzMzO7u7u7u7u7u7MzMzM
zMzMzGAAAAAAAAAAAAAAAEbMzMzMzG7u7u7ubMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM7u7u7u7uzM
zMzMzMzMzGQAAAAAAAAAAAAAAAAAbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzG7u
7szMzMzMzMzMzMYAAAAAAAAAAAAAAAAAAARszMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM
zMzMzMzMzMzMzMzMzMZAAAAAAAAAAAAAAAAAAAAABGzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM
zMzMzMzMzMzMzMzMzMzMzMZAAAAAAAAAAAAAAAAAAAAAAAAEbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM
zMzMzMzMzMzMzMzMzMzMzMzMzMZAAAAAAAAAAAAAAAAAAAAAAAAAAABmzMzMzMzMzMzMzMzMzMzMzMzM
zMzMzMzMzMzMzMzMzMzMzMzMzMzMzGYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARGZmzMzMzMzMzMzMzM
zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMZmZEAAAAAAAAAAAAAAAAD////+AAAAAAAAAAD/////////AAAA
AAAAAAAAAP//////+AAAAAAAAAAAAAAf/////+AAAAAAAAAAAAAAB/////+AAAAAAAAAAAAAAAH////+
AAAAAAAAAAAAAAAAf////AAAAAAAAAAAAAAAAD////AAAAAAAAAAAAAAAAAP///gAAAAAAAAAAAAAAAA
B///wAAAAAAAAAAAAAAAAAP//4AAAAAAAAAAAAAAAAAB//8AAAAAAAAAAAAAAAAAAP/+AAAAAAAAAAAA
AAAAAAB//gAAAAAAAAAAAAAAAAAAf/wAAAAAAAAAAAAAAAAAAD/4AAAAAAAAAAAAAAAAAAAf+AAAAAAA
AAAAAAAAAAAAH/AAAAAAAAAAAAAAAAAAAA/wAAAAAAAAAAAAAAAAAAAP4AAAAAAAAAAAAAAAAAAAB+AA
AAAAAAAAAAAAAAAAAAfAAAAAAAAAAAAAAAAAAAADwAAAAAAAAAAAAAAAAAAAA8AAAAAAAAAAAAAAAAAA
AAOAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAA
AAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAABAAAAAAAA
AAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAA
AAGAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAA
AAAAAAABgAAAAAAAAAAAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAPAAAAAAAAAAAAAAAAAAAADwAAAAAAA
AAAAAAAAAAAAA+AAAAAAAAAAAAAAAAAAAAfgAAAAAAAAAAAAAAAAAAAH8AAAAAAAAAAAAAAAAAAAD/AA
AAAAAAAAAAAAAAAAAA/4AAAAAAAAAAAAAAAAAAAf+AAAAAAAAAAAAAAAAAAAH/wAAAAAAAAAAAAAAAAA
AD/+AAAAAAAAAAAAAAAAAAB//gAAAAAAAAAAAAAAAAAAf/8AAAAAAAAAAAAAAAAAAP//gAAAAAAAAAAA
AAAAAAH//8AAAAAAAAAAAAAAAAAD///gAAAAAAAAAAAAAAAAB///8AAAAAAAAAAAAAAAAA////wAAAAA
AAAAAAAAAAA////+AAAAAAAAAAAAAAAAf////4AAAAAAAAAAAAAAAf/////gAAAAAAAAAAAAAAf/////
+AAAAAAAAAAAAAAf//////8AAAAAAAAAAAAA/////////gAAAAAAAAAAf////w==
</value>
</data>
</root>
@@ -0,0 +1,232 @@

namespace LittleRabbit.LittleRabbitForms.ShopForms
{
partial class FreightTemplateNotSendAreaForm
{
/// <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()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FreightTemplateNotSendAreaForm));
this.panel2 = new System.Windows.Forms.Panel();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.advTree1 = new DevComponents.AdvTree.AdvTree();
this.nodeConnector1 = new DevComponents.AdvTree.NodeConnector();
this.elementStyle1 = new DevComponents.DotNetBar.ElementStyle();
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.textBox1 = new System.Windows.Forms.TextBox();
this.btnSave = new DevComponents.DotNetBar.PanelEx();
this.btnCancel = new DevComponents.DotNetBar.PanelEx();
this.panel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.advTree1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit();
this.splitContainer2.Panel1.SuspendLayout();
this.splitContainer2.Panel2.SuspendLayout();
this.splitContainer2.SuspendLayout();
this.SuspendLayout();
//
// panel2
//
this.panel2.BackColor = System.Drawing.Color.White;
this.panel2.Controls.Add(this.splitContainer1);
this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel2.Location = new System.Drawing.Point(1, 33);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(418, 666);
this.panel2.TabIndex = 1;
//
// splitContainer1
//
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.Name = "splitContainer1";
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.advTree1);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.splitContainer2);
this.splitContainer1.Size = new System.Drawing.Size(418, 666);
this.splitContainer1.SplitterDistance = 513;
this.splitContainer1.TabIndex = 1;
//
// advTree1
//
this.advTree1.AccessibleRole = System.Windows.Forms.AccessibleRole.Outline;
this.advTree1.BackColor = System.Drawing.SystemColors.Window;
//
//
//
this.advTree1.BackgroundStyle.Class = "TreeBorderKey";
this.advTree1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.advTree1.Dock = System.Windows.Forms.DockStyle.Fill;
this.advTree1.Location = new System.Drawing.Point(0, 0);
this.advTree1.Name = "advTree1";
this.advTree1.NodesConnector = this.nodeConnector1;
this.advTree1.NodeStyle = this.elementStyle1;
this.advTree1.PathSeparator = ";";
this.advTree1.Size = new System.Drawing.Size(418, 513);
this.advTree1.Styles.Add(this.elementStyle1);
this.advTree1.TabIndex = 0;
this.advTree1.Text = "advTree1";
//
// nodeConnector1
//
this.nodeConnector1.LineColor = System.Drawing.SystemColors.ControlText;
//
// elementStyle1
//
this.elementStyle1.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.elementStyle1.Name = "elementStyle1";
this.elementStyle1.TextColor = System.Drawing.SystemColors.ControlText;
//
// splitContainer2
//
this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer2.Location = new System.Drawing.Point(0, 0);
this.splitContainer2.Name = "splitContainer2";
this.splitContainer2.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer2.Panel1
//
this.splitContainer2.Panel1.Controls.Add(this.textBox1);
this.splitContainer2.Panel1.Padding = new System.Windows.Forms.Padding(4, 0, 4, 0);
//
// splitContainer2.Panel2
//
this.splitContainer2.Panel2.Controls.Add(this.btnSave);
this.splitContainer2.Panel2.Controls.Add(this.btnCancel);
this.splitContainer2.Size = new System.Drawing.Size(418, 149);
this.splitContainer2.SplitterDistance = 99;
this.splitContainer2.TabIndex = 694;
//
// textBox1
//
this.textBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.textBox1.Location = new System.Drawing.Point(4, 0);
this.textBox1.Multiline = true;
this.textBox1.Name = "textBox1";
this.textBox1.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.textBox1.Size = new System.Drawing.Size(410, 99);
this.textBox1.TabIndex = 0;
//
// btnSave
//
this.btnSave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnSave.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnSave.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnSave.DisabledBackColor = System.Drawing.Color.Empty;
this.btnSave.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnSave.Location = new System.Drawing.Point(266, 10);
this.btnSave.Name = "btnSave";
this.btnSave.Size = new System.Drawing.Size(60, 23);
this.btnSave.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnSave.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnSave.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnSave.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnSave.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnSave.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnSave.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnSave.Style.GradientAngle = 90;
this.btnSave.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnSave.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnSave.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnSave.TabIndex = 693;
this.btnSave.Text = "确定";
this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
//
// btnCancel
//
this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnCancel.CanvasColor = System.Drawing.SystemColors.Control;
this.btnCancel.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnCancel.DisabledBackColor = System.Drawing.Color.Empty;
this.btnCancel.Location = new System.Drawing.Point(332, 10);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(60, 23);
this.btnCancel.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnCancel.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
this.btnCancel.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
this.btnCancel.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
this.btnCancel.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnCancel.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
this.btnCancel.Style.GradientAngle = 90;
this.btnCancel.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center;
this.btnCancel.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnCancel.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnCancel.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnCancel.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White;
this.btnCancel.TabIndex = 692;
this.btnCancel.Text = "取消";
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
//
// FreightTemplateNotSendAreaForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.ClientSize = new System.Drawing.Size(420, 700);
this.Controls.Add(this.panel2);
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "FreightTemplateNotSendAreaForm";
this.Text = "选择限制下单区域";
this.TitleText = "选择限制下单区域";
this.Load += new System.EventHandler(this.FreightTemplateNotSendAreaForm_Load);
this.Controls.SetChildIndex(this.panel2, 0);
this.panel2.ResumeLayout(false);
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.advTree1)).EndInit();
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.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Panel panel2;
private DevComponents.AdvTree.AdvTree advTree1;
private DevComponents.AdvTree.NodeConnector nodeConnector1;
private DevComponents.DotNetBar.ElementStyle elementStyle1;
private System.Windows.Forms.SplitContainer splitContainer1;
private DevComponents.DotNetBar.PanelEx btnSave;
private DevComponents.DotNetBar.PanelEx btnCancel;
private System.Windows.Forms.SplitContainer splitContainer2;
private System.Windows.Forms.TextBox textBox1;
}
}
@@ -0,0 +1,255 @@
using DevComponents.AdvTree;
using NaiBa.Util.Helper;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace LittleRabbit.LittleRabbitForms.ShopForms
{
public partial class FreightTemplateNotSendAreaForm : BaseForms.LRBaseForm
{
public FreightTemplateNotSendAreaForm()
{
InitializeComponent();
}
private void FreightTemplateNotSendAreaForm_Load(object sender, EventArgs e)
{
textBox1.Text = string.Join("、", FreightTemplateForm.AreaNotSendDict.Values);
Task.Run(() =>
{
for (int i = 0; i < FreightTemplateForm.LstAddress.Count; i++)
{
var province = FreightTemplateForm.LstAddress[i];
if (province.sub_districts == null || province.sub_districts.Count == 0)
{
var provinceTemp = FreightTemplateForm.GetAddress(province.code.ToString());
if (provinceTemp == null)
return;
else
province = provinceTemp;
}
var nodeProvince = new Node() { Text = province.name, Name = "p" + province.code, CheckBoxThreeState = true, CheckBoxVisible = true };
if (FreightTemplateForm.AreaNotSendDict.Keys.Any(k => k.EndsWith(nodeProvince.Name)))
nodeProvince.CheckState = CheckState.Checked;
else if (FreightTemplateForm.AreaNotSendDict.Keys.Any(k => k.Contains(nodeProvince.Name)))
nodeProvince.CheckState = CheckState.Indeterminate;
this.advTree1.Nodes.Add(nodeProvince);
if (province.sub_districts != null && province.sub_districts.Count > 0)
{
foreach (var city in province.sub_districts)
{
var nodeCity = new Node() { Text = city.name, Name = "c" + city.code, CheckBoxThreeState = true, CheckBoxVisible = true };
if (nodeProvince.CheckState == CheckState.Checked)
nodeCity.CheckState = CheckState.Checked;
else if (FreightTemplateForm.AreaNotSendDict.Keys.Any(k => k.EndsWith(nodeCity.Name)))
nodeCity.CheckState = CheckState.Checked;
else if (FreightTemplateForm.AreaNotSendDict.Keys.Any(k => k.Contains(nodeCity.Name)))
nodeCity.CheckState = CheckState.Indeterminate;
nodeProvince.Nodes.Add(nodeCity);
if (city.sub_districts != null && city.sub_districts.Count > 0)
{
foreach (var district in city.sub_districts)
{
var nodeDistrict = new Node() { Text = district.name, Name = "d" + district.code, CheckBoxThreeState = true, CheckBoxVisible = true };
if (nodeCity.CheckState == CheckState.Checked)
nodeDistrict.CheckState = CheckState.Checked;
else if (FreightTemplateForm.AreaNotSendDict.Keys.Any(k => k.EndsWith(nodeDistrict.Name)))
nodeDistrict.CheckState = CheckState.Checked;
else if (FreightTemplateForm.AreaNotSendDict.Keys.Any(k => k.Contains(nodeDistrict.Name)))
nodeDistrict.CheckState = CheckState.Indeterminate;
nodeCity.Nodes.Add(nodeDistrict);
if (district.sub_districts != null && district.sub_districts.Count > 0)
{
foreach (var town in district.sub_districts)
{
var nodeTown = new Node() { Text = town.name, Name = "t" + town.code, CheckBoxThreeState = true, CheckBoxVisible = true };
if (nodeDistrict.CheckState == CheckState.Checked)
nodeTown.CheckState = CheckState.Checked;
else if (FreightTemplateForm.AreaNotSendDict.Keys.Any(k => k.EndsWith(nodeTown.Name)))
nodeTown.CheckState = CheckState.Checked;
nodeDistrict.Nodes.Add(nodeTown);
}
}
}
}
}
}
}
advTree1.AfterCheck += AdvTree1_AfterCheck;
});
}
private void AdvTree1_AfterCheck(object sender, AdvTreeCellEventArgs e)
{
this.advTree1.AfterCheck -= AdvTree1_AfterCheck;
var node = e.Cell.Parent;
if (node.CheckState == CheckState.Checked)
{
CheckAllChildNodes(node, true);
SelectParent(node);
}
else if (node.CheckState == CheckState.Unchecked)
{
CheckAllChildNodes(node, false);
CancelParent(node);
}
else
{
node.CheckState = CheckState.Unchecked;
CheckAllChildNodes(node, false);
CancelParent(node);
}
GetArea();
this.advTree1.AfterCheck += AdvTree1_AfterCheck;
}
#region 判断同级节点是否全部选中,从第一个节点开始
private bool IsAllChecked(Node tn)
{
if (tn.CheckState != CheckState.Checked)
{
return false;
}
if (tn.NextNode == null)
{
return true;
}
return IsAllChecked(tn.NextNode);
}
#endregion
#region 判断同级节点是否全未选中,从第一个节点开始
private bool IsAllUnChecked(Node tn)
{
if (tn.CheckState != CheckState.Unchecked)
{
return false;
}
if (tn.NextNode == null)
{
return true;
}
return IsAllUnChecked(tn.NextNode);
}
#endregion
#region 如果该节点选中,则其子节点全部选中,反之亦然
private void CheckAllChildNodes(Node tn, bool Checked)
{
if (tn.CheckState == CheckState.Checked || tn.CheckState == CheckState.Unchecked)
{
foreach (Node tnChild in tn.Nodes)
{
tnChild.CheckState = tn.CheckState;
if (tnChild.Nodes.Count > 0)
{
CheckAllChildNodes(tnChild, Checked);
}
}
}
}
#endregion
#region 如过该节点选中,则其父节点依次选中
private void SelectParent(Node tn)
{
if (tn.Parent != null)
{
if (tn.CheckState == CheckState.Indeterminate)
tn.Parent.CheckState = CheckState.Indeterminate;
else if (IsAllChecked(tn.Parent.Nodes[0]))
tn.Parent.CheckState = CheckState.Checked;
else
tn.Parent.CheckState = CheckState.Indeterminate;
SelectParent(tn.Parent);
}
}
#endregion
#region 如果该节点没有选中,且同级节点全未选中,则取消父节点
private void CancelParent(Node tn)
{
if (tn.Parent != null)
{
if (tn.CheckState == CheckState.Indeterminate)
tn.Parent.CheckState = CheckState.Indeterminate;
else if (IsAllUnChecked(tn.Parent.Nodes[0]))
tn.Parent.CheckState = CheckState.Unchecked;
else
tn.Parent.CheckState = CheckState.Indeterminate;
CancelParent(tn.Parent);
}
}
#endregion
private void btnCancel_Click(object sender, EventArgs e)
{
this.Close();
}
private void btnSave_Click(object sender, EventArgs e)
{
ConfigHelper.SaveConfig("not_send_address", FreightTemplateForm.AreaNotSendDict);
this.Close();
}
private void GetArea()
{
FreightTemplateForm.AreaNotSendDict.Clear();
foreach (Node provinceNode in this.advTree1.Nodes)
{
if (provinceNode.CheckState == CheckState.Checked)
{
FreightTemplateForm.AreaNotSendDict[provinceNode.Name] = provinceNode.Text;
}
else if (provinceNode.CheckState == CheckState.Indeterminate)
{
foreach (Node cityNode in provinceNode.Nodes)
{
if (cityNode.CheckState == CheckState.Checked)
{
FreightTemplateForm.AreaNotSendDict[provinceNode.Name + cityNode.Name] = provinceNode.Text + cityNode.Text;
}
else if (cityNode.CheckState == CheckState.Indeterminate)
{
foreach (Node districtNode in cityNode.Nodes)
{
if (districtNode.CheckState == CheckState.Checked)
{
FreightTemplateForm.AreaNotSendDict[provinceNode.Name + cityNode.Name + districtNode.Name] = provinceNode.Text + cityNode.Text + districtNode.Text;
}
else if (provinceNode.CheckState == CheckState.Indeterminate)
{
foreach (Node townNode in districtNode.Nodes)
{
if (townNode.CheckState == CheckState.Checked)
{
FreightTemplateForm.AreaNotSendDict[provinceNode.Name + cityNode.Name + districtNode.Name + townNode.Name] =
provinceNode.Text + cityNode.Text + districtNode.Text + townNode.Text;
}
}
}
}
}
}
}
}
textBox1.Text = string.Join("、", FreightTemplateForm.AreaNotSendDict.Values);
}
}
}
@@ -0,0 +1,298 @@
<?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>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAgIAQcwAAAABoKAAAFgAAACgAAACAAAAAAAEAAAEABAAAAAAAACgAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAACAAACAAAAAgIAAgAAAAIAAgACAgAAAgICAAMDAwAAAAP8AAP8AAAD//wD/AAAA/wD/AP//
AAD///8AAAAAAAAAAAAAAAAABEZmbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMZmZkQAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAZszMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM
zMxmAAAAAAAAAAAAAAAAAAAAAAAAAAAEbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM
zMzMzMzMzMZAAAAAAAAAAAAAAAAAAAAAAAAEbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM
zMzMzMzMzMzMzMzMxkAAAAAAAAAAAAAAAAAAAAAEbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM
zMzMzMzMzMzMzMzMzMzMzMzGQAAAAAAAAAAAAAAAAAAAbMzMzMzMzMzMzMzMzMzMzMzMzMd3d3d3d3d3
d3d3fMzMzMzMzMzMzMzMzMzMzMzMzMYAAAAAAAAAAAAAAAAARszMzMzMzMzMzMzMzMzMzMd3d3iIiIiI
iIiIiIiIiIh3d3d8zMzMzMzMzMzMzMzMzMzMZAAAAAAAAAAAAAAABszMzMzMzMzMzMzMzMzMx3eIiIiI
iIiIiIiIiIiIiIiIiIiIiHd8zMzMzMzMzMzMzMzMzMxgAAAAAAAAAAAAAGzMzMzMzMzMzMzMzMzMd4iI
iIiIiIiIiIiIiIiIiIiIiIiIiIiIiHfMzMzMzMzMzMzMzMzMxgAAAAAAAAAAAAbMzMzMzMzMzMzMzMzH
eIiIiIiIiIiHZmZmZmZmZmZmZ3eIiIiIiIiIiHzMzMzMzMzMzMzMzMxgAAAAAAAAAABszMzMzMzMzMzM
zMzHiIiIiIiHZmZmZmZmZmZmZmZmZmZmZmZmeIiIiIiIfMzMzMzMzMzMzMzMxgAAAAAAAAAGzMzMzMzM
zMzMzMzHiIiIiIdmZmZmZgAAAAAAAAAAAAZmZmZmZmZmeIiIiIh8zMzMzMzMzMzMzMxgAAAAAAAATMzM
zMzMzMzMzMzHiIiIiHZmZgAAAAAAAAAAAAEAAAAAAAAAAGZmZmZniIiIiHzMzMzMzMzMzMzMxAAAAAAA
AGzMzMzMzMzMzMzMeIiIiGZmAAAAAAERERmZmZmZmZmZkRERERAAAGZmZmZ4iIiIfMzMzMzMzMzMzMYA
AAAAAAbMzMzMzMzMzMzMeIiIiGZgAAAAERmZmZmZmZmZmZmZmZmZmZmZkREAAGZmZniIiIfMzMzMzMzM
zMzMYAAAAABMzMzMzMzMzMzMzIiIiHYAAAARGZmZiIiIj///////+IiIiIeZmZmZkREAZmZmiIiIfMzM
zMzMzMzMzMQAAAAAbMzMzMzMzMzMzO6IiIYAAAARmYiI/////////////////////4iHmZmZEQBmZmeI
iIh8zMzMzMzMzMzGAAAABMzMzMzMzMzMzMeIiIdgAAAZmI////////////////////////////iJmZmR
EGZmZ4iIh8zMzMzMzMzMzEAAAAbMzMzMzMzMzMzoiIhwAAAZeP//////////////////////////////
/4iZmZEAZmZ4iIh8zMzMzMzMzMxgAABMzMzMzMzMzMzOiIiGAAABiP//////////////////////////
////////+JmZkQZmZ4iIh8zMzMzMzMzMxAAAbMzMzMzMzMzM7oiIYAABeP//////////////////////
///////////////4mZkQZmZ4iIjMzMzMzMzMzMYAAMzMzMzMzMzMzu6IhwAAGP//////////////////
/////////////////////4iZmRZmZ4iIfMzMzMzMzMzMAAbMzMzMzMzMzM7oiHAAB4//////////////
////////////////////////////iZmRBmZ4iIfMzMzMzMzMzGAGzMzMzMzMzMzuiIcAAHj/////////
//////////////////////////////////iZmRZmZ4iIzMzMzMzMzMxgDMzMzMzMzMzM7ohwAAf/////
////////////////////////////////////////95mRZmaIiHzMzMzMzMzMwEzMzMzMzMzMzuiIEABo
//////////////////////////////////////////////95mRZmaIiMzMzMzMzMzMRszMzMzMzMzM7o
hwAGj///////////////////////////////////////////////95kQZmeIh8zMzMzMzMzGbMzMzMzM
zMzu6HEAB/////////////////////////////////////////////////+ZkQZmiIjMzMzMzMzMxmzM
zMzMzMzM7ohwAGj/////////////////////////////////////////////////iZkWZniIfMzMzMzM
zMZszMzMzMzMxu6HEAbv/4iI/////////////////////////////////////////4iP//iZEGZoiHzM
zMzMzMzGbMzMzMzMzM7uhxAGj/iIiIj//////////////////////////////////////4iIiI//mZFm
aIiMzMzMzMzMxszMzMzMzMzO6IEAbv+IiIiIj/////////////////////////////////////iIiIiP
/4mRBmeIh8zMzMzMzMbMzMzMzMzMbuhxAG7/iIiIiI////////////////iIj///j//////////////4
iIiIiP/5mQZmiIfMzMzMzMzMzMzMzMzMzO7ocQDo+IiIiIiP///////////////u7u7u7u7o////////
////iIiIiIj/+JkWZoiHzMzMzMzMzMzMzMzMzMzu6BEG7/iIiIiIj/////////////+Hd3ju5maO7v//
/////////4iIiIiI//iZEGaIh8zMzMzMzMzMzMzMzMzM7ugRBu//iIiIiI//////////////kZmZdmAZ
mP/////////////4iIiIiP//mRBmeIjMzMzMzMzMzMzMzMzMzO7nEAbv/4iIiIiP////////////+HiI
mZEBd5n/////////////+IiIiIj//4mQZniIzMzMzMzMzMzMzMzMzMzu5xAO7//4iIiI//ju7o//////
//j//4mZeP/4//////////////iIiIiP//+JkGZ4iHzMzMzMzMzMzMzMzMzG7ocQDu///4iI//ju7u7u
j//////////4mP//////////////7u7uiIiI////iZBmaIh8zMzMzMzMzMzMzMzMzu6HEG7v//////+G
ZmZ47u7//////////4//////////////7u7u7u6P/////4mQBmiIfMzMzMzMzMzMzMzMzM7uhRBu7///
///3AAAAF37u7///////////////////////h2AABm7u7v/////5kAZ4iHzMzMzMzMzMzMzMzMzO7oUQ
bu//////gQAAZgEG7u//////////////////////+BAAAAAFfu6P////+ZAGeIjMzMzMzMzMzMzMzMzM
zu6FEG7v////+JEAAXhwAG7o/////////////////////4gAABEGARbu7/////kQBoiIzMzMzMzMzMzM
zMzMzM7uhRBu7/////iZABmZkQBm6P////////////////////+JABGZF2AAbo////+JEGaIiMzMzMzM
zMzMzMzMzMzO7ucRbu/////4mRZ4iZkQBu//////////////////////mQB5mZdgAG7/////iRBmiIfM
zMzMzMzMzMzMzMzMxu7nEQ7v////+Bl+j/iZEAaP/////////////////////5l2/4mRAABu/////4kQ
ZoiHzMzMzMzMzMzMzMzMzMzu5xEO6P//+Phgbu/4kQAI//////////////////////+Zfo/4kQAAeIiP
//+JEGaIh8zMzMzMzMzMzMzMzMzM7ucRBu7///iOYHiI+HAAf///////////////////////mYjv+BAA
BuiIj///iQBniIfMzMzMzMzMzMzMzMzMzO7nEQbu///3EAAG6IcRF4iP/////////////////////4GP
/4cQAAZnbv///5EAaIiMzMzMzMzMzMzMzMzMzMzu5xEW7v//iRF3dmZgAXjmj///////////////////
///3ePiBEQAHdm7///iRAGiIfMzMzMzMzMzMzMzMzMzM7u5xFu6P/5EZmXZmZmbmaP//////////////
///////4/4d2cRAAFwbuj//4kQZoiHzMzMzMzMzMzMzMzMzMzG7ucRDu7/iXiZkQAAZmAH//////////
////////////+IiIdmYABmAX//j/+BAGeIh8zMzMzMzMzMzMzMzMzMzO7nEQbu/4iP+BERkREZf/////
//////////////////+JmXdxEBEAB3////kQBoiIzMzMzMzMzMzMzMzMzMzMzu5xEW7o+P//gZmZmZmP
////////////////////////+JmZmZmZl453//+JAGaIh8zMzMzMzMzMzMzMzMzMzM7u5xEO7vj/+IeP
iIj////////////////////////////4iZmZmZiPiP//cQBoiIfMzMzMzMzMzMzMzMzMzMzM7ucRFu6P
//iP//////////////////////////////////////+Jn/j/+JAAaIiMzMzMzMzMzMzMzMzMzMzMzO7n
ERbu7//4/////////////////////////////////////////4j///gQBoiIfMzMzMzMzMzMzMzMzMzM
zMzu7nERbuj////////////////////////////////////////////4//+BAAaIiMzMzMzMzMzMzMzM
zMzMzMzMzu5xEW7u////////////////////////////////////////////////cQBoiIfMzMzMzMzM
zMzMzMzMzMzMzM7u5xEW7u//////////////////////////////////////////////+BAAaIiMzMzM
zMzMzMzMzMzMzMzMzMzO7uYREO7o//7v//////////////////////////////////////////cABoiI
fMzMzMzMzMzMzMzMzMzMzMzMzO7ucRFu7oj/7o////////////////////////////////////////9x
AAeIiMzMzMzMzMzMzMzMzMzMzMzMzMzO7ucRFu7nePju7u7v////////////////////////////////
6P/4EAB4iIfMzMzMzMzMzMzMzMzMzMzMzMzMzu7nERBu7nmIiO7oj///////////////////////////
ju7u7o//hwAGiIh8zMzMzMzMzMzMzMzMzMzMzMzMzMzu7nERbu7nmZl5eP//////////////////////
///4iPiO5nj/+HAAaIiIzMzMzMzMzMzMzMzMzMzMzMzMzMzM7u7nERbu7oiZeI//////////////////
////////+ImXd5mP/4cAAHiIh8zMzMzMzMzMzMzMzMzMzMzMzMzMzM7u53ERbu7v////////////////
///////////////4iZl4//hgAAeIiHzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM7u53ERBu7v//////////
//////////////////////////+GAAB4iI7MzMzMzMzMzMzMzMzMzMzMzMzMzMzMzO7uiHEADujv////
///////////////////////////////3AAAGiIh8zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzO7ohwABmP
////////////////////////////////////iREAZniIjMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzuiI
EAB4f///////////////////////////////////+JmZkWZoiIfMzMzMzMzMzMzMzMzMzMzMzMzMzMzM
zO6IhwBo//////////////////////////////////////iImZl2ZoiIzMzMzMzMzMzMzMzMzMzMzMzM
zMzMzMzuiHAA7////////////////////////////////////////4iZFmZ4iHzMzMzMzMzMzMzMzMzM
zMzMzMzMzMzO6IgQBo/////4j///////////////////////////////////mZFmaIiMzMzMzMzMzMzM
zMzMzMzMzMzMzMzMzuiHAA7/////iIiP//////7o//////////////////iI/////4mRZmeIh8zMzMzM
zMzMzMzMzMzMzMzMzMzMzO6IcQBo////+IiIiI/////+7u7u7uiIiI7u7v////iIiI/////5mRZmiIjM
zMzMzMzMzMzMzMzMzMzMzMzMzMzuiHAA7////4iIiIiIj//3d2bu7u7u7u7u7u7//4iIiIiP////+JkW
ZniIfMzMzMzMzMzMzMzMzMzMzMzMzMzO6IcQBo////+IiIiIiI//+ZkAAGZmZmZmZmbv//iIiIiIiP//
//+ZkWZoiIzMzMzMzMzMzMzMzMzMzMzMzMzMzuiFAG7////4iIiIiIj///iZABEREREREBAG7//4iIiI
iIj/////iZFmaIiMzMzMzMzMzMzMzMzMzMzMzMzMzO6IcQBo////+IiIiIiI///4kQARERERERERDo//
+IiIiIiIj/////mZBmeIh8zMzMzMzMzMzMzMzMzMzMzMzMzuiHAG7////4iIiIiIiP//+JFmeHd3d3dx
EW6P//iIiIiIiI/////4mRZmiIfMzMzMzMzMzMzMzMzMzMzMzMzO7ocQBo////+IiIiIiIj///iQZoiO
7u7u5xFu7//4iIiIiIiI////+JkWZniIzMzMzMzMzMzMzMzMzMzMzMzMzuiHEA7////4iIiIiIiP///5
kGaIju7u7ucRbu///4iIiIiIiP////95kGZ4iHzMzMzMzMzMzMzMzMzMzMzMzM7ogQBu////+IiIiIiI
j///+RBmiI7u7u7nEW7v//+IiIiIiIiP////iZFmaIh8zMzMzMzMzMzMzMzMzMzMzMzu6HEAaP////iI
iIiIiI////kQZoiHzMzu5xEO6P//iIiIiIiIj////4mRZmiIjMzMzMzMzMzMzMzMzMzMzMzM7ugRBu//
///4iIiIiIj///+JEGaIh8zM7ucRBu7//4iIiIiIiI/////5kQZniIzMzMzMzMzMzMzMzMzMzMzMzO6I
EAbv////iIiIiIiI////iQBniIzMzO7oERbu///4iIiIiIiP////+JkGZ4iHzMzMzMzMzMzMzMzMzMzM
zMbuhxAGj////4iIiIiIj////3kAaIiMzMzu7nEW7v//+IiIiIiIiP////iZFmaIh8zMzMzMzMzMzMzM
zMzMzMzO7oUQbv////+IiIiIiI////+RBmiIfMzMzu5xFu6P//+IiIiIiIj////4mRZmiIfMzMzMzMzM
zMzMzMzMzMzMzu6BAG7////4iIiIiIj////4kQZoiHzMzM7ucRDu7///iIiIiIiIj////5kQZoiHzMzM
zMzMzMzMzMzMzMzMzM7ocQBu////+IiIiIiI////+JAGeIh8zMzO7nERbu///4iIiIiIiI////95EGaI
h8zMzMzMzMzMzMzMzMzMzMxu6HEA7v////iIiIiIiP////cQBoiIzMzMzu7lEW7v///4iIiIiIiP////
iRBmeIjMzMzMzMzMzMzMzMzMzMzM7uhxBuj////4iIiIiI/////5EAaIiMzMzMbu5xEO7v//+IiIiIiI
j////4kQZniIzMzMzMzMzMzMzMzMzMzMzO7oEQbv////+IiIiIj/////iQBmiIfMzMzM7ucRBu7///iI
iIiIiIj///+JkGZ4iMzMzMzMzMzMzMzMzMzMzMzu6BEG7/////iIiIiI/////4EAaIiHzMzMzO7nERbu
j///iIiIiIiI////iZBmaIh8zMzMzMzMzMzMzMzMzMzM7ucRBu/////4iIiIj/////+RAGiIjMzMzMzu
7nEQ7u////iIiIiIiP///4mQBmiIfMzMzMzMzMzMzMzMzMzMzO7nEAbv////+IiIiP/////4EAZ4iHzM
zMzMzu5xEG7v///4iIiIiIj///+JkAZoiHzMzMzMzMzMxmzMzMzMzMzu5xAO7/////+IiI//////+RAG
iIjMzMzMzM7ucRFu7v///4iIiIiI////+ZAGaIh8zMzMzMzMzMZszMzMzMzG7ocQDu//////+I//////
/4EAZoiIzMzMzMzO7ucRBu7////4iIiIiP////mQBmiIfMzMzMzMzMzGbMzMzMzMzu6HEA7v////////
//////9xAGiIh8zMzMzMzO7nERbu7///+IiIiI/////5kAZoiHzMzMzMzMzMxmzMzMzMzM7uhxAO7///
///////////4EABoiIzMzMzMzMzu7nEQbu////+IiIiP////+ZAGaIh8zMzMzMzMzMZszMzMzMzO7oUQ
Du//////////////9xAGiIh8zMzMzMzM7u5xEW7u/////4iI//////mQBmiIfMzMzMzMzMzGTMzMzMzM
zu6HEA7v/////////////4EABoiIzMzMzMzMzM7u5xEG7v/////////////5kAZoiHzMzMzMzMzMxAzM
zMzMzM7uhxEO7/////////////9wAGiIh8zMzMzMzMzO7ucRFu7v////////////+RAGeIh8zMzMzMzM
zMAGzMzMzMzO7ucRDuj////////////4EAB4iIzMzMzMzMzMzO7ucRBu6P///////////4kQBoiIzMzM
zMzMzMxgBszMzMzMxu7nEQbo////////////gQAGiIh8zMzMzMzMzMzu7nERDu7///////////+JEAaI
iMzMzMzMzMzMYADMzMzMzMzu5xEG7v///////////3EAZ4iIzMzMzMzMzMzMzu7nERbu7///////////
gQBmiIfMzMzMzMzMzAAAbMzMzMzM7ucRBu7///////////gQAGiIh8zMzMzMzMzMzM7u5xEQbu7/////
/////5EAZ4iHzMzMzMzMzMYAAEzMzMzMzO7nERDu7/////////+HAAaIiIzMzMzMzMzMzMzM7u5xEQ7u
7/////////gQAGiIjMzMzMzMzMzEAAAGzMzMzMzu7nEQbuj////////4cAAHiIh8zMzMzMzMzMzMzO7u
dxEW7uj////////3AAZoiHzMzMzMzMzMYAAABMzMzMzM7u5xEG7u////////hgAAeIiHzMzMzMzMzMzM
zMzO7ucREW7u7///////gQAGiIh8zMzMzMzMzEAAAABszMzMzM7ucREG7uj/////hmAAB4iI7MzMzMzM
zMzMzMzMzu7ucREG7u6P////+AAAB4iIzMzMzMzMzMYAAAAATMzMzMzO7ucREG7u7oiO7mAAAHiIiMzM
zMzMzMzMzMzMzMzu7ucREG7u7o//+HYAAHiIh8zMzMzMzMzEAAAAAAbMzMzMzu7nEREG7u7u5mAAAAeI
iIfMzMzMzMzMzMzMzMzMzu7ucREQbu7u7uYAAAeIiHzMzMzMzMzMYAAAAAAAbMzMzMzu7nEREAZmZgAA
AAF4iI58zMzMzMzMzMzMzMzMzMzu7ncREQZm7mZgAAB4iI7MzMzMzMzMxgAAAAAAAEzMzMzM7u7nEREQ
AAAAABF4iI7uzMzMzMzMzMzMzMzMzMzM7u7ucRERAAAAAAAHiIiMzMzMzMzMzMQAAAAAAAAGzMzMzM7u
7nERERERERF3iIju7MzMzMzMzMzMzMzMzMzMzM7u7udREREQAAAReIiIfMzMzMzMzMxgAAAAAAAAAGzM
zMzM7u7udRERERV4iI7u7MzMzMzMzMzMzMzMzMzMzMzM7u7u5xEREREReIiO7MzMzMzMzMzGAAAAAAAA
AAAGzMzMzM7u7u53d3eIiO7u7szMzMzMzMzMzMzMzMzMzMzMzM7u7u7nd1F3eIiO7uzMzMzMzMzMYAAA
AAAAAAAAAGzMzMzM7u7u7u7u7u7u7szMzMzMzMzMzMzMzMzMzMzMzMzMzu7u7u6IiI7u7uzMzMzMzMzM
xgAAAAAAAAAAAAAGzMzMzMzu7u7u7u7u5szMzMzMzMzMzMzMzMzMzMzMzMzMzMzO7u7u7u7u7u7MzMzM
zMzMzGAAAAAAAAAAAAAAAEbMzMzMzG7u7u7ubMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM7u7u7u7uzM
zMzMzMzMzGQAAAAAAAAAAAAAAAAAbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzG7u
7szMzMzMzMzMzMYAAAAAAAAAAAAAAAAAAARszMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM
zMzMzMzMzMzMzMzMzMZAAAAAAAAAAAAAAAAAAAAABGzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM
zMzMzMzMzMzMzMzMzMzMzMZAAAAAAAAAAAAAAAAAAAAAAAAEbMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM
zMzMzMzMzMzMzMzMzMzMzMzMzMZAAAAAAAAAAAAAAAAAAAAAAAAAAABmzMzMzMzMzMzMzMzMzMzMzMzM
zMzMzMzMzMzMzMzMzMzMzMzMzMzMzGYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARGZmzMzMzMzMzMzMzM
zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMZmZEAAAAAAAAAAAAAAAAD////+AAAAAAAAAAD/////////AAAA
AAAAAAAAAP//////+AAAAAAAAAAAAAAf/////+AAAAAAAAAAAAAAB/////+AAAAAAAAAAAAAAAH////+
AAAAAAAAAAAAAAAAf////AAAAAAAAAAAAAAAAD////AAAAAAAAAAAAAAAAAP///gAAAAAAAAAAAAAAAA
B///wAAAAAAAAAAAAAAAAAP//4AAAAAAAAAAAAAAAAAB//8AAAAAAAAAAAAAAAAAAP/+AAAAAAAAAAAA
AAAAAAB//gAAAAAAAAAAAAAAAAAAf/wAAAAAAAAAAAAAAAAAAD/4AAAAAAAAAAAAAAAAAAAf+AAAAAAA
AAAAAAAAAAAAH/AAAAAAAAAAAAAAAAAAAA/wAAAAAAAAAAAAAAAAAAAP4AAAAAAAAAAAAAAAAAAAB+AA
AAAAAAAAAAAAAAAAAAfAAAAAAAAAAAAAAAAAAAADwAAAAAAAAAAAAAAAAAAAA8AAAAAAAAAAAAAAAAAA
AAOAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAA
AAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAAAAAAAAABAAAAAAAA
AAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAA
AAGAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAGAAAAAAAAAAAAA
AAAAAAABgAAAAAAAAAAAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAPAAAAAAAAAAAAAAAAAAAADwAAAAAAA
AAAAAAAAAAAAA+AAAAAAAAAAAAAAAAAAAAfgAAAAAAAAAAAAAAAAAAAH8AAAAAAAAAAAAAAAAAAAD/AA
AAAAAAAAAAAAAAAAAA/4AAAAAAAAAAAAAAAAAAAf+AAAAAAAAAAAAAAAAAAAH/wAAAAAAAAAAAAAAAAA
AD/+AAAAAAAAAAAAAAAAAAB//gAAAAAAAAAAAAAAAAAAf/8AAAAAAAAAAAAAAAAAAP//gAAAAAAAAAAA
AAAAAAH//8AAAAAAAAAAAAAAAAAD///gAAAAAAAAAAAAAAAAB///8AAAAAAAAAAAAAAAAA////wAAAAA
AAAAAAAAAAA////+AAAAAAAAAAAAAAAAf////4AAAAAAAAAAAAAAAf/////gAAAAAAAAAAAAAAf/////
+AAAAAAAAAAAAAAf//////8AAAAAAAAAAAAA/////////gAAAAAAAAAAf////w==
</value>
</data>
</root>
+519
View File
@@ -0,0 +1,519 @@
namespace LittleRabbit.LittleRabbitForms.ShopForms
{
partial class MaterialManageForm
{
/// <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.components = new System.ComponentModel.Container();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.ucGroupBoxEx3 = new LittleRabbit.UserComponent.UcGroupBoxEx(this.components);
this.dtEndTime = new DevComponents.Editors.DateTimeAdv.DateTimeInput();
this.dtBaginTime = new DevComponents.Editors.DateTimeAdv.DateTimeInput();
this.labelX47 = new DevComponents.DotNetBar.LabelX();
this.label4 = new System.Windows.Forms.Label();
this.btnClear = new DevComponents.DotNetBar.PanelEx();
this.btnStop = new DevComponents.DotNetBar.PanelEx();
this.ucGroupBoxEx1 = new LittleRabbit.UserComponent.UcGroupBoxEx(this.components);
this.btnGetProductCount = new LittleRabbit.UserControls.ButtonEx();
this.btnRefreshShop = new LittleRabbit.UserControls.ButtonEx();
this.splitContainer3 = new System.Windows.Forms.SplitContainer();
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.dgvShop = new LittleRabbit.UserComponent.DataGridViewEx();
this.colSelect = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.colShopId = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colShopName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colAuthStatus = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colMessage = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.splitContainer4 = new System.Windows.Forms.SplitContainer();
this.statusBar = new LittleRabbit.UserControls.StatusBarUserControl();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
this.ucGroupBoxEx3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dtEndTime)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dtBaginTime)).BeginInit();
this.ucGroupBoxEx1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).BeginInit();
this.splitContainer3.Panel1.SuspendLayout();
this.splitContainer3.Panel2.SuspendLayout();
this.splitContainer3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit();
this.splitContainer2.Panel1.SuspendLayout();
this.splitContainer2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dgvShop)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.splitContainer4)).BeginInit();
this.splitContainer4.Panel1.SuspendLayout();
this.splitContainer4.SuspendLayout();
this.SuspendLayout();
//
// splitContainer1
//
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
this.splitContainer1.Name = "splitContainer1";
this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.ucGroupBoxEx3);
this.splitContainer1.Panel1.Controls.Add(this.btnClear);
this.splitContainer1.Panel1.Controls.Add(this.btnStop);
this.splitContainer1.Panel1.Controls.Add(this.ucGroupBoxEx1);
this.splitContainer1.Panel1.Paint += new System.Windows.Forms.PaintEventHandler(this.splitContainer1_Panel1_Paint);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.splitContainer3);
this.splitContainer1.Size = new System.Drawing.Size(1091, 623);
this.splitContainer1.SplitterDistance = 120;
this.splitContainer1.TabIndex = 5;
//
// ucGroupBoxEx3
//
this.ucGroupBoxEx3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.ucGroupBoxEx3.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.ucGroupBoxEx3.BorderStyle = LittleRabbit.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND;
this.ucGroupBoxEx3.Controls.Add(this.dtEndTime);
this.ucGroupBoxEx3.Controls.Add(this.dtBaginTime);
this.ucGroupBoxEx3.Controls.Add(this.labelX47);
this.ucGroupBoxEx3.Controls.Add(this.label4);
this.ucGroupBoxEx3.Location = new System.Drawing.Point(147, 2);
this.ucGroupBoxEx3.Name = "ucGroupBoxEx3";
this.ucGroupBoxEx3.Size = new System.Drawing.Size(329, 120);
this.ucGroupBoxEx3.TabIndex = 423;
this.ucGroupBoxEx3.TabStop = false;
this.ucGroupBoxEx3.Text = "操作选项";
//
// dtEndTime
//
//
//
//
this.dtEndTime.BackgroundStyle.Class = "DateTimeInputBackground";
this.dtEndTime.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.dtEndTime.ButtonDropDown.Shortcut = DevComponents.DotNetBar.eShortcut.AltDown;
this.dtEndTime.ButtonDropDown.Visible = true;
this.dtEndTime.IsPopupCalendarOpen = false;
this.dtEndTime.Location = new System.Drawing.Point(197, 32);
//
//
//
//
//
//
this.dtEndTime.MonthCalendar.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.dtEndTime.MonthCalendar.CalendarDimensions = new System.Drawing.Size(1, 1);
this.dtEndTime.MonthCalendar.ClearButtonVisible = true;
//
//
//
this.dtEndTime.MonthCalendar.CommandsBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground2;
this.dtEndTime.MonthCalendar.CommandsBackgroundStyle.BackColorGradientAngle = 90;
this.dtEndTime.MonthCalendar.CommandsBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground;
this.dtEndTime.MonthCalendar.CommandsBackgroundStyle.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.dtEndTime.MonthCalendar.CommandsBackgroundStyle.BorderTopColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarDockedBorder;
this.dtEndTime.MonthCalendar.CommandsBackgroundStyle.BorderTopWidth = 1;
this.dtEndTime.MonthCalendar.CommandsBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.dtEndTime.MonthCalendar.DisplayMonth = new System.DateTime(2019, 3, 1, 0, 0, 0, 0);
//
//
//
this.dtEndTime.MonthCalendar.NavigationBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
this.dtEndTime.MonthCalendar.NavigationBackgroundStyle.BackColorGradientAngle = 90;
this.dtEndTime.MonthCalendar.NavigationBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
this.dtEndTime.MonthCalendar.NavigationBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.dtEndTime.MonthCalendar.TodayButtonVisible = true;
this.dtEndTime.Name = "dtEndTime";
this.dtEndTime.Size = new System.Drawing.Size(105, 23);
this.dtEndTime.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.dtEndTime.TabIndex = 71;
//
// dtBaginTime
//
//
//
//
this.dtBaginTime.BackgroundStyle.Class = "DateTimeInputBackground";
this.dtBaginTime.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.dtBaginTime.ButtonDropDown.Shortcut = DevComponents.DotNetBar.eShortcut.AltDown;
this.dtBaginTime.ButtonDropDown.Visible = true;
this.dtBaginTime.IsPopupCalendarOpen = false;
this.dtBaginTime.Location = new System.Drawing.Point(82, 32);
//
//
//
//
//
//
this.dtBaginTime.MonthCalendar.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.dtBaginTime.MonthCalendar.CalendarDimensions = new System.Drawing.Size(1, 1);
this.dtBaginTime.MonthCalendar.ClearButtonVisible = true;
//
//
//
this.dtBaginTime.MonthCalendar.CommandsBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground2;
this.dtBaginTime.MonthCalendar.CommandsBackgroundStyle.BackColorGradientAngle = 90;
this.dtBaginTime.MonthCalendar.CommandsBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarBackground;
this.dtBaginTime.MonthCalendar.CommandsBackgroundStyle.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.dtBaginTime.MonthCalendar.CommandsBackgroundStyle.BorderTopColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarDockedBorder;
this.dtBaginTime.MonthCalendar.CommandsBackgroundStyle.BorderTopWidth = 1;
this.dtBaginTime.MonthCalendar.CommandsBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.dtBaginTime.MonthCalendar.DisplayMonth = new System.DateTime(2019, 3, 1, 0, 0, 0, 0);
//
//
//
this.dtBaginTime.MonthCalendar.NavigationBackgroundStyle.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
this.dtBaginTime.MonthCalendar.NavigationBackgroundStyle.BackColorGradientAngle = 90;
this.dtBaginTime.MonthCalendar.NavigationBackgroundStyle.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
this.dtBaginTime.MonthCalendar.NavigationBackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.dtBaginTime.MonthCalendar.TodayButtonVisible = true;
this.dtBaginTime.Name = "dtBaginTime";
this.dtBaginTime.Size = new System.Drawing.Size(105, 23);
this.dtBaginTime.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.dtBaginTime.TabIndex = 70;
//
// labelX47
//
//
//
//
this.labelX47.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.labelX47.Location = new System.Drawing.Point(27, 32);
this.labelX47.Name = "labelX47";
this.labelX47.Size = new System.Drawing.Size(56, 23);
this.labelX47.TabIndex = 72;
this.labelX47.Text = "起止时间";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(186, 35);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(13, 17);
this.label4.TabIndex = 73;
this.label4.Text = "-";
//
// btnClear
//
this.btnClear.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnClear.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnClear.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnClear.DisabledBackColor = System.Drawing.Color.Empty;
this.btnClear.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnClear.Location = new System.Drawing.Point(929, 12);
this.btnClear.Name = "btnClear";
this.btnClear.Size = new System.Drawing.Size(72, 23);
this.btnClear.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnClear.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnClear.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnClear.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnClear.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnClear.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnClear.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnClear.Style.GradientAngle = 90;
this.btnClear.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnClear.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnClear.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnClear.TabIndex = 409;
this.btnClear.Text = "清理素材";
this.btnClear.Click += new System.EventHandler(this.btnClear_Click);
//
// btnStop
//
this.btnStop.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnStop.CanvasColor = System.Drawing.SystemColors.Control;
this.btnStop.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnStop.DisabledBackColor = System.Drawing.Color.Empty;
this.btnStop.Location = new System.Drawing.Point(1007, 12);
this.btnStop.Name = "btnStop";
this.btnStop.Size = new System.Drawing.Size(72, 23);
this.btnStop.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnStop.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
this.btnStop.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(215)))), ((int)(((byte)(255)))));
this.btnStop.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
this.btnStop.Style.BorderColor.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnStop.Style.ForeColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
this.btnStop.Style.GradientAngle = 90;
this.btnStop.StyleMouseDown.Alignment = System.Drawing.StringAlignment.Center;
this.btnStop.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnStop.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnStop.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnStop.StyleMouseOver.ForeColor.Color = System.Drawing.Color.White;
this.btnStop.TabIndex = 405;
this.btnStop.Text = "停止操作";
this.btnStop.Click += new System.EventHandler(this.btnStop_Click);
//
// ucGroupBoxEx1
//
this.ucGroupBoxEx1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.ucGroupBoxEx1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.ucGroupBoxEx1.BorderStyle = LittleRabbit.UserComponent.UcGroupBoxEx.GroupBoxBorderStyle.ROUND;
this.ucGroupBoxEx1.Controls.Add(this.btnGetProductCount);
this.ucGroupBoxEx1.Controls.Add(this.btnRefreshShop);
this.ucGroupBoxEx1.Location = new System.Drawing.Point(3, 2);
this.ucGroupBoxEx1.Name = "ucGroupBoxEx1";
this.ucGroupBoxEx1.Size = new System.Drawing.Size(144, 120);
this.ucGroupBoxEx1.TabIndex = 399;
this.ucGroupBoxEx1.TabStop = false;
this.ucGroupBoxEx1.Text = "基础";
//
// btnGetProductCount
//
this.btnGetProductCount.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnGetProductCount.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnGetProductCount.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnGetProductCount.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnGetProductCount.ForeColor = System.Drawing.Color.White;
this.btnGetProductCount.Location = new System.Drawing.Point(16, 69);
this.btnGetProductCount.Margin = new System.Windows.Forms.Padding(2);
this.btnGetProductCount.Name = "btnGetProductCount";
this.btnGetProductCount.Size = new System.Drawing.Size(112, 26);
this.btnGetProductCount.TabIndex = 376;
this.btnGetProductCount.Text = "获取素材文件夹";
this.btnGetProductCount.UseVisualStyleBackColor = false;
this.btnGetProductCount.Visible = false;
this.btnGetProductCount.Click += new System.EventHandler(this.btnGetProductCount_Click);
//
// btnRefreshShop
//
this.btnRefreshShop.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnRefreshShop.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnRefreshShop.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnRefreshShop.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnRefreshShop.ForeColor = System.Drawing.Color.White;
this.btnRefreshShop.Location = new System.Drawing.Point(16, 30);
this.btnRefreshShop.Margin = new System.Windows.Forms.Padding(2);
this.btnRefreshShop.Name = "btnRefreshShop";
this.btnRefreshShop.Size = new System.Drawing.Size(112, 26);
this.btnRefreshShop.TabIndex = 375;
this.btnRefreshShop.Text = "刷新店铺状态";
this.btnRefreshShop.UseVisualStyleBackColor = false;
this.btnRefreshShop.Click += new System.EventHandler(this.btnRefreshShop_Click);
//
// splitContainer3
//
this.splitContainer3.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer3.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
this.splitContainer3.Location = new System.Drawing.Point(0, 0);
this.splitContainer3.Name = "splitContainer3";
this.splitContainer3.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainer3.Panel1
//
this.splitContainer3.Panel1.Controls.Add(this.splitContainer2);
//
// splitContainer3.Panel2
//
this.splitContainer3.Panel2.Controls.Add(this.splitContainer4);
this.splitContainer3.Size = new System.Drawing.Size(1091, 499);
this.splitContainer3.SplitterDistance = 469;
this.splitContainer3.TabIndex = 1;
//
// splitContainer2
//
this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
this.splitContainer2.Location = new System.Drawing.Point(0, 0);
this.splitContainer2.Name = "splitContainer2";
//
// splitContainer2.Panel1
//
this.splitContainer2.Panel1.Controls.Add(this.dgvShop);
this.splitContainer2.Panel1.Padding = new System.Windows.Forms.Padding(4, 0, 4, 0);
//
// splitContainer2.Panel2
//
this.splitContainer2.Panel2.Padding = new System.Windows.Forms.Padding(0, 0, 4, 0);
this.splitContainer2.Panel2Collapsed = true;
this.splitContainer2.Size = new System.Drawing.Size(1091, 469);
this.splitContainer2.SplitterDistance = 336;
this.splitContainer2.TabIndex = 0;
//
// dgvShop
//
this.dgvShop.AllowUserToAddRows = false;
this.dgvShop.AllowUserToDeleteRows = false;
dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
this.dgvShop.BackgroundColor = System.Drawing.Color.White;
this.dgvShop.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
this.dgvShop.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvShop.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colSelect,
this.colShopId,
this.colShopName,
this.colAuthStatus,
this.colMessage});
this.dgvShop.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvShop.Location = new System.Drawing.Point(4, 0);
this.dgvShop.Name = "dgvShop";
this.dgvShop.ReadOnly = true;
this.dgvShop.RowHeadersWidth = 42;
dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.dgvShop.RowsDefaultCellStyle = dataGridViewCellStyle3;
this.dgvShop.RowTemplate.Height = 23;
this.dgvShop.Size = new System.Drawing.Size(1083, 469);
this.dgvShop.TabIndex = 6;
this.dgvShop.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvShop_CellContentClick);
//
// colSelect
//
this.colSelect.HeaderText = "全选";
this.colSelect.Name = "colSelect";
this.colSelect.ReadOnly = true;
this.colSelect.Resizable = System.Windows.Forms.DataGridViewTriState.True;
this.colSelect.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic;
this.colSelect.Width = 40;
//
// colShopId
//
this.colShopId.HeaderText = "店铺";
this.colShopId.Name = "colShopId";
this.colShopId.ReadOnly = true;
//
// colShopName
//
this.colShopName.FillWeight = 150F;
this.colShopName.HeaderText = "店铺名称";
this.colShopName.Name = "colShopName";
this.colShopName.ReadOnly = true;
this.colShopName.Resizable = System.Windows.Forms.DataGridViewTriState.True;
//
// colAuthStatus
//
this.colAuthStatus.HeaderText = "授权状态";
this.colAuthStatus.Name = "colAuthStatus";
this.colAuthStatus.ReadOnly = true;
this.colAuthStatus.Width = 65;
//
// colMessage
//
this.colMessage.HeaderText = "消息";
this.colMessage.Name = "colMessage";
this.colMessage.ReadOnly = true;
this.colMessage.Width = 520;
//
// splitContainer4
//
this.splitContainer4.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer4.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
this.splitContainer4.Location = new System.Drawing.Point(0, 0);
this.splitContainer4.Name = "splitContainer4";
//
// splitContainer4.Panel1
//
this.splitContainer4.Panel1.Controls.Add(this.statusBar);
this.splitContainer4.Size = new System.Drawing.Size(1091, 26);
this.splitContainer4.SplitterDistance = 684;
this.splitContainer4.TabIndex = 3;
//
// statusBar
//
this.statusBar.BackColor = System.Drawing.Color.White;
this.statusBar.Dock = System.Windows.Forms.DockStyle.Fill;
this.statusBar.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.statusBar.Location = new System.Drawing.Point(0, 0);
this.statusBar.Margin = new System.Windows.Forms.Padding(0);
this.statusBar.Name = "statusBar";
this.statusBar.Size = new System.Drawing.Size(684, 26);
this.statusBar.TabIndex = 2;
//
// MaterialManageForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(1091, 623);
this.Controls.Add(this.splitContainer1);
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Name = "MaterialManageForm";
this.Text = "素材管理";
this.Load += new System.EventHandler(this.MaterialManageForm_Load);
this.VisibleChanged += new System.EventHandler(this.MaterialManageForm_VisibleChanged);
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
this.ucGroupBoxEx3.ResumeLayout(false);
this.ucGroupBoxEx3.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.dtEndTime)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.dtBaginTime)).EndInit();
this.ucGroupBoxEx1.ResumeLayout(false);
this.splitContainer3.Panel1.ResumeLayout(false);
this.splitContainer3.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).EndInit();
this.splitContainer3.ResumeLayout(false);
this.splitContainer2.Panel1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();
this.splitContainer2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dgvShop)).EndInit();
this.splitContainer4.Panel1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer4)).EndInit();
this.splitContainer4.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.SplitContainer splitContainer1;
private UserComponent.UcGroupBoxEx ucGroupBoxEx3;
private DevComponents.DotNetBar.PanelEx btnClear;
private DevComponents.DotNetBar.PanelEx btnStop;
private UserComponent.UcGroupBoxEx ucGroupBoxEx1;
private UserControls.ButtonEx btnRefreshShop;
private System.Windows.Forms.SplitContainer splitContainer3;
private System.Windows.Forms.SplitContainer splitContainer2;
private UserComponent.DataGridViewEx dgvShop;
private System.Windows.Forms.SplitContainer splitContainer4;
private UserControls.StatusBarUserControl statusBar;
private UserControls.ButtonEx btnGetProductCount;
private DevComponents.Editors.DateTimeAdv.DateTimeInput dtEndTime;
private DevComponents.Editors.DateTimeAdv.DateTimeInput dtBaginTime;
private DevComponents.DotNetBar.LabelX labelX47;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.DataGridViewCheckBoxColumn colSelect;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopId;
private System.Windows.Forms.DataGridViewTextBoxColumn colShopName;
private System.Windows.Forms.DataGridViewTextBoxColumn colAuthStatus;
private System.Windows.Forms.DataGridViewTextBoxColumn colMessage;
}
}
@@ -0,0 +1,370 @@
using AllBase.Helper;
using LittleRabbit.Extension;
using LittleRabbit.LittleRabbitForms.BaseForms;
using NaiBa.Util.Extension;
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 Work.BLL.Upload;
using Work.DouyinApiClass;
namespace LittleRabbit.LittleRabbitForms.ShopForms
{
public partial class MaterialManageForm : Form
{
private CheckBox chkSelectAll = null;
CancellationTokenSource cancellationTokenSource = null;
public MaterialManageForm()
{
InitializeComponent();
}
private void MaterialManageForm_Load(object sender, EventArgs e)
{
chkSelectAll = this.dgvShop.Columns["colSelect"].AddHeaderCheckBox(HorizontalAlignment.Center, 0, 0, null, null, false, null, true);
chkSelectAll.Width = chkSelectAll.Height = 13;
chkSelectAll.CheckedChanged += chkSelectAll_CheckedChanged;
dtEndTime.Value = DateTime.Now.Date.AddDays(-8);
dtBaginTime.Value = DateTime.Now.Date.AddYears(-1);
}
private void chkSelectAll_CheckedChanged(object sender, EventArgs e)
{
if (!chkSelectAll.Checked)
{
foreach (DataGridViewRow row in dgvShop.Rows)
{
row.Cells["colSelect"].Value = false;
}
}
else
{
var list = GlobalConfig.DouShopLoginList.Where(s => s.ApiAuthStatus == "授权成功").Select(ss => ss.ShopAccountId);
foreach (DataGridViewRow row in dgvShop.Rows)
{
if (list.Any(l => l == row.Cells["colShopId"]?.Value?.ToString()))
row.Cells["colSelect"].Value = true;
}
}
}
public void LoadShops()
{
// 获取被删除的店铺
List<DataGridViewRow> dgvRowList = dgvShop.Rows.Cast<DataGridViewRow>().Where(row
=> !GlobalConfig.DouShopLoginList.Any(s => s.ShopAccountId == row.Cells["colShopId"]?.Value?.ToString())).ToList();
// 更新被删除的店铺列表
foreach (var row in dgvRowList)
{
dgvShop.Rows.Remove(row);
}
for (int i = 0; i < GlobalConfig.DouShopLoginList.Count; i++)
{
var shop = GlobalConfig.DouShopLoginList[i];
var row = dgvShop.Rows.Cast<DataGridViewRow>().FirstOrDefault(r => r.Cells["colShopId"].Value?.ToString() == shop.ShopAccountId);
if (row == null)
dgvShop.Rows.Add(false, shop.ShopAccountId, shop.ShopAccount, shop.LoginStatus);
else
{
row.Cells["colAuthStatus"].Value = shop.ApiAuthStatus;
}
}
}
private void btnRefreshShop_Click(object sender, EventArgs e)
{
LoadShops();
}
private void MaterialManageForm_VisibleChanged(object sender, EventArgs e)
{
if (Visible)
LoadShops();
}
private void dgvShop_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
if (e.ColumnIndex < 0 || e.RowIndex < 0)
return;
string colId = dgvShop.Columns[e.ColumnIndex].Name;
if (colId == "colSelect")
{
dgvShop.Rows[e.RowIndex].Cells["colSelect"].Value = !dgvShop.Rows[e.RowIndex].Cells["colSelect"].Value.ParseToBool();
}
}
private void btnGetProductCount_Click(object sender, EventArgs e)
{
var lstShopId = dgvShop.Rows.Cast<DataGridViewRow>()
.Where(r => r.Cells["colSelect"].Value.ParseToBool())
.Select(r => r.Cells["colShopId"].Value?.ToString()).ToList();
if (lstShopId.Count == 0)
{
BaseMsgForm.ShowInfo("请选择要获取素材的店铺");
return;
}
this.btnGetProductCount.Enabled = false;
foreach (DataGridViewRow row in dgvShop.Rows)
{
if (lstShopId.Contains(row.Cells["colShopId"]?.Value))
row.Cells["colMessage"].Value = "";
}
Task.Run(() =>
{
GetShopMaterial();
Invoke(new Action(() =>
{
btnGetProductCount.Enabled = true;
BaseMsgForm.ShowInfo("素材获取完成");
}));
});
}
void GetShopMaterial()
{
}
private void splitContainer1_Panel1_Paint(object sender, PaintEventArgs e)
{
}
private void btnClear_Click(object sender, EventArgs e)
{
var lstShopId = dgvShop.Rows.Cast<DataGridViewRow>()
.Where(r => r.Cells["colSelect"].Value.ParseToBool())
.Select(r => r.Cells["colShopId"].Value?.ToString()).ToList();
if (lstShopId.Count == 0)
{
BaseMsgForm.ShowInfo("请选择要清理素材的店铺");
return;
}
this.btnClear.Enabled = false;
foreach (DataGridViewRow row in dgvShop.Rows)
{
if (lstShopId.Contains(row.Cells["colShopId"]?.Value))
row.Cells["colMessage"].Value = "";
}
int n = 0;
cancellationTokenSource = new CancellationTokenSource();
Task.Run(() =>
{
var shopList = GlobalConfig.DouShopLoginList.Where(s => s.ApiAuthStatus == "授权成功" && lstShopId.Contains(s.ShopAccountId));
foreach (var shop in shopList)
{
DataGridViewRow row = null;
this.Invoke(new Action(() =>
{
n++;
var total = lstShopId.Count();
this.statusBar.lblTaskStatus.Text = "正在清理素材...";
this.statusBar.pgbTaskProgress.Value = n;
this.statusBar.pgbTaskProgress.Text = n + "/" + total;
this.statusBar.pgbTaskProgress.Maximum = total;
row = this.dgvShop.Rows.Cast<DataGridViewRow>().FirstOrDefault(r => r.Cells["colShopId"].Value.ToString() == shop.ShopAccountId);
if (row != null) { row.Cells["colMessage"].Value = "正在获取素材文件夹"; }
}));
if (shop.PayStatus != 1)
{
if (row != null) { Invoke(new Action(() => { row.Cells["colMessage"].Value = "当前为试用版,请购买专业版"; })); }
goto operateEnd;
}
List<string> folderIds = new List<string>();
for (int page = 1; page < 9999; page++)
{
if (cancellationTokenSource.IsCancellationRequested)
{
if (row != null) { Invoke(new Action(() => { row.Cells["colMessage"].Value = "获取素材文件夹中断"; })); }
goto operateEnd;
}
var folder = new UploadMaterialBLL().GetApiMaterialFolder(shop, "0", 50, page, 1,
this.dtBaginTime.Value.ToString("yyyy-MM-dd HH:mm:ss"), this.dtEndTime.Value.AddDays(1).ToString("yyyy-MM-dd HH:mm:ss"));
if (!folder.Contains("\"code\":10000"))
folder = new UploadMaterialBLL().GetApiMaterialFolder(shop, "0", 50, 1, 1,
this.dtBaginTime.Value.ToString("yyyy-MM-dd HH:mm:ss"), this.dtEndTime.Value.AddDays(1).ToString("yyyy-MM-dd HH:mm:ss"));
Thread.Sleep(500);
if (folder.Contains("\"code\":10000"))
{
var JObj = AllBase.JsonHelper.JObjectParse(folder);
if (JObj?["data"]?["folder_info_list"] != null)
{
if (JObj?["data"]?["folder_info_list"].Count() == 0)
break;
foreach (Newtonsoft.Json.Linq.JObject j in JObj?["data"]?["folder_info_list"])
{
folderIds.Add(j["folder_id"]?.ToString());
}
}
else
break;
}
}
this.Invoke(new Action(() =>
{
if (row != null) { row.Cells["colMessage"].Value = "正在删除素材文件夹"; }
}));
string deleteIdStr = "";
foreach (var folderid in folderIds)
{
if (cancellationTokenSource.IsCancellationRequested)
{
if (row != null) { Invoke(new Action(() => { row.Cells["colMessage"].Value = "删除素材文件夹中断"; })); }
goto operateEnd;
}
deleteIdStr += "\\\"" + folderid + "\\\",";
if (folderid == folderIds.LastOrDefault() || deleteIdStr.TrimEnd(',').Split(',').Count() == 20)
{
DouyinApi api = new DouyinApi(shop);
api.JsonData = new Dictionary<string, string>();
api.JsonData.Add("folder_ids", "[" + deleteIdStr.TrimEnd(',') + "]");
string html = api.MaterialDeleteFolder();
Thread.Sleep(500);
// {"code":10000,"data":{"failed_map":{},"success_ids":["70344526568442923861819","70673777705522138001819","70677148692769999721819","70682264025747458561819","70684999170644871991819","70689259618189970281819","70696976534408563231819","70700172511513316241819","70703300876101225031819","70707122616226450031819","70711553799834012461819","70722448124932426591819","70726708088621960061819","70752688859723205501819","70763331833771133521819"]},"err_no":0,"log_id":"20220326131033010212035232207F377B","message":"success","msg":"success","sub_code":"","sub_msg":""}
if (html.Contains("\"code\":10000"))
{
if (!html.Contains("\"failed_map\":{}"))
{
AllBase.LogSave.AddFile(html);
}
//AllBase.FileBase.AppendAllText("material_failed_log_" + DateTime.Now.ToString("yyyyMMdd") + ".txt", html + "\r\n");
}
else
{
}
deleteIdStr = "";
}
}
this.Invoke(new Action(() =>
{
if (row != null) { row.Cells["colMessage"].Value = "素材文件夹删除完成"; }
}));
Thread.Sleep(2000);
// 删除根目录素材文件
this.Invoke(new Action(() =>
{
if (row != null) { row.Cells["colMessage"].Value = "正在获取根目录素材文件"; }
}));
List<string> MaterialIds = new List<string>();
for (int page = 1; page < 9999; page++)
{
if (cancellationTokenSource.IsCancellationRequested)
{
if (row != null) { Invoke(new Action(() => { row.Cells["colMessage"].Value = "获取根目录素材文件中断"; })); }
goto operateEnd;
}
var Material = new UploadMaterialBLL().GetApiMaterial(shop, "0", 100, page, 1,
this.dtBaginTime.Value.ToString("yyyy-MM-dd HH:mm:ss"), this.dtEndTime.Value.AddDays(1).ToString("yyyy-MM-dd HH:mm:ss"));
if (!Material.Contains("\"code\":10000"))
Material = new UploadMaterialBLL().GetApiMaterial(shop, "0", 100, page, 1,
this.dtBaginTime.Value.ToString("yyyy-MM-dd HH:mm:ss"), this.dtEndTime.Value.AddDays(1).ToString("yyyy-MM-dd HH:mm:ss"));
Thread.Sleep(500);
if (Material.Contains("\"code\":10000"))
{
var JObj = AllBase.JsonHelper.JObjectParse(Material);
if (JObj?["data"]?["material_info_list"] != null)
{
if (JObj?["data"]?["material_info_list"].Count() == 0)
break;
foreach (Newtonsoft.Json.Linq.JObject j in JObj?["data"]?["material_info_list"])
{
MaterialIds.Add(j["material_id"]?.ToString());
}
}
}
}
this.Invoke(new Action(() =>
{
if (row != null) { row.Cells["colMessage"].Value = "正在删除根目录素材文件"; }
}));
string deleteMaterialIdStr = "";
foreach (var materialId in MaterialIds)
{
if (cancellationTokenSource.IsCancellationRequested)
{
if (row != null) { Invoke(new Action(() => { row.Cells["colMessage"].Value = "删除根目录素材文件中断"; })); }
goto operateEnd;
}
deleteMaterialIdStr += "\\\"" + materialId + "\\\",";
if (materialId == MaterialIds.LastOrDefault() || deleteMaterialIdStr.TrimEnd(',').Split(',').Count() == 100)
{
DouyinApi api = new DouyinApi(shop);
api.JsonData = new Dictionary<string, string>();
api.JsonData.Add("material_ids", "[" + deleteMaterialIdStr.TrimEnd(',') + "]");
string html = api.MaterialDeleteMaterial();
Thread.Sleep(500);
if (html.Contains("\"code\":10000"))
{
if (!html.Contains("\"failed_map\":{}"))
{
AllBase.LogSave.AddFile(html);
}
}
else
{
}
deleteMaterialIdStr = "";
}
}
this.Invoke(new Action(() =>
{
row = this.dgvShop.Rows.Cast<DataGridViewRow>().FirstOrDefault(r => r.Cells["colShopId"].Value.ToString() == shop.ShopAccountId);
if (row != null) { row.Cells["colMessage"].Value = "素材文件夹删除完成"; }
}));
Thread.Sleep(2000);
//var xx = new UploadMaterialBLL().GetApiMaterial(shop, "70771032852027148841819", 50);
}
operateEnd:
Invoke(new Action(() =>
{
btnClear.Enabled = true;
if (cancellationTokenSource.IsCancellationRequested)
BaseMsgForm.ShowInfo("清理素材中断");
else
BaseMsgForm.ShowInfo("清理素材完成");
}));
}, cancellationTokenSource.Token);
}
private void btnStop_Click(object sender, EventArgs e)
{
if (cancellationTokenSource != null)
cancellationTokenSource.Cancel();
}
}
}
@@ -0,0 +1,132 @@
<?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="colSelect.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colShopId.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colAuthStatus.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="colMessage.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>
+282
View File
@@ -0,0 +1,282 @@
namespace LittleRabbit.LittleRabbitForms.ShopForms
{
partial class ShopAddEditForm
{
/// <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()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ShopAddEditForm));
this.panel2 = new System.Windows.Forms.Panel();
this.label7 = new System.Windows.Forms.Label();
this.cmbGroup = new System.Windows.Forms.ComboBox();
this.txtBuyAccount = new DevComponents.DotNetBar.Controls.TextBoxX();
this.label6 = new System.Windows.Forms.Label();
this.txtChatAccount = new DevComponents.DotNetBar.Controls.TextBoxX();
this.label4 = new System.Windows.Forms.Label();
this.txtUploadAccount = new DevComponents.DotNetBar.Controls.TextBoxX();
this.label3 = new System.Windows.Forms.Label();
this.txtShopPassword = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.txtLoginName = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.btnOk = new LittleRabbit.UserControls.ButtonEx();
this.panel2.SuspendLayout();
this.SuspendLayout();
//
// panel2
//
this.panel2.BackColor = System.Drawing.Color.White;
this.panel2.Controls.Add(this.label7);
this.panel2.Controls.Add(this.cmbGroup);
this.panel2.Controls.Add(this.txtBuyAccount);
this.panel2.Controls.Add(this.label6);
this.panel2.Controls.Add(this.txtChatAccount);
this.panel2.Controls.Add(this.label4);
this.panel2.Controls.Add(this.txtUploadAccount);
this.panel2.Controls.Add(this.label3);
this.panel2.Controls.Add(this.txtShopPassword);
this.panel2.Controls.Add(this.label2);
this.panel2.Controls.Add(this.txtLoginName);
this.panel2.Controls.Add(this.label1);
this.panel2.Controls.Add(this.label5);
this.panel2.Controls.Add(this.btnOk);
this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel2.Location = new System.Drawing.Point(1, 33);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(295, 285);
this.panel2.TabIndex = 1;
this.panel2.Paint += new System.Windows.Forms.PaintEventHandler(this.panel2_Paint);
//
// label7
//
this.label7.AutoSize = true;
this.label7.ForeColor = System.Drawing.Color.DarkGray;
this.label7.Location = new System.Drawing.Point(31, 214);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(164, 17);
this.label7.TabIndex = 384;
this.label7.Text = "登录密码为空表示不更新密码";
this.label7.Visible = false;
//
// cmbGroup
//
this.cmbGroup.FormattingEnabled = true;
this.cmbGroup.Items.AddRange(new object[] {
"客服",
"采购",
"上货",
"数据",
"登录"});
this.cmbGroup.Location = new System.Drawing.Point(91, 169);
this.cmbGroup.Name = "cmbGroup";
this.cmbGroup.Size = new System.Drawing.Size(172, 25);
this.cmbGroup.TabIndex = 383;
//
// txtBuyAccount
//
//
//
//
this.txtBuyAccount.Border.Class = "CrumbBarBackgroundKey";
this.txtBuyAccount.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.txtBuyAccount.Border.PaddingBottom = 2;
this.txtBuyAccount.Border.PaddingLeft = 2;
this.txtBuyAccount.Border.PaddingRight = 2;
this.txtBuyAccount.Border.PaddingTop = 2;
this.txtBuyAccount.Location = new System.Drawing.Point(91, 134);
this.txtBuyAccount.Name = "txtBuyAccount";
this.txtBuyAccount.Size = new System.Drawing.Size(172, 23);
this.txtBuyAccount.TabIndex = 382;
this.txtBuyAccount.WatermarkText = "点击添加店铺子账户";
this.txtBuyAccount.Click += new System.EventHandler(this.txt_Click);
this.txtBuyAccount.TextChanged += new System.EventHandler(this.txtBuyAccount_TextChanged);
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(29, 137);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(56, 17);
this.label6.TabIndex = 381;
this.label6.Text = "采购账户";
//
// txtChatAccount
//
//
//
//
this.txtChatAccount.Border.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.txtChatAccount.Border.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.txtChatAccount.Border.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.txtChatAccount.Border.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.txtChatAccount.Border.Class = "CrumbBarBackgroundKey";
this.txtChatAccount.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.txtChatAccount.Border.PaddingBottom = 2;
this.txtChatAccount.Border.PaddingLeft = 2;
this.txtChatAccount.Border.PaddingRight = 2;
this.txtChatAccount.Border.PaddingTop = 2;
this.txtChatAccount.Location = new System.Drawing.Point(91, 99);
this.txtChatAccount.Name = "txtChatAccount";
this.txtChatAccount.Size = new System.Drawing.Size(172, 23);
this.txtChatAccount.TabIndex = 380;
this.txtChatAccount.WatermarkText = "点击添加店铺子账户";
this.txtChatAccount.Click += new System.EventHandler(this.txt_Click);
this.txtChatAccount.TextChanged += new System.EventHandler(this.txtChat_TextChanged);
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(29, 102);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(56, 17);
this.label4.TabIndex = 379;
this.label4.Text = "客服账户";
//
// txtUploadAccount
//
//
//
//
this.txtUploadAccount.Border.Class = "CrumbBarBackgroundKey";
this.txtUploadAccount.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.txtUploadAccount.Border.PaddingBottom = 2;
this.txtUploadAccount.Border.PaddingLeft = 2;
this.txtUploadAccount.Border.PaddingRight = 2;
this.txtUploadAccount.Border.PaddingTop = 2;
this.txtUploadAccount.Location = new System.Drawing.Point(91, 99);
this.txtUploadAccount.Name = "txtUploadAccount";
this.txtUploadAccount.Size = new System.Drawing.Size(172, 23);
this.txtUploadAccount.TabIndex = 374;
this.txtUploadAccount.Visible = false;
this.txtUploadAccount.Click += new System.EventHandler(this.txt_Click);
this.txtUploadAccount.TextChanged += new System.EventHandler(this.txtUploadAccount_TextChanged);
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(29, 102);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(56, 17);
this.label3.TabIndex = 373;
this.label3.Text = "上货账户";
this.label3.Visible = false;
//
// txtShopPassword
//
this.txtShopPassword.Location = new System.Drawing.Point(91, 64);
this.txtShopPassword.Name = "txtShopPassword";
this.txtShopPassword.PasswordChar = '●';
this.txtShopPassword.Size = new System.Drawing.Size(172, 23);
this.txtShopPassword.TabIndex = 338;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(29, 67);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(56, 17);
this.label2.TabIndex = 337;
this.label2.Text = "登录密码";
//
// txtLoginName
//
this.txtLoginName.Location = new System.Drawing.Point(91, 29);
this.txtLoginName.Name = "txtLoginName";
this.txtLoginName.Size = new System.Drawing.Size(172, 23);
this.txtLoginName.TabIndex = 336;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(29, 32);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(56, 17);
this.label1.TabIndex = 0;
this.label1.Text = "登录账号";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(29, 172);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(56, 17);
this.label5.TabIndex = 377;
this.label5.Text = "店铺分组";
//
// btnOk
//
this.btnOk.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnOk.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnOk.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnOk.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnOk.ForeColor = System.Drawing.Color.White;
this.btnOk.Location = new System.Drawing.Point(208, 209);
this.btnOk.Margin = new System.Windows.Forms.Padding(2);
this.btnOk.Name = "btnOk";
this.btnOk.Size = new System.Drawing.Size(55, 26);
this.btnOk.TabIndex = 372;
this.btnOk.Text = "新增";
this.btnOk.UseVisualStyleBackColor = false;
this.btnOk.Click += new System.EventHandler(this.btnOk_Click);
//
// ShopAddEditForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.ClientSize = new System.Drawing.Size(297, 319);
this.Controls.Add(this.panel2);
this.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "ShopAddEditForm";
this.Text = "添加店铺";
this.TitleText = "添加店铺";
this.Load += new System.EventHandler(this.ShopAddEditForm_Load);
this.Controls.SetChildIndex(this.panel2, 0);
this.panel2.ResumeLayout(false);
this.panel2.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox txtShopPassword;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox txtLoginName;
private UserControls.ButtonEx btnOk;
private System.Windows.Forms.Label label5;
private DevComponents.DotNetBar.Controls.TextBoxX txtUploadAccount;
private System.Windows.Forms.Label label3;
private DevComponents.DotNetBar.Controls.TextBoxX txtBuyAccount;
private System.Windows.Forms.Label label6;
private DevComponents.DotNetBar.Controls.TextBoxX txtChatAccount;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.ComboBox cmbGroup;
private System.Windows.Forms.Label label7;
}
}
Loaded 100 of 694 files, more files were not shown because too many files have changed in this diff. Show more