mirror of
https://github.com/eggplantlwj/VisionEdit.git
synced 2026-03-24 00:36:41 +08:00
1、优化LOG显示与引用
2、添加PMA工具,工具内容待完善 3、修复流程树显示 4、添加开源项目,优化UI空间 5、其他BUG更改
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace HZH_Controls.Controls
|
||||
{
|
||||
public class TransferEventArgs : EventArgs
|
||||
{
|
||||
public object[] TransferDataSource { get; set; }
|
||||
/// <summary>
|
||||
/// true:right false:left
|
||||
/// </summary>
|
||||
/// <value><c>true</c> if [to right or left]; otherwise, <c>false</c>.</value>
|
||||
public bool ToRightOrLeft { get; set; }
|
||||
}
|
||||
public delegate void TransferEventHandler(object sender,TransferEventArgs e);
|
||||
|
||||
}
|
||||
241
UsingControl/HZHControls/Controls/Transfer/UCTransfer.Designer.cs
generated
Normal file
241
UsingControl/HZHControls/Controls/Transfer/UCTransfer.Designer.cs
generated
Normal file
@@ -0,0 +1,241 @@
|
||||
namespace HZH_Controls.Controls
|
||||
{
|
||||
partial class UCTransfer
|
||||
{
|
||||
/// <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(UCTransfer));
|
||||
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.ucControlBase2 = new HZH_Controls.Controls.UCControlBase();
|
||||
this.dgvRight = new HZH_Controls.Controls.UCDataGridView();
|
||||
this.btnLeft = new HZH_Controls.Controls.UCBtnImg();
|
||||
this.btnRight = new HZH_Controls.Controls.UCBtnImg();
|
||||
this.ucControlBase1 = new HZH_Controls.Controls.UCControlBase();
|
||||
this.dgvLeft = new HZH_Controls.Controls.UCDataGridView();
|
||||
this.tableLayoutPanel1.SuspendLayout();
|
||||
this.panel1.SuspendLayout();
|
||||
this.ucControlBase2.SuspendLayout();
|
||||
this.ucControlBase1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// tableLayoutPanel1
|
||||
//
|
||||
this.tableLayoutPanel1.ColumnCount = 3;
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 60F));
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||
this.tableLayoutPanel1.Controls.Add(this.ucControlBase2, 2, 0);
|
||||
this.tableLayoutPanel1.Controls.Add(this.panel1, 1, 0);
|
||||
this.tableLayoutPanel1.Controls.Add(this.ucControlBase1, 0, 0);
|
||||
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
|
||||
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
|
||||
this.tableLayoutPanel1.RowCount = 1;
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||
this.tableLayoutPanel1.Size = new System.Drawing.Size(451, 397);
|
||||
this.tableLayoutPanel1.TabIndex = 0;
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
this.panel1.Controls.Add(this.btnLeft);
|
||||
this.panel1.Controls.Add(this.btnRight);
|
||||
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.panel1.Location = new System.Drawing.Point(198, 3);
|
||||
this.panel1.Name = "panel1";
|
||||
this.panel1.Size = new System.Drawing.Size(54, 391);
|
||||
this.panel1.TabIndex = 0;
|
||||
//
|
||||
// ucControlBase2
|
||||
//
|
||||
this.ucControlBase2.BackColor = System.Drawing.Color.Transparent;
|
||||
this.ucControlBase2.ConerRadius = 5;
|
||||
this.ucControlBase2.Controls.Add(this.dgvRight);
|
||||
this.ucControlBase2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.ucControlBase2.FillColor = System.Drawing.Color.Transparent;
|
||||
this.ucControlBase2.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
|
||||
this.ucControlBase2.IsRadius = true;
|
||||
this.ucControlBase2.IsShowRect = true;
|
||||
this.ucControlBase2.Location = new System.Drawing.Point(255, 0);
|
||||
this.ucControlBase2.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.ucControlBase2.Name = "ucControlBase2";
|
||||
this.ucControlBase2.Padding = new System.Windows.Forms.Padding(1);
|
||||
this.ucControlBase2.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(220)))), ((int)(((byte)(220)))));
|
||||
this.ucControlBase2.RectWidth = 1;
|
||||
this.ucControlBase2.Size = new System.Drawing.Size(196, 397);
|
||||
this.ucControlBase2.TabIndex = 4;
|
||||
//
|
||||
// dgvRight
|
||||
//
|
||||
|
||||
this.dgvRight.BackColor = System.Drawing.Color.White;
|
||||
this.dgvRight.Columns = null;
|
||||
this.dgvRight.DataSource = null;
|
||||
this.dgvRight.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.dgvRight.HeadFont = new System.Drawing.Font("微软雅黑", 12F);
|
||||
this.dgvRight.HeadHeight = 40;
|
||||
this.dgvRight.HeadPadingLeft = 0;
|
||||
this.dgvRight.HeadTextColor = System.Drawing.Color.Black;
|
||||
|
||||
this.dgvRight.IsShowCheckBox = true;
|
||||
this.dgvRight.IsShowHead = true;
|
||||
this.dgvRight.Location = new System.Drawing.Point(1, 1);
|
||||
this.dgvRight.Name = "dgvRight";
|
||||
this.dgvRight.RowHeight = 40;
|
||||
this.dgvRight.RowType = typeof(HZH_Controls.Controls.UCDataGridViewRow);
|
||||
this.dgvRight.Size = new System.Drawing.Size(194, 395);
|
||||
this.dgvRight.TabIndex = 2;
|
||||
//
|
||||
// btnLeft
|
||||
//
|
||||
this.btnLeft.Anchor = System.Windows.Forms.AnchorStyles.None;
|
||||
this.btnLeft.BackColor = System.Drawing.Color.White;
|
||||
this.btnLeft.BtnBackColor = System.Drawing.Color.White;
|
||||
this.btnLeft.BtnFont = new System.Drawing.Font("微软雅黑", 17F);
|
||||
this.btnLeft.BtnForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(102)))), ((int)(((byte)(102)))), ((int)(((byte)(102)))));
|
||||
this.btnLeft.BtnText = "";
|
||||
this.btnLeft.ConerRadius = 5;
|
||||
this.btnLeft.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.btnLeft.FillColor = System.Drawing.Color.White;
|
||||
this.btnLeft.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
|
||||
this.btnLeft.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(102)))), ((int)(((byte)(102)))), ((int)(((byte)(102)))));
|
||||
this.btnLeft.Image = ((System.Drawing.Image)(resources.GetObject("btnLeft.Image")));
|
||||
this.btnLeft.ImageAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.btnLeft.ImageFontIcons = ((object)(resources.GetObject("btnLeft.ImageFontIcons")));
|
||||
this.btnLeft.IsRadius = true;
|
||||
this.btnLeft.IsShowRect = true;
|
||||
this.btnLeft.IsShowTips = false;
|
||||
this.btnLeft.Location = new System.Drawing.Point(5, 203);
|
||||
this.btnLeft.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.btnLeft.Name = "btnLeft";
|
||||
this.btnLeft.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
|
||||
this.btnLeft.RectWidth = 1;
|
||||
this.btnLeft.Size = new System.Drawing.Size(44, 31);
|
||||
this.btnLeft.TabIndex = 0;
|
||||
this.btnLeft.TabStop = false;
|
||||
this.btnLeft.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.btnLeft.TipsColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(30)))), ((int)(((byte)(99)))));
|
||||
this.btnLeft.TipsText = "";
|
||||
this.btnLeft.BtnClick += new System.EventHandler(this.btnLeft_BtnClick);
|
||||
//
|
||||
// btnRight
|
||||
//
|
||||
this.btnRight.Anchor = System.Windows.Forms.AnchorStyles.None;
|
||||
this.btnRight.BackColor = System.Drawing.Color.White;
|
||||
this.btnRight.BtnBackColor = System.Drawing.Color.White;
|
||||
this.btnRight.BtnFont = new System.Drawing.Font("微软雅黑", 17F);
|
||||
this.btnRight.BtnForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(102)))), ((int)(((byte)(102)))), ((int)(((byte)(102)))));
|
||||
this.btnRight.BtnText = "";
|
||||
this.btnRight.ConerRadius = 5;
|
||||
this.btnRight.Cursor = System.Windows.Forms.Cursors.Hand;
|
||||
this.btnRight.FillColor = System.Drawing.Color.White;
|
||||
this.btnRight.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
|
||||
this.btnRight.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(102)))), ((int)(((byte)(102)))), ((int)(((byte)(102)))));
|
||||
this.btnRight.Image = ((System.Drawing.Image)(resources.GetObject("btnRight.Image")));
|
||||
this.btnRight.ImageAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.btnRight.ImageFontIcons = ((object)(resources.GetObject("btnRight.ImageFontIcons")));
|
||||
this.btnRight.IsRadius = true;
|
||||
this.btnRight.IsShowRect = true;
|
||||
this.btnRight.IsShowTips = false;
|
||||
this.btnRight.Location = new System.Drawing.Point(5, 157);
|
||||
this.btnRight.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.btnRight.Name = "btnRight";
|
||||
this.btnRight.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
|
||||
this.btnRight.RectWidth = 1;
|
||||
this.btnRight.Size = new System.Drawing.Size(44, 31);
|
||||
this.btnRight.TabIndex = 0;
|
||||
this.btnRight.TabStop = false;
|
||||
this.btnRight.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||
this.btnRight.TipsColor = System.Drawing.Color.FromArgb(((int)(((byte)(232)))), ((int)(((byte)(30)))), ((int)(((byte)(99)))));
|
||||
this.btnRight.TipsText = "";
|
||||
this.btnRight.BtnClick += new System.EventHandler(this.btnRight_BtnClick);
|
||||
//
|
||||
// ucControlBase1
|
||||
//
|
||||
this.ucControlBase1.BackColor = System.Drawing.Color.Transparent;
|
||||
this.ucControlBase1.ConerRadius = 5;
|
||||
this.ucControlBase1.Controls.Add(this.dgvLeft);
|
||||
this.ucControlBase1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.ucControlBase1.FillColor = System.Drawing.Color.Transparent;
|
||||
this.ucControlBase1.Font = new System.Drawing.Font("微软雅黑", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel);
|
||||
this.ucControlBase1.IsRadius = true;
|
||||
this.ucControlBase1.IsShowRect = true;
|
||||
this.ucControlBase1.Location = new System.Drawing.Point(0, 0);
|
||||
this.ucControlBase1.Margin = new System.Windows.Forms.Padding(0);
|
||||
this.ucControlBase1.Name = "ucControlBase1";
|
||||
this.ucControlBase1.Padding = new System.Windows.Forms.Padding(1);
|
||||
this.ucControlBase1.RectColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(220)))), ((int)(((byte)(220)))));
|
||||
this.ucControlBase1.RectWidth = 1;
|
||||
this.ucControlBase1.Size = new System.Drawing.Size(195, 397);
|
||||
this.ucControlBase1.TabIndex = 3;
|
||||
//
|
||||
// dgvLeft
|
||||
//
|
||||
this.dgvLeft.BackColor = System.Drawing.Color.White;
|
||||
this.dgvLeft.Columns = null;
|
||||
this.dgvLeft.DataSource = null;
|
||||
this.dgvLeft.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.dgvLeft.HeadFont = new System.Drawing.Font("微软雅黑", 12F);
|
||||
this.dgvLeft.HeadHeight = 40;
|
||||
this.dgvLeft.HeadPadingLeft = 0;
|
||||
this.dgvLeft.HeadTextColor = System.Drawing.Color.Black;
|
||||
this.dgvLeft.IsShowCheckBox = true;
|
||||
this.dgvLeft.IsShowHead = true;
|
||||
this.dgvLeft.Location = new System.Drawing.Point(1, 1);
|
||||
this.dgvLeft.Name = "dgvLeft";
|
||||
this.dgvLeft.RowHeight = 40;
|
||||
this.dgvLeft.RowType = typeof(HZH_Controls.Controls.UCDataGridViewRow);
|
||||
this.dgvLeft.Size = new System.Drawing.Size(193, 395);
|
||||
this.dgvLeft.TabIndex = 2;
|
||||
//
|
||||
// UCTransfer
|
||||
//
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||
this.BackColor = System.Drawing.Color.White;
|
||||
this.Controls.Add(this.tableLayoutPanel1);
|
||||
this.Name = "UCTransfer";
|
||||
this.Size = new System.Drawing.Size(451, 397);
|
||||
this.tableLayoutPanel1.ResumeLayout(false);
|
||||
this.panel1.ResumeLayout(false);
|
||||
this.ucControlBase2.ResumeLayout(false);
|
||||
this.ucControlBase1.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
private UCBtnImg btnLeft;
|
||||
private UCBtnImg btnRight;
|
||||
private UCControlBase ucControlBase1;
|
||||
private UCDataGridView dgvLeft;
|
||||
private UCControlBase ucControlBase2;
|
||||
private UCDataGridView dgvRight;
|
||||
}
|
||||
}
|
||||
211
UsingControl/HZHControls/Controls/Transfer/UCTransfer.cs
Normal file
211
UsingControl/HZHControls/Controls/Transfer/UCTransfer.cs
Normal file
@@ -0,0 +1,211 @@
|
||||
// ***********************************************************************
|
||||
// Assembly : HZH_Controls
|
||||
// Created : 2019-10-10
|
||||
//
|
||||
// ***********************************************************************
|
||||
// <copyright file="UCTransfer.cs">
|
||||
// Copyright by Huang Zhenghui(黄正辉) All, QQ group:568015492 QQ:623128629 Email:623128629@qq.com
|
||||
// </copyright>
|
||||
//
|
||||
// Blog: https://www.cnblogs.com/bfyx
|
||||
// GitHub:https://github.com/kwwwvagaa/NetWinformControl
|
||||
// gitee:https://gitee.com/kwwwvagaa/net_winform_custom_control.git
|
||||
//
|
||||
// If you use this code, please keep this note.
|
||||
// ***********************************************************************
|
||||
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 HZH_Controls.Controls
|
||||
{
|
||||
/// <summary>
|
||||
/// Class UCTransfer.
|
||||
/// Implements the <see cref="System.Windows.Forms.UserControl" />
|
||||
/// </summary>
|
||||
/// <seealso cref="System.Windows.Forms.UserControl" />
|
||||
[DefaultEvent("Transfered")]
|
||||
public partial class UCTransfer : UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// 移动数据事件
|
||||
/// </summary>
|
||||
[Description("移动数据事件"), Category("自定义")]
|
||||
public event TransferEventHandler Transfered;
|
||||
|
||||
/// <summary>
|
||||
/// The left columns
|
||||
/// </summary>
|
||||
private DataGridViewColumnEntity[] leftColumns;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the left columns.
|
||||
/// </summary>
|
||||
/// <value>The left columns.</value>
|
||||
[Description("左侧列表列"), Category("自定义")]
|
||||
public DataGridViewColumnEntity[] LeftColumns
|
||||
{
|
||||
get { return leftColumns; }
|
||||
set
|
||||
{
|
||||
leftColumns = value;
|
||||
this.dgvLeft.Columns = leftColumns.ToList();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The right columns
|
||||
/// </summary>
|
||||
private DataGridViewColumnEntity[] rightColumns;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the right columns.
|
||||
/// </summary>
|
||||
/// <value>The right columns.</value>
|
||||
[Description("右侧列表列"), Category("自定义")]
|
||||
public DataGridViewColumnEntity[] RightColumns
|
||||
{
|
||||
get { return rightColumns; }
|
||||
set
|
||||
{
|
||||
rightColumns = value;
|
||||
this.dgvRight.Columns = rightColumns.ToList();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The left data source
|
||||
/// </summary>
|
||||
private object[] leftDataSource;
|
||||
/// <summary>
|
||||
/// 左右列表必须设置相同类型的数据源列表,如果为空必须为长度为0的数组
|
||||
/// </summary>
|
||||
/// <value>The left data source.</value>
|
||||
[Description("左侧列表数据源"), Category("自定义"), Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
|
||||
public object[] LeftDataSource
|
||||
{
|
||||
get { return leftDataSource; }
|
||||
set
|
||||
{
|
||||
leftDataSource = value;
|
||||
dgvLeft.DataSource = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The right data source
|
||||
/// </summary>
|
||||
private object[] rightDataSource;
|
||||
/// <summary>
|
||||
/// 左右列表必须设置相同类型的数据源列表,如果为空必须为长度为0的数组
|
||||
/// </summary>
|
||||
/// <value>The left data source.</value>
|
||||
[Description("右侧列表数据源"), Category("自定义"), Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
|
||||
public object[] RightDataSource
|
||||
{
|
||||
get { return rightDataSource; }
|
||||
set
|
||||
{
|
||||
rightDataSource = value;
|
||||
dgvRight.DataSource = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="UCTransfer"/> class.
|
||||
/// </summary>
|
||||
public UCTransfer()
|
||||
{
|
||||
InitializeComponent();
|
||||
LeftColumns = new DataGridViewColumnEntity[0];
|
||||
RightColumns = new DataGridViewColumnEntity[0];
|
||||
LeftDataSource = new object[0];
|
||||
RightDataSource = new object[0];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handles the BtnClick event of the btnRight control.
|
||||
/// </summary>
|
||||
/// <param name="sender">The source of the event.</param>
|
||||
/// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
|
||||
/// <exception cref="System.Exception">
|
||||
/// 左右数据源列表不能为空
|
||||
/// or
|
||||
/// 左右数据源列表类型不一致,无法进行操作
|
||||
/// </exception>
|
||||
private void btnRight_BtnClick(object sender, EventArgs e)
|
||||
{
|
||||
if (LeftDataSource == null || RightDataSource == null)
|
||||
{
|
||||
throw new Exception("左右数据源列表不能为空");
|
||||
}
|
||||
if (LeftDataSource.GetType() != RightDataSource.GetType())
|
||||
{
|
||||
throw new Exception("左右数据源列表类型不一致,无法进行操作");
|
||||
}
|
||||
if (dgvLeft.SelectRows == null || dgvLeft.SelectRows.Count <= 0)
|
||||
return;
|
||||
List<object> lst = new List<object>();
|
||||
dgvLeft.SelectRows.ForEach(p =>
|
||||
{
|
||||
lst.Add(p.DataSource);
|
||||
p.IsChecked = false;
|
||||
});
|
||||
var lstRight = RightDataSource.ToList();
|
||||
lstRight.AddRange(lst);
|
||||
var lstLeft = LeftDataSource.ToList();
|
||||
lstLeft.RemoveAll(p => lst.Contains(p));
|
||||
RightDataSource = lstRight.ToArray();
|
||||
LeftDataSource = lstLeft.ToArray();
|
||||
if (Transfered != null)
|
||||
{
|
||||
Transfered(this, new TransferEventArgs() { TransferDataSource = lst.ToArray(), ToRightOrLeft = true });
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Handles the BtnClick event of the btnLeft control.
|
||||
/// </summary>
|
||||
/// <param name="sender">The source of the event.</param>
|
||||
/// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
|
||||
/// <exception cref="System.Exception">
|
||||
/// 左右数据源列表不能为空
|
||||
/// or
|
||||
/// 左右数据源列表类型不一致,无法进行操作
|
||||
/// </exception>
|
||||
private void btnLeft_BtnClick(object sender, EventArgs e)
|
||||
{
|
||||
if (LeftDataSource == null || RightDataSource == null)
|
||||
{
|
||||
throw new Exception("左右数据源列表不能为空");
|
||||
}
|
||||
if (LeftDataSource.GetType() != RightDataSource.GetType())
|
||||
{
|
||||
throw new Exception("左右数据源列表类型不一致,无法进行操作");
|
||||
}
|
||||
if (dgvRight.SelectRows == null || dgvRight.SelectRows.Count <= 0)
|
||||
return;
|
||||
List<object> lst = new List<object>();
|
||||
dgvRight.SelectRows.ForEach(p =>
|
||||
{
|
||||
lst.Add(p.DataSource);
|
||||
p.IsChecked = false;
|
||||
});
|
||||
var lstLeft = LeftDataSource.ToList();
|
||||
lstLeft.AddRange(lst);
|
||||
var lstRight = RightDataSource.ToList();
|
||||
lstRight.RemoveAll(p => lst.Contains(p));
|
||||
RightDataSource = lstRight.ToArray();
|
||||
LeftDataSource = lstLeft.ToArray();
|
||||
if (Transfered != null)
|
||||
{
|
||||
Transfered(this, new TransferEventArgs() { TransferDataSource = lst.ToArray(), ToRightOrLeft = false });
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
155
UsingControl/HZHControls/Controls/Transfer/UCTransfer.resx
Normal file
155
UsingControl/HZHControls/Controls/Transfer/UCTransfer.resx
Normal file
@@ -0,0 +1,155 @@
|
||||
<?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="btnLeft.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADr0AAA69AUf7kK0AAAB5SURBVFhH7dXBDYAgDAVQlnEBx3IldqHQLZxGKSkkmtQT
|
||||
GIz/JYT0X34vBAcA8HkhhJWI9ny8RoWVd1VLYoyH3BqbeVf3Epmf8q5Q/r9yYZW8Ui5ygZciLWtv28qH
|
||||
wBIVlqimWiLfl0/HyodIKW3MvOjYWDkATMS5E+hGfXDhMAVvAAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<data name="btnLeft.ImageFontIcons" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADr0AAA69AUf7kK0AAAB5SURBVFhH7dXBDYAgDAVQlnEBx3IldqHQLZxGKSkkmtQT
|
||||
GIz/JYT0X34vBAcA8HkhhJWI9ny8RoWVd1VLYoyH3BqbeVf3Epmf8q5Q/r9yYZW8Ui5ygZciLWtv28qH
|
||||
wBIVlqimWiLfl0/HyodIKW3MvOjYWDkATMS5E+hGfXDhMAVvAAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<data name="btnRight.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADr0AAA69AUf7kK0AAACJSURBVFhH7ZXNCcAgDEZdpgt0rK7UGbqCf1s4TWuKgSLG
|
||||
U0IRvgcefJenh6gDAIAlyDlvIYRS19nUi+TVSSkdMcab1jcmeRMoMIpJ3gQcgsEhmBq4OEYT0bToVfHe
|
||||
7zVU2k0LvQkzr0ofof3Mq4L4L3H+dPqI5NXhT6ePSN4Eio1GSvIAgEVw7gENgIbqKKEIVQAAAABJRU5E
|
||||
rkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="btnRight.ImageFontIcons" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADr0AAA69AUf7kK0AAACJSURBVFhH7ZXNCcAgDEZdpgt0rK7UGbqCf1s4TWuKgSLG
|
||||
U0IRvgcefJenh6gDAIAlyDlvIYRS19nUi+TVSSkdMcab1jcmeRMoMIpJ3gQcgsEhmBq4OEYT0bToVfHe
|
||||
7zVU2k0LvQkzr0ofof3Mq4L4L3H+dPqI5NXhT6ePSN4Eio1GSvIAgEVw7gENgIbqKKEIVQAAAABJRU5E
|
||||
rkJggg==
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
||||
Reference in New Issue
Block a user