private void button1_Click(object sender, EventArgs e) { if (textBox1.Text.Length > 0) { textBox2.Text = CONVERT.ToASCII(textBox1.Text, checkBox1.Checked); } else { MessageBox.Show("不可以转换空值。", "警告"); } if (checkBox2.Checked) { Clipboard.SetDataObject(textBox2.Text); } if (checkBox3.Checked) { if (textBox3.Text != null) { FILE.Create(textBox3.Text, textBox2.Text); } else { MessageBox.Show("路径为空或非法", "警告"); } } }
static void Main(string[] args) { TEXT text = new TEXT(); FILE.Create(args[0], text); }