private void SetNetworkDtcAccessTransactions(NetworkDtcAccessTransactionsStatus value) { object objValue = null; if (value == NetworkDtcAccessTransactionsStatus.Unknown) { return; } switch (value) { case NetworkDtcAccessTransactionsStatus.On: { objValue = 1; break; } case NetworkDtcAccessTransactionsStatus.Off: { objValue = 0; break; } } if (objValue == null) { return; } WriteRegistryKeyValue(Consts.NetworkDtcAccessTransactionsKeyPath, Consts.NetworkDtcAccessTransactionsValueName, objValue); _needRestart = true; }
private NetworkDtcAccessTransactionsStatus GetNetworkDtcAccessTransactions() { NetworkDtcAccessTransactionsStatus result = NetworkDtcAccessTransactionsStatus.Unknown; object keyValue = ReadRegistryKeyValue(Consts.NetworkDtcAccessTransactionsKeyPath, Consts.NetworkDtcAccessTransactionsValueName); if (keyValue != null) { switch (keyValue.ToString()) { case "0": { result = NetworkDtcAccessTransactionsStatus.Off; break; } case "1": { result = NetworkDtcAccessTransactionsStatus.On; break; } } } return(result); }