Example #1
0
 public override void Reload()
 {
     _uibWorkingCopy = _uib.Clone();
     ReloadPage(true);
     _dirty         = false;
     panel1.Enabled = true;
 }
Example #2
0
 public override bool SaveFile(string path)
 {
     _uibWorkingCopy.WriteToFile(path);
     _uib   = _uibWorkingCopy.Clone();
     _dirty = false;
     _path  = path;
     return(true);
 }
Example #3
0
 public override bool LoadFile(string path)
 {
     try
     {
         CampaignUibFile uib = new CampaignUibFile(); // seperate copy so incase of read error, _uib is not overwritten
         uib.ReadFromFile(path);
         _uib            = uib;
         _uibWorkingCopy = uib.Clone();
         _dirty          = false;
         _path           = path;
         return(true);
     }
     catch
     {
         MessageBox.Show("The file is not a valid campaign uib file.");
         return(false);
     }
 }