RedCell.App.Demo.PixelBox/PixelBoxDemo.cs
(完整代码) 1KBusing System;
using System.Drawing.Drawing2D;
using System.Windows.Forms;
namespace RedCell.App.Demo.PixelBox
{
/// <summary>
/// Demonstration
/// </summary>
public partial class PixelBoxDemo : Form
{
/// <summary>
/// Initializes a new instance of the <see cref="PixelBoxDemo"/> class.
/// </summary>
public PixelBoxDemo()
{
InitializeComponent();
// This project uses .NET 2.0, so LINQ isn't available.
foreach (InterpolationMode value in Enum.GetValues(typeof(InterpolationMode)))
if(value != InterpolationMode.Invalid)
InterpolationComboBox.Items.Add(value);
}
/// <summary>
/// Handles the SelectionChangeCommitted event of the InterpolationComboBox control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
private void InterpolationComboBox_SelectionChangeCommitted(object sender, EventArgs e)
{
var mode = (InterpolationMode) (sender as ComboBox).SelectedItem;
ImagePixelBox.InterpolationMode = mode;
ImagePixelBox.Invalidate();
}
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
