超级店铺管理功能

This commit is contained in:
wule committed 2025-07-09 10:09:32 +08:00
1 parent d3e404ac2a
commit fe2d2883db
91 files changed
+4295 -587

No files matched your search

+248
View File
@@ -0,0 +1,248 @@
namespace TemuKJD.UserControls
{
partial class UcSplitPage
{
/// <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.btnPrev = new DevComponents.DotNetBar.PanelEx();
this.btnNext = new DevComponents.DotNetBar.PanelEx();
this.lblPage = new System.Windows.Forms.Label();
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
this.flowLayoutPanel2 = new System.Windows.Forms.FlowLayoutPanel();
this.pnlJump = new DevComponents.DotNetBar.PanelEx();
this.label1 = new System.Windows.Forms.Label();
this.txtJumpPage = new DevComponents.DotNetBar.Controls.TextBoxX();
this.lblJump = new System.Windows.Forms.Label();
this.lblTotal = new System.Windows.Forms.Label();
this.flowLayoutPanel2.SuspendLayout();
this.SuspendLayout();
//
// btnPrev
//
this.btnPrev.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)));
this.btnPrev.AutoSize = true;
this.btnPrev.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnPrev.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnPrev.DisabledBackColor = System.Drawing.Color.Empty;
this.btnPrev.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnPrev.Location = new System.Drawing.Point(206, 0);
this.btnPrev.Margin = new System.Windows.Forms.Padding(3, 0, 3, 0);
this.btnPrev.Name = "btnPrev";
this.btnPrev.Size = new System.Drawing.Size(44, 20);
this.btnPrev.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnPrev.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnPrev.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnPrev.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnPrev.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnPrev.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnPrev.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnPrev.Style.GradientAngle = 90;
this.btnPrev.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnPrev.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnPrev.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnPrev.TabIndex = 431;
this.btnPrev.Text = "上一页";
this.btnPrev.Click += new System.EventHandler(this.btnPrev_Click);
//
// btnNext
//
this.btnNext.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)));
this.btnNext.AutoSize = true;
this.btnNext.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.btnNext.Cursor = System.Windows.Forms.Cursors.Hand;
this.btnNext.DisabledBackColor = System.Drawing.Color.Empty;
this.btnNext.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnNext.Location = new System.Drawing.Point(277, 0);
this.btnNext.Margin = new System.Windows.Forms.Padding(3, 0, 3, 0);
this.btnNext.Name = "btnNext";
this.btnNext.Size = new System.Drawing.Size(44, 20);
this.btnNext.Style.Alignment = System.Drawing.StringAlignment.Center;
this.btnNext.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnNext.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.btnNext.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.btnNext.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.btnNext.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.btnNext.Style.ForeColor.Color = System.Drawing.Color.White;
this.btnNext.Style.GradientAngle = 90;
this.btnNext.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.btnNext.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnNext.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.btnNext.TabIndex = 435;
this.btnNext.Text = "下一页";
this.btnNext.Click += new System.EventHandler(this.btnNext_Click);
//
// lblPage
//
this.lblPage.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)));
this.lblPage.AutoSize = true;
this.lblPage.Location = new System.Drawing.Point(256, 0);
this.lblPage.Name = "lblPage";
this.lblPage.Size = new System.Drawing.Size(15, 20);
this.lblPage.TabIndex = 436;
this.lblPage.Text = "1";
this.lblPage.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// flowLayoutPanel1
//
this.flowLayoutPanel1.Location = new System.Drawing.Point(3, 3);
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
this.flowLayoutPanel1.Size = new System.Drawing.Size(200, 100);
this.flowLayoutPanel1.TabIndex = 437;
//
// flowLayoutPanel2
//
this.flowLayoutPanel2.Controls.Add(this.pnlJump);
this.flowLayoutPanel2.Controls.Add(this.label1);
this.flowLayoutPanel2.Controls.Add(this.txtJumpPage);
this.flowLayoutPanel2.Controls.Add(this.lblJump);
this.flowLayoutPanel2.Controls.Add(this.btnNext);
this.flowLayoutPanel2.Controls.Add(this.lblPage);
this.flowLayoutPanel2.Controls.Add(this.btnPrev);
this.flowLayoutPanel2.Controls.Add(this.lblTotal);
this.flowLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.flowLayoutPanel2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.flowLayoutPanel2.Location = new System.Drawing.Point(0, 0);
this.flowLayoutPanel2.Margin = new System.Windows.Forms.Padding(0);
this.flowLayoutPanel2.Name = "flowLayoutPanel2";
this.flowLayoutPanel2.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
this.flowLayoutPanel2.Size = new System.Drawing.Size(480, 23);
this.flowLayoutPanel2.TabIndex = 0;
//
// pnlJump
//
this.pnlJump.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)));
this.pnlJump.AutoSize = true;
this.pnlJump.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
this.pnlJump.Cursor = System.Windows.Forms.Cursors.Hand;
this.pnlJump.DisabledBackColor = System.Drawing.Color.Empty;
this.pnlJump.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.pnlJump.Location = new System.Drawing.Point(446, 0);
this.pnlJump.Margin = new System.Windows.Forms.Padding(3, 0, 3, 0);
this.pnlJump.Name = "pnlJump";
this.pnlJump.Size = new System.Drawing.Size(31, 20);
this.pnlJump.Style.Alignment = System.Drawing.StringAlignment.Center;
this.pnlJump.Style.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.pnlJump.Style.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
this.pnlJump.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
this.pnlJump.Style.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
this.pnlJump.Style.BorderSide = DevComponents.DotNetBar.eBorderSide.None;
this.pnlJump.Style.ForeColor.Color = System.Drawing.Color.White;
this.pnlJump.Style.GradientAngle = 90;
this.pnlJump.StyleMouseOver.Alignment = System.Drawing.StringAlignment.Center;
this.pnlJump.StyleMouseOver.BackColor1.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.pnlJump.StyleMouseOver.BackColor2.Color = System.Drawing.Color.FromArgb(((int)(((byte)(25)))), ((int)(((byte)(102)))), ((int)(((byte)(255)))));
this.pnlJump.TabIndex = 439;
this.pnlJump.Text = "跳转";
this.pnlJump.Click += new System.EventHandler(this.pnlJump_Click);
//
// label1
//
this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)));
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(420, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(20, 20);
this.label1.TabIndex = 445;
this.label1.Text = "页";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// txtJumpPage
//
this.txtJumpPage.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)));
//
//
//
this.txtJumpPage.Border.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.txtJumpPage.Border.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.txtJumpPage.Border.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.txtJumpPage.Border.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
this.txtJumpPage.Border.Class = "CrumbBarBackgroundKey";
this.txtJumpPage.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
this.txtJumpPage.Border.PaddingBottom = 2;
this.txtJumpPage.Border.PaddingLeft = 2;
this.txtJumpPage.Border.PaddingRight = 2;
this.txtJumpPage.Border.PaddingTop = 2;
this.txtJumpPage.Font = new System.Drawing.Font("微软雅黑", 7.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtJumpPage.Location = new System.Drawing.Point(382, 0);
this.txtJumpPage.Margin = new System.Windows.Forms.Padding(0);
this.txtJumpPage.Name = "txtJumpPage";
this.txtJumpPage.Size = new System.Drawing.Size(35, 21);
this.txtJumpPage.TabIndex = 444;
this.txtJumpPage.Text = "1";
//
// lblJump
//
this.lblJump.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)));
this.lblJump.AutoSize = true;
this.lblJump.Location = new System.Drawing.Point(327, 0);
this.lblJump.Name = "lblJump";
this.lblJump.Size = new System.Drawing.Size(52, 20);
this.lblJump.TabIndex = 437;
this.lblJump.Text = "跳转到 ";
this.lblJump.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// lblTotal
//
this.lblTotal.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)));
this.lblTotal.AutoSize = true;
this.lblTotal.Location = new System.Drawing.Point(161, 0);
this.lblTotal.Name = "lblTotal";
this.lblTotal.Size = new System.Drawing.Size(39, 20);
this.lblTotal.TabIndex = 446;
this.lblTotal.Text = "共1页";
this.lblTotal.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// UcSplitPage
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.flowLayoutPanel2);
this.Controls.Add(this.flowLayoutPanel1);
this.Margin = new System.Windows.Forms.Padding(0);
this.Name = "UcSplitPage";
this.Size = new System.Drawing.Size(480, 23);
this.flowLayoutPanel2.ResumeLayout(false);
this.flowLayoutPanel2.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private DevComponents.DotNetBar.PanelEx btnPrev;
private DevComponents.DotNetBar.PanelEx btnNext;
private System.Windows.Forms.Label lblPage;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel2;
private System.Windows.Forms.Label lblJump;
private DevComponents.DotNetBar.PanelEx pnlJump;
private System.Windows.Forms.Label label1;
private DevComponents.DotNetBar.Controls.TextBoxX txtJumpPage;
private System.Windows.Forms.Label lblTotal;
}
}
+91
View File
@@ -0,0 +1,91 @@
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 TemuKJD.UserControls
{
public partial class UcSplitPage : UserControl
{
int totalPage = 1;
public int TotalPage
{
get { return totalPage; }
set
{
if (TotalPage != value && value > 0)
{
totalPage = value;
if (InvokeRequired)
{
Invoke(new Action(() =>
{
this.lblTotal.Text = "共" + totalPage + "页";
}));
}
else
this.lblTotal.Text = "共" + totalPage + "页";
}
}
}
int currentPage = 1;
public int CurrentPage
{
get { return currentPage; }
set
{
if (currentPage != value)
{
currentPage = value;
if (InvokeRequired)
{
Invoke(new Action(() =>
{
this.lblPage.Text = "" + currentPage;
}));
}
else
this.lblPage.Text = "" + currentPage;
OnPageChange(this);
}
}
}
public event Action<object> PageChange;
protected virtual void OnPageChange(object sender)
{
this.PageChange?.Invoke(sender);
}
public UcSplitPage()
{
InitializeComponent();
}
private void pnlJump_Click(object sender, EventArgs e)
{
int page = this.txtJumpPage.Text.ParseToInt();
this.CurrentPage = Math.Max(1, page);
}
private void btnPrev_Click(object sender, EventArgs e)
{
int page = this.CurrentPage - 1;
this.CurrentPage = Math.Max(1, page);
}
private void btnNext_Click(object sender, EventArgs e)
{
int page = this.CurrentPage + 1;
this.CurrentPage = Math.Min(totalPage, page);
}
}
}
+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>