Source/Editors/IPAddressGroup.cs
(开头部分) 6KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
#if FRAMEWORK20
using System;
using System.Collections.Generic;
using System.Text;
namespace DevComponents.Editors
{
public class IpAddressGroup : VisualInputGroup
{
#region Events
public event EventHandler ValueChanged;
#endregion
#region Constructors
/// <summary>
/// Initializes a new instance of the IPAddressGroup class.
/// </summary>
public IpAddressGroup()
{
// Create IP4 default items
for (int i = 0; i < 4; i++)
{
VisualIntegerInput input = new VisualIntegerInput();
input.MaxValue = 255;
input.MinValue = 0;
this.Items.Add(input);
if (i < 3)
{
VisualLabel label = new VisualLabel();
label.Text = ".";
this.Items.Add(label);
}
}
}
#endregion
#region Internal Implementation
private string _Value;
public string Value
{
get
{
if (this.IsFocused)
{
if (IsInputValid())
UpdateValue();
}
return _Value;
}
set
{
bool valueChanged = _Value != value;
if (!string.IsNullOrEmpty(value))
{
if (!IsValueValid(value))
throw new ArgumentException("Value is not valid IP value");
}
_Value = value;
UpdateInputItems();
if(valueChanged)
后面还有 163 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。