Demo.cs
(开头部分) 3KB这里只显示每个文件的开头 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;
namespace NoticeBox
{
public partial class Demo : Form
{
public Demo()
{
InitializeComponent();
foreach(NoticeBox.StyleColor color in Enum.GetValues(typeof(NoticeBox.StyleColor)))
{
ComboBox_StyleColor.Items.Add(color);
}
ComboBox_StyleColor.SelectedIndex = 8;
}
private void Button_SetHotKey_Click(object sender, EventArgs e)
{
string hotKey = NoticeBox.HotKeyBox("设置快捷键", "按Backspace删除热键", Label_HotKey.Tag.ToString(), (NoticeBox.StyleColor)ComboBox_StyleColor.SelectedIndex, NoticeBox.DefaultButton.Button2);
Label_HotKey.Tag = hotKey;
Label_HotKey.Text = string.Format("当前热键: {0}", hotKey);
}
private void Button_GetFilePath_Click(object sender, EventArgs e)
{
string filePath = NoticeBox.FilePathBox("获取文件路径", "请选择文件", Label_FilePath.Tag.ToString(), (NoticeBox.StyleColor)ComboBox_StyleColor.SelectedIndex,"所有文件|*.*","打开",true,NoticeBox.DefaultButton.Button2);
Label_FilePath.Tag = filePath;
Label_FilePath.Text = string.Format("文件路径: \n{0}", filePath);
}
private void Button_Input_Click(object sender, EventArgs e)
{
string text = NoticeBox.InputBox("输入对话框", "请输入文本内容", Label_Text.Tag.ToString(), (NoticeBox.StyleColor)ComboBox_StyleColor.SelectedIndex, 64, false, NoticeBox.DefaultButton.Button2);
Label_Text.Tag = text;
Label_Text.Text = string.Format("文本内容: {0}", text);
}
private void Button_Message_Style_1_Click(object sender, EventArgs e)
{
NoticeBox.ShowBox("关于", "作者: Anrays\n邮箱: Anrays@outlook.com\n\n感谢使用!", (NoticeBox.StyleColor)ComboBox_StyleColor.SelectedIndex, MessageBoxButtons.OK, MessageBoxIcon.Information, NoticeBox.DefaultButton.Button3);
}
private void Button_Message_Style_2_Click(object sender, EventArgs e)
{
NoticeBox.ShowBox("未登录", "您还未登录!\n请先登录后再重新尝试操作。", (NoticeBox.StyleColor)ComboBox_StyleColor.SelectedIndex, MessageBoxButtons.OKCancel, MessageBoxIcon.Asterisk, NoticeBox.DefaultButton.Button2);
}
private void Button_Message_Style_3_Click(object sender, EventArgs e)
{
NoticeBox.ShowBox("提示", "是否保存对该文件的更改?\n\nNoticeBox.csproj", (NoticeBox.StyleColor)ComboBox_StyleColor.SelectedIndex, MessageBoxButtons.YesNoCancel, MessageBoxIcon.Exclamation, NoticeBox.DefaultButton.Button1);
}
后面还有 7 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。