Example #1
0
 public void RemoveEra(Era era)
 {
     try
     {
         Biosphere?.Eras.Remove(era);
         Logger.AddLog($"Removed the era: {era.Name}");
         ErasChanged.Invoke(this, null);
     }
     catch
     {
         Logger.AddLog($"Unable to Remove the era: {era.Name}");
     }
 }
Example #2
0
 public void RemoveJuncture(Juncture juncture)
 {
     try
     {
         Biosphere?.Junctures.Remove(juncture);
         Logger.AddLog($"Removed the Juncture: {juncture.Name}");
         ErasChanged.Invoke(this, null);
     }
     catch
     {
         Logger.AddLog($"Unable to Remove the Juncture: {juncture.Name}");
     }
 }
Example #3
0
        public void EditEra(Era source, string name, double start, double end, string description, string keys)
        {
            try
            {
                Year          startYear = new Year(start);
                Year          endYear   = new Year(end);
                List <string> keywords  = keys.ToUpper().Split(' ').ToList();


                source.Edit(name, startYear, endYear, description, keywords);
                Logger.AddLog($"Edited the era: {source.Name}");
                ErasChanged.Invoke(this, null);
            }
            catch
            {
                Logger.AddLog($"Unable to Edit the era: {source.Name}");
            }
        }
Example #4
0
        public void AddNewEra(string name, double start, double end, string description, string keys)
        {
            try
            {
                Year          startYear = new Year(start);
                Year          endYear   = new Year(end);
                List <string> keywords  = keys.ToUpper().Split(' ').ToList();


                Biosphere?.Eras.Add(new Era(name, startYear, endYear, description, keywords));
                Logger.AddLog($"Added the era: {name}");
                ErasChanged.Invoke(this, null);
            }
            catch
            {
                Logger.AddLog($"Unable to add the era: {name}");
            }
        }