コード例 #1
0
 public void Save(PhysicalSpace spaceSetup){
     CheckSetupsDirectoryExists();
     IFormatter formatter = new BinaryFormatter();
     Stream stream = new FileStream(SETUPS_PATH+spaceSetup._name + SETUP_EXTENSION, FileMode.Create, FileAccess.Write, FileShare.None);
     formatter.Serialize(stream, spaceSetup);
     stream.Close();
     LoadSetups();
 }
コード例 #2
0
 public void Delete(PhysicalSpace spaceSetup)
 {
     CheckSetupsDirectoryExists();
     if (spaceSetup != null)
     {
         string filename = SETUPS_PATH+spaceSetup._name + SETUP_EXTENSION;
         if (File.Exists(filename))
         {
             File.Delete(filename);
         }
     }
     LoadSetups();
 }
コード例 #3
0
 public void ActivateSetup(PhysicalSpace physicalSpaceSetup)
 {
     _client.ActiveSpaceSetup = physicalSpaceSetup;
     if (ActiveSetupChanged != null)
     {
         ActiveSetupChanged(this,new EventArgs());
     }
 }