public string GetGestureName(string action, string culture) { CulturalPair pair = new CulturalPair(action, culture); string value; if (culturalGestures.TryGetValue(pair, out value)) { return value; } return defaultGestures[action]; }
public string GetGestureName(string action, string culture) { CulturalPair pair = new CulturalPair(action, culture); string value; if (culturalGestures.TryGetValue(pair, out value)) { return(value); } return(defaultGestures[action]); }
public void AddCultureGesture(string action, string culture, string gestureName) { if (!defaultGestures.ContainsKey(action)) { AddDefaultGesture(action, gestureName); } CulturalPair cultPair = new CulturalPair(action, culture); try { culturalGestures.Add(cultPair, gestureName); } catch (ArgumentException) { culturalGestures[cultPair] = gestureName; } }
public override bool Equals(object obj) { if (obj == null) { return(false); } CulturalPair pair = (CulturalPair)obj; if ((System.Object)pair == null) { return(false); } return(this.action.Equals(pair.action) && this.culture.Equals(pair.culture)); }