ModelForm.cs
(完整代码) 1KBusing System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;
namespace dbToCode
{
public partial class ModelForm : Form
{
public ModelForm()
{
InitializeComponent();
}
private void ModelForm_Load(object sender, EventArgs e)
{
//listBox1.DataSource = comment.GetRooAllFilesByExtension(Application.StartupPath, new string[] { ".txt"});
}
private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
{
string temp=listBox1.SelectedValue.ToString().Replace("~//","");
if (temp.Trim() == "")
return;
textBox1.Text = File.ReadAllText(temp,Encoding.GetEncoding("gb2312"));
}
private void 保存ToolStripMenuItem_Click(object sender, EventArgs e)
{
string temp=listBox1.SelectedValue.ToString().Replace("~//","");
if (temp.Trim() == "")
{
MessageBox.Show("没有任务文件");
return;
}
File.WriteAllText(temp,textBox1.Text, Encoding.UTF8);
MessageBox.Show("保存成功");
}
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。