📄 formaddfunctionguide.cs
字号:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace ProgramCalculator
{
public partial class FormAddFunctionGuide : Form
{
public string FunctionName = "";
/// <summary>
/// 用于说明函数的简短信息
/// </summary>
public string ExplainInfo = "";
public FormAddFunctionGuide()
{
InitializeComponent();
}
private void buttonCancel_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.Cancel;
}
private void buttonOk_Click(object sender, EventArgs e)
{
string input = this.textBoxFunctionName.Text.Trim();
if(String.IsNullOrEmpty(input))
{
this.labelInfo.Text = "函数名不能为空";
return;
}
else
{
for (int i = 0; i < input.Length; i++)
{
if(!char.IsLetter(input[i]))
{
this.labelInfo.Text = "函数名只能为字母";
return;
}
}
}
this.FunctionName = input;
this.ExplainInfo = this.textBoxExplainInfo.Text;
this.DialogResult = DialogResult.OK;
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -