SVN r1190
SVN-Revision: r1190
This commit is contained in:
@@ -54,19 +54,29 @@ namespace Lskj.Control
|
||||
/// 获取模块配置
|
||||
/// </summary>
|
||||
public ModuleModel moduleModel;
|
||||
public TreeList TreeListObj { get { return gcMain; } }
|
||||
public override TreeList TreeListObj { get { return gcMain; } }
|
||||
|
||||
/// <summary>
|
||||
/// 树表格固定菜单
|
||||
/// </summary>
|
||||
public ContextMenuStrip MenuStrip { get { return contextMenuStrip; } }
|
||||
public override ContextMenuStrip MenuStrip { get { return contextMenuStrip; } }
|
||||
/// <summary>
|
||||
/// 默认全部展开
|
||||
/// </summary>
|
||||
public string Expansion = "1";
|
||||
private string _expansion = "1";
|
||||
public override string Expansion
|
||||
{
|
||||
get { return _expansion; }
|
||||
set { _expansion = value; }
|
||||
}
|
||||
|
||||
//treeList树展开的节点块
|
||||
public List<TreeListNode> treeListNodes = new List<TreeListNode>();
|
||||
private List<TreeListNode> _treeListNodes = new List<TreeListNode>();
|
||||
public override List<TreeListNode> treeListNodes
|
||||
{
|
||||
get { return _treeListNodes; }
|
||||
set { _treeListNodes = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 按初始顺序保存全部gridBand
|
||||
@@ -272,7 +282,7 @@ namespace Lskj.Control
|
||||
/// </summary>
|
||||
/// <param name="sender">The sender.</param>
|
||||
/// <param name="e">The <see cref="RowStyleEventArgs"/> instance containing the event data.</param>
|
||||
protected void OnGridViewRowStyle(object sender, GetCustomNodeCellStyleEventArgs e)
|
||||
protected override void OnGridViewRowStyle(object sender, GetCustomNodeCellStyleEventArgs e)
|
||||
{
|
||||
if (this.GridRowColorsTable != null && this.GridRowColorsTable.Rows.Count > 0)
|
||||
{
|
||||
@@ -324,7 +334,7 @@ namespace Lskj.Control
|
||||
/// <param name="sender">The source of the event.</param>
|
||||
/// <param name="e">The <see cref="DevExpress.XtraGrid.Views.Grid.RowCellStyleEventArgs"/> instance containing the event data.</param>
|
||||
/// <exception cref="System.NotImplementedException"></exception>
|
||||
protected void OnGridViewRowCellStyle(object sender, CustomDrawNodeCellEventArgs e)
|
||||
protected override void OnGridViewRowCellStyle(object sender, CustomDrawNodeCellEventArgs e)
|
||||
{
|
||||
if (this.GridRowColorsTable != null && this.GridRowColorsTable.Rows.Count > 0 && !string.IsNullOrEmpty(e.CellValue + ""))
|
||||
{
|
||||
@@ -596,7 +606,7 @@ namespace Lskj.Control
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
/// <param name="item">The dr row.</param>
|
||||
protected void InitEditColumns(TreeListColumn column, GridColumnModel model)
|
||||
protected override void InitEditColumns(TreeListColumn column, GridColumnModel model)
|
||||
{
|
||||
switch (model.FieldType)
|
||||
{
|
||||
@@ -722,7 +732,7 @@ namespace Lskj.Control
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
/// <param name="gridColumn">The grid column.</param>
|
||||
public void InitAutoLinefeedEdit(TreeListColumn gridColumn, GridColumnModel model)
|
||||
public override void InitAutoLinefeedEdit(TreeListColumn gridColumn, GridColumnModel model)
|
||||
{
|
||||
DevExpress.XtraEditors.Repository.RepositoryItemMemoEdit AutoLinefeedEdit = new DevExpress.XtraEditors.Repository.RepositoryItemMemoEdit();
|
||||
gridColumn.ColumnEdit = AutoLinefeedEdit;
|
||||
@@ -738,7 +748,7 @@ namespace Lskj.Control
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
/// <param name="gridColumn">The grid column.</param>
|
||||
public void InitPasswordEdit(TreeListColumn gridColumn, GridColumnModel model)
|
||||
public override void InitPasswordEdit(TreeListColumn gridColumn, GridColumnModel model)
|
||||
{
|
||||
RepositoryItemTextEdit passEdit = new RepositoryItemTextEdit();
|
||||
passEdit.UseSystemPasswordChar = true;
|
||||
@@ -756,7 +766,7 @@ namespace Lskj.Control
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
/// <param name="gridColumn">The grid column.</param>
|
||||
public void InitComboxEdit(TreeListColumn gridColumn, GridColumnModel model)
|
||||
public override void InitComboxEdit(TreeListColumn gridColumn, GridColumnModel model)
|
||||
{
|
||||
RepositoryItemLookUpEdit comboxEdit = new RepositoryItemLookUpEdit();
|
||||
if (model.FontSize > 0) comboxEdit.Appearance.Font = new Font("微软雅黑", model.FontSize);
|
||||
@@ -811,7 +821,7 @@ namespace Lskj.Control
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
/// <param name="gridColumn">The grid column.</param>
|
||||
public void InitProgressEdit(TreeListColumn gridColumn)
|
||||
public override void InitProgressEdit(TreeListColumn gridColumn)
|
||||
{
|
||||
RepositoryItemProgressBar progressEdit = new RepositoryItemProgressBar();
|
||||
progressEdit.ShowTitle = true;
|
||||
@@ -831,7 +841,7 @@ namespace Lskj.Control
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
/// <param name="gridColumn">The grid column.</param>
|
||||
public void InitAutoSearchEdit(TreeListColumn gridColumn, GridColumnModel model)
|
||||
public override void InitAutoSearchEdit(TreeListColumn gridColumn, GridColumnModel model)
|
||||
{
|
||||
int popWidth = 0;
|
||||
|
||||
@@ -935,7 +945,7 @@ namespace Lskj.Control
|
||||
/// </summary>
|
||||
/// <param name="gridColumn">The grid column.</param>
|
||||
/// <param name="fieldType">Type of the field.</param>
|
||||
public void InitDateTimeEdit(TreeListColumn gridColumn, int fieldType)
|
||||
public override void InitDateTimeEdit(TreeListColumn gridColumn, int fieldType)
|
||||
{
|
||||
RepositoryItemDateEdit dateEdit = new RepositoryItemDateEdit();
|
||||
dateEdit.DisplayFormat.FormatString = dateEdit.EditFormat.FormatString = dateEdit.Mask.EditMask = DateFormat.Format(fieldType);
|
||||
@@ -971,7 +981,7 @@ namespace Lskj.Control
|
||||
/// </summary>
|
||||
/// <param name="gridColumn">The grid column.</param>
|
||||
/// <param name="fieldType">Type of the field.</param>
|
||||
public void InitTimeEdit(TreeListColumn gridColumn, int fieldType)
|
||||
public override void InitTimeEdit(TreeListColumn gridColumn, int fieldType)
|
||||
{
|
||||
RepositoryItemTimeEdit timeEdit = new RepositoryItemTimeEdit();
|
||||
timeEdit.DisplayFormat.FormatString = timeEdit.EditFormat.FormatString = timeEdit.Mask.EditMask = DateFormat.Format(fieldType);
|
||||
@@ -991,7 +1001,7 @@ namespace Lskj.Control
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
/// <param name="gridColumn">The grid column.</param>
|
||||
public void InitCalcEdit(TreeListColumn gridColumn)
|
||||
public override void InitCalcEdit(TreeListColumn gridColumn)
|
||||
{
|
||||
RepositoryItemCalcEdit calcEdit = new RepositoryItemCalcEdit();
|
||||
calcEdit.AllowMouseWheel = false;
|
||||
@@ -1010,7 +1020,7 @@ namespace Lskj.Control
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
/// <param name="gridColumn">The grid column.</param>
|
||||
public void InitMemoEdit(TreeListColumn gridColumn)
|
||||
public override void InitMemoEdit(TreeListColumn gridColumn)
|
||||
{
|
||||
RepositoryItemMemoExEdit memoEdit = new RepositoryItemMemoExEdit();
|
||||
memoEdit.WordWrap = true;
|
||||
@@ -1037,7 +1047,7 @@ namespace Lskj.Control
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
/// <param name="gridColumn">The grid column.</param>
|
||||
public void InitRemarkEdit(TreeListColumn gridColumn)
|
||||
public override void InitRemarkEdit(TreeListColumn gridColumn)
|
||||
{
|
||||
RepositoryItemMemoEdit memo = new RepositoryItemMemoEdit();
|
||||
memo.Appearance.TextOptions.WordWrap = WordWrap.Wrap;//自动换行
|
||||
@@ -1056,7 +1066,7 @@ namespace Lskj.Control
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
/// <param name="gridColumn">The grid column.</param>
|
||||
public void InitMutilEdit(TreeListColumn gridColumn, GridColumnModel model)
|
||||
public override void InitMutilEdit(TreeListColumn gridColumn, GridColumnModel model)
|
||||
{
|
||||
FrmLookUp mutilLookUp = new FrmLookUp();
|
||||
mutilLookUp.ValueField = model.ValueMember;
|
||||
@@ -1103,7 +1113,7 @@ namespace Lskj.Control
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
/// <param name="gridColumn">The grid column.</param>
|
||||
public void InitAutoTreeSearchEdit(TreeListColumn gridColumn, GridColumnModel model, bool isMulitClick = true, bool isRootNode = true)
|
||||
public override void InitAutoTreeSearchEdit(TreeListColumn gridColumn, GridColumnModel model, bool isMulitClick = true, bool isRootNode = true)
|
||||
{
|
||||
PubTreeLookUp _popup = new PubTreeLookUp();
|
||||
//_popup.LookUp = gridColumn;
|
||||
@@ -1150,7 +1160,7 @@ namespace Lskj.Control
|
||||
/// </summary>
|
||||
/// <param name="gridColumn">The grid column.</param>
|
||||
/// <param name="model">The model.</param>
|
||||
public void InitMutilComboxEdit(TreeListColumn gridColumn, GridColumnModel model)
|
||||
public override void InitMutilComboxEdit(TreeListColumn gridColumn, GridColumnModel model)
|
||||
{
|
||||
RepositoryItemCheckedComboBoxEdit comboxEdit = new RepositoryItemCheckedComboBoxEdit();
|
||||
comboxEdit.AllowFocused = true;
|
||||
@@ -1177,7 +1187,7 @@ namespace Lskj.Control
|
||||
/// </summary>
|
||||
/// <param name="gridColumn">The grid column.</param>
|
||||
/// <param name="model">The model.</param>
|
||||
public void InitRichEdit(TreeListColumn gridColumn)
|
||||
public override void InitRichEdit(TreeListColumn gridColumn)
|
||||
{
|
||||
RepositoryItemRichTextEdit richEdit = new RepositoryItemRichTextEdit();
|
||||
richEdit.Encoding = Encoding.UTF8;//乱码问题
|
||||
@@ -1194,7 +1204,7 @@ namespace Lskj.Control
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
public void InitPicEdit(TreeListColumn gridColumn)
|
||||
public override void InitPicEdit(TreeListColumn gridColumn)
|
||||
{
|
||||
RepositoryItemPictureEdit picEdit = new RepositoryItemPictureEdit();
|
||||
picEdit.AutoHeight = true;
|
||||
@@ -1309,7 +1319,7 @@ namespace Lskj.Control
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
/// <param name="gridColumn">The grid column.</param>
|
||||
public void InitCheckEdit(TreeListColumn gridColumn)
|
||||
public override void InitCheckEdit(TreeListColumn gridColumn)
|
||||
{
|
||||
RepositoryItemCheckEdit checkEdit = new RepositoryItemCheckEdit();
|
||||
checkEdit.ValueChecked = 1;
|
||||
@@ -1488,13 +1498,13 @@ namespace Lskj.Control
|
||||
/// </summary>
|
||||
/// <param name="table">The table.</param>
|
||||
/// <param name="customColumKey">The custom colum key.</param>
|
||||
public void InitializeTreeMethod()
|
||||
public override void InitializeTreeMethod()
|
||||
{
|
||||
this.TreeListObj.CellValueChanging += new DevExpress.XtraTreeList.CellValueChangedEventHandler(OnCellValueChaning);
|
||||
}
|
||||
|
||||
|
||||
protected void OnCellValueChaning(object sender, CellValueChangedEventArgs e)
|
||||
protected override void OnCellValueChaning(object sender, CellValueChangedEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -1522,7 +1532,7 @@ namespace Lskj.Control
|
||||
/// <param name="node">The node.</param>
|
||||
/// <param name="check">The check.</param>
|
||||
/// <param name="gridColumn">The grid column.</param>
|
||||
protected void SetCheckedChildNodes(DevExpress.XtraTreeList.Nodes.TreeListNode node, Object check, TreeListColumn gridColumn)
|
||||
protected override void SetCheckedChildNodes(DevExpress.XtraTreeList.Nodes.TreeListNode node, Object check, TreeListColumn gridColumn)
|
||||
{
|
||||
for (int i = 0; i < node.Nodes.Count; i++)
|
||||
{
|
||||
@@ -1544,7 +1554,7 @@ namespace Lskj.Control
|
||||
/// <param name="node">The node.</param>
|
||||
/// <param name="check">The check.</param>
|
||||
/// <param name="gridColumn">The grid column.</param>
|
||||
protected void SetCheckedParentNodes(DevExpress.XtraTreeList.Nodes.TreeListNode node, Object check, TreeListColumn gridColumn)
|
||||
protected override void SetCheckedParentNodes(DevExpress.XtraTreeList.Nodes.TreeListNode node, Object check, TreeListColumn gridColumn)
|
||||
{
|
||||
if (node.ParentNode != null)
|
||||
{
|
||||
@@ -1572,13 +1582,13 @@ namespace Lskj.Control
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
protected void SetGridRowHeightAndFont()
|
||||
protected override void SetGridRowHeightAndFont()
|
||||
{
|
||||
if (SystemInfo.Instance.GridRowFontSize > 0)
|
||||
this.gcMain.Appearance.Row.Font = new Font("微软雅黑", SystemInfo.Instance.GridRowFontSize);
|
||||
this.TreeListObj.Appearance.Row.Font = new Font("微软雅黑", SystemInfo.Instance.GridRowFontSize);
|
||||
if (SystemInfo.Instance.GridRowHeight > 0)
|
||||
{
|
||||
this.gcMain.ColumnPanelRowHeight = this.gcMain.RowHeight = SystemInfo.Instance.GridRowHeight;
|
||||
this.TreeListObj.ColumnPanelRowHeight = this.TreeListObj.RowHeight = SystemInfo.Instance.GridRowHeight;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
@@ -1749,7 +1759,7 @@ namespace Lskj.Control
|
||||
/// </summary>
|
||||
/// <param name="gridColumn">The grid column.</param>
|
||||
/// <param name="model">The model.</param>
|
||||
protected virtual void SetColumnFormat(TreeListColumn gridColumn, GridColumnModel model)
|
||||
public override void SetColumnFormat(TreeListColumn gridColumn, GridColumnModel model)
|
||||
{
|
||||
if (gridColumn == null || model == null) return;
|
||||
|
||||
@@ -1927,7 +1937,7 @@ namespace Lskj.Control
|
||||
/// </summary>
|
||||
/// <param name="sender">The sender.</param>
|
||||
/// <param name="e">The <see cref="KeyEventArgs"/> instance containing the event data.</param>
|
||||
protected virtual void OnTreeGridViewKeyDown(object sender, KeyEventArgs e)
|
||||
protected override void OnTreeGridViewKeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -2058,7 +2068,7 @@ namespace Lskj.Control
|
||||
/// </summary>
|
||||
/// <param name="table">The table.</param>
|
||||
/// <param name="selectRowHandler">if set to <c>true</c> [select row handler].</param>
|
||||
public DataTable GetGridViewDataSource()
|
||||
public override DataTable GetGridViewDataSource()
|
||||
{
|
||||
return this.gcMain.DataSource as DataTable;
|
||||
}
|
||||
@@ -2197,7 +2207,7 @@ namespace Lskj.Control
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
protected virtual void SetAutoColumns()
|
||||
protected override void SetAutoColumns()
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -2361,7 +2371,7 @@ namespace Lskj.Control
|
||||
/// <summary>
|
||||
/// 记录展开的节点
|
||||
/// </summary>
|
||||
public void GetTreeExpanded()
|
||||
public override void GetTreeExpanded()
|
||||
{
|
||||
|
||||
treeListNodes.Clear();
|
||||
@@ -2372,7 +2382,7 @@ namespace Lskj.Control
|
||||
}
|
||||
|
||||
|
||||
public void setRecursive(TreeListNode treeNode)
|
||||
public override void setRecursive(TreeListNode treeNode)
|
||||
{
|
||||
if (treeNode.Expanded) treeListNodes.Add(treeNode);
|
||||
// Visit each node recursively.
|
||||
@@ -2448,7 +2458,7 @@ namespace Lskj.Control
|
||||
/// </summary>
|
||||
/// <param name="sender">The sender.</param>
|
||||
/// <param name="e">The <see cref="PopupMenuShowingEventArgs"/> instance containing the event data.</param>
|
||||
protected void OnAutoSearchEditPopupMenuShowing(object sender, DevExpress.XtraGrid.Views.Grid.PopupMenuShowingEventArgs e)
|
||||
protected override void OnAutoSearchEditPopupMenuShowing(object sender, DevExpress.XtraGrid.Views.Grid.PopupMenuShowingEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -2595,7 +2605,7 @@ namespace Lskj.Control
|
||||
/// </summary>
|
||||
/// <param name="sender">The source of the event.</param>
|
||||
/// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
|
||||
protected void OnPopupGridViewEnter(object sender, KeyEventArgs e)
|
||||
protected override void OnPopupGridViewEnter(object sender, KeyEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -2744,7 +2754,7 @@ namespace Lskj.Control
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
protected void OnModuleChoice(object sender, ButtonPressedEventArgs e)
|
||||
protected override void OnModuleChoice(object sender, ButtonPressedEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -2798,7 +2808,7 @@ namespace Lskj.Control
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
protected void OnModuleRowsChoice(object sender, ButtonPressedEventArgs e)
|
||||
protected override void OnModuleRowsChoice(object sender, ButtonPressedEventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -3072,4 +3082,4 @@ namespace Lskj.Control
|
||||
}
|
||||
table.Rows.Add(newRow);
|
||||
//this.gridView.FocusedRowHandle = _rowNumber - 1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user