public MainMenuViewModel()
 {
     _randomDataParameters = (RandomDataParameters)App.Current.Properties[Convert.ToString(App.ObjectsInPropertyDictionary.RandomDataParameters)];
     App.Current.Properties[Convert.ToString(App.ObjectsInPropertyDictionary.MainMenuViewModel)] = this;
     InitFields();
     StartSimulation      = new Command(OnStartSimulation);
     AddNewCommandString  = new Command(OnAddNewCommandString);
     CommandParameterList = new CommandParameterList();
 }
Beispiel #2
0
 public RandomTextGenerator(bool isFirstWrite = true)
 {
     _currentRandomDataParameters = (RandomDataParameters)App.Current.Properties[Convert.ToString(App.ObjectsInPropertyDictionary.RandomDataParameters)];
     _randomDataStatsList         = (List <RandomDataStats>)App.Current.Properties[Convert.ToString(App.ObjectsInPropertyDictionary.RandomDataStats)];
     SetListOfAllUniqueTextParametersAndCommandStrings();
     ScrubDelimitersAndCommandParameters();
     SetListOfRandomDataStats();
     GenerateRandomTextString();
     CombineSegments();
     WriteRandomStatsToDB();
     RandomTextIO.WriteTextData(_dataToWrite, isFirstWrite);
 }
Beispiel #3
0
        public static void WriteRandomDataParametersToFile()
        {
            RandomDataParameters currentRandomDataParameters = (RandomDataParameters)App.Current.Properties[Convert.ToString(App.ObjectsInPropertyDictionary.RandomDataParameters)];
            string output   = JsonConvert.SerializeObject(currentRandomDataParameters);
            string filePath = App.ListOfAllPaths[(int)App.FileNames.RandomDataParameters];

            using (StreamWriter sw = new StreamWriter(filePath))
            {
                sw.Write(output);
                sw.Close();
            }
        }