⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmbackup.cs

📁 这是一款系统系统备份的软件
💻 CS
字号:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using BackupSystem.LogicLayer;
using BackupSystem.DataLayer;

namespace BackupSystem.UILayer
{
    public partial class FrmBackup : Form
    {
        private BackupThread thread;

        public FrmBackup(EntryList entryList)
        {
            InitializeComponent();
            this.thread = new BackupThread(entryList);
        }

        public void Start()
        {
            this.thread.Start();
            this.timer.Enabled = true;
        }

        private void timer_Tick(object sender, EventArgs e)
        {
            if (this.thread.IsFinished != true)
            {
                this.lblFile.Text = this.thread.ProcessingFile;
                this.lblPercentage.Text = this.thread.FilePercentage * 100 + "%";
                this.progressBar.Value = Convert.ToInt32(this.thread.FilePercentage * 100);
            }
            else
            {
                this.timer.Enabled = false;
                this.lblPercentage.Text = "100%";
                this.progressBar.Value = 100;
                if(MessageBox.Show("备份完成!") == DialogResult.OK)
                    this.Close();
            }
        }

        private void lblPercentage_Click(object sender, EventArgs e)
        {

        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -