FileBackupPartial.cs 978 B

12345678910111213141516171819202122232425262728293031323334
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Drawing;
  5. using System.Data;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows.Forms;
  10. using System.IO;
  11. namespace Oreo.FileMan.Partials
  12. {
  13. public partial class FileBackupPartial : UserControl
  14. {
  15. List<string> BackupFolder = new List<string>();
  16. public FileBackupPartial()
  17. {
  18. InitializeComponent();
  19. }
  20. private void BtAddFolder_Click(object sender, EventArgs e)
  21. {
  22. FolderBrowserDialog dialog = new FolderBrowserDialog();
  23. dialog.Description = "请选择要备份的文件夹";
  24. if (dialog.ShowDialog() == DialogResult.OK)
  25. {
  26. string foldPath = dialog.SelectedPath;
  27. BackupFolder.Add(foldPath);
  28. DgvPath.Rows.Add(new object[] { Path.GetFileName(foldPath), "0KB" });
  29. }
  30. }
  31. }
  32. }