AmountInputBox.xaml.cs
(开头部分) 12KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using VoucherGridCtl.Commons;
using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Media;
namespace VoucherGridCtl
{
/// <summary>
/// UserControl1.xaml 的交互逻辑
/// </summary>
internal partial class AmountInputBox : UserControl
{
//小数位数
static int DECIMAL_DIGITS = 2;
//个位的索引位置
static int UNITS_DIGIT_INDEX = 12;
//总的cell数
static int MAX_CELL_INDEX = UNITS_DIGIT_INDEX + DECIMAL_DIGITS;
Brush oldBackground = null;
int m_HeadIndex = 12;
enum EditModel
{
INTEGER,
FRACTIONAL
}
EditModel m_EditModel = EditModel.FRACTIONAL;
RadioButton[] cells = new RadioButton[MAX_CELL_INDEX+1];
public AmountInputBox()
{
InitializeComponent();
int i = 0;
foreach (UIElement element in grid.Children)
{
if (element is RadioButton)
{
cells[i] = (RadioButton)element;
++i;
}
}
this.KeyDown += AmountInputBox_KeyDown;
this.KeyUp += AmountInputBox_KeyUp;
this.GotFocus += AmountInputBox_GotFocus;
this.LostFocus += AmountInputBox_LostFocus;
InitCells();
}
public decimal Value {
set { SetValue(value);
if (value == 0.00M)
InitCells();
}
后面还有 388 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。