Пример #1
0
        private string SaveObsDataAs()
        {
            fileDialog.InitialDirectory = LoadDirectory;
            currentObserverData = Observer.GetObserverData();
            Response response = fileDialog.SaveFile(currentObserverData, extension, name, saveDataFileName);
            switch (response.ValidData)
            {
                case true:
                    saveDataFileName = response.DirectoryPath;
                    return response.DirectoryPath;
                default:
                    return "";

            };
        }
Пример #2
0
 private string SaveObsData()
 {
     if (saveDataFileName == "")
     {
         saveDataFileName = SaveObsDataAs();
         return saveDataFileName;
     }
     currentObserverData = Observer.GetObserverData();
     Archive.SaveData(currentObserverData, saveDataFileName);
     return saveDataFileName;
 }
Пример #3
0
 private void getGameObjects(ObserverData observerData)
 {
     ClearGameObjectListBox();
     foreach (KeyValuePair<string, GameObject> obj in observerData.ObjectList)
     {
         Observer.ObserveGameObject(obj.Value);
         displayObjectList.Add(obj.Key, obj.Value);
     }
     fillGameObjectListBox();
 }
Пример #4
0
        private void loadObsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Response response = fileDialog.LoadFile<ObserverData>(extension, name);
            if (!response.ValidData) return;

            currentObserverData = (ObserverData)response.Data;
            LoadDirectory = response.DirectoryPath;
            getGameObjects(currentObserverData);
        }
Пример #5
0
 public GameData(ObserverData observerData)
 {
     ObserverData = observerData;
 }