예제 #1
0
        private bool Save(ItemSaveType path, string fileName)
        {
            if (fileName == null || fileName.Length < 1)
            {
                MessageBox.Show("Please provide a name for the file to be saved.");
                return(false);
            }

            Saved = Manager.GenerateFile(path, fileName);
            if (Saved && refDomain != null)
            {
                //StringBuilder name = new StringBuilder("$" + refDomain.IncludeFile.Door + " \"/" + FileSaveName + Globals.Model.RoomExtension + "\"");
                refDomain.AddInventory(fileName, path);
                refDomain.TriggerCurrentViewControlsUpdate();
            }
            return(true);
        }
예제 #2
0
        private bool Save(ItemSaveType path, string fileName)
        {
            if (fileName == null || fileName.Length < 1)
            {
                MessageBox.Show("Please provide a name for the file to be saved.");
                return(false);
            }

            Manager.DeleteFunctionsInCode();
            Manager.AddLine("\n::create();\n");
            Saved = Manager.GenerateFile(path, fileName);
            if (Saved && refDomain != null)
            {
                //StringBuilder name = new StringBuilder("$" + ChoosePath(path) + " \"/" + fileName + Globals.Model.RoomExtension + "\"");
                //refDomain.AddDoor(name.ToString(),path);
                //refDomain.TriggerCurrentViewControlsUpdate();
                refDomain.AddDoor(fileName, path);
                refDomain.TriggerCurrentViewControlsUpdate();
            }
            return(true);
        }