private void button1_Click(object sender, EventArgs e)
        {
            NotepadInfoRepository notepadInfoRepository = new NotepadInfoRepository();
            var infos = notepadInfoRepository.GetInfos();

            listBox1.Items.Clear();
            foreach (var item in infos)
            {
                listBox1.Items.Add($"【{item.CreateTime.ToString("yyyy-MM-dd HH:mm:ss")}】{item.NotepadContent}");
            }
        }
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            Task.Factory.StartNew(() =>
            {
                NotepadInfoRepository notepadInfoRepository = new NotepadInfoRepository();
                var infos = notepadInfoRepository.GetInfos();
            });

            Application.Run(new Form1());
        }
 private void button2_Click(object sender, EventArgs e)
 {
     if (!string.IsNullOrWhiteSpace(textBox1.Text))
     {
         NotepadInfoRepository notepadInfoRepository = new NotepadInfoRepository();
         notepadInfoRepository.SetInfo(textBox1.Text);
         button1_Click(null, null);
     }
     else
     {
         MessageBox.Show("大兄dei,你得写字啊", "系统提示");
     }
     textBox1.Clear();
 }