public static List <ActionEvent> EventList(bool excludestatics = false, bool excludejournal = false, bool excludeui = false) { List <ActionEvent> eventlist = new List <ActionEvent>(); if (!excludejournal) { List <string> jevents = EliteDangerousCore.JournalEntry.GetListOfEventsWithOptMethod(towords: false); jevents.Sort(); eventlist.AddRange(ActionEventEDList.EventsFromNames(jevents, "", "NewEntry", "Journal")); // presume NewEntry as its the most prevalent. Trigger type is not used in this circumstance except in Perform } if (!excludeui) { List <string> uievents = Enum.GetNames(typeof(EliteDangerousCore.UITypeEnum)).ToList(); uievents.Sort(); eventlist.AddRange(ActionEventEDList.EventsFromNames(uievents, "UI", "EliteUIEvent", "UIEvents")); } if (!excludestatics) { eventlist.AddRange(ActionEventEDList.StaticDefinedEvents()); } return(eventlist); }
public static List <ActionEvent> EventList(bool excludestatics = false, bool excludejournal = false, bool excludeui = false, bool excludejournaluitranslatedevents = false) { List <ActionEvent> eventlist = new List <ActionEvent>(); if (!excludejournal) { List <string> jevents = EliteDangerousCore.JournalEntry.GetNameOfEvents(); if (excludejournaluitranslatedevents) { jevents.Remove("Music"); // manually synchronise with EDJournalReader . jevents.Remove("UnderAttack"); jevents.Remove("FSDTarget"); } jevents.Sort(); eventlist.AddRange(ActionEventEDList.EventsFromNames(jevents, "", "NewEntry", "Journal")); // presume NewEntry as its the most prevalent. Trigger type is not used in this circumstance except in Perform } if (!excludeui) { List <string> uievents = Enum.GetNames(typeof(EliteDangerousCore.UITypeEnum)).ToList(); uievents.Sort(); eventlist.AddRange(ActionEventEDList.EventsFromNames(uievents, "UI", "EliteUIEvent", "UIEvents")); } if (!excludestatics) { eventlist.AddRange(ActionEventEDList.StaticDefinedEvents()); } return(eventlist); }
private List <TypeHelpers.PropertyNameInfo> Frm_onAdditionalNames(string evname) // call back to discover name list. evname may be empty { System.Diagnostics.Debug.WriteLine("Get variables for " + evname); List <TypeHelpers.PropertyNameInfo> fieldnames = (from x in discoveryform.Globals.NameList select new BaseUtils.TypeHelpers.PropertyNameInfo(x, "Global Variable String or Number" + Environment.NewLine + "Not part of an event, set up by either EDD or one of the action packs", null, "Global")).ToList(); if (evname.HasChars()) { fieldnames.Add(new TypeHelpers.PropertyNameInfo("TriggerName", "Name of event, either the JournalEntryName, or UI<event>", ConditionEntry.MatchType.Equals, "Event Trigger Info")); fieldnames.Add(new TypeHelpers.PropertyNameInfo("TriggerType", "Type of trigger, either UIEvent or JournalEvent", ConditionEntry.MatchType.Equals, "Event Trigger Info")); var events = ActionEventEDList.StaticDefinedEvents(); ActionEvent ty = events.Find(x => x.TriggerName == evname); if (ty?.Variables != null) // if its a static event and it has variables, add.. { fieldnames.AddRange(ty.Variables); } // first see if its a journal event.. List <TypeHelpers.PropertyNameInfo> classnames = BaseUtils.TypeHelpers.GetPropertyFieldNames(JournalEntry.TypeOfJournalEntry(evname), "EventClass_", comment: "Event Variable"); // then if its an UI if (classnames == null) { classnames = BaseUtils.TypeHelpers.GetPropertyFieldNames(UIEvent.TypeOfUIEvent(evname), "EventClass_", comment: "Event Variable"); } if (classnames != null) { fieldnames.AddRange(classnames); } } return(fieldnames); }