//DATABASE AREA /////////////////////////////////// private void RecordIndividual(Individual Idividual_Recorded, int World_Numer, int Generation_Number) { Royal_Scribe = new Evolution_History_Scribe(); Individual _Idividual_Recorded = Idividual_Recorded; Royal_Scribe.Add_Individual_Record(_Idividual_Recorded, Generation_Number, World_Numer, NewUniverse.Session_Number); }
private void Generation_Selected_disp_1_DropDownOpened(object sender, EventArgs e) { List <Selection_Method_Struct> Generation_Binder_List = new List <Selection_Method_Struct>(); List <int> Generation_Numbers = new List <int>(); Evolution_History_Scribe Generation_Seeker = new Evolution_History_Scribe(); //Fetch all the generation numbers avaible in the database Generation_Numbers = Generation_Seeker.Retrieve_Available_Generations(); foreach (var item in Generation_Numbers) { Generation_Binder_List.Add(new Selection_Method_Struct(item.ToString(), item)); } Generation_Selected_disp_1.ItemsSource = Generation_Binder_List; }
private void Wolrd_Selected_DropDownOpened(object sender, EventArgs e) { List <Selection_Method_Struct> World_Binder_List = new List <Selection_Method_Struct>(); List <int> World_Numbers = new List <int>(); Evolution_History_Scribe World_Seeker = new Evolution_History_Scribe(); //Fetch all the world numbers avaible in the database World_Numbers = World_Seeker.Retrieve_Available_Worlds(); foreach (var item in World_Numbers) { World_Binder_List.Add(new Selection_Method_Struct(item.ToString(), item)); } Wolrd_Selected.ItemsSource = World_Binder_List; }
//Fetch the selected generation private void FetchGenerations(int Generation_Number, int World_Number, int Session_Number, int display) { int _Generation, _World, _Session, _display; List <Individual> fetched_gen = new List <Individual>(); Royal_Scribe = new Evolution_History_Scribe(); _Generation = Generation_Number; _World = World_Number; _Session = Session_Number; _display = display; if (Check_Chosen_Indexes(_Generation, _World, _Session) == 1) { fetched_gen = Royal_Scribe.Read_Generation_Record(_Generation, _World, _Session); if (fetched_gen.Count != 0) { switch (display) { case 1: Refresh_Actual_List_Beta(fetched_gen); break; case 2: Refresh_Old_List_Beta(fetched_gen); break; default: Results_Windows.Text = "There is not such display"; break; } } else { Results_Windows.Text = "No data found about this generation, check if it has been erased from the database or use the Refres_Generations button"; } } else { //do nothing, not all the inputs have been chosen } }