public void DetermineMapping()
        {
            serializationUtils = new SerializationUtils();

            mapping = GetStandardMapping();
            LoadMapping();

            backupMapping = mapping.Clone();
        }
Ejemplo n.º 2
0
 protected void CreateMapping(List<String> validButtons, List<String> validAxes)
 {
     mapping = new InputMapping(validButtons, validAxes);
     if (!LoadMapping())
     {
         CreateStandardMapping();
     }
     backupMapping = mapping.Clone();
 }
Ejemplo n.º 3
0
 protected void CreateMapping(List <String> validButtons, List <String> validAxes)
 {
     mapping = new InputMapping(validButtons, validAxes);
     if (!LoadMapping())
     {
         CreateStandardMapping();
     }
     backupMapping = mapping.Clone();
 }
        public void SaveMapping()
        {
            backupMapping = mapping.Clone();

            try
            {
                if (mapping == null)
                {
                    return;
                }

                String mappingFilePath = GetMappingFilePath();

                DictionarySerializer.Serialize(mapping.Controls.Mappings, mappingFilePath);
            }
            catch (Exception e)
            {
                throw new Exception("There was an error while writing the input mapping for device \"" + DeviceName + "\": " + e.Message);
            }
        }
Ejemplo n.º 5
0
 public GenericInput()
 {
     mapping = new InputMapping(new List<String>(), new List<String>());
     backupMapping = mapping.Clone();
 }
 public void SetDefaultMapping()
 {
     mapping       = GetStandardMapping();
     backupMapping = mapping.Clone();
 }
 public void RevertMapping()
 {
     mapping = backupMapping.Clone();
 }
Ejemplo n.º 8
0
 public void SetDefaultMapping()
 {
     CreateStandardMapping();
     backupMapping = mapping.Clone();
 }
Ejemplo n.º 9
0
 public GenericInput()
 {
     mapping       = new InputMapping(new List <String>(), new List <String>());
     backupMapping = mapping.Clone();
 }