基线 SVN r240

SVN-Revision: r240
This commit is contained in:
cyf
2025-02-06 06:46:06 +00:00
commit ab56a9bcf7
5317 changed files with 902274 additions and 0 deletions
@@ -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;
}
+6
View File
@@ -0,0 +1,6 @@
using System;
// Token: 0x02000002 RID: 2
internal static class Class0
{
}
+337
View File
@@ -0,0 +1,337 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Runtime.CompilerServices;
// Token: 0x02000004 RID: 4
public class Class2
{
// Token: 0x06000012 RID: 18 RVA: 0x000022C5 File Offset: 0x000004C5
public Class2(AmountCellRender class1_1, int int_1)
{
Class5.gBkiB4AzUqwkh();
this.isContinuousCell = true;
this.class1_0 = class1_1;
this.method_12(int_1);
}
// Token: 0x06000013 RID: 19 RVA: 0x000022E7 File Offset: 0x000004E7
[CompilerGenerated]
public bool method_0()
{
return this.isFillBackGround;
}
// Token: 0x06000014 RID: 20 RVA: 0x000022EF File Offset: 0x000004EF
[CompilerGenerated]
public void SetFillBackGround(bool b)
{
this.isFillBackGround = b;
}
// Token: 0x06000015 RID: 21 RVA: 0x000022F8 File Offset: 0x000004F8
[CompilerGenerated]
public bool method_2()
{
return this.bool_1;
}
// Token: 0x06000016 RID: 22 RVA: 0x00002300 File Offset: 0x00000500
[CompilerGenerated]
public void SetFillFooter(bool bool_6)
{
this.bool_1 = bool_6;
}
// Token: 0x06000017 RID: 23 RVA: 0x00002309 File Offset: 0x00000509
[CompilerGenerated]
public bool method_4()
{
return this.bool_2;
}
// Token: 0x06000018 RID: 24 RVA: 0x00002311 File Offset: 0x00000511
[CompilerGenerated]
public void method_5(bool bool_6)
{
this.bool_2 = bool_6;
}
// Token: 0x06000019 RID: 25 RVA: 0x0000231A File Offset: 0x0000051A
[CompilerGenerated]
public bool method_6()
{
return this.bool_3;
}
// Token: 0x0600001A RID: 26 RVA: 0x00002322 File Offset: 0x00000522
[CompilerGenerated]
public void method_7(bool bool_6)
{
this.bool_3 = bool_6;
}
// Token: 0x0600001B RID: 27 RVA: 0x0000232B File Offset: 0x0000052B
[CompilerGenerated]
public bool method_8()
{
return this.bool_4;
}
// Token: 0x0600001C RID: 28 RVA: 0x00002333 File Offset: 0x00000533
[CompilerGenerated]
public void method_9(bool bool_6)
{
this.bool_4 = bool_6;
}
// Token: 0x0600001D RID: 29 RVA: 0x0000233C File Offset: 0x0000053C
[CompilerGenerated]
public bool IsCountinuousCell()
{
return this.isContinuousCell;
}
// Token: 0x0600001E RID: 30 RVA: 0x00002344 File Offset: 0x00000544
[CompilerGenerated]
public void SetIsContinuousCell(bool bool_6)
{
this.isContinuousCell = bool_6;
}
// Token: 0x0600001F RID: 31 RVA: 0x0000234D File Offset: 0x0000054D
[CompilerGenerated]
private int method_11()
{
return this.int_0;
}
// Token: 0x06000020 RID: 32 RVA: 0x00002355 File Offset: 0x00000555
[CompilerGenerated]
private void method_12(int int_1)
{
this.int_0 = int_1;
}
// Token: 0x06000021 RID: 33 RVA: 0x0000235E File Offset: 0x0000055E
private int method_13()
{
return this.class1_0.method_9();
}
// Token: 0x06000022 RID: 34 RVA: 0x0000236B File Offset: 0x0000056B
private Color method_14()
{
return this.class1_0.method_5();
}
// Token: 0x06000023 RID: 35 RVA: 0x00002378 File Offset: 0x00000578
public Color method_15()
{
return this.class1_0.method_3();
}
// Token: 0x06000024 RID: 36 RVA: 0x00002385 File Offset: 0x00000585
public Color method_16()
{
return this.class1_0.method_1();
}
// Token: 0x06000025 RID: 37 RVA: 0x000029C4 File Offset: 0x00000BC4
public void method_17(Rectangle rectangle_0, Graphics graphics_0, Font font_0, string string_0)
{
int i = rectangle_0.Width;
int num = 1;
float width = 1f;
List<string> list = this.method_21(string_0);
if (list == null) return;
while (i > 0)
{
if (list.Count >= num)
{
this.method_20(rectangle_0, graphics_0, num, list[num - 1], font_0);
}
if (num < this.method_11())
{
if (i - this.method_13() <= 0)
{
goto IL_FA;
}
i -= this.method_13();
if (!this.IsCountinuousCell())
{
Color color = Color.Empty;
if (num == 2)
{
color = this.method_14();
}
else if (num > 2 && (num - 2) % 3 == 0)
{
color = this.method_15();
}
else
{
color = this.method_16();
}
if (color != Color.Empty)
{
using (Pen pen = new Pen(color, width))
{
graphics_0.DrawLine(pen, new Point(rectangle_0.Left + i, rectangle_0.Top), new Point(rectangle_0.Left + i, rectangle_0.Top + rectangle_0.Height));
goto IL_FC;
}
goto IL_FA;
}
}
IL_FC:
num++;
continue;
IL_FA:
i = 0;
goto IL_FC;
}
break;
}
}
// Token: 0x06000026 RID: 38 RVA: 0x00002AE8 File Offset: 0x00000CE8
public void method_18(Rectangle rectangle_0, Graphics graphics_0, Font font_0)
{
Rectangle rectangle_ = new Rectangle
{
X = rectangle_0.X - 1,
Y = rectangle_0.Y,
Width = rectangle_0.Width - 2,
Height = rectangle_0.Height
};
int i = rectangle_.Width;
int num = 1;
int length = this.class1_0.method_7().Length;
while (i > 0)
{
if (length >= num && length - num >= 0)
{
this.method_20(rectangle_, graphics_0, num, this.class1_0.method_7()[length - num].ToString(), font_0);
}
if (num >= this.method_11())
{
break;
}
if (i - this.method_13() > 0)
{
i -= this.method_13();
}
else
{
i = 0;
}
num++;
}
}
// Token: 0x06000027 RID: 39 RVA: 0x00002BB8 File Offset: 0x00000DB8
public void method_19(Graphics graphics_0, Rectangle rectangle_0, int int_1, int int_2, int int_3)
{
int i = rectangle_0.Width;
int num = 1;
while (i > 0)
{
if (i - this.method_13() > 0)
{
i -= this.method_13();
Color color = Color.Empty;
if (num == 2)
{
color = this.method_14();
}
else if (num > 2 && (num - 2) % 3 == 0)
{
color = this.method_15();
}
else
{
color = this.method_16();
}
if (color != Color.Empty)
{
Rectangle rect = new Rectangle(rectangle_0.Left + i - 2, int_2, int_1, int_3);
graphics_0.FillRectangle(new SolidBrush(color), rect);
}
}
else
{
i = 0;
}
num++;
}
Rectangle rect2 = new Rectangle(rectangle_0.Left - 1, int_2, int_1 + 1, int_3);
graphics_0.FillRectangle(new SolidBrush(Color.FromArgb(161, 157, 157)), rect2);
Rectangle rect3 = new Rectangle(rectangle_0.Left + rectangle_0.Width - 1, int_2, int_1 + 1, int_3);
graphics_0.FillRectangle(new SolidBrush(Color.FromArgb(161, 157, 157)), rect3);
}
// Token: 0x06000028 RID: 40 RVA: 0x00002CC8 File Offset: 0x00000EC8
private void method_20(Rectangle rectangle_0, Graphics graphics_0, int int_1, string string_0, Font font_0)
{
SizeF sizeF = graphics_0.MeasureString(string_0, font_0);
int num = ((float)this.method_13() < sizeF.Width) ? 0 : Convert.ToInt32(Convert.ToDouble(this.method_13()) / 2.0 - (double)(sizeF.Width / 2f));
int num2 = rectangle_0.Right - int_1 * this.method_13() + num;
using (SolidBrush solidBrush = new SolidBrush(Color.Black))
{
graphics_0.DrawString(string_0, font_0, solidBrush, (float)num2, (float)(rectangle_0.Top + rectangle_0.Height / 2) - sizeF.Height / 2f);
}
}
// Token: 0x06000029 RID: 41 RVA: 0x00002D84 File Offset: 0x00000F84
private List<string> method_21(string string_0)
{
decimal d = 0m;
if (!decimal.TryParse(string_0, out d))
{
return null;
}
if (d == 0m)
{
return null;
}
string text = d.ToString("#0.00").Replace(".", "");
List<string> list = new List<string>();
string text2 = text;
for (int i = 0; i < text2.Length; i++)
{
list.Insert(0, text2[i].ToString());
}
return list;
}
// Token: 0x04000009 RID: 9
private AmountCellRender class1_0;
// Token: 0x0400000A RID: 10
[CompilerGenerated]
private bool isFillBackGround;
// Token: 0x0400000B RID: 11
[CompilerGenerated]
private bool bool_1;
// Token: 0x0400000C RID: 12
[CompilerGenerated]
private bool bool_2;
// Token: 0x0400000D RID: 13
[CompilerGenerated]
private bool bool_3;
// Token: 0x0400000E RID: 14
[CompilerGenerated]
private bool bool_4;
// Token: 0x0400000F RID: 15
[CompilerGenerated]
private bool isContinuousCell;
// Token: 0x04000010 RID: 16
[CompilerGenerated]
private int int_0;
}
+37
View File
@@ -0,0 +1,37 @@
using System;
using System.Reflection;
// Token: 0x0200000D RID: 13
internal class Class4
{
// Token: 0x06000055 RID: 85 RVA: 0x00008008 File Offset: 0x00006208
internal static void CVTiB4AAUxGiD(int typemdt)
{
Type type = Class4.module_0.ResolveType(33554432 + typemdt);
foreach (FieldInfo fieldInfo in type.GetFields())
{
MethodInfo method = (MethodInfo)Class4.module_0.ResolveMethod(fieldInfo.MetadataToken + 100663296);
fieldInfo.SetValue(null, (MulticastDelegate)Delegate.CreateDelegate(type, method));
}
}
// Token: 0x06000056 RID: 86 RVA: 0x000024AC File Offset: 0x000006AC
public Class4()
{
Class5.gBkiB4AzUqwkh();
}
// Token: 0x06000057 RID: 87 RVA: 0x0000251D File Offset: 0x0000071D
static Class4()
{
Class5.gBkiB4AzUqwkh();
Class4.module_0 = typeof(Class4).Assembly.ManifestModule;
}
// Token: 0x0400007C RID: 124
internal static Module module_0;
// Token: 0x0200000E RID: 14
// (Invoke) Token: 0x06000059 RID: 89
internal delegate void Delegate0(object o);
}
+13
View File
@@ -0,0 +1,13 @@
using System;
// Token: 0x0200000F RID: 15
internal class Class5
{
// Token: 0x0600005C RID: 92 RVA: 0x0000253E File Offset: 0x0000073E
internal static void gBkiB4AzUqwkh()
{
}
// Token: 0x0400007D RID: 125
private static bool bool_0;
}