Form1.cs

(开头部分) 11KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;

namespace Note
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            //下载于51aspx
            InitializeComponent();
        }
        
        private void mnuNew_Click(object sender, EventArgs e)
        {
            FrmChild frmCld = new FrmChild();
            frmCld.MdiParent = this;

            Button btn = new Button();
            btn.AutoSize = true;
            btn.Height = 25;
            btn.Width = 60;
            btn.Margin = btn.Padding = new Padding(0);
            btn.Text = "无标题";
            btn.Font = new Font("宋体",9);
            flowLayoutPanel1.Controls.Add(btn);
            btn.Click+=new EventHandler(btn_Click);

            btn.Tag = frmCld;
            frmCld.Tag = btn;

            frmCld.Show();//新建和后面的打开子窗口,Show出来的时候都包含激活,如果写在new Button前面的话,激活的活动子窗口还没有跟它对应的Button
        }

        private void mnuOpen_Click(object sender, EventArgs e)
        {      
            DialogResult result = openFileDialog1.ShowDialog();
            if (result != System.Windows.Forms.DialogResult.OK)
            {
                return;
            }
            string path = openFileDialog1.FileName;
            FrmChild frmCld = new FrmChild();
            frmCld.MdiParent = this;
            frmCld.Text = path;
            frmCld.textBox1.Text = File.ReadAllText(path, Encoding.Default);

            Button btn = new Button();
            btn.AutoSize = true;
            btn.Height = 25;
            btn.Width = 60;
            btn.Margin = btn.Padding = new Padding(0);
            btn.Text = Path.GetFileName(path);
后面还有 263 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。