Ejemplo n.º 1
0
        private void newToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ClearGameObjectListBox();
            ObserverData observerData = Observer.GetObserverData();
            Response     response     = fileDialog.SaveFile(observerData, extension, name, "");

            saveDataFileName = response.DirectoryPath;
        }
Ejemplo n.º 2
0
        public void SaveDataToDrive()
        {
            GameObject gameObject  = new GameObject("new game object");
            Property   newProperty = new Property(PropertyType.String, "new property", "new value");

            gameObject.AddProperty(newProperty);
            GameObserver Observer = GameObserver.Instance;

            Observer.ObserveGameObject(gameObject, ObjectStatus.Active);
            GameData    gameData = new GameData(Observer.GetObserverData());
            GameArchive Archive  = GameArchive.Instance;

            Archive.SaveData(gameData, "C:\\GameCraftData\\testgamedata.gcd");
            Assert.IsTrue(true);
        }