コード例 #1
0
 public AutoSaveManager(string extension, string defDirectory, int interval, int changesCount, Saver saver, object objectToSave)
 {
     Extension          = extension;
     DefaultDirectory   = defDirectory;
     TimerInterval      = interval;
     ChangesToSaveCount = changesCount;
     _timer             = new Timer(AutoSave, null, TimerInterval * 1000, TimerInterval * 1000);
     _saver             = saver;
     ObjectToSave       = objectToSave;
     Enabled            = true;
 }
コード例 #2
0
 public void Save(string fileName, Saver saver, object toSave)
 {
     saver.Save(fileName, toSave);
     OnSave(new SaveEventArgs(fileName));
 }
コード例 #3
0
 public object Open(string fileName, Saver saver)
 {
     return(saver.Open(fileName));
 }