示例#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;
 }