public SOption(SOption Obj_) { DataPath = Obj_.DataPath; DataFileName = Obj_.DataFileName; MasterNamePort = Obj_.MasterNamePort; ID = Obj_.ID; PW = Obj_.PW; }
public void Set(SOption Obj_) { DataPath = Obj_.DataPath; DataFileName = Obj_.DataFileName; MasterNamePort.Set(Obj_.MasterNamePort); ID = Obj_.ID; PW = Obj_.PW; }
public void Set(SOption Obj_) { ServerName = Obj_.ServerName; DataPath = Obj_.DataPath; DataFileName = Obj_.DataFileName; MasterNamePort.Set(Obj_.MasterNamePort); BalanceDataPath = Obj_.BalanceDataPath; }
public SOption(SOption Obj_) { ServerName = Obj_.ServerName; DataPath = Obj_.DataPath; DataFileName = Obj_.DataFileName; MasterNamePort = Obj_.MasterNamePort; BalanceDataPath = Obj_.BalanceDataPath; }
public SOption(SOption Obj_) { ID = Obj_.ID; PW = Obj_.PW; ServerNo = Obj_.ServerNo; Servers = Obj_.Servers; LocalDirectory = Obj_.LocalDirectory; RemoteDirectory = Obj_.RemoteDirectory; Commands = Obj_.Commands; }
void addNewOption(TScreen s) { int newIndex = s.options.Count; SOption newOption = new SOption(newIndex, s); s.options.Add(newOption); // Select newly created option optionIndex = newIndex; }
void onOptionEditGUI(SOption option) { if (option == null || state != windowState.loaded) { return; } EditorGUILayout.BeginHorizontal(); GUILayout.Space(30); GUILayout.Label("option text:", EditorStyles.label); option.text = EditorGUILayout.TextField(option.text); EditorGUILayout.EndHorizontal(); string[] destinations = terminalData.screens.Select(s => { if (s.index == option.screen.index) { return(s.id + " [CURRENT SCREEN]"); } return(s.id); }).ToArray(); EditorGUILayout.BeginHorizontal(); option.destination = EditorGUILayout.Popup("Destination screen:", option.destination, destinations); EditorGUILayout.EndHorizontal(); if (option.destination == option.screen.index) { redFont.normal.textColor = Color.red; EditorGUILayout.BeginHorizontal(); GUILayout.FlexibleSpace(); GUILayout.Label("Destination is set to the current screen.", redFont); GUILayout.FlexibleSpace(); EditorGUILayout.EndHorizontal(); } EditorGUILayout.BeginHorizontal(); GUILayout.Space(30); Color origcolor = GUI.backgroundColor; GUI.backgroundColor = new Color(0.8f, 0.4f, 0.4f); if (GUILayout.Button("Delete option " + option.index)) { option.screen.options.Remove(option); } GUI.backgroundColor = origcolor; GUILayout.FlexibleSpace(); EditorGUILayout.EndHorizontal(); }
void onScreenEditGUI(TScreen screen) { // Default view for editing screens if (screen == null || state != windowState.loaded) { return; } EditorGUILayout.BeginHorizontal(); GUILayout.Space(30); EditorGUILayout.PrefixLabel("screen text:"); EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); GUILayout.Space(50); screen.text = EditorGUILayout.TextArea(screen.text, GUILayout.Height(64), GUILayout.Width(position.width - 75)); EditorGUILayout.EndHorizontal(); EditorGUILayout.BeginHorizontal(); GUILayout.Space(30); Color origcolor = GUI.backgroundColor; GUI.backgroundColor = new Color(0.8f, 0.4f, 0.4f); if (GUILayout.Button("Delete " + screen.id)) { terminalData.screens.Remove(screen); } GUI.backgroundColor = origcolor; GUILayout.FlexibleSpace(); EditorGUILayout.EndHorizontal(); string[] optionSelect = screen.options.Select(o => o.index.ToString()).ToArray(); EditorGUILayout.Space(); GUILayout.Label("Edit Option", EditorStyles.boldLabel); EditorGUILayout.BeginHorizontal(); optionIndex = EditorGUILayout.Popup("Select option to edit:", optionIndex, optionSelect); if (GUILayout.Button("+")) { addNewOption(screen); } EditorGUILayout.EndHorizontal(); SOption optionEdit = screen.options.Find(o => o.index == optionIndex); onOptionEditGUI(optionEdit); }
// Token: 0x060009DA RID: 2522 RVA: 0x000579E8 File Offset: 0x00055BE8 private static bool dmCmnBackupMathCompare() { AppMain.GSS_MAIN_SYS_INFO gss_MAIN_SYS_INFO = AppMain.GsGetMainSysInfo(); if (gss_MAIN_SYS_INFO.is_save_run == 0U) { return(true); } SSystem ssystem = SSystem.CreateInstance(); SStage sstage = SStage.CreateInstance(); SSpecial sspecial = SSpecial.CreateInstance(); SOption soption = SOption.CreateInstance(); SSystem system = gss_MAIN_SYS_INFO.cmp_backup.GetSystem(); SStage sstage2 = gss_MAIN_SYS_INFO.cmp_backup.GetStage(); SSpecial special = gss_MAIN_SYS_INFO.cmp_backup.GetSpecial(); SOption option = gss_MAIN_SYS_INFO.cmp_backup.GetOption(); if (ssystem.GetPlayerStock() != system.GetPlayerStock()) { return(false); } if (ssystem.GetKilled() != system.GetKilled()) { return(false); } if (ssystem.GetClearCount() != system.GetClearCount()) { return(false); } for (int i = 0; i < 7; i++) { SSystem.EAnnounce index = (SSystem.EAnnounce)i; if (ssystem.IsAnnounce(index) != system.IsAnnounce(index)) { return(false); } } return(AppMain.memcmp(sstage2.getData(), sstage.getData()) == 0 && AppMain.memcmp(special.getData(), sspecial.getData()) == 0 && AppMain.memcmp(option.getData(), soption.getData()) == 0); }
public static TerminalData loadTerminalFromFile(TerminalObject gameTerminal) { if (gameTerminal == null || gameTerminal.id == null) { return(null); } TerminalData tData = terminals.Find(t => t.id == gameTerminal.id); if (tData == null) { tData = new TerminalData(gameTerminal); } // No need to check if the right directory exists because that's where the class files are stored // Load Screens from file int i = 0; while (File.Exists(getScreenFileName(i, gameTerminal.id))) { StreamReader reader = new StreamReader(getScreenFileName(i, gameTerminal.id)); string line; string id; string text = ""; id = reader.ReadLine(); // ID is first line of save file while ((line = reader.ReadLine()) != null) { text += line + System.Environment.NewLine; } // Create screen TScreen screen = new TScreen(tData, text, i, id); // Add screen to terminal TScreen oldScreen = tData.screens.Find(s => s.index == i); if (oldScreen == null) { // if screen doesn't exist, add it to screens tData.screens.Add(screen); } else { // if screen already exists, replace it with file screen oldScreen = screen; } reader.Close(); i++; } // load all options for screens string screenOptionsPath = SAVE_PATH + gameTerminal.id + SCREEN_OPTIONS_POSTFIX; if (File.Exists(screenOptionsPath)) { StreamReader optionReader = new StreamReader(screenOptionsPath); string line; i = 0; while ((line = optionReader.ReadLine()) != null) { TScreen screen = tData.screens[i]; string[] ops = line.Split('|'); int j = 0; int n = 0; while (j < ops.Length - 1) { SOption newOption = new SOption(n++, screen); newOption.text = ops [j]; int.TryParse(ops [j + 1], out newOption.destination); // Check for old version of option SOption oldOption = screen.options.Find(o => o.index == newOption.index); if (oldOption == null) { screen.options.Add(newOption); } else { oldOption = newOption; } j += 2; } i++; } } return(tData); }