WinFormsPopupAlerts/CornerRadiusEditorControl.cs
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
namespace WinFormsPopupAlerts
{
/// <summary>
/// Control for editing the value of objects of CornerRadius class.
/// </summary>
[ToolboxItem(false)]
internal partial class CornerRadiusEditorControl : UserControl
{
private CornerRadius crc;
private bool initialized;
public CornerRadiusEditorControl(CornerRadius value)
{
this.crc = value;
InitializeComponent();
numLeftTop.Value = crc.TopLeft;
numTopRight.Value = crc.TopRight;
numBottomLeft.Value = crc.BottomLeft;
numBottomRight.Value = crc.BottomRight;
if (crc.Equals(crc.TopLeft))
numericUpDown1.Value = crc.TopLeft;
initialized = true;
}
protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint(e);
}
private void numLeftTop_ValueChanged(object sender, EventArgs e)
{
if (initialized)
crc.TopLeft = (int)numLeftTop.Value;
}
private void numTopRight_ValueChanged(object sender, EventArgs e)
{
if (initialized)
crc.TopRight = (int)numTopRight.Value;
}
private void numBottomLeft_ValueChanged(object sender, EventArgs e)
{
if (initialized)
crc.BottomLeft = (int)numBottomLeft.Value;
}
private void numBottomRight_ValueChanged(object sender, EventArgs e)
{
if (initialized)
crc.BottomRight = (int)numBottomRight.Value;
}
后面还有 14 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。