Compare commits

..

4 Commits

9 changed files with 4094 additions and 1241 deletions

View File

@@ -260,7 +260,15 @@ namespace nspector.Common
if (!alreadySet.Contains(setting.SettingId))
{
var newSetting = ImportExportUitl.ConvertProfileSettingToDrsSetting(setting);
StoreSetting(hSession, hProfile, newSetting);
try
{
StoreSetting(hSession, hProfile, newSetting);
}
catch (NvapiException ex)
{
if (ex.Status != NvAPI_Status.NVAPI_SETTING_NOT_FOUND)
throw;
}
}
}
}

View File

@@ -301,12 +301,16 @@ namespace nspector.Common
if (groupName == null)
groupName = GetLegacyGroupName(settingId, settingName);
var result = new SettingMeta()
{
SettingType = settingType,
SettingName = settingName,
GroupName = groupName,
IsApiExposed = GetIsApiExposed(settingId),
DefaultDwordValue =
settingType == NVDRS_SETTING_TYPE.NVDRS_DWORD_TYPE
? GetDwordDefaultValue(settingId) : 0,
@@ -345,6 +349,7 @@ namespace nspector.Common
SettingName = settingMeta.SettingName,
SettingType = settingMeta.SettingType,
GroupName = settingMeta.GroupName,
IsApiExposed = settingMeta.IsApiExposed,
};
if (string.IsNullOrEmpty(newMeta.SettingName))
@@ -403,5 +408,10 @@ namespace nspector.Common
return "Other";
}
private bool GetIsApiExposed(uint settingId)
{
var driverMeta = MetaServices.FirstOrDefault(m => m.Service.Source == SettingMetaSource.DriverSettings);
return (driverMeta != null && driverMeta.Service.GetSettingIds().Contains(settingId));
}
}
}

View File

@@ -442,6 +442,7 @@ namespace nspector.Common
ValueText = valueText,
State = settingState,
IsStringValue = settingMeta.SettingType == NVDRS_SETTING_TYPE.NVDRS_WSTRING_TYPE,
IsApiExposed = settingMeta.IsApiExposed,
};
}

View File

@@ -17,6 +17,8 @@ namespace nspector.Common.Meta
public byte[] DefaultBinaryValue { get; set; }
public bool IsApiExposed { get; set; }
public List<SettingValue<string>> StringValues { get; set; }
public List<SettingValue<uint>> DwordValues { get; set; }

View File

@@ -25,6 +25,8 @@
public bool IsStringValue { get; set; }
public bool IsApiExposed { get; set; }
public override string ToString()
{
return string.Format("{0}; 0x{1:X8}; {2}; {3}; {4};", State, SettingId, SettingText, ValueText, ValueRaw);

View File

File diff suppressed because it is too large Load Diff

View File

File diff suppressed because it is too large Load Diff

View File

File diff suppressed because it is too large Load Diff

View File

@@ -150,7 +150,11 @@ namespace nspector
foreach (var settingItem in _currentProfileSettingItems)
{
lvSettings.Items.Add(CreateListViewItem(settingItem));
var itm = lvSettings.Items.Add(CreateListViewItem(settingItem));
if (Debugger.IsAttached && !settingItem.IsApiExposed)
{
itm.ForeColor = Color.LightCoral;
}
}
btnResetValue.Enabled = false;