コード例 #1
0
        public DataEntities.ReturnResult SaveGame()
        {
            using (var fileHandlerBLL = new BusinessImplementation.FileHandler(this.Game))
            {
                fileHandlerBLL.SaveGameFile(this.Game);

                return(new DataEntities.ReturnResult()
                {
                    new DataEntities.ReturnResult.Result()
                    {
                        ResultMessage = "Successfully saved"
                    }
                });
            }
        }
コード例 #2
0
        public GameHandler()
        {
            //Where are of the files are saved to
            BusinessImplementation.FileHandler._GamePath = AppDomain.CurrentDomain.BaseDirectory;
            BusinessImplementation.FileHandler.UpdateGamePaths();

            //Creates and updates files if needed
            using (var fileHandlerBLL = new BusinessImplementation.FileHandler(Game))
            {
                fileHandlerBLL.UpdateAllFiles();

                this.Game = fileHandlerBLL.Game; //This is retrieved from the fileHandlerBLL
            }

            //this.Game = BusinessImplementation.FileHandler.LoadGameFile();
        }