public static UserInterfaceData GetData(string data) { UserInterfaceData userInterfaceData = new UserInterfaceData(); StringReader reader = new StringReader(data); string line = ""; int lineNumber = 0; while ((line = reader.ReadLine()) != null) { lineNumber++; if (line == "[/USERINTERFACES]") { break; } else if (line == "[USERINTERFACE]") { userInterfaceData.UserInterfaces.Add(ReadUserInterface(ref reader, ref lineNumber)); } } reader.Close(); reader.Dispose(); return(userInterfaceData); }
private void WriteUserInterfaceDataFile(UserInterfaceData userInterfaceData) { _writer.Write(userInterfaceData.UserInterfaces.Count); foreach (var userInterface in userInterfaceData.UserInterfaces) { WriteUserInterface(userInterface); } }
private UserInterfaceData ReadUserInterfaceDataFile() { UserInterfaceData rawFile = new UserInterfaceData(); int uiCount = _reader.ReadInt32(); for (int i = 0; i < uiCount; i++) { rawFile.UserInterfaces.Add(ReadUserInterface()); } return(rawFile); }
public static string GetString(UserInterfaceData userInterfaceData) { StringBuilder builder = new StringBuilder(); builder.AppendLine("[USERINTERFACES]"); if (userInterfaceData.UserInterfaces.Count > 0) { foreach (var userInterface in userInterfaceData.UserInterfaces) { builder.AppendUserInterface(userInterface); } } builder.Append("[/USERINTERFACES]"); return(builder.ToString()); }
private void Initialise() { Program.InitialiseData(); domainDataGrid.DataContext = Program.DataLoadHandler.Domains; planeElementDataGrid.DataContext = Program.DataLoadHandler.PlaneElements; planeSizeDataGrid.DataContext = Program.DataLoadHandler.PlaneSizes; planeTypeDataGrid.DataContext = Program.DataLoadHandler.PlaneTypes; speciesTypeDataGrid.DataContext = Program.DataLoadHandler.SpeciesTypes; speciesTraitDataGrid.DataContext = Program.DataLoadHandler.SpeciesTraits; traitCategoriesDataGrid.DataContext = Program.DataLoadHandler.TraitCategories; Program.GeneratorConfigurations = new ConfigValues(); RandomSeedTextBox.Text = Program.GeneratorConfigurations.RandomSeed; _user_interface_data = new UserInterfaceData(); debugMessagesTextBlock.DataContext = Program.Debugger; }
static public void Initialise(UserInterfaceData user) { CosmologyGenerator = new GenerateCosmology(10000000); //_creation_myth_generator = new MythCreator(); //_creation_myth_generator.Initialise(user); }
// initialize all the important values, parse the myth files and translate them into myth object data. public void Initialise(UserInterfaceData user) { _user = user; }