基线 SVN r240
SVN-Revision: r240
This commit is contained in:
@@ -0,0 +1,171 @@
|
||||
|
||||
namespace Lskj.ProductDynamic.Controls
|
||||
{
|
||||
partial class ImageButton
|
||||
{
|
||||
/// <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.imageLabel = new DevExpress.XtraEditors.LabelControl();
|
||||
this.linePanelTwo = new DevExpress.XtraEditors.PanelControl();
|
||||
this.lineTwo = new DevExpress.XtraEditors.LabelControl();
|
||||
this.simplebButton = new DevExpress.XtraEditors.LabelControl();
|
||||
this.linePanel = new DevExpress.XtraEditors.PanelControl();
|
||||
this.line = new DevExpress.XtraEditors.LabelControl();
|
||||
this.numLabel = new DevExpress.XtraEditors.LabelControl();
|
||||
((System.ComponentModel.ISupportInitialize)(this.linePanelTwo)).BeginInit();
|
||||
this.linePanelTwo.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.linePanel)).BeginInit();
|
||||
this.linePanel.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// imageLabel
|
||||
//
|
||||
this.imageLabel.Appearance.BackColor = System.Drawing.Color.Transparent;
|
||||
this.imageLabel.Appearance.Image = global::Lskj.ProductDynamic.Properties.Resources.right;
|
||||
this.imageLabel.AutoSizeMode = DevExpress.XtraEditors.LabelAutoSizeMode.None;
|
||||
this.imageLabel.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
|
||||
this.imageLabel.Dock = System.Windows.Forms.DockStyle.Left;
|
||||
this.imageLabel.Location = new System.Drawing.Point(0, 0);
|
||||
this.imageLabel.Name = "imageLabel";
|
||||
this.imageLabel.Size = new System.Drawing.Size(46, 36);
|
||||
this.imageLabel.TabIndex = 1;
|
||||
//
|
||||
// linePanelTwo
|
||||
//
|
||||
this.linePanelTwo.Appearance.BackColor = System.Drawing.Color.Transparent;
|
||||
this.linePanelTwo.Appearance.BackColor2 = System.Drawing.Color.Transparent;
|
||||
this.linePanelTwo.Appearance.BorderColor = System.Drawing.Color.Transparent;
|
||||
this.linePanelTwo.Appearance.Options.UseBackColor = true;
|
||||
this.linePanelTwo.Appearance.Options.UseBorderColor = true;
|
||||
this.linePanelTwo.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
|
||||
this.linePanelTwo.Controls.Add(this.lineTwo);
|
||||
this.linePanelTwo.Dock = System.Windows.Forms.DockStyle.Left;
|
||||
this.linePanelTwo.Location = new System.Drawing.Point(46, 0);
|
||||
this.linePanelTwo.Name = "linePanelTwo";
|
||||
this.linePanelTwo.Padding = new System.Windows.Forms.Padding(0, 8, 0, 8);
|
||||
this.linePanelTwo.Size = new System.Drawing.Size(2, 36);
|
||||
this.linePanelTwo.TabIndex = 10;
|
||||
//
|
||||
// lineTwo
|
||||
//
|
||||
this.lineTwo.Appearance.BackColor = System.Drawing.Color.Transparent;
|
||||
this.lineTwo.Appearance.BorderColor = System.Drawing.Color.White;
|
||||
this.lineTwo.AutoSizeMode = DevExpress.XtraEditors.LabelAutoSizeMode.None;
|
||||
this.lineTwo.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.Simple;
|
||||
this.lineTwo.Dock = System.Windows.Forms.DockStyle.Left;
|
||||
this.lineTwo.Location = new System.Drawing.Point(0, 8);
|
||||
this.lineTwo.Name = "lineTwo";
|
||||
this.lineTwo.Size = new System.Drawing.Size(2, 20);
|
||||
this.lineTwo.TabIndex = 3;
|
||||
//
|
||||
// simplebButton
|
||||
//
|
||||
this.simplebButton.Appearance.BackColor = System.Drawing.Color.Transparent;
|
||||
this.simplebButton.Appearance.Font = new System.Drawing.Font("微软雅黑", 13.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.simplebButton.Appearance.ForeColor = System.Drawing.Color.White;
|
||||
this.simplebButton.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
|
||||
this.simplebButton.AutoSizeMode = DevExpress.XtraEditors.LabelAutoSizeMode.None;
|
||||
this.simplebButton.Dock = System.Windows.Forms.DockStyle.Left;
|
||||
this.simplebButton.Location = new System.Drawing.Point(48, 0);
|
||||
this.simplebButton.Name = "simplebButton";
|
||||
this.simplebButton.Size = new System.Drawing.Size(94, 36);
|
||||
this.simplebButton.TabIndex = 11;
|
||||
this.simplebButton.Text = "按钮";
|
||||
//
|
||||
// linePanel
|
||||
//
|
||||
this.linePanel.Appearance.BackColor = System.Drawing.Color.Transparent;
|
||||
this.linePanel.Appearance.BackColor2 = System.Drawing.Color.Transparent;
|
||||
this.linePanel.Appearance.BorderColor = System.Drawing.Color.Transparent;
|
||||
this.linePanel.Appearance.Options.UseBackColor = true;
|
||||
this.linePanel.Appearance.Options.UseBorderColor = true;
|
||||
this.linePanel.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
|
||||
this.linePanel.Controls.Add(this.line);
|
||||
this.linePanel.Dock = System.Windows.Forms.DockStyle.Left;
|
||||
this.linePanel.Location = new System.Drawing.Point(142, 0);
|
||||
this.linePanel.Name = "linePanel";
|
||||
this.linePanel.Padding = new System.Windows.Forms.Padding(0, 8, 0, 8);
|
||||
this.linePanel.Size = new System.Drawing.Size(2, 36);
|
||||
this.linePanel.TabIndex = 12;
|
||||
//
|
||||
// line
|
||||
//
|
||||
this.line.Appearance.BackColor = System.Drawing.Color.Transparent;
|
||||
this.line.Appearance.BorderColor = System.Drawing.Color.White;
|
||||
this.line.AutoSizeMode = DevExpress.XtraEditors.LabelAutoSizeMode.None;
|
||||
this.line.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.Simple;
|
||||
this.line.Dock = System.Windows.Forms.DockStyle.Left;
|
||||
this.line.Location = new System.Drawing.Point(0, 8);
|
||||
this.line.Name = "line";
|
||||
this.line.Size = new System.Drawing.Size(2, 20);
|
||||
this.line.TabIndex = 3;
|
||||
//
|
||||
// numLabel
|
||||
//
|
||||
this.numLabel.Appearance.BackColor = System.Drawing.Color.Transparent;
|
||||
this.numLabel.Appearance.Font = new System.Drawing.Font("微软雅黑", 13.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.numLabel.Appearance.ForeColor = System.Drawing.Color.White;
|
||||
this.numLabel.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
|
||||
this.numLabel.AutoSizeMode = DevExpress.XtraEditors.LabelAutoSizeMode.None;
|
||||
this.numLabel.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.numLabel.Location = new System.Drawing.Point(144, 0);
|
||||
this.numLabel.Name = "numLabel";
|
||||
this.numLabel.Size = new System.Drawing.Size(79, 36);
|
||||
this.numLabel.TabIndex = 13;
|
||||
this.numLabel.Text = "数量";
|
||||
//
|
||||
// ImageButton
|
||||
//
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(87)))), ((int)(((byte)(148)))), ((int)(((byte)(255)))));
|
||||
this.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.Controls.Add(this.numLabel);
|
||||
this.Controls.Add(this.linePanel);
|
||||
this.Controls.Add(this.simplebButton);
|
||||
this.Controls.Add(this.linePanelTwo);
|
||||
this.Controls.Add(this.imageLabel);
|
||||
this.Name = "ImageButton";
|
||||
this.Size = new System.Drawing.Size(223, 36);
|
||||
((System.ComponentModel.ISupportInitialize)(this.linePanelTwo)).EndInit();
|
||||
this.linePanelTwo.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.linePanel)).EndInit();
|
||||
this.linePanel.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private DevExpress.XtraEditors.LabelControl imageLabel;
|
||||
private DevExpress.XtraEditors.PanelControl linePanelTwo;
|
||||
private DevExpress.XtraEditors.LabelControl lineTwo;
|
||||
private DevExpress.XtraEditors.LabelControl simplebButton;
|
||||
private DevExpress.XtraEditors.PanelControl linePanel;
|
||||
private DevExpress.XtraEditors.LabelControl line;
|
||||
private DevExpress.XtraEditors.LabelControl numLabel;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,124 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Lskj.ProductDynamic.Controls
|
||||
{
|
||||
public partial class ImageButton : UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// this label控件
|
||||
/// </summary>
|
||||
private DevExpress.XtraEditors.LabelControl _imageLabel;
|
||||
public DevExpress.XtraEditors.LabelControl ImageLabel
|
||||
{
|
||||
get
|
||||
{
|
||||
_imageLabel = this.imageLabel;
|
||||
return _imageLabel;
|
||||
}
|
||||
set { _imageLabel = value; }
|
||||
}
|
||||
/// <summary>
|
||||
/// this numlabel控件
|
||||
/// </summary>
|
||||
private DevExpress.XtraEditors.LabelControl _numLabel;
|
||||
public DevExpress.XtraEditors.LabelControl NumLabel
|
||||
{
|
||||
get
|
||||
{
|
||||
_numLabel = this.numLabel;
|
||||
return _numLabel;
|
||||
}
|
||||
set { _numLabel = value; }
|
||||
}
|
||||
private DevExpress.XtraEditors.LabelControl _simpleButton;
|
||||
/// <summary>
|
||||
/// this simpleButton控件
|
||||
/// </summary>
|
||||
public DevExpress.XtraEditors.LabelControl SimpleButton
|
||||
{
|
||||
get
|
||||
{
|
||||
_simpleButton = this.simplebButton;
|
||||
return _simpleButton;
|
||||
}
|
||||
set { _simpleButton = value; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 默认颜色
|
||||
/// </summary>
|
||||
private Color emptyColor;
|
||||
/// <summary>
|
||||
/// 按钮模型
|
||||
/// </summary>
|
||||
public ProductDynamicBtnModel productDynamicBtnModel;
|
||||
public DataRow focusedRow;
|
||||
public ImageButton(DataRow row)
|
||||
{
|
||||
InitializeComponent();
|
||||
productDynamicBtnModel = new ProductDynamicBtnModel(row);
|
||||
this.focusedRow = row;
|
||||
this.Load += new EventHandler(OnImageButton_Load);
|
||||
this.simplebButton.MouseMove += new MouseEventHandler(OnSimpleButton_MouseMove);
|
||||
this.simplebButton.MouseLeave += new EventHandler(OnSimplebButton_MouseLeave);
|
||||
this.imageLabel.MouseMove += new MouseEventHandler(OnSimpleButton_MouseMove);
|
||||
this.imageLabel.MouseLeave += new EventHandler(OnSimplebButton_MouseLeave);
|
||||
this.numLabel.MouseMove += new MouseEventHandler(OnSimpleButton_MouseMove);
|
||||
this.numLabel.MouseLeave += new EventHandler(OnSimplebButton_MouseLeave);
|
||||
}
|
||||
/// <summary>
|
||||
/// 窗体加载时
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void OnImageButton_Load(object sender, EventArgs e)
|
||||
{
|
||||
this.emptyColor = this.BackColor;
|
||||
this.imageLabel.Width = this.Height + 10;
|
||||
if (productDynamicBtnModel != null)
|
||||
{
|
||||
this.simplebButton.Text = productDynamicBtnModel.ProductName;
|
||||
this.numLabel.Text = productDynamicBtnModel.Amount;
|
||||
try
|
||||
{
|
||||
if (!string.IsNullOrEmpty(productDynamicBtnModel.ProductPic))
|
||||
{
|
||||
Image image = Image.FromFile(Util.PubUtil.ProductDynamic + productDynamicBtnModel.ProductPic);
|
||||
this.imageLabel.Appearance.Image = image;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.imageLabel.Appearance.Image = global::Lskj.ProductDynamic.Properties.Resources.right;
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 鼠标离开事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void OnSimplebButton_MouseLeave(object sender, EventArgs e)
|
||||
{
|
||||
this.BackColor = emptyColor;
|
||||
}
|
||||
/// <summary>
|
||||
/// 鼠标滑过事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void OnSimpleButton_MouseMove(object sender, MouseEventArgs e)
|
||||
{
|
||||
this.BackColor = ColorTranslator.FromHtml("#1872cd");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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,52 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace Lskj.ProductDynamic.Controls
|
||||
{
|
||||
/// <summary>
|
||||
/// 动态按钮模型
|
||||
/// </summary>
|
||||
public class ProductDynamicBtnModel
|
||||
{
|
||||
private string productName;
|
||||
private string productPic;
|
||||
private string productTip;
|
||||
private string detailId;
|
||||
private string dynamicSql;
|
||||
private int productState;
|
||||
private string errorMessage;
|
||||
private string amount;
|
||||
#region 公有变量
|
||||
public string ProductName { get { return productName; } set { productName = value; } }
|
||||
public string ProductPic { get { return productPic; } set { productPic = value; } }
|
||||
public string ProductTip { get { return productTip; } set { productTip = value; } }
|
||||
public string DetailId { get { return detailId; } set { detailId = value; } }
|
||||
public string DynamicSql { get { return dynamicSql; } set { dynamicSql = value; } }
|
||||
public int ProductState { get { return productState; } set { productState = value; } }
|
||||
public string ErrorMessage { get { return errorMessage; } set { errorMessage = value; } }
|
||||
public string Amount { get { return amount; } set { amount = value; } }
|
||||
|
||||
#endregion
|
||||
public ProductDynamicBtnModel(DataRow row)
|
||||
{
|
||||
//productName = row.Table.Columns.Contains("ProductName") ? row["ProductName"] + "" : "";
|
||||
//productPic = row.Table.Columns.Contains("ProductPic") ? row["ProductPic"] + "" : "";
|
||||
//productTip = row.Table.Columns.Contains("ProductTip") ? row["ProductTip"] + "" : "";
|
||||
//detailId = row.Table.Columns.Contains("DetailId") ? row["DetailId"] + "" : "";
|
||||
//dynamicSql = row.Table.Columns.Contains("DynamicSql") ? row["DynamicSql"] + "" : "";
|
||||
//productState = row.Table.Columns.Contains("ProductState") && !string.IsNullOrEmpty(row["ProductState"] + "") ? int.TryParse(row["ProductState"] + "", out productState) ? Convert.ToInt32(row["ProductState"] + "") : 0 : 0;
|
||||
//errorMessage = row.Table.Columns.Contains("ErrorMessage") ? row["ErrorMessage"] + "" : "";
|
||||
productName = row.Table.Columns.Contains("title") ? row["title"] + "" : "";
|
||||
productPic = row.Table.Columns.Contains("imgsource") ? row["imgsource"] + "" : "";
|
||||
productTip = row.Table.Columns.Contains("content") ? row["content"] + "" : "";
|
||||
detailId = row.Table.Columns.Contains("detailid") ? row["detailid"] + "" : "";
|
||||
dynamicSql = row.Table.Columns.Contains("DynamicSql") ? row["DynamicSql"] + "" : "";
|
||||
productState = row.Table.Columns.Contains("ProductState") && !string.IsNullOrEmpty(row["ProductState"] + "") ? int.TryParse(row["ProductState"] + "", out productState) ? Convert.ToInt32(row["ProductState"] + "") : 0 : 0;
|
||||
errorMessage = row.Table.Columns.Contains("ErrorMessage") ? row["ErrorMessage"] + "" : "";
|
||||
amount = row.Table.Columns.Contains("amount") ? row["amount"] + "" : "";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
namespace Lskj.ProductDynamic.Controls
|
||||
{
|
||||
partial class SimpleButton
|
||||
{
|
||||
/// <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.simpleBtn = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// simpleBtn
|
||||
//
|
||||
this.simpleBtn.Appearance.BackColor = System.Drawing.Color.Transparent;
|
||||
this.simpleBtn.Appearance.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
|
||||
this.simpleBtn.Appearance.ForeColor = System.Drawing.Color.White;
|
||||
this.simpleBtn.Appearance.Options.UseBackColor = true;
|
||||
this.simpleBtn.Appearance.Options.UseFont = true;
|
||||
this.simpleBtn.Appearance.Options.UseForeColor = true;
|
||||
this.simpleBtn.ButtonStyle = DevExpress.XtraEditors.Controls.BorderStyles.Simple;
|
||||
this.simpleBtn.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.simpleBtn.Location = new System.Drawing.Point(0, 0);
|
||||
this.simpleBtn.Name = "simpleBtn";
|
||||
this.simpleBtn.ShowFocusRectangle = DevExpress.Utils.DefaultBoolean.False;
|
||||
this.simpleBtn.Size = new System.Drawing.Size(120, 36);
|
||||
this.simpleBtn.TabIndex = 0;
|
||||
this.simpleBtn.Text = "按钮";
|
||||
//
|
||||
// SimpleButton
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(87)))), ((int)(((byte)(148)))), ((int)(((byte)(255)))));
|
||||
this.Controls.Add(this.simpleBtn);
|
||||
this.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.Name = "SimpleButton";
|
||||
this.Size = new System.Drawing.Size(120, 36);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private DevExpress.XtraEditors.SimpleButton simpleBtn;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Lskj.ProductDynamic.Controls
|
||||
{
|
||||
public partial class SimpleButton : UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// this button控件
|
||||
/// </summary>
|
||||
private DevExpress.XtraEditors.SimpleButton _simpleButton;
|
||||
public DevExpress.XtraEditors.SimpleButton simpleButton
|
||||
{
|
||||
get
|
||||
{
|
||||
_simpleButton = this.simpleBtn;
|
||||
return _simpleButton;
|
||||
}
|
||||
set { _simpleButton = value; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 默认颜色
|
||||
/// </summary>
|
||||
private Color emptyColor;
|
||||
public SimpleButton()
|
||||
{
|
||||
InitializeComponent();
|
||||
this.Load += new EventHandler(OnSimpleButton_Load);
|
||||
this.simpleButton.MouseMove += new MouseEventHandler(OnSimpleButton_MouseMove);
|
||||
this.simpleButton.MouseLeave += new EventHandler(OnSimpleButton_MouseLeave);
|
||||
}
|
||||
|
||||
private void OnSimpleButton_Load(object sender, EventArgs e)
|
||||
{
|
||||
this.emptyColor = this.BackColor;
|
||||
}
|
||||
|
||||
private void OnSimpleButton_MouseLeave(object sender, EventArgs e)
|
||||
{
|
||||
this.BackColor = emptyColor;
|
||||
}
|
||||
|
||||
private void OnSimpleButton_MouseMove(object sender, MouseEventArgs e)
|
||||
{
|
||||
this.BackColor = ColorTranslator.FromHtml("#1872cd");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
Reference in New Issue
Block a user