Ejemplo n.º 1
0
        public override void Load(DecoupledStorage storage, string section, int index)
        {
            base.Load(storage, section, index);
            Type = (KeyGroupType)storage.ReadEnum <KeyGroupType>(section, "Type" + index, KeyGroupType.Wide);

            int numElements = storage.ReadInt32(section, "GroupCount" + index, 0);

            for (int i = 0; i < numElements; i++)
            {
                keys.Add(KeyBase.CreateAndLoad(storage, String.Format("{0}.Group{1}", section, index), i));
            }
        }
Ejemplo n.º 2
0
        public void Load()
        {
            Keys.Clear();
            DecoupledStorage storage = OptXkeysLayout.Storage;
            int numKeys = storage.ReadInt32("Layout", "Count");

            for (int i = 0; i < numKeys; i++)
            {
                Keys.Add(KeyBase.CreateAndLoad(storage, "Layout", i));
            }
            BlockSettingsChanged();
        }