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

            mapping = GetStandardMapping();
            LoadMapping();

            backupMapping = mapping.Clone();
        }
 protected void CreateMapping(List<String> validButtons, List<String> validAxes)
 {
     mapping = new InputMapping(validButtons, validAxes);
     if (!LoadMapping())
     {
         CreateStandardMapping();
     }
     backupMapping = mapping.Clone();
 }
Exemple #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);
            }
        }
 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();
 }
Exemple #8
0
 public void SetDefaultMapping()
 {
     CreateStandardMapping();
     backupMapping = mapping.Clone();
 }
Exemple #9
0
 public GenericInput()
 {
     mapping       = new InputMapping(new List <String>(), new List <String>());
     backupMapping = mapping.Clone();
 }