示例#1
0
 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];
 }
示例#2
0
        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]);
        }
示例#3
0
        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;
            }
        }
示例#4
0
        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;
            }
        }
示例#5
0
        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));
        }