Esempio n. 1
0
        private void StoreChangesOfProfileToDriver()
        {
            var settingsToStore = new List <KeyValuePair <uint, string> >();

            foreach (ListViewItem lvi in lvSettings.Items)
            {
                var currentProfileItem = _currentProfileSettingItems
                                         .First(x => x.SettingId.Equals((uint)lvi.Tag));

                var listValueX = lvi.SubItems[1].Text;

                var itmEmpty = string.IsNullOrEmpty(listValueX);
                var curEmpty = string.IsNullOrEmpty(currentProfileItem.ValueText);

                if (currentProfileItem.ValueText != listValueX && !(itmEmpty && curEmpty))
                {
                    settingsToStore.Add(new KeyValuePair <uint, string>((uint)lvi.Tag, listValueX));
                }
            }

            if (settingsToStore.Count > 0)
            {
                _drs.StoreSettingsToProfile(_CurrentProfile, settingsToStore);
                AddToModifiedProfiles(_CurrentProfile);
            }

            RefreshCurrentProfile();
        }
Esempio n. 2
0
        static void setProfileSetting(string profileName)
        {
            var settingsToStore = new List <KeyValuePair <uint, string> >();

            settingsToStore.Clear();
            settingsToStore.Add(new KeyValuePair <uint, string>((uint)284810369, "0x00000013 (Futuremark System Diagnosis Tool, PhysX Particle Fluid Demo, Adventure Island Online/MapleStory, Phantasy Star Online 2, Wild Tangent Game: Zuma Deluxe)"));
            if (settingsToStore.Count > 0)
            {
                _drs.StoreSettingsToProfile(profileName, settingsToStore);
                AddToModifiedProfiles(profileName);
            }
        }