Пример #1
0
 /// <summary>
 /// Invoke写备份事件
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void WriteBackupInvoke(object sender, EventArgs e)
 {
     WriteBackupEvent.Invoke(this.Backup文件名);
     if (this.HiddenBackupFile)
     {
         File.SetAttributes(this.Backup文件名, FileAttributes.Hidden);
     }
 }
Пример #2
0
 /// <summary>
 /// 启动自动备份Timer
 /// </summary>
 public void Start()
 {
     if (WriteBackupEvent.GetInvocationList().Length == 0)
     {
         throw new System.Exception("BackupCreater未经初始化就强迫开始执行!");
     }
     this.BackupFileTimer.Start();
     this.ParametersReadOnly = true;
 }