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(); }
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(); }
public void ActivateSetup(PhysicalSpace physicalSpaceSetup) { _client.ActiveSpaceSetup = physicalSpaceSetup; if (ActiveSetupChanged != null) { ActiveSetupChanged(this,new EventArgs()); } }