public void RefreshContent() { if (ContentDictionary.TryGetValue(PageKey, out var content)) { Markdown = content.Current; } }
public LevelLoader(Dictionary <string, T> archetypeDictionary, ContentDictionary <Texture2D> textureDictionary, ObjectManager objectManager, Dictionary <string, BasicEffect> effectDictionary) { this.archetypeDictionary = archetypeDictionary; this.textureDictionary = textureDictionary; this.objectManager = objectManager; this.effectDictionary = effectDictionary; }
public TileFactory(OurObjectManager objectManager, Dictionary <string, OurDrawnActor3D> drawnActors, ContentDictionary <Texture2D> textures, bool mode) { this.objectManager = objectManager; this.drawnActors = drawnActors; this.textures = textures; this.mode = mode; }
/// <summary> /// Initialize the Dictionaries that we will Load Content From /// </summary> private void InitializeDictionaries() { UiArchetypes = new Dictionary <string, DrawnActor2D>(); Fonts = new ContentDictionary <SpriteFont>("fonts", Content); Textures = new ContentDictionary <Texture2D>("textures", Content); Models = new ContentDictionary <Model>("models", Content); Effects = new ContentDictionary <Effect>("effects", Content); }
private void InitializeDictionaries() { //textures, models, fonts this.modelDictionary = new ContentDictionary <Model>("model dictionary", this.Content); this.textureDictionary = new ContentDictionary <Texture2D>("texture dictionary", this.Content); this.fontDictionary = new ContentDictionary <SpriteFont>("font dictionary", this.Content); //rail, transform3Dcurve this.railDictionary = new Dictionary <string, RailParameters>(); this.track3DDictionary = new Dictionary <string, Track3D>(); //sound }
// Generates loki labels based on the list of fields that should be added as label (variable KinesisFieldsToLabel) private void GenerateLabels() { // Add fields as labels foreach (string labelName in _fieldsToLabel) { string labelValue = ContentDictionary.GetValueOrDefault <string, string>(labelName, null); if (labelValue != null) { // Loki does not like dash "-" in label names Labels.Add(labelName.Replace('-', '_'), labelValue); } } // Add the custom labels foreach (var customLabel in _customLabels) { Labels.Add(customLabel.Key, customLabel.Value); } }
// Load the data public void Load(string record) { // Clear the content ContentDictionary.Clear(); ContentRaw = string.Empty; Labels.Clear(); // Loop through the content of the record to generate the content that will be sent to Loki string[] recordFragments = record.Split('\t'); for (int i = 0; i < recordFragments.Length; i++) { // We only add the fields that we do not want to drop if (!_fieldsToDrop.Contains(_fieldsReceived[i])) { ContentDictionary.Add(_fieldsReceived[i], recordFragments[i]); ContentRaw += recordFragments[i] + "\t"; } } ContentRaw = ContentRaw.TrimEnd('\t'); // Trim last tab // Generates the labels GenerateLabels(); }
public LevelLoader(Dictionary <string, T> archetypeDictionary, ContentDictionary <Texture2D> textureDictionary) { this.archetypeDictionary = archetypeDictionary; this.textureDictionary = textureDictionary; }