// Used to copy data from a deserialized entry into the single entry used for editing public void TakeDataFrom(Entry e) { Style = e.Style; Preamble = e.Preamble; Headword = e.Headword; Headword2 = e.Headword2; Headword3 = e.Headword3; DefinitionBrace = e.DefinitionBrace; Postamble = e.Postamble; Grammar = e.Grammar; From = e.From; SingleDefinition = e.SingleDefinition; EndNote = e.EndNote; GeneralQuotes.Clear(); foreach (Quote q in e.GeneralQuotes) { q.SetState(window, this); GeneralQuotes.Add(q); } Definitions.Clear(); foreach (Definition d in e.Definitions) { d.SetState(window, this); Definitions.Add(d); } }
public void ClearDefinitions() { SingleDefinition = ""; EndNote = ""; GeneralQuotes.Clear(); Definitions.Clear(); }
public void Clear() { Macros.Clear(); Definitions.Clear(); Raws.Clear(); Inclusion = ImmutableStack <bool> .Nil; CurrentOffset = 0; pastOffsets.Clear(); }
public void ClearDefinitions() { foreach (var def in Definitions) { def.OnDispose(); } Definitions.Clear(); definitionMap.Clear(); }
private void OnReload(ReloadEventArgs args) { CurrentInvasion = null; foreach (var definition in Definitions) { definition.Dispose(); } Definitions.Clear(); LoadDefinitions(); args.Player.SendSuccessMessage("[CustomNpcs] Reloaded invasions!"); }
public QuakeBlock(List <string> rawList, int openBraceIndex, DefinitionDictionary definitions) { Definitions.Clear(); foreach (KeyValuePair <string, Definition> pair in definitions) { Definitions.Add(pair.Key, pair.Value); } RawStartIndex = openBraceIndex; RawLength = (FindCloseBraceIndex(rawList, openBraceIndex) + 1) - RawStartIndex; Solids = new List <Solid>(); List <string> rawBlock = rawList.GetRange(RawStartIndex, RawLength); Parse(rawBlock); }
protected async Task LoadDefinitionsFromFile() { try { var defList = await CoreManager.Current.FileHandler.GetDefinitions(SubjectType); if (defList != null) { Definitions.Clear(); foreach (var def in defList) { Definitions.Add(def); } OnPropertyChanged(nameof(Definitions)); } } catch (Exception e) { Debug.WriteLine(e); } }