123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126 |
- using System;
- using System.Collections.Generic;
- namespace OpenSim.Region.OptionalModules.World.AutoBackup
- {
-
-
-
-
-
- public class AutoBackupModuleState
- {
- private Dictionary<Guid, string> m_liveRequests = null;
- public AutoBackupModuleState()
- {
- this.Enabled = false;
- this.BackupDir = ".";
- this.BusyCheck = true;
- this.Timer = null;
- this.NamingType = NamingType.Time;
- this.Script = null;
- }
- public Dictionary<Guid, string> LiveRequests
- {
- get {
- return this.m_liveRequests ??
- (this.m_liveRequests = new Dictionary<Guid, string>(1));
- }
- }
- public bool Enabled
- {
- get;
- set;
- }
- public System.Timers.Timer Timer
- {
- get;
- set;
- }
- public double IntervalMinutes
- {
- get
- {
- if (this.Timer == null)
- {
- return -1.0;
- }
- else
- {
- return this.Timer.Interval / 60000.0;
- }
- }
- }
- public bool BusyCheck
- {
- get;
- set;
- }
- public string Script
- {
- get;
- set;
- }
- public string BackupDir
- {
- get;
- set;
- }
- public NamingType NamingType
- {
- get;
- set;
- }
- public new string ToString()
- {
- string retval = "";
- retval += "[AUTO BACKUP]: AutoBackup: " + (Enabled ? "ENABLED" : "DISABLED") + "\n";
- retval += "[AUTO BACKUP]: Interval: " + IntervalMinutes + " minutes" + "\n";
- retval += "[AUTO BACKUP]: Do Busy Check: " + (BusyCheck ? "Yes" : "No") + "\n";
- retval += "[AUTO BACKUP]: Naming Type: " + NamingType.ToString() + "\n";
- retval += "[AUTO BACKUP]: Backup Dir: " + BackupDir + "\n";
- retval += "[AUTO BACKUP]: Script: " + Script + "\n";
- return retval;
- }
- }
- }
|