protected override InputMapping GetStandardMapping()
        {
            SpeechBasedInputMapping mapping = new SpeechBasedInputMapping();

            mapping.SetAxisLikeMappingValues("nach links", "nach rechts", "vorwärts", "rückwärts", "links rollen", "rechts rollen", "nach oben", "nach unten", "Tick", "Ticks");
            mapping.SetButtonLikeMappingValues("Start", "Landung", "Schweben", "Notfall", "Nullstellung", "Kamera wechseln", "Spezial");

            return mapping;
        }
        private Grammar GetMappingGrammar()
        {
            SrgsDocument document = new SrgsDocument();
            mapping = (SpeechBasedInputMapping)speechInput.Mapping;

            SrgsRule rootRule = GetRootRule();
            rootRule.Scope = SrgsRuleScope.Public;

            document.Root = rootRule;

            foreach (KeyValuePair<String, SrgsRule> rule in usedRules)
            {
                document.Rules.Add(rule.Value);
            }
            usedRules.Clear();

            return new Grammar(document);
        }
示例#3
0
        public override InputMapping Clone()
        {
            InputMapping clonedMapping = new SpeechBasedInputMapping(controls);

            return(clonedMapping);
        }
 public void Init()
 {
     mapping = new SpeechBasedInputMapping();
     mapping.SetAxisLikeMappingValues("to the left", "to the right", "forward", "backward", "left roll", "right roll", "up", "down", "tick", "ticks");
     mapping.SetButtonLikeMappingValues("Start", "Land", "Hover", "Emergency", "Flat Trim", "Change Camera", "Special");
 }
 public override InputMapping Clone()
 {
     InputMapping clonedMapping = new SpeechBasedInputMapping(controls);
     return clonedMapping;
 }