// public void CreateSave(string playerName) { _id = $"{userid}\\{playerName}"; version = ReferenceData.currentVersion; level = -1; name = playerName; health = 5; AreaInfo = new AreaPath() { name = "Moceoy's Basement", path = "Neitsillia\\Casdam Ilse\\Central Casdam\\Moceoy's Basement\\Moceoy's Basement" }; Area = Areas.AreaPartials.Area.Load(AreaInfo); equipment.weapon = Item.LoadItem("Wooden Spear"); userSheet = new Sheet(); userSheet.ModifyProperty("name", name); userSettings = new USettings(userid); userTimers = new Timers(userid); respawnArea = "Neitsillia\\Casdam Ilse\\Central Casdam\\Moceoy's Basement\\Moceoy's Basement"; quests = new List <Quest>() { Quest.Load(new int[] { 0, 0, 0 }), Quest.Load(new int[] { 0, 4, 0 }), }; SaveFileMongo(); }
private void ResetUserSettings() { USettings.Reset(); USettings.Save(); tbxMessasge.AppendText("user reset" + nl); DisplayUserSettingData(); }
public bool Process(ExternalCommandData commandData) { USettings.Read(); return(SharedCode.ShOneClick.Process(commandData, USet.OneClick)); // USettings.Read(); // // ViewSheet vs = null; // // ShDbMgr dbMgr = new ShDbMgr(commandData); // // NewSheetFormat nsf = USet.OneClick; // // // if (nsf.Defined) // { // if (nsf.UseTemplateSheet) // { // nsf.TemplateSheetView = dbMgr.FindExistSheet(nsf.TemplateSheetNumber); // // if (nsf.TemplateSheetView == null) // { // ErrorTemplateNotFound(nsf.TemplateSheetNumber, nsf.TemplateSheetName); // return false; // } // } // // View v = dbMgr.ActiveGraphicalView; // // if (nsf.NewSheetOption == NewShtOptions.FromCurrent) // { // if (v.ViewType == ViewType.DrawingSheet) // { // vs = v as ViewSheet; // // nsf.SelectedSheet = new SheetData(vs.SheetNumber, vs.ViewName, vs); // } // else // { // ErrorNotSheetView(); // return false; // } // } // dbMgr.Process2(nsf); // } // else // { // ErrorSettingsNotDefined(); // return false; // } // // return true; }
private static void ProcessUserSettings() { logMsgDbLn2("settings test user| ", "begin"); logMsgDbLn2("file location| ", USettings.SettingsPathAndFile); USet.UserUnitStyleSchemas[0][eSTYLE_NAME].Name = "Style0Name"; USet.UserUnitStyleSchemas[0][eVERSION_UNIT].Value = "1.0"; USet.UserUnitStyleSchemas[1][eSTYLE_NAME].Name = "Style1Name"; USet.UserUnitStyleSchemas[1][eVERSION_UNIT].Value = "1.1"; USet.UserUnitStyleSchemas[2][eSTYLE_NAME].Name = "Style2Name"; USet.UserUnitStyleSchemas[2][eVERSION_UNIT].Value = "1.2"; USettings.Save(); DisplayUserData(); }
private void ModifyAndSaveUserSettings() { USet.GeneralValues.TestB = true; USet.GeneralValues.TestD = V + 0.2; USet.GeneralValues.TestS = "using generic setting file " + V; USet.GeneralValues.TestI = V; USet.GeneralValues.TestIs[1] = V; USet.GeneralValues.TestSs[1] = "generic " + V; USet.UnCategorizedValue = V; USet.MainWindow.Height = V * 50; USet.MainWindow.Width = V * 100; USet.TestDictionary3["one"] = new TestStruct(V * 10 + 4, V * 10 + 5, V * 10 + 6); USet.TestDictionary3["two"] = new TestStruct(V * 10 + 1, V * 10 + 2, V * 10 + 3); USet.TestDictionary3["three"] = new TestStruct(V * 10 + 7, V * 10 + 8, V * 10 + 9); USettings.Save(); tbxMessasge.AppendText("user after" + nl); DisplayUserSettingData(); }
public EditTemp(string folder, bool isRoot = false) { if (!isRoot) { if (folder != null) { EditTempFolder = AppData.EditFolder + folder + @"\"; } else { EditTempFolder = AppData.ModFolder; } } else { EditTempFolder = folder; } uSettings = new USettings(EditTempFolder, "Edit"); CreateTimeProperty = uSettings.Register("createTime", new DateTime()); TitleProperty = uSettings.Register("title", ""); EditFileTypeProperty = uSettings.Register("editfiletype", 0); }