基线 SVN r240
SVN-Revision: r240
This commit is contained in:
@@ -0,0 +1,223 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Windows.Forms;
|
||||
using DevExpress.XtraGrid;
|
||||
using DevExpress.XtraGrid.Columns;
|
||||
using DevExpress.XtraGrid.Drawing;
|
||||
using DevExpress.XtraGrid.Views.Base;
|
||||
using DevExpress.XtraGrid.Views.Base.ViewInfo;
|
||||
using DevExpress.XtraGrid.Views.Grid;
|
||||
using DevExpress.XtraGrid.Views.Grid.ViewInfo;
|
||||
|
||||
// Token: 0x02000003 RID: 3
|
||||
public class AmountCellRender
|
||||
{
|
||||
public AmountCellRender(GridView gridView_0)
|
||||
{
|
||||
Class5.gBkiB4AzUqwkh();
|
||||
this.colorGray = Color.FromArgb(189, 185, 185);
|
||||
this.colorGreen = Color.Green;
|
||||
this.colorRed = Color.Red;
|
||||
this.string_0 = "万仟佰拾亿仟佰拾万仟佰拾元角分";
|
||||
this.int_0 = 14;
|
||||
this.dictionary_0 = new Dictionary<string, Class2>();
|
||||
this.list_0 = new List<GridColumn>();
|
||||
this.object_0 = gridView_0;
|
||||
this.object_0.CustomDrawCell += this.object_0_CustomDrawCell;
|
||||
this.object_0.CustomDrawColumnHeader += this.object_0_CustomDrawColumnHeader;
|
||||
this.object_0.CustomDrawFooterCell += this.object_0_CustomDrawFooterCell;
|
||||
this.object_0.GridControl.Paint += this.method_0;
|
||||
}
|
||||
|
||||
private void method_0(object sender, PaintEventArgs e)
|
||||
{
|
||||
BaseViewInfo viewInfo = ((sender as GridControl).FocusedView as GridView).GetViewInfo();
|
||||
foreach (GridColumn gridColumn in this.list_0)
|
||||
{
|
||||
Class2 @class = this.dictionary_0[gridColumn.Name];
|
||||
if (@class.IsCountinuousCell())
|
||||
{
|
||||
GridViewInfo gridViewInfo = viewInfo as GridViewInfo;
|
||||
GridColumnInfoArgs gridColumnInfoArgs = gridViewInfo.ColumnsInfo[gridColumn];
|
||||
if (gridColumnInfoArgs == null) return;
|
||||
int num = 0;
|
||||
int int_;
|
||||
if (@class.method_4())
|
||||
{
|
||||
int_ = gridColumnInfoArgs.Bounds.Y;
|
||||
num = gridColumnInfoArgs.Bounds.Height;
|
||||
}
|
||||
else
|
||||
{
|
||||
int_ = gridColumnInfoArgs.Bounds.Y + gridColumnInfoArgs.Bounds.Height;
|
||||
}
|
||||
int num2;
|
||||
if (@class.method_0())
|
||||
{
|
||||
int rowsTotalHeight = gridViewInfo.ViewRects.RowsTotalHeight;
|
||||
int height = gridViewInfo.ViewRects.Client.Height;
|
||||
int height2 = gridViewInfo.ViewRects.Rows.Height;
|
||||
if (@class.method_2())
|
||||
{
|
||||
num2 = height2 + gridViewInfo.FooterInfo.Bounds.Height;
|
||||
}
|
||||
else
|
||||
{
|
||||
num2 = height2;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
int rowsTotalHeight2 = gridViewInfo.ViewRects.RowsTotalHeight;
|
||||
int height3 = gridViewInfo.ViewRects.Rows.Height;
|
||||
num2 = ((rowsTotalHeight2 > height3) ? height3 : rowsTotalHeight2);
|
||||
}
|
||||
num2 += num;
|
||||
@class.method_19(e.Graphics, gridColumnInfoArgs.Bounds, 1, int_, num2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void object_0_CustomDrawCell(object sender, RowCellCustomDrawEventArgs e)
|
||||
{
|
||||
if (this.dictionary_0.ContainsKey(e.Column.Name))
|
||||
{
|
||||
e.DisplayText = "";
|
||||
Class2 @class = this.dictionary_0[e.Column.Name];
|
||||
Rectangle bounds = e.Bounds;
|
||||
Rectangle rectangle_ = bounds;
|
||||
Graphics graphics = e.Graphics;
|
||||
Font font = e.Appearance.Font;
|
||||
object cellValue = e.CellValue;
|
||||
@class.method_17(rectangle_, graphics, font, (cellValue != null) ? cellValue+"" : "");
|
||||
e.Handled = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void object_0_CustomDrawFooterCell(object sender, FooterCellCustomDrawEventArgs e)
|
||||
{
|
||||
if (this.dictionary_0.ContainsKey(e.Column.Name))
|
||||
{
|
||||
Class2 @class = this.dictionary_0[e.Column.Name];
|
||||
if (@class.method_8())
|
||||
{
|
||||
e.Info.DisplayText = "";
|
||||
Rectangle bounds = e.Bounds;
|
||||
@class.method_17(bounds, e.Graphics, e.Appearance.Font, e.Info.Value.ToString());
|
||||
e.Handled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void object_0_CustomDrawColumnHeader(object sender, ColumnHeaderCustomDrawEventArgs e)
|
||||
{
|
||||
if (e.Column == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (this.dictionary_0.ContainsKey(e.Column.Name))
|
||||
{
|
||||
Class2 @class = this.dictionary_0[e.Column.Name];
|
||||
if (@class.method_6())
|
||||
{
|
||||
e.Column.Caption = "";
|
||||
Rectangle bounds = e.Bounds;
|
||||
@class.method_18(bounds, e.Graphics, e.Column.AppearanceHeader.Font);
|
||||
e.Handled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[CompilerGenerated]
|
||||
public Color method_1()
|
||||
{
|
||||
return this.colorGray;
|
||||
}
|
||||
|
||||
[CompilerGenerated]
|
||||
public void method_2(Color color_3)
|
||||
{
|
||||
this.colorGray = color_3;
|
||||
}
|
||||
|
||||
[CompilerGenerated]
|
||||
public Color method_3()
|
||||
{
|
||||
return this.colorGreen;
|
||||
}
|
||||
|
||||
[CompilerGenerated]
|
||||
public void method_4(Color color_3)
|
||||
{
|
||||
this.colorGreen = color_3;
|
||||
}
|
||||
|
||||
[CompilerGenerated]
|
||||
public Color method_5()
|
||||
{
|
||||
return this.colorRed;
|
||||
}
|
||||
|
||||
[CompilerGenerated]
|
||||
public void method_6(Color color_3)
|
||||
{
|
||||
this.colorRed = color_3;
|
||||
}
|
||||
|
||||
[CompilerGenerated]
|
||||
public string method_7()
|
||||
{
|
||||
return this.string_0;
|
||||
}
|
||||
|
||||
[CompilerGenerated]
|
||||
public void method_8(string string_1)
|
||||
{
|
||||
this.string_0 = string_1;
|
||||
}
|
||||
|
||||
[CompilerGenerated]
|
||||
public int method_9()
|
||||
{
|
||||
return this.int_0;
|
||||
}
|
||||
|
||||
[CompilerGenerated]
|
||||
public void method_10(int int_1)
|
||||
{
|
||||
this.int_0 = int_1;
|
||||
}
|
||||
|
||||
public Class2 AddAmountColumn(GridColumn gridColumn, int jeNum)
|
||||
{
|
||||
int num = this.method_9() * jeNum;
|
||||
gridColumn.Width = num;
|
||||
gridColumn.MinWidth = num;
|
||||
gridColumn.MaxWidth = num;
|
||||
Class2 @class = new Class2(this, jeNum);
|
||||
this.dictionary_0.Add(gridColumn.Name, @class);
|
||||
this.list_0.Add(gridColumn);
|
||||
return @class;
|
||||
}
|
||||
|
||||
public void RemoveAmountColumn(GridColumn gridColumn_0)
|
||||
{
|
||||
if (this.dictionary_0.ContainsKey(gridColumn_0.Name))
|
||||
{
|
||||
this.dictionary_0.Remove(gridColumn_0.Name);
|
||||
this.list_0.Remove(gridColumn_0);
|
||||
}
|
||||
}
|
||||
|
||||
private GridView object_0;
|
||||
|
||||
private Color colorGray;
|
||||
private Color colorGreen;
|
||||
private Color colorRed;
|
||||
private string string_0;
|
||||
private int int_0;
|
||||
private Dictionary<string, Class2> dictionary_0;
|
||||
private List<GridColumn> list_0;
|
||||
}
|
||||
Reference in New Issue
Block a user