init lserp cs 5.0

This commit is contained in:
cyf
2026-07-10 15:25:05 +08:00
commit 90f3fda86a
3799 changed files with 976868 additions and 0 deletions
@@ -0,0 +1,84 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Lskj.MyControl.LookUp
{
public class ControlModelTag_Bak
{
public ControlModelTag_Bak()
{
}
public ControlModelTag_Bak(bool IsSave, bool IsEmpt, string TipMsg, int filedTypeid, bool IsClear, string DefaultValue,
string DefaultText, object Tag)
{
this.IsSave = IsSave;
this.IsEmpt = IsEmpt;
this.TipMsg = TipMsg;
this.fieldTypeId = filedTypeid;
this.IsClear = IsClear;
this.DefaultValue = DefaultValue;
this.DefaultText = DefaultText;
this.Tag = Tag;
}
/// <summary>
/// 是否保存
/// </summary>
public bool IsSave { get; set; }
/// <summary>
/// 是否为空
/// </summary>
public bool IsEmpt { get; set; }
/// <summary>
/// 提示信息
/// </summary>
public string TipMsg { get; set; }
/// <summary>
/// 控件类型
/// </summary>
public int fieldTypeId { get; set; }
/// <summary>
/// 控件字段
/// </summary>
public string fieldName { get; set; }
/// <summary>
/// 是否清除
/// </summary>
public bool IsClear { get; set; }
/// <summary>
///默认Vlaue值
/// </summary>
public string DefaultValue { get; set; }
/// <summary>
/// 默认Text
/// </summary>
public string DefaultText { get; set; }
/// <summary>
/// 关联字段
/// </summary>
public string unionFields { get; set; }
/// <summary>
/// 关联值
/// </summary>
public string unionValue { get; set; }
/// <summary>
/// 扩展字段
/// </summary>
public object Tag { get; set; }
/// <summary>
/// 赋值
/// </summary>
public bool isSetText { get; set; }
/// <summary>
/// 时间格式化
/// </summary>
public string DateFormat { get; set; }
///<summary>
///下拉sql
///</summary>
public string lookupSql { get; set; }
}
}
+554
View File
@@ -0,0 +1,554 @@
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;
using CommonLib.data;
using CommonLib;
using DevExpress.XtraGrid.Columns;
using DevExpress.Utils;
using DevExpress.XtraGrid.Views.Grid;
using System.Collections;
using DevExpress.XtraEditors;
namespace Lskj.MyControl.LookUp
{
public partial class FrmMain : FormBase
{
#region
/// <summary>
/// sql语句
/// </summary>
public string SQL { get; set; }
public string sourceSQL { get; set; }
/// <summary>
/// 列集合
/// </summary>
public Dictionary<string, string> Columns { get; set; }
/// <summary>
/// 选择Value字段
/// </summary>
public string ValueField { get; set; }
/// <summary>
/// 选择Text字段
/// </summary>
public string TextField { get; set; }
/// <summary>
/// 是否多选
/// </summary>
public bool IsMultiple { get; set; }
/// <summary>
/// 窗体高度
/// </summary>
public int WinHeight { get; set; }
/// <summary>
/// 窗体宽度
/// </summary>
public int WinWidth { get; set; }
/// <summary>
/// 返回Value
/// </summary>
public string ReturnValue { get; set; }
/// <summary>
/// 返回Text
/// </summary>
public string ReturnText { get; set; }
/// <summary>
/// 窗体标题
/// </summary>
public string FrmTitle { get; set; }
/// <summary>
///
/// </summary>
public int IsText { get; set; }
#endregion
private IList<string> RText = new List<string>();
private IList<string> RValue = new List<string>();
private GridColumnCollection gc;
private String strWhere = string.Empty;
private String colStr = String.Empty;
private DataTable dtSelect;
private DataTable dtData;
public FrmMain()
{
InitializeComponent();
gvMain.CustomDrawRowIndicator += new RowIndicatorCustomDrawEventHandler(gvMain_CustomDrawRowIndicator);
gvMain.RowCellClick += new RowCellClickEventHandler(gvMain_RowCellClick);
}
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
if (WinHeight > 0)
{
this.Height = WinHeight;
}
if (WinWidth > 0)
{
this.Width = WinWidth;
}
if (!string.IsNullOrEmpty(FrmTitle))
{
this.Text = FrmTitle;
}
if (!string.IsNullOrEmpty(ReturnText))
{
RText = ReturnText.Split(',').ToList();
}
if (!string.IsNullOrEmpty(ReturnValue))
{
RValue = ReturnValue.Split(',').ToList();
}
dtData = SqlHelper.ExecuteDataSet(SQL).Tables[0];
//绑定列z
SetColumns(dtData);
//绑定选中列
SetColumns2(dtData);
//绑定数据源
gridMain.DataSource = dtData;
dtSelect = new DataTable();
dtSelect.Columns.Clear();
DataColumn dc2 = new DataColumn()
{
Caption = "选择",
DataType = typeof(bool),
ColumnName = "Id",
DefaultValue = false
};
dtSelect.Columns.Add(dc2);
foreach (var col in Columns.Keys)
{
DataColumn dc = new DataColumn()
{
Caption = Columns[col],
DataType = typeof(String),
ColumnName = col,
DefaultValue = ""
};
dtSelect.Columns.Add(col);
}
gc = new GridColumnCollection(null);
colStr = "";
strWhere = "";
for (int i = 0; i < gvMain.Columns.Count; i++)
{
if (gvMain.Columns[i].Caption == "选择")
continue;
gc.Add(gvMain.Columns[i]);
if (i == gvMain.Columns.Count - 1)
{
if (ValueField.ToUpper() == gvMain.Columns[i].FieldName.ToUpper())
{
strWhere += gvMain.Columns[i].FieldName + " like '%{0}%' ";
}
else
{
strWhere += "dbo.p_getpy(" + gvMain.Columns[i].FieldName + ") like '%{0}%' or ";
strWhere += gvMain.Columns[i].FieldName + " like '%{0}%' ";
}
}
else
{
if (ValueField.ToUpper() == gvMain.Columns[i].FieldName.ToUpper())
{
strWhere += gvMain.Columns[i].FieldName + " like '%{0}%' or ";
}
else
{
strWhere += "dbo.p_getpy(" + gvMain.Columns[i].FieldName + ") like '%{0}%' or ";
strWhere += gvMain.Columns[i].FieldName + " like '%{0}%' or ";
}
}
colStr += gvMain.Columns[i].Caption + "、";
}
colStr = "请输入" + colStr.Trim('、');
txtKey.Text = colStr;
gvMain.IndicatorWidth = 35;
if (!IsMultiple)
{
int result = gvMain.LocateByValue(TextField, ReturnText, null);
if (result >= 0)
{
gvMain.SelectRow(result);
}
}
else
{
selectTextValue();
}
if (IsMultiple)
{
gbDetail.Visible = true;
btnDelete.Visible = true;
gridMain.ContextMenuStrip = contextMenuStrip1;
}
else
{
gbDetail.Visible = false;
btnDelete.Visible = false;
}
}
public void selectTextValue()
{
dtSelect.Clear();
if (IsText == 13)
{
for (int i = 0; i < RValue.Count; i++)
{
foreach (DataRow row in dtData.Rows)
{
if (row[ValueField].ToString().Equals(RValue[i]))
{
if (row.RowState != DataRowState.Deleted)
{
row["Id"] = true;
row.AcceptChanges();
dtSelect.ImportRow(row);
}
}
}
}
}
else
{
for (int i = 0; i < RText.Count; i++)
{
int result = gvMain.LocateByValue(TextField, RText[i], null);
if (result >= 0)
{
DataRow dr = gvMain.GetDataRow(result);
if (dr.RowState != DataRowState.Deleted)
{
dr["Id"] = true;
dr.AcceptChanges();
dtSelect.ImportRow(dr);
}
}
}
}
gcSelect.DataSource = dtSelect;
}
/// <summary>
/// 生成行号
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void gvMain_CustomDrawRowIndicator(object sender, RowIndicatorCustomDrawEventArgs e)
{
e.Appearance.TextOptions.HAlignment = HorzAlignment.Center;
if (e.Info.IsRowIndicator)
{
if (e.RowHandle >= 0)
{
e.Info.DisplayText = (e.RowHandle + 1).ToString();
}
}
}
/// <summary>
/// 设置grid 列
/// </summary>
public void SetColumns(DataTable dt)
{
gvMain.Columns.Clear();
if (IsMultiple)
{
DataColumn dc = new DataColumn()
{
Caption = "选择",
DataType = typeof(bool),
ColumnName = "Id",
DefaultValue = false
};
dt.Columns.Add(dc);
dt.AcceptChanges();
GridColumn gridColumnCheckBox = new GridColumn();
gridColumnCheckBox.FieldName = "Id";
gridColumnCheckBox.Name = "Id";
gridColumnCheckBox.Caption = "选择";
gridColumnCheckBox.Width = 40;
gridColumnCheckBox.AppearanceHeader.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
gridColumnCheckBox.Visible = true;
gvMain.Columns.Add(gridColumnCheckBox);
}
foreach (var col in Columns.Keys)
{
GridColumn gridColumn = new GridColumn();
gridColumn.FieldName = col.ToLower();
gridColumn.Name = col.ToLower();
gridColumn.Caption = Columns[col];
gridColumn.Width = 200;
gridColumn.Visible = true;
gridColumn.OptionsColumn.AllowEdit = false;
gridColumn.OptionsColumn.ReadOnly = false;
gvMain.Columns.Add(gridColumn);
gvMain.Appearance.HeaderPanel.TextOptions.HAlignment = HorzAlignment.Center;
}
}
/// <summary>
/// 设置grid 列
/// </summary>
public void SetColumns2(DataTable dt)
{
gvSelect.Columns.Clear();
foreach (var col in Columns.Keys)
{
GridColumn gridColumn = new GridColumn();
gridColumn.FieldName = col;
gridColumn.Name = col;
gridColumn.Caption = Columns[col];
gridColumn.Width = 200;
gridColumn.Visible = true;
gridColumn.OptionsColumn.AllowEdit = false;
gridColumn.OptionsColumn.ReadOnly = false;
gvSelect.Columns.Add(gridColumn);
gvSelect.Appearance.HeaderPanel.TextOptions.HAlignment = HorzAlignment.Center;
}
}
/// <summary>
/// 行点击事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void gvMain_RowCellClick(object sender, RowCellClickEventArgs e)
{
if (IsMultiple)
{
if (e.Button == MouseButtons.Left)
{
DataRow row = gvMain.GetDataRow(e.RowHandle);
string id = row["Id"] + "";
if (id.IndexOf("true", StringComparison.OrdinalIgnoreCase) != -1)
{
row["Id"] = false;
//删除不需要再进行判断定位
//if (gvSelect.LocateByValue(ValueField, row[ValueField], null) >= 0)
//{
for (int i = 0; i < dtSelect.Rows.Count; i++)
{
DataRow dr = dtSelect.Rows[i];
if (dr.RowState != DataRowState.Deleted)
{
if (dr[ValueField] + "" == row[ValueField] + "")
{
dr.Delete();
}
}
}
gcSelect.DataSource = dtSelect;
// }
}
else
{
row["Id"] = true;
if (gvSelect.LocateByValue(ValueField, row[ValueField], null) >= 0)
{
DialogResult dgRlt = XtraMessageBox.Show("抱歉,已经存在?", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
else
{
dtSelect.ImportRow(row);
gcSelect.DataSource = dtSelect;
}
}
}
}
}
/// <summary>
/// 搜索数据
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void btnSearch_Click(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(strWhere))
{
RValue.Clear();
RText.Clear();
foreach (DataRow row in dtSelect.Rows)
{
if (row.RowState != DataRowState.Deleted)
{
RValue.Add(row[ValueField] + "");
RText.Add(row[TextField] + "");
}
}
string mysql = String.Format("select * from (" + SQL + ") as tab where " + strWhere, txtKey.Text.Replace(colStr, ""));
DataTable dt = SqlHelper.ExecuteDataSet(mysql).Tables[0];
SetColumns(dt);
gridMain.DataSource = dt;
selectTextValue();
}
}
/// <summary>
/// 关闭窗口
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void btnClose_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.No;
}
/// <summary>
/// 确定-关闭
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void btnSave_Click(object sender, EventArgs e)
{
if (IsMultiple)
{
ReturnValue = "";
ReturnText = "";
foreach (DataRow row in dtSelect.Rows)
{
if (row.RowState != DataRowState.Deleted)
{
ReturnValue += row[ValueField] + ",";
ReturnText += row[TextField] + ",";
}
}
}
else
{
int[] rows = gvMain.GetSelectedRows();
if (rows.Length > 0)
{
DataRow row = gvMain.GetDataRow(rows[0]);
ReturnValue += "'" + row[ValueField] + "',";
ReturnText += row[TextField] + ",";
}
}
if (!string.IsNullOrEmpty(ReturnValue))
{
ReturnValue = ReturnValue.Trim(',');
}
if (!string.IsNullOrEmpty(ReturnText))
{
ReturnText = ReturnText.Trim(',');
}
this.DialogResult = DialogResult.OK;
}
private void txtKey_KeyDown(object sender, KeyEventArgs e)
{
if (colStr.Equals(txtKey.Text))
{
txtKey.Text = "";
}
}
private void txtKey_Leave(object sender, EventArgs e)
{
if (txtKey.Text == "")
{
txtKey.Text = colStr;
}
}
private void txtKey_Enter(object sender, EventArgs e)
{
if (colStr.Equals(txtKey.Text))
{
txtKey.Text = "";
}
}
private void btnDelete_Click(object sender, EventArgs e)
{
int[] rows = gvSelect.GetSelectedRows();
if (rows.Length < 1)
return;
int currentRow = rows[0];
if (currentRow > 0)
currentRow = currentRow - 1;
DataRow row = null;
foreach (int irow in rows)
{
row = gvSelect.GetDataRow(irow);
int mrow = gvMain.LocateByValue(TextField, row[TextField], null);
if (mrow >= 0)
{
DataRow row1 = gvMain.GetDataRow(mrow);
row1["id"] = false;
}
}
gvSelect.DeleteSelectedRows();
gvSelect.SelectRows(currentRow, currentRow);
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
foreach (DataRow row in dtData.Rows)
{
if (row.RowState != DataRowState.Deleted)
{
if (Convert.ToBoolean(row["Id"]) == false)
{
row["Id"] = true;
row.AcceptChanges();
dtSelect.ImportRow(row);
}
}
}
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
foreach (DataRow row in dtData.Rows)
{
if (row.RowState != DataRowState.Deleted)
{
if (Convert.ToBoolean(row["Id"]) == true)
{
row["Id"] = false;
row.AcceptChanges();
}
}
}
gvSelect.SelectAll();
gvSelect.DeleteSelectedRows();
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
foreach (DataRow row in dtData.Rows)
{
if (row.RowState != DataRowState.Deleted)
{
if (Convert.ToBoolean(row["Id"]) == true)
{
row["Id"] = false;
row.AcceptChanges();
int tmpRowHandle = gvSelect.LocateByValue(TextField, row[TextField], null);
if (tmpRowHandle >= 0)
{
gvSelect.DeleteRow(tmpRowHandle);
}
}
else
{
row["Id"] = true;
row.AcceptChanges();
dtSelect.ImportRow(row);
}
}
}
}
}
}
+306
View File
@@ -0,0 +1,306 @@
namespace Lskj.MyControl.LookUp
{
partial class FrmMain
{
/// <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();
this.panel1 = new System.Windows.Forms.Panel();
this.txtKey = new DevExpress.XtraEditors.TextEdit();
this.label1 = new System.Windows.Forms.Label();
this.btnSearch = new DevExpress.XtraEditors.SimpleButton();
this.panel2 = new System.Windows.Forms.Panel();
this.gridMain = new DevExpress.XtraGrid.GridControl();
this.gvMain = new DevExpress.XtraGrid.Views.Grid.GridView();
this.gbDetail = new System.Windows.Forms.Panel();
this.gcSelect = new DevExpress.XtraGrid.GridControl();
this.gvSelect = new DevExpress.XtraGrid.Views.Grid.GridView();
this.label2 = new System.Windows.Forms.Label();
this.panel3 = new System.Windows.Forms.Panel();
this.btnDelete = new DevExpress.XtraEditors.SimpleButton();
this.btnSave = new DevExpress.XtraEditors.SimpleButton();
this.btnClose = new DevExpress.XtraEditors.SimpleButton();
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
this.ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.txtKey.Properties)).BeginInit();
this.panel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.gridMain)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.gvMain)).BeginInit();
this.gbDetail.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.gcSelect)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.gvSelect)).BeginInit();
this.panel3.SuspendLayout();
this.contextMenuStrip1.SuspendLayout();
this.SuspendLayout();
//
// panel1
//
this.panel1.Controls.Add(this.txtKey);
this.panel1.Controls.Add(this.label1);
this.panel1.Controls.Add(this.btnSearch);
this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(635, 35);
this.panel1.TabIndex = 0;
this.panel1.Visible = false;
//
// txtKey
//
this.txtKey.Location = new System.Drawing.Point(56, 8);
this.txtKey.Name = "txtKey";
this.txtKey.Size = new System.Drawing.Size(239, 20);
this.txtKey.TabIndex = 5;
this.txtKey.Enter += new System.EventHandler(this.txtKey_Enter);
this.txtKey.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtKey_KeyDown);
this.txtKey.Leave += new System.EventHandler(this.txtKey_Leave);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(10, 12);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(41, 12);
this.label1.TabIndex = 4;
this.label1.Text = "关键词";
//
// btnSearch
//
this.btnSearch.Location = new System.Drawing.Point(302, 6);
this.btnSearch.Name = "btnSearch";
this.btnSearch.Size = new System.Drawing.Size(64, 23);
this.btnSearch.TabIndex = 3;
this.btnSearch.Text = "查询";
this.btnSearch.Click += new System.EventHandler(this.btnSearch_Click);
//
// panel2
//
this.panel2.Controls.Add(this.gridMain);
this.panel2.Controls.Add(this.gbDetail);
this.panel2.Controls.Add(this.panel3);
this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel2.Location = new System.Drawing.Point(0, 35);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(635, 412);
this.panel2.TabIndex = 1;
//
// gridMain
//
this.gridMain.Dock = System.Windows.Forms.DockStyle.Fill;
this.gridMain.EmbeddedNavigator.Appearance.Options.UseTextOptions = true;
this.gridMain.EmbeddedNavigator.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
this.gridMain.EmbeddedNavigator.Appearance.TextOptions.VAlignment = DevExpress.Utils.VertAlignment.Center;
this.gridMain.Location = new System.Drawing.Point(0, 0);
this.gridMain.MainView = this.gvMain;
this.gridMain.Name = "gridMain";
this.gridMain.Size = new System.Drawing.Size(635, 215);
this.gridMain.TabIndex = 14;
this.gridMain.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
this.gvMain});
//
// gvMain
//
this.gvMain.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFullFocus;
this.gvMain.GridControl = this.gridMain;
this.gvMain.Name = "gvMain";
this.gvMain.OptionsBehavior.EditorShowMode = DevExpress.Utils.EditorShowMode.Click;
this.gvMain.OptionsFind.AlwaysVisible = true;
this.gvMain.OptionsFind.FindDelay = 100;
this.gvMain.OptionsSelection.EnableAppearanceFocusedCell = false;
this.gvMain.OptionsView.ShowGroupPanel = false;
//
// gbDetail
//
this.gbDetail.Controls.Add(this.gcSelect);
this.gbDetail.Controls.Add(this.label2);
this.gbDetail.Dock = System.Windows.Forms.DockStyle.Bottom;
this.gbDetail.Location = new System.Drawing.Point(0, 215);
this.gbDetail.Name = "gbDetail";
this.gbDetail.Size = new System.Drawing.Size(635, 157);
this.gbDetail.TabIndex = 16;
//
// gcSelect
//
this.gcSelect.Dock = System.Windows.Forms.DockStyle.Fill;
this.gcSelect.EmbeddedNavigator.Appearance.Options.UseTextOptions = true;
this.gcSelect.EmbeddedNavigator.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
this.gcSelect.EmbeddedNavigator.Appearance.TextOptions.VAlignment = DevExpress.Utils.VertAlignment.Center;
this.gcSelect.Location = new System.Drawing.Point(0, 20);
this.gcSelect.MainView = this.gvSelect;
this.gcSelect.Name = "gcSelect";
this.gcSelect.Size = new System.Drawing.Size(635, 137);
this.gcSelect.TabIndex = 15;
this.gcSelect.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
this.gvSelect});
//
// gvSelect
//
this.gvSelect.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFullFocus;
this.gvSelect.GridControl = this.gcSelect;
this.gvSelect.Name = "gvSelect";
this.gvSelect.OptionsBehavior.EditorShowMode = DevExpress.Utils.EditorShowMode.Click;
this.gvSelect.OptionsSelection.EnableAppearanceFocusedCell = false;
this.gvSelect.OptionsSelection.MultiSelect = true;
this.gvSelect.OptionsView.ShowGroupPanel = false;
//
// label2
//
this.label2.Dock = System.Windows.Forms.DockStyle.Top;
this.label2.Location = new System.Drawing.Point(0, 0);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(635, 20);
this.label2.TabIndex = 16;
this.label2.Text = "选中列表";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// panel3
//
this.panel3.Controls.Add(this.btnDelete);
this.panel3.Controls.Add(this.btnSave);
this.panel3.Controls.Add(this.btnClose);
this.panel3.Dock = System.Windows.Forms.DockStyle.Bottom;
this.panel3.Location = new System.Drawing.Point(0, 372);
this.panel3.Name = "panel3";
this.panel3.Size = new System.Drawing.Size(635, 40);
this.panel3.TabIndex = 15;
//
// btnDelete
//
this.btnDelete.Location = new System.Drawing.Point(12, 9);
this.btnDelete.Name = "btnDelete";
this.btnDelete.Size = new System.Drawing.Size(75, 23);
this.btnDelete.TabIndex = 1;
this.btnDelete.Text = "删除";
this.btnDelete.Click += new System.EventHandler(this.btnDelete_Click);
//
// btnSave
//
this.btnSave.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnSave.Location = new System.Drawing.Point(490, 8);
this.btnSave.Name = "btnSave";
this.btnSave.Size = new System.Drawing.Size(64, 24);
this.btnSave.TabIndex = 1;
this.btnSave.Text = "确定";
this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
//
// btnClose
//
this.btnClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnClose.Location = new System.Drawing.Point(561, 8);
this.btnClose.Name = "btnClose";
this.btnClose.Size = new System.Drawing.Size(64, 24);
this.btnClose.TabIndex = 0;
this.btnClose.Text = "取消";
this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
//
// contextMenuStrip1
//
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.ToolStripMenuItem,
this.ToolStripMenuItem,
this.ToolStripMenuItem});
this.contextMenuStrip1.Name = "contextMenuStrip1";
this.contextMenuStrip1.Size = new System.Drawing.Size(125, 70);
//
// 全部选中ToolStripMenuItem
//
this.ToolStripMenuItem.Name = "全部选中ToolStripMenuItem";
this.ToolStripMenuItem.Size = new System.Drawing.Size(124, 22);
this.ToolStripMenuItem.Text = "全部选中";
this.ToolStripMenuItem.Click += new System.EventHandler(this.ToolStripMenuItem_Click);
//
// 全部取消ToolStripMenuItem
//
this.ToolStripMenuItem.Name = "全部取消ToolStripMenuItem";
this.ToolStripMenuItem.Size = new System.Drawing.Size(124, 22);
this.ToolStripMenuItem.Text = "全部取消";
this.ToolStripMenuItem.Click += new System.EventHandler(this.ToolStripMenuItem_Click);
//
// 反向选择ToolStripMenuItem
//
this.ToolStripMenuItem.Name = "反向选择ToolStripMenuItem";
this.ToolStripMenuItem.Size = new System.Drawing.Size(124, 22);
this.ToolStripMenuItem.Text = "反向选择";
this.ToolStripMenuItem.Click += new System.EventHandler(this.ToolStripMenuItem_Click);
//
// FrmMain
//
this.AcceptButton = this.btnSearch;
this.Appearance.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Appearance.Options.UseFont = true;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(635, 447);
this.Controls.Add(this.panel2);
this.Controls.Add(this.panel1);
this.LookAndFeel.SkinName = "Office 2010 Blue";
this.LookAndFeel.Style = DevExpress.LookAndFeel.LookAndFeelStyle.Office2003;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "FrmMain";
this.Text = "选择";
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.txtKey.Properties)).EndInit();
this.panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.gridMain)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.gvMain)).EndInit();
this.gbDetail.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.gcSelect)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.gvSelect)).EndInit();
this.panel3.ResumeLayout(false);
this.contextMenuStrip1.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Panel panel2;
private DevExpress.XtraEditors.SimpleButton btnSearch;
private DevExpress.XtraGrid.GridControl gridMain;
private DevExpress.XtraGrid.Views.Grid.GridView gvMain;
private System.Windows.Forms.Panel panel3;
private DevExpress.XtraEditors.SimpleButton btnClose;
private DevExpress.XtraEditors.SimpleButton btnSave;
private System.Windows.Forms.Label label1;
private DevExpress.XtraEditors.TextEdit txtKey;
private DevExpress.XtraEditors.SimpleButton btnDelete;
private DevExpress.XtraGrid.GridControl gcSelect;
private DevExpress.XtraGrid.Views.Grid.GridView gvSelect;
private System.Windows.Forms.Panel gbDetail;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItem;
}
}
@@ -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="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,286 @@
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;
using CommonLib;
using DevExpress.XtraEditors;
using System.Text.RegularExpressions;
using Lskj.PubUtils;
using ControlLib.inh;
namespace Lskj.MyControl.LookUp {
public partial class LabelLookUp : UserControl {
public LabelLookUp() {
InitializeComponent();
}
[Description("是否多选")]
public bool IsMultiple { get; set; }
[Description("SQL语句")]
public string SQL { get; set; }
[Description("设置列")]
public Dictionary<string, string> Columns { get; set; }
[Description("设置Value")]
public string ValueField { get; set; }
[Description("设置TextFiled")]
public string TextField { get; set; }
[Description("设置Value值")]
public string ReturnValue { get; set; }
[Description("设置Text值")]
public string ReturnText { get; set; }
[Description("窗体高度")]
public int WinHeight { get; set; }
[Description("窗体宽度")]
public int WinWidth { get; set; }
/// <summary>
/// Btn More
/// </summary>
public SimpleButton GetButton { get { return btnMore; } }
public TextBox GetTextBox { get { return txtBox; } }
#region
public static List<string> GetParamValue(string param)
{
string SqlParamRegex = "{([^{])+}";
List<string> list = new List<string>();
Regex regex = new Regex(SqlParamRegex);
MatchCollection mcs = regex.Matches(param);
foreach (Match item in mcs)
{
if (list.IndexOf(item.Value) == -1)
list.Add(item.Value);
}
return list;
}
#endregion
/// <summary>
/// 取指定组件值
/// </summary>
/// <param name="parent"></param>
/// <param name="list"></param>
public string GetControlText( Control control)
{
if (control == null)
return "";
ControlModelTag cmTag = control.Tag as ControlModelTag;
if (cmTag.fieldTypeId == ControlType.LabAutoSeacherText)
{
return control.Text;
}
else if (cmTag.fieldTypeId == ControlType.LabAutoSeacherValue)
{
AutoSearcher te = control as AutoSearcher;
return te.ReturnValue.ToString();
}
else if (cmTag.fieldTypeId == ControlType.LabComboxValue)
{
LabelComboxEx Cb = control as LabelComboxEx;
return Cb.getComboBox.SelectedValue + "";
}
else if (cmTag.fieldTypeId == ControlType.LabComboxText)
{
LabelComboxEx Cb = control as LabelComboxEx;
return Cb.getComboBox.Text;
}
else if (cmTag.fieldTypeId == ControlType.LabDate ||
cmTag.fieldTypeId == ControlType.LabDateTime ||
cmTag.fieldTypeId == ControlType.LabDateTimeShort ||
cmTag.fieldTypeId == ControlType.LabTime ||
cmTag.fieldTypeId == ControlType.LabShortTime)
{
LabelDateEx Cb = control as LabelDateEx;
return Cb.GetDateTimePicker.Value.ToString("yyyy-MM-dd HH:mm:ss");
}
else if (cmTag.fieldTypeId == ControlType.LabTextInt)
{
if ((control.Text.Trim() == ""))
return "0";
else
return control.Text;
}
else if (cmTag.fieldTypeId == ControlType.LabMultiSelectValue || cmTag.fieldTypeId == ControlType.LabMultiSelectValueParam)
{
LabelLookUp lookup = control as LabelLookUp;
return lookup.ReturnValue;
}
else
{
if (cmTag.fieldTypeId != 99)
{
return control.Text;
}
}
return "0";
}
private void btnMore_Click(object sender, EventArgs e) {
FrmMain frmMain = new FrmMain();
frmMain.IsMultiple = IsMultiple;
var ctrs = this.Parent.Controls;
string tmpsql = SQL.Replace("#", "").Replace("#", "");
var fields = GetParamValue(tmpsql);
if (fields != null && fields.Count > 0)
{
for (int i = 0; i < fields.Count; i++)
{
string field = fields[i];
string fieldName = field.Replace("{", "").Replace("}", "");
Control control = ctrs.OfType<Control>().FirstOrDefault(x => (x.Tag as ControlModelTag).fieldName == fieldName);
if (control is LabelAutoSearcherEx) control = (control as LabelAutoSearcherEx).GetAutoSearcher;
string fieldValue = GetControlText(control);
tmpsql = tmpsql.Replace(field, fieldValue);
ControlModelTag controlModel = control.Tag as ControlModelTag;
frmMain.IsText = controlModel.fieldTypeId == ControlType.LabAutoSeacherValue?13:0;
}
}
frmMain.SQL = tmpsql;
frmMain.Columns = Columns;
frmMain.ValueField = ValueField;
frmMain.TextField = TextField;
frmMain.WinHeight = WinHeight;
frmMain.WinWidth = WinWidth;
frmMain.ReturnValue = ReturnValue;
frmMain.ReturnText=ReturnText;
frmMain.ShowDialog();
//接受返回来值
ReturnValue = frmMain.ReturnValue;
ReturnText = frmMain.ReturnText;
Text = frmMain.ReturnText;
}
[Description("设置值")]
public override string Text {
get { return txtBox.Text; }
set {
txtBox.Text = value;
}
}
/// <summary>
/// 设置Value值
/// </summary>
/// <param name="ids"></param>
public void SetValueText(string ids) {
if (string.IsNullOrEmpty(ids))
{
this.Text = "";
ReturnText = "";
ReturnValue = "";
return;
}
//string tmpsql = Regex.Replace(SQL, "#[^##]+#", " 1=1 "); ;
var ctrs = this.Parent.Controls;
string tmpsql = SQL.Replace("#", "").Replace("#", "");
var fields = GetParamValue(tmpsql);
if (fields != null && fields.Count > 0)
{
for (int i = 0; i < fields.Count; i++)
{
string field = fields[i];
string fieldName = field.Replace("{", "").Replace("}", "");
Control control = ctrs.OfType<Control>().FirstOrDefault(x => (x.Tag as ControlModelTag).fieldName == fieldName);
if (control is LabelAutoSearcherEx) control = (control as LabelAutoSearcherEx).GetAutoSearcher;
string fieldValue = GetControlText(control);
tmpsql = tmpsql.Replace(field, fieldValue);
}
}
//string sql2 = "select * from (" + tmpsql + ") as tab where " + ValueField + " in ('" + ids.Replace(",", "','") + "')";
DataTable dt = SqlHelper.ExecuteDataSet(tmpsql).Tables[0];
string text = string.Empty;
string[] spilts = ids.Trim(',').Split(',');
for (int i = 0; i < spilts.Length; i++)
{
DataRow rowItem = dt.Rows.Cast<DataRow>().FirstOrDefault(x => x[ValueField] + "" == spilts[i]);
if(rowItem != null)
text += rowItem[TextField] + ",";
}
this.Text = text.Trim(',');
ReturnText = text;
ReturnValue = ids;
}
public void SetTextValue(string ids)
{
if (string.IsNullOrEmpty(ids))
{
this.Text = "";
ReturnText = "";
ReturnValue = "";
return;
}
string tmpIds = ids.Replace(",", "','");
tmpIds = "'" + tmpIds + "'";
string tmpsql = Regex.Replace(SQL, "#[^##]+#", " 1=1 ");
DataTable dt = SqlHelper.ExecuteDataSet(tmpsql).Tables[0];
string text = string.Empty;
string[] spilts = ids.Trim(',').Split(',');
for (int i = 0; i < spilts.Length; i++)
{
DataRow rowItem = dt.Rows.Cast<DataRow>().FirstOrDefault(x => x[TextField] + "" == spilts[i]);
if (rowItem != null)
text += rowItem[ValueField] + ",";
}
this.Text = ids;
ReturnText = ids;
ReturnValue = text;
}
private string labelText;
[Description("Label值")]
public string LabelText {
get { return labelText; }
set {
labelText = value;
lbMsg.Text = value;
pl_left.Width = lbMsg.Width + 7;
}
}
private void txtBox_KeyDown(object sender, KeyEventArgs e)
{
if (sender != null && e != null)
{
if (e.Control)
{
if (e.KeyCode == Keys.V) // 复制
{
if (txtBox.Enabled)
{
//txtBox.Text = Clipboard.GetData(DataFormats.StringFormat).ToString();
object objData = Clipboard.GetData(DataFormats.StringFormat);
if (objData==null)
return;
//this.ReturnValue = Clipboard.GetData(DataFormats.StringFormat).ToString();
this.SetValueText(objData.ToString());
//MessageBox.Show(Clipboard.GetData(DataFormats.StringFormat).ToString());
}
}
}
}
}
}
}
+143
View File
@@ -0,0 +1,143 @@
namespace Lskj.MyControl.LookUp
{
partial class LabelLookUp
{
/// <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()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(LabelLookUp));
this.panel1 = new System.Windows.Forms.Panel();
this.panel3 = new System.Windows.Forms.Panel();
this.txtBox = new System.Windows.Forms.TextBox();
this.panel2 = new System.Windows.Forms.Panel();
this.btnMore = new DevExpress.XtraEditors.SimpleButton();
this.pl_left = new System.Windows.Forms.Panel();
this.lbMsg = new System.Windows.Forms.Label();
this.panel1.SuspendLayout();
this.panel3.SuspendLayout();
this.panel2.SuspendLayout();
this.pl_left.SuspendLayout();
this.SuspendLayout();
//
// panel1
//
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(40, 0);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(142, 21);
this.panel1.TabIndex = 3;
//
// panel3
//
this.panel3.Controls.Add(this.txtBox);
this.panel3.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel3.Location = new System.Drawing.Point(0, 0);
this.panel3.Name = "panel3";
this.panel3.Size = new System.Drawing.Size(116, 21);
this.panel3.TabIndex = 1;
//
// txtBox
//
this.txtBox.Dock = System.Windows.Forms.DockStyle.Fill;
this.txtBox.Location = new System.Drawing.Point(0, 0);
this.txtBox.Multiline = true;
this.txtBox.Name = "txtBox";
this.txtBox.ReadOnly = true;
this.txtBox.Size = new System.Drawing.Size(116, 21);
this.txtBox.TabIndex = 0;
this.txtBox.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtBox_KeyDown);
//
// panel2
//
this.panel2.Controls.Add(this.btnMore);
this.panel2.Dock = System.Windows.Forms.DockStyle.Right;
this.panel2.Location = new System.Drawing.Point(116, 0);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(26, 21);
this.panel2.TabIndex = 0;
//
// btnMore
//
this.btnMore.Appearance.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnMore.Appearance.Options.UseFont = true;
this.btnMore.Dock = System.Windows.Forms.DockStyle.Fill;
this.btnMore.Image = ((System.Drawing.Image)(resources.GetObject("btnMore.Image")));
this.btnMore.Location = new System.Drawing.Point(0, 0);
this.btnMore.Name = "btnMore";
this.btnMore.Size = new System.Drawing.Size(26, 21);
this.btnMore.TabIndex = 0;
this.btnMore.Click += new System.EventHandler(this.btnMore_Click);
//
// pl_left
//
this.pl_left.Controls.Add(this.lbMsg);
this.pl_left.Dock = System.Windows.Forms.DockStyle.Left;
this.pl_left.Location = new System.Drawing.Point(0, 0);
this.pl_left.Name = "pl_left";
this.pl_left.Size = new System.Drawing.Size(40, 21);
this.pl_left.TabIndex = 2;
//
// lbMsg
//
this.lbMsg.AutoSize = true;
this.lbMsg.Location = new System.Drawing.Point(5, 4);
this.lbMsg.Name = "lbMsg";
this.lbMsg.Size = new System.Drawing.Size(29, 12);
this.lbMsg.TabIndex = 0;
this.lbMsg.Text = "名称";
//
// LabelLookUp
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.panel1);
this.Controls.Add(this.pl_left);
this.Name = "LabelLookUp";
this.Size = new System.Drawing.Size(182, 21);
this.panel1.ResumeLayout(false);
this.panel3.ResumeLayout(false);
this.panel3.PerformLayout();
this.panel2.ResumeLayout(false);
this.pl_left.ResumeLayout(false);
this.pl_left.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Panel pl_left;
private System.Windows.Forms.Label lbMsg;
private System.Windows.Forms.Panel panel3;
private System.Windows.Forms.TextBox txtBox;
private System.Windows.Forms.Panel panel2;
private DevExpress.XtraEditors.SimpleButton btnMore;
}
}
@@ -0,0 +1,140 @@
<?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="btnMore.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAvFJREFUOE+lkmlI
VFEUx29JY+MsvpESJMW0UEy/ZH3QkiJCCIKIgsAUW0Sk1PBDaYGVKGpUmqmoKZpLKJnmmpqm4jguuaE4
uaY2mvs6M80445uZf9dRyqBP9eH37rnv3fO7nPMOAfBfkGlJQMnIOxf2S7YFBguOsLIGv5LuNBHpSBGR
tkSGNCcwpCnOnDQ8NSe1seakKkpIKiKEvwUjhS7shvIbDDo1q1UMoy/PiSWE7N6ByV/YfL8lkGZZAIZ1
GDRdgCobmtlHaHnJQBzPoOGZOepihaiOFqIyUoiyxwJURVuyzamHyjclRkFvBhXoV4Ef6YAiGobVcOgX
gqGbC4ZeUQHdUg7YmThsTIRBM+SHlZZzyL/Lp5mEYxR0p4oAdgr6xTDoZm+DlflAO3oR2gFPaHpPQN3p
ClWrM5RiByjq7SH/aIvcEKOAaxS0JzEwqHtp0hWsS8/jTYgd0nw5FNMd6zbXttnev7puCiJ5wUC3XANV
x0kMlV1CfZo37YmWlqWkjZ2j4SD0qibo1vLBLj6BdioQ6+NeGCh1pT3ZJyONzxloJzMhr3NERfRxzI/W
Q7+WTmuPATt/nyb404QLUA25QdFHy+ixgbzTGiXhfDTGM/6kKlIAtTQK4+9PoTr+NL24AhtTN6GV+UIz
dhmqYU8o+49B3mWP1TZLLEssMVxkgeIHPEXWLS4hhfd4ULQHoSHZHZM9qdBMeEE96AGV1B3K3qNY63DA
isQKi40iLNSJMFfNoCqKj6KHZgk5d8wIyQrgYqbWB+UxDnQGEqDsOgD5Z2ustlphqWk/Fj4JMFfDx0wl
D99LeBjO5aEw1EznaL3bJi+ECjL8+Kw47Qz6PwRiqc0NMzU8TNPDU6U8yIp5mHhrhrECLr7mcjGSyUV1
BBeZQXvF9DcKXwfSEopD7epSbgiQ6G2KxKubcP4g6Ve89S3Zh2M462ziQQV7Er05dNmabSHFimJNsaXY
Uw5THCiOFKcdHKTQq8ku4yBtPv4dkJ+NhWIUmUJFdQAAAABJRU5ErkJggg==
</value>
</data>
</root>