public NvidiaDynamicVibranceProxy(List <ApplicationSetting> savedApplicationSettings, ResolutionModeWrapper currentWindowsResolutionSettings) { try { _applicationSettings = savedApplicationSettings; _windowsResolutionSettings = currentWindowsResolutionSettings; _vibranceInfo = new VibranceInfo(); if (initializeLibrary()) { InitializeProxy(); } if (_vibranceInfo.isInitialized) { _hook = WinEventHook.GetInstance(); _hook.WinEventHookHandler += OnWinEventHook; } } catch (Exception ex) { MessageBox.Show(ex.ToString()); DialogResult result = MessageBox.Show(NvidiaDynamicVibranceProxy.NvapiErrorInitFailed, "vibranceGUI Error", MessageBoxButtons.OKCancel, MessageBoxIcon.Information); if (result == DialogResult.OK) { Process.Start(GuideLink); } } }
public AmdDynamicVibranceProxy(IAmdAdapter amdAdapter, List <ApplicationSetting> applicationSettings, ResolutionModeWrapper windowsResolutionSettings) { _amdAdapter = amdAdapter; _applicationSettings = applicationSettings; _windowsResolutionSettings = windowsResolutionSettings; try { _vibranceInfo = new VibranceInfo(); if (amdAdapter.IsAvailable()) { _vibranceInfo.isInitialized = true; amdAdapter.Init(); } if (_vibranceInfo.isInitialized) { _hook = WinEventHook.GetInstance(); _hook.WinEventHookHandler += OnWinEventHook; } } catch (Exception ex) { MessageBox.Show(ex.ToString()); DialogResult result = MessageBox.Show(NvidiaDynamicVibranceProxy.NvapiErrorInitFailed, "vibranceGUI Error", MessageBoxButtons.OKCancel, MessageBoxIcon.Information); if (result == DialogResult.OK) { Process.Start(NvidiaDynamicVibranceProxy.GuideLink); } } }
private static bool IsResolutionChangeNeeded(Screen screen, ResolutionModeWrapper resolutionSettings) { Devmode mode; if (resolutionSettings != null && ResolutionHelper.GetCurrentResolutionSettings(out mode, screen.DeviceName) && !resolutionSettings.Equals(mode)) { return(true); } return(false); }
private static void PerformResolutionChange(Screen screen, ResolutionModeWrapper resolutionSettings) { ResolutionHelper.ChangeResolutionEx(resolutionSettings, screen.DeviceName); }