Source/Editors/DateTimeAdv/HourPeriodInput.cs
(开头部分) 4KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
#if FRAMEWORK20
using System;
using System.Collections.Generic;
using System.Text;
using System.ComponentModel;
using System.Globalization;
namespace DevComponents.Editors.DateTimeAdv
{
public class HourPeriodInput : VisualStringListInput
{
#region Private Variables
#endregion
#region Events
#endregion
#region Constructor
#endregion
#region Internal Implementation
private NumericHourInput _HourInput;
public NumericHourInput HourInput
{
get { return _HourInput; }
set
{
if (_HourInput != null)
{
_HourInput.ValueChanged -= new EventHandler(HourChanged);
_HourInput.IsEmptyChanged -= new EventHandler(HourIsEmptyChanged);
}
_HourInput = value;
if (_HourInput != null)
{
_HourInput.ValueChanged += new EventHandler(HourChanged);
_HourInput.IsEmptyChanged += new EventHandler(HourIsEmptyChanged);
}
}
}
private void HourIsEmptyChanged(object sender, EventArgs e)
{
if (_HourInput != null && _HourInput.IsEmpty)
this.IsEmpty = true;
}
private void HourChanged(object sender, EventArgs e)
{
if (_HourInput == null) return;
if (!_HourInput.IsEmpty)
{
if (_HourInput.Period == eHourPeriod.AM)
{
this.SelectedIndex = 0;
}
else
{
this.SelectedIndex = 1;
}
}
后面还有 88 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。