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); }
private bool EditActionFile(string name) // edit pack name { List <string> jevents = JournalEntry.GetListOfEventsWithOptMethod(towords: false); jevents.Sort(); List <ActionEvent> eventlist = ActionEventEDList.EventsFromNames(jevents, "Journal"); eventlist.AddRange(ActionEventEDList.events); // our ED events eventlist.AddRange(ActionEvent.events); // core events ActionPackEditorForm frm = new ActionPackEditorForm(); frm.AdditionalNames += Frm_onAdditionalNames; frm.CreateActionPackEdit += SetPackEditorAndCondition; ActionFile f = actionfiles.Get(name); if (f != null) { frm.Init("Edit pack " + name, this.Icon, this, AppFolder, f, eventlist); frm.TopMost = discoveryform.FindForm().TopMost; frm.ShowDialog(discoveryform.FindForm()); // don't care about the result, the form does all the saving ActionConfigureKeys(); lasteditedpack = name; SQLiteConnectionUser.PutSettingString("ActionPackLastFile", lasteditedpack); return(true); } else { return(false); } }
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); }
public bool EditPack(string name) // edit pack name { List <string> jevents = JournalEntry.GetListOfEventsWithOptMethod(towords: false); jevents.Sort(); List <ActionEvent> eventlist = ActionEventEDList.EventsFromNames(jevents, "Journal"); List <string> uievents = Enum.GetNames(typeof(UITypeEnum)).ToList(); uievents.Sort(); eventlist.AddRange(ActionEventEDList.EventsFromNames(uievents, "UIEvents")); eventlist.AddRange(ActionEventEDList.events); // our ED events eventlist.AddRange(ActionEvent.events); // core events ActionPackEditorForm frm = new ActionPackEditorForm(); frm.AdditionalNames += Frm_onAdditionalNames; frm.CreateActionPackEdit += SetPackEditorAndCondition; ActionFile f = actionfiles.Get(name); if (f != null) { string collapsestate = SQLiteConnectionUser.GetSettingString("ActionEditorCollapseState_" + name, ""); // get any collapsed state info for this pack frm.Init("Edit pack " + name, this.Icon, this, AppFolder, f, eventlist, collapsestate); frm.ShowDialog(discoveryform); // don't care about the result, the form does all the saving SQLiteConnectionUser.PutSettingString("ActionEditorCollapseState_" + name, frm.CollapsedState()); // get any collapsed state info for this pack ActionConfigureKeys(); // kick it to load in case its changed VoiceLoadEvents(); lasteditedpack = name; SQLiteConnectionUser.PutSettingString("ActionPackLastFile", lasteditedpack); return(true); } else { return(false); } }