Form1.cs
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
// 下载于www.51aspx.com
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
if (textBox1.Text == "")
{
button3.Text = "商品名称不能为空";
button3.ForeColor = Color.Red;
textBox1.Focus();
}
else
{
if (listBox1.Items.Count > 0)
{
for (int i = 0; i < listBox1.Items.Count; i++)
{
if (listBox1.Items[i].ToString() == textBox1.Text)
{
button3.Text = "商品已存在";
button3.ForeColor = Color.Red;
textBox1.Clear();
textBox1.Focus();
}
}
//listBox1.Items.Add(textBox1.Text);
//textBox1.Clear();
}
listBox1.Items.Add(textBox1.Text);
textBox1.Clear();
}
}
private void button2_Click(object sender, EventArgs e)
{
listBox1.Items.Clear();
}
//private void button4_Click(object sender, EventArgs e)
//{
//}
后面还有 15 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。