Repository: seerge/g-helper Branch: main Commit: b6e3735c028e Files: 178 Total size: 2.4 MB Directory structure: gitextract_q6r1djhm/ ├── .gitattributes ├── .github/ │ ├── CODE_OF_CONDUCT.md │ ├── CONTRIBUTING.md │ ├── FUNDING.yml │ ├── ISSUE_TEMPLATE/ │ │ ├── bug_report.yml │ │ ├── config.yml │ │ ├── feature_request.yml │ │ └── peripherals_request.yml │ ├── SECURITY.md │ └── workflows/ │ ├── build.yml │ ├── codeql.yml │ └── release.yml ├── .gitignore ├── LICENSE ├── app/ │ ├── .editorconfig │ ├── Ally/ │ │ └── AllyControl.cs │ ├── AnimeMatrix/ │ │ ├── AniMatrixControl.cs │ │ ├── AnimeMatrixDevice.cs │ │ ├── Communication/ │ │ │ ├── Device.cs │ │ │ ├── Packet.cs │ │ │ └── Platform/ │ │ │ ├── UsbProvider.cs │ │ │ └── WindowsUsbProvider.cs │ │ └── SlashDevice.cs │ ├── App.config │ ├── AppConfig.cs │ ├── AsusACPI.cs │ ├── AsusMouseSettings.Designer.cs │ ├── AsusMouseSettings.cs │ ├── AsusMouseSettings.resx │ ├── AutoUpdate/ │ │ └── AutoUpdateControl.cs │ ├── Battery/ │ │ └── BatteryControl.cs │ ├── Display/ │ │ ├── AmdDisplay.cs │ │ ├── ColorProfileHelper.cs │ │ ├── DisplayGammaRamp.cs │ │ ├── GammaRamp.cs │ │ ├── ScreenBrightness.cs │ │ ├── ScreenCCD.cs │ │ ├── ScreenControl.cs │ │ ├── ScreenInterrogatory.cs │ │ ├── ScreenNative.cs │ │ └── VisualControl.cs │ ├── Extra.Designer.cs │ ├── Extra.cs │ ├── Extra.resx │ ├── Fan/ │ │ └── FanSensorControl.cs │ ├── Fans.Designer.cs │ ├── Fans.cs │ ├── Fans.resx │ ├── GHelper.csproj │ ├── GHelper.sln │ ├── Gpu/ │ │ ├── AMD/ │ │ │ ├── AmdAdl2.cs │ │ │ └── AmdGpuControl.cs │ │ ├── GPUModeControl.cs │ │ ├── IGpuControl.cs │ │ └── NVidia/ │ │ ├── NvidiaGpuControl.cs │ │ └── NvidiaSmi.cs │ ├── Handheld.Designer.cs │ ├── Handheld.cs │ ├── Handheld.resx │ ├── HardwareControl.cs │ ├── Helpers/ │ │ ├── AsusService.cs │ │ ├── Audio.cs │ │ ├── ClamshellModeControl.cs │ │ ├── ColorUtilities.cs │ │ ├── DynamicLightingHelper.cs │ │ ├── Logger.cs │ │ ├── OSDBase.cs │ │ ├── OnScreenKeyboard.cs │ │ ├── ProcessHelper.cs │ │ ├── RestrictedProcessHelper.cs │ │ ├── Startup.cs │ │ ├── ToastForm.cs │ │ └── TouchscreenHelper.cs │ ├── Input/ │ │ ├── InputDispatcher.cs │ │ ├── KeyboardHook.cs │ │ └── KeyboardListener.cs │ ├── Matrix.Designer.cs │ ├── Matrix.cs │ ├── Matrix.resx │ ├── Mode/ │ │ ├── ModeControl.cs │ │ ├── Modes.cs │ │ └── PowerNative.cs │ ├── NativeMethods.cs │ ├── Peripherals/ │ │ ├── IPeripheral.cs │ │ ├── Mouse/ │ │ │ ├── AsusMouse.cs │ │ │ └── Models/ │ │ │ ├── Chakram.cs │ │ │ ├── ChakramCore.cs │ │ │ ├── ChakramX.cs │ │ │ ├── GladiusII.cs │ │ │ ├── GladiusIIIAimpoint.cs │ │ │ ├── GladiusIIIWireless.cs │ │ │ ├── GladiusIIWireless.cs │ │ │ ├── HarpeAceAimLab.cs │ │ │ ├── HarpeAceMini.cs │ │ │ ├── HarpeIIAce.cs │ │ │ ├── KerisIIAce.cs │ │ │ ├── KerisIIOrigin.cs │ │ │ ├── KerisWireless.cs │ │ │ ├── KerisWirelssAimpoint.cs │ │ │ ├── Pugio.cs │ │ │ ├── PugioII.cs │ │ │ ├── SpathaX.cs │ │ │ ├── StrixCarry.cs │ │ │ ├── StrixEvolve.cs │ │ │ ├── StrixImpact.cs │ │ │ ├── StrixImpactII.cs │ │ │ ├── StrixImpactIII.cs │ │ │ ├── StrixImpactIIIWireless.cs │ │ │ ├── StrixImpactIIWireless.cs │ │ │ ├── TUFM3.cs │ │ │ ├── TUFM4Air.cs │ │ │ ├── TUFM4Wireless.cs │ │ │ └── TUFM5.cs │ │ └── PeripheralsProvider.cs │ ├── Program.cs │ ├── Properties/ │ │ ├── Resources.Designer.cs │ │ ├── Resources.resx │ │ ├── Settings.Designer.cs │ │ ├── Settings.settings │ │ ├── Strings.Designer.cs │ │ ├── Strings.ar.resx │ │ ├── Strings.da.resx │ │ ├── Strings.de.resx │ │ ├── Strings.es.resx │ │ ├── Strings.fr.resx │ │ ├── Strings.hu.resx │ │ ├── Strings.id.resx │ │ ├── Strings.it.resx │ │ ├── Strings.ja.resx │ │ ├── Strings.ko.resx │ │ ├── Strings.lt.resx │ │ ├── Strings.pl.resx │ │ ├── Strings.pt-BR.resx │ │ ├── Strings.pt-PT.resx │ │ ├── Strings.resx │ │ ├── Strings.ro.resx │ │ ├── Strings.tr.resx │ │ ├── Strings.uk.resx │ │ ├── Strings.vi.resx │ │ ├── Strings.zh-CN.resx │ │ ├── Strings.zh-TW.resx │ │ └── launchSettings.json │ ├── Resources/ │ │ └── Font.otf │ ├── Ryzen/ │ │ ├── OpenLibSys.cs │ │ ├── RyzenControl.cs │ │ ├── RyzenSmu.cs │ │ └── SendCommand.cs │ ├── Settings.Designer.cs │ ├── Settings.cs │ ├── Settings.resx │ ├── UI/ │ │ ├── ControlHelper.cs │ │ ├── CustomContextMenu.cs │ │ ├── IconHelper.cs │ │ ├── NumericUpDownWithUnit.cs │ │ ├── RBadgeButton.cs │ │ ├── RButton.cs │ │ ├── RCheckBox.cs │ │ ├── RComboBox.cs │ │ ├── RForm.cs │ │ ├── RForm.resx │ │ └── Slider.cs │ ├── USB/ │ │ ├── AsusHid.cs │ │ ├── Aura.cs │ │ └── XGM.cs │ ├── Updates.Designer.cs │ ├── Updates.cs │ ├── Updates.resx │ ├── WinRing0x64.sys │ ├── app.manifest │ └── global.json ├── crowdin.yml └── docs/ ├── README.ja-JP.md ├── README.md ├── README.zh-CN.md ├── _config.yml ├── _layouts/ │ └── default.html ├── bloat.bat └── debloat.bat ================================================ FILE CONTENTS ================================================ ================================================ FILE: .gitattributes ================================================ ############################################################################### # Set default behavior to automatically normalize line endings. ############################################################################### * text=auto ############################################################################### # Set default behavior for command prompt diff. # # This is need for earlier builds of msysgit that does not have it on by # default for csharp files. # Note: This is only used by command line ############################################################################### #*.cs diff=csharp ############################################################################### # Set the merge driver for project and solution files # # Merging from the command prompt will add diff markers to the files if there # are conflicts (Merging from VS is not affected by the settings below, in VS # the diff markers are never inserted). Diff markers may cause the following # file extensions to fail to load in VS. An alternative would be to treat # these files as binary and thus will always conflict and require user # intervention with every merge. To do so, just uncomment the entries below ############################################################################### #*.sln merge=binary #*.csproj merge=binary #*.vbproj merge=binary #*.vcxproj merge=binary #*.vcproj merge=binary #*.dbproj merge=binary #*.fsproj merge=binary #*.lsproj merge=binary #*.wixproj merge=binary #*.modelproj merge=binary #*.sqlproj merge=binary #*.wwaproj merge=binary ############################################################################### # behavior for image files # # image files are treated as binary by default. ############################################################################### #*.jpg binary #*.png binary #*.gif binary ############################################################################### # diff behavior for common document formats # # Convert binary document formats to text before diffing them. This feature # is only available from the command line. Turn it on by uncommenting the # entries below. ############################################################################### #*.doc diff=astextplain #*.DOC diff=astextplain #*.docx diff=astextplain #*.DOCX diff=astextplain #*.dot diff=astextplain #*.DOT diff=astextplain #*.pdf diff=astextplain #*.PDF diff=astextplain #*.rtf diff=astextplain #*.RTF diff=astextplain ================================================ FILE: .github/CODE_OF_CONDUCT.md ================================================ # Contributor Covenant Code of Conduct ## Our Pledge We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation. We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community. ## Our Standards Examples of behavior that contributes to a positive environment for our community include: * Demonstrating empathy and kindness toward other people * Being respectful of differing opinions, viewpoints, and experiences * Giving and gracefully accepting constructive feedback * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience * Focusing on what is best not just for us as individuals, but for the overall community Examples of unacceptable behavior include: * The use of sexualized language or imagery, and sexual attention or advances of any kind * Trolling, insulting or derogatory comments, and personal or political attacks * Public or private harassment * Publishing others' private information, such as a physical or email address, without their explicit permission * Other conduct which could reasonably be considered inappropriate in a professional setting ## Enforcement Responsibilities Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful. Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate. ## Scope This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. ## Enforcement Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at . All complaints will be reviewed and investigated promptly and fairly. All community leaders are obligated to respect the privacy and security of the reporter of any incident. ## Enforcement Guidelines Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct: ### 1. Correction **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community. **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested. ### 2. Warning **Community Impact**: A violation through a single incident or series of actions. **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban. ### 3. Temporary Ban **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior. **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban. ### 4. Permanent Ban **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals. **Consequence**: A permanent ban from any sort of public interaction within the community. ## Attribution This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0, available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity). [homepage]: https://www.contributor-covenant.org For answers to common questions about this code of conduct, see the FAQ at https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations. ================================================ FILE: .github/CONTRIBUTING.md ================================================ Please, feel free to contribute. Especially if you own model differnt from G14 2022 and can offer extra features or support. ================================================ FILE: .github/FUNDING.yml ================================================ # These are supported funding model platforms custom: https://g-helper.com/support ================================================ FILE: .github/ISSUE_TEMPLATE/bug_report.yml ================================================ name: Bug Report description: Something isn't working correctly body: - type: markdown attributes: value: | Thanks for taking the time to fill out this bug report. The more information you provide, the easier it will be for me to fix it! - type: checkboxes id: rules attributes: label: Rules options: - label: I made myself familiar with the Readme, FAQ and Troubleshooting. required: true - label: I understand that, if insufficient information or no app logs will be provided, my issue will be closed without an answer. required: true validations: required: true - type: textarea id: description attributes: label: What's wrong? description: Provide detailed description of what is wrong or does not work as expected. placeholder: Provide detailed description of what is wrong or does not work as expected. validations: required: true - type: textarea id: reproduce attributes: label: How to reproduce the bug? description: Describe how to reproduce the behavior. Be as specific as possible and provide as many details as possible. placeholder: | 1. Go to '...' 2. Click on '....' 3. Scroll down to '....' 4. See error validations: required: true - type: textarea id: logs attributes: label: Logs placeholder: Please drag and drop complete log file from ``%APPDATA%\GHelper\log.txt`` description: Please drag and drop complete log file from ``%APPDATA%\GHelper\log.txt`` validations: required: true - type: input id: device attributes: label: Device and Model description: Which laptop do you use? placeholder: e.g. Asus Zephyrus G14 GA404RK validations: required: true - type: textarea id: additional attributes: label: Additional information. description: If applicable, add screenshots or other relevant information to help explain your problem. - type: dropdown id: armoury attributes: label: Armoury Crate description: Do you have Armoury Crate installed? options: - Uninstalled - Installed - Never installed default: 0 - type: input id: asus attributes: label: Asus Services description: How many Asus services do you have running (check ``Extra`` section in G-Helper)? placeholder: e.g. None - type: input id: version attributes: label: Version description: G-Helper version? placeholder: e.g. 0.146 - type: input id: os attributes: label: OS description: Which operating system do you use? placeholder: e.g. Windows 11 21H2 ================================================ FILE: .github/ISSUE_TEMPLATE/config.yml ================================================ blank_issues_enabled: false ================================================ FILE: .github/ISSUE_TEMPLATE/feature_request.yml ================================================ name: Feature request description: Suggest an idea for this project body: - type: checkboxes id: rules attributes: label: Rules options: - label: I made myself familiar with the Readme, FAQ and Troubleshooting. required: true - label: I understand that, if insufficient information will be provided, my issue will be closed without an answer. required: true validations: required: true - type: textarea id: description attributes: label: Is your feature request related to a problem? Please describe placeholder: A clear and concise description of what the problem is. validations: required: true - type: textarea id: solution attributes: label: Describe the solution you'd like placeholder: A clear and concise description of what you want to happen. validations: required: true - type: textarea id: alternatives attributes: label: Describe alternatives you've considered placeholder: A clear and concise description of any alternative solutions or features you've considered. - type: input id: device attributes: label: Device and Model description: Which laptop do you use? placeholder: e.g. Asus Zephyrus G14 GA404RK validations: required: true - type: textarea id: additional attributes: label: Additional information. placeholder: If applicable, add screenshots or other relevant information ================================================ FILE: .github/ISSUE_TEMPLATE/peripherals_request.yml ================================================ name: Mouse and other peripherals support request description: Request support for a new device body: - type: input id: device attributes: label: Mouse / peripheral model and version placeholder: e.g. Asus TUF M4 Wireless validations: required: true - type: textarea id: description attributes: label: Armoury Crate Screenshots description: Connect your mouse to Armoury Crate (maybe in a VM if you do not want to install it on your PC) and upload here screenshots of all the pages for your mouse for settings. placeholder: Drag and drop screenshots here validations: required: true - type: textarea id: solution attributes: label: USB Details description: Also, please use USB Tree View and send the text (especially the block with all the child devices) of the mouse. image placeholder: USB Tree View details validations: required: true - type: textarea id: additional attributes: label: Additional information. placeholder: If applicable, add screenshots or other relevant information ================================================ FILE: .github/SECURITY.md ================================================ # Security Policy ## Supported Versions | Version | Supported | | ------- | ------------------ | | 0.200+ | :white_check_mark: | | < 0.200 | :x: | ## Reporting a Vulnerability Use this section to tell people how to report a vulnerability. Tell them where to go, how often they can expect to get an update on a reported vulnerability, what to expect if the vulnerability is accepted or declined, etc. ================================================ FILE: .github/workflows/build.yml ================================================ name: Build on: push: branches: [ main ] pull_request: branches: [ main ] workflow_dispatch: permissions: contents: read jobs: build: runs-on: windows-2022 steps: - uses: actions/checkout@v4 - name: Setup dotnet uses: actions/setup-dotnet@v4 with: dotnet-version: '8.0.x' - name: Build run: | dotnet build app/GHelper.sln ================================================ FILE: .github/workflows/codeql.yml ================================================ name: CodeQL on: push: branches: [ main ] pull_request: branches: [ main ] schedule: - cron: '34 18 * * 3' permissions: actions: read contents: read security-events: write jobs: codeql: runs-on: windows-2022 steps: - uses: actions/checkout@v4 - name: Initialize CodeQL uses: github/codeql-action/init@v3 with: languages: c# - name: Autobuild uses: github/codeql-action/autobuild@v3 - name: Analyze uses: github/codeql-action/analyze@v3 ================================================ FILE: .github/workflows/release.yml ================================================ name: Release on: release: types: [ published ] workflow_dispatch: permissions: contents: write id-token: write attestations: write jobs: release: runs-on: windows-2022 steps: - uses: actions/checkout@v4 - name: Setup dotnet uses: actions/setup-dotnet@v4 with: dotnet-version: '8.0.x' - name: Publish run: | dotnet publish app/GHelper.sln --configuration Release --runtime win-x64 -p:PublishSingleFile=true --no-self-contained - name: Upload unsigned EXE id: upload-unsigned uses: actions/upload-artifact@v4 with: path: app/bin/x64/Release/net8.0-windows/win-x64/publish/GHelper.exe - id: sign-exe uses: signpath/github-action-submit-signing-request@v1.1 with: api-token: ${{ secrets.SIGNPATH_API_TOKEN }} organization-id: ${{ secrets.SIGNPATH_ORG_ID }} project-slug: ${{ secrets.SIGNPATH_PROJECT }} signing-policy-slug: ${{ secrets.SIGNPATH_POLICY }} github-artifact-id: ${{ steps.upload-unsigned.outputs.artifact-id }} wait-for-completion: true output-artifact-directory: './signed' - name: Create ZIP from signed EXE run: powershell Compress-Archive ./signed/GHelper.exe ./signed/GHelper.zip - name: Upload signed EXE and ZIP env: GH_TOKEN: ${{ github.token }} run: | gh release upload "${{ github.event.release.tag_name }}" ./signed/GHelper.exe ./signed/GHelper.zip --clobber - name: Generate SLSA build provenance attestation uses: actions/attest-build-provenance@v2 with: subject-path: | ./signed/GHelper.exe ./signed/GHelper.zip ================================================ FILE: .gitignore ================================================ ## Ignore Visual Studio temporary files, build results, and ## files generated by popular Visual Studio add-ons. ## ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore # User-specific files *.rsuser *.suo *.user *.userosscache *.sln.docstates # User-specific files (MonoDevelop/Xamarin Studio) *.userprefs # Mono auto generated files mono_crash.* # Build results [Dd]ebug/ [Dd]ebugPublic/ [Rr]elease/ [Rr]eleases/ x64/ x86/ [Ww][Ii][Nn]32/ [Aa][Rr][Mm]/ [Aa][Rr][Mm]64/ bld/ [Bb]in/ [Oo]bj/ [Oo]ut/ [Ll]og/ [Ll]ogs/ # Visual Studio 2015/2017 cache/options directory .vs/ # Uncomment if you have tasks that create the project's static files in wwwroot #wwwroot/ # Visual Studio 2017 auto generated files Generated\ Files/ # MSTest test Results [Tt]est[Rr]esult*/ [Bb]uild[Ll]og.* # NUnit *.VisualState.xml TestResult.xml nunit-*.xml # Build Results of an ATL Project [Dd]ebugPS/ [Rr]eleasePS/ dlldata.c # Benchmark Results BenchmarkDotNet.Artifacts/ # .NET Core project.lock.json project.fragment.lock.json artifacts/ # ASP.NET Scaffolding ScaffoldingReadMe.txt # StyleCop StyleCopReport.xml # Files built by Visual Studio *_i.c *_p.c *_h.h *.ilk *.meta *.obj *.iobj *.pch *.pdb *.ipdb *.pgc *.pgd *.rsp *.sbr *.tlb *.tli *.tlh *.tmp *.tmp_proj *_wpftmp.csproj *.log *.vspscc *.vssscc .builds *.pidb *.svclog *.scc # Chutzpah Test files _Chutzpah* # Visual C++ cache files ipch/ *.aps *.ncb *.opendb *.opensdf *.sdf *.cachefile *.VC.db *.VC.VC.opendb # Visual Studio profiler *.psess *.vsp *.vspx *.sap # Visual Studio Trace Files *.e2e # TFS 2012 Local Workspace $tf/ # Guidance Automation Toolkit *.gpState # ReSharper is a .NET coding add-in _ReSharper*/ *.[Rr]e[Ss]harper *.DotSettings.user # TeamCity is a build add-in _TeamCity* # DotCover is a Code Coverage Tool *.dotCover # AxoCover is a Code Coverage Tool .axoCover/* !.axoCover/settings.json # Coverlet is a free, cross platform Code Coverage Tool coverage*.json coverage*.xml coverage*.info # Visual Studio code coverage results *.coverage *.coveragexml # NCrunch _NCrunch_* .*crunch*.local.xml nCrunchTemp_* # MightyMoose *.mm.* AutoTest.Net/ # Web workbench (sass) .sass-cache/ # Installshield output folder [Ee]xpress/ # DocProject is a documentation generator add-in DocProject/buildhelp/ DocProject/Help/*.HxT DocProject/Help/*.HxC DocProject/Help/*.hhc DocProject/Help/*.hhk DocProject/Help/*.hhp DocProject/Help/Html2 DocProject/Help/html # Click-Once directory publish/ # Publish Web Output *.[Pp]ublish.xml *.azurePubxml # Note: Comment the next line if you want to checkin your web deploy settings, # but database connection strings (with potential passwords) will be unencrypted *.pubxml *.publishproj # Microsoft Azure Web App publish settings. Comment the next line if you want to # checkin your Azure Web App publish settings, but sensitive information contained # in these scripts will be unencrypted PublishScripts/ # NuGet Packages *.nupkg # NuGet Symbol Packages *.snupkg # The packages folder can be ignored because of Package Restore **/[Pp]ackages/* # except build/, which is used as an MSBuild target. !**/[Pp]ackages/build/ # Uncomment if necessary however generally it will be regenerated when needed #!**/[Pp]ackages/repositories.config # NuGet v3's project.json files produces more ignorable files *.nuget.props *.nuget.targets # Microsoft Azure Build Output csx/ *.build.csdef # Microsoft Azure Emulator ecf/ rcf/ # Windows Store app package directories and files AppPackages/ BundleArtifacts/ Package.StoreAssociation.xml _pkginfo.txt *.appx *.appxbundle *.appxupload # Visual Studio cache files # files ending in .cache can be ignored *.[Cc]ache # but keep track of directories ending in .cache !?*.[Cc]ache/ # Others ClientBin/ ~$* *~ *.dbmdl *.dbproj.schemaview *.jfm *.pfx *.publishsettings orleans.codegen.cs # Including strong name files can present a security risk # (https://github.com/github/gitignore/pull/2483#issue-259490424) #*.snk # Since there are multiple workflows, uncomment next line to ignore bower_components # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) #bower_components/ # RIA/Silverlight projects Generated_Code/ # Backup & report files from converting an old project file # to a newer Visual Studio version. Backup files are not needed, # because we have git ;-) _UpgradeReport_Files/ Backup*/ UpgradeLog*.XML UpgradeLog*.htm ServiceFabricBackup/ *.rptproj.bak # SQL Server files *.mdf *.ldf *.ndf # Business Intelligence projects *.rdl.data *.bim.layout *.bim_*.settings *.rptproj.rsuser *- [Bb]ackup.rdl *- [Bb]ackup ([0-9]).rdl *- [Bb]ackup ([0-9][0-9]).rdl # Microsoft Fakes FakesAssemblies/ # GhostDoc plugin setting file *.GhostDoc.xml # Node.js Tools for Visual Studio .ntvs_analysis.dat node_modules/ # Visual Studio 6 build log *.plg # Visual Studio 6 workspace options file *.opt # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) *.vbw # Visual Studio LightSwitch build output **/*.HTMLClient/GeneratedArtifacts **/*.DesktopClient/GeneratedArtifacts **/*.DesktopClient/ModelManifest.xml **/*.Server/GeneratedArtifacts **/*.Server/ModelManifest.xml _Pvt_Extensions # Paket dependency manager .paket/paket.exe paket-files/ # FAKE - F# Make .fake/ # CodeRush personal settings .cr/personal # Python Tools for Visual Studio (PTVS) __pycache__/ *.pyc # Cake - Uncomment if you are using it # tools/** # !tools/packages.config # Tabs Studio *.tss # Telerik's JustMock configuration file *.jmconfig # BizTalk build output *.btp.cs *.btm.cs *.odx.cs *.xsd.cs # OpenCover UI analysis results OpenCover/ # Azure Stream Analytics local run output ASALocalRun/ # MSBuild Binary and Structured Log *.binlog # NVidia Nsight GPU debugger configuration file *.nvuser # MFractors (Xamarin productivity tool) working folder .mfractor/ # Local History for Visual Studio .localhistory/ # BeatPulse healthcheck temp database healthchecksdb # Backup folder for Package Reference Convert tool in Visual Studio 2017 MigrationBackup/ # Ionide (cross platform F# VS Code tools) working folder .ionide/ # Fody - auto-generated XML schema FodyWeavers.xsd ================================================ FILE: LICENSE ================================================ GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . ================================================ FILE: app/.editorconfig ================================================ [*.{cs,vb}] # IDE0017: Simplify object initialization dotnet_style_object_initializer = true ================================================ FILE: app/Ally/AllyControl.cs ================================================ using GHelper.Gpu.AMD; using GHelper.Helpers; using GHelper.Input; using GHelper.Mode; using GHelper.USB; using HidSharp; using System.Text; namespace GHelper.Ally { public enum ControllerMode : int { Auto = 0, Gamepad = 1, WASD = 2, Mouse = 3, Skip = -1, } public enum BindingZone : byte { DPadUpDown = 1, DPadLeftRight = 2, StickClick = 3, Bumper = 4, AB = 5, XY = 6, ViewMenu = 7, M1M2 = 8, Trigger = 9 } public class AllyControl { static System.Timers.Timer timer = default!; static AmdGpuControl amdControl = new AmdGpuControl(); SettingsForm settings; static ControllerMode _mode = ControllerMode.Auto; static ControllerMode _applyMode = ControllerMode.Mouse; static int _autoCount = 0; static int _upCount = 0; static int _downCount = 0; static int tdpMin = 6; static int tdpStable = tdpMin; static int tdpCurrent = -1; static bool autoTDP = false; static int fpsLimit = -1; public const string BindA = "01-01"; public const string BindB = "01-02"; public const string BindX = "01-03"; public const string BindY = "01-04"; public const string BindLB = "01-05"; public const string BindRB = "01-06"; public const string BindLS = "01-07"; public const string BindRS = "01-08"; public const string BindDU = "01-09"; public const string BindDD = "01-0A"; public const string BindDL = "01-0B"; public const string BindDR = "01-0C"; public const string BindVB = "01-11"; public const string BindMB = "01-12"; public const string BindM1 = "02-8F"; public const string BindM2 = "02-8E"; public const string BindLT = "01-0D"; public const string BindRT = "01-0E"; public const string BindXB = "01-13"; public const string BindMouseL = "03-01"; public const string BindMouseR = "03-02"; public const string BindKBU = "02-98"; public const string BindKBD = "02-99"; public const string BindKBL = "02-9A"; public const string BindKBR = "02-9B"; public const string BindTab = "02-0D"; public const string BindEnter = "02-5A"; public const string BindBack = "02-66"; public const string BindEsc = "02-76"; public const string BindPgU = "02-96"; public const string BindPgD = "02-97"; public const string BindShift = "02-88"; public const string BindCtrl = "02-8C"; public const string BindAlt = "02-8A"; public const string BindWin = "02-82"; public const string BindTaskManager = "04-03-8C-88-76"; public const string BindCloseWindow = "04-02-8A-0C"; public const string BindBrightnessDown = "04-04-8C-88-8A-05"; public const string BindBrightnessUp = "04-04-8C-88-8A-06"; public const string BindXGM = "04-04-8C-88-8A-04"; public const string BindToggleMode = "04-04-8C-88-8A-0C"; public const string BindToggleFPSLimit = "04-04-8C-88-8A-01"; public const string BindToggleTouchScreen = "04-04-8C-88-8A-0B"; public const string BindOverlay = "04-03-8C-88-44"; public const string BindShiftTab = "04-02-88-0D"; public const string BindAltTab = "04-02-8A-0D"; public const string BindWinTab = "04-02-82-0D"; public const string BindVolUp = "05-03"; public const string BindVolDown = "05-02"; public const string BindPrintScrn = "02-C3"; public const string BindScreenshot = "04-03-82-88-1B"; public const string BindShowDesktop = "04-02-82-23"; public const string BindShowKeyboard = "05-19"; static byte[] CommandReady = new byte[] { AsusHid.INPUT_ID, 0xD1, 0x0A, 0x01 }; static byte[] CommandSave = new byte[] { AsusHid.INPUT_ID, 0xD1, 0x0F, 0x20 }; public static Dictionary BindCodes = new Dictionary { { "", "--------" }, { "00-00", "[ Disabled ]" }, { BindM1, "M1" }, { BindM2, "M2" }, { BindA, "A" }, { BindB, "B" }, { BindX, "X" }, { BindY, "Y" }, { BindLB, "Left Bumper" }, { BindRB, "Right Bumper" }, { BindLS, "Left Stick Click" }, { BindRS, "Right Stick Click" }, { BindDU, "DPad Up" }, { BindDD, "DPad Down" }, { BindDL, "DPad Left" }, { BindDR, "DPad Right" }, { BindVB, "View Button" }, { BindMB, "Menu Button" }, { BindXB, "XBox/Steam" }, { BindToggleMode, "Controller Mode" }, { BindToggleFPSLimit, "FPS Limit" }, { BindToggleTouchScreen, "Toggle TouchScreen" }, { BindVolUp, "Vol Up" }, { BindVolDown, "Vol Down" }, { BindBrightnessUp, "Bright Up" }, { BindBrightnessDown, "Bright Down" }, { BindShowKeyboard, "Show Keyboard" }, { BindShowDesktop, "Show Desktop" }, { BindScreenshot, "Screenshot" }, { BindOverlay, "AMD Overlay" }, { BindTaskManager, "Task Manager" }, { BindCloseWindow, "Close Window" }, { BindShiftTab, "Shift-Tab" }, { BindAltTab, "Alt-Tab" }, { BindWinTab, "Win-Tab" }, { BindXGM, "XGM Toggle" }, { BindEsc, "Esc" }, { BindBack, "Backspace" }, { BindTab, "Tab" }, { BindEnter, "Enter" }, { BindShift, "LShift" }, { BindAlt, "LAlt" }, { BindCtrl, "LCtl" }, { BindWin, "WIN" }, { BindPrintScrn, "PrntScn" }, { BindPgU, "PgUp" }, { BindPgD, "PgDwn" }, { BindKBU, "UpArrow" }, { BindKBD, "DownArrow" }, { BindKBL, "LeftArrow" }, { BindKBR, "RightArrow" }, { "02-05", "F1" }, { "02-06", "F2" }, { "02-04", "F3" }, { "02-0C", "F4" }, { "02-03", "F5" }, { "02-0B", "F6" }, { "02-80", "F7" }, { "02-0A", "F8" }, { "02-01", "F9" }, { "02-09", "F10" }, { "02-78", "F11" }, { "02-07", "F12" }, { "02-0E", "`" }, { "02-16", "1" }, { "02-1E", "2" }, { "02-26", "3" }, { "02-25", "4" }, { "02-2E", "5" }, { "02-36", "6" }, { "02-3D", "7" }, { "02-3E", "8" }, { "02-46", "9" }, { "02-45", "0" }, { "02-4E", "-" }, { "02-55", "=" }, { "02-15", "Q" }, { "02-1D", "W" }, { "02-24", "E" }, { "02-2D", "R" }, { "02-2C", "T" }, { "02-35", "Y" }, { "02-3C", "U" }, { "02-44", "O" }, { "02-4D", "P" }, { "02-54", "[" }, { "02-5B", "]" }, { "02-5D", "|" }, { "02-58", "Caps" }, { "02-1C", "A" }, { "02-1B", "S" }, { "02-23", "D" }, { "02-2B", "F" }, { "02-34", "G" }, { "02-33", "H" }, { "02-3B", "J" }, { "02-42", "k" }, { "02-4B", "l" }, { "02-4C", ";" }, { "02-52", "'" }, { "02-22", "X" }, { "02-1A", "Z" }, { "02-21", "C" }, { "02-2A", "V" }, { "02-32", "B" }, { "02-31", "N" }, { "02-3A", "M" }, { "02-41", "," }, { "02-49", "." }, { "02-89", "RShift" }, { "02-29", "Space" }, { "02-8B", "RAlt" }, { "02-84", "App menu" }, { "02-8D", "RCtl" }, { "02-7E", "ScrLk" }, { "02-C2", "Insert" }, { "02-C0", "Delete" }, { "02-94", "Home" }, { "02-95", "End" }, { "02-77", "NumLock" }, { "02-90", "NumSlash" }, { "02-7C", "NumStar" }, { "02-7B", "NumHyphen" }, { "02-70", "Num0" }, { "02-69", "Num1" }, { "02-72", "Num2" }, { "02-7A", "Num3" }, { "02-6B", "Num4" }, { "02-73", "Num5" }, { "02-74", "Num6" }, { "02-6C", "Num7" }, { "02-75", "Num8" }, { "02-7D", "Num9" }, { "02-79", "NumPlus" }, { "02-81", "NumEnter" }, { "02-71", "NumPeriod" }, { BindMouseL, "Mouse left click" }, { BindMouseR, "Mouse right click" }, { "03-03", "Mouse middle click" }, { "03-04", "Mouse scroll up" }, { "03-05", "Mouse scroll down" }, //{ "05-16", "Screenshot" }, //{ "05-1C", "Show desktop" }, { "05-1E", "Begin recording" }, { "05-01", "Mic off" }, }; public AllyControl(SettingsForm settingsForm) { if (!AppConfig.IsAlly()) return; settings = settingsForm; if (timer is null) { timer = new System.Timers.Timer(300); timer.Elapsed += Timer_Elapsed; Logger.WriteLine("Ally timer"); } } private int GetMaxTDP() { int tdp = AppConfig.GetMode("limit_total"); if (tdp > 0) return tdp; switch (Modes.GetCurrentBase()) { case 1: return 25; case 2: return 10; default: return 15; } } private int GetTDP() { if (tdpCurrent < 0) tdpCurrent = GetMaxTDP(); return tdpCurrent; } private void SetTDP(int tdp, string log) { if (tdp < tdpStable) tdp = tdpStable; int max = GetMaxTDP(); if (tdp > max) tdp = max; if (tdp == tdpCurrent) return; if (!autoTDP) return; Program.acpi.DeviceSet(AsusACPI.PPT_APUA0, tdp, log); Program.acpi.DeviceSet(AsusACPI.PPT_APUA3, tdp, null); Program.acpi.DeviceSet(AsusACPI.PPT_APUC1, tdp, null); tdpCurrent = tdp; } private void Timer_Elapsed(object? sender, System.Timers.ElapsedEventArgs e) { if (!autoTDP && _mode != ControllerMode.Auto) return; float fps = amdControl.GetFPS(); int? usage = 0; if (autoTDP && fpsLimit > 0 && fpsLimit <= 120) { int power = (int)amdControl.GetGpuPower(); //Debug.WriteLine($"{power}: {fps}"); if (fps <= Math.Min(fpsLimit * 0.9, fpsLimit - 4)) _upCount++; else _upCount = 0; if (fps >= Math.Min(fpsLimit * 0.95, fpsLimit - 2)) _downCount++; else _downCount = 0; var tdp = GetTDP(); if (_upCount >= 1) { _downCount = 0; _upCount = 0; SetTDP(tdp + 1, $"AutoTDP+ [{power}]{fps}"); } if (_downCount >= 8 && power < tdp) { _upCount = 0; _downCount--; SetTDP(tdp - 1, $"AutoTDP- [{power}]{fps}"); } } if (_mode == ControllerMode.Auto) { if (fps > 0) usage = amdControl.GetiGpuUse(); ControllerMode newMode = (fps > 0 && usage > 15) ? ControllerMode.Gamepad : ControllerMode.Mouse; if (_applyMode != newMode) _autoCount++; else _autoCount = 0; if (_autoCount == 3) { _autoCount = 0; ApplyMode(newMode); Logger.WriteLine($"Controller Mode (FPS={fps}, USAGE={usage}%): {newMode}"); } } } public void ToggleAutoTDP() { autoTDP = !autoTDP; tdpCurrent = -1; if (!autoTDP) { Program.modeControl.SetPerformanceMode(); } settings.VisualiseAutoTDP(autoTDP); } public void Init() { if (AppConfig.IsAlly()) settings.VisualiseAlly(true); else return; SetMode((ControllerMode)AppConfig.Get("controller_mode", (int)ControllerMode.Auto), true); settings.VisualiseBacklight(InputDispatcher.GetBacklight()); fpsLimit = amdControl.GetFPSLimit(); settings.VisualiseFPSLimit(fpsLimit); } public void ToggleFPSLimit(bool toast = false) { switch (fpsLimit) { case 30: fpsLimit = 40; break; case 40: fpsLimit = 45; break; case 45: fpsLimit = 50; break; case 50: fpsLimit = 60; break; case 60: fpsLimit = 75; break; case 75: fpsLimit = 90; break; case 90: fpsLimit = 120; break; case 120: fpsLimit = 240; break; default: fpsLimit = 30; break; } int result = amdControl.SetFPSLimit(fpsLimit); Logger.WriteLine($"FPS Limit {fpsLimit}: {result}"); settings.VisualiseFPSLimit(fpsLimit); if (toast) Program.toast.RunToast("FPS Limit " + ((fpsLimit > 0 && fpsLimit <= 120) ? fpsLimit : "OFF")); } public void ToggleBacklight() { InputDispatcher.SetBacklight(4, true); settings.VisualiseBacklight(InputDispatcher.GetBacklight()); } static private byte[] DecodeBinding(string binding = "") { byte[] bytes; if (binding == "" || binding is null) return new byte[2]; try { bytes = AppConfig.StringToBytes(binding); } catch { return new byte[2]; } byte[] code = new byte[10]; code[0] = bytes[0]; switch (bytes[0]) { case 0x02: code[2] = bytes[1]; break; case 0x03: code[4] = bytes[1]; break; case 0x04: bytes.Skip(1).ToArray().CopyTo(code, 5); break; case 0x05: code[3] = bytes[1]; break; default: code[1] = bytes[1]; break; } return code; } static private void BindZone(BindingZone zone) { string KeyL1, KeyR1; string KeyL2, KeyR2; bool desktop = (_applyMode == ControllerMode.Mouse); switch (zone) { case BindingZone.DPadUpDown: KeyL1 = AppConfig.GetString("bind_du", desktop ? BindKBU : BindDU); KeyR1 = AppConfig.GetString("bind_dd", desktop ? BindKBD : BindDD); KeyL2 = AppConfig.GetString("bind2_du", BindShowKeyboard); KeyR2 = AppConfig.GetString("bind2_dd", BindShowDesktop); break; case BindingZone.DPadLeftRight: KeyL1 = AppConfig.GetString("bind_dl", desktop ? BindKBL : BindDL); KeyR1 = AppConfig.GetString("bind_dr", desktop ? BindKBR : BindDR); KeyL2 = AppConfig.GetString("bind2_dl", BindBrightnessDown); KeyR2 = AppConfig.GetString("bind2_dr", BindBrightnessUp); break; case BindingZone.StickClick: KeyL1 = AppConfig.GetString("bind_ls", desktop ? BindShift : BindLS); KeyR1 = AppConfig.GetString("bind_rs", desktop ? BindMouseL : BindRS); KeyL2 = AppConfig.GetString("bind2_ls"); KeyR2 = AppConfig.GetString("bind2_rs", BindToggleMode); break; case BindingZone.Bumper: KeyL1 = AppConfig.GetString("bind_lb", desktop ? BindTab : BindLB); KeyR1 = AppConfig.GetString("bind_rb", desktop ? BindMouseL : BindRB); KeyL2 = AppConfig.GetString("bind2_lb"); KeyR2 = AppConfig.GetString("bind2_rb"); break; case BindingZone.AB: KeyL1 = AppConfig.GetString("bind_a", desktop ? BindEnter : BindA); KeyR1 = AppConfig.GetString("bind_b", desktop ? BindEsc : BindB); KeyL2 = AppConfig.GetString("bind2_a"); KeyR2 = AppConfig.GetString("bind2_b"); break; case BindingZone.XY: KeyL1 = AppConfig.GetString("bind_x", desktop ? BindPgD : BindX); KeyR1 = AppConfig.GetString("bind_y", desktop ? BindPgU : BindY); KeyL2 = AppConfig.GetString("bind2_x", BindScreenshot); KeyR2 = AppConfig.GetString("bind2_y", BindOverlay); break; case BindingZone.ViewMenu: KeyL1 = AppConfig.GetString("bind_vb", BindVB); KeyR1 = AppConfig.GetString("bind_mb", BindMB); KeyL2 = AppConfig.GetString("bind2_vb"); KeyR2 = AppConfig.GetString("bind2_mb"); break; case BindingZone.M1M2: KeyL1 = AppConfig.GetString("bind_m2", BindM2); KeyR1 = AppConfig.GetString("bind_m1", BindM1); KeyL2 = AppConfig.GetString("bind2_m2", BindM2); KeyR2 = AppConfig.GetString("bind2_m1", BindM1); break; default: KeyL1 = AppConfig.GetString("bind_lt", desktop ? BindShiftTab : BindLT); KeyR1 = AppConfig.GetString("bind_rt", desktop ? BindMouseR : BindRT); KeyL2 = AppConfig.GetString("bind2_lt"); KeyR2 = AppConfig.GetString("bind2_rt"); break; } if (KeyL1 == "" && KeyR1 == "") return; byte[] bindings = new byte[50]; byte[] init = new byte[] { AsusHid.INPUT_ID, 0xd1, 0x02, (byte)zone, 0x2c }; init.CopyTo(bindings, 0); DecodeBinding(KeyL1).CopyTo(bindings, 5); DecodeBinding(KeyL2).CopyTo(bindings, 16); DecodeBinding(KeyR1).CopyTo(bindings, 27); DecodeBinding(KeyR2).CopyTo(bindings, 38); //AsusHid.WriteInput(CommandReady, null); AsusHid.WriteInput(bindings, null); } static void WakeUp() { AsusHid.WriteInput(Encoding.ASCII.GetBytes("ZASUS Tech.Inc."), "Init"); } static public void SetDeadzones() { AsusHid.WriteInput(new byte[] { AsusHid.INPUT_ID, 0xd1, 4, 4, (byte)AppConfig.Get("ls_min", 0), (byte)AppConfig.Get("ls_max", 100), (byte)AppConfig.Get("rs_min", 0), (byte)AppConfig.Get("rs_max", 100) }, null); AsusHid.WriteInput(new byte[] { AsusHid.INPUT_ID, 0xd1, 5, 4, (byte)AppConfig.Get("lt_min", 0), (byte)AppConfig.Get("lt_max", 100), (byte)AppConfig.Get("rt_min", 0), (byte)AppConfig.Get("rt_max", 100) }, null); AsusHid.WriteInput(new byte[] { AsusHid.INPUT_ID, 0xd1, 6, 2, (byte)AppConfig.Get("vibra", 100), (byte)AppConfig.Get("vibra", 100) }, null); } public static void DisableXBoxController(bool disabled) { AsusHid.WriteInput([AsusHid.INPUT_ID, 0xD1, 0x0B, 0x01, disabled ? (byte)0x02 : (byte)0x01], $"ControllerDisabled: {disabled}"); } public static void ApplyMode(ControllerMode applyMode = ControllerMode.Auto, bool init = false) { Task.Run(() => { if (applyMode == ControllerMode.Skip) return; HidStream? input = AsusHid.FindHidStream(AsusHid.INPUT_ID); int count = 0; while (input == null && count++ < 10) { input = AsusHid.FindHidStream(AsusHid.INPUT_ID); Thread.Sleep(500); } if (input == null) { Logger.WriteLine($"Controller not found"); return; } if (applyMode != ControllerMode.Auto) _applyMode = applyMode; if (init) { WakeUp(); InputDispatcher.SetBacklightAuto(); } AsusHid.WriteInput([AsusHid.INPUT_ID, 0xD1, 0x01, 0x01, (byte)_applyMode], "Controller"); //AsusHid.WriteInput(CommandSave, null); BindZone(BindingZone.M1M2); BindZone(BindingZone.DPadUpDown); BindZone(BindingZone.DPadLeftRight); BindZone(BindingZone.StickClick); BindZone(BindingZone.Bumper); BindZone(BindingZone.AB); BindZone(BindingZone.XY); BindZone(BindingZone.ViewMenu); BindZone(BindingZone.Trigger); AsusHid.WriteInput(CommandSave, null); SetDeadzones(); if (init && AppConfig.Is("controller_disabled")) { Thread.Sleep(500); DisableXBoxController(false); DisableXBoxController(true); } }); } private void SetMode(ControllerMode mode, bool init = false) { _mode = mode; AppConfig.Set("controller_mode", (int)mode); amdControl.StopFPS(); ApplyMode(mode, init); amdControl.StartFPS(); timer.Start(); settings.VisualiseController(mode); } public void ToggleModeHotkey() { if (_applyMode == ControllerMode.Gamepad) { SetMode(ControllerMode.Mouse); Program.toast.RunToast("Mouse", ToastIcon.Controller); } else { SetMode(ControllerMode.Gamepad); Program.toast.RunToast("Gamepad", ToastIcon.Controller); } } public void ToggleMode() { switch (_mode) { case ControllerMode.Auto: SetMode(ControllerMode.Gamepad); break; case ControllerMode.Gamepad: SetMode(ControllerMode.Mouse); break; case ControllerMode.Mouse: SetMode(ControllerMode.Skip); break; case ControllerMode.Skip: SetMode(ControllerMode.Auto); break; } } } } ================================================ FILE: app/AnimeMatrix/AniMatrixControl.cs ================================================ using NAudio.CoreAudioApi; using NAudio.Wave; using System.Diagnostics; using System.Drawing.Drawing2D; using System.Drawing.Imaging; using System.Timers; namespace GHelper.AnimeMatrix { public class AniMatrixControl : NAudio.CoreAudioApi.Interfaces.IMMNotificationClient { SettingsForm settings; System.Timers.Timer matrixTimer = default!; System.Timers.Timer slashTimer = default!; public AnimeMatrixDevice? deviceMatrix; public SlashDevice? deviceSlash; public static bool lidClose = false; private static bool _wakeUp = false; double[]? AudioValues; WasapiCapture? AudioDevice; string? AudioDeviceId; private MMDeviceEnumerator? AudioDeviceEnum; private readonly object _audioLock = new(); private volatile bool _listeningToAudio; private volatile bool _stoppingAudio; public bool IsValid => deviceMatrix != null || deviceSlash != null; public bool IsSlash => deviceSlash != null; private long lastPresent; private List maxes = new List(); private int slashBrightness = 0; private SlashMode slashMode; public AniMatrixControl(SettingsForm settingsForm) { settings = settingsForm; if (!AppConfig.IsSlash() && !AppConfig.IsAnimeMatrix()) return; try { if (AppConfig.IsSlash()) { if (AppConfig.IsSlashAura()) deviceSlash = new SlashDeviceAura(); else deviceSlash = new SlashDevice(); } else { deviceMatrix = new AnimeMatrixDevice(); } matrixTimer = new System.Timers.Timer(100); matrixTimer.Elapsed += MatrixTimer_Elapsed; } catch (Exception ex) { Logger.WriteLine(ex.Message); } } public void SetDevice(bool wakeUp = false) { if (deviceMatrix is not null) SetMatrix(wakeUp); if (deviceSlash is not null) SetSlash(wakeUp); } public void SetSlash(bool wakeUp = false) { if (deviceSlash is null) return; int brightness = AppConfig.Get("matrix_brightness", 0); int running = AppConfig.Get("matrix_running", 0); int inteval = AppConfig.Get("matrix_interval", 0); bool auto = AppConfig.Is("matrix_auto"); bool lid = AppConfig.Is("matrix_lid"); StopAudio(); Task.Run(() => { try { deviceSlash.SetProvider(); } catch (Exception ex) { Logger.WriteLine(ex.Message); return; } if (wakeUp) _wakeUp = true; if (brightness == 0 || (auto && SystemInformation.PowerStatus.PowerLineStatus != PowerLineStatus.Online) || (lid && lidClose)) { deviceSlash.SetSleepActive(false); deviceSlash.SetEnabled(false); //deviceSlash.Init(); //deviceSlash.SetOptions(false, 0, 0); } else { if (_wakeUp) { deviceSlash.WakeUp(); _wakeUp = false; } deviceSlash.SetEnabled(true); deviceSlash.Init(); switch ((SlashMode)running) { case SlashMode.Static: var custom = AppConfig.GetString("slash_custom"); if (custom is not null && custom.Length > 0) { Logger.WriteLine("Slash: Static"); deviceSlash.SetCustom(AppConfig.StringToBytes(custom)); } else { deviceSlash.SetMode((SlashMode)running); deviceSlash.SetOptions(true, brightness, inteval); deviceSlash.Save(); } break; case SlashMode.BatteryLevel: // call tick to immediately update the pattern Logger.WriteLine("Slash: Battery Level"); SlashTimer_start(); SlashTimer_tick(); break; case SlashMode.Audio: case SlashMode.AudioSpectrum: slashMode = (SlashMode)running; Logger.WriteLine("Slash: Audio"); SetAudio(); break; default: deviceSlash.SetMode((SlashMode)running); deviceSlash.SetOptions(true, brightness, inteval); deviceSlash.Save(); break; } // kill the timer if we are not displaying battery pattern deviceSlash.SetSleepActive(AppConfig.IsNotFalse("slash_sleep")); } }); } public void SetLidMode(bool force = false) { bool matrixLid = AppConfig.Is("matrix_lid"); if (deviceSlash is not null) { deviceSlash.SetLidCloseAnimation(!matrixLid && !AppConfig.Is("slash_sleep")); } if (matrixLid || force) { Logger.WriteLine($"Matrix LidClosed: {lidClose}"); SetDevice(true); } } public void SetBatteryAuto() { if (deviceSlash is not null) { bool auto = AppConfig.Is("matrix_auto"); deviceSlash.SetBatterySaver(auto); if (!auto) SetSlash(); } if (deviceMatrix is not null) SetMatrix(); } public void SetMatrix(bool wakeUp = false) { if (deviceMatrix is null) return; int brightness = AppConfig.Get("matrix_brightness", 0); int running = AppConfig.Get("matrix_running", 0); bool auto = AppConfig.Is("matrix_auto"); bool lid = AppConfig.Is("matrix_lid"); StopMatrixTimer(); StopAudio(); Task.Run(() => { try { deviceMatrix.SetProvider(); } catch (Exception ex) { Logger.WriteLine(ex.Message); return; } if (wakeUp) deviceMatrix.WakeUp(); if (brightness == 0 || (auto && SystemInformation.PowerStatus.PowerLineStatus != PowerLineStatus.Online) || (lid && lidClose)) { deviceMatrix.SetDisplayState(false); deviceMatrix.SetDisplayState(false); // some devices are dumb Logger.WriteLine("Matrix Off"); } else { if (wakeUp) deviceMatrix.WakeUp(); deviceMatrix.SetDisplayState(true); deviceMatrix.SetBrightness((BrightnessMode)brightness); switch (running) { case 2: SetMatrixPicture(AppConfig.GetString("matrix_picture"), false); break; case 3: SetMatrixClock(); break; case 4: SetAudio(); break; default: SetBuiltIn(running); break; } } }); } private void SetBuiltIn(int running) { BuiltInAnimation animation = new BuiltInAnimation( (BuiltInAnimation.Running)running, (BuiltInAnimation.Sleeping)AppConfig.Get("matrix_sleep", (int)BuiltInAnimation.Sleeping.Starfield), (BuiltInAnimation.Shutdown)AppConfig.Get("matrix_shutdown", (int)BuiltInAnimation.Shutdown.SeeYa), (BuiltInAnimation.Startup)AppConfig.Get("matrix_startup", (int)BuiltInAnimation.Startup.StaticEmergence) ); deviceMatrix.SetBuiltInAnimation(true, animation); Logger.WriteLine("Matrix builtin: " + animation.AsByte); } private void StartMatrixTimer(int interval = 100) { matrixTimer.Interval = interval; matrixTimer.Start(); } private void StopMatrixTimer() { matrixTimer.Stop(); } private void MatrixTimer_Elapsed(object? sender, ElapsedEventArgs e) { if (deviceMatrix is null) return; switch (AppConfig.Get("matrix_running")) { case 2: deviceMatrix.PresentNextFrame(); break; case 3: deviceMatrix.PresentClock(); break; } } public void SetMatrixClock() { deviceMatrix.SetBuiltInAnimation(false); StartMatrixTimer(1000); Logger.WriteLine("Matrix Clock"); } private void SlashTimer_start(int interval = 180000) { // 100% to 0% in 1hr = 1% every 36 seconds // 1 bracket every 14.2857 * 36s = 514s ~ 8m 30s // only ~5 actually distinguishable levels, so refresh every <= 514/5 ~ 100s // default is 60s // create the timer if first call // this way, the timer only spawns if user tries to use battery pattern if (slashTimer == default(System.Timers.Timer)) { slashTimer = new System.Timers.Timer(interval); slashTimer.Elapsed += SlashTimer_elapsed; slashTimer.AutoReset = true; } // only write if interval changed if (slashTimer.Interval != interval) { slashTimer.Interval = interval; } slashTimer.Start(); } private void SlashTimer_elapsed(object? sender, ElapsedEventArgs e) { SlashTimer_tick(); } private void SlashTimer_tick() { if (deviceSlash is null) return; //kill timer if called but not in battery pattern mode if ((SlashMode)AppConfig.Get("matrix_running", 0) != SlashMode.BatteryLevel) { slashTimer.Stop(); slashTimer.Dispose(); return; } deviceSlash.SetBatteryPattern(AppConfig.Get("matrix_brightness", 0)); } public void Dispose() { StopAudio(); } void StopAudio() { lock (_audioLock) { _stoppingAudio = true; _listeningToAudio = false; if (AudioDeviceEnum is not null) { try { AudioDeviceEnum.UnregisterEndpointNotificationCallback(this); } catch (Exception ex) { Logger.WriteLine("UnregisterEndpointNotificationCallback failed: " + ex); } } if (AudioDevice is not null) { try { AudioDevice.DataAvailable -= WaveIn_DataAvailable; AudioDevice.StopRecording(); AudioDevice.Dispose(); } catch (Exception ex) { Logger.WriteLine(ex.ToString()); } AudioDevice = null; } AudioDeviceId = null; if (AudioDeviceEnum is not null) { try { AudioDeviceEnum.Dispose(); } catch { /* ignore */ } AudioDeviceEnum = null; } _stoppingAudio = false; } } void SetAudio() { if (deviceMatrix is not null) deviceMatrix.SetBuiltInAnimation(false); else if (deviceSlash is not null) deviceSlash.SetEmpty(); else return; StopAudio(); slashBrightness = AppConfig.Get("matrix_brightness", 0); lock (_audioLock) { _stoppingAudio = false; _listeningToAudio = true; try { AudioDeviceEnum = new MMDeviceEnumerator(); AudioDeviceEnum.RegisterEndpointNotificationCallback(this); using (MMDevice device = AudioDeviceEnum.GetDefaultAudioEndpoint(DataFlow.Render, Role.Console)) { AudioDevice = new WasapiLoopbackCapture(device); AudioDeviceId = device.ID; var fmt = AudioDevice.WaveFormat; AudioValues = new double[fmt.SampleRate / 1000]; AudioDevice.DataAvailable += WaveIn_DataAvailable; AudioDevice.StartRecording(); } Logger.WriteLine("Subscribed to Audio"); } catch (Exception ex) { Logger.WriteLine(ex.ToString()); _listeningToAudio = false; } } } private void WaveIn_DataAvailable(object? sender, WaveInEventArgs e) { int bytesPerSamplePerChannel = AudioDevice.WaveFormat.BitsPerSample / 8; int bytesPerSample = bytesPerSamplePerChannel * AudioDevice.WaveFormat.Channels; int bufferSampleCount = e.Buffer.Length / bytesPerSample; if (bufferSampleCount >= AudioValues.Length) { bufferSampleCount = AudioValues.Length; } if (bytesPerSamplePerChannel == 2 && AudioDevice.WaveFormat.Encoding == WaveFormatEncoding.Pcm) { for (int i = 0; i < bufferSampleCount; i++) AudioValues[i] = BitConverter.ToInt16(e.Buffer, i * bytesPerSample); } else if (bytesPerSamplePerChannel == 4 && AudioDevice.WaveFormat.Encoding == WaveFormatEncoding.Pcm) { for (int i = 0; i < bufferSampleCount; i++) AudioValues[i] = BitConverter.ToInt32(e.Buffer, i * bytesPerSample); } else if (bytesPerSamplePerChannel == 4 && AudioDevice.WaveFormat.Encoding == WaveFormatEncoding.IeeeFloat) { for (int i = 0; i < bufferSampleCount; i++) AudioValues[i] = BitConverter.ToSingle(e.Buffer, i * bytesPerSample); } double[] paddedAudio = FftSharp.Pad.ZeroPad(AudioValues); var fft = FftSharp.FFT.Forward(paddedAudio); double[] fftMag = FftSharp.FFT.Magnitude(fft); PresentAudio(fftMag); } void PresentAudio(double[] audio) { if (deviceMatrix is null && deviceSlash is null) return; if (Math.Abs(DateTimeOffset.Now.ToUnixTimeMilliseconds() - lastPresent) < 30) return; lastPresent = DateTimeOffset.Now.ToUnixTimeMilliseconds(); int size = 20; double[] bars = new double[size]; double max = 2, maxAverage; for (int i = 0; i < size; i++) { bars[i] = Math.Sqrt(audio[i] * 10000); if (bars[i] > max) max = bars[i]; } maxes.Add(max); if (maxes.Count > 20) maxes.RemoveAt(0); maxAverage = maxes.Average(); if (deviceMatrix is not null) { deviceMatrix.Clear(); for (int i = 0; i < size; i++) deviceMatrix.DrawBar(20 - i, bars[i] * 20 / maxAverage); deviceMatrix.Present(); } if (deviceSlash is not null) { if (slashMode == SlashMode.Audio) { var bassLevel = 30 * (bars[0] + bars[1]) / maxAverage; deviceSlash.SetAudioPattern(slashBrightness, bassLevel, 10 * (bars[3] + bars[4] + bars[5] + bars[6]) / maxAverage); //Program.settingsForm.VisualiseAudio(bassLevel); } else { var payload = new byte[7]; for (int i = 0; i < 7; i++) payload[6-i] = (byte)(Math.Min(255, Math.Pow((bars[2 * i] + bars[2 * i + 1]) / 2 / maxAverage, 2) * 0x8F)); deviceSlash.ContinueCustom(payload, null); } } } public void OpenMatrixPicture() { string fileName = null; Thread t = new Thread(() => { OpenFileDialog of = new OpenFileDialog(); of.Filter = "Image Files (*.bmp;*.jpg;*.jpeg,*.png,*.gif)|*.BMP;*.JPG;*.JPEG;*.PNG;*.GIF"; if (of.ShowDialog() == DialogResult.OK) { fileName = of.FileName; } return; }); t.SetApartmentState(ApartmentState.STA); t.Start(); t.Join(); if (fileName is not null) { AppConfig.Set("matrix_picture", fileName); AppConfig.Set("matrix_running", 2); SetMatrixPicture(fileName); settings.VisualiseMatrixRunning(2); } } public void SetMatrixPicture(string fileName, bool visualise = true) { if (deviceMatrix is null) return; StopMatrixTimer(); try { using (var fs = new FileStream(fileName, FileMode.Open)) //using (var ms = new MemoryStream()) { /* ms.SetLength(0); fs.CopyTo(ms); ms.Position = 0; */ using (Image image = Image.FromStream(fs)) { ProcessPicture(image); Logger.WriteLine("Matrix " + fileName); } fs.Close(); if (visualise) settings.VisualiseMatrixPicture(fileName); } } catch { Debug.WriteLine("Error loading picture"); return; } } protected void ProcessPicture(Image image) { deviceMatrix.SetBuiltInAnimation(false); deviceMatrix.ClearFrames(); int matrixX = AppConfig.Get("matrix_x", 0); int matrixY = AppConfig.Get("matrix_y", 0); int matrixZoom = AppConfig.Get("matrix_zoom", 100); int matrixContrast = AppConfig.Get("matrix_contrast", 100); int matrixGamma = AppConfig.Get("matrix_gamma", 0); int matrixSpeed = AppConfig.Get("matrix_speed", 50); MatrixRotation rotation = (MatrixRotation)AppConfig.Get("matrix_rotation", 0); InterpolationMode matrixQuality = (InterpolationMode)AppConfig.Get("matrix_quality", 0); FrameDimension dimension = new FrameDimension(image.FrameDimensionsList[0]); int frameCount = image.GetFrameCount(dimension); if (frameCount > 1) { var delayPropertyBytes = image.GetPropertyItem(0x5100).Value; var frameDelay = BitConverter.ToInt32(delayPropertyBytes) * 10; for (int i = 0; i < frameCount; i++) { image.SelectActiveFrame(dimension, i); if (rotation == MatrixRotation.Planar) deviceMatrix.GenerateFrame(image, matrixZoom, matrixX, matrixY, matrixQuality, matrixContrast, matrixGamma); else deviceMatrix.GenerateFrameDiagonal(image, matrixZoom, matrixX, matrixY, matrixQuality, matrixContrast, matrixGamma); deviceMatrix.AddFrame(); } Logger.WriteLine("GIF Delay:" + frameDelay); StartMatrixTimer(Math.Max(matrixSpeed, frameDelay)); //image.SelectActiveFrame(dimension, 0); } else { if (rotation == MatrixRotation.Planar) deviceMatrix.GenerateFrame(image, matrixZoom, matrixX, matrixY, matrixQuality, matrixContrast, matrixGamma); else deviceMatrix.GenerateFrameDiagonal(image, matrixZoom, matrixX, matrixY, matrixQuality, matrixContrast, matrixGamma); deviceMatrix.Present(); } } public void OnDeviceStateChanged(string deviceId, DeviceState newState) { } public void OnDeviceAdded(string pwstrDeviceId) { } public void OnDeviceRemoved(string deviceId) { } public void OnDefaultDeviceChanged(DataFlow flow, Role role, string defaultDeviceId) { if (!_listeningToAudio) return; if (_stoppingAudio) return; int running = AppConfig.Get("matrix_running"); if (flow != DataFlow.Render || role != Role.Console || running != 4) return; var currentId = AudioDeviceId; if (!string.IsNullOrEmpty(currentId) && currentId == defaultDeviceId) return; //Restart audio if default audio changed Logger.WriteLine("Matrix Audio: Default Output changed to " + defaultDeviceId); //Already set the device here. Otherwise this will be called multiple times in a short succession and causes a crash due to dispose during initalization. AudioDeviceId = defaultDeviceId; Task.Delay(50).ContinueWith(_ => { if (!_listeningToAudio) return; SetMatrix(); }); } public void OnPropertyValueChanged(string pwstrDeviceId, PropertyKey key) { } } } ================================================ FILE: app/AnimeMatrix/AnimeMatrixDevice.cs ================================================ // Source thanks to https://github.com/vddCore/Starlight with some adjustments from me using GHelper.AnimeMatrix.Communication; using System.Drawing.Drawing2D; using System.Drawing.Text; using System.Text; namespace GHelper.AnimeMatrix { public class BuiltInAnimation { public enum Startup { GlitchConstruction, StaticEmergence } public enum Shutdown { GlitchOut, SeeYa } public enum Sleeping { BannerSwipe, Starfield } public enum Running { BinaryBannerScroll, RogLogoGlitch } public byte AsByte { get; } public BuiltInAnimation( Running running, Sleeping sleeping, Shutdown shutdown, Startup startup ) { AsByte |= (byte)(((int)running & 0x01) << 0); AsByte |= (byte)(((int)sleeping & 0x01) << 1); AsByte |= (byte)(((int)shutdown & 0x01) << 2); AsByte |= (byte)(((int)startup & 0x01) << 3); } } public enum MatrixRotation { Planar, Diagonal } internal class AnimeMatrixPacket : Packet { public AnimeMatrixPacket(byte[] command) : base(0x5E, 640, command) { } } public enum AnimeType { GA401, GA402, GU604, STRIX } public enum BrightnessMode : byte { Off = 0, Dim = 1, Medium = 2, Full = 3 } public class AnimeMatrixDevice : Device { int UpdatePageLength = 490; int LedCount = 1450; byte[] _displayBuffer; List frames = new List(); public int MaxRows = 61; public int MaxColumns = 34; public int LedStart = 0; public int FullRows = 11; private int frameIndex = 0; private static AnimeType _model = AnimeType.GA402; [System.Runtime.InteropServices.DllImport("gdi32.dll")] private static extern IntPtr AddFontMemResourceEx(IntPtr pbFont, uint cbFont, IntPtr pdv, [System.Runtime.InteropServices.In] ref uint pcFonts); private PrivateFontCollection fonts = new PrivateFontCollection(); public AnimeMatrixDevice() : base(0x0B05, 0x193B, 640) { if (AppConfig.ContainsModel("401")) { _model = AnimeType.GA401; MaxColumns = 33; MaxRows = 55; LedCount = 1245; UpdatePageLength = 410; FullRows = 5; LedStart = 1; } if (AppConfig.ContainsModel("GU604")) { _model = AnimeType.GU604; MaxColumns = 39; MaxRows = 92; LedCount = 1711; UpdatePageLength = 630; FullRows = 9; } if (AppConfig.ContainsModel("G635") || AppConfig.ContainsModel("G615") || AppConfig.ContainsModel("G835") || AppConfig.ContainsModel("G815")) { _model = AnimeType.STRIX; MaxColumns = 34; MaxRows = 68; LedCount = 810; UpdatePageLength = 490; FullRows = 29; } _displayBuffer = new byte[LedCount]; LoadMFont(); } public void WakeUp() { Set(Packet(Encoding.ASCII.GetBytes("ASUS Tech.Inc."))); } public void SetBrightness(BrightnessMode mode) { Set(Packet(0xC0, 0x04, (byte)mode)); } public void SetDisplayState(bool enable) { Set(Packet(0xC3, 0x01, enable ? (byte)0x00 : (byte)0x80)); } public void SetBuiltInAnimation(bool enable) { Set(Packet(0xC4, 0x01, enable ? (byte)0x00 : (byte)0x80)); } public void SetBuiltInAnimation(bool enable, BuiltInAnimation animation) { SetBuiltInAnimation(enable); Set(Packet(0xC5, animation.AsByte)); } public void Present() { int page = 0; int start, end; while (page * UpdatePageLength < LedCount) { start = page * UpdatePageLength; end = Math.Min(LedCount, (page + 1) * UpdatePageLength); Set(Packet(0xC0, 0x02) .AppendData(BitConverter.GetBytes((ushort)(start + 1))) .AppendData(BitConverter.GetBytes((ushort)(end - start))) .AppendData(_displayBuffer[start..end]) ); page++; } Set(Packet(0xC0, 0x03)); } private void LoadMFont() { byte[] fontData = GHelper.Properties.Resources.MFont; IntPtr fontPtr = System.Runtime.InteropServices.Marshal.AllocCoTaskMem(fontData.Length); System.Runtime.InteropServices.Marshal.Copy(fontData, 0, fontPtr, fontData.Length); uint dummy = 0; fonts.AddMemoryFont(fontPtr, GHelper.Properties.Resources.MFont.Length); AddFontMemResourceEx(fontPtr, (uint)GHelper.Properties.Resources.MFont.Length, IntPtr.Zero, ref dummy); System.Runtime.InteropServices.Marshal.FreeCoTaskMem(fontPtr); } public void PresentNextFrame() { if (frameIndex >= frames.Count) frameIndex = 0; _displayBuffer = frames[frameIndex]; Present(); frameIndex++; } public void ClearFrames() { frames.Clear(); frameIndex = 0; } public void AddFrame() { frames.Add(_displayBuffer.ToArray()); } public int Width(int y) { switch (_model) { case AnimeType.GA401: return 33; case AnimeType.GU604: return 39; case AnimeType.STRIX: return 1 + y / 2; default: return 34; } } public int FirstX(int y) { switch (_model) { case AnimeType.GA401: if (y < 5 && y % 2 == 0) { return 1; } return (int)Math.Ceiling(Math.Max(0, y - FullRows) / 2F); case AnimeType.GU604: if (y < 9 && y % 2 == 0) { return 1; } return (int)Math.Ceiling(Math.Max(0, y - FullRows) / 2F); default: return (int)Math.Ceiling(Math.Max(0, y - FullRows) / 2F); } } public int Pitch(int y) { switch (_model) { case AnimeType.GA401: switch (y) { case 0: case 2: case 4: return 33; case 1: case 3: return 35; default: return 36 - y / 2; } case AnimeType.GU604: switch (y) { case 0: case 2: case 4: case 6: case 8: return 38; case 1: case 3: case 5: case 7: case 9: return 39; default: return Width(y) - FirstX(y); } default: return Width(y) - FirstX(y); } } public int RowToLinearAddress(int y) { int ret = LedStart; for (var i = 0; i < y; i++) ret += Pitch(i); return ret; } public void SetLedPlanar(int x, int y, byte value) { if (!IsRowInRange(y)) return; if (x >= FirstX(y) && x < Width(y)) SetLedLinear(RowToLinearAddress(y) - FirstX(y) + x, value); } public void SetLedDiagonal(int x, int y, byte color, int deltaX = 0, int deltaY = 0) { x += deltaX; y -= deltaY; int plX = (x - y) / 2; int plY = x + y; if (x - y == -1) plX = -1; SetLedPlanar(plX, plY, color); } public void SetLedLinear(int address, byte value) { if (!IsAddressableLed(address)) return; _displayBuffer[address] = value; } public void Clear(bool present = false) { for (var i = 0; i < _displayBuffer.Length; i++) _displayBuffer[i] = 0; if (present) Present(); } private void SetBitmapDiagonal(Bitmap bmp, int deltaX = 0, int deltaY = 0, int contrast = 100, int gamma = 0) { for (int y = 0; y < bmp.Height; y++) { for (int x = 0; x < bmp.Width; x++) { var pixel = bmp.GetPixel(x, y); var color = Math.Min((pixel.R + pixel.G + pixel.B + gamma) * contrast / 300, 255); if (color > 20) SetLedDiagonal(x, y, (byte)color, deltaX, deltaY - (FullRows / 2) - 1); } } } private void SetBitmapLinear(Bitmap bmp, int contrast = 100, int gamma = 0) { for (int y = 0; y < bmp.Height; y++) { for (int x = 0; x < bmp.Width; x++) if (x % 2 == y % 2) { var pixel = bmp.GetPixel(x, y); var color = Math.Min((pixel.R + pixel.G + pixel.B + gamma) * contrast / 300, 255); if (color > 20) SetLedPlanar(x / 2, y, (byte)color); } } } public void Text(string text, float fontSize = 10, int x = 0, int y = 0) { int width = MaxRows; int height = MaxRows - FullRows; int textHeight, textWidth; using (Bitmap bmp = new Bitmap(width, height)) { using (Graphics g = Graphics.FromImage(bmp)) { g.CompositingQuality = CompositingQuality.HighQuality; g.SmoothingMode = SmoothingMode.AntiAlias; g.TextRenderingHint = TextRenderingHint.SingleBitPerPixel; using (Font font = new Font(fonts.Families[0], fontSize, FontStyle.Regular, GraphicsUnit.Pixel)) { SizeF textSize = g.MeasureString(text, font); textHeight = (int)textSize.Height; textWidth = (int)textSize.Width; g.DrawString(text, font, Brushes.White, x, height - y); } } SetBitmapDiagonal(bmp, 5, height); } } public void PresentClock() { string timeFormat = AppConfig.GetString("matrix_time", "HH:mm"); string dateFormat = AppConfig.GetString("matrix_date", "yy.MM.dd"); if (DateTime.Now.Second % 2 != 0) timeFormat = timeFormat.Replace(":", " "); Clear(); switch (_model) { case AnimeType.STRIX: //case AnimeType.GA402: Text(DateTime.Now.ToString(timeFormat), 15, 4, 20); break; default: Text(DateTime.Now.ToString(timeFormat), 15, 7 - FullRows / 2, 25); Text(DateTime.Now.ToString(dateFormat), 11.5F, 0, 14); break; } Present(); } public void DrawBar(int pos, double h) { switch (_model) { //case AnimeType.GA402: case AnimeType.STRIX: DrawBarDiagonal(pos, h); break; default: DrawBarPlanar(pos, h); break; } } public void DrawBarPlanar(int pos, double h) { int dx = pos * 2; int dy = 20; byte color; for (int y = 0; y < h - (h % 2); y++) for (int x = 0; x < 2 - (y % 2); x++) { //color = (byte)(Math.Min(1,(h - y - 2)*2) * 255); SetLedPlanar(x + dx, dy + y, (byte)(h * 255 / 30)); SetLedPlanar(x + dx, dy - y, 255); } } public void DrawBarDiagonal(int pos, double h) { int dx = pos * 2; int dy = 0; byte color; for (int y = 0; y < h/2 ; y++) for (int x = 0; x < 2 ; x++) { color = (byte)(Math.Min(1, (h - y - 2) * 2) * 255); SetLedDiagonal(x + dx, dy - y, (byte)(h * 255 / 30), 10, -(FullRows/2)); } } public void GenerateFrame(Image image, float zoom = 100, int panX = 0, int panY = 0, InterpolationMode quality = InterpolationMode.Default, int contrast = 100, int gamma = 0) { int width = MaxColumns / 2 * 6; int height = MaxRows; int targetWidth = MaxColumns * 2; float scale; using (Bitmap bmp = new Bitmap(targetWidth, height)) { scale = Math.Min((float)width / (float)image.Width, (float)height / (float)image.Height) * zoom / 100; using (var graph = Graphics.FromImage(bmp)) { var scaleWidth = (float)(image.Width * scale); var scaleHeight = (float)(image.Height * scale); graph.InterpolationMode = quality; graph.CompositingQuality = CompositingQuality.HighQuality; graph.SmoothingMode = SmoothingMode.AntiAlias; graph.DrawImage(image, (float)Math.Round(targetWidth - (scaleWidth + panX) * targetWidth / width), -panY, (float)Math.Round(scaleWidth * targetWidth / width), scaleHeight); } Clear(); SetBitmapLinear(bmp, contrast, gamma); } } public void GenerateFrameDiagonal(Image image, float zoom = 100, int panX = 0, int panY = 0, InterpolationMode quality = InterpolationMode.Default, int contrast = 100, int gamma = 0) { int width = MaxRows + FullRows; int height = MaxColumns + FullRows; if ((image.Height / image.Width) > (height / width)) height = MaxColumns; float scale; using (Bitmap bmp = new Bitmap(width, height)) { scale = Math.Min((float)width / (float)image.Width, (float)height / (float)image.Height) * zoom / 100; using (var graph = Graphics.FromImage(bmp)) { var scaleWidth = (float)(image.Width * scale); var scaleHeight = (float)(image.Height * scale); graph.InterpolationMode = quality; graph.CompositingQuality = CompositingQuality.HighQuality; graph.SmoothingMode = SmoothingMode.AntiAlias; graph.DrawImage(image, (width - scaleWidth) / 2, height - scaleHeight, scaleWidth, scaleHeight); } Clear(); SetBitmapDiagonal(bmp, -panX, height + panY, contrast, gamma); } } private bool IsRowInRange(int row) { return (row >= 0 && row < MaxRows); } private bool IsAddressableLed(int address) { return (address >= 0 && address < LedCount); } } } ================================================ FILE: app/AnimeMatrix/Communication/Device.cs ================================================ // Source thanks to https://github.com/vddCore/Starlight :) using GHelper.AnimeMatrix.Communication.Platform; namespace GHelper.AnimeMatrix.Communication { public abstract class Device : IDisposable { protected UsbProvider? _usbProvider; protected ushort _vendorId; protected ushort _productId; protected int _maxFeatureReportLength; protected Device(ushort vendorId, ushort productId) { _vendorId = vendorId; _productId = productId; } protected Device(ushort vendorId, ushort productId, int maxFeatureReportLength) { _vendorId = vendorId; _productId = productId; _maxFeatureReportLength = maxFeatureReportLength; SetProvider(); } public ushort VendorID() { return _vendorId; } public ushort ProductID() { return _productId; } public virtual void SetProvider() { _usbProvider = new WindowsUsbProvider(_vendorId, _productId, _maxFeatureReportLength); } protected T Packet(params byte[] command) where T : Packet { return (T)Activator.CreateInstance(typeof(T), command)!; } public void Set(Packet packet) => _usbProvider?.Set(packet.Data); public byte[] Get(Packet packet) => _usbProvider?.Get(packet.Data); public void Read(byte[] data) => _usbProvider?.Read(data); public void Write(byte[] data) => _usbProvider?.Write(data); public virtual void Dispose() { _usbProvider?.Dispose(); } } } ================================================ FILE: app/AnimeMatrix/Communication/Packet.cs ================================================ // Source thanks to https://github.com/vddCore/Starlight :) namespace GHelper.AnimeMatrix.Communication { public abstract class Packet { private int _currentDataIndex = 1; public byte[] Data { get; } internal Packet(byte reportId, int packetLength, params byte[] data) { if (packetLength < 1) { throw new ArgumentOutOfRangeException( nameof(packetLength), "Packet length must be at least 1." ); } Data = new byte[packetLength]; Data[0] = reportId; if (data.Length > 0) { if (_currentDataIndex >= Data.Length) { throw new ArgumentOutOfRangeException( nameof(data), "Your packet length does not allow for initial data to be appended." ); } AppendData(data); } } public Packet AppendData(params byte[] data) => AppendData(out _, data); public Packet AppendData(out int bytesWritten, params byte[] data) { bytesWritten = 0; for (var i = 0; i < data.Length && _currentDataIndex < Data.Length - 1; i++, bytesWritten++, _currentDataIndex++) { if (_currentDataIndex > Data.Length - 1) break; Data[_currentDataIndex] = data[i]; } return this; } } } ================================================ FILE: app/AnimeMatrix/Communication/Platform/UsbProvider.cs ================================================ namespace GHelper.AnimeMatrix.Communication.Platform { public abstract class UsbProvider : IDisposable { protected ushort VendorID { get; } protected ushort ProductID { get; } protected UsbProvider(ushort vendorId, ushort productId) { VendorID = vendorId; ProductID = productId; } public abstract void Set(byte[] data); public abstract byte[] Get(byte[] data); public abstract void Read(byte[] data); public abstract void Write(byte[] data); public abstract void Dispose(); } } ================================================ FILE: app/AnimeMatrix/Communication/Platform/WindowsUsbProvider.cs ================================================ using System.ComponentModel; using HidSharp; namespace GHelper.AnimeMatrix.Communication.Platform { internal class WindowsUsbProvider : UsbProvider { protected HidDevice HidDevice { get; } protected HidStream HidStream { get; } public WindowsUsbProvider(ushort vendorId, ushort productId, string path, int timeout = 500) : base(vendorId, productId) { try { HidDevice = DeviceList.Local.GetHidDevices(vendorId, productId) .First(x => x.DevicePath.Contains(path)); } catch { throw new IOException("HID device was not found on your machine."); } var config = new OpenConfiguration(); config.SetOption(OpenOption.Interruptible, true); config.SetOption(OpenOption.Exclusive, false); config.SetOption(OpenOption.Priority, 10); HidStream = HidDevice.Open(config); HidStream.ReadTimeout = timeout; HidStream.WriteTimeout = timeout; } public WindowsUsbProvider(ushort vendorId, ushort productId, int maxFeatureReportLength) : base(vendorId, productId) { try { HidDevice = DeviceList.Local .GetHidDevices(vendorId, productId) .First(x => x.GetMaxFeatureReportLength() >= maxFeatureReportLength); Logger.WriteLine("Matrix Device: " + HidDevice.DevicePath + " " + HidDevice.GetMaxFeatureReportLength()); } catch { throw new IOException("Matrix control device was not found on your machine."); } var config = new OpenConfiguration(); config.SetOption(OpenOption.Interruptible, true); config.SetOption(OpenOption.Exclusive, false); config.SetOption(OpenOption.Priority, 10); HidStream = HidDevice.Open(config); } public override void Set(byte[] data) { WrapException(() => { HidStream.SetFeature(data); HidStream.Flush(); }); } public override byte[] Get(byte[] data) { var outData = new byte[data.Length]; Array.Copy(data, outData, data.Length); WrapException(() => { HidStream.GetFeature(outData); HidStream.Flush(); }); return data; } public override void Read(byte[] data) { WrapException(() => { HidStream.Read(data); }); } public override void Write(byte[] data) { WrapException(() => { HidStream.Write(data); HidStream.Flush(); }); } public override void Dispose() { HidStream.Dispose(); } private void WrapException(Action action) { try { action(); } catch (IOException e) { if (e.InnerException is Win32Exception w32e) { if (w32e.NativeErrorCode != 0) { throw; } } } } } } ================================================ FILE: app/AnimeMatrix/SlashDevice.cs ================================================ using GHelper.AnimeMatrix.Communication; using System.Management; using System.Text; namespace GHelper.AnimeMatrix { public enum SlashMode { Bounce, Slash, Loading, BitStream, Transmission, Flow, Flux, Phantom, Spectrum, Hazard, Interfacing, Ramp, GameOver, Start, Buzzer, Static, FX1, FX2, FX3, BatteryLevel, Audio, AudioSpectrum } public class SlashPacket : Packet { public SlashPacket(byte[] command, byte reportID = 0x5E) : base(reportID, 128, command) { } } public class SlashDevice : Device { protected virtual byte reportID => 0x5E; protected virtual SlashPacket CreatePacket(byte[] command) { return new SlashPacket(command, reportID); } public static Dictionary Modes = new Dictionary { { SlashMode.Bounce, Properties.Strings.SlashBounce}, { SlashMode.Slash, Properties.Strings.SlashMode}, { SlashMode.Loading, Properties.Strings.SlashLoading}, { SlashMode.BitStream, Properties.Strings.SlashBitStream}, { SlashMode.Transmission, Properties.Strings.SlashTransmission}, { SlashMode.Flow, Properties.Strings.SlashFlow}, { SlashMode.Flux, Properties.Strings.SlashFlux}, { SlashMode.Phantom, Properties.Strings.SlashPhantom}, { SlashMode.Spectrum, Properties.Strings.SlashSpectrum}, { SlashMode.Hazard, Properties.Strings.SlashHazard}, { SlashMode.Interfacing, Properties.Strings.SlashInterfacing}, { SlashMode.Ramp, Properties.Strings.SlashRamp}, { SlashMode.GameOver, Properties.Strings.SlashGameOver}, { SlashMode.Start, Properties.Strings.SlashStart}, { SlashMode.Buzzer, Properties.Strings.SlashBuzzer}, { SlashMode.Static, Properties.Strings.SlashStatic}, { SlashMode.FX1, "FX1"}, { SlashMode.FX2, "FX2"}, { SlashMode.FX3, "FX3"}, { SlashMode.BatteryLevel, Properties.Strings.SlashBatteryLevel}, { SlashMode.Audio, Properties.Strings.MatrixAudio} }; private static Dictionary modeCodes = new Dictionary { { SlashMode.Static, 0x06}, { SlashMode.Bounce, 0x10}, { SlashMode.Slash, 0x12}, { SlashMode.Loading, 0x13}, { SlashMode.BitStream, 0x1D}, { SlashMode.Transmission, 0x1A}, { SlashMode.Flow, 0x19}, { SlashMode.Flux, 0x25}, { SlashMode.Phantom, 0x24}, { SlashMode.Spectrum, 0x26}, { SlashMode.Hazard, 0x32}, { SlashMode.Interfacing, 0x33}, { SlashMode.Ramp, 0x34}, { SlashMode.GameOver, 0x42}, { SlashMode.Start, 0x43}, { SlashMode.Buzzer, 0x44}, { SlashMode.FX1, 0x60}, { SlashMode.FX2, 0x61}, { SlashMode.FX3, 0x62}, }; public SlashDevice(ushort productId = 0x193B) : base(0x0B05, productId, 128) { } public void WakeUp() { Set(CreatePacket(Encoding.ASCII.GetBytes("ASUS Tech.Inc.")), "SlashWakeUp"); Set(CreatePacket([0xC2]), "SlashWakeUp"); Set(CreatePacket([0xD1, 0x01, 0x00, 0x01 ]), "SlashWakeUp"); } public void Init() { Set(CreatePacket([0xD7, 0x00, 0x00, 0x01, 0xAC]), "SlashInit"); Set(CreatePacket([0xD2, 0x02, 0x01, 0x08, 0xAB]), "SlashInit"); } public void SetEnabled(bool status = true) { Set(CreatePacket([0xD8, 0x02, 0x00, 0x01, status ? (byte)0x00 : (byte)0x80]), $"SlashEnable {status}"); } public void Save() { Set(CreatePacket([0xD4, 0x00, 0x00, 0x01, 0xAB]), "SlashSave"); } public void SetMode(SlashMode mode) { byte modeByte; try { modeByte = modeCodes[mode]; } catch (Exception) { modeByte = 0x00; } Set(CreatePacket([0xD2, 0x03, 0x00, 0x0C]), "SlashMode"); //Set(CreatePacket([0xD3, 0x04, 0x00, 0x0C, 0x01, modeByte, 0x02, 0x19, 0x03, 0x13, 0x04, 0x11, 0x05, 0x12, 0x06, 0x13]), "SlashMode"); Set(CreatePacket([0xD3, 0x04, 0x00, 0x0C, 0x01, modeByte, 0x02, 0x42, 0x03, 0x13, 0x04, 0x11, 0x05, 0x12, 0x06, 0x13]), "SlashMode"); } private byte[] GetPercentagePattern(int brightness, double percentage) { // because 7 segments, within each led segment represents a percentage bracket of (100/7 = 14.2857%) // set brightness to reflect battery's percentage within that range int bracket = (int)Math.Floor(percentage / 14.2857); if (bracket >= 7) return Enumerable.Repeat((byte)(brightness * 85.333), 7).ToArray(); byte[] batteryPattern = Enumerable.Repeat((byte)(0x00), 7).ToArray(); for (int i = 6; i > 6 - bracket; i--) { batteryPattern[i] = (byte)(brightness * 85.333); } //set the "selected" bracket to the percentage of that bracket filled from 0 to 255 as a hex batteryPattern[6 - bracket] = (byte)(((percentage % 14.2857) * brightness * 85.333) / 14.2857); return batteryPattern; } public void SetBatteryPattern(int brightness) { SetCustom(GetPercentagePattern(brightness, 100 * (HardwareControl.GetBatteryChargePercentage() / AppConfig.Get("charge_limit", 100))), null); } public void SetEmpty() { SetCustom(GetPercentagePattern(0, 0)); } public void SetAudioPattern(int brightness, double bass, double treble) { byte[] payload = new byte[7]; double step = 100.0 / 7.0; for (int i = 0; i < 7; i++) { double s = step * i, e = step * (i + 1); if (bass > s) payload[6 - i] |= (byte)(Math.Min((bass - s) / (e - s), 1) * brightness * 0x20); if (treble > s) payload[6 - i] |= (byte)(Math.Min((treble - s) / (e - s), 1) * brightness * 0x50); } ContinueCustom(payload, null); } public void SetCustom(byte[] data, string? log = "Static Data") { Set(CreatePacket([0xD2, 0x02, 0x01, 0x08, 0xAC]), null); Set(CreatePacket([0xD3, 0x03, 0x01, 0x08, 0xAC, 0xFF, 0xFF, 0x01, 0x05, 0xFF, 0xFF]), null); Set(CreatePacket([0xD4, 0x00, 0x00, 0x01, 0xAC]), null); ContinueCustom(data, log); } public void ContinueCustom(byte[] data, string? log) { byte[] payload = new byte[] { 0xD3, 0x00, 0x00, 0x07 }; Set(CreatePacket(payload.Concat(data.Take(7)).ToArray()), log); } public void SetOptions(bool status, int brightness = 0, int interval = 0) { byte brightnessByte = (byte)(brightness * 85.333); Set(CreatePacket([0xD3, 0x03, 0x01, 0x08, 0xAB, 0xFF, 0x01, status ? (byte)0x01 : (byte)0x00, 0x06, brightnessByte, 0xFF, (byte)interval]), "SlashOptions"); } public void SetBatterySaver(bool status) { Set(CreatePacket([0xD8, 0x01, 0x00, 0x01, status ? (byte)0x80 : (byte)0x00]), $"SlashBatterySaver {status}"); } public void SetLidCloseAnimation(bool status) { Set(CreatePacket([0xD8, 0x00, 0x00, 0x02, 0xA5, status ? (byte)0x00 : (byte)0x80]), $"SlashLidCloseAnimation {status}"); } public void SetSleepActive(bool status) { Set(CreatePacket([0xD2, 0x02, 0x01, 0x08, 0xA1]), "SlashSleepInit"); Set(CreatePacket([0xD3, 0x03, 0x01, 0x08, 0xA1, 0x00, 0xFF, status ? (byte)0x01 : (byte)0x00, 0x02, 0xFF, 0xFF]), $"SlashSleep {status}"); } public void Set(Packet packet, string? log = null) { _usbProvider?.Set(packet.Data); if (log is not null) Logger.WriteLine($"{log}:" + BitConverter.ToString(packet.Data).Substring(0, 48)); } } public class SlashDeviceAura : SlashDevice { protected override byte reportID => 0x5D; public SlashDeviceAura() : base(0x19B6) { } protected override SlashPacket CreatePacket(byte[] command) { return new SlashPacket(command, reportID); } } } ================================================ FILE: app/App.config ================================================  ================================================ FILE: app/AppConfig.cs ================================================ using GHelper.Mode; using System.Diagnostics; using System.Management; using System.Text.Json; public static class AppConfig { private static string configFile; private static string? _model; private static string? _modelShort; private static string? _bios; private static Dictionary config = new Dictionary(); private static System.Timers.Timer timer = new System.Timers.Timer(2000); private static long lastWrite; static AppConfig() { string startupPath = Application.StartupPath.Trim('\\'); string appPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\GHelper"; string configName = "\\config.json"; if (File.Exists(startupPath + configName)) { configFile = startupPath + configName; } else { configFile = appPath + configName; } if (!System.IO.Directory.Exists(appPath)) System.IO.Directory.CreateDirectory(appPath); if (File.Exists(configFile)) { string text = File.ReadAllText(configFile); try { config = JsonSerializer.Deserialize>(text); } catch (Exception ex) { Logger.WriteLine($"Broken config: {ex.Message} {text}"); try { text = File.ReadAllText(configFile + ".bak"); config = JsonSerializer.Deserialize>(text); } catch (Exception exb) { Logger.WriteLine($"Broken backup config: {exb.Message} {text}"); File.Copy(configFile, configFile + ".old", true); File.Copy(configFile + ".bak", configFile + ".bak.old", true); Init(); } } } else { Init(); } timer.Elapsed += Timer_Elapsed; } private static void Timer_Elapsed(object? sender, System.Timers.ElapsedEventArgs e) { timer.Stop(); string jsonString = JsonSerializer.Serialize(config, new JsonSerializerOptions { WriteIndented = true }); var backup = configFile + ".bak"; try { File.WriteAllText(configFile, jsonString); //Debug.WriteLine($"{DateTime.Now}: Config write"); } catch (Exception) { Thread.Sleep(1000); try { File.WriteAllText(configFile, jsonString); } catch (Exception ex) { Logger.WriteLine(ex.Message); } return; } lastWrite = DateTimeOffset.Now.ToUnixTimeMilliseconds(); Thread.Sleep(5000); if (Math.Abs(DateTimeOffset.Now.ToUnixTimeMilliseconds() - lastWrite) < 4000) return; var backupText = File.ReadAllText(configFile); bool isValid = !string.IsNullOrWhiteSpace(backupText) && backupText.IndexOf('\0') == -1 && backupText.StartsWith("{") && backupText.Trim().EndsWith("}") && backupText.Length >= 10; if (isValid) { File.Copy(configFile, backup, true); //Debug.WriteLine($"{DateTime.Now}: Config backup"); } else { Logger.WriteLine("Error writing config"); } } public static string GetModel() { if (_model is null) { _model = ""; try { using (var searcher = new ManagementObjectSearcher(@"Select * from Win32_ComputerSystem")) { foreach (var process in searcher.Get()) { _model = process["Model"].ToString(); break; } } } catch (Exception ex) { Logger.WriteLine(ex.Message); } } //if (_model.Contains("GA402RK")) _model = "ROG Flow Z13 GZ302EA"; // Debug Purposes return _model; } public static (string, string) GetBiosAndModel() { if (_bios is not null && _modelShort is not null) return (_bios, _modelShort); using (ManagementObjectSearcher objSearcher = new ManagementObjectSearcher(@"SELECT * FROM Win32_BIOS")) { using (ManagementObjectCollection objCollection = objSearcher.Get()) { foreach (ManagementObject obj in objCollection) if (obj["SMBIOSBIOSVersion"] is not null) { string[] results = obj["SMBIOSBIOSVersion"].ToString().Split("."); if (results.Length > 1) { _modelShort = results[0]; _bios = results[1]; } else { _modelShort = obj["SMBIOSBIOSVersion"].ToString(); } } return (_bios, _modelShort); } } } public static string GetModelShort() { string model = GetModel(); int trim = model.LastIndexOf("_"); if (trim > 0) model = model.Substring(0, trim); return model; } public static bool ContainsModel(string contains) { GetModel(); return (_model is not null && _model.ToLower().Contains(contains.ToLower())); } private static void Init() { config = new Dictionary(); config["performance_mode"] = 0; string jsonString = JsonSerializer.Serialize(config); File.WriteAllText(configFile, jsonString); } public static bool Exists(string name) { return config.ContainsKey(name); } public static int Get(string name, int empty = -1) { if (config.ContainsKey(name)) { //Debug.WriteLine(name); return int.Parse(config[name].ToString()); } else { //Debug.WriteLine(name + "E"); return empty; } } public static bool Is(string name) { return Get(name) == 1; } public static bool IsNotFalse(string name) { return Get(name) != 0; } public static bool IsOnBattery(string zone) { return Get(zone + "_bat", Get(zone)) != 0; } public static string GetString(string name, string empty = null) { if (config.ContainsKey(name)) return config[name].ToString(); else return empty; } private static void Write() { timer.Stop(); timer.Start(); } public static void Set(string name, int value) { config[name] = value; Write(); } public static void Set(string name, string value) { config[name] = value; Write(); } public static void Remove(string name) { config.Remove(name); Write(); } public static void RemoveMode(string name) { Remove(name + "_" + Modes.GetCurrent()); } public static string GgetParamName(AsusFan device, string paramName = "fan_profile") { int mode = Modes.GetCurrent(); string name; switch (device) { case AsusFan.GPU: name = "gpu"; break; case AsusFan.Mid: name = "mid"; break; case AsusFan.XGM: name = "xgm"; break; default: name = "cpu"; break; } return paramName + "_" + name + "_" + mode; } public static byte[] GetFanConfig(AsusFan device) { string curveString = GetString(GgetParamName(device)); byte[] curve = { }; if (curveString is not null) curve = StringToBytes(curveString); return curve; } public static void SetFanConfig(AsusFan device, byte[] curve) { string bitCurve = BitConverter.ToString(curve); Set(GgetParamName(device), bitCurve); } public static byte[] StringToBytes(string str) { String[] arr = str.Split('-'); byte[] array = new byte[arr.Length]; for (int i = 0; i < arr.Length; i++) array[i] = Convert.ToByte(arr[i], 16); return array; } public static byte[] GetDefaultCurve(AsusFan device) { int mode = Modes.GetCurrentBase(); byte[] curve; switch (mode) { case AsusACPI.PerformanceTurbo: switch (device) { case AsusFan.GPU: return StringToBytes("1E-3F-44-48-4C-50-54-62-16-1F-26-2D-39-47-55-5F"); default: return StringToBytes("1E-3F-44-48-4C-50-54-62-11-1A-22-29-34-43-51-5A"); } case AsusACPI.PerformanceSilent: switch (device) { case AsusFan.GPU: return StringToBytes("1E-31-3B-42-47-50-5A-64-00-00-04-11-1B-23-28-2D"); default: return StringToBytes("1E-31-3B-42-47-50-5A-64-00-00-03-0C-14-1C-22-29"); } default: switch (device) { case AsusFan.GPU: return StringToBytes("3A-3D-40-44-48-4D-51-62-0C-16-1D-1F-26-2D-34-4A"); default: return StringToBytes("3A-3D-40-44-48-4D-51-62-08-11-16-1A-22-29-30-45"); } } } public static string GetModeString(string name) { return GetString(name + "_" + Modes.GetCurrent()); } public static int GetMode(string name, int empty = -1) { return Get(name + "_" + Modes.GetCurrent(), empty); } public static bool IsMode(string name) { return Get(name + "_" + Modes.GetCurrent()) == 1; } public static void SetMode(string name, int value) { Set(name + "_" + Modes.GetCurrent(), value); } public static void SetMode(string name, string value) { Set(name + "_" + Modes.GetCurrent(), value); } public static bool IsAlly() { return ContainsModel("RC7"); } public static bool NoMKeys() { return (ContainsModel("Z13") && !IsARCNM()) || ContainsModel("FX706") || ContainsModel("FA706") || ContainsModel("FA506") || ContainsModel("FX506") || ContainsModel("Duo") || ContainsModel("FX505"); } public static bool IsARCNM() { return ContainsModel("GZ301VIC"); } public static bool IsTUF() { return ContainsModel("TUF") || ContainsModel("TX Gaming") || ContainsModel("TX Air"); } public static bool IsProArt() { return ContainsModel("ProArt"); } public static bool IsVivoZenbook() { return ContainsModel("Vivobook") || ContainsModel("Zenbook") || ContainsModel("EXPERTBOOK") || ContainsModel(" V16"); } public static bool IsVivoZenPro() { return ContainsModel("Vivobook") || ContainsModel("Zenbook") || ContainsModel("ProArt") || ContainsModel("EXPERTBOOK") || ContainsModel(" V16"); } public static bool IsHardwareFnLock() { return IsVivoZenPro() || ContainsModel("GZ302EA"); } // Devices with bugged bios command to change brightness public static bool SwappedBrightness() { return ContainsModel("FA506IEB") || ContainsModel("FA506IH") || ContainsModel("FA506IC") || ContainsModel("FA506II") || ContainsModel("FX506LU") || ContainsModel("FX506IC") || ContainsModel("FX506LH") || ContainsModel("FA506IV") || ContainsModel("FA706IC") || ContainsModel("FA706IH"); } public static bool IsDUO() { return ContainsModel("Duo") || ContainsModel("GX550") || ContainsModel("GX551") || ContainsModel("GX650") || ContainsModel("UX840") || ContainsModel("UX482"); } public static bool IsM4Button() { return IsDUO() || ContainsModel("GZ302EA"); } // G14 2020 has no aura, but media keys instead public static bool NoAura() { return (ContainsModel("GA401I") && !ContainsModel("GA401IHR")) || ContainsModel("GA502IU") || ContainsModel("HN7306") || ContainsModel("M6500X"); } public static bool MediaKeys() { return (ContainsModel("GA401I") && !ContainsModel("GA401IHR")) || ContainsModel("G712L") || ContainsModel("GX502L"); } public static bool IsSingleColor() { return ContainsModel("GA401") || ContainsModel("FX517Z") || ContainsModel("FX516P") || ContainsModel("X13") || IsARCNM() || ContainsModel("FA617N") || ContainsModel("FA617X") || NoAura() || Is("no_rgb"); } public static bool IsSleepBacklight() { return ContainsModel("FA617") || ContainsModel("FX507"); } public static bool IsAnimeMatrix() { return ContainsModel("GA401") || ContainsModel("GA402") || ContainsModel("GU604V") || ContainsModel("GU604V") || ContainsModel("G835") || ContainsModel("G815") || ContainsModel("G635") || ContainsModel("G615"); } public static bool IsSlash() { return ContainsModel("GA403") || ContainsModel("GU605") || ContainsModel("GA605"); } public static bool IsSlashAura() { return ContainsModel("GA605") || ContainsModel("GU605C") || ContainsModel("GA403W") || ContainsModel("GA403UM") || ContainsModel("GA403UP") || ContainsModel("GA403UH"); } public static bool IsInputBacklight() { return ContainsModel("GA503") || IsSlash() || IsVivoZenPro(); } public static bool IsInvertedFNLock() { return ContainsModel("M140") || ContainsModel("S550") || ContainsModel("P540") || IsTUF(); } public static bool IsOLED() { return ContainsModel("OLED") || IsSlash() || ContainsModel("M7600") || ContainsModel("UX64") || ContainsModel("UX34") || ContainsModel("UX53") || ContainsModel("K360") || ContainsModel("X150") || ContainsModel("M340") || ContainsModel("M350") || ContainsModel("K650") || ContainsModel("UM53") || ContainsModel("K660") || ContainsModel("UX84") || ContainsModel("M650") || ContainsModel("M550") || ContainsModel("M540") || ContainsModel("K340") || ContainsModel("K350") || ContainsModel("M140") || ContainsModel("S540") || ContainsModel("S550") || ContainsModel("M7400") || ContainsModel("N650") || ContainsModel("HN7306") || ContainsModel("H760") || ContainsModel("UX5406") || ContainsModel("M5606") || ContainsModel("X513") || ContainsModel("N7400") || ContainsModel("UX760"); } public static bool IsNoOverdrive() { return Is("no_overdrive"); } public static bool IsNoSleepEvent() { return ContainsModel("FX505"); } public static bool IsStrix() { return ContainsModel("Strix") || ContainsModel("Scar") || ContainsModel("G703G"); } public static bool IsAdvancedRGB() { return IsStrix() || ContainsModel("GX650"); } public static bool IsBacklightZones() { return IsStrix() || IsZ13(); } public static bool IsStrixLimitedRGB() { return ContainsModel("G614PM") || ContainsModel("G614PP") || ContainsModel("G614PR") || ContainsModel("G512LI") || ContainsModel("G513R") || ContainsModel("G713QM") || ContainsModel("G713PV") || ContainsModel("G513IE") || ContainsModel("G713RC") || ContainsModel("G713IC") || ContainsModel("G713PU") || ContainsModel("G513QM") || ContainsModel("G513QC") || ContainsModel("G531G") || ContainsModel("G615JMR") || ContainsModel("G615LM") || ContainsModel("G815LR"); } public static bool IsPossible4ZoneRGB() { return ContainsModel("G614JI_") || ContainsModel("G614JV_") || ContainsModel("G614JZ") || ContainsModel("G614JU") || IsStrixLimitedRGB(); } public static bool Is4ZoneRGB() { return IsPossible4ZoneRGB() && !Is("per_key_rgb"); } public static bool IsHardwareHotkeys() { return ContainsModel("FX506"); } public static bool NoWMI() { return ContainsModel("GL704G") || ContainsModel("GM501G") || ContainsModel("GX501G"); } public static bool IsNoDirectRGB() { return ContainsModel("GA503") || ContainsModel("G533Q") || ContainsModel("GU502") || ContainsModel("GU603") || IsSlash() || IsAlly(); } public static bool IsStrixNumpad() { return ContainsModel("G713R"); } public static bool IsZ1325() { return ContainsModel("GZ302E"); } public static bool IsZ13() { return ContainsModel("Z13"); } public static bool IsPZ13() { return ContainsModel("PZ13"); } public static bool IsS17() { return ContainsModel("S17"); } public static bool HasTabletMode() { return ContainsModel("X16") || ContainsModel("X13") || ContainsModel("Z13"); } public static bool IsX13() { return ContainsModel("X13"); } public static bool IsG14AMD() { return ContainsModel("GA402R"); } public static bool DynamicBoost5() { return ContainsModel("GZ301ZE"); } public static bool DynamicBoost15() { return ContainsModel("FX507ZC4") || ContainsModel("GA403UM") || ContainsModel("GU605CP") || ContainsModel("FX608J") || ContainsModel("FX608L") || ContainsModel("FA608U") || ContainsModel("FA608P") || ContainsModel("FA608W") || ContainsModel("FA401K") || ContainsModel("FA401UM") || ContainsModel("FA401UH"); } public static bool DynamicBoost20() { return ContainsModel("GU605") || ContainsModel("GA605"); } public static bool IsAdvantageEdition() { return ContainsModel("13QY"); } public static bool NoAutoUltimate() { return ContainsModel("G614") || ContainsModel("GU604") || ContainsModel("FX507") || ContainsModel("G513") || ContainsModel("FA617") || ContainsModel("G834") || ContainsModel("GA403") || ContainsModel("GU605") || ContainsModel("GA605") || ContainsModel("GU603VV"); } public static bool IsAlwaysUltimate() { return ContainsModel("FA507NUR") || ContainsModel("FA506NCR") || ContainsModel("FA507NVR"); } public static bool IsManualModeRequired() { if (!IsMode("auto_apply_power")) return false; return Is("manual_mode") || ContainsModel("G733"); } public static bool IsResetRequired() { return ContainsModel("GA403") || ContainsModel("FA507XV"); } public static bool IsFanRequired() { return ContainsModel("GA402X") || ContainsModel("GU604") || ContainsModel("G513") || ContainsModel("G713R") || ContainsModel("G713P") || ContainsModel("GU605") || ContainsModel("GA605") || ContainsModel("G634J") || ContainsModel("G834J") || ContainsModel("G614J") || ContainsModel("G814J") || ContainsModel("FX507V") || ContainsModel("FX507ZV") || ContainsModel("FX608") || ContainsModel("FA608P") || ContainsModel("G614F") || ContainsModel("G614R") || ContainsModel("G733") || ContainsModel("H7606"); } public static bool IsAMDLight() { return ContainsModel("GA402X") || ContainsModel("GA605") || ContainsModel("GA403") || ContainsModel("FA507N") || ContainsModel("FA507X") || ContainsModel("FA707N") || ContainsModel("FA707X") || ContainsModel("GZ302"); } public static bool IsPowerRequired() { return ContainsModel("FX507") || ContainsModel("FX517") || ContainsModel("FX707"); } public static bool IsModeReapplyRequired() { return Is("mode_reapply") || ContainsModel("FA401"); } public static bool IsGPUFix() { return Is("gpu_fix") || (ContainsModel("GA402X") && IsNotFalse("gpu_fix")); } public static bool IsShutdownReset() { return Is("shutdown_reset") || ContainsModel("FX507Z"); } public static bool IsNVPlatform() { return Is("nv_platform"); } public static bool IsForceSetGPUMode() { return Is("gpu_mode_force_set") || (ContainsModel("503") && IsNotFalse("gpu_mode_force_set")); } public static bool IsAMDiGPU() { return ContainsModel("GV301RA") || ContainsModel("GV302XA") || ContainsModel("GZ302") || IsFA401EA() || IsAlly(); } public static bool NoGpu() { return Is("no_gpu") || ContainsModel("UX540") || ContainsModel("M560") || ContainsModel("GZ302") || IsFA401EA(); } public static bool IsFA401EA() { return ContainsModel("FA401EA"); } public static bool IsHardwareTouchpadToggle() { return ContainsModel("FA507"); } public static bool IsIntelHX() { return ContainsModel("G814") || ContainsModel("G614") || ContainsModel("G834") || ContainsModel("G634") || ContainsModel("G835") || ContainsModel("G635") || ContainsModel("G815") || ContainsModel("G615"); } public static bool Is8Ecores() { return ContainsModel("FX507Z") || ContainsModel("GU603ZV"); } public static bool IsNoFNV() { return ContainsModel("FX507") || ContainsModel("FX707"); } public static bool IsROG() { return ContainsModel("ROG"); } public static bool IsASUS() { return ContainsModel("ROG") || ContainsModel("TUF") || ContainsModel("Vivobook") || ContainsModel("Zenbook"); } public static bool IsBWIcon() { return Is("bw_icon"); } public static bool IsStopAC() { return IsAlly() || Is("stop_ac"); } public static bool IsChargeLimit6080() { return ContainsModel("H760") || ContainsModel("GA403") || ContainsModel("GU605") || ContainsModel("GA605") || ContainsModel("GA503R") || (IsTUF() && !(ContainsModel("FX507Z") || ContainsModel("FA617") || ContainsModel("FA607"))); } // 2024 Models support Dynamic Lighting public static bool IsDynamicLighting() { return IsSlash() || IsIntelHX() || IsTUF() || IsZ13(); } public static bool IsDynamicLightingOnly() { return ContainsModel("S560") || ContainsModel("M540") || ContainsModel("UX760"); } public static bool IsDynamicLightingInit() { return ContainsModel("FA608") || Is("lighting_init"); } public static bool IsForceMiniled() { return ContainsModel("G834JYR") || ContainsModel("G834JZR") || ContainsModel("G634JZR") || ContainsModel("G835LW") || ContainsModel("G835LX") || ContainsModel("G635LW") || ContainsModel("G635LX") || Is("force_miniled"); } public static bool SaveDimming() { return Is("save_dimming"); } public static bool IsAutoStatusLed() { return Is("auto_status_led"); } public static bool IsClampFanDots() { return Is("fan_clamp") || (IsTUF() && IsNotFalse("fan_clamp")); } } ================================================ FILE: app/AsusACPI.cs ================================================ using GHelper; using GHelper.USB; using System.Management; using System.Runtime.InteropServices; public enum AsusFan { CPU = 0, GPU = 1, Mid = 2, XGM = 3 } public enum AsusMode { Balanced = 0, Turbo = 1, Silent = 2 } public enum AsusGPU { Eco = 0, Standard = 1, Ultimate = 2 } public class AsusACPI { const string FILE_NAME = @"\\.\\ATKACPI"; const uint CONTROL_CODE = 0x0022240C; const uint DSTS = 0x53545344; const uint DEVS = 0x53564544; const uint INIT = 0x54494E49; const uint WDOG = 0x474F4457; public const uint UniversalControl = 0x00100021; public const int Airplane = 0x88; public const int KB_Light_Up = 0xc4; public const int KB_Light_Down = 0xc5; public const int Brightness_Down = 0x10; public const int Brightness_Up = 0x20; public const int KB_Sleep = 0x6c; public const int KB_TouchpadToggle = 0x6b; public const int KB_MuteToggle = 0x7c; public const int KB_FNlockToggle = 0x4e; public const int KB_DUO_PgUpDn = 0x4B; public const int KB_DUO_SecondDisplay = 0x6A; public const int Touchpad_Toggle = 0x6B; public const int ChargerMode = 0x0012006C; public const int ChargerUSB = 2; public const int ChargerBarrel = 1; public const uint CPU_Fan = 0x00110013; public const uint GPU_Fan = 0x00110014; public const uint Mid_Fan = 0x00110031; public const uint BatteryDischarge = 0x0012005A; public const uint StatusMode = 0x00090031; public const uint PerformanceMode = 0x00120075; // Performance modes public const uint VivoBookMode = 0x00110019; // Vivobook performance modes public const uint GPUEcoROG = 0x00090020; public const uint GPUEcoVivo = 0x00090120; public const uint GPUXGConnected = 0x00090018; public const uint GPUXG = 0x00090019; public const uint GPUMuxROG = 0x00090016; public const uint GPUMuxVivo = 0x00090026; public const uint BatteryLimit = 0x00120057; public const uint ScreenOverdrive = 0x00050019; public const uint ScreenMiniled1 = 0x0005001E; public const uint ScreenMiniled2 = 0x0005002E; public const uint ScreenFHD = 0x0005001C; public const uint ScreenHDRControl = 0x00050071; public const uint ScreenOptimalBrightness = 0x0005002A; public const uint ScreenInit = 0x00050011; // ? public const uint DevsCPUFan = 0x00110022; public const uint DevsGPUFan = 0x00110023; public const uint DevsCPUFanCurve = 0x00110024; public const uint DevsGPUFanCurve = 0x00110025; public const uint DevsMidFanCurve = 0x00110032; public const int Temp_CPU = 0x00120094; public const int Temp_GPU = 0x00120097; public const int PPT_APUA0 = 0x001200A0; // sPPT (slow boost limit) / PL2 public const int PPT_EDCA1 = 0x001200A1; // CPU EDC public const int PPT_TDCA2 = 0x001200A2; // CPU TDC public const int PPT_APUA3 = 0x001200A3; // SPL (sustained limit) / PL1 public const int PPT_CPUB0 = 0x001200B0; // CPU PPT on 2022 (PPT_LIMIT_APU) public const int PPT_CPUB1 = 0x001200B1; // Total PPT on 2022 (PPT_LIMIT_SLOW) public const int PPT_GPUC0 = 0x001200C0; // NVIDIA GPU Boost public const int PPT_APUC1 = 0x001200C1; // fPPT (fast boost limit) public const int PPT_GPUC2 = 0x001200C2; // NVIDIA GPU Temp Target (75.. 87 C) public const uint CORES_CPU = 0x001200D2; // Intel E-core and P-core configuration in a format 0x0[E]0[P] public const uint CORES_MAX = 0x001200D3; // Maximum Intel E-core and P-core availability public const uint GPU_BASE = 0x00120099; // Base part GPU TGP public const uint GPU_POWER = 0x00120098; // Additonal part of GPU TGP public const int APU_MEM = 0x000600C1; public const int TUF_KB_BRIGHTNESS = 0x00050021; public const int KBD_BACKLIGHT_OOBE = 0x0005002F; public const int TUF_KB = 0x00100056; public const int TUF_KB2 = 0x0010005a; public const int TUF_KB_STATE = 0x00100057; public const int MicMuteLed = 0x00040017; public const int SoundMuteLed = 0x0004001C; public const int SlateMode = 0x00120063; public const int TabletState = 0x00060077; public const int TentState = 0x00060062; public const int FnLock = 0x00100023; public const int ScreenPadToggle = 0x00050031; public const int ScreenPadBrightness = 0x00050032; public const int CameraShutter = 0x00060078; public const int CameraLed = 0x00060079; public const int StatusLed = 0x000600C2; public const int BootSound = 0x00130022; public const int Tablet_Notebook = 0; public const int Tablet_Tablet = 1; public const int Tablet_Tent = 2; public const int Tablet_Rotated = 3; public const int PerformanceBalanced = 0; public const int PerformanceTurbo = 1; public const int PerformanceSilent = 2; public const int PerformanceManual = 4; public const int GPUModeEco = 0; public const int GPUModeStandard = 1; public const int GPUModeUltimate = 2; public const int MinTotal = 5; public static int MaxTotal = 150; public static int DefaultTotal = 80; public const int MinCPU = 5; public static int MaxCPU = 100; public const int DefaultCPU = 80; public const int MinGPUBoost = 5; public static int MaxGPUBoost = 25; public static int MinGPUPower = 0; public static int MaxGPUPower = 70; public const int MinGPUTemp = 75; public const int MaxGPUTemp = 87; public const int PCoreMin = 4; public const int ECoreMin = 0; public const int PCoreMax = 16; public const int ECoreMax = 16; private bool? _allAMD = null; private bool? _overdrive = null; public static uint GPUEco => AppConfig.IsVivoZenPro() ? GPUEcoVivo : GPUEcoROG; public static uint GPUMux => AppConfig.IsVivoZenPro() ? GPUMuxVivo : GPUMuxROG; [DllImport("kernel32.dll", SetLastError = true, CharSet = CharSet.Unicode)] private static extern IntPtr CreateFile( string lpFileName, uint dwDesiredAccess, uint dwShareMode, IntPtr lpSecurityAttributes, uint dwCreationDisposition, uint dwFlagsAndAttributes, IntPtr hTemplateFile ); [DllImport("kernel32.dll", SetLastError = true)] private static extern bool DeviceIoControl( IntPtr hDevice, uint dwIoControlCode, byte[] lpInBuffer, uint nInBufferSize, byte[] lpOutBuffer, uint nOutBufferSize, ref uint lpBytesReturned, IntPtr lpOverlapped ); [DllImport("kernel32.dll", SetLastError = true)] private static extern bool CloseHandle(IntPtr hObject); private const uint GENERIC_READ = 0x80000000; private const uint GENERIC_WRITE = 0x40000000; private const uint OPEN_EXISTING = 3; private const uint FILE_ATTRIBUTE_NORMAL = 0x80; private const uint FILE_SHARE_READ = 1; private const uint FILE_SHARE_WRITE = 2; private IntPtr handle; // Event handling attempt [DllImport("kernel32.dll", SetLastError = true)] private static extern IntPtr CreateEvent(IntPtr lpEventAttributes, bool bManualReset, bool bInitialState, string lpName); [DllImport("kernel32.dll", SetLastError = true)] private static extern bool WaitForSingleObject(IntPtr hHandle, int dwMilliseconds); private IntPtr eventHandle; private bool _connected = false; // still works only with asus optimization service on , if someone knows how to get ACPI events from asus without that - let me know public void RunListener() { eventHandle = CreateEvent(IntPtr.Zero, false, false, "ATK4001"); byte[] outBuffer = new byte[16]; byte[] data = new byte[8]; bool result; data[0] = BitConverter.GetBytes(eventHandle.ToInt32())[0]; data[1] = BitConverter.GetBytes(eventHandle.ToInt32())[1]; Control(0x222400, data, outBuffer); Logger.WriteLine("ACPI :" + BitConverter.ToString(data) + "|" + BitConverter.ToString(outBuffer)); while (true) { WaitForSingleObject(eventHandle, Timeout.Infinite); Control(0x222408, new byte[0], outBuffer); int code = BitConverter.ToInt32(outBuffer); Logger.WriteLine("ACPI Code: " + code); } } public bool IsConnected() { return _connected; } public AsusACPI() { try { handle = CreateFile( FILE_NAME, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, IntPtr.Zero, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, IntPtr.Zero ); //handle = new IntPtr(-1); //throw new Exception("ERROR"); _connected = true; } catch (Exception ex) { Logger.WriteLine($"Can't connect to ACPI: {ex.Message}"); } if (AppConfig.IsAdvantageEdition()) { MaxTotal = 250; } if (AppConfig.IsG14AMD()) { DefaultTotal = 125; } if (AppConfig.IsX13()) { MaxTotal = 75; DefaultTotal = 50; } if (AppConfig.IsAlly()) { MaxTotal = 50; DefaultTotal = 30; } if (AppConfig.IsIntelHX()) { MaxTotal = 175; } if (AppConfig.DynamicBoost5()) { MaxGPUBoost = 5; } if (AppConfig.DynamicBoost15()) { MaxGPUBoost = 15; } if (AppConfig.DynamicBoost20()) { MaxGPUBoost = 20; } if (AppConfig.IsAMDLight()) { MaxTotal = 90; } if (AppConfig.IsZ1325()) { MaxTotal = 93; } if (AppConfig.IsFA401EA()) { MaxTotal = 115; MaxCPU = 115; } } public void Control(uint dwIoControlCode, byte[] lpInBuffer, byte[] lpOutBuffer) { uint lpBytesReturned = 0; DeviceIoControl( handle, dwIoControlCode, lpInBuffer, (uint)lpInBuffer.Length, lpOutBuffer, (uint)lpOutBuffer.Length, ref lpBytesReturned, IntPtr.Zero ); } public void Close() { CloseHandle(handle); } protected byte[] CallMethod(uint MethodID, byte[] args) { byte[] acpiBuf = new byte[8 + args.Length]; byte[] outBuffer = new byte[16]; BitConverter.GetBytes((uint)MethodID).CopyTo(acpiBuf, 0); BitConverter.GetBytes((uint)args.Length).CopyTo(acpiBuf, 4); Array.Copy(args, 0, acpiBuf, 8, args.Length); // if (MethodID == DEVS) Debug.WriteLine(BitConverter.ToString(acpiBuf, 0, acpiBuf.Length)); Control(CONTROL_CODE, acpiBuf, outBuffer); return outBuffer; } public byte[] DeviceInit() { byte[] args = new byte[8]; return CallMethod(INIT, args); } public byte[] DeviceWatchDog() { byte[] args = new byte[8]; return CallMethod(WDOG, args); } public int DeviceSet(uint DeviceID, int Status, string? logName) { byte[] args = new byte[8]; BitConverter.GetBytes((uint)DeviceID).CopyTo(args, 0); BitConverter.GetBytes((uint)Status).CopyTo(args, 4); byte[] status = CallMethod(DEVS, args); int result = BitConverter.ToInt32(status, 0); if (logName is not null) Logger.WriteLine(logName + " = " + Status + " : " + (result == 1 ? "OK" : result)); return result; } public int DeviceSet(uint DeviceID, byte[] Params, string? logName) { byte[] args = new byte[4 + Params.Length]; BitConverter.GetBytes((uint)DeviceID).CopyTo(args, 0); Params.CopyTo(args, 4); byte[] status = CallMethod(DEVS, args); int result = BitConverter.ToInt32(status, 0); if (logName is not null) Logger.WriteLine(logName + " = " + BitConverter.ToString(Params) + " : " + (result == 1 ? "OK" : result)); return BitConverter.ToInt32(status, 0); } public int DeviceGet(uint DeviceID) { byte[] args = new byte[8]; BitConverter.GetBytes((uint)DeviceID).CopyTo(args, 0); byte[] status = CallMethod(DSTS, args); return BitConverter.ToInt32(status, 0) - 65536; } public byte[] DeviceGetBuffer(uint DeviceID, uint Status = 0) { byte[] args = new byte[8]; BitConverter.GetBytes((uint)DeviceID).CopyTo(args, 0); BitConverter.GetBytes((uint)Status).CopyTo(args, 4); return CallMethod(DSTS, args); } public decimal? GetBatteryDischarge() { var buffer = DeviceGetBuffer(BatteryDischarge); if (buffer[2] > 0) { buffer[2] = 0; return (decimal)BitConverter.ToInt16(buffer, 0) / 100; } else { return null; } } public int SetVivoMode(int mode) { if (mode == 1) mode = 2; else if (mode == 2) mode = 1; return Program.acpi.DeviceSet(VivoBookMode, mode, "VivoMode"); } public int SetGPUEco(int eco) { uint ecoEndpoint = GPUEco; int ecoFlag = DeviceGet(ecoEndpoint); if (ecoFlag < 0) return -1; if (ecoFlag == 1 && eco == 0) return DeviceSet(ecoEndpoint, eco, "GPUEco"); if (ecoFlag == 0 && eco == 1) return DeviceSet(ecoEndpoint, eco, "GPUEco"); return -1; } public int GetFan(AsusFan device) { int fan = -1; switch (device) { case AsusFan.GPU: fan = Program.acpi.DeviceGet(GPU_Fan); break; case AsusFan.Mid: fan = Program.acpi.DeviceGet(Mid_Fan); break; default: fan = Program.acpi.DeviceGet(CPU_Fan); break; } if (fan < 0) { fan += 65536; if (fan <= 0 || fan > 100) fan = -1; } return fan; } public int SetFanRange(AsusFan device, byte[] curve) { if (curve.Length != 16) return -1; if (curve.All(singleByte => singleByte == 0)) return -1; byte min = (byte)(curve[8] * 255 / 100); byte max = (byte)(curve[15] * 255 / 100); byte[] range = { min, max }; int result; switch (device) { case AsusFan.GPU: result = DeviceSet(DevsGPUFan, range, "FanRangeGPU"); break; default: result = DeviceSet(DevsCPUFan, range, "FanRangeCPU"); break; } return result; } public int SetFanCurve(AsusFan device, byte[] curve) { if (curve.Length != 16) return -1; if (curve.All(singleByte => singleByte == 0)) return -1; int result; int fanScale = AppConfig.Get("fan_scale", 100); if (fanScale != 100 && device == AsusFan.CPU) Logger.WriteLine("Custom fan scale: " + fanScale); for (int i = 8; i < curve.Length; i++) curve[i] = (byte)(Math.Max((byte)0, Math.Min((byte)100, curve[i])) * fanScale / 100); switch (device) { case AsusFan.GPU: result = DeviceSet(DevsGPUFanCurve, curve, "FanGPU"); break; case AsusFan.Mid: result = DeviceSet(DevsMidFanCurve, curve, "FanMid"); break; default: result = DeviceSet(DevsCPUFanCurve, curve, "FanCPU"); break; } return result; } public byte[] GetFanCurve(AsusFan device, int mode = 0) { uint fan_mode; // because it's asus, and modes are swapped here switch (mode) { case 1: fan_mode = 2; break; case 2: fan_mode = 1; break; default: fan_mode = 0; break; } byte[] result; switch (device) { case AsusFan.GPU: result = DeviceGetBuffer(DevsGPUFanCurve, fan_mode); break; case AsusFan.Mid: result = DeviceGetBuffer(DevsMidFanCurve, fan_mode); break; default: result = DeviceGetBuffer(DevsCPUFanCurve, fan_mode); break; } //Logger.WriteLine($"GetFan {device} :" + BitConverter.ToString(result)); return result; } public static bool IsInvalidCurve(byte[] curve) { return curve.Length != 16 || IsEmptyCurve(curve); } public static bool IsEmptyCurve(byte[] curve) { return curve.All(singleByte => singleByte == 0); } public static byte[] FixFanCurve(byte[] curve) { if (curve.Length != 16) throw new Exception("Incorrect curve"); var points = new Dictionary(); byte old = 0; for (int i = 0; i < 8; i++) { if (curve[i] <= old) curve[i] = (byte)Math.Min(100, old + 6); // preventing 2 points in same spot from default asus profiles points[curve[i]] = curve[i + 8]; old = curve[i]; } var pointsFixed = new Dictionary(); bool fix = false; int count = 0; foreach (var pair in points.OrderBy(x => x.Key)) { if (count == 0 && pair.Key >= 40) { fix = true; pointsFixed.Add(30, 0); } if (count != 3 || !fix) pointsFixed.Add(pair.Key, pair.Value); count++; } count = 0; foreach (var pair in pointsFixed.OrderBy(x => x.Key)) { int x = pair.Key; if (AppConfig.IsClampFanDots()) { int minX = 30 + (count * 10); int maxX = minX + 10; x = Math.Max(minX, Math.Min(maxX, x)); } curve[count] = (byte)x; curve[count + 8] = pair.Value; count++; } return curve; } public bool IsXGConnected() { return DeviceGet(GPUXGConnected) == 1; } public bool IsAllAmdPPT() { if (_allAMD is null) _allAMD = DeviceGet(PPT_CPUB0) >= 0 && DeviceGet(PPT_GPUC0) < 0 && !AppConfig.IsAMDiGPU(); return (bool)_allAMD; } public bool IsOverdriveSupported() { if (_overdrive is null) _overdrive = DeviceGet(ScreenOverdrive) >= 0; return (bool)_overdrive; } public bool IsNVidiaGPU() { return (!IsAllAmdPPT() && Program.acpi.DeviceGet(GPUEco) >= 0 && !AppConfig.IsAlly()); } public void SetAPUMem(int memory = 4) { if (memory < 0 || memory > 8) return; int mem = 0; switch (memory) { case 0: mem = 0; break; case 1: mem = 258; break; case 2: mem = 259; break; case 3: mem = 260; break; case 4: mem = 261; break; case 5: mem = 263; break; case 6: mem = 264; break; case 7: mem = 265; break; case 8: mem = 262; break; } Program.acpi.DeviceSet(APU_MEM, mem, "APU Mem"); } public int GetAPUMem() { int memory = Program.acpi.DeviceGet(APU_MEM); if (memory < 0) return -1; switch (memory) { case 256: return 0; case 258: return 1; case 259: return 2; case 260: return 3; case 261: return 4; case 262: return 8; case 263: return 5; case 264: return 6; case 265: return 7; default: return 4; } } public (int, int) GetCores(bool max = false) { int value = Program.acpi.DeviceGet(max ? CORES_MAX : CORES_CPU); //value = max ? 0x406 : 0x605; if (value < 0) return (-1, -1); Logger.WriteLine("Cores" + (max ? "Max" : "") + ": 0x" + value.ToString("X4")); return ((value >> 8) & 0xFF, (value) & 0xFF); } public void SetCores(int eCores, int pCores) { if (eCores < ECoreMin || eCores > ECoreMax || pCores < PCoreMin || pCores > PCoreMax) { Logger.WriteLine($"Incorrect Core config ({eCores}, {pCores})"); return; }; int value = (eCores << 8) | pCores; Program.acpi.DeviceSet(CORES_CPU, value, "Cores (0x" + value.ToString("X4") + ")"); } public string ScanRange() { int value; string appPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\GHelper"; string logFile = appPath + "\\scan.txt"; using (StreamWriter w = File.AppendText(logFile)) { w.WriteLine($"Scan started {DateTime.Now}"); for (uint i = 0x00000000; i <= 0x00160000; i += 0x10000) { for (uint j = 0x00; j <= 0xFF; j++) { uint id = i + j; value = DeviceGet(id); if (value >= 0) { w.WriteLine(id.ToString("X8") + ": " + value.ToString("X4") + " (" + value + ")"); } } } w.WriteLine($"---------------------"); w.Close(); } return logFile; } public void TUFKeyboardBrightness(int brightness, string log = "TUF Backlight") { int param = 0x80 | (brightness & 0x7F); DeviceSet(TUF_KB_BRIGHTNESS, param, log); } public void TUFKeyboardRGB(AuraMode mode, Color color, int speed, string? log = "TUF RGB") { byte[] setting = new byte[6]; setting[0] = (byte)0xb4; setting[1] = (byte)mode; setting[2] = color.R; setting[3] = color.G; setting[4] = color.B; setting[5] = (byte)speed; int result = DeviceSet(TUF_KB, setting, log); if (result != 1) { setting[0] = (byte)0xb3; DeviceSet(TUF_KB2, setting, log); setting[0] = (byte)0xb4; DeviceSet(TUF_KB2, setting, log); } } const int ASUS_WMI_KEYBOARD_POWER_BOOT = 0x03 << 16; const int ASUS_WMI_KEYBOARD_POWER_AWAKE = 0x0C << 16; const int ASUS_WMI_KEYBOARD_POWER_SLEEP = 0x30 << 16; const int ASUS_WMI_KEYBOARD_POWER_SHUTDOWN = 0xC0 << 16; public void TUFKeyboardPower(bool awake = true, bool boot = false, bool sleep = false, bool shutdown = false) { int state = 0xbd; if (boot) state = state | ASUS_WMI_KEYBOARD_POWER_BOOT; if (awake) state = state | ASUS_WMI_KEYBOARD_POWER_AWAKE; if (sleep) state = state | ASUS_WMI_KEYBOARD_POWER_SLEEP; if (shutdown) state = state | ASUS_WMI_KEYBOARD_POWER_SHUTDOWN; state = state | 0x01 << 8; DeviceSet(TUF_KB_STATE, state, "TUF_KB"); if (AppConfig.IsVivoZenPro() && DeviceGet(KBD_BACKLIGHT_OOBE) >= 0) DeviceSet(KBD_BACKLIGHT_OOBE, 1, "VIVO OOBE"); } public void SubscribeToEvents(Action EventHandler) { try { ManagementEventWatcher watcher = new ManagementEventWatcher(); watcher.EventArrived += new EventArrivedEventHandler(EventHandler); watcher.Scope = new ManagementScope("root\\wmi"); watcher.Query = new WqlEventQuery("SELECT * FROM AsusAtkWmiEvent"); watcher.Start(); } catch { Logger.WriteLine("Can't connect to ASUS WMI events"); } } } ================================================ FILE: app/AsusMouseSettings.Designer.cs ================================================ namespace GHelper { partial class AsusMouseSettings { /// /// Required designer variable. /// private System.ComponentModel.IContainer components = null; /// /// Clean up any resources being used. /// /// true if managed resources should be disposed; otherwise, false. protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } #region Windows Form Designer generated code /// /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// private void InitializeComponent() { panelProfiles = new Panel(); comboProfile = new GHelper.UI.RComboBox(); labelProfile = new Label(); panelPerformance = new Panel(); panelPerformanceOther = new Panel(); panelDeceleration = new Panel(); labelDeceleration = new Label(); sliderDeceleration = new GHelper.UI.Slider(); labelDecelerationValue = new Label(); panelAcceleration = new Panel(); labelAcceleration = new Label(); sliderAcceleration = new GHelper.UI.Slider(); labelAccelerationValue = new Label(); panelLiftOffDistance = new Panel(); labelLiftOffDistance = new Label(); comboBoxLiftOffDistance = new GHelper.UI.RComboBox(); panelDebounce = new Panel(); labelButtonDebounce = new Label(); sliderButtonDebounce = new GHelper.UI.Slider(); labelButtonDebounceValue = new Label(); panelAngleSnapping = new Panel(); panelMotionSync = new Panel(); checkBoxMotionSync = new CheckBox(); panelZoneMode = new Panel(); checkBoxZoneMode = new CheckBox(); comboBoxZoneModePollingRate = new GHelper.UI.RComboBox(); sliderZoneModeDPI = new GHelper.UI.Slider(); numericUpDownZoneModeDPI = new NumericUpDown(); sliderAngleAdjustment = new GHelper.UI.Slider(); checkBoxAngleSnapping = new CheckBox(); labelAngleAdjustmentValue = new Label(); panelPollingRate = new Panel(); labelPollingRate = new Label(); comboBoxPollingRate = new GHelper.UI.RComboBox(); panelDPISettings = new Panel(); sliderDPI = new GHelper.UI.Slider(); tableLayoutPanel1 = new TableLayoutPanel(); labelMinDPI = new Label(); labelMaxDPI = new Label(); numericUpDownCurrentDPI = new NumericUpDown(); panelDPITile = new Panel(); pictureDPIColor = new PictureBox(); buttonDPIColor = new GHelper.UI.RButton(); labelDPI = new Label(); tableDPI = new TableLayoutPanel(); buttonDPI2 = new GHelper.UI.RButton(); buttonDPI1 = new GHelper.UI.RButton(); buttonDPI3 = new GHelper.UI.RButton(); buttonDPI4 = new GHelper.UI.RButton(); panelPerformanceHeader = new Panel(); pictureKeyboard = new PictureBox(); labelPerformance = new Label(); panelLighting = new Panel(); panelLightingContent = new Panel(); tableLayoutLightingZones = new TableLayoutPanel(); buttonLightingZoneScroll = new GHelper.UI.RButton(); buttonLightingZoneLogo = new GHelper.UI.RButton(); buttonLightingZoneAll = new GHelper.UI.RButton(); buttonLightingZoneUnderglow = new GHelper.UI.RButton(); buttonLightingZoneDock = new GHelper.UI.RButton(); comboBoxAnimationDirection = new GHelper.UI.RComboBox(); labelAnimationDirection = new Label(); checkBoxRandomColor = new CheckBox(); comboBoxAnimationSpeed = new GHelper.UI.RComboBox(); labelAnimationSpeed = new Label(); pictureBoxLightingColor = new PictureBox(); buttonLightingColor = new GHelper.UI.RButton(); comboBoxLightingMode = new GHelper.UI.RComboBox(); labelLightingMode = new Label(); panelLightingHeader = new Panel(); sliderBrightness = new GHelper.UI.Slider(); pictureBoxLighting = new PictureBox(); labelLighting = new Label(); panelEnergy = new Panel(); labelLowBatteryWarningValue = new Label(); comboBoxAutoPowerOff = new GHelper.UI.RComboBox(); sliderLowBatteryWarning = new GHelper.UI.Slider(); labelLowBatteryWarning = new Label(); labelAutoPowerOff = new Label(); panelEnergyHeader = new Panel(); pictureBoxEnergy = new PictureBox(); labelEnergy = new Label(); tableLayoutProfiles = new TableLayoutPanel(); panelBatteryState = new Panel(); labelChargingState = new Label(); labelBatteryState = new Label(); pictureBoxBatteryState = new PictureBox(); buttonSync = new GHelper.UI.RButton(); panelBottomButtons = new Panel(); buttonImport = new GHelper.UI.RButton(); buttonExport = new GHelper.UI.RButton(); tableLayoutPanel2 = new TableLayoutPanel(); rButton1 = new GHelper.UI.RButton(); rButton2 = new GHelper.UI.RButton(); panelProfiles.SuspendLayout(); panelPerformance.SuspendLayout(); panelPerformanceOther.SuspendLayout(); panelDeceleration.SuspendLayout(); panelAcceleration.SuspendLayout(); panelLiftOffDistance.SuspendLayout(); panelDebounce.SuspendLayout(); panelAngleSnapping.SuspendLayout(); panelMotionSync.SuspendLayout(); panelZoneMode.SuspendLayout(); panelPollingRate.SuspendLayout(); panelDPISettings.SuspendLayout(); tableLayoutPanel1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)numericUpDownCurrentDPI).BeginInit(); panelDPITile.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)pictureDPIColor).BeginInit(); tableDPI.SuspendLayout(); panelPerformanceHeader.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)pictureKeyboard).BeginInit(); panelLighting.SuspendLayout(); panelLightingContent.SuspendLayout(); tableLayoutLightingZones.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)pictureBoxLightingColor).BeginInit(); panelLightingHeader.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)pictureBoxLighting).BeginInit(); panelEnergy.SuspendLayout(); panelEnergyHeader.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)pictureBoxEnergy).BeginInit(); tableLayoutProfiles.SuspendLayout(); panelBatteryState.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)pictureBoxBatteryState).BeginInit(); panelBottomButtons.SuspendLayout(); tableLayoutPanel2.SuspendLayout(); SuspendLayout(); // // panelProfiles // panelProfiles.Controls.Add(comboProfile); panelProfiles.Controls.Add(labelProfile); panelProfiles.Location = new Point(444, 4); panelProfiles.Margin = new Padding(4); panelProfiles.MinimumSize = new Size(454, 0); panelProfiles.Name = "panelProfiles"; panelProfiles.Size = new Size(454, 68); panelProfiles.TabIndex = 0; // // comboProfile // comboProfile.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Right; comboProfile.BorderColor = Color.White; comboProfile.ButtonColor = Color.FromArgb(255, 255, 255); comboProfile.DropDownStyle = ComboBoxStyle.DropDownList; comboProfile.FlatStyle = FlatStyle.Flat; comboProfile.FormattingEnabled = true; comboProfile.Location = new Point(130, 14); comboProfile.Margin = new Padding(0); comboProfile.Name = "comboProfile"; comboProfile.Size = new Size(302, 40); comboProfile.TabIndex = 43; // // labelProfile // labelProfile.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left; labelProfile.AutoSize = true; labelProfile.Font = new Font("Segoe UI", 9F, FontStyle.Bold); labelProfile.Location = new Point(4, 18); labelProfile.Margin = new Padding(4, 0, 4, 0); labelProfile.Name = "labelProfile"; labelProfile.Size = new Size(90, 32); labelProfile.TabIndex = 41; labelProfile.Text = "Profile"; // // panelPerformance // panelPerformance.AutoSize = true; panelPerformance.Controls.Add(panelPerformanceOther); panelPerformance.Controls.Add(panelDPISettings); panelPerformance.Controls.Add(tableDPI); panelPerformance.Controls.Add(panelPerformanceHeader); panelPerformance.Dock = DockStyle.Top; panelPerformance.Location = new Point(14, 90); panelPerformance.Margin = new Padding(4); panelPerformance.Name = "panelPerformance"; panelPerformance.Padding = new Padding(0, 14, 0, 34); panelPerformance.Size = new Size(881, 733); panelPerformance.TabIndex = 1; // // panelPerformanceOther // panelPerformanceOther.AutoSize = true; panelPerformanceOther.AutoSizeMode = AutoSizeMode.GrowAndShrink; panelPerformanceOther.Controls.Add(panelDeceleration); panelPerformanceOther.Controls.Add(panelAcceleration); panelPerformanceOther.Controls.Add(panelLiftOffDistance); panelPerformanceOther.Controls.Add(panelDebounce); panelPerformanceOther.Controls.Add(panelZoneMode); panelPerformanceOther.Controls.Add(panelMotionSync); panelPerformanceOther.Controls.Add(panelAngleSnapping); panelPerformanceOther.Controls.Add(panelPollingRate); panelPerformanceOther.Dock = DockStyle.Top; panelPerformanceOther.Location = new Point(0, 319); panelPerformanceOther.Margin = new Padding(4); panelPerformanceOther.Name = "panelPerformanceOther"; panelPerformanceOther.Padding = new Padding(0, 14, 0, 14); panelPerformanceOther.Size = new Size(881, 380); panelPerformanceOther.TabIndex = 49; // // panelDeceleration // panelDeceleration.AutoSize = true; panelDeceleration.AutoSizeMode = AutoSizeMode.GrowAndShrink; panelDeceleration.Controls.Add(labelDeceleration); panelDeceleration.Controls.Add(sliderDeceleration); panelDeceleration.Controls.Add(labelDecelerationValue); panelDeceleration.Dock = DockStyle.Top; panelDeceleration.Location = new Point(0, 304); panelDeceleration.Margin = new Padding(4); panelDeceleration.Name = "panelDeceleration"; panelDeceleration.Padding = new Padding(6); panelDeceleration.Size = new Size(881, 62); panelDeceleration.TabIndex = 58; // // labelDeceleration // labelDeceleration.Location = new Point(8, 10); labelDeceleration.Margin = new Padding(8, 0, 8, 0); labelDeceleration.Name = "labelDeceleration"; labelDeceleration.Size = new Size(464, 44); labelDeceleration.TabIndex = 52; labelDeceleration.Text = "Deceleration"; // // sliderDeceleration // sliderDeceleration.AccessibleName = "DPI Slider"; sliderDeceleration.Location = new Point(490, 12); sliderDeceleration.Margin = new Padding(4); sliderDeceleration.Max = 9; sliderDeceleration.Min = 0; sliderDeceleration.Name = "sliderDeceleration"; sliderDeceleration.Size = new Size(284, 40); sliderDeceleration.Step = 1; sliderDeceleration.TabIndex = 50; sliderDeceleration.TabStop = false; sliderDeceleration.Text = "sliderBattery"; sliderDeceleration.Value = 0; // // labelDecelerationValue // labelDecelerationValue.Location = new Point(786, 12); labelDecelerationValue.Margin = new Padding(8, 0, 8, 0); labelDecelerationValue.Name = "labelDecelerationValue"; labelDecelerationValue.Size = new Size(80, 40); labelDecelerationValue.TabIndex = 51; labelDecelerationValue.Text = "0"; labelDecelerationValue.TextAlign = ContentAlignment.MiddleRight; // // panelAcceleration // panelAcceleration.AutoSize = true; panelAcceleration.AutoSizeMode = AutoSizeMode.GrowAndShrink; panelAcceleration.Controls.Add(labelAcceleration); panelAcceleration.Controls.Add(sliderAcceleration); panelAcceleration.Controls.Add(labelAccelerationValue); panelAcceleration.Dock = DockStyle.Top; panelAcceleration.Location = new Point(0, 242); panelAcceleration.Margin = new Padding(4); panelAcceleration.Name = "panelAcceleration"; panelAcceleration.Padding = new Padding(6); panelAcceleration.Size = new Size(881, 62); panelAcceleration.TabIndex = 57; // // labelAcceleration // labelAcceleration.Location = new Point(8, 10); labelAcceleration.Margin = new Padding(8, 0, 8, 0); labelAcceleration.Name = "labelAcceleration"; labelAcceleration.Size = new Size(464, 44); labelAcceleration.TabIndex = 52; labelAcceleration.Text = "Acceleration"; // // sliderAcceleration // sliderAcceleration.AccessibleName = "DPI Slider"; sliderAcceleration.Location = new Point(490, 12); sliderAcceleration.Margin = new Padding(4); sliderAcceleration.Max = 9; sliderAcceleration.Min = 0; sliderAcceleration.Name = "sliderAcceleration"; sliderAcceleration.Size = new Size(284, 40); sliderAcceleration.Step = 1; sliderAcceleration.TabIndex = 50; sliderAcceleration.TabStop = false; sliderAcceleration.Text = "sliderBattery"; sliderAcceleration.Value = 0; // // labelAccelerationValue // labelAccelerationValue.Location = new Point(786, 12); labelAccelerationValue.Margin = new Padding(8, 0, 8, 0); labelAccelerationValue.Name = "labelAccelerationValue"; labelAccelerationValue.Size = new Size(80, 40); labelAccelerationValue.TabIndex = 51; labelAccelerationValue.Text = "0"; labelAccelerationValue.TextAlign = ContentAlignment.MiddleRight; // // panelLiftOffDistance // panelLiftOffDistance.AutoSize = true; panelLiftOffDistance.AutoSizeMode = AutoSizeMode.GrowAndShrink; panelLiftOffDistance.Controls.Add(labelLiftOffDistance); panelLiftOffDistance.Controls.Add(comboBoxLiftOffDistance); panelLiftOffDistance.Dock = DockStyle.Top; panelLiftOffDistance.Location = new Point(0, 186); panelLiftOffDistance.Margin = new Padding(4); panelLiftOffDistance.Name = "panelLiftOffDistance"; panelLiftOffDistance.Padding = new Padding(6); panelLiftOffDistance.Size = new Size(881, 56); panelLiftOffDistance.TabIndex = 56; // // labelLiftOffDistance // labelLiftOffDistance.Location = new Point(6, 6); labelLiftOffDistance.Margin = new Padding(8, 0, 8, 0); labelLiftOffDistance.Name = "labelLiftOffDistance"; labelLiftOffDistance.Size = new Size(464, 44); labelLiftOffDistance.TabIndex = 48; labelLiftOffDistance.Text = "Lift Off Distance"; // // comboBoxLiftOffDistance // comboBoxLiftOffDistance.BorderColor = Color.White; comboBoxLiftOffDistance.ButtonColor = Color.FromArgb(255, 255, 255); comboBoxLiftOffDistance.DropDownStyle = ComboBoxStyle.DropDownList; comboBoxLiftOffDistance.FlatStyle = FlatStyle.Flat; comboBoxLiftOffDistance.FormattingEnabled = true; comboBoxLiftOffDistance.Location = new Point(490, 6); comboBoxLiftOffDistance.Margin = new Padding(22, 0, 22, 0); comboBoxLiftOffDistance.Name = "comboBoxLiftOffDistance"; comboBoxLiftOffDistance.Size = new Size(374, 40); comboBoxLiftOffDistance.TabIndex = 49; // // panelDebounce // panelDebounce.AutoSize = true; panelDebounce.AutoSizeMode = AutoSizeMode.GrowAndShrink; panelDebounce.Controls.Add(labelButtonDebounce); panelDebounce.Controls.Add(sliderButtonDebounce); panelDebounce.Controls.Add(labelButtonDebounceValue); panelDebounce.Dock = DockStyle.Top; panelDebounce.Location = new Point(0, 124); panelDebounce.Margin = new Padding(4); panelDebounce.Name = "panelDebounce"; panelDebounce.Padding = new Padding(6); panelDebounce.Size = new Size(881, 62); panelDebounce.TabIndex = 55; // // labelButtonDebounce // labelButtonDebounce.Location = new Point(8, 10); labelButtonDebounce.Margin = new Padding(8, 0, 8, 0); labelButtonDebounce.Name = "labelButtonDebounce"; labelButtonDebounce.Size = new Size(464, 44); labelButtonDebounce.TabIndex = 52; labelButtonDebounce.Text = "Button Response"; // // sliderButtonDebounce // sliderButtonDebounce.AccessibleName = "DPI Slider"; sliderButtonDebounce.Location = new Point(490, 12); sliderButtonDebounce.Margin = new Padding(4); sliderButtonDebounce.Max = 7; sliderButtonDebounce.Min = 2; sliderButtonDebounce.Name = "sliderButtonDebounce"; sliderButtonDebounce.Size = new Size(284, 40); sliderButtonDebounce.Step = 1; sliderButtonDebounce.TabIndex = 50; sliderButtonDebounce.TabStop = false; sliderButtonDebounce.Text = "sliderBattery"; sliderButtonDebounce.Value = 2; // // labelButtonDebounceValue // labelButtonDebounceValue.Location = new Point(786, 12); labelButtonDebounceValue.Margin = new Padding(8, 0, 8, 0); labelButtonDebounceValue.Name = "labelButtonDebounceValue"; labelButtonDebounceValue.Size = new Size(80, 40); labelButtonDebounceValue.TabIndex = 51; labelButtonDebounceValue.Text = "12ms"; labelButtonDebounceValue.TextAlign = ContentAlignment.MiddleRight; // // panelAngleSnapping // panelAngleSnapping.AutoSize = true; panelAngleSnapping.AutoSizeMode = AutoSizeMode.GrowAndShrink; panelAngleSnapping.Controls.Add(sliderAngleAdjustment); panelAngleSnapping.Controls.Add(checkBoxAngleSnapping); panelAngleSnapping.Controls.Add(labelAngleAdjustmentValue); panelAngleSnapping.Dock = DockStyle.Top; panelAngleSnapping.Location = new Point(0, 66); panelAngleSnapping.Margin = new Padding(4); panelAngleSnapping.Name = "panelAngleSnapping"; panelAngleSnapping.Padding = new Padding(6); panelAngleSnapping.Size = new Size(881, 58); panelAngleSnapping.TabIndex = 54; // // panelMotionSync // panelMotionSync.AutoSize = true; panelMotionSync.AutoSizeMode = AutoSizeMode.GrowAndShrink; panelMotionSync.Controls.Add(checkBoxMotionSync); panelMotionSync.Dock = DockStyle.Top; panelMotionSync.Location = new Point(0, 124); panelMotionSync.Margin = new Padding(4); panelMotionSync.Name = "panelMotionSync"; panelMotionSync.Padding = new Padding(6); panelMotionSync.Size = new Size(881, 58); panelMotionSync.TabIndex = 59; // // checkBoxMotionSync // checkBoxMotionSync.CheckAlign = ContentAlignment.MiddleRight; checkBoxMotionSync.Location = new Point(6, 8); checkBoxMotionSync.Margin = new Padding(8, 0, 8, 0); checkBoxMotionSync.Name = "checkBoxMotionSync"; checkBoxMotionSync.Size = new Size(512, 40); checkBoxMotionSync.TabIndex = 45; checkBoxMotionSync.Text = "Motion Sync"; checkBoxMotionSync.TextAlign = ContentAlignment.TopLeft; checkBoxMotionSync.UseVisualStyleBackColor = true; // // panelZoneMode // panelZoneMode.AutoSize = true; panelZoneMode.AutoSizeMode = AutoSizeMode.GrowAndShrink; panelZoneMode.Controls.Add(numericUpDownZoneModeDPI); panelZoneMode.Controls.Add(sliderZoneModeDPI); panelZoneMode.Controls.Add(comboBoxZoneModePollingRate); panelZoneMode.Controls.Add(checkBoxZoneMode); panelZoneMode.Dock = DockStyle.Top; panelZoneMode.Location = new Point(0, 182); panelZoneMode.Margin = new Padding(4); panelZoneMode.Name = "panelZoneMode"; panelZoneMode.Padding = new Padding(6); panelZoneMode.Size = new Size(881, 116); panelZoneMode.TabIndex = 60; // // checkBoxZoneMode // checkBoxZoneMode.CheckAlign = ContentAlignment.MiddleRight; checkBoxZoneMode.Location = new Point(6, 8); checkBoxZoneMode.Margin = new Padding(8, 0, 8, 0); checkBoxZoneMode.Name = "checkBoxZoneMode"; checkBoxZoneMode.Size = new Size(512, 40); checkBoxZoneMode.TabIndex = 45; checkBoxZoneMode.Text = "Zone Mode"; checkBoxZoneMode.TextAlign = ContentAlignment.TopLeft; checkBoxZoneMode.UseVisualStyleBackColor = true; // // comboBoxZoneModePollingRate // comboBoxZoneModePollingRate.BorderColor = Color.White; comboBoxZoneModePollingRate.ButtonColor = Color.FromArgb(255, 255, 255); comboBoxZoneModePollingRate.DropDownStyle = ComboBoxStyle.DropDownList; comboBoxZoneModePollingRate.FlatStyle = FlatStyle.Flat; comboBoxZoneModePollingRate.FormattingEnabled = true; comboBoxZoneModePollingRate.Location = new Point(544, 8); comboBoxZoneModePollingRate.Margin = new Padding(22, 0, 22, 0); comboBoxZoneModePollingRate.Name = "comboBoxZoneModePollingRate"; comboBoxZoneModePollingRate.Size = new Size(176, 40); comboBoxZoneModePollingRate.TabIndex = 46; // // sliderZoneModeDPI // sliderZoneModeDPI.AccessibleName = "Zone Mode DPI Slider"; sliderZoneModeDPI.Location = new Point(0, 56); sliderZoneModeDPI.Margin = new Padding(4); sliderZoneModeDPI.Max = 42000; sliderZoneModeDPI.Min = 400; sliderZoneModeDPI.Name = "sliderZoneModeDPI"; sliderZoneModeDPI.Size = new Size(881, 40); sliderZoneModeDPI.Step = 50; sliderZoneModeDPI.TabIndex = 47; sliderZoneModeDPI.TabStop = false; sliderZoneModeDPI.Text = "sliderZoneModeDPI"; sliderZoneModeDPI.Value = 1600; // // numericUpDownZoneModeDPI // numericUpDownZoneModeDPI.Location = new Point(744, 8); numericUpDownZoneModeDPI.Margin = new Padding(8, 0, 8, 0); numericUpDownZoneModeDPI.Maximum = new decimal(new int[] { 42000, 0, 0, 0 }); numericUpDownZoneModeDPI.Minimum = new decimal(new int[] { 400, 0, 0, 0 }); numericUpDownZoneModeDPI.Name = "numericUpDownZoneModeDPI"; numericUpDownZoneModeDPI.Size = new Size(120, 40); numericUpDownZoneModeDPI.TabIndex = 48; numericUpDownZoneModeDPI.TextAlign = HorizontalAlignment.Right; numericUpDownZoneModeDPI.Value = new decimal(new int[] { 1600, 0, 0, 0 }); numericUpDownZoneModeDPI.Increment = 50; // // sliderAngleAdjustment // sliderAngleAdjustment.AccessibleName = "DPI Slider"; sliderAngleAdjustment.Location = new Point(528, 8); sliderAngleAdjustment.Margin = new Padding(4); sliderAngleAdjustment.Max = 20; sliderAngleAdjustment.Min = -20; sliderAngleAdjustment.Name = "sliderAngleAdjustment"; sliderAngleAdjustment.Size = new Size(278, 40); sliderAngleAdjustment.Step = 5; sliderAngleAdjustment.TabIndex = 46; sliderAngleAdjustment.TabStop = false; sliderAngleAdjustment.Text = "sliderBattery"; sliderAngleAdjustment.Value = 0; // // checkBoxAngleSnapping // checkBoxAngleSnapping.CheckAlign = ContentAlignment.MiddleRight; checkBoxAngleSnapping.Location = new Point(6, 8); checkBoxAngleSnapping.Margin = new Padding(8, 0, 8, 0); checkBoxAngleSnapping.Name = "checkBoxAngleSnapping"; checkBoxAngleSnapping.Size = new Size(512, 40); checkBoxAngleSnapping.TabIndex = 45; checkBoxAngleSnapping.Text = "Angle Snapping"; checkBoxAngleSnapping.TextAlign = ContentAlignment.TopLeft; checkBoxAngleSnapping.UseVisualStyleBackColor = true; // // labelAngleAdjustmentValue // labelAngleAdjustmentValue.Location = new Point(796, 8); labelAngleAdjustmentValue.Margin = new Padding(8, 0, 8, 0); labelAngleAdjustmentValue.Name = "labelAngleAdjustmentValue"; labelAngleAdjustmentValue.Size = new Size(64, 40); labelAngleAdjustmentValue.TabIndex = 47; labelAngleAdjustmentValue.Text = "0°"; labelAngleAdjustmentValue.TextAlign = ContentAlignment.MiddleRight; // // panelPollingRate // panelPollingRate.AutoSize = true; panelPollingRate.AutoSizeMode = AutoSizeMode.GrowAndShrink; panelPollingRate.Controls.Add(labelPollingRate); panelPollingRate.Controls.Add(comboBoxPollingRate); panelPollingRate.Dock = DockStyle.Top; panelPollingRate.Location = new Point(0, 14); panelPollingRate.Margin = new Padding(4); panelPollingRate.Name = "panelPollingRate"; panelPollingRate.Padding = new Padding(6); panelPollingRate.Size = new Size(881, 52); panelPollingRate.TabIndex = 53; // // labelPollingRate // labelPollingRate.Location = new Point(8, 6); labelPollingRate.Margin = new Padding(8, 0, 8, 0); labelPollingRate.Name = "labelPollingRate"; labelPollingRate.Size = new Size(464, 40); labelPollingRate.TabIndex = 45; labelPollingRate.Text = "Polling Rate"; // // comboBoxPollingRate // comboBoxPollingRate.BorderColor = Color.White; comboBoxPollingRate.ButtonColor = Color.FromArgb(255, 255, 255); comboBoxPollingRate.DropDownStyle = ComboBoxStyle.DropDownList; comboBoxPollingRate.FlatStyle = FlatStyle.Flat; comboBoxPollingRate.FormattingEnabled = true; comboBoxPollingRate.Location = new Point(490, 2); comboBoxPollingRate.Margin = new Padding(22, 0, 22, 0); comboBoxPollingRate.Name = "comboBoxPollingRate"; comboBoxPollingRate.Size = new Size(374, 40); comboBoxPollingRate.TabIndex = 44; // // panelDPISettings // panelDPISettings.AutoSize = true; panelDPISettings.AutoSizeMode = AutoSizeMode.GrowAndShrink; panelDPISettings.Controls.Add(sliderDPI); panelDPISettings.Controls.Add(tableLayoutPanel1); panelDPISettings.Controls.Add(panelDPITile); panelDPISettings.Dock = DockStyle.Top; panelDPISettings.Location = new Point(0, 182); panelDPISettings.Margin = new Padding(4); panelDPISettings.Name = "panelDPISettings"; panelDPISettings.Size = new Size(881, 137); panelDPISettings.TabIndex = 44; // // sliderDPI // sliderDPI.AccessibleName = "DPI Slider"; sliderDPI.Dock = DockStyle.Top; sliderDPI.Location = new Point(0, 97); sliderDPI.Margin = new Padding(4); sliderDPI.Max = 35000; sliderDPI.Min = 100; sliderDPI.Name = "sliderDPI"; sliderDPI.Size = new Size(881, 40); sliderDPI.Step = 50; sliderDPI.TabIndex = 43; sliderDPI.TabStop = false; sliderDPI.Text = "sliderBattery"; sliderDPI.Value = 2000; // // tableLayoutPanel1 // tableLayoutPanel1.AutoSize = true; tableLayoutPanel1.AutoSizeMode = AutoSizeMode.GrowAndShrink; tableLayoutPanel1.ColumnCount = 3; tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 38F)); tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 24F)); tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 38F)); tableLayoutPanel1.Controls.Add(labelMinDPI, 0, 0); tableLayoutPanel1.Controls.Add(labelMaxDPI, 2, 0); tableLayoutPanel1.Controls.Add(numericUpDownCurrentDPI, 1, 0); tableLayoutPanel1.Dock = DockStyle.Top; tableLayoutPanel1.GrowStyle = TableLayoutPanelGrowStyle.FixedSize; tableLayoutPanel1.Location = new Point(0, 54); tableLayoutPanel1.Margin = new Padding(4); tableLayoutPanel1.Name = "tableLayoutPanel1"; tableLayoutPanel1.RowCount = 1; tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Percent, 100F)); tableLayoutPanel1.Size = new Size(881, 43); tableLayoutPanel1.TabIndex = 47; // // labelMinDPI // labelMinDPI.Dock = DockStyle.Top; labelMinDPI.ForeColor = SystemColors.GrayText; labelMinDPI.Location = new Point(8, 0); labelMinDPI.Margin = new Padding(8, 0, 8, 0); labelMinDPI.Name = "labelMinDPI"; labelMinDPI.Size = new Size(318, 40); labelMinDPI.TabIndex = 45; labelMinDPI.Text = "100"; // // labelMaxDPI // labelMaxDPI.Dock = DockStyle.Top; labelMaxDPI.ForeColor = SystemColors.GrayText; labelMaxDPI.Location = new Point(553, 0); labelMaxDPI.Margin = new Padding(8, 0, 8, 0); labelMaxDPI.Name = "labelMaxDPI"; labelMaxDPI.Size = new Size(320, 40); labelMaxDPI.TabIndex = 46; labelMaxDPI.Text = " 35000"; labelMaxDPI.TextAlign = ContentAlignment.TopRight; // // numericUpDownCurrentDPI // numericUpDownCurrentDPI.BorderStyle = BorderStyle.None; numericUpDownCurrentDPI.Dock = DockStyle.Top; numericUpDownCurrentDPI.Increment = new decimal(new int[] { 50, 0, 0, 0 }); numericUpDownCurrentDPI.Location = new Point(338, 4); numericUpDownCurrentDPI.Margin = new Padding(4); numericUpDownCurrentDPI.Maximum = new decimal(new int[] { 35000, 0, 0, 0 }); numericUpDownCurrentDPI.Minimum = new decimal(new int[] { 100, 0, 0, 0 }); numericUpDownCurrentDPI.Name = "numericUpDownCurrentDPI"; numericUpDownCurrentDPI.Size = new Size(203, 35); numericUpDownCurrentDPI.TabIndex = 47; numericUpDownCurrentDPI.TextAlign = HorizontalAlignment.Center; numericUpDownCurrentDPI.Value = new decimal(new int[] { 2000, 0, 0, 0 }); // // panelDPITile // panelDPITile.Controls.Add(pictureDPIColor); panelDPITile.Controls.Add(buttonDPIColor); panelDPITile.Controls.Add(labelDPI); panelDPITile.Dock = DockStyle.Top; panelDPITile.Location = new Point(0, 0); panelDPITile.Margin = new Padding(4); panelDPITile.Name = "panelDPITile"; panelDPITile.Padding = new Padding(0, 6, 0, 6); panelDPITile.Size = new Size(881, 54); panelDPITile.TabIndex = 48; // // pictureDPIColor // pictureDPIColor.Anchor = AnchorStyles.Top | AnchorStyles.Right; pictureDPIColor.Location = new Point(831, 14); pictureDPIColor.Margin = new Padding(8); pictureDPIColor.Name = "pictureDPIColor"; pictureDPIColor.Size = new Size(20, 20); pictureDPIColor.TabIndex = 46; pictureDPIColor.TabStop = false; // // buttonDPIColor // buttonDPIColor.AccessibleName = "Keyboard Color"; buttonDPIColor.Activated = false; buttonDPIColor.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Right; buttonDPIColor.AutoSize = true; buttonDPIColor.BackColor = SystemColors.ButtonHighlight; buttonDPIColor.BorderColor = Color.Transparent; buttonDPIColor.BorderRadius = 2; buttonDPIColor.FlatStyle = FlatStyle.Flat; buttonDPIColor.ForeColor = SystemColors.ControlText; buttonDPIColor.Location = new Point(623, 2); buttonDPIColor.Margin = new Padding(4, 8, 4, 8); buttonDPIColor.Name = "buttonDPIColor"; buttonDPIColor.Secondary = false; buttonDPIColor.Size = new Size(254, 44); buttonDPIColor.TabIndex = 45; buttonDPIColor.Text = Properties.Strings.Color; buttonDPIColor.UseVisualStyleBackColor = false; // // labelDPI // labelDPI.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left; labelDPI.AutoSize = true; labelDPI.Font = new Font("Segoe UI", 9F); labelDPI.Location = new Point(8, 6); labelDPI.Margin = new Padding(8, 0, 8, 0); labelDPI.Name = "labelDPI"; labelDPI.Size = new Size(50, 32); labelDPI.TabIndex = 34; labelDPI.Text = "DPI"; // // tableDPI // tableDPI.AutoSize = true; tableDPI.AutoSizeMode = AutoSizeMode.GrowAndShrink; tableDPI.ColumnCount = 4; tableDPI.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F)); tableDPI.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F)); tableDPI.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F)); tableDPI.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F)); tableDPI.Controls.Add(buttonDPI2, 0, 0); tableDPI.Controls.Add(buttonDPI1, 0, 0); tableDPI.Controls.Add(buttonDPI3, 1, 0); tableDPI.Controls.Add(buttonDPI4, 2, 0); tableDPI.Dock = DockStyle.Top; tableDPI.Location = new Point(0, 54); tableDPI.Margin = new Padding(8, 4, 8, 4); tableDPI.Name = "tableDPI"; tableDPI.RowCount = 1; tableDPI.RowStyles.Add(new RowStyle(SizeType.Absolute, 128F)); tableDPI.RowStyles.Add(new RowStyle(SizeType.Absolute, 128F)); tableDPI.Size = new Size(881, 128); tableDPI.TabIndex = 42; // // buttonDPI2 // buttonDPI2.AccessibleName = "DPI Setting 2"; buttonDPI2.Activated = false; buttonDPI2.BackColor = SystemColors.ControlLightLight; buttonDPI2.BorderColor = Color.Transparent; buttonDPI2.BorderRadius = 5; buttonDPI2.Dock = DockStyle.Top; buttonDPI2.FlatAppearance.BorderSize = 0; buttonDPI2.FlatStyle = FlatStyle.Flat; buttonDPI2.ForeColor = SystemColors.ControlText; buttonDPI2.Image = Properties.Resources.lighting_dot_32; buttonDPI2.ImageAlign = ContentAlignment.BottomCenter; buttonDPI2.Location = new Point(224, 4); buttonDPI2.Margin = new Padding(4); buttonDPI2.Name = "buttonDPI2"; buttonDPI2.Secondary = false; buttonDPI2.Size = new Size(212, 120); buttonDPI2.TabIndex = 4; buttonDPI2.Text = "DPI 2\r\n1000"; buttonDPI2.TextImageRelation = TextImageRelation.ImageAboveText; buttonDPI2.UseVisualStyleBackColor = false; // // buttonDPI1 // buttonDPI1.AccessibleName = "DPI Setting 1"; buttonDPI1.Activated = false; buttonDPI1.BackColor = SystemColors.ControlLightLight; buttonDPI1.BorderColor = Color.Transparent; buttonDPI1.BorderRadius = 5; buttonDPI1.CausesValidation = false; buttonDPI1.Dock = DockStyle.Top; buttonDPI1.FlatAppearance.BorderSize = 0; buttonDPI1.FlatStyle = FlatStyle.Flat; buttonDPI1.ForeColor = SystemColors.ControlText; buttonDPI1.Image = Properties.Resources.lighting_dot_32; buttonDPI1.ImageAlign = ContentAlignment.BottomCenter; buttonDPI1.Location = new Point(4, 4); buttonDPI1.Margin = new Padding(4); buttonDPI1.Name = "buttonDPI1"; buttonDPI1.Secondary = false; buttonDPI1.Size = new Size(212, 120); buttonDPI1.TabIndex = 4; buttonDPI1.Text = "DPI 1\r\n800"; buttonDPI1.TextImageRelation = TextImageRelation.ImageAboveText; buttonDPI1.UseVisualStyleBackColor = false; // // buttonDPI3 // buttonDPI3.AccessibleName = "DPI Setting 3"; buttonDPI3.Activated = false; buttonDPI3.BackColor = SystemColors.ControlLightLight; buttonDPI3.BorderColor = Color.Transparent; buttonDPI3.BorderRadius = 5; buttonDPI3.Dock = DockStyle.Top; buttonDPI3.FlatAppearance.BorderSize = 0; buttonDPI3.FlatStyle = FlatStyle.Flat; buttonDPI3.ForeColor = SystemColors.ControlText; buttonDPI3.Image = Properties.Resources.lighting_dot_32; buttonDPI3.ImageAlign = ContentAlignment.BottomCenter; buttonDPI3.Location = new Point(444, 4); buttonDPI3.Margin = new Padding(4); buttonDPI3.Name = "buttonDPI3"; buttonDPI3.Secondary = false; buttonDPI3.Size = new Size(212, 120); buttonDPI3.TabIndex = 5; buttonDPI3.Text = "DPI 3\r\n1200"; buttonDPI3.TextImageRelation = TextImageRelation.ImageAboveText; buttonDPI3.UseVisualStyleBackColor = false; // // buttonDPI4 // buttonDPI4.AccessibleName = "DPI Setting 4"; buttonDPI4.Activated = false; buttonDPI4.BackColor = SystemColors.ControlLightLight; buttonDPI4.BorderColor = Color.Transparent; buttonDPI4.BorderRadius = 5; buttonDPI4.Dock = DockStyle.Top; buttonDPI4.FlatAppearance.BorderSize = 0; buttonDPI4.FlatStyle = FlatStyle.Flat; buttonDPI4.ForeColor = SystemColors.ControlText; buttonDPI4.Image = Properties.Resources.lighting_dot_32; buttonDPI4.ImageAlign = ContentAlignment.BottomCenter; buttonDPI4.Location = new Point(664, 4); buttonDPI4.Margin = new Padding(4); buttonDPI4.Name = "buttonDPI4"; buttonDPI4.Secondary = false; buttonDPI4.Size = new Size(213, 120); buttonDPI4.TabIndex = 6; buttonDPI4.Text = "DPI 4\r\n1400"; buttonDPI4.TextImageRelation = TextImageRelation.ImageAboveText; buttonDPI4.UseVisualStyleBackColor = false; // // panelPerformanceHeader // panelPerformanceHeader.BackColor = SystemColors.ControlLight; panelPerformanceHeader.Controls.Add(pictureKeyboard); panelPerformanceHeader.Controls.Add(labelPerformance); panelPerformanceHeader.Dock = DockStyle.Top; panelPerformanceHeader.Location = new Point(0, 14); panelPerformanceHeader.Margin = new Padding(4); panelPerformanceHeader.Name = "panelPerformanceHeader"; panelPerformanceHeader.Size = new Size(881, 40); panelPerformanceHeader.TabIndex = 41; // // pictureKeyboard // pictureKeyboard.BackgroundImage = Properties.Resources.icons8_mauszeiger_50; pictureKeyboard.BackgroundImageLayout = ImageLayout.Zoom; pictureKeyboard.Location = new Point(6, 0); pictureKeyboard.Margin = new Padding(4); pictureKeyboard.Name = "pictureKeyboard"; pictureKeyboard.Size = new Size(32, 32); pictureKeyboard.TabIndex = 35; pictureKeyboard.TabStop = false; // // labelPerformance // labelPerformance.AutoSize = true; labelPerformance.Font = new Font("Segoe UI", 9F, FontStyle.Bold); labelPerformance.Location = new Point(44, 0); labelPerformance.Margin = new Padding(8, 0, 8, 0); labelPerformance.Name = "labelPerformance"; labelPerformance.Size = new Size(161, 32); labelPerformance.TabIndex = 34; labelPerformance.Text = "Performance"; // // panelLighting // panelLighting.AutoSize = true; panelLighting.AutoSizeMode = AutoSizeMode.GrowAndShrink; panelLighting.Controls.Add(panelLightingContent); panelLighting.Controls.Add(panelLightingHeader); panelLighting.Dock = DockStyle.Top; panelLighting.Location = new Point(14, 823); panelLighting.Margin = new Padding(4); panelLighting.Name = "panelLighting"; panelLighting.Padding = new Padding(0, 0, 0, 34); panelLighting.Size = new Size(881, 388); panelLighting.TabIndex = 42; // // panelLightingContent // panelLightingContent.AutoSize = true; panelLightingContent.Controls.Add(tableLayoutLightingZones); panelLightingContent.Controls.Add(comboBoxAnimationDirection); panelLightingContent.Controls.Add(labelAnimationDirection); panelLightingContent.Controls.Add(checkBoxRandomColor); panelLightingContent.Controls.Add(comboBoxAnimationSpeed); panelLightingContent.Controls.Add(labelAnimationSpeed); panelLightingContent.Controls.Add(pictureBoxLightingColor); panelLightingContent.Controls.Add(buttonLightingColor); panelLightingContent.Controls.Add(comboBoxLightingMode); panelLightingContent.Controls.Add(labelLightingMode); panelLightingContent.Dock = DockStyle.Top; panelLightingContent.Location = new Point(0, 40); panelLightingContent.Margin = new Padding(4); panelLightingContent.Name = "panelLightingContent"; panelLightingContent.Padding = new Padding(0, 0, 0, 14); panelLightingContent.Size = new Size(881, 314); panelLightingContent.TabIndex = 42; // // tableLayoutLightingZones // tableLayoutLightingZones.AutoSize = true; tableLayoutLightingZones.AutoSizeMode = AutoSizeMode.GrowAndShrink; tableLayoutLightingZones.ColumnCount = 5; tableLayoutLightingZones.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 20F)); tableLayoutLightingZones.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 20F)); tableLayoutLightingZones.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 20F)); tableLayoutLightingZones.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 20F)); tableLayoutLightingZones.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 20F)); tableLayoutLightingZones.Controls.Add(buttonLightingZoneScroll, 0, 0); tableLayoutLightingZones.Controls.Add(buttonLightingZoneLogo, 0, 0); tableLayoutLightingZones.Controls.Add(buttonLightingZoneAll, 0, 0); tableLayoutLightingZones.Controls.Add(buttonLightingZoneUnderglow, 1, 0); tableLayoutLightingZones.Controls.Add(buttonLightingZoneDock, 2, 0); tableLayoutLightingZones.Dock = DockStyle.Top; tableLayoutLightingZones.Location = new Point(0, 0); tableLayoutLightingZones.Margin = new Padding(8, 4, 8, 4); tableLayoutLightingZones.Name = "tableLayoutLightingZones"; tableLayoutLightingZones.RowCount = 1; tableLayoutLightingZones.RowStyles.Add(new RowStyle(SizeType.Absolute, 80F)); tableLayoutLightingZones.Size = new Size(881, 80); tableLayoutLightingZones.TabIndex = 56; // // buttonLightingZoneScroll // buttonLightingZoneScroll.AccessibleName = "DPI Setting 4"; buttonLightingZoneScroll.Activated = false; buttonLightingZoneScroll.AutoSize = true; buttonLightingZoneScroll.AutoSizeMode = AutoSizeMode.GrowAndShrink; buttonLightingZoneScroll.BackColor = SystemColors.ControlLightLight; buttonLightingZoneScroll.BorderColor = Color.LightGreen; buttonLightingZoneScroll.BorderRadius = 5; buttonLightingZoneScroll.Dock = DockStyle.Fill; buttonLightingZoneScroll.FlatAppearance.BorderSize = 0; buttonLightingZoneScroll.FlatStyle = FlatStyle.Flat; buttonLightingZoneScroll.ForeColor = SystemColors.ControlText; buttonLightingZoneScroll.ImageAlign = ContentAlignment.BottomCenter; buttonLightingZoneScroll.Location = new Point(356, 4); buttonLightingZoneScroll.Margin = new Padding(4); buttonLightingZoneScroll.Name = "buttonLightingZoneScroll"; buttonLightingZoneScroll.Secondary = false; buttonLightingZoneScroll.Size = new Size(168, 72); buttonLightingZoneScroll.TabIndex = 7; buttonLightingZoneScroll.Text = "Scrollwheel"; buttonLightingZoneScroll.TextImageRelation = TextImageRelation.ImageAboveText; buttonLightingZoneScroll.UseVisualStyleBackColor = false; // // buttonLightingZoneLogo // buttonLightingZoneLogo.AccessibleName = "DPI Setting 2"; buttonLightingZoneLogo.Activated = false; buttonLightingZoneLogo.AutoSize = true; buttonLightingZoneLogo.AutoSizeMode = AutoSizeMode.GrowAndShrink; buttonLightingZoneLogo.BackColor = SystemColors.ControlLightLight; buttonLightingZoneLogo.BorderColor = Color.LightGreen; buttonLightingZoneLogo.BorderRadius = 5; buttonLightingZoneLogo.Dock = DockStyle.Fill; buttonLightingZoneLogo.FlatAppearance.BorderSize = 0; buttonLightingZoneLogo.FlatStyle = FlatStyle.Flat; buttonLightingZoneLogo.ForeColor = SystemColors.ControlText; buttonLightingZoneLogo.ImageAlign = ContentAlignment.BottomCenter; buttonLightingZoneLogo.Location = new Point(180, 4); buttonLightingZoneLogo.Margin = new Padding(4); buttonLightingZoneLogo.Name = "buttonLightingZoneLogo"; buttonLightingZoneLogo.Secondary = false; buttonLightingZoneLogo.Size = new Size(168, 72); buttonLightingZoneLogo.TabIndex = 4; buttonLightingZoneLogo.Text = "Logo"; buttonLightingZoneLogo.TextImageRelation = TextImageRelation.ImageAboveText; buttonLightingZoneLogo.UseVisualStyleBackColor = false; // // buttonLightingZoneAll // buttonLightingZoneAll.AccessibleName = "DPI Setting 1"; buttonLightingZoneAll.Activated = false; buttonLightingZoneAll.AutoSize = true; buttonLightingZoneAll.AutoSizeMode = AutoSizeMode.GrowAndShrink; buttonLightingZoneAll.BackColor = SystemColors.ControlLightLight; buttonLightingZoneAll.BorderColor = Color.LightGreen; buttonLightingZoneAll.BorderRadius = 5; buttonLightingZoneAll.CausesValidation = false; buttonLightingZoneAll.Dock = DockStyle.Fill; buttonLightingZoneAll.FlatAppearance.BorderSize = 0; buttonLightingZoneAll.FlatStyle = FlatStyle.Flat; buttonLightingZoneAll.ForeColor = SystemColors.ControlText; buttonLightingZoneAll.Location = new Point(4, 4); buttonLightingZoneAll.Margin = new Padding(4); buttonLightingZoneAll.Name = "buttonLightingZoneAll"; buttonLightingZoneAll.Secondary = false; buttonLightingZoneAll.Size = new Size(168, 72); buttonLightingZoneAll.TabIndex = 4; buttonLightingZoneAll.Text = "All"; buttonLightingZoneAll.TextImageRelation = TextImageRelation.ImageAboveText; buttonLightingZoneAll.UseVisualStyleBackColor = false; // // buttonLightingZoneUnderglow // buttonLightingZoneUnderglow.AccessibleName = "DPI Setting 3"; buttonLightingZoneUnderglow.Activated = false; buttonLightingZoneUnderglow.AutoSize = true; buttonLightingZoneUnderglow.AutoSizeMode = AutoSizeMode.GrowAndShrink; buttonLightingZoneUnderglow.BackColor = SystemColors.ControlLightLight; buttonLightingZoneUnderglow.BorderColor = Color.LightGreen; buttonLightingZoneUnderglow.BorderRadius = 5; buttonLightingZoneUnderglow.Dock = DockStyle.Fill; buttonLightingZoneUnderglow.FlatAppearance.BorderSize = 0; buttonLightingZoneUnderglow.FlatStyle = FlatStyle.Flat; buttonLightingZoneUnderglow.ForeColor = SystemColors.ControlText; buttonLightingZoneUnderglow.ImageAlign = ContentAlignment.BottomCenter; buttonLightingZoneUnderglow.Location = new Point(532, 4); buttonLightingZoneUnderglow.Margin = new Padding(4); buttonLightingZoneUnderglow.Name = "buttonLightingZoneUnderglow"; buttonLightingZoneUnderglow.Secondary = false; buttonLightingZoneUnderglow.Size = new Size(168, 72); buttonLightingZoneUnderglow.TabIndex = 5; buttonLightingZoneUnderglow.Text = "Underglow"; buttonLightingZoneUnderglow.TextImageRelation = TextImageRelation.ImageAboveText; buttonLightingZoneUnderglow.UseVisualStyleBackColor = false; // // buttonLightingZoneDock // buttonLightingZoneDock.AccessibleName = "DPI Setting 4"; buttonLightingZoneDock.Activated = false; buttonLightingZoneDock.AutoSize = true; buttonLightingZoneDock.AutoSizeMode = AutoSizeMode.GrowAndShrink; buttonLightingZoneDock.BackColor = SystemColors.ControlLightLight; buttonLightingZoneDock.BorderColor = Color.LightGreen; buttonLightingZoneDock.BorderRadius = 5; buttonLightingZoneDock.Dock = DockStyle.Fill; buttonLightingZoneDock.FlatAppearance.BorderSize = 0; buttonLightingZoneDock.FlatStyle = FlatStyle.Flat; buttonLightingZoneDock.ForeColor = SystemColors.ControlText; buttonLightingZoneDock.ImageAlign = ContentAlignment.BottomCenter; buttonLightingZoneDock.Location = new Point(708, 4); buttonLightingZoneDock.Margin = new Padding(4); buttonLightingZoneDock.Name = "buttonLightingZoneDock"; buttonLightingZoneDock.Secondary = false; buttonLightingZoneDock.Size = new Size(169, 72); buttonLightingZoneDock.TabIndex = 6; buttonLightingZoneDock.Text = "Dock"; buttonLightingZoneDock.TextImageRelation = TextImageRelation.ImageAboveText; buttonLightingZoneDock.UseVisualStyleBackColor = false; // // comboBoxAnimationDirection // comboBoxAnimationDirection.BorderColor = Color.White; comboBoxAnimationDirection.ButtonColor = Color.FromArgb(255, 255, 255); comboBoxAnimationDirection.DropDownStyle = ComboBoxStyle.DropDownList; comboBoxAnimationDirection.FlatStyle = FlatStyle.Flat; comboBoxAnimationDirection.FormattingEnabled = true; comboBoxAnimationDirection.Location = new Point(490, 260); comboBoxAnimationDirection.Margin = new Padding(22, 0, 22, 0); comboBoxAnimationDirection.Name = "comboBoxAnimationDirection"; comboBoxAnimationDirection.Size = new Size(376, 40); comboBoxAnimationDirection.TabIndex = 54; // // labelAnimationDirection // labelAnimationDirection.Location = new Point(10, 256); labelAnimationDirection.Margin = new Padding(8, 0, 8, 0); labelAnimationDirection.Name = "labelAnimationDirection"; labelAnimationDirection.Size = new Size(422, 44); labelAnimationDirection.TabIndex = 55; labelAnimationDirection.Text = "Animation Direction"; // // checkBoxRandomColor // checkBoxRandomColor.Location = new Point(698, 144); checkBoxRandomColor.Margin = new Padding(8, 0, 8, 0); checkBoxRandomColor.Name = "checkBoxRandomColor"; checkBoxRandomColor.Size = new Size(170, 50); checkBoxRandomColor.TabIndex = 53; checkBoxRandomColor.Text = "Random"; checkBoxRandomColor.UseVisualStyleBackColor = true; // // comboBoxAnimationSpeed // comboBoxAnimationSpeed.BorderColor = Color.White; comboBoxAnimationSpeed.ButtonColor = Color.FromArgb(255, 255, 255); comboBoxAnimationSpeed.DropDownStyle = ComboBoxStyle.DropDownList; comboBoxAnimationSpeed.FlatStyle = FlatStyle.Flat; comboBoxAnimationSpeed.FormattingEnabled = true; comboBoxAnimationSpeed.Location = new Point(490, 208); comboBoxAnimationSpeed.Margin = new Padding(22, 0, 22, 0); comboBoxAnimationSpeed.Name = "comboBoxAnimationSpeed"; comboBoxAnimationSpeed.Size = new Size(376, 40); comboBoxAnimationSpeed.TabIndex = 51; // // labelAnimationSpeed // labelAnimationSpeed.Location = new Point(10, 212); labelAnimationSpeed.Margin = new Padding(8, 0, 8, 0); labelAnimationSpeed.Name = "labelAnimationSpeed"; labelAnimationSpeed.Size = new Size(422, 44); labelAnimationSpeed.TabIndex = 52; labelAnimationSpeed.Text = "Animation Speed"; // // pictureBoxLightingColor // pictureBoxLightingColor.Anchor = AnchorStyles.Top | AnchorStyles.Right; pictureBoxLightingColor.Location = new Point(623, 158); pictureBoxLightingColor.Margin = new Padding(8); pictureBoxLightingColor.Name = "pictureBoxLightingColor"; pictureBoxLightingColor.Size = new Size(26, 26); pictureBoxLightingColor.TabIndex = 50; pictureBoxLightingColor.TabStop = false; // // buttonLightingColor // buttonLightingColor.AccessibleName = "Keyboard Color"; buttonLightingColor.Activated = false; buttonLightingColor.Anchor = AnchorStyles.Top | AnchorStyles.Right; buttonLightingColor.BackColor = SystemColors.ButtonHighlight; buttonLightingColor.BorderColor = Color.Transparent; buttonLightingColor.BorderRadius = 2; buttonLightingColor.FlatStyle = FlatStyle.Flat; buttonLightingColor.ForeColor = SystemColors.ControlText; buttonLightingColor.Location = new Point(488, 145); buttonLightingColor.Margin = new Padding(0); buttonLightingColor.Name = "buttonLightingColor"; buttonLightingColor.Secondary = false; buttonLightingColor.Size = new Size(180, 50); buttonLightingColor.TabIndex = 49; buttonLightingColor.Text = Properties.Strings.Color; buttonLightingColor.TextAlign = ContentAlignment.MiddleLeft; buttonLightingColor.UseVisualStyleBackColor = false; // // comboBoxLightingMode // comboBoxLightingMode.BorderColor = Color.White; comboBoxLightingMode.ButtonColor = Color.FromArgb(255, 255, 255); comboBoxLightingMode.DropDownStyle = ComboBoxStyle.DropDownList; comboBoxLightingMode.FlatStyle = FlatStyle.Flat; comboBoxLightingMode.FormattingEnabled = true; comboBoxLightingMode.Location = new Point(490, 96); comboBoxLightingMode.Margin = new Padding(22, 0, 22, 0); comboBoxLightingMode.Name = "comboBoxLightingMode"; comboBoxLightingMode.Size = new Size(378, 40); comboBoxLightingMode.TabIndex = 46; // // labelLightingMode // labelLightingMode.Location = new Point(10, 96); labelLightingMode.Margin = new Padding(8, 0, 8, 0); labelLightingMode.Name = "labelLightingMode"; labelLightingMode.Size = new Size(422, 44); labelLightingMode.TabIndex = 47; labelLightingMode.Text = "Lighting Mode"; // // panelLightingHeader // panelLightingHeader.BackColor = SystemColors.ControlLight; panelLightingHeader.Controls.Add(sliderBrightness); panelLightingHeader.Controls.Add(pictureBoxLighting); panelLightingHeader.Controls.Add(labelLighting); panelLightingHeader.Dock = DockStyle.Top; panelLightingHeader.Location = new Point(0, 0); panelLightingHeader.Margin = new Padding(4); panelLightingHeader.Name = "panelLightingHeader"; panelLightingHeader.Size = new Size(881, 40); panelLightingHeader.TabIndex = 41; // // sliderBrightness // sliderBrightness.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Right; sliderBrightness.Location = new Point(497, 2); sliderBrightness.Margin = new Padding(2); sliderBrightness.Max = 100; sliderBrightness.Min = 0; sliderBrightness.Name = "sliderBrightness"; sliderBrightness.Size = new Size(378, 36); sliderBrightness.Step = 1; sliderBrightness.TabIndex = 51; sliderBrightness.Text = "sliderBrightness"; sliderBrightness.Value = 25; // // pictureBoxLighting // pictureBoxLighting.BackgroundImage = Properties.Resources.backlight; pictureBoxLighting.BackgroundImageLayout = ImageLayout.Zoom; pictureBoxLighting.Location = new Point(6, 0); pictureBoxLighting.Margin = new Padding(4); pictureBoxLighting.Name = "pictureBoxLighting"; pictureBoxLighting.Size = new Size(32, 32); pictureBoxLighting.TabIndex = 35; pictureBoxLighting.TabStop = false; // // labelLighting // labelLighting.AutoSize = true; labelLighting.Font = new Font("Segoe UI", 9F, FontStyle.Bold); labelLighting.Location = new Point(44, 0); labelLighting.Margin = new Padding(8, 0, 8, 0); labelLighting.Name = "labelLighting"; labelLighting.Size = new Size(108, 32); labelLighting.TabIndex = 34; labelLighting.Text = "Lighting"; // // panelEnergy // panelEnergy.AutoSize = true; panelEnergy.AutoSizeMode = AutoSizeMode.GrowAndShrink; panelEnergy.Controls.Add(labelLowBatteryWarningValue); panelEnergy.Controls.Add(comboBoxAutoPowerOff); panelEnergy.Controls.Add(sliderLowBatteryWarning); panelEnergy.Controls.Add(labelLowBatteryWarning); panelEnergy.Controls.Add(labelAutoPowerOff); panelEnergy.Controls.Add(panelEnergyHeader); panelEnergy.Dock = DockStyle.Top; panelEnergy.Location = new Point(14, 1211); panelEnergy.Margin = new Padding(4); panelEnergy.Name = "panelEnergy"; panelEnergy.Padding = new Padding(0, 0, 0, 34); panelEnergy.Size = new Size(881, 192); panelEnergy.TabIndex = 43; // // labelLowBatteryWarningValue // labelLowBatteryWarningValue.Location = new Point(802, 114); labelLowBatteryWarningValue.Margin = new Padding(8, 0, 8, 0); labelLowBatteryWarningValue.Name = "labelLowBatteryWarningValue"; labelLowBatteryWarningValue.Size = new Size(64, 40); labelLowBatteryWarningValue.TabIndex = 51; labelLowBatteryWarningValue.Text = "20%"; labelLowBatteryWarningValue.TextAlign = ContentAlignment.MiddleRight; // // comboBoxAutoPowerOff // comboBoxAutoPowerOff.BorderColor = Color.White; comboBoxAutoPowerOff.ButtonColor = Color.FromArgb(255, 255, 255); comboBoxAutoPowerOff.DropDownStyle = ComboBoxStyle.DropDownList; comboBoxAutoPowerOff.FlatStyle = FlatStyle.Flat; comboBoxAutoPowerOff.FormattingEnabled = true; comboBoxAutoPowerOff.Location = new Point(490, 58); comboBoxAutoPowerOff.Margin = new Padding(22, 0, 22, 0); comboBoxAutoPowerOff.Name = "comboBoxAutoPowerOff"; comboBoxAutoPowerOff.Size = new Size(378, 40); comboBoxAutoPowerOff.TabIndex = 56; // // sliderLowBatteryWarning // sliderLowBatteryWarning.AccessibleName = "DPI Slider"; sliderLowBatteryWarning.Location = new Point(482, 114); sliderLowBatteryWarning.Margin = new Padding(4); sliderLowBatteryWarning.Max = 50; sliderLowBatteryWarning.Min = 0; sliderLowBatteryWarning.Name = "sliderLowBatteryWarning"; sliderLowBatteryWarning.Size = new Size(324, 40); sliderLowBatteryWarning.Step = 10; sliderLowBatteryWarning.TabIndex = 50; sliderLowBatteryWarning.TabStop = false; sliderLowBatteryWarning.Text = "sliderBattery"; sliderLowBatteryWarning.Value = 0; // // labelLowBatteryWarning // labelLowBatteryWarning.Location = new Point(10, 110); labelLowBatteryWarning.Margin = new Padding(8, 0, 8, 0); labelLowBatteryWarning.Name = "labelLowBatteryWarning"; labelLowBatteryWarning.Size = new Size(422, 44); labelLowBatteryWarning.TabIndex = 57; labelLowBatteryWarning.Text = "Low Battery Warning"; // // labelAutoPowerOff // labelAutoPowerOff.Location = new Point(10, 58); labelAutoPowerOff.Margin = new Padding(8, 0, 8, 0); labelAutoPowerOff.Name = "labelAutoPowerOff"; labelAutoPowerOff.Size = new Size(422, 44); labelAutoPowerOff.TabIndex = 56; labelAutoPowerOff.Text = "Auto Power Off"; // // panelEnergyHeader // panelEnergyHeader.BackColor = SystemColors.ControlLight; panelEnergyHeader.Controls.Add(pictureBoxEnergy); panelEnergyHeader.Controls.Add(labelEnergy); panelEnergyHeader.Dock = DockStyle.Top; panelEnergyHeader.Location = new Point(0, 0); panelEnergyHeader.Margin = new Padding(4); panelEnergyHeader.Name = "panelEnergyHeader"; panelEnergyHeader.Size = new Size(881, 40); panelEnergyHeader.TabIndex = 41; // // pictureBoxEnergy // pictureBoxEnergy.BackgroundImage = Properties.Resources.icons8_charging_battery_32; pictureBoxEnergy.BackgroundImageLayout = ImageLayout.Zoom; pictureBoxEnergy.Location = new Point(6, 0); pictureBoxEnergy.Margin = new Padding(4); pictureBoxEnergy.Name = "pictureBoxEnergy"; pictureBoxEnergy.Size = new Size(32, 32); pictureBoxEnergy.TabIndex = 35; pictureBoxEnergy.TabStop = false; // // labelEnergy // labelEnergy.AutoSize = true; labelEnergy.Font = new Font("Segoe UI", 9F, FontStyle.Bold); labelEnergy.Location = new Point(44, 0); labelEnergy.Margin = new Padding(8, 0, 8, 0); labelEnergy.Name = "labelEnergy"; labelEnergy.Size = new Size(93, 32); labelEnergy.TabIndex = 34; labelEnergy.Text = "Energy"; // // tableLayoutProfiles // tableLayoutProfiles.AutoSize = true; tableLayoutProfiles.AutoSizeMode = AutoSizeMode.GrowAndShrink; tableLayoutProfiles.ColumnCount = 2; tableLayoutProfiles.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F)); tableLayoutProfiles.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F)); tableLayoutProfiles.Controls.Add(panelProfiles, 1, 0); tableLayoutProfiles.Controls.Add(panelBatteryState, 0, 0); tableLayoutProfiles.Dock = DockStyle.Top; tableLayoutProfiles.Location = new Point(14, 14); tableLayoutProfiles.Margin = new Padding(4); tableLayoutProfiles.Name = "tableLayoutProfiles"; tableLayoutProfiles.RowCount = 1; tableLayoutProfiles.RowStyles.Add(new RowStyle(SizeType.Percent, 50F)); tableLayoutProfiles.RowStyles.Add(new RowStyle(SizeType.Percent, 50F)); tableLayoutProfiles.Size = new Size(881, 76); tableLayoutProfiles.TabIndex = 44; // // panelBatteryState // panelBatteryState.Controls.Add(labelChargingState); panelBatteryState.Controls.Add(labelBatteryState); panelBatteryState.Controls.Add(pictureBoxBatteryState); panelBatteryState.Location = new Point(4, 4); panelBatteryState.Margin = new Padding(4); panelBatteryState.Name = "panelBatteryState"; panelBatteryState.Size = new Size(400, 66); panelBatteryState.TabIndex = 1; // // labelChargingState // labelChargingState.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left; labelChargingState.AutoSize = true; labelChargingState.Font = new Font("Segoe UI", 10F, FontStyle.Bold); labelChargingState.Location = new Point(154, 14); labelChargingState.Margin = new Padding(4, 0, 4, 0); labelChargingState.Name = "labelChargingState"; labelChargingState.Size = new Size(134, 37); labelChargingState.TabIndex = 38; labelChargingState.Text = "Charging"; labelChargingState.TextAlign = ContentAlignment.MiddleLeft; // // labelBatteryState // labelBatteryState.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Right; labelBatteryState.AutoSize = true; labelBatteryState.Font = new Font("Segoe UI", 10F, FontStyle.Bold); labelBatteryState.Location = new Point(60, 14); labelBatteryState.Margin = new Padding(4, 0, 4, 0); labelBatteryState.Name = "labelBatteryState"; labelBatteryState.Size = new Size(88, 37); labelBatteryState.TabIndex = 37; labelBatteryState.Text = "100%"; labelBatteryState.TextAlign = ContentAlignment.MiddleRight; // // pictureBoxBatteryState // pictureBoxBatteryState.BackgroundImage = Properties.Resources.icons8_ladende_batterie_48; pictureBoxBatteryState.BackgroundImageLayout = ImageLayout.Zoom; pictureBoxBatteryState.Dock = DockStyle.Left; pictureBoxBatteryState.Location = new Point(0, 0); pictureBoxBatteryState.Margin = new Padding(4); pictureBoxBatteryState.Name = "pictureBoxBatteryState"; pictureBoxBatteryState.Size = new Size(52, 66); pictureBoxBatteryState.TabIndex = 36; pictureBoxBatteryState.TabStop = false; // // buttonSync // buttonSync.AccessibleName = "Keyboard Color"; buttonSync.Activated = false; buttonSync.Anchor = AnchorStyles.Top | AnchorStyles.Right; buttonSync.BackColor = SystemColors.ButtonHighlight; buttonSync.BorderColor = Color.Transparent; buttonSync.BorderRadius = 2; buttonSync.FlatStyle = FlatStyle.Flat; buttonSync.ForeColor = SystemColors.ControlText; buttonSync.Location = new Point(8, 74); buttonSync.Margin = new Padding(4, 8, 4, 8); buttonSync.Name = "buttonSync"; buttonSync.Secondary = false; buttonSync.Size = new Size(852, 50); buttonSync.TabIndex = 46; buttonSync.Text = "Synchronize with Mouse"; buttonSync.UseVisualStyleBackColor = false; buttonSync.Click += ButtonSync_Click; // // panelBottomButtons // panelBottomButtons.AutoSizeMode = AutoSizeMode.GrowAndShrink; panelBottomButtons.Controls.Add(buttonImport); panelBottomButtons.Controls.Add(buttonExport); panelBottomButtons.Controls.Add(buttonSync); panelBottomButtons.Dock = DockStyle.Top; panelBottomButtons.Location = new Point(14, 1403); panelBottomButtons.Margin = new Padding(4); panelBottomButtons.Name = "panelBottomButtons"; panelBottomButtons.Size = new Size(881, 132); panelBottomButtons.TabIndex = 47; // // buttonImport // buttonImport.AccessibleName = "Keyboard Color"; buttonImport.Activated = false; buttonImport.Anchor = AnchorStyles.Top | AnchorStyles.Right; buttonImport.BackColor = SystemColors.ButtonHighlight; buttonImport.BorderColor = Color.Transparent; buttonImport.BorderRadius = 2; buttonImport.FlatStyle = FlatStyle.Flat; buttonImport.ForeColor = SystemColors.ControlText; buttonImport.Location = new Point(440, 12); buttonImport.Margin = new Padding(4, 8, 4, 8); buttonImport.Name = "buttonImport"; buttonImport.Secondary = false; buttonImport.Size = new Size(420, 50); buttonImport.TabIndex = 48; buttonImport.Text = "Import Profile"; buttonImport.UseVisualStyleBackColor = false; buttonImport.Click += buttonImport_Click; // // buttonExport // buttonExport.AccessibleName = "Keyboard Color"; buttonExport.Activated = false; buttonExport.Anchor = AnchorStyles.Top | AnchorStyles.Right; buttonExport.BackColor = SystemColors.ButtonHighlight; buttonExport.BorderColor = Color.Transparent; buttonExport.BorderRadius = 2; buttonExport.FlatStyle = FlatStyle.Flat; buttonExport.ForeColor = SystemColors.ControlText; buttonExport.Location = new Point(8, 12); buttonExport.Margin = new Padding(4, 8, 4, 8); buttonExport.Name = "buttonExport"; buttonExport.Secondary = false; buttonExport.Size = new Size(420, 50); buttonExport.TabIndex = 47; buttonExport.Text = "Export Profile"; buttonExport.UseVisualStyleBackColor = false; buttonExport.Click += buttonExport_Click; // // tableLayoutPanel2 // tableLayoutPanel2.AutoSize = true; tableLayoutPanel2.AutoSizeMode = AutoSizeMode.GrowAndShrink; tableLayoutPanel2.ColumnCount = 4; tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F)); tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F)); tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F)); tableLayoutPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F)); tableLayoutPanel2.Controls.Add(rButton1, 0, 0); tableLayoutPanel2.Location = new Point(0, 0); tableLayoutPanel2.Name = "tableLayoutPanel2"; tableLayoutPanel2.RowCount = 1; tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Absolute, 20F)); tableLayoutPanel2.Size = new Size(200, 100); tableLayoutPanel2.TabIndex = 0; // // rButton1 // rButton1.AccessibleName = "DPI Setting 2"; rButton1.Activated = false; rButton1.BackColor = SystemColors.ControlLightLight; rButton1.BorderColor = Color.Transparent; rButton1.BorderRadius = 5; rButton1.Dock = DockStyle.Top; rButton1.FlatAppearance.BorderSize = 0; rButton1.FlatStyle = FlatStyle.Flat; rButton1.ForeColor = SystemColors.ControlText; rButton1.Image = Properties.Resources.lighting_dot_32; rButton1.ImageAlign = ContentAlignment.BottomCenter; rButton1.Location = new Point(3, 3); rButton1.Name = "rButton1"; rButton1.Secondary = false; rButton1.Size = new Size(44, 90); rButton1.TabIndex = 4; rButton1.Text = "DPI 2\r\n1000"; rButton1.TextImageRelation = TextImageRelation.ImageAboveText; rButton1.UseVisualStyleBackColor = false; // // rButton2 // rButton2.AccessibleName = "DPI Setting 1"; rButton2.Activated = false; rButton2.BackColor = SystemColors.ControlLightLight; rButton2.BorderColor = Color.Transparent; rButton2.BorderRadius = 5; rButton2.CausesValidation = false; rButton2.Dock = DockStyle.Top; rButton2.FlatAppearance.BorderSize = 0; rButton2.FlatStyle = FlatStyle.Flat; rButton2.ForeColor = SystemColors.ControlText; rButton2.Image = Properties.Resources.lighting_dot_32; rButton2.Location = new Point(3, 3); rButton2.Name = "rButton2"; rButton2.Secondary = false; rButton2.Size = new Size(44, 90); rButton2.TabIndex = 4; rButton2.Text = "DPI 1\r\n800"; rButton2.TextImageRelation = TextImageRelation.ImageAboveText; rButton2.UseVisualStyleBackColor = false; // // AsusMouseSettings // AutoScaleDimensions = new SizeF(192F, 192F); AutoScaleMode = AutoScaleMode.Dpi; AutoScroll = true; AutoSize = true; AutoSizeMode = AutoSizeMode.GrowAndShrink; ClientSize = new Size(909, 1558); Controls.Add(panelBottomButtons); Controls.Add(panelEnergy); Controls.Add(panelLighting); Controls.Add(panelPerformance); Controls.Add(tableLayoutProfiles); Margin = new Padding(4); MaximizeBox = false; MdiChildrenMinimizedAnchorBottom = false; MinimizeBox = false; MinimumSize = new Size(935, 760); Name = "AsusMouseSettings"; Padding = new Padding(14); ShowIcon = false; ShowInTaskbar = false; Text = "Mouse Settings"; panelProfiles.ResumeLayout(false); panelProfiles.PerformLayout(); panelPerformance.ResumeLayout(false); panelPerformance.PerformLayout(); panelPerformanceOther.ResumeLayout(false); panelPerformanceOther.PerformLayout(); panelDeceleration.ResumeLayout(false); panelAcceleration.ResumeLayout(false); panelLiftOffDistance.ResumeLayout(false); panelDebounce.ResumeLayout(false); panelAngleSnapping.ResumeLayout(false); panelMotionSync.ResumeLayout(false); panelZoneMode.ResumeLayout(false); panelPollingRate.ResumeLayout(false); panelDPISettings.ResumeLayout(false); panelDPISettings.PerformLayout(); tableLayoutPanel1.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)numericUpDownCurrentDPI).EndInit(); panelDPITile.ResumeLayout(false); panelDPITile.PerformLayout(); ((System.ComponentModel.ISupportInitialize)pictureDPIColor).EndInit(); tableDPI.ResumeLayout(false); panelPerformanceHeader.ResumeLayout(false); panelPerformanceHeader.PerformLayout(); ((System.ComponentModel.ISupportInitialize)pictureKeyboard).EndInit(); panelLighting.ResumeLayout(false); panelLighting.PerformLayout(); panelLightingContent.ResumeLayout(false); panelLightingContent.PerformLayout(); tableLayoutLightingZones.ResumeLayout(false); tableLayoutLightingZones.PerformLayout(); ((System.ComponentModel.ISupportInitialize)pictureBoxLightingColor).EndInit(); panelLightingHeader.ResumeLayout(false); panelLightingHeader.PerformLayout(); ((System.ComponentModel.ISupportInitialize)pictureBoxLighting).EndInit(); panelEnergy.ResumeLayout(false); panelEnergyHeader.ResumeLayout(false); panelEnergyHeader.PerformLayout(); ((System.ComponentModel.ISupportInitialize)pictureBoxEnergy).EndInit(); tableLayoutProfiles.ResumeLayout(false); panelBatteryState.ResumeLayout(false); panelBatteryState.PerformLayout(); ((System.ComponentModel.ISupportInitialize)pictureBoxBatteryState).EndInit(); panelBottomButtons.ResumeLayout(false); tableLayoutPanel2.ResumeLayout(false); ResumeLayout(false); PerformLayout(); } #endregion private Panel panelProfiles; private Label labelProfile; private UI.RComboBox comboProfile; private Panel panelPerformance; private Panel panelPerformanceHeader; private PictureBox pictureKeyboard; private Label labelPerformance; private Panel panelLighting; private Panel panelLightingHeader; private PictureBox pictureBoxLighting; private Label labelLighting; private Panel panelEnergy; private Panel panelEnergyHeader; private PictureBox pictureBoxEnergy; private Label labelEnergy; private TableLayoutPanel tableDPI; private UI.RButton buttonDPI2; private UI.RButton buttonDPI1; private UI.RButton buttonDPI3; private UI.RButton buttonDPI4; private UI.Slider sliderDPI; private Panel panelDPISettings; private TableLayoutPanel tableLayoutPanel1; private Label labelMinDPI; private Panel panelDPITile; private Label labelDPI; private TableLayoutPanel tableLayoutPollingRate; private UI.RComboBox comboBoxPollingRate; private UI.Slider sliderAngleAdjustment; private CheckBox checkBoxAngleSnapping; private Panel panelPerformanceOther; private TableLayoutPanel tableLayoutProfiles; private UI.RButton buttonDPIColor; private PictureBox pictureDPIColor; private UI.Slider sliderBrightness; private Label labelPollingRate; private Label labelAngleAdjustmentValue; private Panel panelLightingContent; private UI.RComboBox comboBoxLightingMode; private Label labelLightingMode; private PictureBox pictureBoxLightingColor; private UI.RButton buttonLightingColor; private CheckBox checkBoxRandomColor; private UI.RComboBox comboBoxAnimationSpeed; private Label labelAnimationSpeed; private UI.RComboBox comboBoxAnimationDirection; private Label labelAnimationDirection; private UI.RComboBox comboBoxLiftOffDistance; private Label labelLiftOffDistance; private Label labelLowBatteryWarningValue; private UI.RComboBox comboBoxAutoPowerOff; private UI.Slider sliderLowBatteryWarning; private Label labelLowBatteryWarning; private Label labelAutoPowerOff; private Panel panelBatteryState; private Label labelChargingState; private Label labelBatteryState; private PictureBox pictureBoxBatteryState; private UI.RButton buttonSync; private Panel panelBottomButtons; private TableLayoutPanel tableLayoutLightingZones; private UI.RButton buttonLightingZoneScroll; private UI.RButton buttonLightingZoneLogo; private UI.RButton buttonLightingZoneAll; private UI.RButton buttonLightingZoneUnderglow; private UI.RButton buttonLightingZoneDock; private TableLayoutPanel tableLayoutPanel2; private UI.RButton rButton1; private UI.RButton rButton2; private Label labelButtonDebounce; private Label labelButtonDebounceValue; private UI.Slider sliderButtonDebounce; private Panel panelPollingRate; private Panel panelAngleSnapping; private Panel panelMotionSync; private CheckBox checkBoxMotionSync; private Panel panelZoneMode; private CheckBox checkBoxZoneMode; private UI.RComboBox comboBoxZoneModePollingRate; private UI.Slider sliderZoneModeDPI; private NumericUpDown numericUpDownZoneModeDPI; private Panel panelLiftOffDistance; private Panel panelDebounce; private Panel panelDeceleration; private Label labelDeceleration; private UI.Slider sliderDeceleration; private Label labelDecelerationValue; private Panel panelAcceleration; private Label labelAcceleration; private UI.Slider sliderAcceleration; private Label labelAccelerationValue; private UI.RButton buttonImport; private UI.RButton buttonExport; private NumericUpDown numericUpDownCurrentDPI; private Label labelMaxDPI; } } ================================================ FILE: app/AsusMouseSettings.cs ================================================ using GHelper.Peripherals.Mouse; using GHelper.UI; namespace GHelper { public partial class AsusMouseSettings : RForm { private static Dictionary lightingModeNames = new Dictionary() { { LightingMode.Static,Properties.Strings.AuraStatic}, { LightingMode.Breathing, Properties.Strings.AuraBreathe}, { LightingMode.ColorCycle, Properties.Strings.AuraColorCycle}, { LightingMode.Rainbow, Properties.Strings.AuraRainbow}, { LightingMode.React, Properties.Strings.AuraReact}, { LightingMode.Comet, Properties.Strings.AuraComet}, { LightingMode.BatteryState, Properties.Strings.AuraBatteryState}, { LightingMode.Off, Properties.Strings.MatrixOff}, }; private List supportedLightingModes = new List(); private readonly AsusMouse mouse; private readonly RButton[] dpiButtons; private LightingZone visibleZone = LightingZone.All; private bool updateMouseDPI = true; public AsusMouseSettings(AsusMouse mouse) { this.mouse = mouse; InitializeComponent(); dpiButtons = new RButton[] { buttonDPI1, buttonDPI2, buttonDPI3, buttonDPI4 }; labelPollingRate.Text = Properties.Strings.PollingRate; labelLighting.Text = Properties.Strings.Lighting; labelLightingMode.Text = Properties.Strings.AuraLightingMode; labelEnergy.Text = Properties.Strings.EnergySettings; labelPerformance.Text = Properties.Strings.MousePerformance; checkBoxRandomColor.Text = Properties.Strings.AuraRandomColor; labelLowBatteryWarning.Text = Properties.Strings.MouseLowBatteryWarning; labelAutoPowerOff.Text = Properties.Strings.MouseAutoPowerOff; buttonSync.Text = Properties.Strings.MouseSynchronize; checkBoxAngleSnapping.Text = Properties.Strings.MouseAngleSnapping; labelLiftOffDistance.Text = Properties.Strings.MouseLiftOffDistance; labelChargingState.Text = "(" + Properties.Strings.Charging + ")"; labelProfile.Text = Properties.Strings.Profile; labelButtonDebounce.Text = Properties.Strings.MouseButtonResponse; labelAcceleration.Text = Properties.Strings.Acceleration; labelDeceleration.Text = Properties.Strings.Deceleration; checkBoxMotionSync.Text = Properties.Strings.MouseMotionSync; checkBoxZoneMode.Text = Properties.Strings.MouseZoneMode; buttonLightingZoneLogo.Text = Properties.Strings.AuraZoneLogo; buttonLightingZoneScroll.Text = Properties.Strings.AuraZoneScroll; buttonLightingZoneUnderglow.Text = Properties.Strings.AuraZoneUnderglow; buttonLightingZoneAll.Text = Properties.Strings.AuraZoneAll; buttonLightingZoneDock.Text = Properties.Strings.AuraZoneDock; buttonExport.Text = Properties.Strings.Export; buttonImport.Text = Properties.Strings.Import; InitTheme(true); this.Text = mouse.GetDisplayName(); Shown += AsusMouseSettings_Shown; FormClosing += AsusMouseSettings_FormClosing; comboProfile.DropDownClosed += ComboProfile_DropDownClosed; sliderDPI.ValueChanged += SliderDPI_ValueChanged; numericUpDownCurrentDPI.ValueChanged += NumericUpDownCurrentDPI_ValueChanged; sliderDPI.MouseUp += SliderDPI_MouseUp; sliderDPI.MouseDown += SliderDPI_MouseDown; buttonDPIColor.Click += ButtonDPIColor_Click; buttonDPI1.Click += ButtonDPI_Click; buttonDPI2.Click += ButtonDPI_Click; buttonDPI3.Click += ButtonDPI_Click; buttonDPI4.Click += ButtonDPI_Click; // Subscribe to Paint and MouseMove for Delete logic foreach (var btn in dpiButtons) { btn.Paint += DpiButton_Paint; btn.MouseMove += DpiButton_MouseMove; btn.MouseLeave += (s, e) => { (s as Control)?.Invalidate(); }; } comboBoxPollingRate.DropDownClosed += ComboBoxPollingRate_DropDownClosed; checkBoxAngleSnapping.CheckedChanged += CheckAngleSnapping_CheckedChanged; sliderAngleAdjustment.ValueChanged += SliderAngleAdjustment_ValueChanged; sliderAngleAdjustment.MouseUp += SliderAngleAdjustment_MouseUp; comboBoxLiftOffDistance.DropDownClosed += ComboBoxLiftOffDistance_DropDownClosed; sliderButtonDebounce.ValueChanged += SliderButtonDebounce_ValueChanged; sliderButtonDebounce.MouseUp += SliderButtonDebounce_MouseUp; checkBoxMotionSync.CheckedChanged += CheckBoxMotionSync_CheckedChanged; checkBoxZoneMode.CheckedChanged += CheckBoxZoneMode_CheckedChanged; sliderZoneModeDPI.ValueChanged += SliderZoneModeDPI_ValueChanged; sliderZoneModeDPI.MouseUp += SliderZoneModeDPI_MouseUp; numericUpDownZoneModeDPI.ValueChanged += NumericUpDownZoneModeDPI_ValueChanged; comboBoxZoneModePollingRate.DropDownClosed += ComboBoxZoneModePollingRate_DropDownClosed; sliderAcceleration.MouseUp += SliderAcceleration_MouseUp; sliderAcceleration.ValueChanged += SliderAcceleration_ValueChanged; sliderDeceleration.MouseUp += SliderDeceleration_MouseUp; sliderDeceleration.ValueChanged += SliderDeceleration_ValueChanged; buttonLightingColor.Click += ButtonLightingColor_Click; comboBoxLightingMode.DropDownClosed += ComboBoxLightingMode_DropDownClosed; sliderBrightness.MouseUp += SliderBrightness_MouseUp; comboBoxAnimationSpeed.DropDownClosed += ComboBoxAnimationSpeed_DropDownClosed; comboBoxAnimationDirection.DropDownClosed += ComboBoxAnimationDirection_DropDownClosed; checkBoxRandomColor.CheckedChanged += CheckBoxRandomColor_CheckedChanged; sliderLowBatteryWarning.ValueChanged += SliderLowBatteryWarning_ValueChanged; sliderLowBatteryWarning.MouseUp += SliderLowBatteryWarning_MouseUp; comboBoxAutoPowerOff.DropDownClosed += ComboBoxAutoPowerOff_DropDownClosed; buttonLightingZoneAll.Click += ButtonLightingZoneAll_Click; buttonLightingZoneDock.Click += ButtonLightingZoneDock_Click; buttonLightingZoneLogo.Click += ButtonLightingZoneLogo_Click; buttonLightingZoneUnderglow.Click += ButtonLightingZoneUnderglow_Click; buttonLightingZoneScroll.Click += ButtonLightingZoneScroll_Click; InitMouseCapabilities(); Logger.WriteLine(mouse.GetDisplayName() + " (GUI): Initialized capabilities. Synchronizing mouse data"); RefreshMouseData(); } private void SliderAcceleration_MouseUp(object? sender, MouseEventArgs e) { mouse.SetAcceleration(sliderAcceleration.Value); } private void SliderAcceleration_ValueChanged(object? sender, EventArgs e) { labelAccelerationValue.Text = sliderAcceleration.Value.ToString(); } private void SliderDeceleration_MouseUp(object? sender, MouseEventArgs e) { mouse.SetDeceleration(sliderDeceleration.Value); } private void SliderDeceleration_ValueChanged(object? sender, EventArgs e) { labelDecelerationValue.Text = sliderDeceleration.Value.ToString(); } private void SliderButtonDebounce_MouseUp(object? sender, MouseEventArgs e) { DebounceTime dbt = (DebounceTime)sliderButtonDebounce.Value; mouse.SetDebounce(dbt); } private void SliderButtonDebounce_ValueChanged(object? sender, EventArgs e) { DebounceTime dbt = (DebounceTime)sliderButtonDebounce.Value; int time = mouse.DebounceTimeInMS(dbt); labelButtonDebounceValue.Text = time + "ms"; } private void SwitchLightingZone(LightingZone zone) { if (!mouse.HasRGB()) { return; } visibleZone = zone; InitLightingModes(); VisusalizeLightingSettings(); } private void ButtonLightingZoneScroll_Click(object? sender, EventArgs e) { SwitchLightingZone(LightingZone.Scrollwheel); } private void ButtonLightingZoneUnderglow_Click(object? sender, EventArgs e) { SwitchLightingZone(LightingZone.Underglow); } private void ButtonLightingZoneLogo_Click(object? sender, EventArgs e) { SwitchLightingZone(LightingZone.Logo); } private void ButtonLightingZoneDock_Click(object? sender, EventArgs e) { SwitchLightingZone(LightingZone.Dock); } private void ButtonLightingZoneAll_Click(object? sender, EventArgs e) { SwitchLightingZone(LightingZone.All); } private void AsusMouseSettings_FormClosing(object? sender, FormClosingEventArgs e) { mouse.BatteryUpdated -= Mouse_BatteryUpdated; mouse.Disconnect -= Mouse_Disconnect; mouse.MouseReadyChanged -= Mouse_MouseReadyChanged; } private void Mouse_MouseReadyChanged(object? sender, EventArgs e) { if (Disposing || IsDisposed) { return; } if (!mouse.IsDeviceReady) { this.Invoke(delegate { Close(); }); } } private void Mouse_BatteryUpdated(object? sender, EventArgs e) { if (Disposing || IsDisposed) { return; } this.Invoke(delegate { VisualizeBatteryState(); }); } private void ComboProfile_DropDownClosed(object? sender, EventArgs e) { if (mouse.Profile == comboProfile.SelectedIndex) { return; } mouse.SetProfile(comboProfile.SelectedIndex); RefreshMouseData(); } private void ComboBoxPollingRate_DropDownClosed(object? sender, EventArgs e) { mouse.SetPollingRate(mouse.SupportedPollingrates()[comboBoxPollingRate.SelectedIndex]); UpdateMotionSyncState(); } private void ButtonDPIColor_Click(object? sender, EventArgs e) { ColorDialog colorDlg = new ColorDialog { AllowFullOpen = true, Color = pictureDPIColor.BackColor }; if (colorDlg.ShowDialog() == DialogResult.OK) { AsusMouseDPI dpi = mouse.DpiSettings[mouse.DpiProfile - 1]; dpi.Color = colorDlg.Color; mouse.SetDPIForProfile(dpi, mouse.DpiProfile); VisualizeDPIButtons(); VisualizeCurrentDPIProfile(); } } // Logic for Delete Area bool IsOverDeleteArea(Control btn, Point p) { // Top Right corner float size = 16 * ControlHelper.Scale; if (p.X > btn.Width - size - 5 && p.Y < size + 5) return true; return false; } private void DpiButton_MouseMove(object? sender, MouseEventArgs e) { if (sender is RButton btn) { // Trigger repaint to show/hide X btn.Invalidate(); } } private void DpiButton_Paint(object? sender, PaintEventArgs e) { if (sender is not RButton btn) return; int index = Array.IndexOf(dpiButtons, btn); if (index == -1 || index >= mouse.CurrentDPIProfileCount) return; if (!mouse.CanChangeDPICount()) return; if (mouse.CurrentDPIProfileCount <= 2) return; // Check if mouse is within client area to draw hover effect Point clientPoint = btn.PointToClient(Cursor.Position); if (!btn.ClientRectangle.Contains(clientPoint)) return; // Draw X in top right (gray-white color) Image img = ControlHelper.ResizeImage( ControlHelper.TintImage(Properties.Resources.cross_23, Color.FromArgb(170, 170, 170)), ControlHelper.Scale); e.Graphics.DrawImage(img, new Point(btn.Width - img.Width - 5, 5)); } private void ButtonDPI_Click(object? sender, EventArgs e) { int index = -1; for (int i = 0; i < dpiButtons.Length; ++i) { if (sender == dpiButtons[i]) { index = i; break; } } if (index == -1) return; // Check for Delete Click if (mouse.CanChangeDPICount() && index < mouse.CurrentDPIProfileCount && mouse.CurrentDPIProfileCount > 2) { Point p = dpiButtons[index].PointToClient(Cursor.Position); if (IsOverDeleteArea(dpiButtons[index], p)) { mouse.DeleteDPIProfile(index); VisualizeDPIButtons(); VisualizeCurrentDPIProfile(); return; } } // Logic: // If index < CurrentCount -> Switch Profile // If index == CurrentCount -> Add Profile if (index < mouse.CurrentDPIProfileCount) { mouse.SetDPIProfile(index + 1); } else if (index == mouse.CurrentDPIProfileCount) { mouse.AddDPIProfile(); // Ensure UI re-renders to show new profile VisualizeDPIButtons(); VisualizeCurrentDPIProfile(); return; } VisualizeDPIButtons(); VisualizeCurrentDPIProfile(); } private void UpdateLightingSettings(LightingSetting settings, LightingZone zone) { mouse.SetLightingSetting(settings, visibleZone); VisusalizeLightingSettings(); } private void CheckBoxRandomColor_CheckedChanged(object? sender, EventArgs e) { LightingSetting? ls = mouse.LightingSettingForZone(visibleZone); ls.RandomColor = checkBoxRandomColor.Checked; UpdateLightingSettings(ls, visibleZone); } private void ComboBoxAnimationDirection_DropDownClosed(object? sender, EventArgs e) { LightingSetting? ls = mouse.LightingSettingForZone(visibleZone); ls.AnimationDirection = (AnimationDirection)comboBoxAnimationDirection.SelectedIndex; UpdateLightingSettings(ls, visibleZone); } private void ComboBoxAnimationSpeed_DropDownClosed(object? sender, EventArgs e) { LightingSetting? ls = mouse.LightingSettingForZone(visibleZone); // 0 => 0x9 // 1 => 0x7 // 2 => 0x5 ls.AnimationSpeed = (AnimationSpeed)(0x9 - (comboBoxAnimationSpeed.SelectedIndex * 0x2)); UpdateLightingSettings(ls, visibleZone); } private void SliderBrightness_MouseUp(object? sender, MouseEventArgs e) { LightingSetting? ls = mouse.LightingSettingForZone(visibleZone); ls.Brightness = sliderBrightness.Value; UpdateLightingSettings(ls, visibleZone); } private void ComboBoxLightingMode_DropDownClosed(object? sender, EventArgs e) { if (!mouse.HasRGB()) { return; } var index = comboBoxLightingMode.SelectedIndex; LightingMode lm = supportedLightingModes[(index >= 0 && index < supportedLightingModes.Count) ? index : 0]; LightingSetting? ls = mouse.LightingSettingForZone(visibleZone); if (ls.LightingMode == lm) { //Nothing to do here. return; } ls.LightingMode = lm; UpdateLightingSettings(ls, visibleZone); } private void ButtonLightingColor_Click(object? sender, EventArgs e) { ColorDialog colorDlg = new ColorDialog { AllowFullOpen = true, Color = pictureBoxLightingColor.BackColor }; if (colorDlg.ShowDialog() == DialogResult.OK) { LightingSetting? ls = mouse.LightingSettingForZone(visibleZone); ls.RGBColor = colorDlg.Color; UpdateLightingSettings(ls, visibleZone); } } private void SliderLowBatteryWarning_ValueChanged(object? sender, EventArgs e) { labelLowBatteryWarningValue.Text = sliderLowBatteryWarning.Value.ToString() + "%"; } private void SliderLowBatteryWarning_MouseUp(object? sender, MouseEventArgs e) { mouse.SetEnergySettings(sliderLowBatteryWarning.Value, mouse.PowerOffSetting); } private void ComboBoxAutoPowerOff_DropDownClosed(object? sender, EventArgs e) { object? obj = Enum.GetValues(typeof(PowerOffSetting)).GetValue(comboBoxAutoPowerOff.SelectedIndex); if (obj is null) { return; } PowerOffSetting pos = (PowerOffSetting)obj; mouse.SetEnergySettings(mouse.LowBatteryWarning, pos); } private void SliderAngleAdjustment_ValueChanged(object? sender, EventArgs e) { labelAngleAdjustmentValue.Text = sliderAngleAdjustment.Value.ToString() + "°"; } private void SliderAngleAdjustment_MouseUp(object? sender, MouseEventArgs e) { mouse.SetAngleAdjustment((short)sliderAngleAdjustment.Value); } private void ComboBoxLiftOffDistance_DropDownClosed(object? sender, EventArgs e) { mouse.SetLiftOffDistance((LiftOffDistance)comboBoxLiftOffDistance.SelectedIndex); } private void CheckAngleSnapping_CheckedChanged(object? sender, EventArgs e) { mouse.SetAngleSnapping(checkBoxAngleSnapping.Checked); mouse.SetAngleAdjustment((short)sliderAngleAdjustment.Value); } private void CheckBoxMotionSync_CheckedChanged(object? sender, EventArgs e) { mouse.SetMotionSync(checkBoxMotionSync.Checked); } private void CheckBoxZoneMode_CheckedChanged(object? sender, EventArgs e) { mouse.SetZoneMode(checkBoxZoneMode.Checked); UpdateZoneModeUIState(); } private void SliderZoneModeDPI_ValueChanged(object? sender, EventArgs e) { numericUpDownZoneModeDPI.Value = sliderZoneModeDPI.Value; } private void SliderZoneModeDPI_MouseUp(object? sender, MouseEventArgs e) { mouse.ZoneModeDPI = sliderZoneModeDPI.Value; if (mouse.ZoneMode) { mouse.UpdateZoneModeDPI(sliderZoneModeDPI.Value); } } private void NumericUpDownZoneModeDPI_ValueChanged(object? sender, EventArgs e) { sliderZoneModeDPI.Value = (int)numericUpDownZoneModeDPI.Value; if (mouse.ZoneMode && mouse.ZoneModeDPI != sliderZoneModeDPI.Value) { mouse.ZoneModeDPI = sliderZoneModeDPI.Value; mouse.UpdateZoneModeDPI(sliderZoneModeDPI.Value); } } private void ComboBoxZoneModePollingRate_DropDownClosed(object? sender, EventArgs e) { PollingRate[] zoneModePollingRates = { PollingRate.PR1000Hz, PollingRate.PR2000Hz, PollingRate.PR4000Hz, PollingRate.PR8000Hz }; if (comboBoxZoneModePollingRate.SelectedIndex >= 0 && comboBoxZoneModePollingRate.SelectedIndex < zoneModePollingRates.Length) { mouse.ZoneModePollingRate = zoneModePollingRates[comboBoxZoneModePollingRate.SelectedIndex]; if (mouse.ZoneMode) { mouse.UpdateZoneModePollingRate(mouse.ZoneModePollingRate); } } } private void SliderDPI_ValueChanged(object? sender, EventArgs e) { numericUpDownCurrentDPI.Value = sliderDPI.Value; UpdateMouseDPISettings(); } private void NumericUpDownCurrentDPI_ValueChanged(object? sender, EventArgs e) { sliderDPI.Value = (int)numericUpDownCurrentDPI.Value; } private void SliderDPI_MouseDown(object? sender, MouseEventArgs e) { updateMouseDPI = false; } private void SliderDPI_MouseUp(object? sender, MouseEventArgs e) { updateMouseDPI = true; UpdateMouseDPISettings(); } private void UpdateMouseDPISettings() { if (!updateMouseDPI) { return; } AsusMouseDPI dpi = mouse.DpiSettings[mouse.DpiProfile - 1]; dpi.DPI = (uint)sliderDPI.Value; mouse.SetDPIForProfile(dpi, mouse.DpiProfile); VisualizeDPIButtons(); VisualizeCurrentDPIProfile(); } private void Mouse_Disconnect(object? sender, EventArgs e) { if (Disposing || IsDisposed) { return; } //Mouse disconnected. Bye bye. this.Invoke(delegate { this.Close(); }); } private void RefreshMouseData() { mouse.SynchronizeDevice(); Logger.WriteLine(mouse.GetDisplayName() + " (GUI): Mouse data synchronized"); if (!mouse.IsDeviceReady) { Logger.WriteLine(mouse.GetDisplayName() + " (GUI): Mouse is not ready. Closing view."); Mouse_Disconnect(this, EventArgs.Empty); return; } if (Disposing || IsDisposed) { return; } VisualizeMouseSettings(); VisualizeBatteryState(); } private void InitMouseCapabilities() { for (int i = 0; i < mouse.ProfileCount(); ++i) { String prf = Properties.Strings.Profile + " " + (i + 1); comboProfile.Items.Add(prf); } labelMinDPI.Text = mouse.MinDPI().ToString(); labelMaxDPI.Text = mouse.MaxDPI().ToString(); sliderDPI.Max = mouse.MaxDPI(); sliderDPI.Min = mouse.MinDPI(); sliderDPI.Step = mouse.DPIIncrements(); numericUpDownCurrentDPI.Minimum = mouse.MinDPI(); numericUpDownCurrentDPI.Maximum = mouse.MaxDPI(); numericUpDownCurrentDPI.Increment = mouse.DPIIncrements(); if (!mouse.HasDebounceSetting()) { panelDebounce.Visible = false; } if (!mouse.HasDPIColors()) { buttonDPIColor.Visible = false; pictureDPIColor.Visible = false; buttonDPI1.Image = ControlHelper.ResizeImage(ControlHelper.TintImage(Properties.Resources.lighting_dot_32, Color.Red), ControlHelper.Scale); buttonDPI2.Image = ControlHelper.ResizeImage(ControlHelper.TintImage(Properties.Resources.lighting_dot_32, Color.Purple), ControlHelper.Scale); buttonDPI3.Image = ControlHelper.ResizeImage(ControlHelper.TintImage(Properties.Resources.lighting_dot_32, Color.Blue), ControlHelper.Scale); buttonDPI4.Image = ControlHelper.ResizeImage(ControlHelper.TintImage(Properties.Resources.lighting_dot_32, Color.Green), ControlHelper.Scale); buttonDPI1.BorderColor = Color.Red; buttonDPI2.BorderColor = Color.Purple; buttonDPI3.BorderColor = Color.Blue; buttonDPI4.BorderColor = Color.Green; } if (mouse.CanSetPollingRate()) { foreach (PollingRate pr in mouse.SupportedPollingrates()) { comboBoxPollingRate.Items.Add(mouse.PollingRateDisplayString(pr)); } } else { panelPollingRate.Visible = false; } if (!mouse.HasAngleSnapping()) { checkBoxAngleSnapping.Visible = false; } if (!mouse.HasAngleTuning()) { labelAngleAdjustmentValue.Visible = false; sliderAngleAdjustment.Visible = false; sliderAngleAdjustment.Max = mouse.AngleTuningMax(); sliderAngleAdjustment.Min = mouse.AngleTuningMin(); sliderAngleAdjustment.Step = mouse.AngleTuningStep(); } if (!mouse.HasAngleTuning() && !mouse.HasAngleSnapping()) { panelAngleSnapping.Visible = false; } if (!mouse.HasMotionSync()) { panelMotionSync.Visible = false; } if (!mouse.HasZoneMode()) { panelZoneMode.Visible = false; } else { // Initialize Zone Mode Polling Rate combobox with limited options comboBoxZoneModePollingRate.Items.Clear(); comboBoxZoneModePollingRate.Items.Add("1000 Hz"); comboBoxZoneModePollingRate.Items.Add("2000 Hz"); comboBoxZoneModePollingRate.Items.Add("4000 Hz"); comboBoxZoneModePollingRate.Items.Add("8000 Hz"); comboBoxZoneModePollingRate.SelectedIndex = 2; // Default to 4000Hz } if (mouse.HasAcceleration()) { sliderAcceleration.Max = mouse.MaxAcceleration(); } else { panelAcceleration.Visible = false; } if (mouse.HasDeceleration()) { sliderDeceleration.Max = mouse.MaxDeceleration(); } else { panelDeceleration.Visible = false; } if (mouse.HasLiftOffSetting()) { comboBoxLiftOffDistance.Items.AddRange(new string[] { Properties.Strings.Low, Properties.Strings.High, }); } else { panelLiftOffDistance.Visible = false; } if (mouse.DPIProfileCount() < 4) { for (int i = 3; i > mouse.DPIProfileCount() - 1; --i) { dpiButtons[i].Visible = false; } } if (!mouse.HasBattery()) { panelBatteryState.Visible = false; } if (mouse.HasAutoPowerOff()) { comboBoxAutoPowerOff.Items.AddRange(new string[]{ " 1 "+ Properties.Strings.Minute, " 2 "+ Properties.Strings.Minutes, " 3 "+ Properties.Strings.Minutes, " 5 "+ Properties.Strings.Minutes, "10 "+ Properties.Strings.Minutes, Properties.Strings.Never, }); } if (!mouse.HasLowBatteryWarning()) { labelLowBatteryWarning.Visible = false; labelLowBatteryWarningValue.Visible = false; sliderLowBatteryWarning.Visible = false; } else { sliderLowBatteryWarning.Min = 0; sliderLowBatteryWarning.Step = mouse.LowBatteryWarningStep(); sliderLowBatteryWarning.Max = mouse.LowBatteryWarningMax(); } if (!mouse.HasAutoPowerOff() && !mouse.HasLowBatteryWarning()) { panelEnergy.Visible = false; } if (mouse.HasRGB()) { if (mouse.SupportedLightingZones().Length > 1) { buttonLightingZoneLogo.Visible = mouse.SupportedLightingZones().Contains(LightingZone.Logo); buttonLightingZoneScroll.Visible = mouse.SupportedLightingZones().Contains(LightingZone.Scrollwheel); buttonLightingZoneUnderglow.Visible = mouse.SupportedLightingZones().Contains(LightingZone.Underglow); buttonLightingZoneDock.Visible = mouse.SupportedLightingZones().Contains(LightingZone.Dock); } else { buttonLightingZoneLogo.Visible = false; buttonLightingZoneScroll.Visible = false; buttonLightingZoneUnderglow.Visible = false; buttonLightingZoneDock.Visible = false; } sliderBrightness.Max = mouse.MaxBrightness(); InitLightingModes(); comboBoxAnimationDirection.Items.AddRange(new string[] { Properties.Strings.AuraClockwise, Properties.Strings.AuraCounterClockwise, }); comboBoxAnimationSpeed.Items.AddRange(new string[] { Properties.Strings.AuraSlow, Properties.Strings.AuraNormal, Properties.Strings.AuraFast }); } else { panelLighting.Visible = false; } } private void InitLightingModes() { comboBoxLightingMode.Items.Clear(); supportedLightingModes.Clear(); foreach (LightingMode lm in Enum.GetValues(typeof(LightingMode))) { if (mouse.IsLightingModeSupported(lm) && mouse.IsLightingModeSupportedForZone(lm, visibleZone)) { comboBoxLightingMode.Items.Add(lightingModeNames.GetValueOrDefault(lm)); supportedLightingModes.Add(lm); } } } private void VisualizeMouseSettings() { if (mouse.Profile < comboProfile.Items.Count) comboProfile.SelectedIndex = mouse.Profile; if (mouse.HasRGB()) { //If current lighting mode is zoned, pre-select the first zone and not "All". bool zoned = mouse.IsLightingZoned(); if (zoned) { visibleZone = mouse.SupportedLightingZones()[0]; InitLightingModes(); } } VisualizeDPIButtons(); VisualizeCurrentDPIProfile(); VisusalizeLightingSettings(); if (mouse.CanSetPollingRate()) { int idx = mouse.PollingRateIndex(mouse.PollingRate); if (idx == -1) { return; } comboBoxPollingRate.SelectedIndex = idx; } if (mouse.HasAngleSnapping()) { checkBoxAngleSnapping.Checked = mouse.AngleSnapping; } if (mouse.HasAngleTuning()) { sliderAngleAdjustment.Value = mouse.AngleAdjustmentDegrees; } if (mouse.HasAutoPowerOff()) { if (mouse.PowerOffSetting == PowerOffSetting.Never) { comboBoxAutoPowerOff.SelectedIndex = comboBoxAutoPowerOff.Items.Count - 1; } else { comboBoxAutoPowerOff.SelectedIndex = (int)mouse.PowerOffSetting; } } if (mouse.HasLowBatteryWarning()) { sliderLowBatteryWarning.Value = mouse.LowBatteryWarning; } if (mouse.HasLiftOffSetting()) { comboBoxLiftOffDistance.SelectedIndex = (int)mouse.LiftOffDistance; } if (mouse.HasDebounceSetting()) { sliderButtonDebounce.Min = (int)mouse.MinDebounce(); sliderButtonDebounce.Max = (int)mouse.MaxDebounce(); sliderButtonDebounce.Value = (int)mouse.Debounce; } if (mouse.HasAcceleration()) { sliderAcceleration.Value = mouse.Acceleration; } if (mouse.HasDeceleration()) { sliderDeceleration.Value = mouse.Deceleration; } if (mouse.HasMotionSync()) { UpdateMotionSyncState(); } if (mouse.HasZoneMode()) { checkBoxZoneMode.Checked = mouse.ZoneMode; sliderZoneModeDPI.Value = mouse.ZoneModeDPI; numericUpDownZoneModeDPI.Value = mouse.ZoneModeDPI; // Set Zone Mode Polling Rate combobox PollingRate[] zoneModePollingRates = { PollingRate.PR1000Hz, PollingRate.PR2000Hz, PollingRate.PR4000Hz, PollingRate.PR8000Hz }; int prIndex = Array.IndexOf(zoneModePollingRates, mouse.ZoneModePollingRate); if (prIndex >= 0) comboBoxZoneModePollingRate.SelectedIndex = prIndex; UpdateZoneModeUIState(); } } private void UpdateMotionSyncState() { if (!mouse.HasMotionSync()) { return; } bool is8000Hz = mouse.PollingRate == PollingRate.PR8000Hz; checkBoxMotionSync.Enabled = !is8000Hz; checkBoxMotionSync.Checked = is8000Hz ? false : mouse.MotionSync; } private void UpdateZoneModeUIState() { if (!mouse.HasZoneMode()) { return; } bool zoneModeEnabled = mouse.ZoneMode; // Zone Mode controls: enabled when Zone Mode is ON sliderZoneModeDPI.Enabled = zoneModeEnabled; comboBoxZoneModePollingRate.Enabled = zoneModeEnabled; numericUpDownZoneModeDPI.Enabled = zoneModeEnabled; // Normal controls: disabled when Zone Mode is ON panelDPISettings.Enabled = !zoneModeEnabled; tableDPI.Enabled = !zoneModeEnabled; comboBoxPollingRate.Enabled = !zoneModeEnabled; } private void VisualizeBatteryState() { if (!mouse.HasBattery()) { return; } labelBatteryState.Text = mouse.Battery + "%"; labelChargingState.Visible = mouse.Charging; if (mouse.Charging) { pictureBoxBatteryState.BackgroundImage = ControlHelper.TintImage(Properties.Resources.icons8_ladende_batterie_48, foreMain); } else { pictureBoxBatteryState.BackgroundImage = ControlHelper.TintImage(Properties.Resources.icons8_batterie_voll_geladen_48, foreMain); } } public void VisusalizeLightingZones() { bool zoned = mouse.IsLightingZoned(); buttonLightingZoneAll.Activated = visibleZone == LightingZone.All; buttonLightingZoneLogo.Activated = visibleZone == LightingZone.Logo; buttonLightingZoneScroll.Activated = visibleZone == LightingZone.Scrollwheel; buttonLightingZoneUnderglow.Activated = visibleZone == LightingZone.Underglow; buttonLightingZoneDock.Activated = visibleZone == LightingZone.Dock; buttonLightingZoneAll.Secondary = zoned; buttonLightingZoneLogo.Secondary = !zoned; buttonLightingZoneScroll.Secondary = !zoned; buttonLightingZoneUnderglow.Secondary = !zoned; buttonLightingZoneDock.Secondary = !zoned; buttonLightingZoneAll.BackColor = buttonLightingZoneAll.Secondary ? RForm.buttonSecond : RForm.buttonMain; buttonLightingZoneLogo.BackColor = buttonLightingZoneLogo.Secondary ? RForm.buttonSecond : RForm.buttonMain; buttonLightingZoneScroll.BackColor = buttonLightingZoneScroll.Secondary ? RForm.buttonSecond : RForm.buttonMain; buttonLightingZoneUnderglow.BackColor = buttonLightingZoneUnderglow.Secondary ? RForm.buttonSecond : RForm.buttonMain; buttonLightingZoneDock.BackColor = buttonLightingZoneDock.Secondary ? RForm.buttonSecond : RForm.buttonMain; } private void VisusalizeLightingSettings() { if (!mouse.HasRGB()) { return; } VisusalizeLightingZones(); LightingSetting? ls = mouse.LightingSettingForZone(visibleZone); if (ls is null) { //Lighting settings not loaded? return; } sliderBrightness.Value = ls.Brightness; checkBoxRandomColor.Visible = mouse.SupportsRandomColor(ls.LightingMode); pictureBoxLightingColor.Visible = mouse.SupportsColorSetting(ls.LightingMode); buttonLightingColor.Visible = mouse.SupportsColorSetting(ls.LightingMode); comboBoxAnimationSpeed.Visible = mouse.SupportsAnimationSpeed(ls.LightingMode); labelAnimationSpeed.Visible = mouse.SupportsAnimationSpeed(ls.LightingMode); comboBoxAnimationDirection.Visible = mouse.SupportsAnimationDirection(ls.LightingMode); labelAnimationDirection.Visible = mouse.SupportsAnimationDirection(ls.LightingMode); comboBoxLightingMode.SelectedIndex = supportedLightingModes.IndexOf(ls.LightingMode); if (mouse.SupportsRandomColor(ls.LightingMode)) { checkBoxRandomColor.Checked = ls.RandomColor; buttonLightingColor.Visible = !ls.RandomColor; } if (ls.RandomColor && mouse.SupportsRandomColor(ls.LightingMode)) pictureBoxLightingColor.BackColor = Color.Transparent; else pictureBoxLightingColor.BackColor = ls.RGBColor; //0x09 => 0 //0x07 => 1 //0x05 => 2 comboBoxAnimationSpeed.SelectedIndex = 2 - ((((int)ls.AnimationSpeed) - 5) / 2); int directionIndex = (int)ls.AnimationDirection; if (directionIndex >= 0 && directionIndex < comboBoxAnimationDirection.Items.Count) { comboBoxAnimationDirection.SelectedIndex = directionIndex; } else { comboBoxAnimationDirection.SelectedIndex = 0; // Default to first item } } private void VisualizeDPIButtons() { // Update to use CurrentDPIProfileCount for (int i = 0; i < 4; ++i) { // Slot logic: 0..Count-1 are normal profiles // Slot Count is "Add" button (if Count < 4) if (i < mouse.CurrentDPIProfileCount) { AsusMouseDPI dpi = mouse.DpiSettings[i]; if (dpi is null) continue; dpiButtons[i].Visible = true; if (mouse.HasDPIColors()) { dpiButtons[i].Image = ControlHelper.ResizeImage( ControlHelper.TintImage(Properties.Resources.lighting_dot_32, dpi.Color), ControlHelper.Scale); dpiButtons[i].BorderColor = dpi.Color; } else { // Fallback icon if no color support? Usually kept simple } dpiButtons[i].Activated = (mouse.DpiProfile - 1) == i; dpiButtons[i].Text = "DPI " + (i + 1) + "\n" + dpi.DPI; // Clear secondary style (used for Add button) dpiButtons[i].Secondary = false; } else if (mouse.CanChangeDPICount() && i == mouse.CurrentDPIProfileCount) { // This is the "Add" slot dpiButtons[i].Visible = true; dpiButtons[i].Image = null; dpiButtons[i].Text = "+"; dpiButtons[i].Activated = false; dpiButtons[i].Secondary = true; dpiButtons[i].BorderColor = Color.Transparent; } else { // Hidden slots dpiButtons[i].Visible = false; } } } private void VisualizeCurrentDPIProfile() { if (mouse.DpiProfile > mouse.DpiSettings.Length) { Logger.WriteLine($"Wrong mouse DPI: {mouse.DpiProfile}"); return; } AsusMouseDPI dpi; try { dpi = mouse.DpiSettings[mouse.DpiProfile - 1]; } catch (Exception ex) { Logger.WriteLine($"Wrong mouse DPI: {mouse.DpiProfile} {mouse.DpiSettings.Length} {ex.Message}"); return; } if (dpi is null) { return; } sliderDPI.Value = (int)dpi.DPI; pictureDPIColor.BackColor = dpi.Color; } private void AsusMouseSettings_Shown(object? sender, EventArgs e) { if (Height > Program.settingsForm.Height) { Top = Program.settingsForm.Top + Program.settingsForm.Height - Height; } else { Top = Program.settingsForm.Top; } Left = Program.settingsForm.Left - Width - 5; mouse.Disconnect += Mouse_Disconnect; mouse.BatteryUpdated += Mouse_BatteryUpdated; mouse.MouseReadyChanged += Mouse_MouseReadyChanged; } private void ButtonSync_Click(object sender, EventArgs e) { RefreshMouseData(); } private void buttonImport_Click(object sender, EventArgs e) { byte[] data = null; Thread t = new Thread(() => { OpenFileDialog ofd = new OpenFileDialog(); ofd.Filter = "G-Helper Mouse Profile V1 (*.gmp1)|*.gmp1"; if (ofd.ShowDialog() == DialogResult.OK) { data = File.ReadAllBytes(ofd.FileName); } }); t.SetApartmentState(ApartmentState.STA); t.Start(); t.Join(); if (data == null) { //User aborted loading return; } if (!mouse.Import(data)) { Logger.WriteLine("Failed to import mouse profile"); MessageBox.Show(Properties.Strings.MouseImportFailed); } else { if (!mouse.IsLightingZoned()) { visibleZone = LightingZone.All; } RefreshMouseData(); } } private void buttonExport_Click(object sender, EventArgs e) { Thread t = new Thread(() => { SaveFileDialog sfd = new SaveFileDialog(); sfd.Filter = "G-Helper Mouse Profile V1 (*.gmp1)|*.gmp1"; if (sfd.ShowDialog() == DialogResult.OK) { File.WriteAllBytes(sfd.FileName, mouse.Export()); } }); t.SetApartmentState(ApartmentState.STA); t.Start(); t.Join(); } } } ================================================ FILE: app/AsusMouseSettings.resx ================================================  text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 ================================================ FILE: app/AutoUpdate/AutoUpdateControl.cs ================================================ using GHelper.Helpers; using System.Diagnostics; using System.Net; using System.Reflection; using System.Text.Json; using System.Text.RegularExpressions; namespace GHelper.AutoUpdate { public class AutoUpdateControl { SettingsForm settings; public string versionUrl = "https://github.com/seerge/g-helper/releases"; public bool update = false; static long lastUpdate; public AutoUpdateControl(SettingsForm settingsForm) { settings = settingsForm; var appVersion = new Version(Assembly.GetExecutingAssembly().GetName().Version.ToString()); settings.SetVersionLabel(Properties.Strings.VersionLabel + $": {appVersion.Major}.{appVersion.Minor}.{appVersion.Build}"); } public void CheckForUpdates() { // Run update once per 12 hours if (Math.Abs(DateTimeOffset.Now.ToUnixTimeSeconds() - lastUpdate) < 43200) return; lastUpdate = DateTimeOffset.Now.ToUnixTimeSeconds(); Task.Run(async () => { await Task.Delay(TimeSpan.FromSeconds(1)); CheckForUpdatesAsync(); }); } public void Update() { if (update) { Task.Run(() => { CheckForUpdatesAsync(true); }); } else { LoadReleases(); } } public void LoadReleases() { try { Process.Start(new ProcessStartInfo(versionUrl) { UseShellExecute = true }); } catch (Exception ex) { Logger.WriteLine("Failed to open releases page:" + ex.Message); } } async void CheckForUpdatesAsync(bool force = false) { if (AppConfig.Is("skip_updates")) return; try { using (var httpClient = new HttpClient()) { httpClient.DefaultRequestHeaders.Add("User-Agent", "C# App"); var json = await httpClient.GetStringAsync("https://api.github.com/repos/seerge/g-helper/releases/latest"); var config = JsonSerializer.Deserialize(json); var tag = config.GetProperty("tag_name").ToString().Replace("v", ""); var assets = config.GetProperty("assets"); string url = null; for (int i = 0; i < assets.GetArrayLength(); i++) { if (assets[i].GetProperty("browser_download_url").ToString().Contains(".zip")) url = assets[i].GetProperty("browser_download_url").ToString(); } if (url is null) url = assets[0].GetProperty("browser_download_url").ToString(); var gitVersion = new Version(tag); var appVersion = new Version(Assembly.GetExecutingAssembly().GetName().Version.ToString()); //appVersion = new Version("0.50.0.0"); if (gitVersion.CompareTo(appVersion) > 0) { versionUrl = url; update = true; settings.SetVersionLabel(Properties.Strings.DownloadUpdate + $": {appVersion.Major}.{appVersion.Minor}.{appVersion.Build} → {tag}", true); string[] args = Environment.GetCommandLineArgs(); if (force || args.Length > 1 && args[1] == "autoupdate") { AutoUpdate(url); return; } if (AppConfig.GetString("skip_version") != tag) { DialogResult dialogResult = DialogResult.No; settings.Invoke((System.Windows.Forms.MethodInvoker)delegate { dialogResult = MessageBox.Show(settings, Properties.Strings.DownloadUpdate + ": G-Helper " + tag + "?", "Update", MessageBoxButtons.YesNo); }); if (dialogResult == DialogResult.Yes) AutoUpdate(url); else AppConfig.Set("skip_version", tag); } } else { Logger.WriteLine($"Latest version {appVersion}"); } } } catch (Exception ex) { Logger.WriteLine("Failed to check for updates:" + ex.Message); } } public static string EscapeString(string input) { return Regex.Replace(Regex.Replace(input, @"\[|\]", "`$0"), @"\'", "''"); } async void AutoUpdate(string requestUri) { Uri uri = new Uri(requestUri); string zipName = Path.GetFileName(uri.LocalPath); string exeLocation = Application.ExecutablePath; string exeDir = Path.GetDirectoryName(exeLocation); //exeDir = "C:\\Program Files\\GHelper"; string exeName = Path.GetFileName(exeLocation); string zipLocation = exeDir + "\\" + zipName; using (WebClient client = new WebClient()) { Logger.WriteLine(requestUri); Logger.WriteLine(exeDir); Logger.WriteLine(zipName); Logger.WriteLine(exeName); try { client.DownloadFile(uri, zipLocation); } catch (Exception ex) { Logger.WriteLine(ex.Message); if (!ProcessHelper.IsUserAdministrator()) { ProcessHelper.RunAsAdmin("autoupdate"); Application.Exit(); } else { LoadReleases(); } return; } string command = $"$ErrorActionPreference = \"Stop\"; Set-Location -Path '{EscapeString(exeDir)}'; Wait-Process -Name \"GHelper\"; Expand-Archive \"{zipName}\" -DestinationPath . -Force; Remove-Item \"{zipName}\" -Force; \".\\{exeName}\"; "; Logger.WriteLine(command); try { var cmd = new Process(); cmd.StartInfo.WorkingDirectory = exeDir; cmd.StartInfo.UseShellExecute = false; cmd.StartInfo.CreateNoWindow = true; cmd.StartInfo.FileName = "powershell"; cmd.StartInfo.Arguments = command; if (ProcessHelper.IsUserAdministrator()) cmd.StartInfo.Verb = "runas"; cmd.Start(); } catch (Exception ex) { Logger.WriteLine(ex.Message); } Application.Exit(); } } } } ================================================ FILE: app/Battery/BatteryControl.cs ================================================ using System.Diagnostics; namespace GHelper.Battery { public static class BatteryControl { static bool _chargeFull = AppConfig.Is("charge_full"); public static bool chargeFull { get { return _chargeFull; } set { AppConfig.Set("charge_full", value ? 1 : 0); _chargeFull = value; } } public static void ToggleBatteryLimitFull() { if (chargeFull) SetBatteryChargeLimit(); else SetBatteryLimitFull(); } public static void SetBatteryLimitFull() { chargeFull = true; Program.acpi.DeviceSet(AsusACPI.BatteryLimit, 100, "BatteryLimit"); Program.settingsForm.VisualiseBatteryFull(); } public static void UnSetBatteryLimitFull() { chargeFull = false; Logger.WriteLine("Battery fully charged"); Program.settingsForm.Invoke(Program.settingsForm.VisualiseBatteryFull); } public static void AutoBattery(bool init = false) { if (chargeFull && !init) SetBatteryLimitFull(); else SetBatteryChargeLimit(); } public static void SetBatteryChargeLimit(int limit = -1) { if (limit < 0) limit = AppConfig.Get("charge_limit"); if (limit < 40 || limit > 100) return; if (AppConfig.IsChargeLimit6080()) { if (limit > 85) limit = 100; else if (limit >= 80) limit = 80; else if (limit < 60) limit = 60; } Program.acpi.DeviceSet(AsusACPI.BatteryLimit, limit, "BatteryLimit"); AppConfig.Set("charge_limit", limit); chargeFull = false; Program.settingsForm.VisualiseBattery(limit); } public static void BatteryReport() { var reportDir = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile); try { var cmd = new Process(); cmd.StartInfo.WorkingDirectory = reportDir; cmd.StartInfo.UseShellExecute = false; cmd.StartInfo.CreateNoWindow = true; cmd.StartInfo.FileName = "powershell"; cmd.StartInfo.Arguments = "powercfg /batteryreport; explorer battery-report.html"; cmd.Start(); } catch (Exception ex) { Logger.WriteLine(ex.Message); } } } } ================================================ FILE: app/Display/AmdDisplay.cs ================================================ using Microsoft.Win32; using Ryzen; using System.Diagnostics; public static class AmdDisplay { private const string DisplayPath0 = @"SYSTEM\CurrentControlSet\Control\Class\{4d36e968-e325-11ce-bfc1-08002be10318}\0001\DAL2_DATA__2_0\DisplayPath_0"; private static string _cachedAdjustmentPath = null; private static bool _isPathSearched = false; private static string GetAdjustmentPath() { if (_isPathSearched) return _cachedAdjustmentPath; try { using RegistryKey dp0 = Registry.LocalMachine.OpenSubKey(DisplayPath0, writable: false); if (dp0 != null) { string edidKey = Array.Find(dp0.GetSubKeyNames(), name => name.StartsWith("EDID_", StringComparison.OrdinalIgnoreCase)); if (edidKey != null) { _cachedAdjustmentPath = $@"HKEY_LOCAL_MACHINE\{DisplayPath0}\{edidKey}\Adjustment"; } } } catch { // Handle permissions or missing keys silently } finally { _isPathSearched = true; } return _cachedAdjustmentPath; } public static bool IsOledPowerOptimization() { if (!AppConfig.IsOLED() || !RyzenControl.IsAMD()) return false; try { string path = GetAdjustmentPath(); if (path == null) return false; object value = Registry.GetValue(path, "DAL_SCE_Settings", null); if (value is byte[] data && data.Length >= 5) { return (data[4] & 0x02) != 0; } } catch { Logger.WriteLine("Can't check AMD OLED Optimization flag"); } return false; } public static void RunAdrenaline() { string desktopPath = @"C:\Program Files\AMD\CNext\CNext\RadeonSoftware.exe"; string uwpPackageFolder = Path.Combine( Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), @"Packages\AdvancedMicroDevicesInc-2.AMDRadeonSoftware_0a9344xs7nr4m" ); if (File.Exists(desktopPath)) { Process.Start(new ProcessStartInfo(desktopPath) { UseShellExecute = true, Verb = "runas" }); return; } if (Directory.Exists(uwpPackageFolder)) { string aumid = @"shell:AppsFolder\AdvancedMicroDevicesInc-2.AMDRadeonSoftware_0a9344xs7nr4m!App"; Process.Start(new ProcessStartInfo("explorer.exe", aumid) { UseShellExecute = true }); return; } Logger.WriteLine("AMD Radeon Software is not installed."); } } ================================================ FILE: app/Display/ColorProfileHelper.cs ================================================ using GHelper.Helpers; using System.IO.Compression; namespace GHelper.Display { public static class ColorProfileHelper { public static string? GetProfileUrl(string model) { byte[] data = Convert.FromBase64String("aHR0cHM6Ly9kbGNkbi1yb2dib3hidTEuYXN1cy5jb20vcHViL0FTVVMvQVBTZXJ2aWNlL0dhbWluZy9TWVMvUk9HUy8="); string baseUrl = System.Text.Encoding.UTF8.GetString(data); var profiles = new Dictionary() { {"FA_Series", "2177-APOR41-de476ec68578c865e886ef6872aa56ee.zip"}, {"FA401KH", "23150-Q32GC2-01817943f438e9eb18a544fe19ceb4df.zip"}, {"FA401KM", "23151-M1BUH0-efd842cbb6bb2a08766f8f7daf7e6506.zip"}, {"FA401UH", "23152-FIT0A1-baa19cc70d90d4ba94c1364805a75e4f.zip"}, {"FA401UI", "19767-N39QWK-05990dae2bf601e9db8b998bfad49f57.zip"}, {"FA401UM", "23153-XCHXWG-b040bd78b565ecdbe56439714ca35eb2.zip"}, {"FA401UU", "19768-K9LFCV-5224d6f68051d884a3adaa588e6300c3.zip"}, {"FA401UV", "19769-8MSQD6-d06ff0a176407b4eaeed468a3bff2bc1.zip"}, {"FA401WI", "19937-J3GRCD-e37d8c1557b9f11d8fb493a78b50fe2d.zip"}, {"FA401WU", "19938-5PIL7F-a3c8522c89e03fc25e2f7290ee5c5f22.zip"}, {"FA401WV", "19939-KIX4CK-3462e49f2c6388228b427b85332538b7.zip"}, {"FA506IC", "7822-ZGQ1KC-bc80be3be7ca585bef60f526b6461c86.zip"}, {"FA506ICB", "13914-2HYCD7-95fabfe5669a204620517f0158c0cea1.zip"}, {"FA506IE", "7828-57N8GH-9fe07a7e4ebde12a8d4682d3ffa66fe4.zip"}, {"FA506IEB", "14661-ZYWH5T-3b45ebeb7fca81d98796d5960e11226c.zip"}, {"FA506IH", "3407-VZBOUN-8a12385fa46e077010677d330e9320d5.zip"}, {"FA506IHR", "7823-15HGA0-44d621a3c0f0dd2c407f67d262871be0.zip"}, {"FA506IHRB", "19343-MBMUPH-190cdb28402ba8efd3e11561c9b2eeb9.zip"}, {"FA506II", "3410-9ZXQO2-aa08794537699c5dbfcca49b63fb7f8d.zip"}, {"FA506IM", "7824-EKKW9A-21c7e073a81fc868b78e605b17290839.zip"}, {"FA506IR", "7825-G6XND9-c16ea7e98b58e878c61d1071b100ee60.zip"}, {"FA506IU", "3413-AMCR39-2a8b889a8810da4e8692f87e1ae3ea2c.zip"}, {"FA506IV", "3415-VA0CJ6-266febe84bcecc5ed89fdc286f444ce2.zip"}, {"FA506NC", "18359-BM2XCN-3ca9de427310b05afa92dcbe1babf947.zip"}, {"FA506NCG", "23272-PFXOCX-966fca9a86ffb5241144776b8a4244c9.zip"}, {"FA506NCR", "19230-KJ866Z-1980e6f6a843b6b31111e38973fa1cda.zip"}, {"FA506NF", "18361-CU7H6I-55beba8445b9aa0fe9cbeb8ec9a47ccf.zip"}, {"FA506NFR", "19231-GARR16-f7052f6be62ddce2048ebcd6ba808563.zip"}, {"FA506QC", "7829-LBYY5U-b14343c260b738563b69ad0e4f4b88d1.zip"}, {"FA506QE", "7827-75P3DP-b664f4da04e77ed1faa722bf0c781d82.zip"}, {"FA506QM", "9440-87VQKP-48357026f1f3099cfed1161a320587f0.zip"}, {"FA506QR", "7830-KO7FQ6-618480f72c2e68bafc594b5323a5d13c.zip"}, {"FA507NI", "14451-N6AX9R-0bc8e15be5cf889c755aaa7052f6fee8.zip"}, {"FA507NJ", "14454-QXKHOE-d28f2eb001f9b7ce0582cbe33961a6ad.zip"}, {"FA507NU", "14452-EZXLVF-c64dd3d7efede78df653b029888d9d04.zip"}, {"FA507NUR", "19358-JYO79G-f8bc53beeadfdfef80dc6a4eb85c69e2.zip"}, {"FA507NV", "14453-VC333P-41549f64788d59c9711eccec892fa8c1.zip"}, {"FA507NVR", "19359-YWEAES-37feeb146db89c3549bac528d67ae209.zip"}, {"FA507RC", "11448-0TRT8V-7712eb9302300dd82815027efbbe4787.zip"}, {"FA507RE", "11449-ONC7VG-a7ac70468292336f63532c21204d69d4.zip"}, {"FA507RF", "14311-X72FIU-66bf16069a82bdf2cc09f8b92cb25c67.zip"}, {"FA507RH", "11453-W4B8H4-e1645d3ce1e0216a30246ad6a84c3819.zip"}, {"FA507RM", "11452-ZGHOOO-f3bddf2fddd3c027568646bc5afe3c7d.zip"}, {"FA507RR", "11450-UU8KFV-2c718d16687fa3b038e625f504ccd13f.zip"}, {"FA507RW", "11451-XHL0SH-c2702d2047b7b93636cc1372caf25a75.zip"}, {"FA507UI", "17850-4J1GCV-c30e3d47aa82df4e3f0754888903c5dd.zip"}, {"FA507UU", "17851-PIGBD6-45227ab485302ec2cca63f0bbb71d473.zip"}, {"FA507UV", "17852-T32MPT-a2fd989758365b8a04e4dc5bbb146af1.zip"}, {"FA507XI", "14817-A522MM-fad14cb28f00b94735eb55c2b3b7b892.zip"}, {"FA507XJ", "14820-8RT0TF-9d341fae2a290494206deb5fcf1fd427.zip"}, {"FA507XU", "14818-3PA2GD-2d1e2d035309ec7282a1c47e27f7c7fd.zip"}, {"FA507XV", "14819-ET4L73-daf905274776ae9c92a7b74e687dc63d.zip"}, {"FA607NU", "21471-PAVHE0-6fe10875084d9b483f9a010f203d9432.zip"}, {"FA607NUG", "23270-Q0C8M1-4704c503432082b1b2a108464492d06c.zip"}, {"FA607NUR", "21472-KVEN8N-c2aba8f6d9ccfe3dc1557064692d1e7d.zip"}, {"FA607PI", "21198-0USYJW-ab92526d5cb7249caef7c27ec0a26959.zip"}, {"FA607PU", "21199-DRVP13-264a6bfce9599b5b65001789e603bc61.zip"}, {"FA607PV", "21200-JWPHF3-195d7d570718e9269d051e1b040060c5.zip"}, {"FA607RC", "10190-XHDRTQ-0e6c248e3dab6bb07e052edd963c5218.zip"}, {"FA607RE", "10194-AF495K-23a4d74be5132e4babc64bb13237a12b.zip"}, {"FA607RH", "10191-9BS333-c6deb5f9fd5a37d446d2722da54c0ec3.zip"}, {"FA607RM", "10195-4U5EEF-cf98d168cacdd5a60782e881a9c143be.zip"}, {"FA607RR", "10193-FYX2N7-730c76e49ef71a6164804eafd2621dab.zip"}, {"FA607RW", "10192-UFOOP3-f52a50dac189ffa96560f73e04c53a6c.zip"}, {"FA608FH", "22880-2K54GA-168f317757270f37b74cddd9e1d34952.zip"}, {"FA608FM", "22881-LN927H-3827d064e0499ef5c4b55fdac8669335.zip"}, {"FA608FP", "22882-YNB6V0-f9e70d6473cb5249965b126f21f8f184.zip"}, {"FA608PH", "22883-8CUVYX-1f3c61030aa8039f6d27fc66b1dc65c0.zip"}, {"FA608PM", "22884-Y3B91M-707a992984a26f65fcb216e2433559d6.zip"}, {"FA608PP", "22885-G9MBRP-e1185349010359f639cca75d9adfa11b.zip"}, {"FA608UH", "23061-MKY0MS-e740ecf2d481ca33ac6711098815d668.zip"}, {"FA608UM", "23063-PUFOXB-e8ed9dc6af4820002878dee891bebd8f.zip"}, {"FA608UP", "23062-2Y1LLX-53956fabbfab2e7efa8e7c4af156df1e.zip"}, {"FA608WH", "23067-6P30EW-4777c8a270ff36931732744f7ca1825c.zip"}, {"FA608WI", "20103-UE0O65-d6707b2a2f666d671d728661c981883a.zip"}, {"FA608WM", "23068-XI8WYL-8e6db2e6f67c69fafeff914531dc9c74.zip"}, {"FA608WP", "23069-NE9XRI-457fc5f0d7d6d059cbff934908ced89e.zip"}, {"FA608WU", "20102-IQVJL2-edc900ffe25635856729d26dbeac272f.zip"}, {"FA608WV", "20104-EE3Q5U-a7695b4d1668b1a8dda2576f64bffad2.zip"}, {"FA617NS", "21796-EMUOH9-1495ff888af3848ecafb9b938293af7a.zip"}, {"FA617NSR", "21797-VNRP2J-e274ed99fe4c91ad6c1f730063dcc61e.zip"}, {"FA617NT", "21798-X83UVR-6286daaa5031857a511ddd9152fdfcdf.zip"}, {"FA617NTR", "21799-7GA7BG-a2a7d981f4993a1dfe99a143102b9bc1.zip"}, {"FA617XS", "15968-Y9NFXN-cb420fe6e177fc1cf675e9d42a6fd0ea.zip"}, {"FA617XT", "15969-UKYP5L-ad54051ebbad4b17693b65f5bceda799.zip"}, {"FA706IC", "5215-5J3H5Y-d2cdc2f5e03d68e5e5e562581a77c8e6.zip"}, {"FA706IE", "8827-43DTPG-ba6be621f7d0dda88e5391164cbc7a74.zip"}, {"FA706IH", "2610-2EJ0EQ-245d43d7bd14bb3e664fa96e9f5a690e.zip"}, {"FA706IHR", "8828-XBJAQU-5d8064b0fb63ca7866ee4cf821ece676.zip"}, {"FA706II", "2611-HO3IK9-2fb972a395137c940151723b01e9b9cb.zip"}, {"FA706IM", "8829-GWFKN5-5ab773eb09bfb3099137fae3c7d547c1.zip"}, {"FA706IR", "8825-63J2NY-2496ecf21b5fa71e65671531b670cdac.zip"}, {"FA706IU", "2608-EI64MF-64c35bda7789e6e71298e22d793b78d4.zip"}, {"FA706NF", "18362-1V7Z1Z-0bc79f01bdfadc5b39342fba622a5b8d.zip"}, {"FA706NFR", "19232-FE6TXN-d062445db610ce901453145ebc518efe.zip"}, {"FA706QC", "8826-032S4E-868933565b1a7d762bda8cafc1e77458.zip"}, {"FA706QE", "8824-KZNJL9-9d827f4973d4c9787ff050dc1bf35eef.zip"}, {"FA706QM", "8830-6NX7U4-b7bbfe663aa954534d33d2f822181728.zip"}, {"FA706QR", "8823-RXSLAC-a2720365e842af1dd826920fb447fba5.zip"}, {"FA707NI", "14455-19J6WZ-10282c6083ee018a614e75bc809ecf1f.zip"}, {"FA707NJ", "14457-BGJD0K-d963ff94009c9a2a5b99606eac711a95.zip"}, {"FA707NU", "14456-VAZ4LS-1d798d3873c55e9d10b43a3f2b12cd15.zip"}, {"FA707NUG", "23271-FN0Y8E-dee259494174794e33ff6856ebd92fd7.zip"}, {"FA707NUR", "20568-IPF4CY-f7bd11b80ffa20b77b75e6a89213db48.zip"}, {"FA707NV", "14458-7G8B40-08117ddb45ed3c6978aa4ad60e3d2c96.zip"}, {"FA707NVR", "20569-1MFNC4-e41979f29c26628eacf1e9067dd3544d.zip"}, {"FA707RC", "10196-81D3O0-94ccf4d908c9bcb44f8f9092ef9fa2e2.zip"}, {"FA707RE", "10200-AUS9AW-7f366055be2ae2b4c659aa9590bb4d5e.zip"}, {"FA707RF", "14312-6KGU80-09ba6d3e3b490c3d1dce3d16df62cd8a.zip"}, {"FA707RH", "10197-BB5746-a958ff2eeedcfd1753c2e7151c0a3f96.zip"}, {"FA707RM", "10198-TBWO12-e35e49d79fcc03c5cc84b5b40c222e80.zip"}, {"FA707RR", "10199-LILM59-05448f5e429c6c4be7b531d0b6aa2319.zip"}, {"FA707RW", "10201-0KXC4K-3dca8e95a9e676a1010efc79becde228.zip"}, {"FA707XI", "14821-JO8WIQ-77921f1a7a523fe5674f39f10e66f4a3.zip"}, {"FA707XIN", "14822-7W7Q8W-e2e50358e878b092fc888e8e70575985.zip"}, {"FA707XJ", "14823-MX6CGK-0d0862cd441f96a72b1c8baeaa8aa3b4.zip"}, {"FA707XU", "14824-O2LZZA-f0ea2bf54bbc4fd4e7391048f4a083e4.zip"}, {"FA707XV", "14825-DUSKD1-7d0a055d869a7366105380c44788724b.zip"}, {"FA808UH", "23065-2NU5W9-428014aacf31a932a36f88bd5201c0a0.zip"}, {"FA808UM", "23064-L97GA2-7a8ed68f7c5ba31c3bc18d4543ac69cf.zip"}, {"FA808UP", "23066-YJN1R5-2f2deb0ff1c0a764dbd6f4cd61dfcd5b.zip"}, {"FA808WI", "19512-TZ3G4D-60c6849ce49cca1d2177f31ead77df5a.zip"}, {"FA808WU", "19510-ASGCD8-0558641c1b976b901c52d1d72f0bddd7.zip"}, {"FA808WV", "19511-QDVPAJ-f3990996e7a9c0d472b46af286d529f1.zip"}, {"FX_Series", "2174-J1XJKV-bd932ade5eebb0b2f1a36eac85bc5c7d.zip"}, {"FX505DD", "3439-CJLCNE-3df3a90619c571de2917a35a402fe6cb.zip"}, {"FX505DT", "3427-H77L9I-2f3f50fbbb1dc4ac6e703b2820acb491.zip"}, {"FX505DU", "3426-9P4PXL-7e640e1e38c6395bc5455bdf838ea83d.zip"}, {"FX505DV", "3425-31OQ2O-3ab11acfb17dca8f339fe0b8a4efa33d.zip"}, {"FX505DY", "162-H1YFBE-1e5c82e28fa35559e5f7a6aa934d7405.zip"}, {"FX505GT", "3423-8CCGEQ-a72ef69d8d5aab7bfd3eb34e2a55cd48.zip"}, {"FX505GU", "3424-9J0I5H-1c209ee72d9f7ba2caa559fddd9f5fdc.zip"}, {"FX506HC", "7821-BDCXZM-23e718ce9f58cbef286e77c7d97752d0.zip"}, {"FX506HCB", "8452-QZYXAU-9385f6b96812173b12dcf23934d2729d.zip"}, {"FX506HE", "7831-C0XU6K-16e393308545bf5fa327997b33edeba9.zip"}, {"FX506HEB", "8453-42FVNT-a7c6b122bb1f2e16340c016d09b43c13.zip"}, {"FX506HF", "14511-KKQA1F-9129e79baf1215ce451e791b51fee304.zip"}, {"FX506HHR", "7832-KJD4ZK-d6e5fcf84caf94be5b312d6233876322.zip"}, {"FX506HM", "7833-2EVLVM-3082377bce59838bf06bd09c3c9911fe.zip"}, {"FX506HMB", "8454-32DRJH-818506f55eef4d13839ea8e8d8765534.zip"}, {"FX506LH", "10917-Y6JJC7-4596433cf10a71242d9a9255c2b31458.zip"}, {"FX506LHB", "16838-WYAR19-d3f87642f6cf12ec77e231b7d405fa61.zip"}, {"FX506LI", "4428-Y7KRBX-df2c328780c4506a2cb2279ddf84ca58.zip"}, {"FX506LU", "4429-34SZ6D-2df0b447ff1dcf6d887cad5c679331de.zip"}, {"FX507VI", "14064-MTRMKH-169de48f4b0b3035315106bde1a1020f.zip"}, {"FX507VI4", "14065-9VTCNA-b5e0ac043ffd3e3ffab879f6401b2e07.zip"}, {"FX507VJ", "14066-W5FPY3-89180f515ba2c785b1f87c895e09cee9.zip"}, {"FX507VJ4", "14067-DKVRHI-bc0fa5ec61259e31536356ec67d27cb5.zip"}, {"FX507VU", "14071-EEJKDG-95e42e7c6ebaea33206a1de566588ae8.zip"}, {"FX507VU4", "14069-1JAF2A-4d328ede6adf0796924734da3e04a18f.zip"}, {"FX507VV", "14068-QO62TU-b6aadf3d84f816a42f111649bb1381ae.zip"}, {"FX507VV4", "14070-WHB99Q-57b4d0c8f9405038db3e298f72474505.zip"}, {"FX507ZC", "11454-8DEVNS-3503e698cf0b56b387bf65ebd0169786.zip"}, {"FX507ZC4", "13785-D9YTVH-2fb9db83c6f04518f230d1d453373e5d.zip"}, {"FX507ZE", "11459-DKP456-c8d8862da76207dc0a3bf2642b98632d.zip"}, {"FX507ZE4", "13786-3YM16F-fa4c0a13c74e6c1253d464bbb035cbc3.zip"}, {"FX507ZH", "11455-OQI6ZD-866eb458d7ab9ac51cb88966b2c4acf1.zip"}, {"FX507ZI4", "14056-D01K4S-bb2cfa4d564b8a6834c78d675aebdd1c.zip"}, {"FX507ZJ4", "14057-YY0XRG-4f7570dee1902f2012b812d50b0d2334.zip"}, {"FX507ZM", "11456-OM12KU-7c91b2d14b093dc2eef17a555e14ada3.zip"}, {"FX507ZR", "11458-P8RTC8-2b3802527c98749fb68397f35c6bb86b.zip"}, {"FX507ZU4", "14058-9ZYS4E-7e244d3e7dc3641d602130563c1c84b7.zip"}, {"FX507ZV4", "14059-VBGCNK-0314facaf02290da1a75d1b00455cb3a.zip"}, {"FX507ZW", "11457-4F1FOO-5f24a98f90735cedf1ad9fb5ac90adbf.zip"}, {"FX516PC", "7788-GJYPET-06cf200d5b8fb92c807de03796535e80.zip"}, {"FX516PE", "7789-WIT1BW-b32fd9546ac9ac5b6878a3f46c30247c.zip"}, {"FX516PH", "7237-G94WZH-30c10f820dcdf03cc661fd9b73c2927a.zip"}, {"FX516PM", "7790-OG0DVJ-e7ad44e2fa38eb4256e09a62a744659a.zip"}, {"FX516PR", "7791-LJ7RQ7-36c58a0b55aeb5c3782302fd58139815.zip"}, {"FX517ZC", "13757-QJDW9D-ab71bd2ecf24d182bf32fbd931b24e58.zip"}, {"FX517ZE", "13758-75WLCE-fac3186e372a6e0e422d3d78de1addb3.zip"}, {"FX517ZH", "11461-A4BH34-2464f8a583b064ab2bdb336dc13d8b2e.zip"}, {"FX517ZM", "13759-694BOG-7b8f61a1d8a387715721fd2b8e0bd766.zip"}, {"FX517ZR", "11463-MCHEWS-7a732705aea49eb663fe1e8930c463de.zip"}, {"FX517ZW", "11464-S41ORA-d99633ecf421ba4ab73800bc9ebf2e5b.zip"}, {"FX607JI", "20802-NQBEQ9-79a5bd78ec8c0f15cd05c7bc95291d3e.zip"}, {"FX607JIR", "20803-ETAED9-704bade4fbbcdd2e63484f04c5f441d4.zip"}, {"FX607JU", "20804-231XB9-490c8fb8497b7d8cc36a2b65f4f426ba.zip"}, {"FX607JUR", "20805-OVSUFT-1301c03bd490532e04fa177b3812866e.zip"}, {"FX607JV", "20806-32Z9GU-b2db6bb173b2b88d89eb6f8f081812dc.zip"}, {"FX607JVR", "20807-JWOZQV-0ef54b8d3dc0340a0c10cfdf77f56dda.zip"}, {"FX607VB", "21654-S6SM9A-ae7726e202b92f76f7da0118c117a7b0.zip"}, {"FX607VBR", "21653-AWJNDQ-7de72903e78670297fc54e7a83fa0a67.zip"}, {"FX607VF", "20706-OMC7L2-e66289430eb7decd16fe4c6353edb8c4.zip"}, {"FX607VI", "14072-0Z0LX5-c3145816b5c9b045a3e829e194425624.zip"}, {"FX607VJ", "22148-ZIDZCB-73ff3d6b62337227a5b44cc51d59f4ab.zip"}, {"FX607VU", "21652-QFMHFH-8b7ef4a22350147be4520f4197c575eb.zip"}, {"FX607VUR", "21651-1GVYD5-98886916af3c9191b407e29ffbc7293c.zip"}, {"FX607VV", "14075-BX4NJX-a9e24be091f08e6cc3885397f143bdc5.zip"}, {"FX607ZC", "9267-SQXQMT-edf1ee77d7f276d9b2f14fbe80e86459.zip"}, {"FX607ZE", "9268-MI06A0-5f60b76f497adb2c80dc5d34e7ca00ef.zip"}, {"FX607ZH", "9266-75PO51-12f649be993639c1ff986129977bc516.zip"}, {"FX607ZM", "9269-MEPP17-baf25a9abae3ae712da40dc6c4f2de22.zip"}, {"FX607ZR", "9285-7B20C5-9a0ee909d954eda9fd9f334a6b76bdda.zip"}, {"FX607ZW", "9265-9H05OM-5b2735efc15db9c49302451b728338a8.zip"}, {"FX608JH", "22661-SPDZBF-edffaa27ae0b56cc968ce1aafa54aed1.zip"}, {"FX608JHR", "22662-M9XU96-98916125fe0f05c31b6e45abae5a84e3.zip"}, {"FX608JM", "22665-O47X7H-825f786cff2f0f7eb66c7fa6c7d06c1a.zip"}, {"FX608JMR", "22663-IRAW07-7bf1adcb29633cdc03f5f408fcf8bf70.zip"}, {"FX608JP", "22664-793QGS-db9cb3d22d9d5e087c8e778f97ea92a3.zip"}, {"FX608JPR", "22666-MF20F5-8a3d7cec18bc9fd661787259e5244860.zip"}, {"FX608LM", "22659-G2RPZT-e73f7482e6de86050aac83e91dbeda3e.zip"}, {"FX608LP", "22660-2JTM3R-7ba360ce5bf1f50d29618c0bcb3506a0.zip"}, {"FX617ZC", "9263-3PLDC1-74d554f08fac5b1689c7dbb581fc97c4.zip"}, {"FX617ZE", "9264-9L5V7F-203b8f8a48d47470aef80dd42bbef60b.zip"}, {"FX617ZH", "9261-DIXTFE-b20887acff77b59a80e62088caf695f3.zip"}, {"FX617ZM", "9262-OXO77E-8476443cfd885a718b915731b9807bc0.zip"}, {"FX617ZR", "9286-VA9VXJ-8c69c08b5812b00656142d93cb5a5013.zip"}, {"FX617ZW", "9260-O8UGYN-9678cab288d9b85ec59961647ca94ff7.zip"}, {"FX705DY", "163-N6IM0Z-3bee0b29abd2d6b419ba322661d64a6a.zip"}, {"FX706HC", "8834-3HMY7W-fb49a16bc9cda208a3acf5f2ea32fc63.zip"}, {"FX706HCB", "8835-FHPH4O-319d35ab96a1eef3b5ae7fefde106cf2.zip"}, {"FX706HE", "8833-SW8GIL-71ae2ebbdb18ec3380cf682be0ca32a3.zip"}, {"FX706HEB", "8836-SUE4HH-55876358bbe39f53ea2010c8f66e9093.zip"}, {"FX706HF", "17052-8B8C18-0c762fb15cd6367d08c954ce5e01f497.zip"}, {"FX706HHR", "7837-S711RT-ed9d8a61e80895a6403dda19ac873f62.zip"}, {"FX706HM", "8832-O7W1D2-853dd8eb62665c369cd2c3b716a53b80.zip"}, {"FX706HMB", "8831-NKXZ56-437ac6d56280dd0734f9f56db3ba6a6f.zip"}, {"FX707VB", "20829-OQDH77-35aaf2c0ec2e96f2ff51d939e9f7b236.zip"}, {"FX707VBR", "20828-KQM5B0-7bc2f06ec53e28489f2bdad1c6d1a658.zip"}, {"FX707VI", "14076-C4CQ2E-0771f0ec46072ac38a7dbb8829783298.zip"}, {"FX707VI4", "14078-UXPPY2-ffe538cd58da15c780e6263c2818f995.zip"}, {"FX707VJ", "14077-6KB0BJ-af4fae81000b0143477091deaca569da.zip"}, {"FX707VJ4", "14080-YBM0VD-bef842b5fcc1b49cb054cfb1eb3d2258.zip"}, {"FX707VU", "14081-I8JRY3-2ab8a5dcab2033a19de169e424da1530.zip"}, {"FX707VU4", "14079-TALDGM-c7d6c6820a223967463a76152e178af4.zip"}, {"FX707VUR", "20827-1FZPS7-cc2f1b5319994a30fa109ecd023919fa.zip"}, {"FX707VV", "14082-2UYJNX-a21d4e4e856e8a4fe52b30593705d818.zip"}, {"FX707VV4", "14083-79JC8K-74d96cb066ded2d86255755fdc1f3167.zip"}, {"FX707ZC", "9278-7TRFVL-9a0693a78d8d69a265cb7101314dd055.zip"}, {"FX707ZC4", "13358-EPBJ9S-035eca4acee4db9814f693f4aeef0147.zip"}, {"FX707ZE", "9279-QYJXB7-17ff65bda614791358426882d48be6fe.zip"}, {"FX707ZE4", "13357-V3LZL7-64a1ecac6b4657e98a422cd5657cc89b.zip"}, {"FX707ZH", "9280-62FAFQ-3193a4215440ecbe7fece9091fad6205.zip"}, {"FX707ZI4", "14060-EEB7IW-e716f0f9a1f8f91e5ae93d902de96385.zip"}, {"FX707ZJ4", "14061-T7UBPM-91f62b48749f5ed42e3c3d1f2b8bb645.zip"}, {"FX707ZM", "9281-YKO83G-ff6a896b4e055cc6500470636cf9e1ad.zip"}, {"FX707ZR", "9284-GYDQK8-bfdc718699fb7030b0f133402933e12f.zip"}, {"FX707ZU4", "14062-52EB12-8a85d0170af52dfbaf216b98085015d0.zip"}, {"FX707ZV4", "14063-R6EM57-62ad692f855e33bb05aaae1823207415.zip"}, {"FX707ZW", "9282-E6GYQU-5f673e25b2ef5e57c78e36668e9c5e9f.zip"}, {"G_Series", "2176-RS8S2K-e815e5e0be51e1bd76674cd3826cbfec.zip"}, {"G512LH", "3312-AM98EE-e9a32238fa66ffe8683ff0a34019f216.zip"}, {"G512LI", "3310-9MDL49-daee5dd162a699f60f2bb68a3cba7ef7.zip"}, {"G512LU", "4150-SX012C-b6e7d21b645495f57b2fb7bd9734e839.zip"}, {"G512LV", "4151-LUEHCJ-f145d1dd67079a3739a564cb04eaa6ff.zip"}, {"G512LW", "4152-4IMGHN-f0a946d2f21860039a9181b17ca1f1be.zip"}, {"G512LWS", "4153-IZDAY7-3cc48027800d6d123db4f584a5a2e4a4.zip"}, {"G513IC", "7233-I1XU1L-57f580817efeb347c2e64b467b569d48.zip"}, {"G513IE", "7232-7C4QK2-effb8e534fc4639d7fd72e957e1a13fc.zip"}, {"G513IH", "7231-YGY2HL-ef7e448a0e3b2502219c74c2f8a26a72.zip"}, {"G513IM", "7883-JSH1ET-04fb928a7fe54481b8156627d30451ce.zip"}, {"G513IR", "7884-DB01TN-5bdc2457c9a42ad9c0b1ab82139beeac.zip"}, {"G513QC", "7228-I73APA-79e1e7f9582bdc44f510d651e909250b.zip"}, {"G513QE", "7227-9J3H2Y-d222e0119fef169bbe0f20f754743ca7.zip"}, {"G513QH", "7226-MUU2SQ-05a65cada4f1c986b7b2c5e2cf7ea796.zip"}, {"G513QM", "7882-2FWOWK-ca956a4c309edb8cd9d9c24178ec3912.zip"}, {"G513QR", "7885-4VL6WK-6a21c044bb2d69f55febdb6ffcd5b7d8.zip"}, {"G513QY", "7881-S6R4GZ-5832d1de6fc107509803927e4a52ebf7.zip"}, {"G513RC", "14513-WMQ0GS-4018fc7459d96efec72f15f724c33062.zip"}, {"G513RE", "14516-VXJYUR-fbaadee0ba8dea2a24282b2be882d571.zip"}, {"G513RH", "11732-8ODACG-845738811f5dcaee76c7ba113ed0c8bd.zip"}, {"G513RM", "11735-UXEJT9-03457f6d6350f0a860fe6386de27a659.zip"}, {"G513RS", "11733-9SABRD-3a4c8dee5ff96668dc9ff509d626e17e.zip"}, {"G513RW", "11737-VS9IFQ-b9c6657578263ac3ab1062b32ab599bb.zip"}, {"G513RX", "11736-CHOX6M-ca19a5d6e7153102c3825f8b3371b4d7.zip"}, {"G531GD", "3698-YSDO31-352980933199182c587573ecf056711b.zip"}, {"G531GT", "3697-OYLYLQ-4916a89afb3a6964cb2b0ddd8dc45fe1.zip"}, {"G531GU", "744-S7QQP3-8572157fa95e0eb235f29df0227d5064.zip"}, {"G532LU", "4146-NF3MBY-79c262fe416eb469fdff811d501233c9.zip"}, {"G532LV", "4147-F6P59K-328b1796ee854653a1470be865e06d0e.zip"}, {"G532LW", "4148-KUJ0SA-affcc286138b433b9b051dffc8158672.zip"}, {"G532LWS", "4149-RDJKG0-c5f4470225e184cdbc34b9b41c9e2666.zip"}, {"G533QM", "7880-VL41LZ-ea6868a4918e7a2571a169b0b20d53de.zip"}, {"G533QR", "7879-3915UU-cec5ce6e895bc9acf0367b1ae69d7d01.zip"}, {"G533QS", "7878-SLEHTN-4844d16bf258768105873010c17398ea.zip"}, {"G533ZC", "11725-BVSBSP-1f91feb49662e4f4257a27ea081db4ac.zip"}, {"G533ZE", "11730-DEG4Q9-3d77f3901752747e449fdaa5467a250b.zip"}, {"G533ZM", "11726-01FCGK-180459312539e4c38def3c7323a60494.zip"}, {"G533ZS", "11728-KGTOE8-4fe0474fc6e8944dbdcf726bad1a7db1.zip"}, {"G533ZW", "11727-98BKOJ-93e373e64e92c21ff018ba6c66a9de9d.zip"}, {"G533ZX", "11729-XNFMPR-e0aad4e4d4956dba8629f419b1f86026.zip"}, {"G614FH", "22964-IKFUNI-ff41ee5ac7afd01c38f49c761c68f393.zip"}, {"G614FM", "22966-LMNTTU-df1a5431f63db9753a820fce6121ba3d.zip"}, {"G614FP", "22965-54RYS9-ab7cb9ce54a7a73a66242a1f62ae20c9.zip"}, {"G614FR", "22967-9WDJ29-6d50a5d7fc8ea253b1d370f390ec1add.zip"}, {"G614JF", "14496-NAATJZ-a3847e890e57aa749645b854b28ead79.zip"}, {"G614JI", "14168-4VTU0U-37decb2df809672eccf1156769eda929.zip"}, {"G614JIR", "19126-IMXGO5-4cce9f45ad28fa60d016f8d212c50b10.zip"}, {"G614JJ", "14497-P0D5PL-abe178509e0316da9ee56b24e15d0384.zip"}, {"G614JU", "14498-5D71EB-2300be03087494ee34356470ca022b7c.zip"}, {"G614JV", "14500-SPJCAL-a8e2e223857c334ba4c20c8122151bb7.zip"}, {"G614JVR", "19129-EA1WB4-4666564ee013c4df53be44bcdd20bec0.zip"}, {"G614JZ", "18199-P9WWOH-093d361358629a2bddd5bff7b5fb7a5f.zip"}, {"G614PH", "22613-X5U6T7-e7e2654b2ec7a8efac46319b45906454.zip"}, {"G614PM", "22617-L0AL1H-e6804d067503cc527b8332224350f1ef.zip"}, {"G614PP", "22614-DTOZFV-c1d2512299d5bf2c832965fddda47a41.zip"}, {"G614PR", "22619-PRHJH0-e03c3c78a6d0053b0f4facd6c08920ef.zip"}, {"G615JH", "31607-3GDOXP-4ea1f67c8fa8dcaa3afc66af911b4bc0.zip"}, {"G615JHR", "31604-7N44ZS-325895f1c158f51fff5ae4fe17e5d993.zip"}, {"G615JM", "31608-TQHVZV-6d9fe17c485c0915121d15bedd692389.zip"}, {"G615JMR", "31605-7E9UBG-b0d27b4a158048005d1558f8d07a2368.zip"}, {"G615JPR", "31606-J8SVX6-30cce6a6ef8be37010dfd844a41d4aeb.zip"}, {"G615LH", "21974-7TI36W-4ceedda7dfafaa372eca088a94265c7d.zip"}, {"G615LM", "21975-NG6PCX-e16e93776433e27605e28696bbd8ea75.zip"}, {"G615LP", "21983-37FTFE-a41de242fa2af1bb6b7fee9cd433826d.zip"}, {"G615LR", "21977-UAAJKQ-50eff9e99b7d8f5662cf43fffde6883a.zip"}, {"G615LW", "21976-FNFOAP-c9693e32f4d0e8a64db7e63e6a79820c.zip"}, {"G634JY", "14163-JLRBOO-8ea519425efe56cc144e38d22cebd3f0.zip"}, {"G634JYR", "19130-MUAT65-0eced7ca55a61cc41341faa3a48d34f3.zip"}, {"G634JZ", "15827-MSW5I1-0f39e92313e54afe3e35f5636dc37fd5.zip"}, {"G634JZR", "17891-O7PAGL-5c6e6d059ff7bc1b9245fdf8a8066263.zip"}, {"G635LR", "21984-G3L1SG-24fef8c24f87794c1d09b1e9efb02ef2.zip"}, {"G635LW", "21985-AV5G50-9b3da7234e21be309ec3d889cd88c4af.zip"}, {"G635LX", "21986-H42PRP-be7b559744ef9aaf21aebdd233fa0015.zip"}, {"G703GX", "105-NMT9XG-76a0810ddf16ee376fa049bd179377fc.zip"}, {"G712LU", "3364-3GYELH-a0f545d6a2f5ca2516e91f0495f98110.zip"}, {"G712LV", "3365-UYDEWV-6675727e4e0588b95d9faa2df69b1972.zip"}, {"G712LW", "3366-OK41IE-fc01da1e3d6217e6bce24f3237b5631e.zip"}, {"G712LWS", "3367-N1B9F6-72dd79495de9b660a8b120579c708623.zip"}, {"G713IC", "14187-GKTF5N-c602fb66b48f86aa2ab7b14367dba7b0.zip"}, {"G713IE", "11023-PVEVI5-bfa9a58633213b87629c5117030d54f2.zip"}, {"G713IH", "6317-I3AGUT-a0a1e3b68265d7bd3a2a1657afa0cfb6.zip"}, {"G713IM", "7890-IC1UIL-85b242f2f61aef5cd16166178b6a1adc.zip"}, {"G713IR", "7891-832AOR-104e408922a3f0c4e8d97d03dd000083.zip"}, {"G713PI", "14527-XK0JY1-ffe9b04acfd36ebcf3b1331577515b8c.zip"}, {"G713PU", "14528-AC10R7-ee30e2f76e16c16db44758ac911e9d61.zip"}, {"G713PV", "14530-3ONUVM-abf27eca2271dcdfd150acdf6cc26800.zip"}, {"G713PVN", "14529-YMPI29-b958f3ae6ad8118997c16c87d9840fb9.zip"}, {"G713QC", "5496-KAW7ZL-7a45d99d71ba375d79d047a015c27c2a.zip"}, {"G713QE", "5497-T7QUN2-f5c00e128ed96b9727dcdfb4d857dbb7.zip"}, {"G713QH", "6316-ANOUE8-9b18e7d3aeaeb5cc4520be09df860617.zip"}, {"G713QM", "7892-JCIYF7-acf05d6b34e417efed385e84dc079677.zip"}, {"G713QR", "7888-XIBCC9-d2e608529ce49f0daf90bf3d81cbd69e.zip"}, {"G713QY", "7889-FH9X9W-5c4d00f5506924fc9f29e1c190b1bf51.zip"}, {"G713RC", "14514-8R6TFS-eb95e08804622256fc5be85a1f14301c.zip"}, {"G713RE", "14515-LTB9LQ-a6a522a9d63083e0366d13f40af54ebf.zip"}, {"G713RH", "11305-VO5JTS-7cb1b763f054da29ce2ba1e08c897a60.zip"}, {"G713RM", "11309-GX2AYR-5b172b743c185242080b08dd7e2b7fc7.zip"}, {"G713RS", "11306-E1A3OM-37679d1dfc144d892325420d784f5d8e.zip"}, {"G713RW", "11308-IPZSAB-6c8827c63a27cee6257c755bf0bd9c41.zip"}, {"G713RX", "11307-JGFO1D-cff83a2f34e3c0ed755ed63c20d2905d.zip"}, {"G732LU", "3368-C89MVD-1ecb4a036b697bd4bd027d2bd160d219.zip"}, {"G732LV", "3369-TI19K6-56ca5eb37397117c97e0bae42e82b2b4.zip"}, {"G732LW", "3370-HLPSUS-9c7615d0220bde50de5ecd4c7e51182c.zip"}, {"G732LWS", "3371-B4CG89-c22a9f4deb49d6e1e921ebd5a0cab685.zip"}, {"G732LXS", "3372-OJEP07-c0e21f578660bec502aec19a3645b067.zip"}, {"G733CM", "11332-V8B7E9-2a7f61f88106051be62b57250ed33eaf.zip"}, {"G733CW", "11334-MQ3PJE-f03f2950247ac635dda1b30245d220aa.zip"}, {"G733CX", "11333-XS984I-d48bb5ee3416d47fa203090bc8bce04d.zip"}, {"G733PY", "14531-B4NFUU-4ec97a54081ea4b713975fd1ab7c1b80.zip"}, {"G733PYV", "15178-1CIVEB-5a9d09a4d22d6361992c7cd6ca27fb41.zip"}, {"G733PZ", "14532-4UUM5E-296ee92ca5416a8c59bffd6f101feaa5.zip"}, {"G733PZV", "15179-EDHNHX-ce69d260b1e8077d8d522d3b4326322c.zip"}, {"G733QM", "7893-OW1O2I-a2dcb8ff88cae20c7086bac8d9312dbc.zip"}, {"G733QR", "7887-OA7Z12-bc86110ff0d1f359d9230fca8bbabe51.zip"}, {"G733QS", "7886-V9PIMC-27ca6272c2b093264d88a32f1093a4fe.zip"}, {"G733QSA", "5501-LX7POZ-9289c2079bdb48e2fdd76d7981fb0e5d.zip"}, {"G733ZC", "10077-J3XTHP-525deb09f2ada7dc36dc82772f7a9cce.zip"}, {"G733ZE", "10079-KAW34P-16c4b5e812e10019f21b4d7f879acfaf.zip"}, {"G733ZM", "10078-K6B3CR-63dd00f6ecc3eb61e92439ef5caaea17.zip"}, {"G733ZS", "10081-VM2AN1-517b1e41388f12048ec3a88c780f1d65.zip"}, {"G733ZW", "10080-HY42QH-aa285046069cfe113953b91f1a28d101.zip"}, {"G733ZX", "10082-JS5F1Y-41bccc831aec7bf1c0a59a309bc607c7.zip"}, {"G814FH", "22968-E1S7CQ-74db4415d107c62a83d16ad3651bc050.zip"}, {"G814FM", "22969-W0BPSY-85970fbc1c06f1211d4079f1a5a88814.zip"}, {"G814FP", "22970-A9YYN5-3aae7c7bfd23fea9653e47a8af10ccf8.zip"}, {"G814JI", "18243-BAU912-671afb033d3b1c44f9852ff608910f42.zip"}, {"G814JIR", "19802-1CGBPH-f1d31bab157b36d109e1e10591d49f4b.zip"}, {"G814JU", "18193-Y5GMF0-843cee9ed982a3d5aba21e99efbc396c.zip"}, {"G814JV", "18194-9Q537I-c5c2ca782d26dcd5346c110767347903.zip"}, {"G814JVR", "19801-JK7M4V-617e0c975bf6e2a6f67802d825fa6aa4.zip"}, {"G814JZ", "18195-V98WBX-19d4c2e52916bf9c96fcaed6f1d9bdda.zip"}, {"G814PH", "22616-BV83XY-70a74e6af7e03ba02c7cc1cd4d673dfd.zip"}, {"G814PM", "22615-BA9BEE-b50e8887b590eaef979582b10100d8c5.zip"}, {"G814PP", "22618-LD3JLK-2d0e669837bebbc804840a6fe8d8b398.zip"}, {"G815JHR", "22607-WNVMUG-a68e0fc8990eef8bd47566ae45b69d88.zip"}, {"G815JMR", "22608-IXWA0Z-9885972f57eeccda2bebb851ab79a481.zip"}, {"G815JPR", "22609-MXV0D5-9b5445f2e3900d16ee3327cafa7b3bf1.zip"}, {"G815LH", "21978-OT4T3K-1945c266905d7f779bcd57400eca1b9a.zip"}, {"G815LM", "21981-T8RBUT-0251d2dfd9150ed6d5c9999e6428707f.zip"}, {"G815LP", "21982-RXZOHG-ca29c09860c97f0e69b225ad8cb8a47b.zip"}, {"G815LR", "21980-ZT48Z9-b60f503dcd152b6152dcf1e328a79177.zip"}, {"G815LW", "21979-LR1WNB-4ef0e10c142e7805e0d207261e484dff.zip"}, {"G834JY", "15954-HAV3KR-d219c43750d485279e12cf76f5b2569b.zip"}, {"G834JYR", "19121-GX7FZU-7c449cf7db0033db75da0f4a464ee4d9.zip"}, {"G834JZ", "15953-C7XC62-a987058c0a26fa3c929b300d099296a5.zip"}, {"G834JZR", "19122-CAYURL-f71108b839d923ae92f3f83451ddfa69.zip"}, {"G835LR", "21987-TCRPUD-19e2bd431fa4d9acd5f6b4f53cd63445.zip"}, {"G835LW", "21989-JGI499-89ec59aa686a58d890e6f441c329e8bd.zip"}, {"G835LX", "21988-Q88PAJ-a0413f1695207b780f3a9a1c30aa838a.zip"}, {"GA401IC", "5864-KC8TTP-082f9a62dda322ccaed82ff3e3466bf8.zip"}, {"GA401IE", "5866-JO8504-dde5402bdecafc1cef55a7dc3d6167ec.zip"}, {"GA401IHR", "5865-7DV6TB-9833a54c7334dc3aef1b9e99f56b9e95.zip"}, {"GA401QC", "5129-PY283Y-ac372208c57a7f558db6c169cd50d091.zip"}, {"GA401QE", "5130-C2G5CO-8ea0eb1ca537d77d19bad13dee55294c.zip"}, {"GA401QH", "5124-QQ97GA-bbde59c5235d8b72b78059b95e8a23a2.zip"}, {"GA401QM", "4922-222SBA-340a82b955a5f57ff39f6d2d08af365b.zip"}, {"GA402NF", "14160-ORONGT-ca84f0561683e1a07548d0cb7e42c275.zip"}, {"GA402NI", "14159-SDCMA5-300bd29af08b0f5d1527a375f8c326f2.zip"}, {"GA402NJ", "14158-O7H0GR-10db546f9901ac02d3ce8d5a28cb4772.zip"}, {"GA402NU", "14157-QJ4W59-69222faad499f94b4d96f7d85504930d.zip"}, {"GA402NV", "14156-ZKGYBE-ae1ac3947eb8684cabc0cd45f8d4c67e.zip"}, {"GA402NY", "14155-AL3KZU-17ac9e4b88c03ebaf983134f76f9a4b2.zip"}, {"GA402NZ", "14154-SY6J4X-7d8416a09b51e32f856f3353173ccc70.zip"}, {"GA402RI", "10145-9W1623-272e082c57c6e41074b2cace72adc92e.zip"}, {"GA402RJ", "10146-IY7ENY-f6d2d25b5b6b21616ceddc4e9aefa656.zip"}, {"GA402RK", "10151-7RPIER-2588aa83188168f8375ed9bab7bb67d2.zip"}, {"GA402RQ", "10147-9NQMQH-7ff3944c376e91b26c0a1c18122a4262.zip"}, {"GA402RU", "10149-3F10IX-43c96d30b6702261c3cf85467857eec9.zip"}, {"GA402RW", "10150-5H5ISD-1badfa856f0ec8d15d9d5832a8d54fc9.zip"}, {"GA402RX", "10148-QFCU8O-704d371255ae8a72737f5f8eca75eb9d.zip"}, {"GA402XI", "14899-86ZX57-5940ed56b182781334ca2856f6ba0b9e.zip"}, {"GA402XJ", "14901-MDIR3C-5022331539bb187bf041a7e3ab0a46bf.zip"}, {"GA402XU", "14900-KYCOC7-361bb364d26ff834d6bd716d14f70006.zip"}, {"GA402XV", "14902-EL34M9-731ba1cc0d27d2db9a79d872673e7958.zip"}, {"GA402XY", "14903-ICC56W-0456739d8ba5ee543dfba99eb6ad217a.zip"}, {"GA402XZ", "14904-B3K2NR-928b7272790e7da0079c549cd4885d5d.zip"}, {"GA403UH", "22130-961KSK-c85781ae0e06619558d0e5521410ed9b.zip"}, {"GA403UI", "19112-NB8TJ1-e1de0121e30431cc5520ea6eccb6e46f.zip"}, {"GA403UM", "22131-6S9LD4-8b2947a33df627268d02508e3c0d4e94.zip"}, {"GA403UP", "22132-CYYLFA-5f1047df14434ddd8d5ab779c55c9173.zip"}, {"GA403UU", "19113-C86SAH-4338dac48ad593c4079515b7599b8943.zip"}, {"GA403UV", "19114-6KR0FP-4740ed98a2ca06bc26c363de380a037d.zip"}, {"GA403WH", "22124-MX48WN-aad1a7201e9f3ed9c99b060b14eed997.zip"}, {"GA403WM", "22125-DFIUZF-8772887a07055debb5a3cf97c55c4242.zip"}, {"GA403WP", "22129-XXPL3G-1a8da27221fbab5daba1852103a93577.zip"}, {"GA403WR", "22126-4XQZW0-10c3ddd2ea2cf3f17a1df07326bc0f97.zip"}, {"GA403WW", "22128-VNI4AK-eab16cadfd673802df351d71f451b223.zip"}, {"GA403WX", "22127-T3HDCM-801fd1dbc97b43cd849331501c4e9c94.zip"}, {"GA502II", "3554-REAPZQ-5f94c7ecd52ae2cad50aaac4341bec7b.zip"}, {"GA502IU", "3555-15UWZ4-d1cd040265773efd61bdfd146140a990.zip"}, {"GA502IV", "3556-ULLH3K-1f56134e43e1ffa353256fbeb9840d3f.zip"}, {"GA503IC", "7457-RENJRP-5b833a2bd8e1e13ec41f0acf7ef04fd0.zip"}, {"GA503IE", "7465-QO1Q0F-663f0c9501e649bcb0069413f3081a49.zip"}, {"GA503IH", "7458-D6CHF3-4c6b83cb3efc11713fddd9c41cfd127c.zip"}, {"GA503IM", "7741-F8GHPK-63e17aca55a11e838b1079eb0c6bea16.zip"}, {"GA503QC", "7459-308BEA-bcf2604511112df5fa810faa9cdece89.zip"}, {"GA503QE", "7464-4T2J1D-3920997d2f44d3b40dffd6ba9f028075.zip"}, {"GA503QM", "7739-BSD39S-f9858fd4a68ff8ef60b8abf2cda92dd7.zip"}, {"GA503QN", "7740-QT19P2-33054dbe06ae3baa435a44ce529eddb5.zip"}, {"GA503QR", "7738-QVCIRY-4e612ff997f11448c77068e39ee0681e.zip"}, {"GA503QS", "7737-B5L4LD-4400a4ddc94eebefb0678fb281b63fa0.zip"}, {"GA503RJ", "10630-MSC4Q2-f16f1ef2847069e50aad62083836b220.zip"}, {"GA503RK", "10631-VXWRAN-b2a1aa499bf33f1f9bd3d80e31dd9d69.zip"}, {"GA503RM", "12054-38JGOX-35e7b1afb150daea1eab90ae97f0da7b.zip"}, {"GA503RR", "10632-IOY3C0-bf16d1028f572ede9dd8e1a2fd632ae5.zip"}, {"GA503RS", "11745-689QTC-6c441a7161a34b871918fce5997c4e2e.zip"}, {"GA503RW", "12055-SG6VTH-91cc5782da63cf3dcc16804a47db25a2.zip"}, {"GA503RX", "12056-MR9J0D-b7dad63f751d2e53aeee479524986bdd.zip"}, {"GA605KH", "34778-1X5X1P-9b023a4cc276c1b76403252fb0f3e5a3.zip"}, {"GA605KM", "34779-NF05HM-bcb5d80ed987f1bb4dfd4483bb1641fb.zip"}, {"GA605KP", "34780-M8F3RH-0cb687d074f358270b8d189bac6c77c3.zip"}, {"GA605WI", "20014-K4K912-2a2e5a66fac3cc97fb13394a189bd75e.zip"}, {"GA605WU", "20015-HJM11B-a724c1fe216b73c0b3b24475047f4615.zip"}, {"GA605WV", "20016-BWVQPK-01624c1cdd5a3c05252bad472fab1240.zip"}, {"GL_Series", "2167-P7ELNB-44d357ee720a0c48c2eb37eee785316c.zip"}, {"GL503GE", "57-YI7HPS-9ed36ba45ff6398f3648a44ced4e5e61.zip"}, {"GL504GM", "58-JOZ3S5-998677afd41375cb8fd60ace8d11a788.zip"}, {"GL504GS", "59-KS4SJK-b1c9807c7d7dc847fa895516b3b9a8cb.zip"}, {"GL504GV", "167-OX51EF-b8b5c713bff267d315e0255370956e75.zip"}, {"GL504GW", "168-NMGNB6-1f6d79b87d077c235c57d4505ce802e7.zip"}, {"GL703GE", "60-M0UOZ3-1474ef8209bf010de4c6e6ae94ce351d.zip"}, {"GL703GM", "61-WJGLV3-b8005e077aa4825799459412849e346c.zip"}, {"GL703GS", "62-HU12J1-a88023229e3a2dbc5fc1aca1b07e4d76.zip"}, {"GL704GV", "106-3IHGVF-5d15db39c04a44e3503d3536d4f0c132.zip"}, {"GL704GW", "107-NZ7VZL-cae8497c2eb8479f4808d2b61e7c8e70.zip"}, {"GM_Series", "2169-K05CUW-841a5508c96649de28d613e32dfb7fcf.zip"}, {"GM501GM", "63-3CL0UZ-eee6728dd2517d6e3af581f1caef0114.zip"}, {"GM501GS", "64-GH66XC-5e69efa00bbe486efd897414ed329545.zip"}, {"GU_Series", "2170-FYLCER-f45e5d5e38121b7bfe275b780e739a8e.zip"}, {"GU501GM", "65-LSRZXK-658dc6e1c89a7787201ec7c74eebf2d5.zip"}, {"GU502DU", "4004-T40IY1-74f962c9d9d27544c964bdb347074472.zip"}, {"GU603HE", "11674-VGXXML-41035c5f9dbf4e0b64a74eb3f89d95e4.zip"}, {"GU603HM", "11676-GO5KVF-581b4f49e0e12d9d6654ab2c1db9ab11.zip"}, {"GU603HR", "11675-AZPXHF-48a9979ce428acfcc57c4e295f8a9840.zip"}, {"GU603VI", "22217-V6DZR1-cb3e0bf4c1fa63e2cc3509b8b0cf517d.zip"}, {"GU603VJ", "14580-18G1FP-4456270d80c37a0597b3bfc559222f64.zip"}, {"GU603VQ", "14581-8YY8TX-e7aa10a20a41245500f40841b2298a42.zip"}, {"GU603VU", "22218-5W0UVU-2d9ccfbfe1e5fb58d477e9c456ddf637.zip"}, {"GU603VV", "22219-EKZ2J0-3c73e741e68555dc39976ed2c38cd347.zip"}, {"GU603ZE", "9817-3EENL9-3187794df7ec8ddef2fe04d0787eff63.zip"}, {"GU603ZEB", "9818-KOP3C1-11ab717fddedafb9066b362d8da5af85.zip"}, {"GU603ZI", "14431-H4XZCU-1c907d4e22bbd5000a6c81cfc2e1dae4.zip"}, {"GU603ZJ", "14432-Y5HC6R-b50edb7a5ad9469b89c35e5cd9fc114f.zip"}, {"GU603ZM", "9819-718DH0-30bf094253e5178aba765436bb8b150f.zip"}, {"GU603ZQ", "14434-3KPJU7-211e518352b0660babc4816fa5dd80bd.zip"}, {"GU603ZR", "9820-LIQ8FP-6a60aee97d7028e7ea63bd2ab6c2b099.zip"}, {"GU603ZU", "14435-2ZW8FL-65ab99a80fe08d8d088d8fdc998076f4.zip"}, {"GU603ZV", "14433-FEY59U-cd0508e779a6b3874a61668f39ff78e0.zip"}, {"GU603ZW", "9822-3R2PGP-f2d24c6931e733a5e0e41dc8560b80cc.zip"}, {"GU603ZX", "9821-AQYG62-f42f167ec7b4f4fe003f05b1c1c61d58.zip"}, {"GU604VI", "14284-R38BM3-e2591bfa2582ce68b2c8aba63beac5e3.zip"}, {"GU604VY", "14282-78N7V4-25e76896744c53317fa41a80788a2241.zip"}, {"GU604VZ", "14283-U4JX5C-f31dff75d52f48ceca0102fd1bc76e31.zip"}, {"GU605CH", "22118-KAKRIQ-b2b88103b3bd650bdfd526a4a64be94f.zip"}, {"GU605CM", "22119-AIQFFC-12e1e36bcc6b917210c454177c012146.zip"}, {"GU605CP", "22120-SJ4WQL-331fc48fa8fe4494f52492b143a4c5c0.zip"}, {"GU605CR", "22121-IEKEQ3-5265006f98166fe397a0a9ffac782e87.zip"}, {"GU605CW", "22123-63UFOU-d8c179200a0ddd661e8b8838ad023452.zip"}, {"GU605CX", "22122-M8J9C2-029d307fdbc49dd80dca79e1c8ed6e32.zip"}, {"GU605MI", "19271-93QRMU-eab4115ee09fb9bbd86facec08a822a1.zip"}, {"GU605MU", "19272-RDZDEJ-4380e52eab6a3742613c2f694a19da1e.zip"}, {"GU605MV", "19274-1T9PKS-d05273f430d255ad1779cf6a7eb57db3.zip"}, {"GU605MY", "19273-F4A493-2bc9083d99e7827b4580311d34f8998b.zip"}, {"GU605MZ", "19275-52DG5X-1072d6f4fdc5b9cbb304da7146f05a79.zip"}, {"GV301QC", "5128-RN42GR-9a6049e7adabd1ff2aeed24293fe03a8.zip"}, {"GV301QCZ", "6778-152PHS-7a9ad124aef1059471542dfc8912ed7b.zip"}, {"GV301QE", "5125-PD15GR-9a7f72cbf5bd97d283464d8e407f0231.zip"}, {"GV301QEZ", "6780-N3Y08B-222db095847d99663a575be36fbcf410.zip"}, {"GV301QH", "5077-0BEYRT-ff8e30857ab4af017381f5703b39abed.zip"}, {"GV301QHZ", "6779-9XZE32-329974b938dff4baf3097e3d745839eb.zip"}, {"GV301RA", "10272-1B7YAA-45e3697377ff2e7dd68c57f5919eecd2.zip"}, {"GV301RC", "10273-UJ0Q76-53bdfe00929ccf3f594f813ba235438b.zip"}, {"GV301RE", "10274-1J3P7N-42dabc435e4daa40d4be2fa482624321.zip"}, {"GV302NA", "14663-N4C4U4-1654950fbc1fad0e37a016c4a1e8a934.zip"}, {"GV302NF", "14668-GMKBGC-1bd7957eb1a688f8eb0e6fb85395b839.zip"}, {"GV302NI", "14664-ZQXAM8-1dec6b07c9589698c8cccdbc3a3211a6.zip"}, {"GV302NJ", "14667-OFKJGT-60db594b4af90c481212ee31ffa96d38.zip"}, {"GV302NU", "14666-6M0N3K-3d08325f6c4b3fcacf53a2f863a0e6c5.zip"}, {"GV302NV", "14665-DWLIIQ-9b3b8b0aaca3a071f82cbb30fbbe2fd1.zip"}, {"GV302XA", "14934-AU5P0J-1873c4e95dadcf72b1fad550108a0eb5.zip"}, {"GV302XF", "14935-D5PHI6-aa9715b2328c499c8cd72b4958ba6641.zip"}, {"GV302XI", "14936-CHYX8S-f5fe72833a34f1f002dae6789f2760fe.zip"}, {"GV302XJ", "14937-LMH57E-651161fb27c3ef9904e15fc42e5d8352.zip"}, {"GV302XU", "14938-4DXJJV-82feb9f0156bb914ccbde2de6d59ad14.zip"}, {"GV302XV", "14939-KLW56G-32ffda0b7ee35bbe4ca5789da7210cc9.zip"}, {"GV601RA", "11078-109U4J-33e9d7342819b8a7a534632df659e509.zip"}, {"GV601RE", "11079-U5MUWC-8c22738f13a798376733fead5f091a4b.zip"}, {"GV601RM", "11082-XN5PLH-5c405808680f6bfc36c5069bcd5dc366.zip"}, {"GV601RW", "11081-FK9JFY-b82e25b8f9bcd2ad1d3ae23c7cb327d0.zip"}, {"GV601RX", "11080-45B7E2-b64fdbf32877dc996b4efe274ff51f41.zip"}, {"GV601VI", "14446-JS3QXL-72327a76c47c2ffdeaad392197a4b2ce.zip"}, {"GV601VJ", "14448-TIX8CU-ed84b2ee1d92d2f38a891ed1c684eddf.zip"}, {"GV601VQ", "14447-7C8UIX-13cc4d4632406ca5976358a4080f26af.zip"}, {"GV601VU", "14450-0SP39K-8071216d3c679d013fffe57eca9f790c.zip"}, {"GV601VV", "14449-QZS5FH-6a7771cbbf9bcc641a5418f250ef3b43.zip"}, {"GX_Series", "2171-LHV7R6-bf1d918fd26714f10c3f3de990e30a1b.zip"}, {"GX501GI", "66-U9BQN2-9a12abd42e07169ec6ebf4d4a6d2c148.zip"}, {"GX502LWS", "3552-YRITSK-6f08012703e7718be25477f20ccd4d7e.zip"}, {"GX502LXS", "3553-3ACO9T-20757861512ff920da316c949249b62d.zip"}, {"GX531GM", "67-ER25S2-71ec74e4e8d14fc9c6cc8608d1616e5f.zip"}, {"GX531GS", "68-V9PHXL-3cabb33363337795287458e3b10114f8.zip"}, {"GX531GV", "108-VCV90K-00cec46bd49df326109c060367eaa57c.zip"}, {"GX531GW", "109-0GH5PV-ce1ff55527d5da0b547df776af887276.zip"}, {"GX531GX", "110-A0TZ36-4cf1c1cdeee6e0e27567e317444c62cb.zip"}, {"GX550LWS", "3671-DEEX56-d93255f509e16f740c71e8c358e8ff36.zip"}, {"GX550LXS", "3672-O3V2FT-6572c1aa661e3f406ce6e840075d81ab.zip"}, {"GX551QM", "8108-47QAG6-7d57f542a91fca797f6bad910af5b864.zip"}, {"GX551QR", "8109-ADSI6K-87224022e84f6a6c0ed2820cc4642a66.zip"}, {"GX551QS", "8110-NLPALF-6ec9938f67229be071cdb8c436303734.zip"}, {"GX650PI", "14591-ODJA1G-23aaf98034a279ae87f93f67db9b3b95.zip"}, {"GX650PU", "14592-A6IJIM-e847943987f3cf4f1d0278fe1d5ee984.zip"}, {"GX650PV", "14595-XKP10A-e14bb5df924255dc965bb975e1d64434.zip"}, {"GX650PY", "14593-KC9ZMM-6e519dbcdd0139ed1d8e7649e407d8a8.zip"}, {"GX650PZ", "14594-AETGOJ-4ba96caa5ae0ee68d8b457e0fbc03a17.zip"}, {"GX650RM", "34896-YFMU1L-4853b30e2cee17b06a8f5aab60b50d7b.zip"}, {"GX650RS", "34897-NAC55T-ddb77920692114eb95b3b95ccbc6773e.zip"}, {"GX650RW", "34898-UT9USZ-989bc43d4b45a8f69da8154b3873bc0e.zip"}, {"GX650RX", "34899-PNRB1M-a929aabb6428cd238713da872723ec0b.zip"}, {"GX701GV", "166-EI8VY0-1568b74c5bbf22297720b548ce6bcefa.zip"}, {"GX701GW", "165-C6KON3-9b95db9f024e457420793b4915749fbd.zip"}, {"GX701GX", "164-I4CRXM-b5e8ddc68c884eda5cf4676dd2683624.zip"}, {"GX701LV", "3309-DPFMBZ-ffda0b00117a5f1c69a091158b631bbe.zip"}, {"GX701LWS", "3308-PQVG48-ad364af358f946382f840c969c73d49b.zip"}, {"GX701LXS", "3307-AY5DMD-681ac8295b6f98fda4c66b891f19be4d.zip"}, {"GX703HM", "7962-KBDQY2-ff82594ee47f5c1058bc2115b6a74841.zip"}, {"GX703HMD", "7963-A3TM3L-5f39a856e3f694e9db1ed5a5410baa39.zip"}, {"GX703HR", "7967-5LQ4FV-7b6af6e1dc3a6c0786bec0ec084ee5c2.zip"}, {"GX703HRD", "7964-TFYJ6L-4bec23647da2f9bc8403d060635dbdda.zip"}, {"GX703HS", "7965-3HSRRO-c1869c30564e2db44a97c1e8953093b9.zip"}, {"GX703HSD", "7966-9CCDGL-96f0c0f9e1e50ee66894e7b168e59cc3.zip"}, {"GZ_Series", "2172-Z8OHBD-393c5060aaa27883e2fcbebc7e53997e.zip"}, {"GZ301VF", "13604-50UADT-4df87ac6eab6ac261647875d727db9d4.zip"}, {"GZ301VFC", "13787-WB73LI-b148b7cf3c90bc90fca4938bfc6fbbe5.zip"}, {"GZ301VI", "13601-DPC6YI-17ac748ec814ec3152ad973f3a0cff4b.zip"}, {"GZ301VIC", "13790-Z6V8RW-7a4f735f65c545158c7ba715694aa3c7.zip"}, {"GZ301VJ", "13600-UNQHZ7-e7d0cbf757eeed28dba9295b517ef835.zip"}, {"GZ301VJC", "13788-QVWJWQ-a13027f81094f94eea1d86152fe69ba9.zip"}, {"GZ301VQ", "13789-K6I7SO-4a8594363610c383e39940ff135c0d7e.zip"}, {"GZ301VQC", "13791-DBRKCU-a10ec3e290c5dc93bbb45f52c714a9b8.zip"}, {"GZ301VU", "13602-6JQ2BK-4353d6c0b83589477ff4570b49258217.zip"}, {"GZ301VUC", "13792-009F1L-4ee6b0014eca72c7d0217219ebe9e365.zip"}, {"GZ301VV", "13603-OOLT27-8788c068fdad2a64da9925a5411b30af.zip"}, {"GZ301VVC", "13793-8DIIWY-72aca4ea0f1db6c991b3e24da5a7907c.zip"}, {"GZ301ZA", "10139-YXT5A7-521746c1b4991657abc37999a318219e.zip"}, {"GZ301ZC", "10140-QA59M0-be0cf751aba85c98832f4a0f16456330.zip"}, {"GZ301ZE", "10141-P1OXLB-318b5c3601e0d5c55d3b4307eba08ab2.zip"}, {"GZ301ZH", "10142-ELMX6M-f9c50110ca0a763bf4b6d1e9dd9e3afa.zip"}, {"GZ302EA", "21590-GQ959N-152f6838ae23ac9c30f05737f86505c7.zip"}, {"NR2301L", "14736-3DM4T5-41c1b0b5c2d726da7c66e0c39ea08017.zip"}, {"RC71L", "17126-IIDPFS-718c077a118724bb0045b35e30d5ac4e.zip"}, {"RC71X", "15182-KWVC62-c754d9ea39f9160df7e21e4538ce60df.zip"}, {"RC72LA", "19770-DOSUSI-85f700513af330af6e20fcfdabaeb87f.zip"}, {"RC73XA", "22912-04WYQN-fdd641029ab74a51bbbf037ea04713be.zip"}, {"RC73YA", "22913-BDOXY4-aff9d8707fceedbf6cc35cb570fc27b5.zip"} }; if (profiles.ContainsKey(model)) { return baseUrl + profiles[model]; } else { return null; } } public static bool ProfileExists() { (string bios, string model) = AppConfig.GetBiosAndModel(); if (model is null) return false; return (GetProfileUrl(model) is not null); } public static async Task InstallProfile() { ProcessHelper.RunAsAdmin("colors"); (string bios, string model) = AppConfig.GetBiosAndModel(); string? profileUrl = GetProfileUrl(model); if (profileUrl == null) { Logger.WriteLine($"No ICC Profile found for {model}"); return; } await DownloadAndExtractZip(profileUrl, VisualControl.GetGameVisualPath()); } static async Task DownloadAndExtractZip(string zipUrl, string extractPath) { using (HttpClient client = new HttpClient()) { try { Logger.WriteLine($"Getting: {zipUrl}"); byte[] zipData = await client.GetByteArrayAsync(zipUrl); Directory.CreateDirectory(extractPath); string tempZipPath = Path.Combine(extractPath, "temp.zip"); await File.WriteAllBytesAsync(tempZipPath, zipData); ZipFile.ExtractToDirectory(tempZipPath, extractPath, true); File.Delete(tempZipPath); } catch (Exception ex) { Logger.WriteLine($"Error: {ex.Message}"); } } } } } ================================================ FILE: app/Display/DisplayGammaRamp.cs ================================================ namespace GHelper.Display { public class DisplayGammaRamp { public DisplayGammaRamp(ushort[] red, ushort[] green, ushort[] blue) { if (red?.Length != GammaRamp.DataPoints) { throw new ArgumentOutOfRangeException(nameof(red)); } if (green?.Length != GammaRamp.DataPoints) { throw new ArgumentOutOfRangeException(nameof(green)); } if (blue?.Length != GammaRamp.DataPoints) { throw new ArgumentOutOfRangeException(nameof(blue)); } Red = red; Green = green; Blue = blue; } public DisplayGammaRamp(double brightness = 1, double contrast = 1, double gamma = 1) : this( CalculateLUT(brightness, contrast, gamma), CalculateLUT(brightness, contrast, gamma), CalculateLUT(brightness, contrast, gamma) ) { } public DisplayGammaRamp( double redBrightness, double redContrast, double redGamma, double greenBrightness, double greenContrast, double greenGamma, double blueBrightness, double blueContrast, double blueGamma ) : this( CalculateLUT(redBrightness, redContrast, redGamma), CalculateLUT(greenBrightness, greenContrast, greenGamma), CalculateLUT(blueBrightness, blueContrast, blueGamma) ) { } internal DisplayGammaRamp(GammaRamp ramp) : this(ramp.Red, ramp.Green, ramp.Blue) { } public ushort[] Blue { get; } public ushort[] Green { get; } public ushort[] Red { get; } private static ushort[] CalculateLUT(double brightness, double contrast, double gamma) { brightness = 0.5 + brightness / 2; var result = new ushort[GammaRamp.DataPoints]; for (var i = 0; i < result.Length; i++) { result[i] = (ushort)(brightness * ushort.MaxValue * i / (float)(result.Length - 1)); } return result; } public bool IsOriginal() { int MaxRed = Red[Red.Length - 1]; int MaxGreen = Green[Green.Length - 1]; int MaxBlue = Blue[Blue.Length - 1]; return (Math.Abs((MaxRed + MaxGreen + MaxBlue) / 3 - ushort.MaxValue) < 256); } private static ushort[] Brightness(ushort[] data, double brightness) { var result = new ushort[GammaRamp.DataPoints]; for (var i = 0; i < result.Length; i++) { if (brightness < 0.5) result[i] = (ushort)(0.5 * ushort.MaxValue * Math.Pow((float)i/(result.Length - 1), 2 - brightness*2)); else result[i] = (ushort)(data[i] * brightness); } return result; } internal GammaRamp AsBrightnessRamp(double brightness) { return new GammaRamp( Brightness(Red, brightness), Brightness(Green, brightness), Brightness(Blue, brightness) ); } internal GammaRamp AsRamp() { return new GammaRamp(Red, Green, Blue); } } } ================================================ FILE: app/Display/GammaRamp.cs ================================================ using System.Runtime.InteropServices; namespace GHelper.Display { [StructLayout(LayoutKind.Sequential)] internal struct GammaRamp { public const int DataPoints = 256; [MarshalAs(UnmanagedType.ByValArray, SizeConst = DataPoints)] public readonly ushort[] Red; [MarshalAs(UnmanagedType.ByValArray, SizeConst = DataPoints)] public readonly ushort[] Green; [MarshalAs(UnmanagedType.ByValArray, SizeConst = DataPoints)] public readonly ushort[] Blue; public GammaRamp(ushort[] red, ushort[] green, ushort[] blue) { if (red == null) { throw new ArgumentNullException(nameof(red)); } if (green == null) { throw new ArgumentNullException(nameof(green)); } if (blue == null) { throw new ArgumentNullException(nameof(blue)); } if (red.Length != DataPoints) { throw new ArgumentOutOfRangeException(nameof(red)); } if (green.Length != DataPoints) { throw new ArgumentOutOfRangeException(nameof(green)); } if (blue.Length != DataPoints) { throw new ArgumentOutOfRangeException(nameof(blue)); } Red = red; Green = green; Blue = blue; } } } ================================================ FILE: app/Display/ScreenBrightness.cs ================================================ namespace GHelper.Display { using System; using System.Diagnostics; using System.Management; public static class ScreenBrightness { public static int Get() { using var mclass = new ManagementClass("WmiMonitorBrightness") { Scope = new ManagementScope(@"\\.\root\wmi") }; using var instances = mclass.GetInstances(); foreach (ManagementObject instance in instances) { return (byte)instance.GetPropertyValue("CurrentBrightness"); } return 0; } public static void Set(int brightness) { using var mclass = new ManagementClass("WmiMonitorBrightnessMethods") { Scope = new ManagementScope(@"\\.\root\wmi") }; using var instances = mclass.GetInstances(); var args = new object[] { 1, brightness }; foreach (ManagementObject instance in instances) { instance.InvokeMethod("WmiSetBrightness", args); } } public static int Adjust(int delta) { int brightness = Get(); Debug.WriteLine(brightness); brightness = Math.Min(100, Math.Max(0, brightness + delta)); Set(brightness); return brightness; } } } ================================================ FILE: app/Display/ScreenCCD.cs ================================================ using System.ComponentModel; using System.Runtime.InteropServices; namespace GHelper.Display { public class ScreenCCD { public static bool GetHDRStatus(bool log = true) { var err = GetDisplayConfigBufferSizes(QDC.QDC_ONLY_ACTIVE_PATHS, out var pathCount, out var modeCount); if (err != 0) throw new Win32Exception(err); var paths = new DISPLAYCONFIG_PATH_INFO[pathCount]; var modes = new DISPLAYCONFIG_MODE_INFO[modeCount]; err = QueryDisplayConfig(QDC.QDC_ONLY_ACTIVE_PATHS, ref pathCount, paths, ref modeCount, modes, IntPtr.Zero); if (err != 0) { Logger.WriteLine("HDR Detection Error: " + new Win32Exception(err).Message); return false; } string internalName = AppConfig.GetString("internal_display"); foreach (var path in paths) { // get display name var info = new DISPLAYCONFIG_TARGET_DEVICE_NAME(); info.header.type = DISPLAYCONFIG_DEVICE_INFO_TYPE.DISPLAYCONFIG_DEVICE_INFO_GET_TARGET_NAME; info.header.size = Marshal.SizeOf(); info.header.adapterId = path.targetInfo.adapterId; info.header.id = path.targetInfo.id; err = DisplayConfigGetDeviceInfo(ref info); if (err != 0) throw new Win32Exception(err); var colorInfo = new DISPLAYCONFIG_GET_ADVANCED_COLOR_INFO(); colorInfo.header.type = DISPLAYCONFIG_DEVICE_INFO_TYPE.DISPLAYCONFIG_DEVICE_INFO_GET_ADVANCED_COLOR_INFO; colorInfo.header.size = Marshal.SizeOf(); colorInfo.header.adapterId = path.targetInfo.adapterId; colorInfo.header.id = path.targetInfo.id; err = DisplayConfigGetDeviceInfo(ref colorInfo); if (err != 0) throw new Win32Exception(err); if (info.outputTechnology == DISPLAYCONFIG_VIDEO_OUTPUT_TECHNOLOGY.DISPLAYCONFIG_OUTPUT_TECHNOLOGY_INTERNAL || info.outputTechnology == DISPLAYCONFIG_VIDEO_OUTPUT_TECHNOLOGY.DISPLAYCONFIG_OUTPUT_TECHNOLOGY_DISPLAYPORT_EMBEDDED || info.monitorFriendlyDeviceName == internalName) { if (log) Logger.WriteLine(info.monitorFriendlyDeviceName + " HDR: " + colorInfo.advancedColorEnabled + " " + colorInfo.bitsPerColorChannel + " " + colorInfo.value + " " + colorInfo.wideColorEnforced); return colorInfo.advancedColorEnabled && (colorInfo.bitsPerColorChannel > 8 || !colorInfo.wideColorEnforced); } } return false; } private enum DISPLAYCONFIG_DEVICE_INFO_TYPE { DISPLAYCONFIG_DEVICE_INFO_GET_SOURCE_NAME = 1, DISPLAYCONFIG_DEVICE_INFO_GET_TARGET_NAME = 2, DISPLAYCONFIG_DEVICE_INFO_GET_TARGET_PREFERRED_MODE = 3, DISPLAYCONFIG_DEVICE_INFO_GET_ADAPTER_NAME = 4, DISPLAYCONFIG_DEVICE_INFO_SET_TARGET_PERSISTENCE = 5, DISPLAYCONFIG_DEVICE_INFO_GET_TARGET_BASE_TYPE = 6, DISPLAYCONFIG_DEVICE_INFO_GET_SUPPORT_VIRTUAL_RESOLUTION = 7, DISPLAYCONFIG_DEVICE_INFO_SET_SUPPORT_VIRTUAL_RESOLUTION = 8, DISPLAYCONFIG_DEVICE_INFO_GET_ADVANCED_COLOR_INFO = 9, DISPLAYCONFIG_DEVICE_INFO_SET_ADVANCED_COLOR_STATE = 10, DISPLAYCONFIG_DEVICE_INFO_GET_SDR_WHITE_LEVEL = 11, } private enum DISPLAYCONFIG_COLOR_ENCODING { DISPLAYCONFIG_COLOR_ENCODING_RGB = 0, DISPLAYCONFIG_COLOR_ENCODING_YCBCR444 = 1, DISPLAYCONFIG_COLOR_ENCODING_YCBCR422 = 2, DISPLAYCONFIG_COLOR_ENCODING_YCBCR420 = 3, DISPLAYCONFIG_COLOR_ENCODING_INTENSITY = 4, } private enum DISPLAYCONFIG_SCALING { DISPLAYCONFIG_SCALING_IDENTITY = 1, DISPLAYCONFIG_SCALING_CENTERED = 2, DISPLAYCONFIG_SCALING_STRETCHED = 3, DISPLAYCONFIG_SCALING_ASPECTRATIOCENTEREDMAX = 4, DISPLAYCONFIG_SCALING_CUSTOM = 5, DISPLAYCONFIG_SCALING_PREFERRED = 128, } private enum DISPLAYCONFIG_ROTATION { DISPLAYCONFIG_ROTATION_IDENTITY = 1, DISPLAYCONFIG_ROTATION_ROTATE90 = 2, DISPLAYCONFIG_ROTATION_ROTATE180 = 3, } private enum DISPLAYCONFIG_VIDEO_OUTPUT_TECHNOLOGY { DISPLAYCONFIG_OUTPUT_TECHNOLOGY_OTHER = -1, DISPLAYCONFIG_OUTPUT_TECHNOLOGY_HD15 = 0, DISPLAYCONFIG_OUTPUT_TECHNOLOGY_SVIDEO = 1, DISPLAYCONFIG_OUTPUT_TECHNOLOGY_COMPOSITE_VIDEO = 2, DISPLAYCONFIG_OUTPUT_TECHNOLOGY_COMPONENT_VIDEO = 3, DISPLAYCONFIG_OUTPUT_TECHNOLOGY_DVI = 4, DISPLAYCONFIG_OUTPUT_TECHNOLOGY_HDMI = 5, DISPLAYCONFIG_OUTPUT_TECHNOLOGY_LVDS = 6, DISPLAYCONFIG_OUTPUT_TECHNOLOGY_D_JPN = 8, DISPLAYCONFIG_OUTPUT_TECHNOLOGY_SDI = 9, DISPLAYCONFIG_OUTPUT_TECHNOLOGY_DISPLAYPORT_EXTERNAL = 10, DISPLAYCONFIG_OUTPUT_TECHNOLOGY_DISPLAYPORT_EMBEDDED = 11, DISPLAYCONFIG_OUTPUT_TECHNOLOGY_UDI_EXTERNAL = 12, DISPLAYCONFIG_OUTPUT_TECHNOLOGY_UDI_EMBEDDED = 13, DISPLAYCONFIG_OUTPUT_TECHNOLOGY_SDTVDONGLE = 14, DISPLAYCONFIG_OUTPUT_TECHNOLOGY_MIRACAST = 15, DISPLAYCONFIG_OUTPUT_TECHNOLOGY_INDIRECT_WIRED = 16, DISPLAYCONFIG_OUTPUT_TECHNOLOGY_INDIRECT_VIRTUAL = 17, DISPLAYCONFIG_OUTPUT_TECHNOLOGY_INTERNAL = unchecked((int)0x80000000), } private enum DISPLAYCONFIG_TOPOLOGY_ID { DISPLAYCONFIG_TOPOLOGY_INTERNAL = 0x00000001, DISPLAYCONFIG_TOPOLOGY_CLONE = 0x00000002, DISPLAYCONFIG_TOPOLOGY_EXTEND = 0x00000004, DISPLAYCONFIG_TOPOLOGY_EXTERNAL = 0x00000008, } private enum DISPLAYCONFIG_PATH { DISPLAYCONFIG_PATH_ACTIVE = 0x00000001, DISPLAYCONFIG_PATH_PREFERRED_UNSCALED = 0x00000004, DISPLAYCONFIG_PATH_SUPPORT_VIRTUAL_MODE = 0x00000008, } private enum DISPLAYCONFIG_SOURCE_FLAGS { DISPLAYCONFIG_SOURCE_IN_USE = 0x00000001, } private enum DISPLAYCONFIG_TARGET_FLAGS { DISPLAYCONFIG_TARGET_IN_USE = 0x00000001, DISPLAYCONFIG_TARGET_FORCIBLE = 0x00000002, DISPLAYCONFIG_TARGET_FORCED_AVAILABILITY_BOOT = 0x00000004, DISPLAYCONFIG_TARGET_FORCED_AVAILABILITY_PATH = 0x00000008, DISPLAYCONFIG_TARGET_FORCED_AVAILABILITY_SYSTEM = 0x00000010, DISPLAYCONFIG_TARGET_IS_HMD = 0x00000020, } private enum QDC { QDC_ALL_PATHS = 0x00000001, QDC_ONLY_ACTIVE_PATHS = 0x00000002, QDC_DATABASE_CURRENT = 0x00000004, QDC_VIRTUAL_MODE_AWARE = 0x00000010, QDC_INCLUDE_HMD = 0x00000020, } private enum DISPLAYCONFIG_SCANLINE_ORDERING { DISPLAYCONFIG_SCANLINE_ORDERING_UNSPECIFIED = 0, DISPLAYCONFIG_SCANLINE_ORDERING_PROGRESSIVE = 1, DISPLAYCONFIG_SCANLINE_ORDERING_INTERLACED = 2, DISPLAYCONFIG_SCANLINE_ORDERING_INTERLACED_UPPERFIELDFIRST = DISPLAYCONFIG_SCANLINE_ORDERING_INTERLACED, DISPLAYCONFIG_SCANLINE_ORDERING_INTERLACED_LOWERFIELDFIRST = 3, } private enum DISPLAYCONFIG_PIXELFORMAT { DISPLAYCONFIG_PIXELFORMAT_8BPP = 1, DISPLAYCONFIG_PIXELFORMAT_16BPP = 2, DISPLAYCONFIG_PIXELFORMAT_24BPP = 3, DISPLAYCONFIG_PIXELFORMAT_32BPP = 4, DISPLAYCONFIG_PIXELFORMAT_NONGDI = 5, } private enum DISPLAYCONFIG_MODE_INFO_TYPE { DISPLAYCONFIG_MODE_INFO_TYPE_SOURCE = 1, DISPLAYCONFIG_MODE_INFO_TYPE_TARGET = 2, DISPLAYCONFIG_MODE_INFO_TYPE_DESKTOP_IMAGE = 3, } [StructLayout(LayoutKind.Sequential)] private struct DISPLAYCONFIG_DEVICE_INFO_HEADER { public DISPLAYCONFIG_DEVICE_INFO_TYPE type; public int size; public LUID adapterId; public uint id; } [StructLayout(LayoutKind.Sequential)] private struct DISPLAYCONFIG_GET_ADVANCED_COLOR_INFO { public DISPLAYCONFIG_DEVICE_INFO_HEADER header; public uint value; public DISPLAYCONFIG_COLOR_ENCODING colorEncoding; public int bitsPerColorChannel; public bool advancedColorSupported => (value & 0x1) == 0x1; public bool advancedColorEnabled => (value & 0x2) == 0x2; public bool wideColorEnforced => (value & 0x4) == 0x4; public bool advancedColorForceDisabled => (value & 0x8) == 0x8; } [StructLayout(LayoutKind.Sequential)] private struct POINTL { public int x; public int y; } [StructLayout(LayoutKind.Sequential)] private struct LUID { public uint LowPart; public int HighPart; public long Value => ((long)HighPart << 32) | LowPart; public override string ToString() => Value.ToString(); } [StructLayout(LayoutKind.Sequential)] private struct DISPLAYCONFIG_SOURCE_MODE { public uint width; public uint height; public DISPLAYCONFIG_PIXELFORMAT pixelFormat; public POINTL position; } [StructLayout(LayoutKind.Sequential)] private struct DISPLAYCONFIG_RATIONAL { public uint Numerator; public uint Denominator; public override string ToString() => Numerator + " / " + Denominator; } [StructLayout(LayoutKind.Sequential)] private struct DISPLAYCONFIG_2DREGION { public uint cx; public uint cy; } [StructLayout(LayoutKind.Sequential)] private struct DISPLAYCONFIG_DESKTOP_IMAGE_INFO { public POINTL PathSourceSize; public RECT DesktopImageRegion; public RECT DesktopImageClip; } [StructLayout(LayoutKind.Sequential)] private struct DISPLAYCONFIG_VIDEO_SIGNAL_INFO { public ulong pixelRate; public DISPLAYCONFIG_RATIONAL hSyncFreq; public DISPLAYCONFIG_RATIONAL vSyncFreq; public DISPLAYCONFIG_2DREGION activeSize; public DISPLAYCONFIG_2DREGION totalSize; public uint videoStandard; public DISPLAYCONFIG_SCANLINE_ORDERING scanLineOrdering; } [StructLayout(LayoutKind.Sequential)] private struct DISPLAYCONFIG_TARGET_MODE { public DISPLAYCONFIG_VIDEO_SIGNAL_INFO targetVideoSignalInfo; } [StructLayout(LayoutKind.Explicit)] private struct DISPLAYCONFIG_MODE_INFO_union { [FieldOffset(0)] public DISPLAYCONFIG_TARGET_MODE targetMode; [FieldOffset(0)] public DISPLAYCONFIG_SOURCE_MODE sourceMode; [FieldOffset(0)] public DISPLAYCONFIG_DESKTOP_IMAGE_INFO desktopImageInfo; } [StructLayout(LayoutKind.Sequential)] private struct DISPLAYCONFIG_PATH_SOURCE_INFO { public LUID adapterId; public uint id; public uint modeInfoIdx; public DISPLAYCONFIG_SOURCE_FLAGS statusFlags; } [StructLayout(LayoutKind.Sequential)] private struct DISPLAYCONFIG_PATH_TARGET_INFO { public LUID adapterId; public uint id; public uint modeInfoIdx; public DISPLAYCONFIG_VIDEO_OUTPUT_TECHNOLOGY outputTechnology; public DISPLAYCONFIG_ROTATION rotation; public DISPLAYCONFIG_SCALING scaling; public DISPLAYCONFIG_RATIONAL refreshRate; public DISPLAYCONFIG_SCANLINE_ORDERING scanLineOrdering; public bool targetAvailable; public DISPLAYCONFIG_TARGET_FLAGS statusFlags; } [StructLayout(LayoutKind.Sequential)] private struct DISPLAYCONFIG_PATH_INFO { public DISPLAYCONFIG_PATH_SOURCE_INFO sourceInfo; public DISPLAYCONFIG_PATH_TARGET_INFO targetInfo; public DISPLAYCONFIG_PATH flags; } [StructLayout(LayoutKind.Sequential)] private struct DISPLAYCONFIG_MODE_INFO { public DISPLAYCONFIG_MODE_INFO_TYPE infoType; public uint id; public LUID adapterId; public DISPLAYCONFIG_MODE_INFO_union info; } [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] private struct DISPLAYCONFIG_SOURCE_DEVICE_NAME { public DISPLAYCONFIG_DEVICE_INFO_HEADER header; [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)] public string viewGdiDeviceName; } [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] private struct DISPLAYCONFIG_TARGET_DEVICE_NAME_FLAGS { public uint value; } [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] private struct DISPLAYCONFIG_TARGET_DEVICE_NAME { public DISPLAYCONFIG_DEVICE_INFO_HEADER header; public DISPLAYCONFIG_TARGET_DEVICE_NAME_FLAGS flags; public DISPLAYCONFIG_VIDEO_OUTPUT_TECHNOLOGY outputTechnology; public ushort edidManufactureId; public ushort edidProductCodeId; public uint connectorInstance; [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 64)] public string monitorFriendlyDeviceName; [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 128)] public string monitorDevicePat; } [StructLayout(LayoutKind.Sequential)] private struct RECT { public int left; public int top; public int right; public int bottom; } [DllImport("user32")] private static extern int GetDisplayConfigBufferSizes(QDC flags, out int numPathArrayElements, out int numModeInfoArrayElements); [DllImport("user32")] private static extern int QueryDisplayConfig(QDC flags, ref int numPathArrayElements, [In, Out] DISPLAYCONFIG_PATH_INFO[] pathArray, ref int numModeInfoArrayElements, [In, Out] DISPLAYCONFIG_MODE_INFO[] modeInfoArray, out DISPLAYCONFIG_TOPOLOGY_ID currentTopologyId); [DllImport("user32")] private static extern int QueryDisplayConfig(QDC flags, ref int numPathArrayElements, [In, Out] DISPLAYCONFIG_PATH_INFO[] pathArray, ref int numModeInfoArrayElements, [In, Out] DISPLAYCONFIG_MODE_INFO[] modeInfoArray, IntPtr currentTopologyId); [DllImport("user32")] private static extern int DisplayConfigGetDeviceInfo(ref DISPLAYCONFIG_GET_ADVANCED_COLOR_INFO requestPacket); [DllImport("user32")] private static extern int DisplayConfigGetDeviceInfo(ref DISPLAYCONFIG_SOURCE_DEVICE_NAME requestPacket); [DllImport("user32")] private static extern int DisplayConfigGetDeviceInfo(ref DISPLAYCONFIG_TARGET_DEVICE_NAME requestPacket); } } ================================================ FILE: app/Display/ScreenControl.cs ================================================ using System.Diagnostics; namespace GHelper.Display { public static class ScreenControl { public const int MAX_REFRESH = 1000; public static int MIN_RATE = AppConfig.Get("min_rate", 60); public static int MAX_RATE = AppConfig.Get("max_rate"); public static int GetMaxRate(string? laptopScreen) { if (MAX_RATE > 0) return MAX_RATE; else return ScreenNative.GetMaxRefreshRate(laptopScreen); } public static void AutoScreen(bool force = false) { if (force || AppConfig.Is("screen_auto")) { if (SystemInformation.PowerStatus.PowerLineStatus == PowerLineStatus.Online) SetScreen(MAX_REFRESH, 1); else SetScreen(MIN_RATE, 0); } else { SetScreen(overdrive: AppConfig.Get("overdrive")); } } public static void ToggleScreenRate() { var laptopScreen = ScreenNative.FindLaptopScreen(true); var refreshRate = ScreenNative.GetRefreshRate(laptopScreen); if (refreshRate < 0) return; ScreenNative.SetRefreshRate(laptopScreen, refreshRate > MIN_RATE ? MIN_RATE : GetMaxRate(laptopScreen)); InitScreen(); } public static void SetScreen(int frequency = -1, int overdrive = -1, int miniled = -1) { var laptopScreen = ScreenNative.FindLaptopScreen(true); var refreshRate = ScreenNative.GetRefreshRate(laptopScreen); if (refreshRate < 0) return; if (frequency >= MAX_REFRESH) { frequency = GetMaxRate(laptopScreen); } if (frequency > 0 && frequency != refreshRate) { ScreenNative.SetRefreshRate(laptopScreen, frequency); } if (Program.acpi.IsOverdriveSupported() && overdrive >= 0) { if (AppConfig.IsNoOverdrive()) overdrive = 0; if (overdrive != Program.acpi.DeviceGet(AsusACPI.ScreenOverdrive)) { Program.acpi.DeviceSet(AsusACPI.ScreenOverdrive, overdrive, "ScreenOverdrive"); } } SetMiniled(miniled); InitScreen(); } public static void SetMiniled(int miniled = -1) { if (miniled >= 0) { if (Program.acpi.DeviceGet(AsusACPI.ScreenMiniled1) >= 0) Program.acpi.DeviceSet(AsusACPI.ScreenMiniled1, miniled, "Miniled1"); else { Program.acpi.DeviceSet(AsusACPI.ScreenMiniled2, miniled, "Miniled2"); Thread.Sleep(100); } } } public static void InitMiniled() { if (AppConfig.IsForceMiniled()) { SetMiniled(AppConfig.Get("miniled")); SetHDRControl(AppConfig.Get("hdr_control")); } } public static void InitOptimalBrightness() { int optimalBrightness = AppConfig.Get("optimal_brightness"); if (optimalBrightness >= 0) SetOptimalBrightness(optimalBrightness); } public static void SetOptimalBrightness(int status) { AppConfig.Set("optimal_brightness", status); if (status == 2) status = SystemInformation.PowerStatus.PowerLineStatus == PowerLineStatus.Offline ? 1 : 0; Program.acpi.DeviceSet(AsusACPI.ScreenOptimalBrightness, status, "Optimal Brightness"); } public static int GetOptimalBrightness() { return Program.acpi.DeviceGet(AsusACPI.ScreenOptimalBrightness); } public static void ToogleFHD() { int fhd = Program.acpi.DeviceGet(AsusACPI.ScreenFHD); Logger.WriteLine($"FHD Toggle: {fhd}"); DialogResult dialogResult = MessageBox.Show("Changing display mode requires reboot", Properties.Strings.AlertUltimateTitle, MessageBoxButtons.YesNo); if (dialogResult == DialogResult.Yes) { Program.acpi.DeviceSet(AsusACPI.ScreenFHD, (fhd == 1) ? 0 : 1, "FHD"); Process.Start("shutdown", "/r /t 1"); } } public static void SetHDRControl(int status = -1) { if (status >= 0) { AppConfig.Set("hdr_control", status); Program.acpi.DeviceSet(AsusACPI.ScreenHDRControl, status, "HDR Control"); } } public static void ToogleHDRControl() { int hdrControl = Program.acpi.DeviceGet(AsusACPI.ScreenHDRControl); Logger.WriteLine($"HDR Control Toggle: {hdrControl}"); SetHDRControl((hdrControl == 1) ? 1 : 0); Thread.Sleep(200); InitScreen(); } public static string ToogleMiniled() { int miniled1 = Program.acpi.DeviceGet(AsusACPI.ScreenMiniled1); int miniled2 = Program.acpi.DeviceGet(AsusACPI.ScreenMiniled2); Logger.WriteLine($"MiniledToggle: {miniled1} {miniled2}"); int miniled; string name; if (miniled1 >= 0) { switch (miniled1) { case 1: miniled = 0; name = Properties.Strings.OneZone; break; default: miniled = 1; name = Properties.Strings.Multizone; break; } } else { switch (miniled2) { case 1: miniled = 2; name = Properties.Strings.OneZone; break; case 2: miniled = 0; name = Properties.Strings.Multizone; break; default: miniled = 1; name = Properties.Strings.MultizoneStrong; break; } } AppConfig.Set("miniled", miniled); SetScreen(miniled: miniled); return name; } public static void InitScreen() { var laptopScreen = ScreenNative.FindLaptopScreen(); int frequency = ScreenNative.GetRefreshRate(laptopScreen); int maxFrequency = GetMaxRate(laptopScreen); if (maxFrequency > 0) AppConfig.Set("max_frequency", maxFrequency); else maxFrequency = AppConfig.Get("max_frequency"); bool screenAuto = AppConfig.Is("screen_auto"); bool overdriveSetting = Program.acpi.IsOverdriveSupported() && !AppConfig.IsNoOverdrive(); int overdrive = AppConfig.IsNoOverdrive() ? 0 : Program.acpi.DeviceGet(AsusACPI.ScreenOverdrive); int miniled1 = Program.acpi.DeviceGet(AsusACPI.ScreenMiniled1); int miniled2 = Program.acpi.DeviceGet(AsusACPI.ScreenMiniled2); int miniled = (miniled1 >= 0) ? miniled1 : miniled2; bool hdr = false; if (miniled >= 0) { Logger.WriteLine($"Miniled: {miniled1} {miniled2}"); AppConfig.Set("miniled", miniled); } try { hdr = ScreenCCD.GetHDRStatus(); } catch (Exception ex) { Logger.WriteLine(ex.Message); } bool screenEnabled = (frequency >= 0); int fhd = -1; if (AppConfig.IsDUO()) { fhd = Program.acpi.DeviceGet(AsusACPI.ScreenFHD); } int hdrControl = Program.acpi.DeviceGet(AsusACPI.ScreenHDRControl); if (hdrControl >= 0) Logger.WriteLine($"HDR Control Status: {hdrControl}"); AppConfig.Set("frequency", frequency); AppConfig.Set("overdrive", overdrive); Program.settingsForm.Invoke(delegate { Program.settingsForm.VisualiseScreen( screenEnabled: screenEnabled, screenAuto: screenAuto, frequency: frequency, maxFrequency: maxFrequency, overdrive: overdrive, overdriveSetting: overdriveSetting, miniled1: miniled1, miniled2: miniled2, hdr: hdr, fhd: fhd, hdrControl: hdrControl ); }); } } } ================================================ FILE: app/Display/ScreenInterrogatory.cs ================================================ using GHelper.Helpers; using NvAPIWrapper.Display; using System.ComponentModel; using System.Runtime.InteropServices; namespace GHelper.Display { public static class ScreenInterrogatory { public const int ERROR_SUCCESS = 0; #region enums public enum QUERY_DEVICE_CONFIG_FLAGS : uint { QDC_ALL_PATHS = 0x00000001, QDC_ONLY_ACTIVE_PATHS = 0x00000002, QDC_DATABASE_CURRENT = 0x00000004 } public enum DISPLAYCONFIG_VIDEO_OUTPUT_TECHNOLOGY : uint { DISPLAYCONFIG_OUTPUT_TECHNOLOGY_OTHER = 0xFFFFFFFF, DISPLAYCONFIG_OUTPUT_TECHNOLOGY_HD15 = 0, DISPLAYCONFIG_OUTPUT_TECHNOLOGY_SVIDEO = 1, DISPLAYCONFIG_OUTPUT_TECHNOLOGY_COMPOSITE_VIDEO = 2, DISPLAYCONFIG_OUTPUT_TECHNOLOGY_COMPONENT_VIDEO = 3, DISPLAYCONFIG_OUTPUT_TECHNOLOGY_DVI = 4, DISPLAYCONFIG_OUTPUT_TECHNOLOGY_HDMI = 5, DISPLAYCONFIG_OUTPUT_TECHNOLOGY_LVDS = 6, DISPLAYCONFIG_OUTPUT_TECHNOLOGY_D_JPN = 8, DISPLAYCONFIG_OUTPUT_TECHNOLOGY_SDI = 9, DISPLAYCONFIG_OUTPUT_TECHNOLOGY_DISPLAYPORT_EXTERNAL = 10, DISPLAYCONFIG_OUTPUT_TECHNOLOGY_DISPLAYPORT_EMBEDDED = 11, DISPLAYCONFIG_OUTPUT_TECHNOLOGY_UDI_EXTERNAL = 12, DISPLAYCONFIG_OUTPUT_TECHNOLOGY_UDI_EMBEDDED = 13, DISPLAYCONFIG_OUTPUT_TECHNOLOGY_SDTVDONGLE = 14, DISPLAYCONFIG_OUTPUT_TECHNOLOGY_MIRACAST = 15, DISPLAYCONFIG_OUTPUT_TECHNOLOGY_INTERNAL = 0x80000000, DISPLAYCONFIG_OUTPUT_TECHNOLOGY_FORCE_UINT32 = 0xFFFFFFFF } public enum DISPLAYCONFIG_SCANLINE_ORDERING : uint { DISPLAYCONFIG_SCANLINE_ORDERING_UNSPECIFIED = 0, DISPLAYCONFIG_SCANLINE_ORDERING_PROGRESSIVE = 1, DISPLAYCONFIG_SCANLINE_ORDERING_INTERLACED = 2, DISPLAYCONFIG_SCANLINE_ORDERING_INTERLACED_UPPERFIELDFIRST = DISPLAYCONFIG_SCANLINE_ORDERING_INTERLACED, DISPLAYCONFIG_SCANLINE_ORDERING_INTERLACED_LOWERFIELDFIRST = 3, DISPLAYCONFIG_SCANLINE_ORDERING_FORCE_UINT32 = 0xFFFFFFFF } public enum DISPLAYCONFIG_ROTATION : uint { DISPLAYCONFIG_ROTATION_IDENTITY = 1, DISPLAYCONFIG_ROTATION_ROTATE90 = 2, DISPLAYCONFIG_ROTATION_ROTATE180 = 3, DISPLAYCONFIG_ROTATION_ROTATE270 = 4, DISPLAYCONFIG_ROTATION_FORCE_UINT32 = 0xFFFFFFFF } public enum DISPLAYCONFIG_SCALING : uint { DISPLAYCONFIG_SCALING_IDENTITY = 1, DISPLAYCONFIG_SCALING_CENTERED = 2, DISPLAYCONFIG_SCALING_STRETCHED = 3, DISPLAYCONFIG_SCALING_ASPECTRATIOCENTEREDMAX = 4, DISPLAYCONFIG_SCALING_CUSTOM = 5, DISPLAYCONFIG_SCALING_PREFERRED = 128, DISPLAYCONFIG_SCALING_FORCE_UINT32 = 0xFFFFFFFF } public enum DISPLAYCONFIG_PIXELFORMAT : uint { DISPLAYCONFIG_PIXELFORMAT_8BPP = 1, DISPLAYCONFIG_PIXELFORMAT_16BPP = 2, DISPLAYCONFIG_PIXELFORMAT_24BPP = 3, DISPLAYCONFIG_PIXELFORMAT_32BPP = 4, DISPLAYCONFIG_PIXELFORMAT_NONGDI = 5, DISPLAYCONFIG_PIXELFORMAT_FORCE_UINT32 = 0xffffffff } public enum DISPLAYCONFIG_MODE_INFO_TYPE : uint { DISPLAYCONFIG_MODE_INFO_TYPE_SOURCE = 1, DISPLAYCONFIG_MODE_INFO_TYPE_TARGET = 2, DISPLAYCONFIG_MODE_INFO_TYPE_FORCE_UINT32 = 0xFFFFFFFF } public enum DISPLAYCONFIG_DEVICE_INFO_TYPE : uint { DISPLAYCONFIG_DEVICE_INFO_GET_SOURCE_NAME = 1, DISPLAYCONFIG_DEVICE_INFO_GET_TARGET_NAME = 2, DISPLAYCONFIG_DEVICE_INFO_GET_TARGET_PREFERRED_MODE = 3, DISPLAYCONFIG_DEVICE_INFO_GET_ADAPTER_NAME = 4, DISPLAYCONFIG_DEVICE_INFO_SET_TARGET_PERSISTENCE = 5, DISPLAYCONFIG_DEVICE_INFO_GET_TARGET_BASE_TYPE = 6, DISPLAYCONFIG_DEVICE_INFO_FORCE_UINT32 = 0xFFFFFFFF } #endregion #region structs [StructLayout(LayoutKind.Sequential)] public struct LUID { public uint LowPart; public int HighPart; } [StructLayout(LayoutKind.Sequential)] public struct DISPLAYCONFIG_PATH_SOURCE_INFO { public LUID adapterId; public uint id; public uint modeInfoIdx; public uint statusFlags; } [StructLayout(LayoutKind.Sequential)] public struct DISPLAYCONFIG_PATH_TARGET_INFO { public LUID adapterId; public uint id; public uint modeInfoIdx; private DISPLAYCONFIG_VIDEO_OUTPUT_TECHNOLOGY outputTechnology; private DISPLAYCONFIG_ROTATION rotation; private DISPLAYCONFIG_SCALING scaling; private DISPLAYCONFIG_RATIONAL refreshRate; private DISPLAYCONFIG_SCANLINE_ORDERING scanLineOrdering; public bool targetAvailable; public uint statusFlags; } [StructLayout(LayoutKind.Sequential)] public struct DISPLAYCONFIG_RATIONAL { public uint Numerator; public uint Denominator; } [StructLayout(LayoutKind.Sequential)] public struct DISPLAYCONFIG_PATH_INFO { public DISPLAYCONFIG_PATH_SOURCE_INFO sourceInfo; public DISPLAYCONFIG_PATH_TARGET_INFO targetInfo; public uint flags; } [StructLayout(LayoutKind.Sequential)] public struct DISPLAYCONFIG_2DREGION { public uint cx; public uint cy; } [StructLayout(LayoutKind.Sequential)] public struct DISPLAYCONFIG_VIDEO_SIGNAL_INFO { public ulong pixelRate; public DISPLAYCONFIG_RATIONAL hSyncFreq; public DISPLAYCONFIG_RATIONAL vSyncFreq; public DISPLAYCONFIG_2DREGION activeSize; public DISPLAYCONFIG_2DREGION totalSize; public uint videoStandard; public DISPLAYCONFIG_SCANLINE_ORDERING scanLineOrdering; } [StructLayout(LayoutKind.Sequential)] public struct DISPLAYCONFIG_TARGET_MODE { public DISPLAYCONFIG_VIDEO_SIGNAL_INFO targetVideoSignalInfo; } [StructLayout(LayoutKind.Sequential)] public struct POINTL { private int x; private int y; } [StructLayout(LayoutKind.Sequential)] public struct DISPLAYCONFIG_SOURCE_MODE { public uint width; public uint height; public DISPLAYCONFIG_PIXELFORMAT pixelFormat; public POINTL position; } [StructLayout(LayoutKind.Explicit)] public struct DISPLAYCONFIG_MODE_INFO_UNION { [FieldOffset(0)] public DISPLAYCONFIG_TARGET_MODE targetMode; [FieldOffset(0)] public DISPLAYCONFIG_SOURCE_MODE sourceMode; } [StructLayout(LayoutKind.Sequential)] public struct DISPLAYCONFIG_MODE_INFO { public DISPLAYCONFIG_MODE_INFO_TYPE infoType; public uint id; public LUID adapterId; public DISPLAYCONFIG_MODE_INFO_UNION modeInfo; } [StructLayout(LayoutKind.Sequential)] public struct DISPLAYCONFIG_TARGET_DEVICE_NAME_FLAGS { public uint value; } [StructLayout(LayoutKind.Sequential)] public struct DISPLAYCONFIG_DEVICE_INFO_HEADER { public DISPLAYCONFIG_DEVICE_INFO_TYPE type; public uint size; public LUID adapterId; public uint id; } [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] public struct DISPLAYCONFIG_TARGET_DEVICE_NAME { public DISPLAYCONFIG_DEVICE_INFO_HEADER header; public DISPLAYCONFIG_TARGET_DEVICE_NAME_FLAGS flags; public DISPLAYCONFIG_VIDEO_OUTPUT_TECHNOLOGY outputTechnology; public ushort edidManufactureId; public ushort edidProductCodeId; public uint connectorInstance; [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 64)] public string monitorFriendlyDeviceName; [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 128)] public string monitorDevicePath; } #endregion #region DLL-Imports [DllImport("user32.dll")] public static extern int GetDisplayConfigBufferSizes( QUERY_DEVICE_CONFIG_FLAGS flags, out uint numPathArrayElements, out uint numModeInfoArrayElements); [DllImport("user32.dll")] public static extern int QueryDisplayConfig( QUERY_DEVICE_CONFIG_FLAGS flags, ref uint numPathArrayElements, [Out] DISPLAYCONFIG_PATH_INFO[] PathInfoArray, ref uint numModeInfoArrayElements, [Out] DISPLAYCONFIG_MODE_INFO[] ModeInfoArray, nint currentTopologyId ); [DllImport("user32.dll")] public static extern int DisplayConfigGetDeviceInfo(ref DISPLAYCONFIG_TARGET_DEVICE_NAME deviceName); #endregion [Flags] public enum DisplayDeviceStates : int { ATTACHED_TO_DESKTOP = 0x01, PRIMARY_DEVICE = 0x04, MIRRORING_DRIVER = 0x08, VGA_COMPATIBLE = 0x10, REMOVABLE = 0x20, DISCONNECTED = 0x2000000, REMOTE = 0x4000000, MODESPRUNED = 0x8000000 } [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] public struct DISPLAY_DEVICE { public int cb; [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)] public string DeviceName; [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 128)] public string DeviceString; public DisplayDeviceStates StateFlags; [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 128)] public string DeviceID; [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 128)] public string DeviceKey; } [DllImport(nameof(User32), CharSet = CharSet.Unicode, SetLastError = true)] public static extern bool EnumDisplayDevices( string? lpDevice, uint iDevNum, ref DISPLAY_DEVICE lpDisplayDevice, uint dwFlags); private static DISPLAYCONFIG_TARGET_DEVICE_NAME DeviceName(LUID adapterId, uint targetId) { var deviceName = new DISPLAYCONFIG_TARGET_DEVICE_NAME { header = { size = (uint)Marshal.SizeOf(typeof (DISPLAYCONFIG_TARGET_DEVICE_NAME)), adapterId = adapterId, id = targetId, type = DISPLAYCONFIG_DEVICE_INFO_TYPE.DISPLAYCONFIG_DEVICE_INFO_GET_TARGET_NAME } }; var error = DisplayConfigGetDeviceInfo(ref deviceName); if (error != ERROR_SUCCESS) throw new Win32Exception(error); return deviceName; } public static IEnumerable GetAllDevices() { uint pathCount, modeCount; var error = GetDisplayConfigBufferSizes(QUERY_DEVICE_CONFIG_FLAGS.QDC_ONLY_ACTIVE_PATHS, out pathCount, out modeCount); if (error != ERROR_SUCCESS) throw new Win32Exception(error); var displayPaths = new DISPLAYCONFIG_PATH_INFO[pathCount]; var displayModes = new DISPLAYCONFIG_MODE_INFO[modeCount]; error = QueryDisplayConfig(QUERY_DEVICE_CONFIG_FLAGS.QDC_ONLY_ACTIVE_PATHS, ref pathCount, displayPaths, ref modeCount, displayModes, nint.Zero); if (error != ERROR_SUCCESS) throw new Win32Exception(error); for (var i = 0; i < modeCount; i++) if (displayModes[i].infoType == DISPLAYCONFIG_MODE_INFO_TYPE.DISPLAYCONFIG_MODE_INFO_TYPE_TARGET) { DISPLAYCONFIG_TARGET_DEVICE_NAME? displayName = null; try { displayName = DeviceName(displayModes[i].adapterId, displayModes[i].id); } catch (Exception e) { Logger.WriteLine(e.Message); } if (displayName is not null) yield return (DISPLAYCONFIG_TARGET_DEVICE_NAME)displayName; } } public static IEnumerable GetDisplayDevices() { var displayAdapter = new DISPLAY_DEVICE(); displayAdapter.cb = Marshal.SizeOf(); var displayAdapterNumber = default(uint); while (EnumDisplayDevices(null, displayAdapterNumber, ref displayAdapter, 1)) { var displayMonitor = new DISPLAY_DEVICE(); displayMonitor.cb = Marshal.SizeOf(); var displayMonitorNumber = default(uint); while (EnumDisplayDevices(displayAdapter.DeviceName, displayMonitorNumber, ref displayMonitor, 1)) { var isAttached = (displayMonitor.StateFlags & DisplayDeviceStates.ATTACHED_TO_DESKTOP) == DisplayDeviceStates.ATTACHED_TO_DESKTOP; var isMirroring = (displayMonitor.StateFlags & DisplayDeviceStates.MIRRORING_DRIVER) == DisplayDeviceStates.MIRRORING_DRIVER; if (isAttached && !isMirroring) yield return displayMonitor; displayMonitorNumber++; } displayAdapterNumber++; } } } } ================================================ FILE: app/Display/ScreenNative.cs ================================================ using System.Collections; using System.Runtime.InteropServices; using static GHelper.Display.ScreenInterrogatory; namespace GHelper.Display { class DeviceComparer : IComparer { public int Compare(object x, object y) { uint displayX = ((DISPLAYCONFIG_TARGET_DEVICE_NAME)x).connectorInstance; uint displayY = ((DISPLAYCONFIG_TARGET_DEVICE_NAME)y).connectorInstance; if (displayX > displayY) return 1; if (displayX < displayY) return -1; else return 0; } } class ScreenComparer : IComparer { public int Compare(object x, object y) { int displayX = Int32.Parse(((Screen)x).DeviceName.Replace(@"\\.\DISPLAY", "")); int displayY = Int32.Parse(((Screen)y).DeviceName.Replace(@"\\.\DISPLAY", "")); return (new CaseInsensitiveComparer()).Compare(displayX, displayY); } } internal class ScreenNative { [DllImport("gdi32", CharSet = CharSet.Unicode)] internal static extern IntPtr CreateDC(string driver, string device, string port, IntPtr deviceMode); [DllImport("gdi32")] internal static extern bool SetDeviceGammaRamp(IntPtr dcHandle, ref GammaRamp ramp); [DllImport("gdi32")] internal static extern bool GetDeviceGammaRamp(IntPtr dcHandle, ref GammaRamp ramp); [DllImport("gdi32", CharSet = CharSet.Unicode)] internal static extern bool SetICMProfileW(IntPtr dcHandle, string lpFileName); [DllImport("gdi32", CharSet = CharSet.Unicode)] internal static extern bool SetICMMode(IntPtr dcHandle, int mode); [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)] public struct DEVMODE { [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)] public string dmDeviceName; public short dmSpecVersion; public short dmDriverVersion; public short dmSize; public short dmDriverExtra; public int dmFields; public int dmPositionX; public int dmPositionY; public int dmDisplayOrientation; public int dmDisplayFixedOutput; public short dmColor; public short dmDuplex; public short dmYResolution; public short dmTTOption; public short dmCollate; [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)] public string dmFormName; public short dmLogPixels; public short dmBitsPerPel; public int dmPelsWidth; public int dmPelsHeight; public int dmDisplayFlags; public int dmDisplayFrequency; public int dmICMMethod; public int dmICMIntent; public int dmMediaType; public int dmDitherType; public int dmReserved1; public int dmReserved2; public int dmPanningWidth; public int dmPanningHeight; }; [Flags()] public enum DisplaySettingsFlags : int { CDS_UPDATEREGISTRY = 1, CDS_TEST = 2, CDS_FULLSCREEN = 4, CDS_GLOBAL = 8, CDS_SET_PRIMARY = 0x10, CDS_RESET = 0x40000000, CDS_NORESET = 0x10000000 } // PInvoke declaration for EnumDisplaySettings Win32 API [DllImport("user32.dll")] public static extern int EnumDisplaySettingsEx( string lpszDeviceName, int iModeNum, ref DEVMODE lpDevMode); // PInvoke declaration for ChangeDisplaySettings Win32 API [DllImport("user32.dll")] public static extern int ChangeDisplaySettingsEx( string lpszDeviceName, ref DEVMODE lpDevMode, IntPtr hwnd, DisplaySettingsFlags dwflags, IntPtr lParam); public static DEVMODE CreateDevmode() { DEVMODE dm = new DEVMODE(); dm.dmDeviceName = new String(new char[32]); dm.dmFormName = new String(new char[32]); dm.dmSize = (short)Marshal.SizeOf(dm); return dm; } public enum COLORPROFILETYPE { CPT_ICC, CPT_DMP, CPT_CAMP, CPT_GMMP } public enum COLORPROFILESUBTYPE { CPST_PERCEPTUAL, CPST_RELATIVE_COLORIMETRIC, CPST_SATURATION, CPST_ABSOLUTE_COLORIMETRIC, CPST_NONE, CPST_RGB_WORKING_SPACE, CPST_CUSTOM_WORKING_SPACE, CPST_STANDARD_DISPLAY_COLOR_MODE, CPST_EXTENDED_DISPLAY_COLOR_MODE } public enum WCS_PROFILE_MANAGEMENT_SCOPE { WCS_PROFILE_MANAGEMENT_SCOPE_SYSTEM_WIDE, WCS_PROFILE_MANAGEMENT_SCOPE_CURRENT_USER } [DllImport("mscms.dll", CharSet = CharSet.Unicode)] public static extern bool WcsSetDefaultColorProfile( WCS_PROFILE_MANAGEMENT_SCOPE scope, string pDeviceName, COLORPROFILETYPE cptColorProfileType, COLORPROFILESUBTYPE cpstColorProfileSubType, uint dwProfileID, string pProfileName ); public const int ENUM_CURRENT_SETTINGS = -1; public const string defaultDevice = @"\\.\DISPLAY1"; public static string? FindInternalName(bool log = false) { try { var devicesList = GetAllDevices(); var devices = devicesList.ToArray(); string internalName = AppConfig.GetString("internal_display"); foreach (var device in devices) { if (device.outputTechnology == DISPLAYCONFIG_VIDEO_OUTPUT_TECHNOLOGY.DISPLAYCONFIG_OUTPUT_TECHNOLOGY_INTERNAL || device.outputTechnology == DISPLAYCONFIG_VIDEO_OUTPUT_TECHNOLOGY.DISPLAYCONFIG_OUTPUT_TECHNOLOGY_DISPLAYPORT_EMBEDDED || device.monitorFriendlyDeviceName == internalName) { if (log) Logger.WriteLine(device.monitorDevicePath + " " + device.outputTechnology); AppConfig.Set("internal_display", device.monitorFriendlyDeviceName); var names = device.monitorDevicePath.Split("#"); if (names.Length > 1) return names[1]; else return ""; } } } catch (Exception ex) { Logger.WriteLine(ex.Message); } return null; } static string ExtractDisplay(string input) { int index = input.IndexOf('\\', 4); // Start searching from index 4 to skip "" if (index != -1) { string extracted = input.Substring(0, index); return extracted; } return input; } public static string? FindLaptopScreen(bool log = false) { string? laptopScreen = null; string? internalName = FindInternalName(log); if (internalName == null) { Logger.WriteLine("Internal screen off"); return null; } try { var displays = GetDisplayDevices().ToArray(); foreach (var display in displays) { if (log) Logger.WriteLine(display.DeviceID + " " + display.DeviceName); if (display.DeviceID.Contains(internalName)) { laptopScreen = ExtractDisplay(display.DeviceName); break; } } } catch (Exception ex) { Logger.WriteLine(ex.ToString()); } if (laptopScreen is null) { Logger.WriteLine("Default internal screen"); laptopScreen = Screen.PrimaryScreen.DeviceName; } return laptopScreen; } public static int GetMaxRefreshRate(string? laptopScreen) { if (laptopScreen is null) return -1; DEVMODE dm = CreateDevmode(); int frequency = -1; int i = 0; while (0 != EnumDisplaySettingsEx(laptopScreen, i, ref dm)) { if (dm.dmDisplayFrequency > frequency) frequency = dm.dmDisplayFrequency; i++; } if (frequency > 0) AppConfig.Set("screen_max", frequency); else frequency = AppConfig.Get("screen_max"); return frequency; } public static int GetRefreshRate(string? laptopScreen) { if (laptopScreen is null) return -1; DEVMODE dm = CreateDevmode(); int frequency = -1; if (0 != EnumDisplaySettingsEx(laptopScreen, ENUM_CURRENT_SETTINGS, ref dm)) { frequency = dm.dmDisplayFrequency; } return frequency; } public static int SetRefreshRate(string laptopScreen, int frequency = 120) { DEVMODE dm = CreateDevmode(); if (0 != EnumDisplaySettingsEx(laptopScreen, ENUM_CURRENT_SETTINGS, ref dm)) { dm.dmDisplayFrequency = frequency; int iRet = ChangeDisplaySettingsEx(laptopScreen, ref dm, IntPtr.Zero, DisplaySettingsFlags.CDS_UPDATEREGISTRY, IntPtr.Zero); Logger.WriteLine("Screen = " + frequency.ToString() + "Hz : " + (iRet == 0 ? "OK" : iRet)); return iRet; } return 0; } } } ================================================ FILE: app/Display/VisualControl.cs ================================================ using GHelper.Helpers; using Microsoft.Win32; using Ryzen; using System.Management; namespace GHelper.Display { public enum SplendidGamut : int { VivoNative = 0, VivoSRGB = 1, VivoDCIP3 = 3, ViviDisplayP3 = 4, Native = 50, sRGB = 51, DCIP3 = 53, DisplayP3 = 54 } public enum SplendidCommand : int { None = -1, VivoNormal = 1, VivoVivid = 2, VivoManual = 6, VivoEycare = 7, Init = 10, DimmingVivo = 9, DimmingVisual = 19, DimmingDuo = 109, GamutMode = 200, Default = 11, Racing = 21, Scenery = 22, RTS = 23, FPS = 24, Cinema = 25, Vivid = 13, Eyecare = 17, EReading = 212, Disabled = 18, } public static class VisualControl { public static DisplayGammaRamp? gammaRamp; private static int _brightness = 100; private static bool _init = true; private static bool _download = true; private static string? _splendidPath = null; private static System.Timers.Timer brightnessTimer = new System.Timers.Timer(200); public const int DefaultColorTemp = 50; public static bool forceVisual = false; public static bool skipGamut = false; static VisualControl() { brightnessTimer.Elapsed += BrightnessTimerTimer_Elapsed; } public static string GetGameVisualPath() { return Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) + "\\ASUS\\GameVisual"; } public static string GetVivobookPath() { return Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData) + "\\ASUS\\ASUS System Control Interface\\ASUSOptimization\\Splendid"; } public static SplendidGamut GetDefaultGamut() { return AppConfig.IsVivoZenPro() ? SplendidGamut.VivoNative : SplendidGamut.Native; } public static bool IsEReading() { return File.Exists(AppConfig.IsVivoZenPro() ? GetVivobookPath() : GetGameVisualPath() + "\\Asus_Monochrome.icm"); } public static Dictionary GetGamutModes() { bool isVivo = AppConfig.IsVivoZenPro(); Dictionary _modes = new Dictionary(); string iccPath = isVivo ? GetVivobookPath() : GetGameVisualPath(); if (!Directory.Exists(iccPath)) { Logger.WriteLine(iccPath + " doesn't exist"); return _modes; } try { DirectoryInfo d = new DirectoryInfo(iccPath); FileInfo[] icms = d.GetFiles("*.icm"); if (icms.Length == 0) return _modes; _modes.Add(isVivo ? SplendidGamut.VivoNative : SplendidGamut.Native, "Gamut: Native"); foreach (FileInfo icm in icms) { //Logger.WriteLine(icm.FullName); if (icm.Name.Contains("sRGB")) { try { _modes.Add(isVivo ? SplendidGamut.VivoSRGB : SplendidGamut.sRGB, "Gamut: sRGB"); Logger.WriteLine(icm.FullName + " sRGB"); } catch { } } if (icm.Name.Contains("DCIP3")) { try { _modes.Add(isVivo ? SplendidGamut.VivoDCIP3 : SplendidGamut.DCIP3, "Gamut: DCIP3"); Logger.WriteLine(icm.FullName + " DCIP3"); } catch { } } if (icm.Name.Contains("DisplayP3")) { try { _modes.Add(isVivo ? SplendidGamut.ViviDisplayP3 : SplendidGamut.DisplayP3, "Gamut: DisplayP3"); Logger.WriteLine(icm.FullName + " DisplayP3"); } catch { } } } return _modes; } catch (Exception ex) { //Logger.WriteLine(ex.Message); Logger.WriteLine(ex.ToString()); return _modes; } } public static SplendidCommand GetDefaultVisualMode() { return AppConfig.IsVivoZenPro() ? SplendidCommand.VivoNormal : SplendidCommand.Default; } public static Dictionary GetVisualModes() { if (AppConfig.IsVivoZenPro()) { return new Dictionary { { SplendidCommand.VivoNormal, "Default" }, { SplendidCommand.VivoVivid, "Vivid" }, { SplendidCommand.VivoManual, "Manual" }, { SplendidCommand.VivoEycare, "Eyecare" }, { SplendidCommand.EReading, "E-Reading"}, }; } return new Dictionary { { SplendidCommand.Default, "Default"}, { SplendidCommand.Racing, "Racing"}, { SplendidCommand.Scenery, "Scenery"}, { SplendidCommand.RTS, "RTS/RPG"}, { SplendidCommand.FPS, "FPS"}, { SplendidCommand.Cinema, "Cinema"}, { SplendidCommand.Vivid, "Vivid" }, { SplendidCommand.Eyecare, "Eyecare"}, { SplendidCommand.EReading, "E-Reading"}, { SplendidCommand.Disabled, "Disabled"} }; } public static Dictionary GetTemperatures() { return new Dictionary { { 0, "Warmest"}, { 15, "Warmer"}, { 30, "Warm"}, { 50, "Neutral"}, { 70, "Cold"}, { 85, "Colder"}, { 100, "Coldest"}, }; } public static Dictionary GetEyeCares() { return new Dictionary { { 0, "0"}, { 1, "1"}, { 2, "2"}, { 3, "3"}, { 4, "4"}, }; } const string GameVisualKey = @"HKEY_CURRENT_USER\Software\ASUS\ARMOURY CRATE Service\GameVisual"; const string GameVisualValue = "ActiveGVStatus"; public static bool IsEnabled() { var status = (int?)Registry.GetValue(GameVisualKey, GameVisualValue, 1); return status > 0; } public static void SetRegStatus(int status = 1) { Registry.SetValue(GameVisualKey, GameVisualValue, status, RegistryValueKind.DWord); } public static void InitGamut() { int gamut = AppConfig.Get("gamut"); if (gamut < 0) return; if ((SplendidGamut)gamut == SplendidGamut.Native || (SplendidGamut)gamut == SplendidGamut.VivoNative) return; SetGamut(gamut); } public static void SetGamut(int mode = -1) { if (skipGamut) return; if (mode < 0) mode = (int)GetDefaultGamut(); AppConfig.Set("gamut", mode); var result = RunSplendid(SplendidCommand.GamutMode, 0, mode); if (result == 0) return; if (result == -1) { Logger.WriteLine("Gamut setting refused, reverting."); RunSplendid(SplendidCommand.GamutMode, 0, (int)GetDefaultGamut()); if (ProcessHelper.IsUserAdministrator() && _download) { _download = false; ColorProfileHelper.InstallProfile(); } } if (result == 1 && _init) { _init = false; RunSplendid(SplendidCommand.Init); RunSplendid(SplendidCommand.GamutMode, 0, mode); } } public static void SetVisual(SplendidCommand mode = SplendidCommand.Default, int whiteBalance = DefaultColorTemp, bool init = false) { Task.Run(async () => { if (AmdDisplay.IsOledPowerOptimization()) Program.settingsForm.VisualiseAmdOled(true); }); if (mode == SplendidCommand.None) return; if ((mode == SplendidCommand.Default || mode == SplendidCommand.VivoNormal) && whiteBalance == DefaultColorTemp && init) return; // Skip default setting on init if (mode == SplendidCommand.Disabled && !RyzenControl.IsAMD() && init) return; // Skip disabled setting for Intel devices AppConfig.Set("visual", (int)mode); AppConfig.Set("color_temp", whiteBalance); Task.Run(async () => { if (!forceVisual && ScreenCCD.GetHDRStatus(true)) return; if (!forceVisual && ScreenNative.GetRefreshRate(ScreenNative.FindLaptopScreen(true)) < 0) return; if (!init && mode == SplendidCommand.EReading && !ProcessHelper.IsUserAdministrator() && !IsEReading()) ProcessHelper.RunAsAdmin(); int param1 = 0; int? param2 = null; int? param3 = null; switch (mode) { case SplendidCommand.Disabled: param1 = 2; break; case SplendidCommand.Eyecare: param2 = 4; break; case SplendidCommand.VivoNormal: case SplendidCommand.VivoVivid: param2 = null; break; case SplendidCommand.VivoEycare: param2 = Math.Abs(whiteBalance - 50) * 4 / 50; break; case SplendidCommand.EReading: param2 = 2; // Contrast param3 = whiteBalance; // Color Temp break; default: param2 = whiteBalance; break; } int result = RunSplendid(mode, param1, param2, param3); if (result == 0) return; if (result == -1) { Logger.WriteLine("Visual mode setting refused, reverting."); RunSplendid(SplendidCommand.Default, 0, DefaultColorTemp); if (ProcessHelper.IsUserAdministrator() && _download) { _download = false; ColorProfileHelper.InstallProfile(); } } if (result == 1 && _init) { _init = false; RunSplendid(SplendidCommand.Init); RunSplendid(mode, 0, param2, param3); } }); } private static string GetSplendidPath() { if (_splendidPath == null) { try { using (var searcher = new ManagementObjectSearcher(@"Select * from Win32_SystemDriver WHERE Name='ATKWMIACPIIO'")) { foreach (var driver in searcher.Get()) { string path = driver["PathName"].ToString(); _splendidPath = Path.GetDirectoryName(path); break; } } } catch (Exception ex) { Logger.WriteLine(ex.Message); } } return _splendidPath; } private static int RunSplendid(SplendidCommand command, int? param1 = null, int? param2 = null, int? param3 = null) { string splendidPath = GetSplendidPath(); string splendidExe = $"{splendidPath}\\AsusSplendid.exe"; bool isVivo = AppConfig.IsVivoZenPro(); bool isSplenddid = File.Exists(splendidExe); if (AmdDisplay.IsOledPowerOptimization()) { Logger.WriteLine("Skipping command due to AMD OLED Power Optimization flag"); Program.settingsForm.VisualiseAmdOled(true); return 0; } if (isSplenddid) { var result = ProcessHelper.RunCMD(splendidExe, (int)command + " " + param1 + " " + param2 + " " + param3, splendidPath); if (result.Contains("file not exist") || (result.Length == 0 && !isVivo)) return 1; if (result.Contains("return code: -1")) return -1; if (result.Contains("Visual is disabled")) { SetRegStatus(1); return 1; } } return 0; } private static void BrightnessTimerTimer_Elapsed(object? sender, System.Timers.ElapsedEventArgs e) { brightnessTimer.Stop(); var dimmingCommand = AppConfig.IsVivoZenPro() ? SplendidCommand.DimmingVivo : SplendidCommand.DimmingVisual; var dimmingLevel = (int)(40 + _brightness * 0.6); if (AppConfig.IsDUO()) RunSplendid(SplendidCommand.DimmingDuo, 0, dimmingLevel); if (RunSplendid(dimmingCommand, 0, dimmingLevel) == 0) return; if (_init) { _init = false; RunSplendid(SplendidCommand.Init); RunSplendid(SplendidCommand.Init, 4); if (RunSplendid(dimmingCommand, 0, dimmingLevel) == 0) return; } // GammaRamp Fallback SetGamma(_brightness); } public static void InitBrightness() { if (!AppConfig.IsOLED()) return; if (!AppConfig.SaveDimming()) return; int brightness = GetBrightness(); if (brightness >= 0) SetBrightness(brightness); } private static bool IsOnBattery() { return AppConfig.SaveDimming() && SystemInformation.PowerStatus.PowerLineStatus != PowerLineStatus.Online; } public static int GetBrightness() { return AppConfig.Get(IsOnBattery() ? "brightness_battery" : "brightness", 100); } public static int SetBrightness(int brightness = -1, int delta = 0) { if (!AppConfig.IsOLED()) return -1; if (brightness < 0) brightness = GetBrightness(); _brightness = Math.Max(0, Math.Min(100, brightness + delta)); AppConfig.Set(IsOnBattery() ? "brightness_battery" : "brightness", _brightness); brightnessTimer.Start(); Program.settingsForm.VisualiseBrightness(); //if (brightness < 100) ResetGamut(); return _brightness; } public static void ResetGamut() { int defaultGamut = (int)GetDefaultGamut(); if (AppConfig.Get("gamut") != defaultGamut) { skipGamut = true; AppConfig.Set("gamut", defaultGamut); Program.settingsForm.VisualiseGamut(); skipGamut = false; } } public static void SetGamma(int brightness = 100) { var bright = Math.Round((float)brightness / 200 + 0.5, 2); var screenName = ScreenNative.FindLaptopScreen(); if (screenName is null) return; try { var handle = ScreenNative.CreateDC(screenName, screenName, null, IntPtr.Zero); if (gammaRamp is null) { var gammaDump = new GammaRamp(); if (ScreenNative.GetDeviceGammaRamp(handle, ref gammaDump)) { gammaRamp = new DisplayGammaRamp(gammaDump); //Logger.WriteLine("Gamma R: " + string.Join("-", gammaRamp.Red)); //Logger.WriteLine("Gamma G: " + string.Join("-", gammaRamp.Green)); //Logger.WriteLine("Gamma B: " + string.Join("-", gammaRamp.Blue)); } } if (gammaRamp is null || !gammaRamp.IsOriginal()) { Logger.WriteLine("Not default Gamma"); gammaRamp = new DisplayGammaRamp(); } var ramp = gammaRamp.AsBrightnessRamp(bright); bool result = ScreenNative.SetDeviceGammaRamp(handle, ref ramp); Logger.WriteLine("Gamma " + bright.ToString() + ": " + result); } catch (Exception ex) { Logger.WriteLine(ex.ToString()); } //ScreenBrightness.Set(60 + (int)(40 * bright)); } } } ================================================ FILE: app/Extra.Designer.cs ================================================ using GHelper.Properties; using GHelper.UI; namespace GHelper { partial class Extra { /// /// Required designer variable. /// private System.ComponentModel.IContainer components = null; /// /// Clean up any resources being used. /// /// true if managed resources should be disposed; otherwise, false. protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } #region Windows Form Designer generated code /// /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// private void InitializeComponent() { components = new System.ComponentModel.Container(); panelServices = new Panel(); pictureService = new PictureBox(); labelServices = new Label(); buttonServices = new RButton(); panelBindingsHeader = new Panel(); pictureBindings = new PictureBox(); pictureHelp = new PictureBox(); labelBindings = new Label(); panelBindings = new Panel(); tableBindings = new TableLayoutPanel(); labelFNE = new Label(); comboFNE = new RComboBox(); textFNE = new TextBox(); labelFNV = new Label(); comboFNV = new RComboBox(); textFNV = new TextBox(); labelFNC = new Label(); comboFNC = new RComboBox(); textFNC = new TextBox(); labelFNF4 = new Label(); comboFNF4 = new RComboBox(); textFNF4 = new TextBox(); comboM4 = new RComboBox(); textM4 = new TextBox(); labelM4 = new Label(); comboM3 = new RComboBox(); textM3 = new TextBox(); labelM3 = new Label(); textM2 = new TextBox(); labelM2 = new Label(); comboM2 = new RComboBox(); textM1 = new TextBox(); comboM1 = new RComboBox(); labelM1 = new Label(); tableKeys = new TableLayoutPanel(); panelBacklightHeader = new Panel(); sliderBrightness = new Slider(); pictureBacklight = new PictureBox(); labelBacklightTitle = new Label(); panelBacklight = new Panel(); panelBacklightExtra = new Panel(); numericBacklightPluggedTime = new NumericUpDownWithUnit(); numericBacklightTime = new NumericUpDownWithUnit(); labelBacklightTimeout = new Label(); labelSpeed = new Label(); comboKeyboardSpeed = new RComboBox(); panelXGM = new Panel(); checkXGM = new CheckBox(); tableBacklight = new TableLayoutPanel(); labelBacklightKeyboard = new Label(); checkAwake = new CheckBox(); checkBoot = new CheckBox(); checkSleep = new CheckBox(); checkShutdown = new CheckBox(); checkBattery = new CheckBox(); labelBacklightLogo = new Label(); checkAwakeLogo = new CheckBox(); checkBootLogo = new CheckBox(); checkSleepLogo = new CheckBox(); checkShutdownLogo = new CheckBox(); checkBatteryLogo = new CheckBox(); labelBacklightBar = new Label(); checkAwakeBar = new CheckBox(); checkBootBar = new CheckBox(); checkSleepBar = new CheckBox(); checkShutdownBar = new CheckBox(); checkBatteryBar = new CheckBox(); labelBacklightLid = new Label(); checkAwakeLid = new CheckBox(); checkBootLid = new CheckBox(); checkSleepLid = new CheckBox(); checkShutdownLid = new CheckBox(); checkBatteryLid = new CheckBox(); panelSettingsHeader = new Panel(); pictureScan = new PictureBox(); pictureLog = new PictureBox(); pictureSettings = new PictureBox(); labelSettings = new Label(); panelSettings = new Panel(); checkAutoToggleClamshellMode = new CheckBox(); checkBWIcon = new CheckBox(); checkTopmost = new CheckBox(); checkNoOverdrive = new CheckBox(); checkBootSound = new CheckBox(); checkUSBC = new CheckBox(); checkGpuApps = new CheckBox(); checkGPUFix = new CheckBox(); checkNVPlatform = new CheckBox(); checkStatusLed = new CheckBox(); checkPerKeyRGB = new CheckBox(); panelPower = new Panel(); numericHibernateAfter = new NumericUpDownWithUnit(); labelHibernateAfter = new Label(); pictureHibernate = new PictureBox(); toolTip = new ToolTip(components); panelAPU = new Panel(); comboAPU = new RComboBox(); pictureAPUMem = new PictureBox(); labelAPUMem = new Label(); panelCores = new Panel(); buttonCores = new RButton(); comboCoresP = new RComboBox(); comboCoresE = new RComboBox(); pictureCores = new PictureBox(); label1 = new Label(); panelACPI = new Panel(); textACPIParam = new TextBox(); textACPICommand = new TextBox(); buttonACPISend = new RButton(); pictureDebug = new PictureBox(); labelACPITitle = new Label(); panelOptimalBrightness = new Panel(); comboOptimalBrightness = new RComboBox(); pictureOptimalBrightness = new PictureBox(); labelOptimalBrightness = new Label(); panelServices.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)pictureService).BeginInit(); panelBindingsHeader.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)pictureBindings).BeginInit(); ((System.ComponentModel.ISupportInitialize)pictureHelp).BeginInit(); panelBindings.SuspendLayout(); tableBindings.SuspendLayout(); panelBacklightHeader.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)pictureBacklight).BeginInit(); panelBacklight.SuspendLayout(); panelBacklightExtra.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)numericBacklightPluggedTime).BeginInit(); ((System.ComponentModel.ISupportInitialize)numericBacklightTime).BeginInit(); panelXGM.SuspendLayout(); tableBacklight.SuspendLayout(); panelSettingsHeader.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)pictureScan).BeginInit(); ((System.ComponentModel.ISupportInitialize)pictureLog).BeginInit(); ((System.ComponentModel.ISupportInitialize)pictureSettings).BeginInit(); panelSettings.SuspendLayout(); panelPower.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)numericHibernateAfter).BeginInit(); ((System.ComponentModel.ISupportInitialize)pictureHibernate).BeginInit(); panelAPU.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)pictureAPUMem).BeginInit(); panelCores.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)pictureCores).BeginInit(); panelACPI.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)pictureDebug).BeginInit(); panelOptimalBrightness.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)pictureOptimalBrightness).BeginInit(); SuspendLayout(); // // panelServices // panelServices.AccessibleRole = AccessibleRole.Grouping; panelServices.Controls.Add(pictureService); panelServices.Controls.Add(labelServices); panelServices.Controls.Add(buttonServices); panelServices.Dock = DockStyle.Top; panelServices.Location = new Point(15, 1778); panelServices.Name = "panelServices"; panelServices.Size = new Size(949, 75); panelServices.TabIndex = 5; // // pictureService // pictureService.BackgroundImage = Resources.icons8_automation_32; pictureService.BackgroundImageLayout = ImageLayout.Zoom; pictureService.Location = new Point(21, 19); pictureService.Name = "pictureService"; pictureService.Size = new Size(32, 32); pictureService.TabIndex = 21; pictureService.TabStop = false; // // labelServices // labelServices.AutoSize = true; labelServices.Font = new Font("Segoe UI", 9F, FontStyle.Bold); labelServices.Location = new Point(57, 19); labelServices.Name = "labelServices"; labelServices.Size = new Size(273, 32); labelServices.TabIndex = 20; labelServices.Text = "Asus Services Running"; // // buttonServices // buttonServices.Activated = false; buttonServices.Anchor = AnchorStyles.Bottom | AnchorStyles.Left; buttonServices.BackColor = SystemColors.ButtonHighlight; buttonServices.BorderColor = Color.Transparent; buttonServices.BorderRadius = 2; buttonServices.FlatStyle = FlatStyle.Flat; buttonServices.Location = new Point(713, 11); buttonServices.Margin = new Padding(5, 3, 5, 3); buttonServices.Name = "buttonServices"; buttonServices.Secondary = false; buttonServices.Size = new Size(256, 53); buttonServices.TabIndex = 19; buttonServices.Text = "Start Services"; buttonServices.UseVisualStyleBackColor = false; // // panelBindingsHeader // panelBindingsHeader.AutoSize = true; panelBindingsHeader.BackColor = SystemColors.ControlLight; panelBindingsHeader.Controls.Add(pictureBindings); panelBindingsHeader.Controls.Add(pictureHelp); panelBindingsHeader.Controls.Add(labelBindings); panelBindingsHeader.Dock = DockStyle.Top; panelBindingsHeader.Location = new Point(15, 15); panelBindingsHeader.Name = "panelBindingsHeader"; panelBindingsHeader.Padding = new Padding(11, 5, 11, 5); panelBindingsHeader.Size = new Size(949, 51); panelBindingsHeader.TabIndex = 4; // // pictureBindings // pictureBindings.BackgroundImage = Resources.icons8_keyboard_32; pictureBindings.BackgroundImageLayout = ImageLayout.Zoom; pictureBindings.Location = new Point(21, 11); pictureBindings.Name = "pictureBindings"; pictureBindings.Size = new Size(32, 32); pictureBindings.TabIndex = 1; pictureBindings.TabStop = false; // // pictureHelp // pictureHelp.Anchor = AnchorStyles.Top | AnchorStyles.Right; pictureHelp.BackgroundImage = Resources.icons8_help_32; pictureHelp.BackgroundImageLayout = ImageLayout.Zoom; pictureHelp.Cursor = Cursors.Hand; pictureHelp.Location = new Point(897, 11); pictureHelp.Margin = new Padding(5, 3, 5, 3); pictureHelp.Name = "pictureHelp"; pictureHelp.Size = new Size(32, 32); pictureHelp.TabIndex = 11; pictureHelp.TabStop = false; // // labelBindings // labelBindings.AutoSize = true; labelBindings.Font = new Font("Segoe UI", 9F, FontStyle.Bold); labelBindings.Location = new Point(56, 8); labelBindings.Name = "labelBindings"; labelBindings.Size = new Size(114, 32); labelBindings.TabIndex = 0; labelBindings.Text = "Bindings"; // // panelBindings // panelBindings.AutoSize = true; panelBindings.AutoSizeMode = AutoSizeMode.GrowAndShrink; panelBindings.Controls.Add(tableBindings); panelBindings.Dock = DockStyle.Top; panelBindings.Location = new Point(15, 66); panelBindings.Name = "panelBindings"; panelBindings.Padding = new Padding(0, 0, 11, 5); panelBindings.Size = new Size(949, 395); panelBindings.TabIndex = 1; panelBindings.TabStop = true; // // tableBindings // tableBindings.AccessibleRole = AccessibleRole.Table; tableBindings.AutoSize = true; tableBindings.AutoSizeMode = AutoSizeMode.GrowAndShrink; tableBindings.ColumnCount = 3; tableBindings.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 20F)); tableBindings.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 40F)); tableBindings.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 40F)); tableBindings.Controls.Add(labelFNE, 0, 7); tableBindings.Controls.Add(comboFNE, 0, 7); tableBindings.Controls.Add(textFNE, 0, 7); tableBindings.Controls.Add(labelFNV, 0, 6); tableBindings.Controls.Add(comboFNV, 1, 6); tableBindings.Controls.Add(textFNV, 2, 6); tableBindings.Controls.Add(labelFNC, 0, 5); tableBindings.Controls.Add(comboFNC, 1, 5); tableBindings.Controls.Add(textFNC, 2, 5); tableBindings.Controls.Add(labelFNF4, 0, 4); tableBindings.Controls.Add(comboFNF4, 1, 4); tableBindings.Controls.Add(textFNF4, 2, 4); tableBindings.Controls.Add(comboM4, 1, 3); tableBindings.Controls.Add(textM4, 2, 3); tableBindings.Controls.Add(labelM4, 0, 3); tableBindings.Controls.Add(comboM3, 1, 2); tableBindings.Controls.Add(textM3, 2, 2); tableBindings.Controls.Add(labelM3, 0, 2); tableBindings.Controls.Add(textM2, 2, 1); tableBindings.Controls.Add(labelM2, 0, 1); tableBindings.Controls.Add(comboM2, 1, 1); tableBindings.Controls.Add(textM1, 2, 0); tableBindings.Controls.Add(comboM1, 1, 0); tableBindings.Controls.Add(labelM1, 0, 0); tableBindings.Dock = DockStyle.Top; tableBindings.Location = new Point(0, 0); tableBindings.Margin = new Padding(0, 3, 5, 3); tableBindings.Name = "tableBindings"; tableBindings.Padding = new Padding(16, 11, 0, 11); tableBindings.RowCount = 8; tableBindings.RowStyles.Add(new RowStyle()); tableBindings.RowStyles.Add(new RowStyle()); tableBindings.RowStyles.Add(new RowStyle()); tableBindings.RowStyles.Add(new RowStyle()); tableBindings.RowStyles.Add(new RowStyle()); tableBindings.RowStyles.Add(new RowStyle()); tableBindings.RowStyles.Add(new RowStyle()); tableBindings.RowStyles.Add(new RowStyle()); tableBindings.Size = new Size(938, 390); tableBindings.TabIndex = 12; // // labelFNE // labelFNE.AutoSize = true; labelFNE.Location = new Point(16, 333); labelFNE.Margin = new Padding(0); labelFNE.Name = "labelFNE"; labelFNE.Padding = new Padding(5, 11, 0, 0); labelFNE.Size = new Size(143, 43); labelFNE.TabIndex = 20; labelFNE.Text = "FN+NmEnt:"; // // comboFNE // comboFNE.BorderColor = Color.White; comboFNE.ButtonColor = Color.FromArgb(255, 255, 255); comboFNE.Dock = DockStyle.Top; comboFNE.FormattingEnabled = true; comboFNE.Location = new Point(205, 336); comboFNE.Margin = new Padding(5, 3, 5, 3); comboFNE.Name = "comboFNE"; comboFNE.Size = new Size(358, 40); comboFNE.TabIndex = 8; // // textFNE // textFNE.Dock = DockStyle.Top; textFNE.Location = new Point(573, 336); textFNE.Margin = new Padding(5, 3, 5, 3); textFNE.Name = "textFNE"; textFNE.PlaceholderText = "action"; textFNE.Size = new Size(360, 39); textFNE.TabIndex = 19; textFNE.TabStop = false; // // labelFNV // labelFNV.AutoSize = true; labelFNV.Location = new Point(16, 287); labelFNV.Margin = new Padding(0); labelFNV.Name = "labelFNV"; labelFNV.Padding = new Padding(5, 11, 0, 0); labelFNV.Size = new Size(85, 43); labelFNV.TabIndex = 15; labelFNV.Text = "FN+V:"; // // comboFNV // comboFNV.BorderColor = Color.White; comboFNV.ButtonColor = Color.FromArgb(255, 255, 255); comboFNV.Dock = DockStyle.Top; comboFNV.FormattingEnabled = true; comboFNV.Location = new Point(205, 290); comboFNV.Margin = new Padding(5, 3, 5, 3); comboFNV.Name = "comboFNV"; comboFNV.Size = new Size(358, 40); comboFNV.TabIndex = 7; // // textFNV // textFNV.Dock = DockStyle.Top; textFNV.Location = new Point(573, 290); textFNV.Margin = new Padding(5, 3, 5, 3); textFNV.Name = "textFNV"; textFNV.PlaceholderText = "action"; textFNV.Size = new Size(360, 39); textFNV.TabIndex = 18; textFNV.TabStop = false; // // labelFNC // labelFNC.AutoSize = true; labelFNC.Location = new Point(16, 241); labelFNC.Margin = new Padding(0); labelFNC.Name = "labelFNC"; labelFNC.Padding = new Padding(5, 11, 0, 0); labelFNC.Size = new Size(85, 43); labelFNC.TabIndex = 15; labelFNC.Text = "FN+C:"; // // comboFNC // comboFNC.BorderColor = Color.White; comboFNC.ButtonColor = Color.FromArgb(255, 255, 255); comboFNC.Dock = DockStyle.Top; comboFNC.FormattingEnabled = true; comboFNC.Location = new Point(205, 244); comboFNC.Margin = new Padding(5, 3, 5, 3); comboFNC.Name = "comboFNC"; comboFNC.Size = new Size(358, 40); comboFNC.TabIndex = 6; // // textFNC // textFNC.Dock = DockStyle.Top; textFNC.Location = new Point(573, 244); textFNC.Margin = new Padding(5, 3, 5, 3); textFNC.Name = "textFNC"; textFNC.PlaceholderText = "action"; textFNC.Size = new Size(360, 39); textFNC.TabIndex = 17; textFNC.TabStop = false; // // labelFNF4 // labelFNF4.AutoSize = true; labelFNF4.Location = new Point(16, 195); labelFNF4.Margin = new Padding(0); labelFNF4.Name = "labelFNF4"; labelFNF4.Padding = new Padding(5, 11, 0, 0); labelFNF4.Size = new Size(95, 43); labelFNF4.TabIndex = 6; labelFNF4.Text = "FN+F4:"; // // comboFNF4 // comboFNF4.BorderColor = Color.White; comboFNF4.ButtonColor = Color.FromArgb(255, 255, 255); comboFNF4.Dock = DockStyle.Top; comboFNF4.FormattingEnabled = true; comboFNF4.Location = new Point(205, 198); comboFNF4.Margin = new Padding(5, 3, 5, 3); comboFNF4.Name = "comboFNF4"; comboFNF4.Size = new Size(358, 40); comboFNF4.TabIndex = 5; // // textFNF4 // textFNF4.Dock = DockStyle.Top; textFNF4.Location = new Point(573, 198); textFNF4.Margin = new Padding(5, 3, 5, 3); textFNF4.Name = "textFNF4"; textFNF4.PlaceholderText = "action"; textFNF4.Size = new Size(360, 39); textFNF4.TabIndex = 8; textFNF4.TabStop = false; // // comboM4 // comboM4.BorderColor = Color.White; comboM4.ButtonColor = Color.FromArgb(255, 255, 255); comboM4.Dock = DockStyle.Top; comboM4.FormattingEnabled = true; comboM4.Items.AddRange(new object[] { Strings.PerformanceMode, Strings.OpenGHelper, Strings.Custom }); comboM4.Location = new Point(205, 152); comboM4.Margin = new Padding(5, 3, 5, 3); comboM4.Name = "comboM4"; comboM4.Size = new Size(358, 40); comboM4.TabIndex = 4; // // textM4 // textM4.Dock = DockStyle.Top; textM4.Location = new Point(573, 152); textM4.Margin = new Padding(5, 3, 5, 3); textM4.Name = "textM4"; textM4.PlaceholderText = "action"; textM4.Size = new Size(360, 39); textM4.TabIndex = 5; textM4.TabStop = false; // // labelM4 // labelM4.AutoSize = true; labelM4.Location = new Point(16, 149); labelM4.Margin = new Padding(0); labelM4.Name = "labelM4"; labelM4.Padding = new Padding(5, 11, 0, 0); labelM4.Size = new Size(116, 43); labelM4.TabIndex = 2; labelM4.Text = "M4/ROG:"; // // comboM3 // comboM3.BorderColor = Color.White; comboM3.ButtonColor = Color.FromArgb(255, 255, 255); comboM3.Dock = DockStyle.Top; comboM3.FormattingEnabled = true; comboM3.Items.AddRange(new object[] { Strings.Default, Strings.VolumeMute, Strings.PlayPause, Strings.PrintScreen, Strings.ToggleAura, Strings.Custom }); comboM3.Location = new Point(205, 106); comboM3.Margin = new Padding(5, 3, 5, 3); comboM3.Name = "comboM3"; comboM3.Size = new Size(358, 40); comboM3.TabIndex = 3; // // textM3 // textM3.Dock = DockStyle.Top; textM3.Location = new Point(573, 106); textM3.Margin = new Padding(5, 3, 5, 3); textM3.Name = "textM3"; textM3.PlaceholderText = "action"; textM3.Size = new Size(360, 39); textM3.TabIndex = 4; textM3.TabStop = false; // // labelM3 // labelM3.AutoSize = true; labelM3.Location = new Point(16, 103); labelM3.Margin = new Padding(0); labelM3.Name = "labelM3"; labelM3.Padding = new Padding(5, 11, 0, 0); labelM3.Size = new Size(59, 43); labelM3.TabIndex = 0; labelM3.Text = "M3:"; // // textM2 // textM2.Dock = DockStyle.Top; textM2.Location = new Point(573, 60); textM2.Margin = new Padding(5, 3, 5, 3); textM2.Name = "textM2"; textM2.PlaceholderText = "action"; textM2.Size = new Size(360, 39); textM2.TabIndex = 14; textM2.TabStop = false; // // labelM2 // labelM2.AutoSize = true; labelM2.Location = new Point(16, 57); labelM2.Margin = new Padding(0); labelM2.Name = "labelM2"; labelM2.Padding = new Padding(5, 11, 0, 0); labelM2.Size = new Size(59, 43); labelM2.TabIndex = 10; labelM2.Text = "M2:"; // // comboM2 // comboM2.BorderColor = Color.White; comboM2.ButtonColor = Color.FromArgb(255, 255, 255); comboM2.Dock = DockStyle.Top; comboM2.FormattingEnabled = true; comboM2.Items.AddRange(new object[] { Strings.Default, Strings.VolumeMute, Strings.PlayPause, Strings.PrintScreen, Strings.ToggleAura, Strings.Custom }); comboM2.Location = new Point(205, 60); comboM2.Margin = new Padding(5, 3, 5, 3); comboM2.Name = "comboM2"; comboM2.Size = new Size(358, 40); comboM2.TabIndex = 2; // // textM1 // textM1.Dock = DockStyle.Top; textM1.Location = new Point(573, 14); textM1.Margin = new Padding(5, 3, 5, 3); textM1.Name = "textM1"; textM1.PlaceholderText = "action"; textM1.Size = new Size(360, 39); textM1.TabIndex = 13; textM1.TabStop = false; // // comboM1 // comboM1.BorderColor = Color.White; comboM1.ButtonColor = Color.FromArgb(255, 255, 255); comboM1.Dock = DockStyle.Top; comboM1.FormattingEnabled = true; comboM1.Items.AddRange(new object[] { Strings.Default, Strings.VolumeMute, Strings.PlayPause, Strings.PrintScreen, Strings.ToggleAura, Strings.Custom }); comboM1.Location = new Point(205, 14); comboM1.Margin = new Padding(5, 3, 5, 3); comboM1.Name = "comboM1"; comboM1.Size = new Size(358, 40); comboM1.TabIndex = 1; // // labelM1 // labelM1.AutoSize = true; labelM1.Location = new Point(16, 11); labelM1.Margin = new Padding(0); labelM1.Name = "labelM1"; labelM1.Padding = new Padding(5, 11, 0, 0); labelM1.Size = new Size(59, 43); labelM1.TabIndex = 9; labelM1.Text = "M1:"; // // tableKeys // tableKeys.ColumnCount = 3; tableKeys.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 20F)); tableKeys.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 40F)); tableKeys.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 40F)); tableKeys.Location = new Point(0, 0); tableKeys.Name = "tableKeys"; tableKeys.RowCount = 6; tableKeys.RowStyles.Add(new RowStyle(SizeType.Absolute, 20F)); tableKeys.RowStyles.Add(new RowStyle(SizeType.Absolute, 20F)); tableKeys.RowStyles.Add(new RowStyle(SizeType.Absolute, 20F)); tableKeys.RowStyles.Add(new RowStyle(SizeType.Absolute, 20F)); tableKeys.RowStyles.Add(new RowStyle(SizeType.Absolute, 20F)); tableKeys.RowStyles.Add(new RowStyle(SizeType.Absolute, 20F)); tableKeys.Size = new Size(200, 100); tableKeys.TabIndex = 0; // // panelBacklightHeader // panelBacklightHeader.AutoSize = true; panelBacklightHeader.BackColor = SystemColors.ControlLight; panelBacklightHeader.Controls.Add(sliderBrightness); panelBacklightHeader.Controls.Add(pictureBacklight); panelBacklightHeader.Controls.Add(labelBacklightTitle); panelBacklightHeader.Dock = DockStyle.Top; panelBacklightHeader.Location = new Point(15, 461); panelBacklightHeader.Name = "panelBacklightHeader"; panelBacklightHeader.Padding = new Padding(11, 5, 11, 5); panelBacklightHeader.Size = new Size(949, 51); panelBacklightHeader.TabIndex = 44; // // sliderBrightness // sliderBrightness.Anchor = AnchorStyles.Top | AnchorStyles.Right; sliderBrightness.Location = new Point(433, 5); sliderBrightness.Margin = new Padding(0); sliderBrightness.Max = 3; sliderBrightness.Min = 0; sliderBrightness.Name = "sliderBrightness"; sliderBrightness.Size = new Size(501, 40); sliderBrightness.Step = 1; sliderBrightness.TabIndex = 50; sliderBrightness.TabStop = false; sliderBrightness.Text = "sliderBrightness"; sliderBrightness.Value = 3; // // pictureBacklight // pictureBacklight.BackgroundImage = Resources.backlight; pictureBacklight.BackgroundImageLayout = ImageLayout.Zoom; pictureBacklight.Location = new Point(21, 11); pictureBacklight.Name = "pictureBacklight"; pictureBacklight.Size = new Size(32, 32); pictureBacklight.TabIndex = 3; pictureBacklight.TabStop = false; // // labelBacklightTitle // labelBacklightTitle.AutoSize = true; labelBacklightTitle.Font = new Font("Segoe UI", 9F, FontStyle.Bold); labelBacklightTitle.Location = new Point(56, 8); labelBacklightTitle.Name = "labelBacklightTitle"; labelBacklightTitle.Size = new Size(119, 32); labelBacklightTitle.TabIndex = 2; labelBacklightTitle.Text = "Backlight"; // // panelBacklight // panelBacklight.AutoSize = true; panelBacklight.Controls.Add(panelBacklightExtra); panelBacklight.Controls.Add(panelXGM); panelBacklight.Controls.Add(tableBacklight); panelBacklight.Dock = DockStyle.Top; panelBacklight.Location = new Point(15, 512); panelBacklight.Name = "panelBacklight"; panelBacklight.Padding = new Padding(0, 5, 0, 5); panelBacklight.Size = new Size(949, 444); panelBacklight.TabIndex = 2; // // panelBacklightExtra // panelBacklightExtra.AutoSize = true; panelBacklightExtra.AutoSizeMode = AutoSizeMode.GrowAndShrink; panelBacklightExtra.Controls.Add(numericBacklightPluggedTime); panelBacklightExtra.Controls.Add(numericBacklightTime); panelBacklightExtra.Controls.Add(labelBacklightTimeout); panelBacklightExtra.Controls.Add(labelSpeed); panelBacklightExtra.Controls.Add(comboKeyboardSpeed); panelBacklightExtra.Dock = DockStyle.Top; panelBacklightExtra.Location = new Point(0, 324); panelBacklightExtra.Margin = new Padding(5, 3, 5, 3); panelBacklightExtra.Name = "panelBacklightExtra"; panelBacklightExtra.Padding = new Padding(0, 0, 0, 5); panelBacklightExtra.Size = new Size(949, 115); panelBacklightExtra.TabIndex = 46; // // numericBacklightPluggedTime // numericBacklightPluggedTime.Anchor = AnchorStyles.Top | AnchorStyles.Right; numericBacklightPluggedTime.Location = new Point(634, 63); numericBacklightPluggedTime.Margin = new Padding(5, 3, 5, 3); numericBacklightPluggedTime.Maximum = new decimal(new int[] { 3600, 0, 0, 0 }); numericBacklightPluggedTime.Name = "numericBacklightPluggedTime"; numericBacklightPluggedTime.Size = new Size(139, 39); numericBacklightPluggedTime.TabIndex = 1; numericBacklightPluggedTime.Unit = "sec"; numericBacklightPluggedTime.UnitFirst = false; // // numericBacklightTime // numericBacklightTime.Anchor = AnchorStyles.Top | AnchorStyles.Right; numericBacklightTime.Location = new Point(789, 63); numericBacklightTime.Margin = new Padding(5, 3, 5, 3); numericBacklightTime.Maximum = new decimal(new int[] { 3600, 0, 0, 0 }); numericBacklightTime.Name = "numericBacklightTime"; numericBacklightTime.Size = new Size(139, 39); numericBacklightTime.TabIndex = 2; numericBacklightTime.Unit = "sec"; numericBacklightTime.UnitFirst = false; // // labelBacklightTimeout // labelBacklightTimeout.Location = new Point(16, 63); labelBacklightTimeout.Margin = new Padding(5, 0, 5, 0); labelBacklightTimeout.Name = "labelBacklightTimeout"; labelBacklightTimeout.Size = new Size(613, 47); labelBacklightTimeout.TabIndex = 46; labelBacklightTimeout.Text = "Timeout when plugged / on battery"; // // labelSpeed // labelSpeed.Location = new Point(16, 16); labelSpeed.Margin = new Padding(5, 0, 5, 0); labelSpeed.Name = "labelSpeed"; labelSpeed.Size = new Size(613, 43); labelSpeed.TabIndex = 44; labelSpeed.Text = "Animation Speed"; // // comboKeyboardSpeed // comboKeyboardSpeed.Anchor = AnchorStyles.Top | AnchorStyles.Right; comboKeyboardSpeed.BorderColor = Color.White; comboKeyboardSpeed.ButtonColor = SystemColors.ControlLight; comboKeyboardSpeed.FlatStyle = FlatStyle.Flat; comboKeyboardSpeed.Font = new Font("Segoe UI", 9F); comboKeyboardSpeed.FormattingEnabled = true; comboKeyboardSpeed.ItemHeight = 32; comboKeyboardSpeed.Items.AddRange(new object[] { "Slow", "Normal", "Fast" }); comboKeyboardSpeed.Location = new Point(634, 13); comboKeyboardSpeed.Margin = new Padding(5, 11, 5, 9); comboKeyboardSpeed.Name = "comboKeyboardSpeed"; comboKeyboardSpeed.Size = new Size(293, 40); comboKeyboardSpeed.TabIndex = 0; comboKeyboardSpeed.TabStop = false; // // panelXMG // panelXGM.Controls.Add(checkXGM); panelXGM.Dock = DockStyle.Top; panelXGM.Location = new Point(0, 265); panelXGM.Margin = new Padding(5, 3, 5, 3); panelXGM.Name = "panelXMG"; panelXGM.Size = new Size(949, 59); panelXGM.TabIndex = 45; // // checkXMG // checkXGM.AutoSize = true; checkXGM.Location = new Point(5, 11); checkXGM.Margin = new Padding(5, 3, 5, 3); checkXGM.Name = "checkXMG"; checkXGM.Padding = new Padding(16, 3, 7, 3); checkXGM.Size = new Size(181, 42); checkXGM.TabIndex = 2; checkXGM.Text = "XG Mobile"; checkXGM.UseVisualStyleBackColor = true; // // tableBacklight // tableBacklight.AutoSize = true; tableBacklight.ColumnCount = 4; tableBacklight.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F)); tableBacklight.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F)); tableBacklight.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F)); tableBacklight.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F)); tableBacklight.Controls.Add(labelBacklightKeyboard, 0, 0); tableBacklight.Controls.Add(checkAwake, 0, 1); tableBacklight.Controls.Add(checkBoot, 0, 2); tableBacklight.Controls.Add(checkSleep, 0, 3); tableBacklight.Controls.Add(checkShutdown, 0, 4); tableBacklight.Controls.Add(checkBattery, 0, 5); tableBacklight.Controls.Add(labelBacklightLogo, 1, 0); tableBacklight.Controls.Add(checkAwakeLogo, 1, 1); tableBacklight.Controls.Add(checkBootLogo, 1, 2); tableBacklight.Controls.Add(checkSleepLogo, 1, 3); tableBacklight.Controls.Add(checkShutdownLogo, 1, 4); tableBacklight.Controls.Add(checkBatteryLogo, 1, 5); tableBacklight.Controls.Add(labelBacklightBar, 2, 0); tableBacklight.Controls.Add(checkAwakeBar, 2, 1); tableBacklight.Controls.Add(checkBootBar, 2, 2); tableBacklight.Controls.Add(checkSleepBar, 2, 3); tableBacklight.Controls.Add(checkShutdownBar, 2, 4); tableBacklight.Controls.Add(checkBatteryBar, 2, 5); tableBacklight.Controls.Add(labelBacklightLid, 3, 0); tableBacklight.Controls.Add(checkAwakeLid, 3, 1); tableBacklight.Controls.Add(checkBootLid, 3, 2); tableBacklight.Controls.Add(checkSleepLid, 3, 3); tableBacklight.Controls.Add(checkShutdownLid, 3, 4); tableBacklight.Controls.Add(checkBatteryLid, 3, 5); tableBacklight.Dock = DockStyle.Top; tableBacklight.Location = new Point(0, 5); tableBacklight.Margin = new Padding(0); tableBacklight.Name = "tableBacklight"; tableBacklight.RowCount = 6; tableBacklight.RowStyles.Add(new RowStyle()); tableBacklight.RowStyles.Add(new RowStyle()); tableBacklight.RowStyles.Add(new RowStyle()); tableBacklight.RowStyles.Add(new RowStyle()); tableBacklight.RowStyles.Add(new RowStyle()); tableBacklight.RowStyles.Add(new RowStyle()); tableBacklight.Size = new Size(949, 260); tableBacklight.TabIndex = 44; // // labelBacklightKeyboard // labelBacklightKeyboard.Dock = DockStyle.Fill; labelBacklightKeyboard.Font = new Font("Segoe UI", 9F, FontStyle.Bold); labelBacklightKeyboard.Location = new Point(5, 0); labelBacklightKeyboard.Margin = new Padding(5, 0, 5, 0); labelBacklightKeyboard.Name = "labelBacklightKeyboard"; labelBacklightKeyboard.Padding = new Padding(9, 5, 7, 5); labelBacklightKeyboard.Size = new Size(227, 45); labelBacklightKeyboard.TabIndex = 6; labelBacklightKeyboard.Text = "Keyboard"; // // checkAwake // checkAwake.Dock = DockStyle.Fill; checkAwake.Location = new Point(5, 45); checkAwake.Margin = new Padding(5, 0, 5, 0); checkAwake.Name = "checkAwake"; checkAwake.Padding = new Padding(16, 3, 7, 3); checkAwake.Size = new Size(227, 43); checkAwake.TabIndex = 1; checkAwake.Text = Strings.Awake; checkAwake.UseVisualStyleBackColor = true; // // checkBoot // checkBoot.Dock = DockStyle.Fill; checkBoot.Location = new Point(5, 88); checkBoot.Margin = new Padding(5, 0, 5, 0); checkBoot.Name = "checkBoot"; checkBoot.Padding = new Padding(16, 3, 7, 3); checkBoot.Size = new Size(227, 43); checkBoot.TabIndex = 2; checkBoot.Text = Strings.Boot; checkBoot.UseVisualStyleBackColor = true; // // checkSleep // checkSleep.Dock = DockStyle.Fill; checkSleep.Location = new Point(5, 131); checkSleep.Margin = new Padding(5, 0, 5, 0); checkSleep.Name = "checkSleep"; checkSleep.Padding = new Padding(16, 3, 7, 3); checkSleep.Size = new Size(227, 43); checkSleep.TabIndex = 3; checkSleep.Text = "Sleep"; checkSleep.UseVisualStyleBackColor = true; // // checkShutdown // checkShutdown.Dock = DockStyle.Fill; checkShutdown.Location = new Point(5, 174); checkShutdown.Margin = new Padding(5, 0, 5, 0); checkShutdown.Name = "checkShutdown"; checkShutdown.Padding = new Padding(16, 3, 7, 3); checkShutdown.Size = new Size(227, 43); checkShutdown.TabIndex = 4; checkShutdown.Text = Strings.Shutdown; checkShutdown.UseVisualStyleBackColor = true; // // checkBattery // checkBattery.Dock = DockStyle.Fill; checkBattery.Location = new Point(5, 217); checkBattery.Margin = new Padding(5, 0, 5, 0); checkBattery.Name = "checkBattery"; checkBattery.Padding = new Padding(16, 3, 7, 3); checkBattery.Size = new Size(227, 43); checkBattery.TabIndex = 24; checkBattery.Text = "Battery"; checkBattery.UseVisualStyleBackColor = true; // // labelBacklightLogo // labelBacklightLogo.Dock = DockStyle.Fill; labelBacklightLogo.Font = new Font("Segoe UI", 9F, FontStyle.Bold); labelBacklightLogo.Location = new Point(242, 0); labelBacklightLogo.Margin = new Padding(5, 0, 5, 0); labelBacklightLogo.Name = "labelBacklightLogo"; labelBacklightLogo.Padding = new Padding(9, 5, 7, 5); labelBacklightLogo.Size = new Size(227, 45); labelBacklightLogo.TabIndex = 21; labelBacklightLogo.Text = "Logo"; // // checkAwakeLogo // checkAwakeLogo.Dock = DockStyle.Fill; checkAwakeLogo.Location = new Point(242, 45); checkAwakeLogo.Margin = new Padding(5, 0, 5, 0); checkAwakeLogo.Name = "checkAwakeLogo"; checkAwakeLogo.Padding = new Padding(16, 3, 7, 3); checkAwakeLogo.Size = new Size(227, 43); checkAwakeLogo.TabIndex = 17; checkAwakeLogo.Text = Strings.Awake; checkAwakeLogo.UseVisualStyleBackColor = true; // // checkBootLogo // checkBootLogo.Dock = DockStyle.Fill; checkBootLogo.Location = new Point(242, 88); checkBootLogo.Margin = new Padding(5, 0, 5, 0); checkBootLogo.Name = "checkBootLogo"; checkBootLogo.Padding = new Padding(16, 3, 7, 3); checkBootLogo.Size = new Size(227, 43); checkBootLogo.TabIndex = 18; checkBootLogo.Text = Strings.Boot; checkBootLogo.UseVisualStyleBackColor = true; // // checkSleepLogo // checkSleepLogo.Dock = DockStyle.Fill; checkSleepLogo.Location = new Point(242, 131); checkSleepLogo.Margin = new Padding(5, 0, 5, 0); checkSleepLogo.Name = "checkSleepLogo"; checkSleepLogo.Padding = new Padding(16, 3, 7, 3); checkSleepLogo.Size = new Size(227, 43); checkSleepLogo.TabIndex = 19; checkSleepLogo.Text = Strings.Sleep; checkSleepLogo.UseVisualStyleBackColor = true; // // checkShutdownLogo // checkShutdownLogo.Dock = DockStyle.Fill; checkShutdownLogo.Location = new Point(242, 174); checkShutdownLogo.Margin = new Padding(5, 0, 5, 0); checkShutdownLogo.Name = "checkShutdownLogo"; checkShutdownLogo.Padding = new Padding(16, 3, 7, 3); checkShutdownLogo.Size = new Size(227, 43); checkShutdownLogo.TabIndex = 20; checkShutdownLogo.Text = Strings.Shutdown; checkShutdownLogo.UseVisualStyleBackColor = true; // // checkBatteryLogo // checkBatteryLogo.Dock = DockStyle.Fill; checkBatteryLogo.Location = new Point(242, 217); checkBatteryLogo.Margin = new Padding(5, 0, 5, 0); checkBatteryLogo.Name = "checkBatteryLogo"; checkBatteryLogo.Padding = new Padding(16, 3, 7, 3); checkBatteryLogo.Size = new Size(227, 43); checkBatteryLogo.TabIndex = 25; checkBatteryLogo.Text = "Battery"; checkBatteryLogo.UseVisualStyleBackColor = true; // // labelBacklightBar // labelBacklightBar.Dock = DockStyle.Fill; labelBacklightBar.Font = new Font("Segoe UI", 9F, FontStyle.Bold); labelBacklightBar.Location = new Point(479, 0); labelBacklightBar.Margin = new Padding(5, 0, 5, 0); labelBacklightBar.Name = "labelBacklightBar"; labelBacklightBar.Padding = new Padding(9, 5, 7, 5); labelBacklightBar.Size = new Size(227, 45); labelBacklightBar.TabIndex = 11; labelBacklightBar.Text = "Lightbar"; // // checkAwakeBar // checkAwakeBar.Dock = DockStyle.Fill; checkAwakeBar.Location = new Point(479, 45); checkAwakeBar.Margin = new Padding(5, 0, 5, 0); checkAwakeBar.Name = "checkAwakeBar"; checkAwakeBar.Padding = new Padding(16, 3, 7, 3); checkAwakeBar.Size = new Size(227, 43); checkAwakeBar.TabIndex = 7; checkAwakeBar.Text = Strings.Awake; checkAwakeBar.UseVisualStyleBackColor = true; // // checkBootBar // checkBootBar.Dock = DockStyle.Fill; checkBootBar.Location = new Point(479, 88); checkBootBar.Margin = new Padding(5, 0, 5, 0); checkBootBar.Name = "checkBootBar"; checkBootBar.Padding = new Padding(16, 3, 7, 3); checkBootBar.Size = new Size(227, 43); checkBootBar.TabIndex = 8; checkBootBar.Text = Strings.Boot; checkBootBar.UseVisualStyleBackColor = true; // // checkSleepBar // checkSleepBar.Dock = DockStyle.Fill; checkSleepBar.Location = new Point(479, 131); checkSleepBar.Margin = new Padding(5, 0, 5, 0); checkSleepBar.Name = "checkSleepBar"; checkSleepBar.Padding = new Padding(16, 3, 7, 3); checkSleepBar.Size = new Size(227, 43); checkSleepBar.TabIndex = 9; checkSleepBar.Text = Strings.Sleep; checkSleepBar.UseVisualStyleBackColor = true; // // checkShutdownBar // checkShutdownBar.Dock = DockStyle.Fill; checkShutdownBar.Location = new Point(479, 174); checkShutdownBar.Margin = new Padding(5, 0, 5, 0); checkShutdownBar.Name = "checkShutdownBar"; checkShutdownBar.Padding = new Padding(16, 3, 7, 3); checkShutdownBar.Size = new Size(227, 43); checkShutdownBar.TabIndex = 10; checkShutdownBar.Text = Strings.Shutdown; checkShutdownBar.UseVisualStyleBackColor = true; // // checkBatteryBar // checkBatteryBar.Dock = DockStyle.Fill; checkBatteryBar.Location = new Point(479, 217); checkBatteryBar.Margin = new Padding(5, 0, 5, 0); checkBatteryBar.Name = "checkBatteryBar"; checkBatteryBar.Padding = new Padding(16, 3, 7, 3); checkBatteryBar.Size = new Size(227, 43); checkBatteryBar.TabIndex = 22; checkBatteryBar.Text = "Battery"; checkBatteryBar.UseVisualStyleBackColor = true; // // labelBacklightLid // labelBacklightLid.Dock = DockStyle.Fill; labelBacklightLid.Font = new Font("Segoe UI", 9F, FontStyle.Bold); labelBacklightLid.Location = new Point(716, 0); labelBacklightLid.Margin = new Padding(5, 0, 5, 0); labelBacklightLid.Name = "labelBacklightLid"; labelBacklightLid.Padding = new Padding(9, 5, 7, 5); labelBacklightLid.Size = new Size(228, 45); labelBacklightLid.TabIndex = 16; labelBacklightLid.Text = "Lid"; // // checkAwakeLid // checkAwakeLid.Dock = DockStyle.Fill; checkAwakeLid.Location = new Point(716, 45); checkAwakeLid.Margin = new Padding(5, 0, 5, 0); checkAwakeLid.Name = "checkAwakeLid"; checkAwakeLid.Padding = new Padding(16, 3, 7, 3); checkAwakeLid.Size = new Size(228, 43); checkAwakeLid.TabIndex = 12; checkAwakeLid.Text = Strings.Awake; checkAwakeLid.UseVisualStyleBackColor = true; // // checkBootLid // checkBootLid.Dock = DockStyle.Fill; checkBootLid.Location = new Point(716, 88); checkBootLid.Margin = new Padding(5, 0, 5, 0); checkBootLid.Name = "checkBootLid"; checkBootLid.Padding = new Padding(16, 3, 7, 3); checkBootLid.Size = new Size(228, 43); checkBootLid.TabIndex = 13; checkBootLid.Text = Strings.Boot; checkBootLid.UseVisualStyleBackColor = true; // // checkSleepLid // checkSleepLid.Dock = DockStyle.Fill; checkSleepLid.Location = new Point(716, 131); checkSleepLid.Margin = new Padding(5, 0, 5, 0); checkSleepLid.Name = "checkSleepLid"; checkSleepLid.Padding = new Padding(16, 3, 7, 3); checkSleepLid.Size = new Size(228, 43); checkSleepLid.TabIndex = 14; checkSleepLid.Text = Strings.Sleep; checkSleepLid.UseVisualStyleBackColor = true; // // checkShutdownLid // checkShutdownLid.Dock = DockStyle.Fill; checkShutdownLid.Location = new Point(716, 174); checkShutdownLid.Margin = new Padding(5, 0, 5, 0); checkShutdownLid.Name = "checkShutdownLid"; checkShutdownLid.Padding = new Padding(16, 3, 7, 3); checkShutdownLid.Size = new Size(228, 43); checkShutdownLid.TabIndex = 15; checkShutdownLid.Text = Strings.Shutdown; checkShutdownLid.UseVisualStyleBackColor = true; // // checkBatteryLid // checkBatteryLid.Dock = DockStyle.Fill; checkBatteryLid.Location = new Point(716, 217); checkBatteryLid.Margin = new Padding(5, 0, 5, 0); checkBatteryLid.Name = "checkBatteryLid"; checkBatteryLid.Padding = new Padding(16, 3, 7, 3); checkBatteryLid.Size = new Size(228, 43); checkBatteryLid.TabIndex = 23; checkBatteryLid.Text = "Battery"; checkBatteryLid.UseVisualStyleBackColor = true; // // panelSettingsHeader // panelSettingsHeader.AutoSize = true; panelSettingsHeader.BackColor = SystemColors.ControlLight; panelSettingsHeader.Controls.Add(pictureScan); panelSettingsHeader.Controls.Add(pictureLog); panelSettingsHeader.Controls.Add(pictureSettings); panelSettingsHeader.Controls.Add(labelSettings); panelSettingsHeader.Dock = DockStyle.Top; panelSettingsHeader.Location = new Point(15, 956); panelSettingsHeader.Name = "panelSettingsHeader"; panelSettingsHeader.Padding = new Padding(11, 5, 11, 5); panelSettingsHeader.Size = new Size(949, 51); panelSettingsHeader.TabIndex = 45; // // pictureScan // pictureScan.Anchor = AnchorStyles.Top | AnchorStyles.Right; pictureScan.BackgroundImage = Resources.icons8_search_32; pictureScan.BackgroundImageLayout = ImageLayout.Zoom; pictureScan.Cursor = Cursors.Hand; pictureScan.Location = new Point(857, 11); pictureScan.Margin = new Padding(5, 3, 5, 3); pictureScan.Name = "pictureScan"; pictureScan.Size = new Size(32, 32); pictureScan.TabIndex = 13; pictureScan.TabStop = false; pictureScan.Visible = false; // // pictureLog // pictureLog.Anchor = AnchorStyles.Top | AnchorStyles.Right; pictureLog.BackgroundImage = Resources.icons8_log_32; pictureLog.BackgroundImageLayout = ImageLayout.Zoom; pictureLog.Cursor = Cursors.Hand; pictureLog.Location = new Point(897, 11); pictureLog.Margin = new Padding(5, 3, 5, 3); pictureLog.Name = "pictureLog"; pictureLog.Size = new Size(32, 32); pictureLog.TabIndex = 12; pictureLog.TabStop = false; // // pictureSettings // pictureSettings.BackgroundImage = Resources.icons8_settings_32; pictureSettings.BackgroundImageLayout = ImageLayout.Zoom; pictureSettings.Location = new Point(21, 11); pictureSettings.Name = "pictureSettings"; pictureSettings.Size = new Size(32, 32); pictureSettings.TabIndex = 1; pictureSettings.TabStop = false; // // labelSettings // labelSettings.AutoSize = true; labelSettings.Font = new Font("Segoe UI", 9F, FontStyle.Bold); labelSettings.Location = new Point(56, 9); labelSettings.Name = "labelSettings"; labelSettings.Size = new Size(78, 32); labelSettings.TabIndex = 0; labelSettings.Text = "Other"; // // panelSettings // panelSettings.AccessibleRole = AccessibleRole.Grouping; panelSettings.AutoSize = true; panelSettings.AutoSizeMode = AutoSizeMode.GrowAndShrink; panelSettings.Controls.Add(checkAutoToggleClamshellMode); panelSettings.Controls.Add(checkBWIcon); panelSettings.Controls.Add(checkTopmost); panelSettings.Controls.Add(checkNoOverdrive); panelSettings.Controls.Add(checkBootSound); panelSettings.Controls.Add(checkUSBC); panelSettings.Controls.Add(checkGpuApps); panelSettings.Controls.Add(checkGPUFix); panelSettings.Controls.Add(checkNVPlatform); panelSettings.Controls.Add(checkStatusLed); panelSettings.Controls.Add(checkPerKeyRGB); panelSettings.Dock = DockStyle.Top; panelSettings.Location = new Point(15, 1252); panelSettings.Name = "panelSettings"; panelSettings.Padding = new Padding(21, 5, 11, 5); panelSettings.Size = new Size(949, 472); panelSettings.TabIndex = 3; // // checkAutoToggleClamshellMode // checkAutoToggleClamshellMode.AutoSize = true; checkAutoToggleClamshellMode.Dock = DockStyle.Top; checkAutoToggleClamshellMode.Location = new Point(21, 425); checkAutoToggleClamshellMode.Name = "checkAutoToggleClamshellMode"; checkAutoToggleClamshellMode.Padding = new Padding(3); checkAutoToggleClamshellMode.Size = new Size(917, 42); checkAutoToggleClamshellMode.TabIndex = 8; checkAutoToggleClamshellMode.Text = "Auto Toggle Clamshell Mode"; checkAutoToggleClamshellMode.UseVisualStyleBackColor = true; // // checkBWIcon // checkBWIcon.AutoSize = true; checkBWIcon.Dock = DockStyle.Top; checkBWIcon.Location = new Point(21, 383); checkBWIcon.Margin = new Padding(5, 3, 5, 3); checkBWIcon.Name = "checkBWIcon"; checkBWIcon.Padding = new Padding(3); checkBWIcon.Size = new Size(917, 42); checkBWIcon.TabIndex = 11; checkBWIcon.Text = "Black and white tray icon"; checkBWIcon.UseVisualStyleBackColor = true; // // checkTopmost // checkTopmost.AutoSize = true; checkTopmost.Dock = DockStyle.Top; checkTopmost.Location = new Point(21, 341); checkTopmost.Margin = new Padding(5, 3, 5, 3); checkTopmost.Name = "checkTopmost"; checkTopmost.Padding = new Padding(3); checkTopmost.Size = new Size(917, 42); checkTopmost.TabIndex = 6; checkTopmost.Text = Strings.WindowTop; checkTopmost.UseVisualStyleBackColor = true; // // checkNoOverdrive // checkNoOverdrive.AutoSize = true; checkNoOverdrive.Dock = DockStyle.Top; checkNoOverdrive.Location = new Point(21, 299); checkNoOverdrive.Margin = new Padding(5, 3, 5, 3); checkNoOverdrive.Name = "checkNoOverdrive"; checkNoOverdrive.Padding = new Padding(3); checkNoOverdrive.Size = new Size(917, 42); checkNoOverdrive.TabIndex = 5; checkNoOverdrive.Text = Strings.DisableOverdrive; checkNoOverdrive.UseVisualStyleBackColor = true; // // checkBootSound // checkBootSound.AutoSize = true; checkBootSound.Dock = DockStyle.Top; checkBootSound.Location = new Point(21, 257); checkBootSound.Margin = new Padding(5, 3, 5, 3); checkBootSound.Name = "checkBootSound"; checkBootSound.Padding = new Padding(3); checkBootSound.Size = new Size(917, 42); checkBootSound.TabIndex = 10; checkBootSound.Text = "Boot Sound"; checkBootSound.UseVisualStyleBackColor = true; // // checkUSBC // checkUSBC.AutoSize = true; checkUSBC.Dock = DockStyle.Top; checkUSBC.Location = new Point(21, 215); checkUSBC.Margin = new Padding(5, 3, 5, 3); checkUSBC.Name = "checkUSBC"; checkUSBC.Padding = new Padding(3); checkUSBC.Size = new Size(917, 42); checkUSBC.TabIndex = 4; checkUSBC.Text = "Keep GPU disabled on USB-C charger in Optimized mode"; checkUSBC.UseVisualStyleBackColor = true; // // checkGpuApps // checkGpuApps.AutoSize = true; checkGpuApps.Dock = DockStyle.Top; checkGpuApps.Location = new Point(21, 173); checkGpuApps.Margin = new Padding(5, 3, 5, 3); checkGpuApps.Name = "checkGpuApps"; checkGpuApps.Padding = new Padding(3); checkGpuApps.Size = new Size(917, 42); checkGpuApps.TabIndex = 2; checkGpuApps.Text = "Stop all apps using GPU when switching to Eco"; checkGpuApps.UseVisualStyleBackColor = true; // // checkGPUFix // checkGPUFix.AutoSize = true; checkGPUFix.Dock = DockStyle.Top; checkGPUFix.Location = new Point(21, 131); checkGPUFix.Margin = new Padding(5, 3, 5, 3); checkGPUFix.Name = "checkGPUFix"; checkGPUFix.Padding = new Padding(3); checkGPUFix.Size = new Size(917, 42); checkGPUFix.TabIndex = 9; checkGPUFix.Text = "Enable GPU on shutdown (prevents issue with Eco mode)"; checkGPUFix.UseVisualStyleBackColor = true; // // checkNVPlatform // checkNVPlatform.AutoSize = true; checkNVPlatform.Dock = DockStyle.Top; checkNVPlatform.Location = new Point(21, 89); checkNVPlatform.Margin = new Padding(5, 3, 5, 3); checkNVPlatform.Name = "checkNVPlatform"; checkNVPlatform.Padding = new Padding(3); checkNVPlatform.Size = new Size(917, 42); checkNVPlatform.TabIndex = 15; checkNVPlatform.Text = "Stop/Start NVIDIA services based on dGPU state"; checkNVPlatform.UseVisualStyleBackColor = true; // // checkStatusLed // checkStatusLed.AutoSize = true; checkStatusLed.Dock = DockStyle.Top; checkStatusLed.Location = new Point(21, 47); checkStatusLed.Margin = new Padding(5, 3, 5, 3); checkStatusLed.Name = "checkStatusLed"; checkStatusLed.Padding = new Padding(3); checkStatusLed.Size = new Size(917, 42); checkStatusLed.TabIndex = 12; checkStatusLed.Text = "LED Status Indicators"; checkStatusLed.UseVisualStyleBackColor = true; checkStatusLed.Visible = false; // // checkPerKeyRGB // checkPerKeyRGB.AutoSize = true; checkPerKeyRGB.Dock = DockStyle.Top; checkPerKeyRGB.Location = new Point(21, 5); checkPerKeyRGB.Margin = new Padding(5, 3, 5, 3); checkPerKeyRGB.Name = "checkPerKeyRGB"; checkPerKeyRGB.Padding = new Padding(3); checkPerKeyRGB.Size = new Size(917, 42); checkPerKeyRGB.TabIndex = 13; checkPerKeyRGB.Text = "Per-Key RGB Keyboard"; checkPerKeyRGB.UseVisualStyleBackColor = true; checkPerKeyRGB.Visible = false; // // panelPower // panelPower.Controls.Add(numericHibernateAfter); panelPower.Controls.Add(labelHibernateAfter); panelPower.Controls.Add(pictureHibernate); panelPower.Dock = DockStyle.Top; panelPower.Location = new Point(15, 1724); panelPower.Name = "panelPower"; panelPower.Size = new Size(949, 54); panelPower.TabIndex = 4; // // numericHibernateAfter // numericHibernateAfter.Anchor = AnchorStyles.Top | AnchorStyles.Right; numericHibernateAfter.Increment = new decimal(new int[] { 10, 0, 0, 0 }); numericHibernateAfter.Location = new Point(776, 7); numericHibernateAfter.Margin = new Padding(5, 3, 5, 3); numericHibernateAfter.Maximum = new decimal(new int[] { 3000000, 0, 0, 0 }); numericHibernateAfter.Name = "numericHibernateAfter"; numericHibernateAfter.Size = new Size(152, 39); numericHibernateAfter.TabIndex = 1; numericHibernateAfter.Unit = "min"; numericHibernateAfter.UnitFirst = false; // // labelHibernateAfter // labelHibernateAfter.AutoSize = true; labelHibernateAfter.Location = new Point(59, 10); labelHibernateAfter.Margin = new Padding(5, 0, 5, 0); labelHibernateAfter.Name = "labelHibernateAfter"; labelHibernateAfter.Size = new Size(457, 32); labelHibernateAfter.TabIndex = 45; labelHibernateAfter.Text = "Minutes till Hibernation in sleep (0 - OFF)"; // // pictureHibernate // pictureHibernate.BackgroundImage = Resources.icons8_hibernate_32; pictureHibernate.BackgroundImageLayout = ImageLayout.Zoom; pictureHibernate.Location = new Point(21, 10); pictureHibernate.Name = "pictureHibernate"; pictureHibernate.Size = new Size(32, 32); pictureHibernate.TabIndex = 22; pictureHibernate.TabStop = false; // // panelAPU // panelAPU.AutoSize = true; panelAPU.Controls.Add(comboAPU); panelAPU.Controls.Add(pictureAPUMem); panelAPU.Controls.Add(labelAPUMem); panelAPU.Dock = DockStyle.Top; panelAPU.Location = new Point(15, 1135); panelAPU.Name = "panelAPU"; panelAPU.Padding = new Padding(11, 5, 11, 0); panelAPU.Size = new Size(949, 57); panelAPU.TabIndex = 46; panelAPU.Visible = false; panelAPU.Paint += panelAPU_Paint; // // comboAPU // comboAPU.Anchor = AnchorStyles.Top | AnchorStyles.Right; comboAPU.BorderColor = Color.White; comboAPU.ButtonColor = SystemColors.ControlLight; comboAPU.FlatStyle = FlatStyle.Flat; comboAPU.Font = new Font("Segoe UI", 9F); comboAPU.FormattingEnabled = true; comboAPU.ItemHeight = 32; comboAPU.Items.AddRange(new object[] { "Auto", "1G", "2G", "3G", "4G", "5G", "6G", "7G", "8G" }); comboAPU.Location = new Point(618, 8); comboAPU.Margin = new Padding(5, 11, 5, 9); comboAPU.Name = "comboAPU"; comboAPU.Size = new Size(309, 40); comboAPU.TabIndex = 12; comboAPU.TabStop = false; // // pictureAPUMem // pictureAPUMem.BackgroundImage = Resources.icons8_video_48; pictureAPUMem.BackgroundImageLayout = ImageLayout.Zoom; pictureAPUMem.Location = new Point(21, 11); pictureAPUMem.Name = "pictureAPUMem"; pictureAPUMem.Size = new Size(32, 32); pictureAPUMem.TabIndex = 1; pictureAPUMem.TabStop = false; // // labelAPUMem // labelAPUMem.AutoSize = true; labelAPUMem.Font = new Font("Segoe UI", 9F, FontStyle.Bold); labelAPUMem.Location = new Point(64, 11); labelAPUMem.Name = "labelAPUMem"; labelAPUMem.Size = new Size(309, 32); labelAPUMem.TabIndex = 0; labelAPUMem.Text = "Memory Assigned to GPU"; // // panelCores // panelCores.AutoSize = true; panelCores.Controls.Add(buttonCores); panelCores.Controls.Add(comboCoresP); panelCores.Controls.Add(comboCoresE); panelCores.Controls.Add(pictureCores); panelCores.Controls.Add(label1); panelCores.Dock = DockStyle.Top; panelCores.Location = new Point(15, 1076); panelCores.Name = "panelCores"; panelCores.Padding = new Padding(11, 5, 11, 0); panelCores.Size = new Size(949, 59); panelCores.TabIndex = 47; panelCores.Visible = false; // // buttonCores // buttonCores.Activated = false; buttonCores.Anchor = AnchorStyles.Top | AnchorStyles.Right; buttonCores.BackColor = SystemColors.ButtonHighlight; buttonCores.BorderColor = Color.Transparent; buttonCores.BorderRadius = 2; buttonCores.FlatStyle = FlatStyle.Flat; buttonCores.Location = new Point(831, 7); buttonCores.Margin = new Padding(5, 3, 5, 3); buttonCores.Name = "buttonCores"; buttonCores.Secondary = false; buttonCores.Size = new Size(106, 44); buttonCores.TabIndex = 20; buttonCores.Text = "Apply"; buttonCores.UseVisualStyleBackColor = false; // // comboCoresP // comboCoresP.Anchor = AnchorStyles.Top | AnchorStyles.Right; comboCoresP.BorderColor = Color.White; comboCoresP.ButtonColor = SystemColors.ControlLight; comboCoresP.FlatStyle = FlatStyle.Flat; comboCoresP.Font = new Font("Segoe UI", 9F); comboCoresP.FormattingEnabled = true; comboCoresP.ItemHeight = 32; comboCoresP.Location = new Point(513, 10); comboCoresP.Margin = new Padding(5, 11, 5, 9); comboCoresP.Name = "comboCoresP"; comboCoresP.Size = new Size(150, 40); comboCoresP.TabIndex = 13; comboCoresP.TabStop = false; // // comboCoresE // comboCoresE.Anchor = AnchorStyles.Top | AnchorStyles.Right; comboCoresE.BorderColor = Color.White; comboCoresE.ButtonColor = SystemColors.ControlLight; comboCoresE.FlatStyle = FlatStyle.Flat; comboCoresE.Font = new Font("Segoe UI", 9F); comboCoresE.FormattingEnabled = true; comboCoresE.ItemHeight = 32; comboCoresE.Location = new Point(674, 10); comboCoresE.Margin = new Padding(5, 11, 5, 9); comboCoresE.Name = "comboCoresE"; comboCoresE.Size = new Size(150, 40); comboCoresE.TabIndex = 12; comboCoresE.TabStop = false; // // pictureCores // pictureCores.BackgroundImage = Resources.icons8_processor_32; pictureCores.BackgroundImageLayout = ImageLayout.Zoom; pictureCores.Location = new Point(21, 15); pictureCores.Name = "pictureCores"; pictureCores.Size = new Size(32, 32); pictureCores.TabIndex = 1; pictureCores.TabStop = false; // // label1 // label1.AutoSize = true; label1.Font = new Font("Segoe UI", 9F, FontStyle.Bold); label1.Location = new Point(64, 14); label1.Name = "label1"; label1.Size = new Size(299, 32); label1.TabIndex = 0; label1.Text = "CPU Cores Configuration"; // // panelACPI // panelACPI.AutoSize = true; panelACPI.Controls.Add(textACPIParam); panelACPI.Controls.Add(textACPICommand); panelACPI.Controls.Add(buttonACPISend); panelACPI.Controls.Add(pictureDebug); panelACPI.Controls.Add(labelACPITitle); panelACPI.Dock = DockStyle.Top; panelACPI.Location = new Point(15, 1007); panelACPI.Name = "panelACPI"; panelACPI.Padding = new Padding(11, 5, 11, 0); panelACPI.Size = new Size(949, 69); panelACPI.TabIndex = 48; panelACPI.Visible = false; // // textACPIParam // textACPIParam.Location = new Point(717, 18); textACPIParam.Margin = new Padding(5, 3, 5, 3); textACPIParam.Name = "textACPIParam"; textACPIParam.PlaceholderText = "Value"; textACPIParam.Size = new Size(127, 39); textACPIParam.TabIndex = 22; textACPIParam.TabStop = false; // // textACPICommand // textACPICommand.Location = new Point(467, 18); textACPICommand.Margin = new Padding(5, 3, 5, 3); textACPICommand.Name = "textACPICommand"; textACPICommand.PlaceholderText = "Address"; textACPICommand.Size = new Size(242, 39); textACPICommand.TabIndex = 21; textACPICommand.TabStop = false; // // buttonACPISend // buttonACPISend.Activated = false; buttonACPISend.Anchor = AnchorStyles.Bottom | AnchorStyles.Left; buttonACPISend.BackColor = SystemColors.ButtonHighlight; buttonACPISend.BorderColor = Color.Transparent; buttonACPISend.BorderRadius = 2; buttonACPISend.FlatStyle = FlatStyle.Flat; buttonACPISend.Location = new Point(855, 13); buttonACPISend.Margin = new Padding(5, 3, 5, 3); buttonACPISend.Name = "buttonACPISend"; buttonACPISend.Secondary = false; buttonACPISend.Size = new Size(106, 46); buttonACPISend.TabIndex = 20; buttonACPISend.Text = "Send"; buttonACPISend.UseVisualStyleBackColor = false; // // pictureDebug // pictureDebug.BackgroundImage = Resources.icons8_heartbeat_32; pictureDebug.BackgroundImageLayout = ImageLayout.Zoom; pictureDebug.Location = new Point(21, 21); pictureDebug.Name = "pictureDebug"; pictureDebug.Size = new Size(32, 32); pictureDebug.TabIndex = 1; pictureDebug.TabStop = false; // // labelACPITitle // labelACPITitle.AutoSize = true; labelACPITitle.Font = new Font("Segoe UI", 9F, FontStyle.Bold); labelACPITitle.Location = new Point(57, 21); labelACPITitle.Name = "labelACPITitle"; labelACPITitle.Size = new Size(188, 32); labelACPITitle.TabIndex = 0; labelACPITitle.Text = "ACPI DEVS Test"; // // panelOptimalBrightness // panelOptimalBrightness.AutoSize = true; panelOptimalBrightness.Controls.Add(comboOptimalBrightness); panelOptimalBrightness.Controls.Add(pictureOptimalBrightness); panelOptimalBrightness.Controls.Add(labelOptimalBrightness); panelOptimalBrightness.Dock = DockStyle.Top; panelOptimalBrightness.Location = new Point(15, 1192); panelOptimalBrightness.Name = "panelOptimalBrightness"; panelOptimalBrightness.Padding = new Padding(11, 5, 11, 0); panelOptimalBrightness.Size = new Size(949, 60); panelOptimalBrightness.TabIndex = 49; panelOptimalBrightness.Visible = false; // // comboOptimalBrightness // comboOptimalBrightness.Anchor = AnchorStyles.Top | AnchorStyles.Right; comboOptimalBrightness.BorderColor = Color.White; comboOptimalBrightness.ButtonColor = SystemColors.ControlLight; comboOptimalBrightness.FlatStyle = FlatStyle.Flat; comboOptimalBrightness.Font = new Font("Segoe UI", 9F); comboOptimalBrightness.FormattingEnabled = true; comboOptimalBrightness.ItemHeight = 32; comboOptimalBrightness.Items.AddRange(new object[] { "Off", "On Always", "On Battery" }); comboOptimalBrightness.Location = new Point(618, 11); comboOptimalBrightness.Margin = new Padding(5, 11, 5, 9); comboOptimalBrightness.Name = "comboOptimalBrightness"; comboOptimalBrightness.Size = new Size(309, 40); comboOptimalBrightness.TabIndex = 12; comboOptimalBrightness.TabStop = false; // // pictureOptimalBrightness // pictureOptimalBrightness.BackgroundImage = Resources.icons8_brightness_32; pictureOptimalBrightness.BackgroundImageLayout = ImageLayout.Zoom; pictureOptimalBrightness.Location = new Point(21, 11); pictureOptimalBrightness.Name = "pictureOptimalBrightness"; pictureOptimalBrightness.Size = new Size(32, 32); pictureOptimalBrightness.TabIndex = 1; pictureOptimalBrightness.TabStop = false; // // labelOptimalBrightness // labelOptimalBrightness.AutoSize = true; labelOptimalBrightness.Font = new Font("Segoe UI", 9F, FontStyle.Bold); labelOptimalBrightness.Location = new Point(64, 10); labelOptimalBrightness.Name = "labelOptimalBrightness"; labelOptimalBrightness.Size = new Size(323, 32); labelOptimalBrightness.TabIndex = 0; labelOptimalBrightness.Text = "Optimal Display Brightness"; // // Extra // AutoScaleDimensions = new SizeF(192F, 192F); AutoScaleMode = AutoScaleMode.Dpi; AutoScroll = true; AutoSize = true; AutoSizeMode = AutoSizeMode.GrowAndShrink; ClientSize = new Size(1013, 1759); Controls.Add(panelServices); Controls.Add(panelPower); Controls.Add(panelSettings); Controls.Add(panelOptimalBrightness); Controls.Add(panelAPU); Controls.Add(panelCores); Controls.Add(panelACPI); Controls.Add(panelSettingsHeader); Controls.Add(panelBacklight); Controls.Add(panelBacklightHeader); Controls.Add(panelBindings); Controls.Add(panelBindingsHeader); FormBorderStyle = FormBorderStyle.FixedSingle; Margin = new Padding(5, 3, 5, 3); MaximizeBox = false; MdiChildrenMinimizedAnchorBottom = false; MinimizeBox = false; MinimumSize = new Size(1033, 71); Name = "Extra"; Padding = new Padding(15); ShowIcon = false; ShowInTaskbar = false; Text = "Extra Settings"; panelServices.ResumeLayout(false); panelServices.PerformLayout(); ((System.ComponentModel.ISupportInitialize)pictureService).EndInit(); panelBindingsHeader.ResumeLayout(false); panelBindingsHeader.PerformLayout(); ((System.ComponentModel.ISupportInitialize)pictureBindings).EndInit(); ((System.ComponentModel.ISupportInitialize)pictureHelp).EndInit(); panelBindings.ResumeLayout(false); panelBindings.PerformLayout(); tableBindings.ResumeLayout(false); tableBindings.PerformLayout(); panelBacklightHeader.ResumeLayout(false); panelBacklightHeader.PerformLayout(); ((System.ComponentModel.ISupportInitialize)pictureBacklight).EndInit(); panelBacklight.ResumeLayout(false); panelBacklight.PerformLayout(); panelBacklightExtra.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)numericBacklightPluggedTime).EndInit(); ((System.ComponentModel.ISupportInitialize)numericBacklightTime).EndInit(); panelXGM.ResumeLayout(false); panelXGM.PerformLayout(); tableBacklight.ResumeLayout(false); panelSettingsHeader.ResumeLayout(false); panelSettingsHeader.PerformLayout(); ((System.ComponentModel.ISupportInitialize)pictureScan).EndInit(); ((System.ComponentModel.ISupportInitialize)pictureLog).EndInit(); ((System.ComponentModel.ISupportInitialize)pictureSettings).EndInit(); panelSettings.ResumeLayout(false); panelSettings.PerformLayout(); panelPower.ResumeLayout(false); panelPower.PerformLayout(); ((System.ComponentModel.ISupportInitialize)numericHibernateAfter).EndInit(); ((System.ComponentModel.ISupportInitialize)pictureHibernate).EndInit(); panelAPU.ResumeLayout(false); panelAPU.PerformLayout(); ((System.ComponentModel.ISupportInitialize)pictureAPUMem).EndInit(); panelCores.ResumeLayout(false); panelCores.PerformLayout(); ((System.ComponentModel.ISupportInitialize)pictureCores).EndInit(); panelACPI.ResumeLayout(false); panelACPI.PerformLayout(); ((System.ComponentModel.ISupportInitialize)pictureDebug).EndInit(); panelOptimalBrightness.ResumeLayout(false); panelOptimalBrightness.PerformLayout(); ((System.ComponentModel.ISupportInitialize)pictureOptimalBrightness).EndInit(); ResumeLayout(false); PerformLayout(); } #endregion private Panel panelServices; private RButton buttonServices; private Label labelServices; private Panel panelBindingsHeader; private Panel panelBindings; private TableLayoutPanel tableBindings; private Label labelFNC; private Label labelFNV; private TextBox textM2; private TextBox textM1; private RComboBox comboM1; private Label labelM1; private RComboBox comboM4; private RComboBox comboM3; private TextBox textM4; private TextBox textM3; private Label labelM4; private Label labelM3; private Label labelM2; private RComboBox comboM2; private Label labelFNF4; private RComboBox comboFNF4; private TextBox textFNF4; private RComboBox comboFNC; private RComboBox comboFNV; private TextBox textFNC; private TextBox textFNV; private PictureBox pictureHelp; private TableLayoutPanel tableKeys; private PictureBox pictureBindings; private Label labelBindings; private Panel panelBacklightHeader; private Panel panelBacklight; private Panel panelBacklightExtra; private NumericUpDownWithUnit numericBacklightPluggedTime; private NumericUpDownWithUnit numericBacklightTime; private Label labelBacklightTimeout; private Label labelSpeed; private RComboBox comboKeyboardSpeed; private Panel panelXGM; private CheckBox checkXGM; private TableLayoutPanel tableBacklight; private Label labelBacklightKeyboard; private CheckBox checkAwake; private CheckBox checkBoot; private CheckBox checkSleep; private CheckBox checkShutdown; private Label labelBacklightLogo; private CheckBox checkAwakeLogo; private CheckBox checkBootLogo; private CheckBox checkSleepLogo; private CheckBox checkShutdownLogo; private Label labelBacklightBar; private CheckBox checkAwakeBar; private CheckBox checkBootBar; private CheckBox checkSleepBar; private CheckBox checkShutdownBar; private Label labelBacklightLid; private CheckBox checkAwakeLid; private CheckBox checkBootLid; private CheckBox checkSleepLid; private CheckBox checkShutdownLid; private Panel panelSettingsHeader; private PictureBox pictureSettings; private Label labelSettings; private Panel panelSettings; private CheckBox checkTopmost; private CheckBox checkNoOverdrive; private CheckBox checkUSBC; private CheckBox checkGpuApps; private PictureBox pictureBacklight; private Label labelBacklightTitle; private PictureBox pictureService; private Slider sliderBrightness; private PictureBox pictureLog; private CheckBox checkAutoToggleClamshellMode; private Label labelFNE; private RComboBox comboFNE; private TextBox textFNE; private Slider slider1; private Panel panelPower; private PictureBox pictureHibernate; private Label labelHibernateAfter; private NumericUpDownWithUnit numericHibernateAfter; private CheckBox checkGPUFix; private ToolTip toolTip; private CheckBox checkBootSound; private Panel panelAPU; private PictureBox pictureAPUMem; private Label labelAPUMem; private RComboBox comboAPU; private PictureBox pictureScan; private Panel panelCores; private RComboBox comboCoresE; private PictureBox pictureCores; private Label label1; private RComboBox comboCoresP; private RButton buttonCores; private Panel panelACPI; private TextBox textACPIParam; private TextBox textACPICommand; private RButton buttonACPISend; private PictureBox pictureDebug; private Label labelACPITitle; private CheckBox checkBWIcon; private CheckBox checkStatusLed; private CheckBox checkPerKeyRGB; private CheckBox checkBatteryLogo; private CheckBox checkBattery; private CheckBox checkBatteryLid; private CheckBox checkBatteryBar; private CheckBox checkNVPlatform; private Panel panelOptimalBrightness; private RComboBox comboOptimalBrightness; private PictureBox pictureOptimalBrightness; private Label labelOptimalBrightness; } } ================================================ FILE: app/Extra.cs ================================================ using GHelper.Display; using GHelper.Gpu.AMD; using GHelper.Helpers; using GHelper.Input; using GHelper.Mode; using GHelper.UI; using GHelper.USB; using System.Diagnostics; namespace GHelper { public partial class Extra : RForm { ClamshellModeControl clamshellControl = new ClamshellModeControl(); const string EMPTY = "--------------"; private void SetKeyCombo(ComboBox combo, TextBox txbox, string name) { Dictionary customActions = new Dictionary { {"", EMPTY}, {"mute", Properties.Strings.VolumeMute}, {"screenshot", Properties.Strings.PrintScreen}, {"play", Properties.Strings.PlayPause}, {"aura", Properties.Strings.ToggleAura}, {"performance", Properties.Strings.PerformanceMode}, {"screen", Properties.Strings.ToggleScreen}, {"lock", Properties.Strings.LockScreen}, {"miniled", Properties.Strings.ToggleMiniled}, {"fnlock", Properties.Strings.ToggleFnLock}, {"brightness_down", Properties.Strings.BrightnessDown}, {"brightness_up", Properties.Strings.BrightnessUp}, {"visual", Properties.Strings.VisualMode}, {"touchscreen", Properties.Strings.ToggleTouchscreen }, {"micmute", Properties.Strings.MuteMic}, {"ghelper", Properties.Strings.OpenGHelper}, {"custom", Properties.Strings.Custom} }; if (AppConfig.IsDUO()) { customActions.Add("screenpad_down", Properties.Strings.ScreenPadDown); customActions.Add("screenpad_up", Properties.Strings.ScreenPadUp); } if (AppConfig.IsAlly()) { customActions.Add("controller", "Controller Mode"); } switch (name) { case "m1": customActions[""] = Properties.Strings.VolumeDown; break; case "m2": customActions[""] = Properties.Strings.VolumeUp; break; case "m3": customActions[""] = Properties.Strings.MuteMic; customActions.Remove("micmute"); break; case "m4": customActions[""] = Properties.Strings.OpenGHelper; customActions.Remove("ghelper"); break; case "fnf4": customActions[""] = Properties.Strings.ToggleAura; customActions.Remove("aura"); break; case "fnc": customActions[""] = Properties.Strings.ToggleFnLock; customActions.Remove("fnlock"); break; case "fnv": customActions[""] = Properties.Strings.VisualMode; customActions.Remove("visual"); break; case "fne": customActions[""] = "Calculator"; break; case "paddle": customActions[""] = EMPTY; break; case "cc": customActions[""] = EMPTY; break; } combo.DropDownStyle = ComboBoxStyle.DropDownList; combo.DataSource = new BindingSource(customActions, null); combo.DisplayMember = "Value"; combo.ValueMember = "Key"; string action = AppConfig.GetString(name); combo.SelectedValue = (action is not null) ? action : ""; if (combo.SelectedValue is null) combo.SelectedValue = ""; combo.SelectedValueChanged += delegate { if (combo.SelectedValue is not null) AppConfig.Set(name, combo.SelectedValue.ToString()); if (name == "m1" || name == "m2") Program.inputDispatcher.RegisterKeys(); }; txbox.Text = AppConfig.GetString(name + "_custom"); txbox.TextChanged += delegate { AppConfig.Set(name + "_custom", txbox.Text); }; } public Extra() { InitializeComponent(); labelBindings.Text = Properties.Strings.KeyBindings; labelBacklightTitle.Text = Properties.Strings.LaptopBacklight; labelSettings.Text = Properties.Strings.Other; checkAwake.Text = Properties.Strings.Awake; checkSleep.Text = Properties.Strings.Sleep; checkBoot.Text = Properties.Strings.Boot; checkShutdown.Text = Properties.Strings.Shutdown; checkBootSound.Text = Properties.Strings.BootSound; checkStatusLed.Text = Properties.Strings.LEDStatusIndicators; labelSpeed.Text = Properties.Strings.AnimationSpeed; //labelBrightness.Text = Properties.Strings.Brightness; labelBacklightTimeout.Text = Properties.Strings.BacklightTimeout; //labelBacklightTimeoutPlugged.Text = Properties.Strings.BacklightTimeoutPlugged; checkGPUFix.Text = Properties.Strings.EnableGPUOnShutdown; checkNoOverdrive.Text = Properties.Strings.DisableOverdrive; checkTopmost.Text = Properties.Strings.WindowTop; checkUSBC.Text = Properties.Strings.OptimizedUSBC; checkAutoToggleClamshellMode.Text = Properties.Strings.ToggleClamshellMode; labelBacklightKeyboard.Text = Properties.Strings.Keyboard; labelBacklightBar.Text = Properties.Strings.Lightbar; labelBacklightLid.Text = Properties.Strings.Lid; labelBacklightLogo.Text = Properties.Strings.Logo; checkGpuApps.Text = Properties.Strings.KillGpuApps; checkBWIcon.Text = Properties.Strings.BWTrayIcon; labelHibernateAfter.Text = Properties.Strings.HibernateAfter; labelAPUMem.Text = Properties.Strings.APUMemory; Text = Properties.Strings.ExtraSettings; // Accessible Labels panelServices.AccessibleName = Properties.Strings.AsusServicesRunning; panelBindings.AccessibleName = Properties.Strings.KeyBindings; tableBindings.AccessibleName = Properties.Strings.KeyBindings; comboM1.AccessibleName = "M1 Action"; comboM2.AccessibleName = "M2 Action"; comboM3.AccessibleName = "M3 Action"; comboM4.AccessibleName = "M4 Action"; comboFNF4.AccessibleName = "Fn+F4 Action"; comboFNC.AccessibleName = "Fn+C Action"; comboFNV.AccessibleName = "Fn+V Action"; comboFNE.AccessibleName = "Fn+Numpad Action"; numericBacklightPluggedTime.AccessibleName = Properties.Strings.BacklightTimeoutPlugged; numericBacklightTime.AccessibleName = Properties.Strings.BacklightTimeoutBattery; comboKeyboardSpeed.AccessibleName = Properties.Strings.LaptopBacklight + " " + Properties.Strings.AnimationSpeed; comboAPU.AccessibleName = Properties.Strings.LaptopBacklight + " " + Properties.Strings.AnimationSpeed; checkBoot.AccessibleName = Properties.Strings.Boot + " " + Properties.Strings.LaptopBacklight; checkAwake.AccessibleName = Properties.Strings.Awake + " " + Properties.Strings.LaptopBacklight; checkSleep.AccessibleName = Properties.Strings.Sleep + " " + Properties.Strings.LaptopBacklight; checkShutdown.AccessibleName = Properties.Strings.Shutdown + " " + Properties.Strings.LaptopBacklight; panelSettings.AccessibleName = Properties.Strings.ExtraSettings; numericHibernateAfter.AccessibleName = Properties.Strings.HibernateAfter; if (AppConfig.IsARCNM()) { labelM3.Text = "FN+F6"; labelM1.Visible = comboM1.Visible = textM1.Visible = false; labelM2.Visible = comboM2.Visible = textM2.Visible = false; labelM4.Visible = comboM4.Visible = textM4.Visible = false; labelFNF4.Visible = comboFNF4.Visible = textFNF4.Visible = false; } if (AppConfig.NoMKeys()) { labelM1.Text = "FN+F2"; labelM2.Text = "FN+F3"; labelM3.Text = "FN+F4"; labelM4.Visible = comboM4.Visible = textM4.Visible = AppConfig.IsM4Button(); labelFNF4.Visible = comboFNF4.Visible = textFNF4.Visible = false; } if (AppConfig.IsVivoZenPro()) { labelM1.Visible = comboM1.Visible = textM1.Visible = false; labelM2.Visible = comboM2.Visible = textM2.Visible = false; labelM3.Visible = comboM3.Visible = textM3.Visible = false; labelFNF4.Visible = comboFNF4.Visible = textFNF4.Visible = false; labelM4.Text = "FN+F12"; } if (AppConfig.MediaKeys()) { labelFNF4.Visible = comboFNF4.Visible = textFNF4.Visible = false; } if (!AppConfig.IsTUF()) { labelFNE.Visible = comboFNE.Visible = textFNE.Visible = false; } if (AppConfig.IsNoFNV()) { labelFNV.Visible = comboFNV.Visible = textFNV.Visible = false; } if (Program.acpi.DeviceGet(AsusACPI.GPUEco) < 0) { checkGpuApps.Visible = false; checkUSBC.Visible = false; } checkNoOverdrive.Visible = Program.acpi.IsOverdriveSupported(); // Change text and hide irrelevant options on the ROG Ally, // which is a bit of a special case piece of hardware. if (AppConfig.IsAlly()) { labelM1.Visible = comboM1.Visible = textM1.Visible = false; labelM2.Visible = comboM2.Visible = textM2.Visible = false; // Re-label M3 and M4 and FNF4 to match the front labels. labelM3.Text = "Cmd Center"; labelM4.Text = "ROG"; labelFNF4.Text = "Back Paddles"; // Hide all of the FN options, as the Ally has no special keyboard FN key. labelFNC.Visible = false; comboFNC.Visible = false; textFNC.Visible = false; labelFNV.Visible = false; comboFNV.Visible = false; textFNV.Visible = false; SetKeyCombo(comboM3, textM3, "cc"); SetKeyCombo(comboM4, textM4, "m4"); SetKeyCombo(comboFNF4, textFNF4, "paddle"); checkGpuApps.Visible = false; checkUSBC.Visible = false; checkAutoToggleClamshellMode.Visible = false; int apuMem = Program.acpi.GetAPUMem(); if (apuMem >= 0) { panelAPU.Visible = true; comboAPU.DropDownStyle = ComboBoxStyle.DropDownList; comboAPU.SelectedIndex = apuMem; } comboAPU.SelectedIndexChanged += ComboAPU_SelectedIndexChanged; } else { SetKeyCombo(comboM1, textM1, "m1"); SetKeyCombo(comboM2, textM2, "m2"); SetKeyCombo(comboM3, textM3, "m3"); SetKeyCombo(comboM4, textM4, "m4"); SetKeyCombo(comboFNF4, textFNF4, "fnf4"); SetKeyCombo(comboFNC, textFNC, "fnc"); SetKeyCombo(comboFNV, textFNV, "fnv"); SetKeyCombo(comboFNE, textFNE, "fne"); } if (AppConfig.IsStrix()) { labelM4.Text = "M5/ROG"; } InitTheme(); Shown += Keyboard_Shown; comboKeyboardSpeed.DropDownStyle = ComboBoxStyle.DropDownList; comboKeyboardSpeed.DataSource = new BindingSource(Aura.GetSpeeds(), null); comboKeyboardSpeed.DisplayMember = "Value"; comboKeyboardSpeed.ValueMember = "Key"; comboKeyboardSpeed.SelectedValue = Aura.Speed; comboKeyboardSpeed.SelectedValueChanged += ComboKeyboardSpeed_SelectedValueChanged; // Keyboard checkAwake.Checked = AppConfig.IsNotFalse("keyboard_awake"); checkBattery.Checked = AppConfig.IsOnBattery("keyboard_awake"); checkBoot.Checked = AppConfig.IsNotFalse("keyboard_boot"); checkSleep.Checked = AppConfig.IsNotFalse("keyboard_sleep"); checkShutdown.Checked = AppConfig.IsNotFalse("keyboard_shutdown"); // Lightbar checkAwakeBar.Checked = AppConfig.IsNotFalse("keyboard_awake_bar"); checkBatteryBar.Checked = AppConfig.IsOnBattery("keyboard_awake_bar"); checkBootBar.Checked = AppConfig.IsNotFalse("keyboard_boot_bar"); checkSleepBar.Checked = AppConfig.IsNotFalse("keyboard_sleep_bar"); checkShutdownBar.Checked = AppConfig.IsNotFalse("keyboard_shutdown_bar"); // Lid checkAwakeLid.Checked = AppConfig.IsNotFalse("keyboard_awake_lid"); checkBatteryLid.Checked = AppConfig.IsOnBattery("keyboard_awake_lid"); checkBootLid.Checked = AppConfig.IsNotFalse("keyboard_boot_lid"); checkSleepLid.Checked = AppConfig.IsNotFalse("keyboard_sleep_lid"); checkShutdownLid.Checked = AppConfig.IsNotFalse("keyboard_shutdown_lid"); // Logo checkAwakeLogo.Checked = AppConfig.IsNotFalse("keyboard_awake_logo"); checkBatteryLogo.Checked = AppConfig.IsOnBattery("keyboard_awake_logo"); checkBootLogo.Checked = AppConfig.IsNotFalse("keyboard_boot_logo"); checkSleepLogo.Checked = AppConfig.IsNotFalse("keyboard_sleep_logo"); checkShutdownLogo.Checked = AppConfig.IsNotFalse("keyboard_shutdown_logo"); checkAwake.CheckedChanged += CheckPower_CheckedChanged; checkBattery.CheckedChanged += CheckPower_CheckedChanged; checkBoot.CheckedChanged += CheckPower_CheckedChanged; checkSleep.CheckedChanged += CheckPower_CheckedChanged; checkShutdown.CheckedChanged += CheckPower_CheckedChanged; checkAwakeBar.CheckedChanged += CheckPower_CheckedChanged; checkBatteryBar.CheckedChanged += CheckPower_CheckedChanged; checkBootBar.CheckedChanged += CheckPower_CheckedChanged; checkSleepBar.CheckedChanged += CheckPower_CheckedChanged; checkShutdownBar.CheckedChanged += CheckPower_CheckedChanged; checkAwakeLid.CheckedChanged += CheckPower_CheckedChanged; checkBatteryLid.CheckedChanged += CheckPower_CheckedChanged; checkBootLid.CheckedChanged += CheckPower_CheckedChanged; checkSleepLid.CheckedChanged += CheckPower_CheckedChanged; checkShutdownLid.CheckedChanged += CheckPower_CheckedChanged; checkAwakeLogo.CheckedChanged += CheckPower_CheckedChanged; checkBatteryLogo.CheckedChanged += CheckPower_CheckedChanged; checkBootLogo.CheckedChanged += CheckPower_CheckedChanged; checkSleepLogo.CheckedChanged += CheckPower_CheckedChanged; checkShutdownLogo.CheckedChanged += CheckPower_CheckedChanged; if (!AppConfig.IsBacklightZones() || AppConfig.IsStrixLimitedRGB() || AppConfig.IsARCNM()) { if (!AppConfig.IsStrixLimitedRGB()) { labelBacklightBar.Visible = false; checkAwakeBar.Visible = false; checkBatteryBar.Visible = false; checkBootBar.Visible = false; checkSleepBar.Visible = false; checkShutdownBar.Visible = false; labelBacklightKeyboard.Visible = false; checkBattery.Visible = false; } labelBacklightLid.Visible = false; checkAwakeLid.Visible = false; checkBatteryLid.Visible = false; checkBootLid.Visible = false; checkSleepLid.Visible = false; checkShutdownLid.Visible = false; labelBacklightLogo.Visible = false; checkAwakeLogo.Visible = false; checkBatteryLogo.Visible = false; checkBootLogo.Visible = false; checkSleepLogo.Visible = false; checkShutdownLogo.Visible = false; } if (AppConfig.IsZ13()) { labelBacklightBar.Visible = false; checkAwakeBar.Visible = false; checkBatteryBar.Visible = false; checkBootBar.Visible = false; checkSleepBar.Visible = false; checkShutdownBar.Visible = false; labelBacklightLid.Visible = false; checkAwakeLid.Visible = false; checkBatteryLid.Visible = false; checkBootLid.Visible = false; checkSleepLid.Visible = false; checkShutdownLid.Visible = false; } //checkAutoToggleClamshellMode.Visible = clamshellControl.IsExternalDisplayConnected(); checkAutoToggleClamshellMode.Checked = AppConfig.Is("toggle_clamshell_mode"); checkAutoToggleClamshellMode.CheckedChanged += checkAutoToggleClamshellMode_CheckedChanged; checkTopmost.Checked = AppConfig.Is("topmost"); checkTopmost.CheckedChanged += CheckTopmost_CheckedChanged; ; checkNoOverdrive.Checked = AppConfig.IsNoOverdrive(); checkNoOverdrive.CheckedChanged += CheckNoOverdrive_CheckedChanged; checkUSBC.Checked = AppConfig.Is("optimized_usbc"); checkUSBC.CheckedChanged += CheckUSBC_CheckedChanged; sliderBrightness.Value = InputDispatcher.GetBacklight(); sliderBrightness.ValueChanged += SliderBrightness_ValueChanged; panelXGM.Visible = XGM.IsConnected(); checkXGM.Checked = !(AppConfig.Get("xmg_light") == 0); checkXGM.CheckedChanged += CheckXGM_CheckedChanged; numericBacklightTime.Value = AppConfig.Get("keyboard_timeout", 60); numericBacklightPluggedTime.Value = AppConfig.Get("keyboard_ac_timeout", 0); numericBacklightTime.ValueChanged += NumericBacklightTime_ValueChanged; numericBacklightPluggedTime.ValueChanged += NumericBacklightTime_ValueChanged; checkGpuApps.Checked = AppConfig.Is("kill_gpu_apps"); checkGpuApps.CheckedChanged += CheckGpuApps_CheckedChanged; int bootSound = Program.acpi.DeviceGet(AsusACPI.BootSound); if (bootSound < 0 || bootSound > UInt16.MaxValue) bootSound = AppConfig.Get("boot_sound", 0); checkBootSound.Checked = (bootSound == 1); checkBootSound.CheckedChanged += CheckBootSound_CheckedChanged; var statusLed = Program.acpi.DeviceGet(AsusACPI.StatusLed); checkStatusLed.Visible = statusLed >= 0; checkStatusLed.Checked = (statusLed > 0); checkStatusLed.CheckedChanged += CheckLEDStatus_CheckedChanged; var optimalBrightness = ScreenControl.GetOptimalBrightness(); if (optimalBrightness >= 0) { panelOptimalBrightness.Visible = true; comboOptimalBrightness.DropDownStyle = ComboBoxStyle.DropDownList; comboOptimalBrightness.SelectedIndex = AppConfig.Get("optimal_brightness", optimalBrightness); comboOptimalBrightness.SelectedIndexChanged += OptimalBrightness_Changed; } checkBWIcon.Checked = AppConfig.IsBWIcon(); checkBWIcon.CheckedChanged += CheckBWIcon_CheckedChanged; pictureHelp.Click += PictureHelp_Click; buttonServices.Click += ButtonServices_Click; pictureLog.Click += PictureLog_Click; checkGPUFix.Visible = Program.acpi.IsNVidiaGPU(); checkGPUFix.Checked = AppConfig.IsGPUFix(); checkGPUFix.CheckedChanged += CheckGPUFix_CheckedChanged; checkNVPlatform.Visible = Program.acpi.IsNVidiaGPU(); checkNVPlatform.Checked = AppConfig.IsNVPlatform(); checkNVPlatform.CheckedChanged += CheckNVPlatform_CheckedChanged; checkPerKeyRGB.Visible = AppConfig.IsPossible4ZoneRGB(); checkPerKeyRGB.Checked = AppConfig.Is("per_key_rgb"); checkPerKeyRGB.CheckedChanged += CheckPerKeyRGB_CheckedChanged; toolTip.SetToolTip(checkAutoToggleClamshellMode, "Disable sleep on lid close when plugged in and external monitor is connected"); toolTip.SetToolTip(checkNVPlatform, "Stops NVIDIA services when the discrete GPU is disabled\nand restarts them automatically when the GPU is enabled"); InitCores(); InitServices(); InitHibernate(); InitACPITesting(); } private void CheckNVPlatform_CheckedChanged(object? sender, EventArgs e) { AppConfig.Set("nv_platform", (checkNVPlatform.Checked ? 1 : 0)); } private void OptimalBrightness_Changed(object? sender, EventArgs e) { ScreenControl.SetOptimalBrightness(comboOptimalBrightness.SelectedIndex); } private void CheckPerKeyRGB_CheckedChanged(object? sender, EventArgs e) { AppConfig.Set("per_key_rgb", (checkPerKeyRGB.Checked ? 1 : 0)); } private void CheckLEDStatus_CheckedChanged(object? sender, EventArgs e) { InputDispatcher.SetStatusLED(checkStatusLed.Checked); } private void CheckBWIcon_CheckedChanged(object? sender, EventArgs e) { AppConfig.Set("bw_icon", (checkBWIcon.Checked ? 1 : 0)); Program.settingsForm.VisualiseIcon(); } private void InitACPITesting() { if (!AppConfig.Is("debug")) return; pictureScan.Visible = true; panelACPI.Visible = true; textACPICommand.Text = "120098"; textACPIParam.Text = "25"; buttonACPISend.Click += ButtonACPISend_Click; pictureScan.Click += PictureScan_Click; } private void ButtonACPISend_Click(object? sender, EventArgs e) { try { int deviceID = Convert.ToInt32(textACPICommand.Text, 16); int status = Convert.ToInt32(textACPIParam.Text, textACPIParam.Text.Contains("x") ? 16 : 10); int result = Program.acpi.DeviceSet((uint)deviceID, status, "TestACPI " + deviceID.ToString("X8") + " " + status.ToString("X4")); labelACPITitle.Text = "ACPI DEVS Test : " + result.ToString(); } catch (Exception ex) { Logger.WriteLine(ex.Message); } } private void InitCores() { (int eCores, int pCores) = Program.acpi.GetCores(); (int eCoresMax, int pCoresMax) = Program.acpi.GetCores(true); if (eCores < 0 || pCores < 0 || eCoresMax < 0 || pCoresMax < 0) { panelCores.Visible = false; return; } if (eCoresMax == 0) eCoresMax = 8; if (pCoresMax == 0) pCoresMax = 6; if (AppConfig.Is8Ecores()) eCoresMax = Math.Max(8, eCoresMax); eCoresMax = Math.Max(4, eCoresMax); pCoresMax = Math.Max(6, pCoresMax); panelCores.Visible = true; comboCoresE.DropDownStyle = ComboBoxStyle.DropDownList; comboCoresP.DropDownStyle = ComboBoxStyle.DropDownList; for (int i = AsusACPI.PCoreMin; i <= pCoresMax; i++) comboCoresP.Items.Add(i.ToString() + " Pcores"); for (int i = AsusACPI.ECoreMin; i <= eCoresMax; i++) comboCoresE.Items.Add(i.ToString() + " Ecores"); comboCoresP.SelectedIndex = Math.Max(Math.Min(pCores - AsusACPI.PCoreMin, comboCoresP.Items.Count - 1), 0); comboCoresE.SelectedIndex = Math.Max(Math.Min(eCores - AsusACPI.ECoreMin, comboCoresE.Items.Count - 1), 0); buttonCores.Click += ButtonCores_Click; } private void ButtonCores_Click(object? sender, EventArgs e) { DialogResult dialogResult = MessageBox.Show(Properties.Strings.AlertAPUMemoryRestart, Properties.Strings.AlertAPUMemoryRestartTitle, MessageBoxButtons.YesNo); if (dialogResult == DialogResult.Yes) { Program.acpi.SetCores(AsusACPI.ECoreMin + comboCoresE.SelectedIndex, AsusACPI.PCoreMin + comboCoresP.SelectedIndex); Process.Start("shutdown", "/r /t 1"); } } private void PictureScan_Click(object? sender, EventArgs e) { string logFile = Program.acpi.ScanRange(); new Process { StartInfo = new ProcessStartInfo(logFile) { UseShellExecute = true } }.Start(); } private void ComboAPU_SelectedIndexChanged(object? sender, EventArgs e) { int mem = comboAPU.SelectedIndex; Program.acpi.SetAPUMem(mem); DialogResult dialogResult = MessageBox.Show(Properties.Strings.AlertAPUMemoryRestart, Properties.Strings.AlertAPUMemoryRestartTitle, MessageBoxButtons.YesNo); if (dialogResult == DialogResult.Yes) { Process.Start("shutdown", "/r /t 1"); } } private void CheckBootSound_CheckedChanged(object? sender, EventArgs e) { int bootSound = checkBootSound.Checked ? 1 : 0; Program.acpi.DeviceSet(AsusACPI.BootSound, bootSound, "BootSound"); AppConfig.Set("boot_sound", bootSound); } private void CheckGPUFix_CheckedChanged(object? sender, EventArgs e) { AppConfig.Set("gpu_fix", (checkGPUFix.Checked ? 1 : 0)); } private void InitHibernate() { try { int hibernate = PowerNative.GetHibernateAfter(); if (hibernate < 0 || hibernate > numericHibernateAfter.Maximum) hibernate = 0; numericHibernateAfter.Value = hibernate; numericHibernateAfter.ValueChanged += NumericHibernateAfter_ValueChanged; } catch (Exception ex) { panelPower.Visible = false; Logger.WriteLine(ex.ToString()); } } private void NumericHibernateAfter_ValueChanged(object? sender, EventArgs e) { PowerNative.SetHibernateAfter((int)numericHibernateAfter.Value); } private void PictureLog_Click(object? sender, EventArgs e) { new Process { StartInfo = new ProcessStartInfo(Logger.logFile) { UseShellExecute = true } }.Start(); } private void SliderBrightness_ValueChanged(object? sender, EventArgs e) { bool onBattery = SystemInformation.PowerStatus.PowerLineStatus != PowerLineStatus.Online; if (onBattery) AppConfig.Set("keyboard_brightness_ac", sliderBrightness.Value); else AppConfig.Set("keyboard_brightness", sliderBrightness.Value); Aura.ApplyBrightness(sliderBrightness.Value, "Slider"); } private void InitServices() { int servicesCount = AsusService.GetRunningCount(); if (servicesCount > 0) { buttonServices.Text = Properties.Strings.Stop; labelServices.ForeColor = colorTurbo; } else { buttonServices.Text = Properties.Strings.Start; labelServices.ForeColor = colorStandard; } labelServices.Text = Properties.Strings.AsusServicesRunning + ": " + servicesCount; buttonServices.Enabled = true; } public void ServiesToggle() { buttonServices.Enabled = false; if (AsusService.GetRunningCount() > 0) { labelServices.Text = Properties.Strings.StoppingServices + " ..."; Task.Run(() => { AsusService.StopAsusServices(); BeginInvoke(delegate { InitServices(); }); Program.inputDispatcher.Init(); }); } else { labelServices.Text = Properties.Strings.StartingServices + " ..."; Task.Run(() => { AsusService.StartAsusServices(); BeginInvoke(delegate { InitServices(); }); }); } } private void ButtonServices_Click(object? sender, EventArgs e) { if (ProcessHelper.IsUserAdministrator()) ServiesToggle(); else ProcessHelper.RunAsAdmin("services"); } private void CheckGpuApps_CheckedChanged(object? sender, EventArgs e) { AppConfig.Set("kill_gpu_apps", (checkGpuApps.Checked ? 1 : 0)); } private void NumericBacklightTime_ValueChanged(object? sender, EventArgs e) { AppConfig.Set("keyboard_timeout", (int)numericBacklightTime.Value); AppConfig.Set("keyboard_ac_timeout", (int)numericBacklightPluggedTime.Value); Program.inputDispatcher.InitBacklightTimer(); } private void CheckXGM_CheckedChanged(object? sender, EventArgs e) { AppConfig.Set("xmg_light", (checkXGM.Checked ? 1 : 0)); XGM.Light(checkXGM.Checked); } private void CheckUSBC_CheckedChanged(object? sender, EventArgs e) { AppConfig.Set("optimized_usbc", (checkUSBC.Checked ? 1 : 0)); } private void PictureHelp_Click(object? sender, EventArgs e) { Process.Start(new ProcessStartInfo("https://github.com/seerge/g-helper/wiki/Power-user-settings#custom-hotkey-actions") { UseShellExecute = true }); } private void CheckNoOverdrive_CheckedChanged(object? sender, EventArgs e) { AppConfig.Set("no_overdrive", (checkNoOverdrive.Checked ? 1 : 0)); ScreenControl.AutoScreen(true); } private void CheckTopmost_CheckedChanged(object? sender, EventArgs e) { AppConfig.Set("topmost", (checkTopmost.Checked ? 1 : 0)); Program.settingsForm.TopMost = checkTopmost.Checked; } private void CheckPower_CheckedChanged(object? sender, EventArgs e) { AppConfig.Set("keyboard_awake", (checkAwake.Checked ? 1 : 0)); AppConfig.Set("keyboard_boot", (checkBoot.Checked ? 1 : 0)); AppConfig.Set("keyboard_sleep", (checkSleep.Checked ? 1 : 0)); AppConfig.Set("keyboard_shutdown", (checkShutdown.Checked ? 1 : 0)); AppConfig.Set("keyboard_awake_bar", (checkAwakeBar.Checked ? 1 : 0)); AppConfig.Set("keyboard_boot_bar", (checkBootBar.Checked ? 1 : 0)); AppConfig.Set("keyboard_sleep_bar", (checkSleepBar.Checked ? 1 : 0)); AppConfig.Set("keyboard_shutdown_bar", (checkShutdownBar.Checked ? 1 : 0)); AppConfig.Set("keyboard_awake_lid", (checkAwakeLid.Checked ? 1 : 0)); AppConfig.Set("keyboard_boot_lid", (checkBootLid.Checked ? 1 : 0)); AppConfig.Set("keyboard_sleep_lid", (checkSleepLid.Checked ? 1 : 0)); AppConfig.Set("keyboard_shutdown_lid", (checkShutdownLid.Checked ? 1 : 0)); AppConfig.Set("keyboard_awake_logo", (checkAwakeLogo.Checked ? 1 : 0)); AppConfig.Set("keyboard_boot_logo", (checkBootLogo.Checked ? 1 : 0)); AppConfig.Set("keyboard_sleep_logo", (checkSleepLogo.Checked ? 1 : 0)); AppConfig.Set("keyboard_shutdown_logo", (checkShutdownLogo.Checked ? 1 : 0)); if (AppConfig.IsBacklightZones()) { AppConfig.Set("keyboard_awake_bat", (checkBattery.Checked ? 1 : 0)); AppConfig.Set("keyboard_awake_bar_bat", (checkBatteryBar.Checked ? 1 : 0)); AppConfig.Set("keyboard_awake_lid_bat", (checkBatteryLid.Checked ? 1 : 0)); AppConfig.Set("keyboard_awake_logo_bat", (checkBatteryLogo.Checked ? 1 : 0)); } Aura.ApplyPower(); } private void ComboKeyboardSpeed_SelectedValueChanged(object? sender, EventArgs e) { AppConfig.Set("aura_speed", (int)comboKeyboardSpeed.SelectedValue); Aura.ApplyAura(); } private void Keyboard_Shown(object? sender, EventArgs e) { if (Height > Program.settingsForm.Height) { var top = Program.settingsForm.Top + Program.settingsForm.Height - Height; if (top < 0) { MaximumSize = new Size(Width, Program.settingsForm.Height); Top = Program.settingsForm.Top; } else { Top = top; } } else { Top = Program.settingsForm.Top; } Left = Program.settingsForm.Left - Width - 5; } private void checkAutoToggleClamshellMode_CheckedChanged(object? sender, EventArgs e) { AppConfig.Set("toggle_clamshell_mode", checkAutoToggleClamshellMode.Checked ? 1 : 0); if (checkAutoToggleClamshellMode.Checked) { clamshellControl.ToggleLidAction(); } else { ClamshellModeControl.DisableClamshellMode(); } } private void panelAPU_Paint(object sender, PaintEventArgs e) { } } } ================================================ FILE: app/Extra.resx ================================================  text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 17, 17 73 ================================================ FILE: app/Fan/FanSensorControl.cs ================================================ using GHelper.Mode; namespace GHelper.Fan { public class FanSensorControl { public const int DEFAULT_FAN_MIN = 18; public const int DEFAULT_FAN_MAX = 58; public const int XGM_FAN_MAX = 72; public const int INADEQUATE_MAX = 104; const int FAN_COUNT = 3; Fans fansForm; ModeControl modeControl = Program.modeControl; static int[] measuredMax; static int sameCount = 0; static System.Timers.Timer timer = default!; static int[] _fanMax = InitFanMax(); static int[] _fanMin = GetDefaultMin(); static bool _fanRpm = AppConfig.IsNotFalse("fan_rpm"); public FanSensorControl(Fans fansForm) { this.fansForm = fansForm; timer = new System.Timers.Timer(1000); timer.Elapsed += Timer_Elapsed; } static int[] InitFanMax() { int[] defaultMax = GetDefaultMax(); return new int[3] { AppConfig.Get("fan_max_" + (int)AsusFan.CPU, defaultMax[(int)AsusFan.CPU]), AppConfig.Get("fan_max_" + (int)AsusFan.GPU, defaultMax[(int)AsusFan.GPU]), AppConfig.Get("fan_max_" + (int)AsusFan.Mid, defaultMax[(int)AsusFan.Mid]) }; } static int[] GetDefaultMax() { if (AppConfig.ContainsModel("GA401I")) return new int[3] { 78, 76, DEFAULT_FAN_MAX }; if (AppConfig.ContainsModel("GA401")) return new int[3] { 71, 73, DEFAULT_FAN_MAX }; if (AppConfig.ContainsModel("GA402")) return new int[3] { 55, 56, DEFAULT_FAN_MAX }; if (AppConfig.ContainsModel("G513R")) return new int[3] { 58, 60, DEFAULT_FAN_MAX }; if (AppConfig.ContainsModel("G513Q")) return new int[3] { 69, 69, DEFAULT_FAN_MAX }; if (AppConfig.ContainsModel("GA503")) return new int[3] { 64, 64, DEFAULT_FAN_MAX }; if (AppConfig.ContainsModel("GU603")) return new int[3] { 62, 64, DEFAULT_FAN_MAX }; if (AppConfig.ContainsModel("FA507R")) return new int[3] { 63, 57, DEFAULT_FAN_MAX }; if (AppConfig.ContainsModel("FA507X")) return new int[3] { 63, 68, DEFAULT_FAN_MAX }; if (AppConfig.ContainsModel("FX607J")) return new int[3] { 74, 72, DEFAULT_FAN_MAX }; if (AppConfig.ContainsModel("GX650")) return new int[3] { 62, 62, DEFAULT_FAN_MAX }; if (AppConfig.ContainsModel("G732")) return new int[3] { 61, 60, DEFAULT_FAN_MAX }; if (AppConfig.ContainsModel("G713")) return new int[3] { 56, 60, DEFAULT_FAN_MAX }; if (AppConfig.ContainsModel("Z301")) return new int[3] { 72, 64, DEFAULT_FAN_MAX }; if (AppConfig.ContainsModel("GV601")) return new int[3] { 78, 59, 85 }; if (AppConfig.ContainsModel("GA403")) return new int[3] { 68, 68, 80 }; if (AppConfig.ContainsModel("GU605")) return new int[3] { 62, 62, 92 }; return new int[3] { DEFAULT_FAN_MAX, DEFAULT_FAN_MAX, DEFAULT_FAN_MAX }; } static int[] GetDefaultMin() { if (AppConfig.ContainsModel("GA403")) return new int[3] { 22, 22, 22 }; if (AppConfig.ContainsModel("GU605")) return new int[3] { 22, 22, 22 }; return new int[3] { DEFAULT_FAN_MIN, DEFAULT_FAN_MIN, DEFAULT_FAN_MIN }; } public static int GetFanMax(AsusFan device) { if (device == AsusFan.XGM) return XGM_FAN_MAX; if (_fanMax[(int)device] < 0 || _fanMax[(int)device] > INADEQUATE_MAX) SetFanMax(device, DEFAULT_FAN_MAX); return _fanMax[(int)device]; } public static int GetFanMin(AsusFan device) { if (device == AsusFan.XGM) return DEFAULT_FAN_MIN; return _fanMin[(int)device]; } public static void SetFanMax(AsusFan device, int value) { _fanMax[(int)device] = value; AppConfig.Set("fan_max_" + (int)device, value); } public static bool fanRpm { get { return _fanRpm; } set { AppConfig.Set("fan_rpm", value ? 1 : 0); _fanRpm = value; } } public static string FormatFan(AsusFan device, int value) { if (value < 0) return null; if (value > GetFanMax(device) && value <= INADEQUATE_MAX) SetFanMax(device, value); if (fanRpm) return Properties.Strings.FanSpeed + ": " + (value * 100).ToString() + "RPM"; else return Properties.Strings.FanSpeed + ": " + Math.Min(Math.Round((float)value / GetFanMax(device) * 100), 100).ToString() + "%"; // relatively to max RPM } public void StartCalibration() { measuredMax = new int[] { 0, 0, 0 }; timer.Enabled = true; for (int i = 0; i < FAN_COUNT; i++) AppConfig.Remove("fan_max_" + i); Program.acpi.DeviceSet(AsusACPI.PerformanceMode, AsusACPI.PerformanceTurbo, "ModeCalibration"); for (int i = 0; i < FAN_COUNT; i++) Program.acpi.SetFanCurve((AsusFan)i, new byte[] { 20, 30, 40, 50, 60, 70, 80, 90, 100, 100, 100, 100, 100, 100, 100, 100 }); } private void Timer_Elapsed(object? sender, System.Timers.ElapsedEventArgs e) { int fan; bool same = true; for (int i = 0; i < FAN_COUNT; i++) { fan = Program.acpi.GetFan((AsusFan)i); if (fan > measuredMax[i]) { measuredMax[i] = fan; same = false; } } if (same) sameCount++; else sameCount = 0; string label = "Measuring Max Speed - CPU: " + measuredMax[(int)AsusFan.CPU] * 100 + ", GPU: " + measuredMax[(int)AsusFan.GPU] * 100; if (measuredMax[(int)AsusFan.Mid] > 10) label = label + ", Mid: " + measuredMax[(int)AsusFan.Mid] * 100; label = label + " (" + sameCount + "s)"; fansForm.LabelFansResult(label); if (sameCount >= 15) { for (int i = 0; i < FAN_COUNT; i++) { if (measuredMax[i] > 30 && measuredMax[i] < INADEQUATE_MAX) SetFanMax((AsusFan)i, measuredMax[i]); } sameCount = 0; FinishCalibration(); } } private void FinishCalibration() { timer.Enabled = false; modeControl.SetPerformanceMode(); string label = "Measured - CPU: " + AppConfig.Get("fan_max_" + (int)AsusFan.CPU) * 100; if (AppConfig.Get("fan_max_" + (int)AsusFan.GPU) > 0) label = label + ", GPU: " + AppConfig.Get("fan_max_" + (int)AsusFan.GPU) * 100; if (AppConfig.Get("fan_max_" + (int)AsusFan.Mid) > 0) label = label + ", Mid: " + AppConfig.Get("fan_max_" + (int)AsusFan.Mid) * 100; fansForm.LabelFansResult(label); fansForm.InitAxis(); } } } ================================================ FILE: app/Fans.Designer.cs ================================================ using GHelper.UI; using System.Windows.Forms.DataVisualization.Charting; namespace GHelper { partial class Fans { /// /// Required designer variable. /// private System.ComponentModel.IContainer components = null; /// /// Clean up any resources being used. /// /// true if managed resources should be disposed; otherwise, false. protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } #region Windows Form Designer generated code /// /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// private void InitializeComponent() { ChartArea chartArea1 = new ChartArea(); Title title1 = new Title(); ChartArea chartArea2 = new ChartArea(); Title title2 = new Title(); ChartArea chartArea3 = new ChartArea(); Title title3 = new Title(); ChartArea chartArea4 = new ChartArea(); Title title4 = new Title(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Fans)); panelFans = new Panel(); checkFanClamp = new RCheckBox(); labelTip = new Label(); tableFanCharts = new TableLayoutPanel(); chartGPU = new Chart(); chartCPU = new Chart(); chartXGM = new Chart(); chartMid = new Chart(); panelTitleFans = new Panel(); tableLayoutModes = new TableLayoutPanel(); buttonRemove = new RButton(); buttonAdd = new RButton(); buttonRename = new RButton(); comboModes = new RComboBox(); picturePerf = new PictureBox(); labelFans = new Label(); panelApplyFans = new Panel(); buttonCalibrate = new RButton(); labelFansResult = new Label(); checkApplyFans = new RCheckBox(); buttonReset = new RButton(); comboBoost = new RComboBox(); panelSliders = new Panel(); panelAdvanced = new Panel(); panelAdvancedAlways = new Panel(); checkApplyUV = new RCheckBox(); panelAdvancedApply = new Panel(); buttonApplyAdvanced = new RButton(); labelRisky = new Label(); panelUViGPU = new Panel(); labelUViGPU = new Label(); labelLeftUViGPU = new Label(); trackUViGPU = new TrackBar(); panelUV = new Panel(); labelUV = new Label(); labelLeftUV = new Label(); trackUV = new TrackBar(); panelTitleAdvanced = new Panel(); pictureUV = new PictureBox(); labelTitleUV = new Label(); panelTemperature = new Panel(); labelTemp = new Label(); labelLeftTemp = new Label(); trackTemp = new TrackBar(); panelTitleTemp = new Panel(); pictureTemp = new PictureBox(); labelTempLimit = new Label(); panelDownload = new Panel(); buttonDownload = new RButton(); panelPower = new Panel(); panelApplyPower = new Panel(); checkApplyPower = new RCheckBox(); panelCPU = new Panel(); labelCPU = new Label(); labelLeftCPU = new Label(); trackCPU = new TrackBar(); panelFast = new Panel(); labelFast = new Label(); labelLeftFast = new Label(); trackFast = new TrackBar(); panelSlow = new Panel(); labelSlow = new Label(); labelLeftSlow = new Label(); trackSlow = new TrackBar(); panelTotal = new Panel(); labelTotal = new Label(); labelLeftTotal = new Label(); trackTotal = new TrackBar(); panelTitleCPU = new Panel(); pictureBoxCPU = new PictureBox(); labelPowerLimits = new Label(); panelBoost = new Panel(); panelBoostTitle = new Panel(); pictureBoost = new PictureBox(); labelBoost = new Label(); panelPowerMode = new Panel(); comboPowerMode = new RComboBox(); panelPowerModeTItle = new Panel(); picturePowerMode = new PictureBox(); labelPowerModeTitle = new Label(); panelGPU = new Panel(); panelGPUTemp = new Panel(); labelGPUTemp = new Label(); labelGPUTempTitle = new Label(); trackGPUTemp = new TrackBar(); panelGPUBoost = new Panel(); labelGPUBoost = new Label(); labelGPUBoostTitle = new Label(); trackGPUBoost = new TrackBar(); panelGPUPower = new Panel(); labelGPUPower = new Label(); labelGPUPowerTitle = new Label(); trackGPUPower = new TrackBar(); panelGPUMemory = new Panel(); labelGPUMemory = new Label(); labelGPUMemoryTitle = new Label(); trackGPUMemory = new TrackBar(); panelGPUCore = new Panel(); labelGPUCore = new Label(); trackGPUCore = new TrackBar(); labelGPUCoreTitle = new Label(); panelGPUClockLimit = new Panel(); labelGPUClockLimit = new Label(); trackGPUClockLimit = new TrackBar(); labelGPUClockLimitTitle = new Label(); panelTitleGPU = new Panel(); pictureGPU = new PictureBox(); labelGPU = new Label(); panelNav = new Panel(); tableNav = new TableLayoutPanel(); buttonAdvanced = new RButton(); buttonGPU = new RButton(); buttonCPU = new RButton(); panelFans.SuspendLayout(); tableFanCharts.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)chartGPU).BeginInit(); ((System.ComponentModel.ISupportInitialize)chartCPU).BeginInit(); ((System.ComponentModel.ISupportInitialize)chartXGM).BeginInit(); ((System.ComponentModel.ISupportInitialize)chartMid).BeginInit(); panelTitleFans.SuspendLayout(); tableLayoutModes.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)picturePerf).BeginInit(); panelApplyFans.SuspendLayout(); panelSliders.SuspendLayout(); panelAdvanced.SuspendLayout(); panelAdvancedAlways.SuspendLayout(); panelAdvancedApply.SuspendLayout(); panelUViGPU.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)trackUViGPU).BeginInit(); panelUV.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)trackUV).BeginInit(); panelTitleAdvanced.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)pictureUV).BeginInit(); panelTemperature.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)trackTemp).BeginInit(); panelTitleTemp.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)pictureTemp).BeginInit(); panelDownload.SuspendLayout(); panelPower.SuspendLayout(); panelApplyPower.SuspendLayout(); panelCPU.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)trackCPU).BeginInit(); panelFast.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)trackFast).BeginInit(); panelSlow.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)trackSlow).BeginInit(); panelTotal.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)trackTotal).BeginInit(); panelTitleCPU.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)pictureBoxCPU).BeginInit(); panelBoost.SuspendLayout(); panelBoostTitle.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)pictureBoost).BeginInit(); panelPowerMode.SuspendLayout(); panelPowerModeTItle.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)picturePowerMode).BeginInit(); panelGPU.SuspendLayout(); panelGPUTemp.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)trackGPUTemp).BeginInit(); panelGPUBoost.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)trackGPUBoost).BeginInit(); panelGPUPower.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)trackGPUPower).BeginInit(); panelGPUMemory.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)trackGPUMemory).BeginInit(); panelGPUCore.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)trackGPUCore).BeginInit(); panelGPUClockLimit.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)trackGPUClockLimit).BeginInit(); panelTitleGPU.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)pictureGPU).BeginInit(); panelNav.SuspendLayout(); tableNav.SuspendLayout(); SuspendLayout(); // // panelFans // panelFans.AutoSize = true; panelFans.AutoSizeMode = AutoSizeMode.GrowAndShrink; panelFans.Controls.Add(checkFanClamp); panelFans.Controls.Add(labelTip); panelFans.Controls.Add(tableFanCharts); panelFans.Controls.Add(panelTitleFans); panelFans.Controls.Add(panelApplyFans); panelFans.Dock = DockStyle.Fill; panelFans.Location = new Point(530, 0); panelFans.Margin = new Padding(0); panelFans.MinimumSize = new Size(816, 0); panelFans.Name = "panelFans"; panelFans.Padding = new Padding(0, 0, 10, 0); panelFans.Size = new Size(820, 1100); panelFans.TabIndex = 12; // // checkFanClamp // checkFanClamp.AutoSize = true; checkFanClamp.Font = new Font("Segoe UI", 8F, FontStyle.Regular, GraphicsUnit.Point, 0); checkFanClamp.Location = new Point(18, 80); checkFanClamp.Name = "checkFanClamp"; checkFanClamp.Padding = new Padding(8, 1, 2, 1); checkFanClamp.Size = new Size(193, 44); checkFanClamp.TabIndex = 44; checkFanClamp.TabStop = false; checkFanClamp.Text = "Clamp to Grid"; checkFanClamp.UseVisualStyleBackColor = false; // // labelTip // labelTip.AutoSize = true; labelTip.BackColor = SystemColors.ControlLightLight; labelTip.Location = new Point(684, 92); labelTip.Margin = new Padding(4, 0, 4, 0); labelTip.Name = "labelTip"; labelTip.Padding = new Padding(4); labelTip.Size = new Size(105, 40); labelTip.TabIndex = 40; labelTip.Text = "500,300"; // // tableFanCharts // tableFanCharts.AutoSize = true; tableFanCharts.ColumnCount = 1; tableFanCharts.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F)); tableFanCharts.Controls.Add(chartGPU, 0, 1); tableFanCharts.Controls.Add(chartCPU, 0, 0); tableFanCharts.Controls.Add(chartXGM, 0, 2); tableFanCharts.Controls.Add(chartMid, 0, 2); tableFanCharts.Dock = DockStyle.Fill; tableFanCharts.Location = new Point(0, 66); tableFanCharts.Margin = new Padding(4); tableFanCharts.Name = "tableFanCharts"; tableFanCharts.Padding = new Padding(10, 0, 10, 5); tableFanCharts.RowCount = 2; tableFanCharts.RowStyles.Add(new RowStyle(SizeType.Percent, 25F)); tableFanCharts.RowStyles.Add(new RowStyle(SizeType.Percent, 25F)); tableFanCharts.RowStyles.Add(new RowStyle(SizeType.Percent, 25F)); tableFanCharts.RowStyles.Add(new RowStyle(SizeType.Percent, 25F)); tableFanCharts.Size = new Size(810, 918); tableFanCharts.TabIndex = 36; // // chartGPU // chartArea1.Name = "ChartArea1"; chartGPU.ChartAreas.Add(chartArea1); chartGPU.Dock = DockStyle.Fill; chartGPU.Location = new Point(12, 238); chartGPU.Margin = new Padding(2, 10, 2, 10); chartGPU.Name = "chartGPU"; chartGPU.Size = new Size(786, 208); chartGPU.TabIndex = 17; chartGPU.Text = "chartGPU"; title1.Name = "Title1"; chartGPU.Titles.Add(title1); // // chartCPU // chartArea2.Name = "ChartArea1"; chartCPU.ChartAreas.Add(chartArea2); chartCPU.Dock = DockStyle.Fill; chartCPU.Location = new Point(12, 10); chartCPU.Margin = new Padding(2, 10, 2, 10); chartCPU.Name = "chartCPU"; chartCPU.Size = new Size(786, 208); chartCPU.TabIndex = 14; chartCPU.Text = "chartCPU"; title2.Name = "Title1"; chartCPU.Titles.Add(title2); // // chartXGM // chartArea3.Name = "ChartAreaXGM"; chartXGM.ChartAreas.Add(chartArea3); chartXGM.Dock = DockStyle.Fill; chartXGM.Location = new Point(12, 694); chartXGM.Margin = new Padding(2, 10, 2, 10); chartXGM.Name = "chartXGM"; chartXGM.Size = new Size(786, 209); chartXGM.TabIndex = 14; chartXGM.Text = "chartXGM"; title3.Name = "Title4"; chartXGM.Titles.Add(title3); chartXGM.Visible = false; // // chartMid // chartArea4.Name = "ChartArea3"; chartMid.ChartAreas.Add(chartArea4); chartMid.Dock = DockStyle.Fill; chartMid.Location = new Point(12, 466); chartMid.Margin = new Padding(2, 10, 2, 10); chartMid.Name = "chartMid"; chartMid.Size = new Size(786, 208); chartMid.TabIndex = 14; chartMid.Text = "chartMid"; title4.Name = "Title3"; chartMid.Titles.Add(title4); chartMid.Visible = false; // // panelTitleFans // panelTitleFans.Controls.Add(tableLayoutModes); panelTitleFans.Controls.Add(picturePerf); panelTitleFans.Controls.Add(labelFans); panelTitleFans.Dock = DockStyle.Top; panelTitleFans.Location = new Point(0, 0); panelTitleFans.Margin = new Padding(4); panelTitleFans.Name = "panelTitleFans"; panelTitleFans.Size = new Size(810, 66); panelTitleFans.TabIndex = 42; // // tableLayoutModes // tableLayoutModes.ColumnCount = 4; tableLayoutModes.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 60F)); tableLayoutModes.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 60F)); tableLayoutModes.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F)); tableLayoutModes.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 60F)); tableLayoutModes.Controls.Add(buttonRemove, 0, 0); tableLayoutModes.Controls.Add(buttonAdd, 3, 0); tableLayoutModes.Controls.Add(buttonRename, 1, 0); tableLayoutModes.Controls.Add(comboModes, 2, 0); tableLayoutModes.Dock = DockStyle.Right; tableLayoutModes.Location = new Point(330, 0); tableLayoutModes.Margin = new Padding(0); tableLayoutModes.Name = "tableLayoutModes"; tableLayoutModes.Padding = new Padding(0, 10, 4, 10); tableLayoutModes.RowCount = 1; tableLayoutModes.RowStyles.Add(new RowStyle(SizeType.Percent, 100F)); tableLayoutModes.Size = new Size(480, 66); tableLayoutModes.TabIndex = 1; // // buttonRemove // buttonRemove.Activated = false; buttonRemove.BackColor = SystemColors.ControlLight; buttonRemove.BorderColor = Color.Transparent; buttonRemove.BorderRadius = 2; buttonRemove.Dock = DockStyle.Fill; buttonRemove.FlatStyle = FlatStyle.Flat; buttonRemove.Image = Properties.Resources.icons8_remove_64; buttonRemove.Location = new Point(0, 10); buttonRemove.Margin = new Padding(0, 0, 6, 0); buttonRemove.Name = "buttonRemove"; buttonRemove.Secondary = true; buttonRemove.Size = new Size(54, 46); buttonRemove.TabIndex = 44; buttonRemove.UseVisualStyleBackColor = false; // // buttonAdd // buttonAdd.Activated = false; buttonAdd.BackColor = SystemColors.ControlLight; buttonAdd.BorderColor = Color.Transparent; buttonAdd.BorderRadius = 2; buttonAdd.Dock = DockStyle.Fill; buttonAdd.FlatStyle = FlatStyle.Flat; buttonAdd.Image = Properties.Resources.icons8_add_64; buttonAdd.Location = new Point(416, 10); buttonAdd.Margin = new Padding(0, 0, 6, 0); buttonAdd.Name = "buttonAdd"; buttonAdd.Secondary = true; buttonAdd.Size = new Size(54, 46); buttonAdd.TabIndex = 43; buttonAdd.UseVisualStyleBackColor = false; // // buttonRename // buttonRename.Activated = false; buttonRename.BackColor = SystemColors.ControlLight; buttonRename.BorderColor = Color.Transparent; buttonRename.BorderRadius = 2; buttonRename.Dock = DockStyle.Fill; buttonRename.FlatStyle = FlatStyle.Flat; buttonRename.Image = Properties.Resources.icons8_edit_32; buttonRename.Location = new Point(60, 10); buttonRename.Margin = new Padding(0, 0, 6, 0); buttonRename.Name = "buttonRename"; buttonRename.Secondary = true; buttonRename.Size = new Size(54, 46); buttonRename.TabIndex = 45; buttonRename.UseVisualStyleBackColor = false; // // comboModes // comboModes.BorderColor = Color.White; comboModes.ButtonColor = Color.FromArgb(255, 255, 255); comboModes.Dock = DockStyle.Top; comboModes.FlatStyle = FlatStyle.Flat; comboModes.FormattingEnabled = true; comboModes.Location = new Point(120, 14); comboModes.Margin = new Padding(0, 4, 6, 4); comboModes.Name = "comboModes"; comboModes.Size = new Size(290, 40); comboModes.TabIndex = 42; // // picturePerf // picturePerf.BackgroundImage = Properties.Resources.icons8_fan_32; picturePerf.BackgroundImageLayout = ImageLayout.Zoom; picturePerf.InitialImage = null; picturePerf.Location = new Point(18, 18); picturePerf.Margin = new Padding(4, 2, 4, 2); picturePerf.Name = "picturePerf"; picturePerf.Size = new Size(32, 32); picturePerf.TabIndex = 41; picturePerf.TabStop = false; // // labelFans // labelFans.AutoSize = true; labelFans.Font = new Font("Segoe UI", 9F, FontStyle.Bold); labelFans.Location = new Point(53, 17); labelFans.Margin = new Padding(4, 0, 4, 0); labelFans.Name = "labelFans"; labelFans.Size = new Size(90, 32); labelFans.TabIndex = 40; labelFans.Text = "Profile"; // // panelApplyFans // panelApplyFans.Controls.Add(buttonCalibrate); panelApplyFans.Controls.Add(labelFansResult); panelApplyFans.Controls.Add(checkApplyFans); panelApplyFans.Controls.Add(buttonReset); panelApplyFans.Dock = DockStyle.Bottom; panelApplyFans.Location = new Point(0, 984); panelApplyFans.Margin = new Padding(4); panelApplyFans.Name = "panelApplyFans"; panelApplyFans.Size = new Size(810, 116); panelApplyFans.TabIndex = 43; // // buttonCalibrate // buttonCalibrate.Activated = false; buttonCalibrate.Anchor = AnchorStyles.Bottom | AnchorStyles.Left; buttonCalibrate.BackColor = SystemColors.ControlLight; buttonCalibrate.BorderColor = Color.Transparent; buttonCalibrate.BorderRadius = 2; buttonCalibrate.FlatStyle = FlatStyle.Flat; buttonCalibrate.Location = new Point(275, 40); buttonCalibrate.Margin = new Padding(4, 2, 4, 2); buttonCalibrate.Name = "buttonCalibrate"; buttonCalibrate.Secondary = true; buttonCalibrate.Size = new Size(141, 50); buttonCalibrate.TabIndex = 43; buttonCalibrate.Text = "Calibrate"; buttonCalibrate.UseVisualStyleBackColor = false; // // labelFansResult // labelFansResult.Anchor = AnchorStyles.Bottom | AnchorStyles.Left; labelFansResult.ForeColor = Color.Red; labelFansResult.Location = new Point(18, 2); labelFansResult.Margin = new Padding(4, 0, 4, 0); labelFansResult.Name = "labelFansResult"; labelFansResult.Size = new Size(771, 32); labelFansResult.TabIndex = 42; labelFansResult.Visible = false; // // checkApplyFans // checkApplyFans.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; checkApplyFans.AutoSize = true; checkApplyFans.BackColor = SystemColors.ControlLight; checkApplyFans.Location = new Point(454, 42); checkApplyFans.Margin = new Padding(0); checkApplyFans.Name = "checkApplyFans"; checkApplyFans.Padding = new Padding(16, 6, 16, 6); checkApplyFans.Size = new Size(341, 48); checkApplyFans.TabIndex = 19; checkApplyFans.Text = Properties.Strings.ApplyFanCurve; checkApplyFans.UseVisualStyleBackColor = false; // // buttonReset // buttonReset.Activated = false; buttonReset.Anchor = AnchorStyles.Bottom | AnchorStyles.Left; buttonReset.BackColor = SystemColors.ControlLight; buttonReset.BorderColor = Color.Transparent; buttonReset.BorderRadius = 2; buttonReset.FlatStyle = FlatStyle.Flat; buttonReset.Location = new Point(15, 40); buttonReset.Margin = new Padding(4, 2, 4, 2); buttonReset.Name = "buttonReset"; buttonReset.Secondary = true; buttonReset.Size = new Size(252, 50); buttonReset.TabIndex = 18; buttonReset.Text = Properties.Strings.FactoryDefaults; buttonReset.UseVisualStyleBackColor = false; // // comboBoost // comboBoost.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; comboBoost.BorderColor = Color.White; comboBoost.ButtonColor = Color.FromArgb(255, 255, 255); comboBoost.DropDownStyle = ComboBoxStyle.DropDownList; comboBoost.FormattingEnabled = true; comboBoost.Items.AddRange(new object[] { "Disabled", "Enabled", "Aggressive", "Efficient Enabled", "Efficient Aggressive", "Aggressive at Guaranteed", "Efficient at Guaranteed" }); comboBoost.Location = new Point(13, 12); comboBoost.Margin = new Padding(4); comboBoost.Name = "comboBoost"; comboBoost.Size = new Size(329, 40); comboBoost.TabIndex = 42; // // panelSliders // panelSliders.Controls.Add(panelAdvanced); panelSliders.Controls.Add(panelPower); panelSliders.Controls.Add(panelGPU); panelSliders.Controls.Add(panelNav); panelSliders.Dock = DockStyle.Left; panelSliders.Location = new Point(0, 0); panelSliders.Margin = new Padding(0); panelSliders.MinimumSize = new Size(530, 0); panelSliders.Name = "panelSliders"; panelSliders.Padding = new Padding(10, 0, 0, 0); panelSliders.Size = new Size(530, 1100); panelSliders.TabIndex = 13; // // panelAdvanced // panelAdvanced.AutoSize = true; panelAdvanced.AutoSizeMode = AutoSizeMode.GrowAndShrink; panelAdvanced.Controls.Add(panelAdvancedAlways); panelAdvanced.Controls.Add(panelAdvancedApply); panelAdvanced.Controls.Add(labelRisky); panelAdvanced.Controls.Add(panelUViGPU); panelAdvanced.Controls.Add(panelUV); panelAdvanced.Controls.Add(panelTitleAdvanced); panelAdvanced.Controls.Add(panelTemperature); panelAdvanced.Controls.Add(panelTitleTemp); panelAdvanced.Controls.Add(panelDownload); panelAdvanced.Dock = DockStyle.Top; panelAdvanced.Location = new Point(10, 1768); panelAdvanced.Name = "panelAdvanced"; panelAdvanced.Size = new Size(520, 992); panelAdvanced.TabIndex = 14; panelAdvanced.Visible = false; // // panelAdvancedAlways // panelAdvancedAlways.AutoSize = true; panelAdvancedAlways.Controls.Add(checkApplyUV); panelAdvancedAlways.Dock = DockStyle.Top; panelAdvancedAlways.Location = new Point(0, 931); panelAdvancedAlways.Name = "panelAdvancedAlways"; panelAdvancedAlways.Padding = new Padding(16, 0, 16, 15); panelAdvancedAlways.Size = new Size(520, 61); panelAdvancedAlways.TabIndex = 46; // // checkApplyUV // checkApplyUV.BackColor = SystemColors.ControlLight; checkApplyUV.Dock = DockStyle.Top; checkApplyUV.Enabled = false; checkApplyUV.Location = new Point(16, 0); checkApplyUV.Margin = new Padding(15, 15, 0, 0); checkApplyUV.Name = "checkApplyUV"; checkApplyUV.Padding = new Padding(16, 6, 16, 6); checkApplyUV.Size = new Size(488, 46); checkApplyUV.TabIndex = 51; checkApplyUV.Text = "Auto Apply"; checkApplyUV.TextAlign = ContentAlignment.MiddleCenter; checkApplyUV.UseVisualStyleBackColor = false; // // panelAdvancedApply // panelAdvancedApply.AutoSize = true; panelAdvancedApply.Controls.Add(buttonApplyAdvanced); panelAdvancedApply.Dock = DockStyle.Top; panelAdvancedApply.Location = new Point(0, 851); panelAdvancedApply.Name = "panelAdvancedApply"; panelAdvancedApply.Padding = new Padding(15); panelAdvancedApply.Size = new Size(520, 80); panelAdvancedApply.TabIndex = 47; // // buttonApplyAdvanced // buttonApplyAdvanced.Activated = false; buttonApplyAdvanced.BackColor = SystemColors.ControlLight; buttonApplyAdvanced.BorderColor = Color.Transparent; buttonApplyAdvanced.BorderRadius = 2; buttonApplyAdvanced.Dock = DockStyle.Top; buttonApplyAdvanced.FlatStyle = FlatStyle.Flat; buttonApplyAdvanced.Location = new Point(15, 15); buttonApplyAdvanced.Margin = new Padding(4, 2, 15, 15); buttonApplyAdvanced.Name = "buttonApplyAdvanced"; buttonApplyAdvanced.Secondary = true; buttonApplyAdvanced.Size = new Size(490, 50); buttonApplyAdvanced.TabIndex = 49; buttonApplyAdvanced.Text = "Apply"; buttonApplyAdvanced.TextImageRelation = TextImageRelation.ImageBeforeText; buttonApplyAdvanced.UseVisualStyleBackColor = false; // // labelRisky // labelRisky.BackColor = Color.IndianRed; labelRisky.Dock = DockStyle.Top; labelRisky.ForeColor = SystemColors.ControlLightLight; labelRisky.Location = new Point(0, 608); labelRisky.Margin = new Padding(0); labelRisky.Name = "labelRisky"; labelRisky.Padding = new Padding(10, 10, 10, 5); labelRisky.Size = new Size(520, 243); labelRisky.TabIndex = 46; labelRisky.Text = resources.GetString("labelRisky.Text"); // // panelUViGPU // panelUViGPU.AutoSize = true; panelUViGPU.AutoSizeMode = AutoSizeMode.GrowAndShrink; panelUViGPU.Controls.Add(labelUViGPU); panelUViGPU.Controls.Add(labelLeftUViGPU); panelUViGPU.Controls.Add(trackUViGPU); panelUViGPU.Dock = DockStyle.Top; panelUViGPU.Location = new Point(0, 484); panelUViGPU.Margin = new Padding(4); panelUViGPU.MaximumSize = new Size(0, 124); panelUViGPU.Name = "panelUViGPU"; panelUViGPU.Size = new Size(520, 124); panelUViGPU.TabIndex = 49; // // labelUViGPU // labelUViGPU.Font = new Font("Segoe UI", 9F, FontStyle.Bold); labelUViGPU.Location = new Point(347, 9); labelUViGPU.Margin = new Padding(4, 0, 4, 0); labelUViGPU.Name = "labelUViGPU"; labelUViGPU.Size = new Size(148, 32); labelUViGPU.TabIndex = 13; labelUViGPU.Text = "UV"; labelUViGPU.TextAlign = ContentAlignment.TopRight; // // labelLeftUViGPU // labelLeftUViGPU.AutoSize = true; labelLeftUViGPU.Location = new Point(10, 10); labelLeftUViGPU.Margin = new Padding(4, 0, 4, 0); labelLeftUViGPU.Name = "labelLeftUViGPU"; labelLeftUViGPU.Size = new Size(65, 32); labelLeftUViGPU.TabIndex = 12; labelLeftUViGPU.Text = "iGPU"; // // trackUViGPU // trackUViGPU.Location = new Point(6, 48); trackUViGPU.Margin = new Padding(4, 2, 4, 2); trackUViGPU.Maximum = 0; trackUViGPU.Minimum = -40; trackUViGPU.Name = "trackUViGPU"; trackUViGPU.Size = new Size(508, 90); trackUViGPU.TabIndex = 11; trackUViGPU.TickFrequency = 5; trackUViGPU.TickStyle = TickStyle.TopLeft; // // panelUV // panelUV.AutoSize = true; panelUV.AutoSizeMode = AutoSizeMode.GrowAndShrink; panelUV.Controls.Add(labelUV); panelUV.Controls.Add(labelLeftUV); panelUV.Controls.Add(trackUV); panelUV.Dock = DockStyle.Top; panelUV.Location = new Point(0, 360); panelUV.Margin = new Padding(4); panelUV.MaximumSize = new Size(0, 124); panelUV.Name = "panelUV"; panelUV.Size = new Size(520, 124); panelUV.TabIndex = 46; // // labelUV // labelUV.Font = new Font("Segoe UI", 9F, FontStyle.Bold); labelUV.Location = new Point(347, 13); labelUV.Margin = new Padding(4, 0, 4, 0); labelUV.Name = "labelUV"; labelUV.Size = new Size(148, 32); labelUV.TabIndex = 13; labelUV.Text = "UV"; labelUV.TextAlign = ContentAlignment.TopRight; // // labelLeftUV // labelLeftUV.AutoSize = true; labelLeftUV.Location = new Point(10, 10); labelLeftUV.Margin = new Padding(4, 0, 4, 0); labelLeftUV.Name = "labelLeftUV"; labelLeftUV.Size = new Size(58, 32); labelLeftUV.TabIndex = 12; labelLeftUV.Text = "CPU"; // // trackUV // trackUV.Location = new Point(6, 48); trackUV.Margin = new Padding(4, 2, 4, 2); trackUV.Maximum = 0; trackUV.Minimum = -40; trackUV.Name = "trackUV"; trackUV.Size = new Size(508, 90); trackUV.TabIndex = 11; trackUV.TickFrequency = 5; trackUV.TickStyle = TickStyle.TopLeft; // // panelTitleAdvanced // panelTitleAdvanced.Controls.Add(pictureUV); panelTitleAdvanced.Controls.Add(labelTitleUV); panelTitleAdvanced.Dock = DockStyle.Top; panelTitleAdvanced.Location = new Point(0, 294); panelTitleAdvanced.Name = "panelTitleAdvanced"; panelTitleAdvanced.Size = new Size(520, 66); panelTitleAdvanced.TabIndex = 48; // // pictureUV // pictureUV.BackgroundImage = Properties.Resources.icons8_voltage_32; pictureUV.BackgroundImageLayout = ImageLayout.Zoom; pictureUV.InitialImage = null; pictureUV.Location = new Point(10, 18); pictureUV.Margin = new Padding(4, 2, 4, 10); pictureUV.Name = "pictureUV"; pictureUV.Size = new Size(32, 32); pictureUV.TabIndex = 48; pictureUV.TabStop = false; // // labelTitleUV // labelTitleUV.AutoSize = true; labelTitleUV.Font = new Font("Segoe UI", 9F, FontStyle.Bold); labelTitleUV.Location = new Point(43, 17); labelTitleUV.Margin = new Padding(4, 0, 4, 0); labelTitleUV.Name = "labelTitleUV"; labelTitleUV.Size = new Size(166, 32); labelTitleUV.TabIndex = 47; labelTitleUV.Text = "Undervolting"; // // panelTemperature // panelTemperature.AutoSize = true; panelTemperature.AutoSizeMode = AutoSizeMode.GrowAndShrink; panelTemperature.Controls.Add(labelTemp); panelTemperature.Controls.Add(labelLeftTemp); panelTemperature.Controls.Add(trackTemp); panelTemperature.Dock = DockStyle.Top; panelTemperature.Location = new Point(0, 170); panelTemperature.Margin = new Padding(4); panelTemperature.MaximumSize = new Size(0, 124); panelTemperature.Name = "panelTemperature"; panelTemperature.Size = new Size(520, 124); panelTemperature.TabIndex = 51; // // labelTemp // labelTemp.Font = new Font("Segoe UI", 9F, FontStyle.Bold); labelTemp.Location = new Point(347, 13); labelTemp.Margin = new Padding(4, 0, 4, 0); labelTemp.Name = "labelTemp"; labelTemp.Size = new Size(148, 32); labelTemp.TabIndex = 13; labelTemp.Text = "T"; labelTemp.TextAlign = ContentAlignment.TopRight; // // labelLeftTemp // labelLeftTemp.AutoSize = true; labelLeftTemp.Location = new Point(10, 10); labelLeftTemp.Margin = new Padding(4, 0, 4, 0); labelLeftTemp.Name = "labelLeftTemp"; labelLeftTemp.Size = new Size(183, 32); labelLeftTemp.TabIndex = 12; labelLeftTemp.Text = "CPU Temp Limit"; // // trackTemp // trackTemp.Location = new Point(6, 48); trackTemp.Margin = new Padding(4, 2, 4, 2); trackTemp.Maximum = 0; trackTemp.Minimum = -40; trackTemp.Name = "trackTemp"; trackTemp.Size = new Size(508, 90); trackTemp.TabIndex = 11; trackTemp.TickFrequency = 5; trackTemp.TickStyle = TickStyle.TopLeft; // // panelTitleTemp // panelTitleTemp.Controls.Add(pictureTemp); panelTitleTemp.Controls.Add(labelTempLimit); panelTitleTemp.Dock = DockStyle.Top; panelTitleTemp.Location = new Point(0, 104); panelTitleTemp.Name = "panelTitleTemp"; panelTitleTemp.Size = new Size(520, 66); panelTitleTemp.TabIndex = 50; // // pictureTemp // pictureTemp.BackgroundImage = Properties.Resources.icons8_temperature_32; pictureTemp.BackgroundImageLayout = ImageLayout.Zoom; pictureTemp.InitialImage = null; pictureTemp.Location = new Point(10, 18); pictureTemp.Margin = new Padding(4, 2, 4, 10); pictureTemp.Name = "pictureTemp"; pictureTemp.Size = new Size(32, 32); pictureTemp.TabIndex = 48; pictureTemp.TabStop = false; // // labelTempLimit // labelTempLimit.AutoSize = true; labelTempLimit.Font = new Font("Segoe UI", 9F, FontStyle.Bold); labelTempLimit.Location = new Point(46, 17); labelTempLimit.Margin = new Padding(4, 0, 4, 0); labelTempLimit.Name = "labelTempLimit"; labelTempLimit.Size = new Size(140, 32); labelTempLimit.TabIndex = 47; labelTempLimit.Text = "Temp Limit"; // // panelDownload // panelDownload.AutoSize = true; panelDownload.Controls.Add(buttonDownload); panelDownload.Dock = DockStyle.Top; panelDownload.Location = new Point(0, 0); panelDownload.Name = "panelDownload"; panelDownload.Padding = new Padding(20); panelDownload.Size = new Size(520, 104); panelDownload.TabIndex = 52; panelDownload.Visible = false; // // buttonDownload // buttonDownload.Activated = false; buttonDownload.AutoSize = true; buttonDownload.AutoSizeMode = AutoSizeMode.GrowAndShrink; buttonDownload.BackColor = SystemColors.ControlLight; buttonDownload.BorderColor = Color.Transparent; buttonDownload.BorderRadius = 2; buttonDownload.Dock = DockStyle.Top; buttonDownload.FlatStyle = FlatStyle.Flat; buttonDownload.Location = new Point(20, 20); buttonDownload.Margin = new Padding(20); buttonDownload.Name = "buttonDownload"; buttonDownload.Padding = new Padding(10); buttonDownload.Secondary = true; buttonDownload.Size = new Size(480, 64); buttonDownload.TabIndex = 19; buttonDownload.Text = "Download Advanced Settings Plugin"; buttonDownload.UseVisualStyleBackColor = false; // // panelPower // panelPower.AutoSize = true; panelPower.AutoSizeMode = AutoSizeMode.GrowAndShrink; panelPower.Controls.Add(panelApplyPower); panelPower.Controls.Add(panelCPU); panelPower.Controls.Add(panelFast); panelPower.Controls.Add(panelSlow); panelPower.Controls.Add(panelTotal); panelPower.Controls.Add(panelTitleCPU); panelPower.Controls.Add(panelBoost); panelPower.Controls.Add(panelBoostTitle); panelPower.Controls.Add(panelPowerMode); panelPower.Controls.Add(panelPowerModeTItle); panelPower.Dock = DockStyle.Top; panelPower.Location = new Point(10, 888); panelPower.Margin = new Padding(4); panelPower.Name = "panelPower"; panelPower.Size = new Size(520, 880); panelPower.TabIndex = 43; // // panelApplyPower // panelApplyPower.AutoSize = true; panelApplyPower.Controls.Add(checkApplyPower); panelApplyPower.Dock = DockStyle.Top; panelApplyPower.Location = new Point(0, 804); panelApplyPower.Name = "panelApplyPower"; panelApplyPower.Padding = new Padding(15); panelApplyPower.Size = new Size(520, 76); panelApplyPower.TabIndex = 47; // // checkApplyPower // checkApplyPower.BackColor = SystemColors.ControlLight; checkApplyPower.Dock = DockStyle.Top; checkApplyPower.Location = new Point(15, 15); checkApplyPower.Margin = new Padding(0); checkApplyPower.Name = "checkApplyPower"; checkApplyPower.Padding = new Padding(16, 6, 16, 6); checkApplyPower.Size = new Size(490, 46); checkApplyPower.TabIndex = 45; checkApplyPower.Text = "Apply Power Limits"; checkApplyPower.UseVisualStyleBackColor = false; // // panelCPU // panelCPU.AutoSize = true; panelCPU.AutoSizeMode = AutoSizeMode.GrowAndShrink; panelCPU.Controls.Add(labelCPU); panelCPU.Controls.Add(labelLeftCPU); panelCPU.Controls.Add(trackCPU); panelCPU.Dock = DockStyle.Top; panelCPU.Location = new Point(0, 680); panelCPU.Margin = new Padding(4); panelCPU.MaximumSize = new Size(0, 124); panelCPU.Name = "panelCPU"; panelCPU.Size = new Size(520, 124); panelCPU.TabIndex = 41; // // labelCPU // labelCPU.Font = new Font("Segoe UI", 9F, FontStyle.Bold); labelCPU.Location = new Point(398, 8); labelCPU.Margin = new Padding(4, 0, 4, 0); labelCPU.Name = "labelCPU"; labelCPU.Size = new Size(116, 32); labelCPU.TabIndex = 13; labelCPU.Text = "CPU"; labelCPU.TextAlign = ContentAlignment.TopRight; // // labelLeftCPU // labelLeftCPU.AutoSize = true; labelLeftCPU.Location = new Point(10, 8); labelLeftCPU.Margin = new Padding(4, 0, 4, 0); labelLeftCPU.Name = "labelLeftCPU"; labelLeftCPU.Size = new Size(58, 32); labelLeftCPU.TabIndex = 12; labelLeftCPU.Text = "CPU"; // // trackCPU // trackCPU.Location = new Point(6, 44); trackCPU.Margin = new Padding(4, 2, 4, 2); trackCPU.Maximum = 85; trackCPU.Minimum = 5; trackCPU.Name = "trackCPU"; trackCPU.Size = new Size(508, 90); trackCPU.TabIndex = 11; trackCPU.TickFrequency = 5; trackCPU.TickStyle = TickStyle.TopLeft; trackCPU.Value = 80; // // panelFast // panelFast.AutoSize = true; panelFast.AutoSizeMode = AutoSizeMode.GrowAndShrink; panelFast.Controls.Add(labelFast); panelFast.Controls.Add(labelLeftFast); panelFast.Controls.Add(trackFast); panelFast.Dock = DockStyle.Top; panelFast.Location = new Point(0, 556); panelFast.Margin = new Padding(4); panelFast.MaximumSize = new Size(0, 124); panelFast.Name = "panelFast"; panelFast.Size = new Size(520, 124); panelFast.TabIndex = 45; // // labelFast // labelFast.Font = new Font("Segoe UI", 9F, FontStyle.Bold); labelFast.Location = new Point(396, 8); labelFast.Margin = new Padding(4, 0, 4, 0); labelFast.Name = "labelFast"; labelFast.Size = new Size(114, 32); labelFast.TabIndex = 13; labelFast.Text = "FPPT"; labelFast.TextAlign = ContentAlignment.TopRight; // // labelLeftFast // labelLeftFast.AutoSize = true; labelLeftFast.Location = new Point(10, 8); labelLeftFast.Margin = new Padding(4, 0, 4, 0); labelLeftFast.Name = "labelLeftFast"; labelLeftFast.Size = new Size(65, 32); labelLeftFast.TabIndex = 12; labelLeftFast.Text = "FPPT"; // // trackFast // trackFast.Location = new Point(6, 48); trackFast.Margin = new Padding(4, 2, 4, 2); trackFast.Maximum = 85; trackFast.Minimum = 5; trackFast.Name = "trackFast"; trackFast.Size = new Size(508, 90); trackFast.TabIndex = 11; trackFast.TickFrequency = 5; trackFast.TickStyle = TickStyle.TopLeft; trackFast.Value = 80; // // panelSlow // panelSlow.AutoSize = true; panelSlow.AutoSizeMode = AutoSizeMode.GrowAndShrink; panelSlow.Controls.Add(labelSlow); panelSlow.Controls.Add(labelLeftSlow); panelSlow.Controls.Add(trackSlow); panelSlow.Dock = DockStyle.Top; panelSlow.Location = new Point(0, 432); panelSlow.Margin = new Padding(4); panelSlow.MaximumSize = new Size(0, 124); panelSlow.Name = "panelSlow"; panelSlow.Size = new Size(520, 124); panelSlow.TabIndex = 51; // // labelSlow // labelSlow.Font = new Font("Segoe UI", 9F, FontStyle.Bold); labelSlow.Location = new Point(396, 10); labelSlow.Margin = new Padding(4, 0, 4, 0); labelSlow.Name = "labelSlow"; labelSlow.Size = new Size(116, 32); labelSlow.TabIndex = 12; labelSlow.Text = "SPPT"; labelSlow.TextAlign = ContentAlignment.TopRight; // // labelLeftSlow // labelLeftSlow.AutoSize = true; labelLeftSlow.Location = new Point(10, 10); labelLeftSlow.Margin = new Padding(4, 0, 4, 0); labelLeftSlow.Name = "labelLeftSlow"; labelLeftSlow.Size = new Size(66, 32); labelLeftSlow.TabIndex = 11; labelLeftSlow.Text = "SPPT"; // // trackSlow // trackSlow.Location = new Point(6, 48); trackSlow.Margin = new Padding(4, 2, 4, 2); trackSlow.Maximum = 180; trackSlow.Minimum = 10; trackSlow.Name = "trackSlow"; trackSlow.Size = new Size(508, 90); trackSlow.TabIndex = 10; trackSlow.TickFrequency = 5; trackSlow.TickStyle = TickStyle.TopLeft; trackSlow.Value = 125; // // panelTotal // panelTotal.AutoSize = true; panelTotal.AutoSizeMode = AutoSizeMode.GrowAndShrink; panelTotal.Controls.Add(labelTotal); panelTotal.Controls.Add(labelLeftTotal); panelTotal.Controls.Add(trackTotal); panelTotal.Dock = DockStyle.Top; panelTotal.Location = new Point(0, 308); panelTotal.Margin = new Padding(4); panelTotal.MaximumSize = new Size(0, 124); panelTotal.Name = "panelTotal"; panelTotal.Size = new Size(520, 124); panelTotal.TabIndex = 40; // // labelTotal // labelTotal.Font = new Font("Segoe UI", 9F, FontStyle.Bold); labelTotal.Location = new Point(396, 10); labelTotal.Margin = new Padding(4, 0, 4, 0); labelTotal.Name = "labelTotal"; labelTotal.Size = new Size(116, 32); labelTotal.TabIndex = 12; labelTotal.Text = "SPL"; labelTotal.TextAlign = ContentAlignment.TopRight; // // labelLeftTotal // labelLeftTotal.AutoSize = true; labelLeftTotal.Location = new Point(10, 10); labelLeftTotal.Margin = new Padding(4, 0, 4, 0); labelLeftTotal.Name = "labelLeftTotal"; labelLeftTotal.Size = new Size(51, 32); labelLeftTotal.TabIndex = 11; labelLeftTotal.Text = "SPL"; // // trackTotal // trackTotal.Location = new Point(6, 48); trackTotal.Margin = new Padding(4, 2, 4, 2); trackTotal.Maximum = 180; trackTotal.Minimum = 10; trackTotal.Name = "trackTotal"; trackTotal.Size = new Size(508, 90); trackTotal.TabIndex = 10; trackTotal.TickFrequency = 5; trackTotal.TickStyle = TickStyle.TopLeft; trackTotal.Value = 125; // // panelTitleCPU // panelTitleCPU.AutoSize = true; panelTitleCPU.AutoSizeMode = AutoSizeMode.GrowAndShrink; panelTitleCPU.Controls.Add(pictureBoxCPU); panelTitleCPU.Controls.Add(labelPowerLimits); panelTitleCPU.Dock = DockStyle.Top; panelTitleCPU.Location = new Point(0, 248); panelTitleCPU.Margin = new Padding(4); panelTitleCPU.Name = "panelTitleCPU"; panelTitleCPU.Size = new Size(520, 60); panelTitleCPU.TabIndex = 42; // // pictureBoxCPU // pictureBoxCPU.BackgroundImage = Properties.Resources.icons8_processor_32; pictureBoxCPU.BackgroundImageLayout = ImageLayout.Zoom; pictureBoxCPU.InitialImage = null; pictureBoxCPU.Location = new Point(10, 18); pictureBoxCPU.Margin = new Padding(4, 2, 4, 10); pictureBoxCPU.Name = "pictureBoxCPU"; pictureBoxCPU.Size = new Size(32, 32); pictureBoxCPU.TabIndex = 40; pictureBoxCPU.TabStop = false; // // labelPowerLimits // labelPowerLimits.AutoSize = true; labelPowerLimits.Font = new Font("Segoe UI", 9F, FontStyle.Bold); labelPowerLimits.Location = new Point(46, 16); labelPowerLimits.Margin = new Padding(4, 0, 4, 0); labelPowerLimits.Name = "labelPowerLimits"; labelPowerLimits.Size = new Size(160, 32); labelPowerLimits.TabIndex = 39; labelPowerLimits.Text = "Power Limits"; // // panelBoost // panelBoost.Controls.Add(comboBoost); panelBoost.Dock = DockStyle.Top; panelBoost.Location = new Point(0, 184); panelBoost.Margin = new Padding(4); panelBoost.Name = "panelBoost"; panelBoost.Size = new Size(520, 64); panelBoost.TabIndex = 13; // // panelBoostTitle // panelBoostTitle.AutoSize = true; panelBoostTitle.AutoSizeMode = AutoSizeMode.GrowAndShrink; panelBoostTitle.Controls.Add(pictureBoost); panelBoostTitle.Controls.Add(labelBoost); panelBoostTitle.Dock = DockStyle.Top; panelBoostTitle.Location = new Point(0, 124); panelBoostTitle.Margin = new Padding(4); panelBoostTitle.Name = "panelBoostTitle"; panelBoostTitle.Size = new Size(520, 60); panelBoostTitle.TabIndex = 48; // // pictureBoost // pictureBoost.BackgroundImage = Properties.Resources.icons8_rocket_32; pictureBoost.BackgroundImageLayout = ImageLayout.Zoom; pictureBoost.InitialImage = null; pictureBoost.Location = new Point(10, 18); pictureBoost.Margin = new Padding(4, 2, 4, 10); pictureBoost.Name = "pictureBoost"; pictureBoost.Size = new Size(32, 32); pictureBoost.TabIndex = 40; pictureBoost.TabStop = false; // // labelBoost // labelBoost.AutoSize = true; labelBoost.Font = new Font("Segoe UI", 9F, FontStyle.Bold); labelBoost.Location = new Point(46, 18); labelBoost.Margin = new Padding(4, 0, 4, 0); labelBoost.Name = "labelBoost"; labelBoost.Size = new Size(133, 32); labelBoost.TabIndex = 39; labelBoost.Text = "CPU Boost"; // // panelPowerMode // panelPowerMode.Controls.Add(comboPowerMode); panelPowerMode.Dock = DockStyle.Top; panelPowerMode.Location = new Point(0, 60); panelPowerMode.Margin = new Padding(4); panelPowerMode.Name = "panelPowerMode"; panelPowerMode.Size = new Size(520, 64); panelPowerMode.TabIndex = 49; // // comboPowerMode // comboPowerMode.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; comboPowerMode.BorderColor = Color.White; comboPowerMode.ButtonColor = Color.FromArgb(255, 255, 255); comboPowerMode.DropDownStyle = ComboBoxStyle.DropDownList; comboPowerMode.FormattingEnabled = true; comboPowerMode.Items.AddRange(new object[] { "Disabled", "Enabled", "Aggressive", "Efficient Enabled", "Efficient Aggressive", "Aggressive at Guaranteed", "Efficient at Guaranteed" }); comboPowerMode.Location = new Point(13, 12); comboPowerMode.Margin = new Padding(4); comboPowerMode.Name = "comboPowerMode"; comboPowerMode.Size = new Size(329, 40); comboPowerMode.TabIndex = 42; // // panelPowerModeTItle // panelPowerModeTItle.AutoSize = true; panelPowerModeTItle.AutoSizeMode = AutoSizeMode.GrowAndShrink; panelPowerModeTItle.Controls.Add(picturePowerMode); panelPowerModeTItle.Controls.Add(labelPowerModeTitle); panelPowerModeTItle.Dock = DockStyle.Top; panelPowerModeTItle.Location = new Point(0, 0); panelPowerModeTItle.Margin = new Padding(4); panelPowerModeTItle.Name = "panelPowerModeTItle"; panelPowerModeTItle.Size = new Size(520, 60); panelPowerModeTItle.TabIndex = 50; // // picturePowerMode // picturePowerMode.BackgroundImage = Properties.Resources.icons8_gauge_32; picturePowerMode.BackgroundImageLayout = ImageLayout.Zoom; picturePowerMode.InitialImage = null; picturePowerMode.Location = new Point(10, 18); picturePowerMode.Margin = new Padding(4, 2, 4, 10); picturePowerMode.Name = "picturePowerMode"; picturePowerMode.Size = new Size(32, 32); picturePowerMode.TabIndex = 40; picturePowerMode.TabStop = false; // // labelPowerModeTitle // labelPowerModeTitle.AutoSize = true; labelPowerModeTitle.Font = new Font("Segoe UI", 9F, FontStyle.Bold); labelPowerModeTitle.Location = new Point(46, 18); labelPowerModeTitle.Margin = new Padding(4, 0, 4, 0); labelPowerModeTitle.Name = "labelPowerModeTitle"; labelPowerModeTitle.Size = new Size(271, 32); labelPowerModeTitle.TabIndex = 39; labelPowerModeTitle.Text = "Windows Power Mode"; // // panelGPU // panelGPU.AutoSize = true; panelGPU.Controls.Add(panelGPUTemp); panelGPU.Controls.Add(panelGPUBoost); panelGPU.Controls.Add(panelGPUPower); panelGPU.Controls.Add(panelGPUMemory); panelGPU.Controls.Add(panelGPUCore); panelGPU.Controls.Add(panelGPUClockLimit); panelGPU.Controls.Add(panelTitleGPU); panelGPU.Dock = DockStyle.Top; panelGPU.Location = new Point(10, 66); panelGPU.Margin = new Padding(4); panelGPU.Name = "panelGPU"; panelGPU.Padding = new Padding(0, 0, 0, 18); panelGPU.Size = new Size(520, 822); panelGPU.TabIndex = 44; panelGPU.Visible = false; // // panelGPUTemp // panelGPUTemp.AutoSize = true; panelGPUTemp.AutoSizeMode = AutoSizeMode.GrowAndShrink; panelGPUTemp.Controls.Add(labelGPUTemp); panelGPUTemp.Controls.Add(labelGPUTempTitle); panelGPUTemp.Controls.Add(trackGPUTemp); panelGPUTemp.Dock = DockStyle.Top; panelGPUTemp.Location = new Point(0, 680); panelGPUTemp.Margin = new Padding(4); panelGPUTemp.MaximumSize = new Size(0, 124); panelGPUTemp.Name = "panelGPUTemp"; panelGPUTemp.Size = new Size(520, 124); panelGPUTemp.TabIndex = 47; // // labelGPUTemp // labelGPUTemp.Font = new Font("Segoe UI", 9F, FontStyle.Bold); labelGPUTemp.Location = new Point(378, 14); labelGPUTemp.Margin = new Padding(4, 0, 4, 0); labelGPUTemp.Name = "labelGPUTemp"; labelGPUTemp.Size = new Size(124, 32); labelGPUTemp.TabIndex = 44; labelGPUTemp.Text = "87C"; labelGPUTemp.TextAlign = ContentAlignment.TopRight; // // labelGPUTempTitle // labelGPUTempTitle.AutoSize = true; labelGPUTempTitle.Location = new Point(10, 14); labelGPUTempTitle.Margin = new Padding(4, 0, 4, 0); labelGPUTempTitle.Name = "labelGPUTempTitle"; labelGPUTempTitle.Size = new Size(173, 32); labelGPUTempTitle.TabIndex = 43; labelGPUTempTitle.Text = "Thermal Target"; // // trackGPUTemp // trackGPUTemp.Location = new Point(6, 56); trackGPUTemp.Margin = new Padding(4, 2, 4, 2); trackGPUTemp.Maximum = 87; trackGPUTemp.Minimum = 75; trackGPUTemp.Name = "trackGPUTemp"; trackGPUTemp.Size = new Size(496, 90); trackGPUTemp.TabIndex = 42; trackGPUTemp.TickFrequency = 5; trackGPUTemp.TickStyle = TickStyle.TopLeft; trackGPUTemp.Value = 87; // // panelGPUBoost // panelGPUBoost.AutoSize = true; panelGPUBoost.AutoSizeMode = AutoSizeMode.GrowAndShrink; panelGPUBoost.Controls.Add(labelGPUBoost); panelGPUBoost.Controls.Add(labelGPUBoostTitle); panelGPUBoost.Controls.Add(trackGPUBoost); panelGPUBoost.Dock = DockStyle.Top; panelGPUBoost.Location = new Point(0, 556); panelGPUBoost.Margin = new Padding(4); panelGPUBoost.MaximumSize = new Size(0, 124); panelGPUBoost.Name = "panelGPUBoost"; panelGPUBoost.Size = new Size(520, 124); panelGPUBoost.TabIndex = 46; // // labelGPUBoost // labelGPUBoost.Font = new Font("Segoe UI", 9F, FontStyle.Bold); labelGPUBoost.Location = new Point(374, 14); labelGPUBoost.Margin = new Padding(4, 0, 4, 0); labelGPUBoost.Name = "labelGPUBoost"; labelGPUBoost.Size = new Size(124, 32); labelGPUBoost.TabIndex = 44; labelGPUBoost.Text = "25W"; labelGPUBoost.TextAlign = ContentAlignment.TopRight; // // labelGPUBoostTitle // labelGPUBoostTitle.AutoSize = true; labelGPUBoostTitle.Location = new Point(10, 14); labelGPUBoostTitle.Margin = new Padding(4, 0, 4, 0); labelGPUBoostTitle.Name = "labelGPUBoostTitle"; labelGPUBoostTitle.Size = new Size(174, 32); labelGPUBoostTitle.TabIndex = 43; labelGPUBoostTitle.Text = "Dynamic Boost"; // // trackGPUBoost // trackGPUBoost.Location = new Point(6, 48); trackGPUBoost.Margin = new Padding(4, 2, 4, 2); trackGPUBoost.Maximum = 25; trackGPUBoost.Minimum = 5; trackGPUBoost.Name = "trackGPUBoost"; trackGPUBoost.Size = new Size(496, 90); trackGPUBoost.TabIndex = 42; trackGPUBoost.TickFrequency = 5; trackGPUBoost.TickStyle = TickStyle.TopLeft; trackGPUBoost.Value = 25; // // panelGPUPower // panelGPUPower.AutoSize = true; panelGPUPower.AutoSizeMode = AutoSizeMode.GrowAndShrink; panelGPUPower.Controls.Add(labelGPUPower); panelGPUPower.Controls.Add(labelGPUPowerTitle); panelGPUPower.Controls.Add(trackGPUPower); panelGPUPower.Dock = DockStyle.Top; panelGPUPower.Location = new Point(0, 432); panelGPUPower.Margin = new Padding(4); panelGPUPower.MaximumSize = new Size(0, 124); panelGPUPower.Name = "panelGPUPower"; panelGPUPower.Size = new Size(520, 124); panelGPUPower.TabIndex = 49; // // labelGPUPower // labelGPUPower.Font = new Font("Segoe UI", 9F, FontStyle.Bold); labelGPUPower.Location = new Point(374, 14); labelGPUPower.Margin = new Padding(4, 0, 4, 0); labelGPUPower.Name = "labelGPUPower"; labelGPUPower.Size = new Size(124, 32); labelGPUPower.TabIndex = 44; labelGPUPower.Text = "105W"; labelGPUPower.TextAlign = ContentAlignment.TopRight; // // labelGPUPowerTitle // labelGPUPowerTitle.AutoSize = true; labelGPUPowerTitle.Location = new Point(10, 14); labelGPUPowerTitle.Margin = new Padding(4, 0, 4, 0); labelGPUPowerTitle.Name = "labelGPUPowerTitle"; labelGPUPowerTitle.Size = new Size(130, 32); labelGPUPowerTitle.TabIndex = 43; labelGPUPowerTitle.Text = "GPU Power"; // // trackGPUPower // trackGPUPower.Location = new Point(6, 48); trackGPUPower.Margin = new Padding(4, 2, 4, 2); trackGPUPower.Maximum = 25; trackGPUPower.Minimum = 5; trackGPUPower.Name = "trackGPUPower"; trackGPUPower.Size = new Size(496, 90); trackGPUPower.TabIndex = 42; trackGPUPower.TickFrequency = 5; trackGPUPower.TickStyle = TickStyle.TopLeft; trackGPUPower.Value = 25; // // panelGPUMemory // panelGPUMemory.AutoSize = true; panelGPUMemory.AutoSizeMode = AutoSizeMode.GrowAndShrink; panelGPUMemory.Controls.Add(labelGPUMemory); panelGPUMemory.Controls.Add(labelGPUMemoryTitle); panelGPUMemory.Controls.Add(trackGPUMemory); panelGPUMemory.Dock = DockStyle.Top; panelGPUMemory.Location = new Point(0, 308); panelGPUMemory.Margin = new Padding(4); panelGPUMemory.MaximumSize = new Size(0, 124); panelGPUMemory.Name = "panelGPUMemory"; panelGPUMemory.Size = new Size(520, 124); panelGPUMemory.TabIndex = 45; // // labelGPUMemory // labelGPUMemory.Font = new Font("Segoe UI", 9F, FontStyle.Bold); labelGPUMemory.Location = new Point(344, 14); labelGPUMemory.Margin = new Padding(4, 0, 4, 0); labelGPUMemory.Name = "labelGPUMemory"; labelGPUMemory.Size = new Size(160, 32); labelGPUMemory.TabIndex = 44; labelGPUMemory.Text = "2000 MHz"; labelGPUMemory.TextAlign = ContentAlignment.TopRight; // // labelGPUMemoryTitle // labelGPUMemoryTitle.AutoSize = true; labelGPUMemoryTitle.Location = new Point(10, 14); labelGPUMemoryTitle.Margin = new Padding(4, 0, 4, 0); labelGPUMemoryTitle.Name = "labelGPUMemoryTitle"; labelGPUMemoryTitle.Size = new Size(241, 32); labelGPUMemoryTitle.TabIndex = 43; labelGPUMemoryTitle.Text = "Memory Clock Offset"; // // trackGPUMemory // trackGPUMemory.LargeChange = 100; trackGPUMemory.Location = new Point(6, 48); trackGPUMemory.Margin = new Padding(4, 2, 4, 2); trackGPUMemory.Maximum = 300; trackGPUMemory.Name = "trackGPUMemory"; trackGPUMemory.Size = new Size(496, 90); trackGPUMemory.SmallChange = 10; trackGPUMemory.TabIndex = 42; trackGPUMemory.TickFrequency = 50; trackGPUMemory.TickStyle = TickStyle.TopLeft; // // panelGPUCore // panelGPUCore.AutoSize = true; panelGPUCore.AutoSizeMode = AutoSizeMode.GrowAndShrink; panelGPUCore.Controls.Add(labelGPUCore); panelGPUCore.Controls.Add(trackGPUCore); panelGPUCore.Controls.Add(labelGPUCoreTitle); panelGPUCore.Dock = DockStyle.Top; panelGPUCore.Location = new Point(0, 184); panelGPUCore.Margin = new Padding(4); panelGPUCore.MaximumSize = new Size(0, 124); panelGPUCore.Name = "panelGPUCore"; panelGPUCore.Size = new Size(520, 124); panelGPUCore.TabIndex = 44; // // labelGPUCore // labelGPUCore.Font = new Font("Segoe UI", 9F, FontStyle.Bold); labelGPUCore.Location = new Point(326, 16); labelGPUCore.Margin = new Padding(4, 0, 4, 0); labelGPUCore.Name = "labelGPUCore"; labelGPUCore.Size = new Size(176, 32); labelGPUCore.TabIndex = 29; labelGPUCore.Text = "1500 MHz"; labelGPUCore.TextAlign = ContentAlignment.TopRight; // // trackGPUCore // trackGPUCore.LargeChange = 100; trackGPUCore.Location = new Point(6, 48); trackGPUCore.Margin = new Padding(4, 2, 4, 2); trackGPUCore.Maximum = 300; trackGPUCore.Name = "trackGPUCore"; trackGPUCore.RightToLeft = RightToLeft.No; trackGPUCore.Size = new Size(496, 90); trackGPUCore.SmallChange = 10; trackGPUCore.TabIndex = 18; trackGPUCore.TickFrequency = 50; trackGPUCore.TickStyle = TickStyle.TopLeft; // // labelGPUCoreTitle // labelGPUCoreTitle.AutoSize = true; labelGPUCoreTitle.Location = new Point(10, 16); labelGPUCoreTitle.Margin = new Padding(4, 0, 4, 0); labelGPUCoreTitle.Name = "labelGPUCoreTitle"; labelGPUCoreTitle.Size = new Size(201, 32); labelGPUCoreTitle.TabIndex = 17; labelGPUCoreTitle.Text = "Core Clock Offset"; // // panelGPUClockLimit // panelGPUClockLimit.AutoSize = true; panelGPUClockLimit.AutoSizeMode = AutoSizeMode.GrowAndShrink; panelGPUClockLimit.Controls.Add(labelGPUClockLimit); panelGPUClockLimit.Controls.Add(trackGPUClockLimit); panelGPUClockLimit.Controls.Add(labelGPUClockLimitTitle); panelGPUClockLimit.Dock = DockStyle.Top; panelGPUClockLimit.Location = new Point(0, 60); panelGPUClockLimit.Margin = new Padding(4); panelGPUClockLimit.MaximumSize = new Size(0, 124); panelGPUClockLimit.Name = "panelGPUClockLimit"; panelGPUClockLimit.Size = new Size(520, 124); panelGPUClockLimit.TabIndex = 48; // // labelGPUClockLimit // labelGPUClockLimit.Font = new Font("Segoe UI", 9F, FontStyle.Bold); labelGPUClockLimit.Location = new Point(326, 16); labelGPUClockLimit.Margin = new Padding(4, 0, 4, 0); labelGPUClockLimit.Name = "labelGPUClockLimit"; labelGPUClockLimit.Size = new Size(176, 32); labelGPUClockLimit.TabIndex = 29; labelGPUClockLimit.Text = "1500 MHz"; labelGPUClockLimit.TextAlign = ContentAlignment.TopRight; // // trackGPUClockLimit // trackGPUClockLimit.LargeChange = 100; trackGPUClockLimit.Location = new Point(6, 48); trackGPUClockLimit.Margin = new Padding(4, 2, 4, 2); trackGPUClockLimit.Maximum = 3000; trackGPUClockLimit.Name = "trackGPUClockLimit"; trackGPUClockLimit.RightToLeft = RightToLeft.No; trackGPUClockLimit.Size = new Size(496, 90); trackGPUClockLimit.SmallChange = 10; trackGPUClockLimit.TabIndex = 18; trackGPUClockLimit.TickFrequency = 50; trackGPUClockLimit.TickStyle = TickStyle.TopLeft; // // labelGPUClockLimitTitle // labelGPUClockLimitTitle.AutoSize = true; labelGPUClockLimitTitle.Location = new Point(10, 16); labelGPUClockLimitTitle.Margin = new Padding(4, 0, 4, 0); labelGPUClockLimitTitle.Name = "labelGPUClockLimitTitle"; labelGPUClockLimitTitle.Size = new Size(188, 32); labelGPUClockLimitTitle.TabIndex = 17; labelGPUClockLimitTitle.Text = "Core Clock Limit"; // // panelTitleGPU // panelTitleGPU.AutoSize = true; panelTitleGPU.AutoSizeMode = AutoSizeMode.GrowAndShrink; panelTitleGPU.Controls.Add(pictureGPU); panelTitleGPU.Controls.Add(labelGPU); panelTitleGPU.Dock = DockStyle.Top; panelTitleGPU.Location = new Point(0, 0); panelTitleGPU.Margin = new Padding(4); panelTitleGPU.Name = "panelTitleGPU"; panelTitleGPU.Size = new Size(520, 60); panelTitleGPU.TabIndex = 43; // // pictureGPU // pictureGPU.BackgroundImage = Properties.Resources.icons8_video_card_32; pictureGPU.BackgroundImageLayout = ImageLayout.Zoom; pictureGPU.ErrorImage = null; pictureGPU.InitialImage = null; pictureGPU.Location = new Point(10, 18); pictureGPU.Margin = new Padding(4, 2, 4, 10); pictureGPU.Name = "pictureGPU"; pictureGPU.Size = new Size(32, 32); pictureGPU.TabIndex = 41; pictureGPU.TabStop = false; // // labelGPU // labelGPU.AutoSize = true; labelGPU.Font = new Font("Segoe UI", 9F, FontStyle.Bold); labelGPU.Location = new Point(45, 17); labelGPU.Margin = new Padding(4, 0, 4, 0); labelGPU.Name = "labelGPU"; labelGPU.Size = new Size(162, 32); labelGPU.TabIndex = 40; labelGPU.Text = "GPU Settings"; // // panelNav // panelNav.AutoSize = true; panelNav.AutoSizeMode = AutoSizeMode.GrowAndShrink; panelNav.Controls.Add(tableNav); panelNav.Dock = DockStyle.Top; panelNav.Location = new Point(10, 0); panelNav.Margin = new Padding(4); panelNav.Name = "panelNav"; panelNav.Size = new Size(520, 66); panelNav.TabIndex = 45; // // tableNav // tableNav.ColumnCount = 3; tableNav.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 33.3333321F)); tableNav.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 33.3333321F)); tableNav.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 33.3333321F)); tableNav.Controls.Add(buttonAdvanced, 0, 0); tableNav.Controls.Add(buttonGPU, 0, 0); tableNav.Controls.Add(buttonCPU, 0, 0); tableNav.Dock = DockStyle.Top; tableNav.Location = new Point(0, 0); tableNav.MinimumSize = new Size(0, 62); tableNav.Name = "tableNav"; tableNav.Padding = new Padding(0, 3, 0, 1); tableNav.RowCount = 1; tableNav.RowStyles.Add(new RowStyle()); tableNav.Size = new Size(520, 66); tableNav.TabIndex = 42; // // buttonAdvanced // buttonAdvanced.Activated = false; buttonAdvanced.BackColor = SystemColors.ControlLight; buttonAdvanced.BorderColor = Color.Transparent; buttonAdvanced.BorderRadius = 2; buttonAdvanced.Dock = DockStyle.Fill; buttonAdvanced.FlatStyle = FlatStyle.Flat; buttonAdvanced.Location = new Point(350, 5); buttonAdvanced.Margin = new Padding(4, 2, 4, 2); buttonAdvanced.Name = "buttonAdvanced"; buttonAdvanced.Secondary = true; buttonAdvanced.Size = new Size(166, 58); buttonAdvanced.TabIndex = 51; buttonAdvanced.Text = "Advanced"; buttonAdvanced.TextImageRelation = TextImageRelation.ImageBeforeText; buttonAdvanced.UseVisualStyleBackColor = false; // // buttonGPU // buttonGPU.Activated = false; buttonGPU.BackColor = SystemColors.ControlLight; buttonGPU.BorderColor = Color.Transparent; buttonGPU.BorderRadius = 2; buttonGPU.Dock = DockStyle.Fill; buttonGPU.FlatStyle = FlatStyle.Flat; buttonGPU.Location = new Point(177, 5); buttonGPU.Margin = new Padding(4, 2, 4, 2); buttonGPU.Name = "buttonGPU"; buttonGPU.Secondary = true; buttonGPU.Size = new Size(165, 58); buttonGPU.TabIndex = 52; buttonGPU.Text = "GPU"; buttonGPU.TextImageRelation = TextImageRelation.ImageBeforeText; buttonGPU.UseVisualStyleBackColor = false; // // buttonCPU // buttonCPU.Activated = false; buttonCPU.BackColor = SystemColors.ControlLight; buttonCPU.BorderColor = Color.Transparent; buttonCPU.BorderRadius = 2; buttonCPU.Dock = DockStyle.Fill; buttonCPU.FlatStyle = FlatStyle.Flat; buttonCPU.Location = new Point(4, 5); buttonCPU.Margin = new Padding(4, 2, 4, 2); buttonCPU.Name = "buttonCPU"; buttonCPU.Secondary = true; buttonCPU.Size = new Size(165, 58); buttonCPU.TabIndex = 50; buttonCPU.Text = "CPU"; buttonCPU.TextImageRelation = TextImageRelation.ImageBeforeText; buttonCPU.UseVisualStyleBackColor = false; // // Fans // AutoScaleDimensions = new SizeF(192F, 192F); AutoScaleMode = AutoScaleMode.Dpi; AutoSize = true; AutoSizeMode = AutoSizeMode.GrowAndShrink; ClientSize = new Size(1350, 1100); Controls.Add(panelFans); Controls.Add(panelSliders); Margin = new Padding(4, 2, 4, 2); MinimizeBox = false; MinimumSize = new Size(26, 1100); Name = "Fans"; ShowIcon = false; ShowInTaskbar = false; StartPosition = FormStartPosition.Manual; Text = "Fans and Power"; panelFans.ResumeLayout(false); panelFans.PerformLayout(); tableFanCharts.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)chartGPU).EndInit(); ((System.ComponentModel.ISupportInitialize)chartCPU).EndInit(); ((System.ComponentModel.ISupportInitialize)chartXGM).EndInit(); ((System.ComponentModel.ISupportInitialize)chartMid).EndInit(); panelTitleFans.ResumeLayout(false); panelTitleFans.PerformLayout(); tableLayoutModes.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)picturePerf).EndInit(); panelApplyFans.ResumeLayout(false); panelApplyFans.PerformLayout(); panelSliders.ResumeLayout(false); panelSliders.PerformLayout(); panelAdvanced.ResumeLayout(false); panelAdvanced.PerformLayout(); panelAdvancedAlways.ResumeLayout(false); panelAdvancedApply.ResumeLayout(false); panelUViGPU.ResumeLayout(false); panelUViGPU.PerformLayout(); ((System.ComponentModel.ISupportInitialize)trackUViGPU).EndInit(); panelUV.ResumeLayout(false); panelUV.PerformLayout(); ((System.ComponentModel.ISupportInitialize)trackUV).EndInit(); panelTitleAdvanced.ResumeLayout(false); panelTitleAdvanced.PerformLayout(); ((System.ComponentModel.ISupportInitialize)pictureUV).EndInit(); panelTemperature.ResumeLayout(false); panelTemperature.PerformLayout(); ((System.ComponentModel.ISupportInitialize)trackTemp).EndInit(); panelTitleTemp.ResumeLayout(false); panelTitleTemp.PerformLayout(); ((System.ComponentModel.ISupportInitialize)pictureTemp).EndInit(); panelDownload.ResumeLayout(false); panelDownload.PerformLayout(); panelPower.ResumeLayout(false); panelPower.PerformLayout(); panelApplyPower.ResumeLayout(false); panelCPU.ResumeLayout(false); panelCPU.PerformLayout(); ((System.ComponentModel.ISupportInitialize)trackCPU).EndInit(); panelFast.ResumeLayout(false); panelFast.PerformLayout(); ((System.ComponentModel.ISupportInitialize)trackFast).EndInit(); panelSlow.ResumeLayout(false); panelSlow.PerformLayout(); ((System.ComponentModel.ISupportInitialize)trackSlow).EndInit(); panelTotal.ResumeLayout(false); panelTotal.PerformLayout(); ((System.ComponentModel.ISupportInitialize)trackTotal).EndInit(); panelTitleCPU.ResumeLayout(false); panelTitleCPU.PerformLayout(); ((System.ComponentModel.ISupportInitialize)pictureBoxCPU).EndInit(); panelBoost.ResumeLayout(false); panelBoostTitle.ResumeLayout(false); panelBoostTitle.PerformLayout(); ((System.ComponentModel.ISupportInitialize)pictureBoost).EndInit(); panelPowerMode.ResumeLayout(false); panelPowerModeTItle.ResumeLayout(false); panelPowerModeTItle.PerformLayout(); ((System.ComponentModel.ISupportInitialize)picturePowerMode).EndInit(); panelGPU.ResumeLayout(false); panelGPU.PerformLayout(); panelGPUTemp.ResumeLayout(false); panelGPUTemp.PerformLayout(); ((System.ComponentModel.ISupportInitialize)trackGPUTemp).EndInit(); panelGPUBoost.ResumeLayout(false); panelGPUBoost.PerformLayout(); ((System.ComponentModel.ISupportInitialize)trackGPUBoost).EndInit(); panelGPUPower.ResumeLayout(false); panelGPUPower.PerformLayout(); ((System.ComponentModel.ISupportInitialize)trackGPUPower).EndInit(); panelGPUMemory.ResumeLayout(false); panelGPUMemory.PerformLayout(); ((System.ComponentModel.ISupportInitialize)trackGPUMemory).EndInit(); panelGPUCore.ResumeLayout(false); panelGPUCore.PerformLayout(); ((System.ComponentModel.ISupportInitialize)trackGPUCore).EndInit(); panelGPUClockLimit.ResumeLayout(false); panelGPUClockLimit.PerformLayout(); ((System.ComponentModel.ISupportInitialize)trackGPUClockLimit).EndInit(); panelTitleGPU.ResumeLayout(false); panelTitleGPU.PerformLayout(); ((System.ComponentModel.ISupportInitialize)pictureGPU).EndInit(); panelNav.ResumeLayout(false); tableNav.ResumeLayout(false); ResumeLayout(false); PerformLayout(); } #endregion private Panel panelFans; private Panel panelSliders; private TableLayoutPanel tableFanCharts; private Chart chartGPU; private Chart chartCPU; private Chart chartMid; private Chart chartXGM; private Label labelTip; private Panel panelPower; private Panel panelCPU; private Label labelCPU; private Label labelLeftCPU; private TrackBar trackCPU; private Panel panelTotal; private Label labelTotal; private Label labelLeftTotal; private TrackBar trackTotal; private Panel panelTitleCPU; private PictureBox pictureBoxCPU; private Label labelPowerLimits; private Panel panelGPU; private Panel panelGPUMemory; private Label labelGPUMemory; private Label labelGPUMemoryTitle; private TrackBar trackGPUMemory; private Panel panelGPUCore; private Label labelGPUCore; private TrackBar trackGPUCore; private Label labelGPUCoreTitle; private Panel panelTitleGPU; private PictureBox pictureGPU; private Label labelGPU; private RCheckBox checkApplyPower; private Panel panelGPUBoost; private Label labelGPUBoost; private Label labelGPUBoostTitle; private TrackBar trackGPUBoost; private Panel panelGPUTemp; private Label labelGPUTemp; private Label labelGPUTempTitle; private TrackBar trackGPUTemp; private Panel panelTitleFans; private Panel panelApplyFans; private Label labelFansResult; private RCheckBox checkApplyFans; private RButton buttonReset; private Label labelBoost; private RComboBox comboBoost; private PictureBox picturePerf; private Label labelFans; private Panel panelFast; private Label labelFast; private Label labelLeftFast; private TrackBar trackFast; private Panel panelBoost; private RComboBox comboModes; private RButton buttonAdd; private RButton buttonRemove; private RButton buttonRename; private Panel panelUV; private Label labelUV; private Label labelLeftUV; private TrackBar trackUV; private PictureBox pictureUV; private Label labelTitleUV; private RButton buttonApplyAdvanced; private Panel panelApplyPower; private Panel panelAdvanced; private Panel panelAdvancedApply; private Panel panelTitleAdvanced; private Panel panelUViGPU; private Label labelUViGPU; private Label labelLeftUViGPU; private TrackBar trackUViGPU; private Panel panelNav; private TableLayoutPanel tableNav; private RButton buttonCPU; private RButton buttonGPU; private RButton buttonAdvanced; private Panel panelBoostTitle; private PictureBox pictureBoost; private Label labelBoostTitle; private Label labelRisky; private Panel panelTitleTemp; private PictureBox pictureTemp; private Label labelTempLimit; private Panel panelTemperature; private Label labelTemp; private Label labelLeftTemp; private TrackBar trackTemp; private Panel panelAdvancedAlways; private RCheckBox checkApplyUV; private Panel panelPowerMode; private RComboBox comboPowerMode; private Panel panelPowerModeTItle; private PictureBox picturePowerMode; private Label labelPowerModeTitle; private Panel panelGPUClockLimit; private Label labelGPUClockLimit; private TrackBar trackGPUClockLimit; private Label labelGPUClockLimitTitle; private RButton buttonCalibrate; private Panel panelSlow; private Label labelSlow; private Label labelLeftSlow; private TrackBar trackSlow; private Panel panelDownload; private RButton buttonDownload; private Panel panelGPUPower; private Label labelGPUPower; private Label labelGPUPowerTitle; private TrackBar trackGPUPower; private TableLayoutPanel tableLayoutModes; private RCheckBox checkFanClamp; } } ================================================ FILE: app/Fans.cs ================================================ using GHelper.Fan; using GHelper.Gpu.NVidia; using GHelper.Mode; using GHelper.UI; using GHelper.USB; using Ryzen; using System.Diagnostics; using System.Management; using System.Windows.Forms.DataVisualization.Charting; namespace GHelper { public partial class Fans : RForm { int curIndex = -1; DataPoint? curPoint = null; Series seriesCPU; Series seriesGPU; Series seriesMid; Series seriesXGM; static bool gpuVisible = true; static bool fanRpm = true; const int tempMin = 20; const int tempMax = 110; const int fansMax = 100; NvidiaGpuControl? nvControl = null; ModeControl modeControl = Program.modeControl; FanSensorControl fanSensorControl; static int gpuPowerBase = 0; static bool isGPUPower => gpuPowerBase > 0; static bool clampFanDots = AppConfig.IsClampFanDots(); public Fans() { InitializeComponent(); fanSensorControl = new FanSensorControl(this); //float dpi = ControlHelper.GetDpiScale(this).Value; //comboModes.Size = new Size(comboModes.Width, (int)dpi * 18); comboModes.ClientSize = new Size(comboModes.Width, comboModes.Height - 4); Text = Properties.Strings.FansAndPower; labelPowerLimits.Text = Properties.Strings.PowerLimits; checkApplyPower.Text = Properties.Strings.ApplyPowerLimits; labelFans.Text = "BIOS " + Properties.Strings.FanCurves; labelBoost.Text = Properties.Strings.CPUBoost; buttonReset.Text = Properties.Strings.FactoryDefaults; checkApplyFans.Text = Properties.Strings.ApplyFanCurve; labelGPU.Text = Properties.Strings.GPUSettings; labelGPUCoreTitle.Text = Properties.Strings.GPUCoreClockOffset; labelGPUMemoryTitle.Text = Properties.Strings.GPUMemoryClockOffset; labelGPUBoostTitle.Text = Properties.Strings.GPUBoost; labelGPUTempTitle.Text = Properties.Strings.GPUTempTarget; labelGPUPowerTitle.Text = Properties.Strings.GPUPower; labelRisky.Text = Properties.Strings.UndervoltingRisky; buttonApplyAdvanced.Text = Properties.Strings.Apply; checkApplyUV.Text = Properties.Strings.AutoApply; buttonCalibrate.Text = Properties.Strings.Calibrate; InitTheme(true); labelTip.Visible = false; labelTip.BackColor = Color.Transparent; seriesCPU = chartCPU.Series.Add("CPU"); seriesGPU = chartGPU.Series.Add("GPU"); seriesMid = chartMid.Series.Add("Mid"); seriesXGM = chartXGM.Series.Add("XGM"); seriesCPU.Color = colorStandard; seriesGPU.Color = colorTurbo; seriesMid.Color = colorEco; seriesXGM.Color = Color.Orange; chartCPU.MouseMove += (sender, e) => ChartCPU_MouseMove(sender, e, AsusFan.CPU); chartCPU.MouseUp += ChartCPU_MouseUp; chartCPU.MouseLeave += ChartCPU_MouseLeave; chartGPU.MouseMove += (sender, e) => ChartCPU_MouseMove(sender, e, AsusFan.GPU); chartGPU.MouseUp += ChartCPU_MouseUp; chartGPU.MouseLeave += ChartCPU_MouseLeave; chartMid.MouseMove += (sender, e) => ChartCPU_MouseMove(sender, e, AsusFan.Mid); chartMid.MouseUp += ChartCPU_MouseUp; chartMid.MouseLeave += ChartCPU_MouseLeave; chartXGM.MouseMove += (sender, e) => ChartCPU_MouseMove(sender, e, AsusFan.XGM); chartXGM.MouseUp += ChartCPU_MouseUp; chartXGM.MouseLeave += ChartCPU_MouseLeave; chartCPU.MouseClick += ChartCPU_MouseClick; chartGPU.MouseClick += ChartCPU_MouseClick; chartMid.MouseClick += ChartCPU_MouseClick; chartXGM.MouseClick += ChartCPU_MouseClick; buttonReset.Click += ButtonReset_Click; trackTotal.Maximum = AsusACPI.MaxTotal; trackTotal.Minimum = AsusACPI.MinTotal; trackSlow.Maximum = AsusACPI.MaxTotal; trackSlow.Minimum = AsusACPI.MinTotal; trackCPU.Maximum = AsusACPI.MaxCPU; trackCPU.Minimum = AsusACPI.MinCPU; trackFast.Maximum = AsusACPI.MaxTotal; trackFast.Minimum = AsusACPI.MinTotal; trackTotal.Scroll += TrackTotal_Scroll; trackSlow.Scroll += TrackSlow_Scroll; trackFast.Scroll += TrackFast_Scroll; trackCPU.Scroll += TrackCPU_Scroll; trackFast.MouseUp += TrackPower_MouseUp; trackCPU.MouseUp += TrackPower_MouseUp; trackTotal.MouseUp += TrackPower_MouseUp; trackSlow.MouseUp += TrackPower_MouseUp; trackFast.KeyUp += TrackPower_KeyUp; trackCPU.KeyUp += TrackPower_KeyUp; trackTotal.KeyUp += TrackPower_KeyUp; trackSlow.KeyUp += TrackPower_KeyUp; checkApplyFans.Click += CheckApplyFans_Click; checkApplyPower.Click += CheckApplyPower_Click; trackGPUClockLimit.Minimum = NvidiaGpuControl.MinClockLimit; trackGPUClockLimit.Maximum = NvidiaGpuControl.MaxClockLimit; trackGPUCore.Minimum = NvidiaGpuControl.MinCoreOffset; trackGPUCore.Maximum = NvidiaGpuControl.MaxCoreOffset; trackGPUMemory.Minimum = NvidiaGpuControl.MinMemoryOffset; trackGPUMemory.Maximum = NvidiaGpuControl.MaxMemoryOffset; trackGPUBoost.Minimum = AsusACPI.MinGPUBoost; trackGPUBoost.Maximum = AsusACPI.MaxGPUBoost; trackGPUTemp.Minimum = AsusACPI.MinGPUTemp; trackGPUTemp.Maximum = AsusACPI.MaxGPUTemp; trackGPUPower.Minimum = AsusACPI.MinGPUPower; trackGPUPower.Maximum = AsusACPI.MaxGPUPower; trackGPUClockLimit.Scroll += trackGPUClockLimit_Scroll; trackGPUCore.Scroll += trackGPU_Scroll; trackGPUMemory.Scroll += trackGPU_Scroll; trackGPUBoost.Scroll += trackGPUPower_Scroll; trackGPUTemp.Scroll += trackGPUPower_Scroll; trackGPUPower.Scroll += trackGPUPower_Scroll; trackGPUCore.MouseUp += TrackGPUClocks_MouseUp; trackGPUMemory.MouseUp += TrackGPUClocks_MouseUp; trackGPUClockLimit.MouseUp += TrackGPUClocks_MouseUp; trackGPUBoost.MouseUp += TrackGPU_MouseUp; trackGPUTemp.MouseUp += TrackGPU_MouseUp; trackGPUPower.MouseUp += TrackGPU_MouseUp; //labelInfo.MaximumSize = new Size(280, 0); labelFansResult.Visible = false; trackUV.Minimum = RyzenControl.MinCPUUV; trackUV.Maximum = RyzenControl.MaxCPUUV; trackUViGPU.Minimum = RyzenControl.MinIGPUUV; trackUViGPU.Maximum = RyzenControl.MaxIGPUUV; trackTemp.Minimum = RyzenControl.MinTemp; trackTemp.Maximum = RyzenControl.MaxTemp; comboPowerMode.DropDownStyle = ComboBoxStyle.DropDownList; comboPowerMode.DataSource = new BindingSource(PowerNative.powerModes, null); comboPowerMode.DisplayMember = "Value"; comboPowerMode.ValueMember = "Key"; FillModes(false); InitAll(); InitCPU(); comboBoost.SelectedValueChanged += ComboBoost_Changed; comboPowerMode.SelectedValueChanged += ComboPowerMode_Changed; comboModes.SelectionChangeCommitted += ComboModes_SelectedValueChanged; comboModes.TextChanged += ComboModes_TextChanged; comboModes.KeyPress += ComboModes_KeyPress; Shown += Fans_Shown; buttonAdd.Click += ButtonAdd_Click; buttonRemove.Click += ButtonRemove_Click; buttonRename.Click += ButtonRename_Click; trackUV.Scroll += TrackUV_Scroll; trackUViGPU.Scroll += TrackUV_Scroll; trackTemp.Scroll += TrackUV_Scroll; buttonApplyAdvanced.Click += ButtonApplyAdvanced_Click; buttonCPU.BorderColor = colorStandard; buttonGPU.BorderColor = colorTurbo; buttonAdvanced.BorderColor = Color.Gray; buttonCPU.Click += ButtonCPU_Click; buttonGPU.Click += ButtonGPU_Click; buttonAdvanced.Click += ButtonAdvanced_Click; checkApplyUV.Click += CheckApplyUV_Click; buttonCalibrate.Click += ButtonCalibrate_Click; buttonDownload.Click += ButtonDownload_Click; checkFanClamp.Checked = clampFanDots; checkFanClamp.Click += CheckFanClamp_Click; ToggleNavigation(0); if (Program.acpi.DeviceGet(AsusACPI.DevsCPUFanCurve) < 0) buttonCalibrate.Visible = false; FormClosed += Fans_FormClosed; } private void CheckFanClamp_Click(object? sender, EventArgs e) { clampFanDots = checkFanClamp.Checked; AppConfig.Set("fan_clamp", clampFanDots ? 1 : 0); } private void ButtonDownload_Click(object? sender, EventArgs e) { RyzenControl.DownloadRing(); panelAdvancedAlways.Visible = true; panelAdvancedApply.Visible = true; labelRisky.Visible = true; panelUViGPU.Visible = true; panelUV.Visible = true; panelTitleAdvanced.Visible = true; panelTemperature.Visible = true; panelTitleTemp.Visible = true; VisualiseAdvanced(); } private void ButtonCalibrate_Click(object? sender, EventArgs e) { buttonCalibrate.Enabled = false; fanSensorControl.StartCalibration(); } private void ChartCPU_MouseClick(object? sender, MouseEventArgs e) { if (sender is null) return; Chart chart = (Chart)sender; HitTestResult result = chart.HitTest(e.X, e.Y); if ((result.ChartElementType == ChartElementType.AxisLabels || result.ChartElementType == ChartElementType.Axis) && result.Axis == chart.ChartAreas[0].AxisY) { fanRpm = !fanRpm; SetAxis(chartCPU, AsusFan.CPU); SetAxis(chartGPU, AsusFan.GPU); if (chartMid.Visible) SetAxis(chartMid, AsusFan.Mid); if (chartXGM.Visible) SetAxis(chartXGM, AsusFan.XGM); } } private void Fans_FormClosed(object? sender, FormClosedEventArgs e) { //Because windows charts seem to eat a lot of memory :( GC.Collect(GC.MaxGeneration, GCCollectionMode.Forced); } private void CheckApplyUV_Click(object? sender, EventArgs e) { AppConfig.SetMode("auto_uv", checkApplyUV.Checked ? 1 : 0); modeControl.AutoRyzen(); } public void InitAll() { InitMode(); InitFans(); InitPower(); InitPowerPlan(); InitUV(); InitGPU(); } public void InitCPU() { Task.Run(async () => { string CPUName; using (ManagementObjectSearcher myProcessorObject = new ManagementObjectSearcher("select * from Win32_Processor")) foreach (ManagementObject obj in myProcessorObject.Get()) { CPUName = obj["Name"].ToString(); Invoke(delegate { Text = Properties.Strings.FansAndPower + " - " + CPUName; }); } }); } public void ToggleNavigation(int index = 0) { SuspendLayout(); buttonCPU.Activated = false; buttonGPU.Activated = false; buttonAdvanced.Activated = false; panelPower.Visible = false; panelGPU.Visible = false; panelAdvanced.Visible = false; switch (index) { case 1: buttonGPU.Activated = true; panelGPU.Visible = true; break; case 2: buttonAdvanced.Activated = true; panelAdvanced.Visible = true; break; default: buttonCPU.Activated = true; panelPower.Visible = true; break; } ResumeLayout(false); PerformLayout(); } private void ButtonAdvanced_Click(object? sender, EventArgs e) { ToggleNavigation(2); } private void ButtonGPU_Click(object? sender, EventArgs e) { ToggleNavigation(1); } private void ButtonCPU_Click(object? sender, EventArgs e) { ToggleNavigation(0); } private void ButtonApplyAdvanced_Click(object? sender, EventArgs e) { modeControl.SetRyzen(true); checkApplyUV.Enabled = true; } public void InitUV() { //if (!ProcessHelper.IsUserAdministrator()) return; int cpuUV = Math.Max(trackUV.Minimum, Math.Min(trackUV.Maximum, AppConfig.GetMode("cpu_uv", 0))); int igpuUV = Math.Max(trackUViGPU.Minimum, Math.Min(trackUViGPU.Maximum, AppConfig.GetMode("igpu_uv", 0))); int temp = AppConfig.GetMode("cpu_temp"); if (temp < RyzenControl.MinTemp || temp > RyzenControl.MaxTemp) temp = RyzenControl.MaxTemp; checkApplyUV.Enabled = checkApplyUV.Checked = AppConfig.IsMode("auto_uv"); trackUV.Value = cpuUV; trackUViGPU.Value = igpuUV; trackTemp.Value = temp; VisualiseAdvanced(); buttonAdvanced.Visible = RyzenControl.IsAMD(); } private void VisualiseAdvanced() { if (!RyzenControl.IsRingExsists()) { panelTitleAdvanced.Visible = false; labelRisky.Visible = false; panelUV.Visible = false; panelUViGPU.Visible = false; panelTitleTemp.Visible = false; panelTemperature.Visible = false; panelAdvancedAlways.Visible = false; panelAdvancedApply.Visible = false; panelDownload.Visible = true; } else { panelDownload.Visible = false; } if (!RyzenControl.IsSupportedUV()) { panelTitleAdvanced.Visible = false; labelRisky.Visible = false; panelUV.Visible = false; panelUViGPU.Visible = false; } if (!RyzenControl.IsSupportedUViGPU()) { panelUViGPU.Visible = false; } labelUV.Text = trackUV.Value.ToString(); labelUViGPU.Text = trackUViGPU.Value.ToString(); labelTemp.Text = (trackTemp.Value < RyzenControl.MaxTemp) ? trackTemp.Value.ToString() + "°C" : "Default"; } private void AdvancedScroll() { AppConfig.SetMode("auto_uv", 0); checkApplyUV.Enabled = checkApplyUV.Checked = false; VisualiseAdvanced(); AppConfig.SetMode("cpu_temp", trackTemp.Value); AppConfig.SetMode("cpu_uv", trackUV.Value); AppConfig.SetMode("igpu_uv", trackUViGPU.Value); } private void TrackUV_Scroll(object? sender, EventArgs e) { AdvancedScroll(); } private void ComboModes_KeyPress(object? sender, KeyPressEventArgs e) { if (e.KeyChar == 13) RenameToggle(); } private void ComboModes_TextChanged(object? sender, EventArgs e) { if (comboModes.DropDownStyle == ComboBoxStyle.DropDownList) return; if (!Modes.IsCurrentCustom()) return; AppConfig.SetMode("mode_name", comboModes.Text); } private void RenameToggle() { if (comboModes.DropDownStyle == ComboBoxStyle.DropDownList) comboModes.DropDownStyle = ComboBoxStyle.Simple; else { var mode = Modes.GetCurrent(); FillModes(); comboModes.SelectedValue = mode; } } private void ButtonRename_Click(object? sender, EventArgs e) { RenameToggle(); } private void ButtonRemove_Click(object? sender, EventArgs e) { int mode = Modes.GetCurrent(); if (!Modes.IsCurrentCustom()) return; Modes.Remove(mode); FillModes(); modeControl.SetPerformanceMode(AsusACPI.PerformanceBalanced); } private void FillModes(bool contextMenu = true) { comboModes.DropDownStyle = ComboBoxStyle.DropDownList; comboModes.DataSource = new BindingSource(Modes.GetDictonary(), null); comboModes.DisplayMember = "Value"; comboModes.ValueMember = "Key"; if (contextMenu) Program.settingsForm.SetContextMenu(); } private void ButtonAdd_Click(object? sender, EventArgs e) { int mode = Modes.Add(); FillModes(); modeControl.SetPerformanceMode(mode); } public void InitMode() { int mode = Modes.GetCurrent(); comboModes.SelectedValue = mode; buttonRename.Visible = buttonRemove.Visible = Modes.IsCurrentCustom(); } private void ComboModes_SelectedValueChanged(object? sender, EventArgs e) { var selectedMode = comboModes.SelectedValue; if (selectedMode == null) return; if ((int)selectedMode == Modes.GetCurrent()) return; Debug.WriteLine(selectedMode); modeControl.SetPerformanceMode((int)selectedMode); } private void TrackGPU_MouseUp(object? sender, MouseEventArgs e) { modeControl.SetGPUPower(); } private void TrackGPUClocks_MouseUp(object? sender, MouseEventArgs e) { modeControl.SetGPUClocks(true); } private void InitGPUPower() { gpuPowerBase = Program.acpi.DeviceGet(AsusACPI.GPU_BASE); if (gpuPowerBase >= 0) Logger.WriteLine($"ReadGPUPowerBase: {gpuPowerBase}"); panelGPUPower.Visible = isGPUPower; if (!isGPUPower) return; int maxGPUPower = NvidiaSmi.GetMaxGPUPower(); if (maxGPUPower > 0) { AsusACPI.MaxGPUPower = maxGPUPower - gpuPowerBase - AsusACPI.MaxGPUBoost; trackGPUPower.Minimum = AsusACPI.MinGPUPower; trackGPUPower.Maximum = AsusACPI.MaxGPUPower; } Task.Run(async () => { await Task.Delay(TimeSpan.FromMilliseconds(200)); int gpuPowerVar = Program.acpi.DeviceGet(AsusACPI.GPU_POWER); Logger.WriteLine($"ReadGPUPower ({Modes.GetCurrentBase()}): {gpuPowerVar}"); int gpu_power = AppConfig.GetMode("gpu_power"); if (gpu_power < 0) gpu_power = (gpuPowerVar >= 0) ? gpuPowerVar : AsusACPI.MaxGPUPower; Invoke(delegate { trackGPUPower.Value = Math.Max(Math.Min(gpu_power, AsusACPI.MaxGPUPower), AsusACPI.MinGPUPower); VisualiseGPUSettings(); }); }); } public void InitGPU() { if (Program.acpi.DeviceGet(AsusACPI.GPUEco) == 1) { gpuVisible = buttonGPU.Visible = false; return; } if (HardwareControl.GpuControl is null || !HardwareControl.GpuControl.IsValid) HardwareControl.RecreateGpuControl(); if (HardwareControl.GpuControl is not null && HardwareControl.GpuControl.IsNvidia) { nvControl = (NvidiaGpuControl)HardwareControl.GpuControl; } else { gpuVisible = buttonGPU.Visible = false; return; } try { gpuVisible = buttonGPU.Visible = true; int gpu_boost = AppConfig.GetMode("gpu_boost"); int gpu_temp = AppConfig.GetMode("gpu_temp"); int core = AppConfig.GetMode("gpu_core"); int memory = AppConfig.GetMode("gpu_memory"); int clock_limit = AppConfig.GetMode("gpu_clock_limit"); if (gpu_boost < 0) gpu_boost = AsusACPI.MaxGPUBoost; if (gpu_temp < 0) gpu_temp = AsusACPI.MaxGPUTemp; if (core == -1) core = 0; if (memory == -1) memory = 0; if (clock_limit == -1) clock_limit = NvidiaGpuControl.MaxClockLimit; if (nvControl is not null) { if (nvControl.GetClocks(out int current_core, out int current_memory)) { core = current_core; memory = current_memory; } int _clockLimit = nvControl.GetMaxGPUCLock(); if (_clockLimit == 0) clock_limit = NvidiaGpuControl.MaxClockLimit; else if (_clockLimit > 0) clock_limit = _clockLimit; try { labelGPU.Text = nvControl.FullName; } catch { } } trackGPUClockLimit.Value = Math.Max(Math.Min(clock_limit, NvidiaGpuControl.MaxClockLimit), NvidiaGpuControl.MinClockLimit); trackGPUCore.Value = Math.Max(Math.Min(core, NvidiaGpuControl.MaxCoreOffset), NvidiaGpuControl.MinCoreOffset); trackGPUMemory.Value = Math.Max(Math.Min(memory, NvidiaGpuControl.MaxMemoryOffset), NvidiaGpuControl.MinMemoryOffset); trackGPUBoost.Value = Math.Max(Math.Min(gpu_boost, AsusACPI.MaxGPUBoost), AsusACPI.MinGPUBoost); trackGPUTemp.Value = Math.Max(Math.Min(gpu_temp, AsusACPI.MaxGPUTemp), AsusACPI.MinGPUTemp); panelGPUBoost.Visible = (Program.acpi.DeviceGet(AsusACPI.PPT_GPUC0) >= 0); panelGPUTemp.Visible = (Program.acpi.DeviceGet(AsusACPI.PPT_GPUC2) >= 0); VisualiseGPUSettings(); InitGPUPower(); } catch (Exception ex) { Logger.WriteLine(ex.ToString()); gpuVisible = buttonGPU.Visible = false; } } private void VisualiseGPUSettings() { labelGPUCore.Text = $"{trackGPUCore.Value} MHz"; labelGPUMemory.Text = $"{trackGPUMemory.Value} MHz"; labelGPUBoost.Text = $"{trackGPUBoost.Value}W"; labelGPUTemp.Text = $"{trackGPUTemp.Value}°C"; if (trackGPUClockLimit.Value >= NvidiaGpuControl.MaxClockLimit) labelGPUClockLimit.Text = "Default"; else labelGPUClockLimit.Text = $"{trackGPUClockLimit.Value} MHz"; labelGPUPower.Text = (gpuPowerBase + trackGPUPower.Value) + "W"; } private void trackGPUClockLimit_Scroll(object? sender, EventArgs e) { int maxClock = (int)Math.Round((float)trackGPUClockLimit.Value / 5) * 5; trackGPUClockLimit.Value = maxClock; AppConfig.SetMode("gpu_clock_limit", maxClock); VisualiseGPUSettings(); } private void trackGPU_Scroll(object? sender, EventArgs e) { if (sender is null) return; TrackBar track = (TrackBar)sender; track.Value = (int)Math.Round((float)track.Value / 5) * 5; AppConfig.SetMode("gpu_core", trackGPUCore.Value); AppConfig.SetMode("gpu_memory", trackGPUMemory.Value); VisualiseGPUSettings(); } private void trackGPUPower_Scroll(object? sender, EventArgs e) { AppConfig.SetMode("gpu_boost", trackGPUBoost.Value); AppConfig.SetMode("gpu_temp", trackGPUTemp.Value); if (isGPUPower) AppConfig.SetMode("gpu_power", trackGPUPower.Value); VisualiseGPUSettings(); } static string ChartYLabel(int percentage, AsusFan device, string unit = "") { if (percentage == 0) return "OFF"; int Min = FanSensorControl.GetFanMin(device); int Max = FanSensorControl.GetFanMax(device); if (fanRpm) return (200 * Math.Floor((float)(Min * 100 + (Max - Min) * percentage) / 200)).ToString() + unit; else return percentage + "%"; } void SetAxis(Chart chart, AsusFan device) { chart.ChartAreas[0].AxisY.CustomLabels.Clear(); for (int i = 0; i <= fansMax; i += 10) { chart.ChartAreas[0].AxisY.CustomLabels.Add(i - 2, i + 2, ChartYLabel(i, device)); } //chart.ChartAreas[0].AxisY.CustomLabels.Add(fansMax -2, fansMax + 2, Properties.Strings.RPM); chart.ChartAreas[0].AxisY.Interval = 10; } void SetChart(Chart chart, AsusFan device) { string title = ""; string scale = ", RPM/°C"; switch (device) { case AsusFan.CPU: title = Properties.Strings.FanProfileCPU + scale; break; case AsusFan.GPU: title = Properties.Strings.FanProfileGPU + scale; break; case AsusFan.Mid: title = Properties.Strings.FanProfileMid + scale; break; case AsusFan.XGM: title = "XG Mobile" + scale; break; } chart.Titles[0].Text = title; chart.ChartAreas[0].AxisX.Minimum = tempMin; chart.ChartAreas[0].AxisX.Maximum = tempMax; chart.ChartAreas[0].AxisX.Interval = 10; chart.ChartAreas[0].AxisY.Minimum = 0; chart.ChartAreas[0].AxisY.Maximum = fansMax; chart.ChartAreas[0].AxisY.LabelStyle.Font = new Font("Arial", 7F); chart.ChartAreas[0].AxisX.MajorGrid.LineColor = chartGrid; chart.ChartAreas[0].AxisY.MajorGrid.LineColor = chartGrid; chart.ChartAreas[0].AxisX.LineColor = chartGrid; chart.ChartAreas[0].AxisY.LineColor = chartGrid; SetAxis(chart, device); if (chart.Legends.Count > 0) chart.Legends[0].Enabled = false; } public void FormPosition() { if (Height > Program.settingsForm.Height) { Top = Math.Max(0, Program.settingsForm.Top + Program.settingsForm.Height - Height); } else { Size = MinimumSize = new Size(0, Program.settingsForm.Height); Height = Program.settingsForm.Height; Top = Program.settingsForm.Top; } Left = Program.settingsForm.Left - Width - 5; } private void Fans_Shown(object? sender, EventArgs e) { FormPosition(); } private void TrackPower_MouseUp(object? sender, MouseEventArgs e) { Task.Run(() => { modeControl.AutoPower(true); }); } private void TrackPower_KeyUp(object? sender, KeyEventArgs e) { Task.Run(() => { modeControl.AutoPower(true); }); } public void InitPowerPlan() { int boost = PowerNative.GetCPUBoost(); if (boost >= 0) comboBoost.SelectedIndex = Math.Min(boost, comboBoost.Items.Count - 1); string powerMode = PowerNative.GetPowerMode(); bool batterySaver = PowerNative.GetBatterySaverStatus(); comboPowerMode.Enabled = !batterySaver; if (batterySaver) comboPowerMode.SelectedIndex = 0; else comboPowerMode.SelectedValue = powerMode; } private void ComboPowerMode_Changed(object? sender, EventArgs e) { string powerMode = (string)comboPowerMode.SelectedValue; PowerNative.SetPowerMode(powerMode); if (PowerNative.GetDefaultPowerMode(Modes.GetCurrentBase()) != powerMode) AppConfig.SetMode("powermode", powerMode); else AppConfig.RemoveMode("powermode"); } private void ComboBoost_Changed(object? sender, EventArgs e) { if (AppConfig.GetMode("auto_boost") != comboBoost.SelectedIndex) { PowerNative.SetCPUBoost(comboBoost.SelectedIndex); } AppConfig.SetMode("auto_boost", comboBoost.SelectedIndex); } private void CheckApplyPower_Click(object? sender, EventArgs e) { if (sender is null) return; CheckBox chk = (CheckBox)sender; AppConfig.SetMode("auto_apply_power", chk.Checked ? 1 : 0); modeControl.SetPerformanceMode(); } private void CheckApplyFans_Click(object? sender, EventArgs e) { if (sender is null) return; CheckBox chk = (CheckBox)sender; AppConfig.SetMode("auto_apply", chk.Checked ? 1 : 0); modeControl.SetPerformanceMode(); } public void InitAxis() { if (this == null || this.Text == "") return; Invoke(delegate { buttonCalibrate.Enabled = true; SetAxis(chartCPU, AsusFan.CPU); SetAxis(chartGPU, AsusFan.GPU); if (chartMid.Visible) SetAxis(chartMid, AsusFan.Mid); }); } public void LabelFansResult(string text) { if (text.Length > 0) Logger.WriteLine(text); if (this == null || this.Text == "") return; Invoke(delegate { labelFansResult.Text = text; labelFansResult.Visible = (text.Length > 0); }); } public void InitPower() { bool modeA = Program.acpi.DeviceGet(AsusACPI.PPT_APUA0) >= 0 || RyzenControl.IsAMD(); bool modeB0 = Program.acpi.IsAllAmdPPT(); bool modeC1 = Program.acpi.DeviceGet(AsusACPI.PPT_APUC1) >= 0; panelTotal.Visible = modeA; panelCPU.Visible = modeB0; panelApplyPower.Visible = panelTitleCPU.Visible = modeA || modeB0 || modeC1; // All AMD version has B0 but doesn't have C0 (Nvidia GPU) settings if (modeB0) { labelLeftTotal.Text = "Platform (CPU + GPU)"; labelLeftCPU.Text = "CPU"; panelFast.Visible = false; panelSlow.Visible = false; } else { panelSlow.Visible = modeA; if (RyzenControl.IsAMD()) { labelLeftTotal.Text = "SPL (CPU sustained)"; labelLeftSlow.Text = "sPPT (CPU 2 min boost)"; labelLeftFast.Text = "fPPT (CPU 2 sec boost)"; panelFast.Visible = modeC1; } else { labelLeftTotal.Text = "PL1 (CPU sustained)"; labelLeftSlow.Text = "PL2 (CPU 2 min boost)"; panelFast.Visible = false; } } checkApplyPower.Checked = AppConfig.IsMode("auto_apply_power"); int limit_total = AppConfig.GetMode("limit_total", AsusACPI.DefaultTotal); int limit_slow = AppConfig.GetMode("limit_slow", limit_total); int limit_fast = AppConfig.GetMode("limit_fast", limit_total); int limit_cpu = AppConfig.GetMode("limit_cpu", AsusACPI.DefaultCPU); if (limit_total > AsusACPI.MaxTotal) limit_total = AsusACPI.MaxTotal; if (limit_total < AsusACPI.MinTotal) limit_total = AsusACPI.MinTotal; if (limit_cpu > AsusACPI.MaxCPU) limit_cpu = AsusACPI.MaxCPU; if (limit_cpu < AsusACPI.MinCPU) limit_cpu = AsusACPI.MinCPU; if (limit_slow > AsusACPI.MaxTotal) limit_slow = AsusACPI.MaxTotal; if (limit_slow < AsusACPI.MinTotal) limit_slow = AsusACPI.MinTotal; if (limit_fast > AsusACPI.MaxTotal) limit_fast = AsusACPI.MaxTotal; if (limit_fast < AsusACPI.MinTotal) limit_fast = AsusACPI.MinTotal; trackTotal.Value = limit_total; trackSlow.Value = limit_slow; trackCPU.Value = limit_cpu; trackFast.Value = limit_fast; SavePower(); } private void SavePower() { labelTotal.Text = trackTotal.Value.ToString() + "W"; labelSlow.Text = trackSlow.Value.ToString() + "W"; labelCPU.Text = trackCPU.Value.ToString() + "W"; labelFast.Text = trackFast.Value.ToString() + "W"; AppConfig.SetMode("limit_total", trackTotal.Value); AppConfig.SetMode("limit_slow", trackSlow.Value); AppConfig.SetMode("limit_cpu", trackCPU.Value); AppConfig.SetMode("limit_fast", trackFast.Value); } private void TrackTotal_Scroll(object? sender, EventArgs e) { if (trackTotal.Value > trackSlow.Value) trackSlow.Value = trackTotal.Value; if (trackTotal.Value > trackFast.Value) trackFast.Value = trackTotal.Value; if (trackTotal.Value < trackCPU.Value) trackCPU.Value = trackTotal.Value; SavePower(); } private void TrackSlow_Scroll(object? sender, EventArgs e) { if (trackSlow.Value < trackTotal.Value) trackTotal.Value = trackSlow.Value; if (trackSlow.Value > trackFast.Value) trackFast.Value = trackSlow.Value; SavePower(); } private void TrackFast_Scroll(object? sender, EventArgs e) { if (trackFast.Value < trackSlow.Value) trackSlow.Value = trackFast.Value; if (trackFast.Value < trackTotal.Value) trackTotal.Value = trackFast.Value; SavePower(); } private void TrackCPU_Scroll(object? sender, EventArgs e) { if (trackCPU.Value > trackTotal.Value) trackTotal.Value = trackCPU.Value; SavePower(); } public void InitFans() { int chartCount = 2; // Middle / system fan check if (!AsusACPI.IsEmptyCurve(Program.acpi.GetFanCurve(AsusFan.Mid)) || Program.acpi.GetFan(AsusFan.Mid) >= 0) { AppConfig.Set("mid_fan", 1); chartCount++; chartMid.Visible = true; SetChart(chartMid, AsusFan.Mid); LoadProfile(seriesMid, AsusFan.Mid); } else { AppConfig.Set("mid_fan", 0); } // XG Mobile Fan check if (Program.acpi.IsXGConnected() || XGM.IsConnected()) { AppConfig.Set("xgm_fan", 1); chartCount++; chartXGM.Visible = true; SetChart(chartXGM, AsusFan.XGM); LoadProfile(seriesXGM, AsusFan.XGM); } else { AppConfig.Set("xgm_fan", 0); } try { if (chartCount > 2) Size = MinimumSize = new Size(Size.Width, Math.Max(MinimumSize.Height, (int)(ControlHelper.GetDpiScale(this).Value * (chartCount * 200 + 100)))); } catch (Exception ex) { Debug.WriteLine(ex); } SetChart(chartCPU, AsusFan.CPU); SetChart(chartGPU, AsusFan.GPU); LoadProfile(seriesCPU, AsusFan.CPU); LoadProfile(seriesGPU, AsusFan.GPU); bool autoFans = AppConfig.IsMode("auto_apply_power") && AppConfig.IsFanRequired(); bool applyFans = AppConfig.IsMode("auto_apply"); checkApplyFans.Checked = applyFans; if (autoFans || applyFans) { seriesCPU.Color = colorStandard; seriesGPU.Color = colorTurbo; seriesMid.Color = colorEco; seriesXGM.Color = Color.Orange; } else { seriesCPU.Color = Color.Gray; seriesGPU.Color = Color.Gray; seriesMid.Color = Color.Gray; seriesXGM.Color = Color.Gray; } } void LoadProfile(Series series, AsusFan device, bool reset = false) { series.ChartType = SeriesChartType.Line; series.MarkerSize = 10; series.MarkerStyle = MarkerStyle.Circle; series.Points.Clear(); byte[] curve = AppConfig.GetFanConfig(device); if (reset || AsusACPI.IsInvalidCurve(curve)) { curve = Program.acpi.GetFanCurve(device, Modes.GetCurrentBase()); Logger.WriteLine($"Default Curve: {device} - {BitConverter.ToString(curve)}"); if (AsusACPI.IsInvalidCurve(curve)) curve = AppConfig.GetDefaultCurve(device); curve = AsusACPI.FixFanCurve(curve); } //Debug.WriteLine(BitConverter.ToString(curve)); byte old = 0; for (int i = 0; i < 8; i++) { if (curve[i] == old) curve[i]++; // preventing 2 points in same spot from default asus profiles series.Points.AddXY(curve[i], curve[i + 8]); old = curve[i]; } SaveProfile(series, device); } void SaveProfile(Series series, AsusFan device) { byte[] curve = new byte[16]; int i = 0; foreach (DataPoint point in series.Points) { curve[i] = (byte)point.XValue; curve[i + 8] = (byte)point.YValues.First(); i++; } AppConfig.SetFanConfig(device, curve); //Program.wmi.SetFanCurve(device, curve); } private void ButtonReset_Click(object? sender, EventArgs e) { LoadProfile(seriesCPU, AsusFan.CPU, true); LoadProfile(seriesGPU, AsusFan.GPU, true); if (AppConfig.Is("mid_fan")) LoadProfile(seriesMid, AsusFan.Mid, true); if (AppConfig.Is("xgm_fan")) LoadProfile(seriesXGM, AsusFan.XGM, true); checkApplyFans.Checked = false; checkApplyPower.Checked = false; seriesCPU.Color = Color.Gray; seriesGPU.Color = Color.Gray; seriesMid.Color = Color.Gray; seriesXGM.Color = Color.Gray; AppConfig.SetMode("auto_apply", 0); AppConfig.SetMode("auto_apply_power", 0); trackUV.Value = RyzenControl.MaxCPUUV; trackUViGPU.Value = RyzenControl.MaxIGPUUV; trackTemp.Value = RyzenControl.MaxTemp; AdvancedScroll(); AppConfig.RemoveMode("cpu_temp"); modeControl.ResetPerformanceMode(); InitPowerPlan(); XGM.Reset(); if (gpuVisible) { trackGPUClockLimit.Value = NvidiaGpuControl.MaxClockLimit; trackGPUCore.Value = 0; trackGPUMemory.Value = 0; trackGPUBoost.Value = AsusACPI.MaxGPUBoost; trackGPUTemp.Value = AsusACPI.MaxGPUTemp; //AppConfig.SetMode("gpu_boost", trackGPUBoost.Value); //AppConfig.SetMode("gpu_temp", trackGPUTemp.Value); AppConfig.RemoveMode("gpu_boost"); AppConfig.RemoveMode("gpu_temp"); AppConfig.RemoveMode("gpu_power"); AppConfig.RemoveMode("gpu_clock_limit"); AppConfig.RemoveMode("gpu_core"); AppConfig.RemoveMode("gpu_memory"); InitGPUPower(); VisualiseGPUSettings(); modeControl.SetGPUClocks(true, true); modeControl.SetGPUPower(); } } private void Chart_Save() { curPoint = null; curIndex = -1; labelTip.Visible = false; SaveProfile(seriesCPU, AsusFan.CPU); SaveProfile(seriesGPU, AsusFan.GPU); if (AppConfig.Is("mid_fan")) SaveProfile(seriesMid, AsusFan.Mid); if (AppConfig.Is("xgm_fan")) SaveProfile(seriesXGM, AsusFan.XGM); modeControl.AutoFans(); } private void ChartCPU_MouseUp(object? sender, MouseEventArgs e) { Chart_Save(); } private void ChartCPU_MouseLeave(object? sender, EventArgs e) { curPoint = null; curIndex = -1; labelTip.Visible = false; } private void ChartCPU_MouseMove(object? sender, MouseEventArgs e, AsusFan device) { if (sender is null) return; Chart chart = (Chart)sender; ChartArea ca = chart.ChartAreas[0]; Axis ax = ca.AxisX; Axis ay = ca.AxisY; bool tip = false; HitTestResult hit = chart.HitTest(e.X, e.Y); Series series = chart.Series[0]; if (hit.Series is not null && hit.PointIndex >= 0) { curIndex = hit.PointIndex; curPoint = hit.Series.Points[curIndex]; tip = true; } if (curPoint != null) { double dx, dy, dymin; try { dx = ax.PixelPositionToValue(e.X); dy = ay.PixelPositionToValue(e.Y); if (dx < tempMin) dx = tempMin; if (dx > tempMax) dx = tempMax; if (dy < 0) dy = 0; if (dy > fansMax) dy = fansMax; dymin = (dx - 70) * 1.2; if (dy < dymin) dy = dymin; if (e.Button.HasFlag(MouseButtons.Left)) { double deltaY = dy - curPoint.YValues[0]; double deltaX = dx - curPoint.XValue; if (clampFanDots) { double minX = 30 + (curIndex * 10); double maxX = minX + 9; dx = Math.Max(minX, Math.Min(maxX, dx)); } curPoint.XValue = dx; if (Control.ModifierKeys == Keys.Shift) AdjustAll(0, deltaY, series); else { curPoint.YValues[0] = dy; AdjustAllLevels(curIndex, dx, dy, series); } tip = true; } labelTip.Text = Math.Floor(curPoint.XValue) + "C, " + ChartYLabel((int)curPoint.YValues[0], device, " " + Properties.Strings.RPM); labelTip.Top = e.Y + ((Control)sender).Top; labelTip.Left = Math.Min(chart.Width - labelTip.Width - 20, e.X - 50); } catch { Debug.WriteLine(e.Y); tip = false; } } labelTip.Visible = tip; } private void AdjustAll(double deltaX, double deltaY, Series series) { for (int i = 0; i < series.Points.Count; i++) { series.Points[i].XValue = Math.Max(tempMin, Math.Min(tempMax, series.Points[i].XValue + deltaX)); series.Points[i].YValues[0] = Math.Max(0, Math.Min(100, series.Points[i].YValues[0] + deltaY)); } } private void AdjustAllLevels(int index, double curXVal, double curYVal, Series series) { // Get the neighboring DataPoints of the hit point DataPoint? upperPoint = null; DataPoint? lowerPoint = null; if (index > 0) { lowerPoint = series.Points[index - 1]; } if (index < series.Points.Count - 1) { upperPoint = series.Points[index + 1]; } // Adjust the values according to the comparison between the value and its neighbors if (upperPoint != null) { if (curYVal > upperPoint.YValues[0]) { for (int i = index + 1; i < series.Points.Count; i++) { DataPoint curUpper = series.Points[i]; if (curUpper.YValues[0] >= curYVal) break; curUpper.YValues[0] = curYVal; } } if (curXVal > upperPoint.XValue) { for (int i = index + 1; i < series.Points.Count; i++) { DataPoint curUpper = series.Points[i]; if (curUpper.XValue >= curXVal) break; curUpper.XValue = curXVal; } } } if (lowerPoint != null) { //Debug.WriteLine(curYVal + " = 0; i--) { DataPoint curLower = series.Points[i]; if (curLower.YValues[0] < curYVal) break; curLower.YValues[0] = Math.Floor(curYVal); } } if (curXVal < lowerPoint.XValue) { for (int i = index - 1; i >= 0; i--) { DataPoint curLower = series.Points[i]; if (curLower.XValue <= curXVal) break; curLower.XValue = curXVal; } } } } } } ================================================ FILE: app/Fans.resx ================================================  text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Undervolting is experimental and risky feature. If applied values are too low for your hardware, it can become unstable or shut down. Try small negative values first, click Apply and test what works for you. ================================================ FILE: app/GHelper.csproj ================================================  WinExe net8.0-windows enable True enable True app.manifest GHelper.Program favicon.ico AnyCPU;x64 GHelper AnyCPU False True 0.241 embedded embedded embedded embedded Never Never Never True True Resources.resx True True Strings.resx True True Settings.settings ResXFileCodeGenerator ResXFileCodeGenerator Strings.uk.Designer.cs ResXFileCodeGenerator ResXFileCodeGenerator Strings.Designer.cs ResXFileCodeGenerator Resources.Designer.cs SettingsSingleFileGenerator Settings.Designer.cs Always Always ================================================ FILE: app/GHelper.sln ================================================  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.4.33403.182 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GHelper", "GHelper.csproj", "{D6138BB1-8FDB-4835-87EF-2FE41A3DD604}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{B6E44CC6-5D28-4CB9-8EE2-BE9D6238E2D6}" ProjectSection(SolutionItems) = preProject .editorconfig = .editorconfig EndProjectSection EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Debug|x64 = Debug|x64 Release|Any CPU = Release|Any CPU Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {D6138BB1-8FDB-4835-87EF-2FE41A3DD604}.Debug|Any CPU.ActiveCfg = Debug|x64 {D6138BB1-8FDB-4835-87EF-2FE41A3DD604}.Debug|Any CPU.Build.0 = Debug|x64 {D6138BB1-8FDB-4835-87EF-2FE41A3DD604}.Debug|x64.ActiveCfg = Debug|Any CPU {D6138BB1-8FDB-4835-87EF-2FE41A3DD604}.Debug|x64.Build.0 = Debug|Any CPU {D6138BB1-8FDB-4835-87EF-2FE41A3DD604}.Release|Any CPU.ActiveCfg = Release|x64 {D6138BB1-8FDB-4835-87EF-2FE41A3DD604}.Release|Any CPU.Build.0 = Release|x64 {D6138BB1-8FDB-4835-87EF-2FE41A3DD604}.Release|x64.ActiveCfg = Release|x64 {D6138BB1-8FDB-4835-87EF-2FE41A3DD604}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {B1BF5148-497A-4B5A-B079-5C00CD047DAF} EndGlobalSection EndGlobal ================================================ FILE: app/Gpu/AMD/AmdAdl2.cs ================================================ using System.Diagnostics; using System.Runtime.InteropServices; using static GHelper.Gpu.AMD.Adl2.NativeMethods; namespace GHelper.Gpu.AMD; #region Export Struct [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] public struct ADLSGApplicationInfo { [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] public string strFileName; [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] public string strFilePath; [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)] public string strVersion; public long timeStamp; public uint iProfileExists; public uint iGPUAffinity; public ADLBdf GPUBdf; } [StructLayout(LayoutKind.Sequential)] public struct ADLBdf { public int iBus; public int iDevice; public int iFunction; } [StructLayout(LayoutKind.Sequential)] public struct ADLSingleSensorData { public int Supported; public int Value; } [StructLayout(LayoutKind.Sequential)] public struct ADLPMLogDataOutput { int Size; [MarshalAs(UnmanagedType.ByValArray, SizeConst = Adl2.ADL_PMLOG_MAX_SENSORS)] public ADLSingleSensorData[] Sensors; } [StructLayout(LayoutKind.Sequential)] public struct ADLGcnInfo { public int CuCount; //Number of compute units on the ASIC. public int TexCount; //Number of texture mapping units. public int RopCount; //Number of Render backend Units. public int ASICFamilyId; //Such SI, VI. See /inc/asic_reg/atiid.h for family ids public int ASICRevisionId; //Such as Ellesmere, Fiji. For example - VI family revision ids are stored in /inc/asic_reg/vi_id.h } [Flags] public enum ADLAsicFamilyType { Undefined = 0, Discrete = 1 << 0, Integrated = 1 << 1, Workstation = 1 << 2, FireMV = 1 << 3, Xgp = 1 << 4, Fusion = 1 << 5, Firestream = 1 << 6, Embedded = 1 << 7, } public enum ADLSensorType { SENSOR_MAXTYPES = 0, PMLOG_CLK_GFXCLK = 1, // Current graphic clock value in MHz PMLOG_CLK_MEMCLK = 2, // Current memory clock value in MHz PMLOG_CLK_SOCCLK = 3, PMLOG_CLK_UVDCLK1 = 4, PMLOG_CLK_UVDCLK2 = 5, PMLOG_CLK_VCECLK = 6, PMLOG_CLK_VCNCLK = 7, PMLOG_TEMPERATURE_EDGE = 8, // Current edge of the die temperature value in C PMLOG_TEMPERATURE_MEM = 9, PMLOG_TEMPERATURE_VRVDDC = 10, PMLOG_TEMPERATURE_VRMVDD = 11, PMLOG_TEMPERATURE_LIQUID = 12, PMLOG_TEMPERATURE_PLX = 13, PMLOG_FAN_RPM = 14, // Current fan RPM value PMLOG_FAN_PERCENTAGE = 15, // Current ratio of fan RPM and max RPM PMLOG_SOC_VOLTAGE = 16, PMLOG_SOC_POWER = 17, PMLOG_SOC_CURRENT = 18, PMLOG_INFO_ACTIVITY_GFX = 19, // Current graphic activity level in percentage PMLOG_INFO_ACTIVITY_MEM = 20, // Current memory activity level in percentage PMLOG_GFX_VOLTAGE = 21, // Current graphic voltage in mV PMLOG_MEM_VOLTAGE = 22, PMLOG_ASIC_POWER = 23, // Current ASIC power draw in Watt PMLOG_TEMPERATURE_VRSOC = 24, PMLOG_TEMPERATURE_VRMVDD0 = 25, PMLOG_TEMPERATURE_VRMVDD1 = 26, PMLOG_TEMPERATURE_HOTSPOT = 27, // Current center of the die temperature value in C PMLOG_TEMPERATURE_GFX = 28, PMLOG_TEMPERATURE_SOC = 29, PMLOG_GFX_POWER = 30, PMLOG_GFX_CURRENT = 31, PMLOG_TEMPERATURE_CPU = 32, PMLOG_CPU_POWER = 33, PMLOG_CLK_CPUCLK = 34, PMLOG_THROTTLER_STATUS = 35, // A bit map of GPU throttle information. If a bit is set, the bit represented type of thorttling occurred in the last metrics sampling period PMLOG_CLK_VCN1CLK1 = 36, PMLOG_CLK_VCN1CLK2 = 37, PMLOG_SMART_POWERSHIFT_CPU = 38, PMLOG_SMART_POWERSHIFT_DGPU = 39, PMLOG_BUS_SPEED = 40, // Current PCIE bus speed running PMLOG_BUS_LANES = 41, // Current PCIE bus lanes using PMLOG_TEMPERATURE_LIQUID0 = 42, PMLOG_TEMPERATURE_LIQUID1 = 43, PMLOG_CLK_FCLK = 44, PMLOG_THROTTLER_STATUS_CPU = 45, PMLOG_SSPAIRED_ASICPOWER = 46, // apuPower PMLOG_SSTOTAL_POWERLIMIT = 47, // Total Power limit PMLOG_SSAPU_POWERLIMIT = 48, // APU Power limit PMLOG_SSDGPU_POWERLIMIT = 49, // DGPU Power limit PMLOG_TEMPERATURE_HOTSPOT_GCD = 50, PMLOG_TEMPERATURE_HOTSPOT_MCD = 51, PMLOG_THROTTLER_TEMP_EDGE_PERCENTAGE = 52, PMLOG_THROTTLER_TEMP_HOTSPOT_PERCENTAGE = 53, PMLOG_THROTTLER_TEMP_HOTSPOT_GCD_PERCENTAGE = 54, PMLOG_THROTTLER_TEMP_HOTSPOT_MCD_PERCENTAGE = 55, PMLOG_THROTTLER_TEMP_MEM_PERCENTAGE = 56, PMLOG_THROTTLER_TEMP_VR_GFX_PERCENTAGE = 57, PMLOG_THROTTLER_TEMP_VR_MEM0_PERCENTAGE = 58, PMLOG_THROTTLER_TEMP_VR_MEM1_PERCENTAGE = 59, PMLOG_THROTTLER_TEMP_VR_SOC_PERCENTAGE = 60, PMLOG_THROTTLER_TEMP_LIQUID0_PERCENTAGE = 61, PMLOG_THROTTLER_TEMP_LIQUID1_PERCENTAGE = 62, PMLOG_THROTTLER_TEMP_PLX_PERCENTAGE = 63, PMLOG_THROTTLER_TDC_GFX_PERCENTAGE = 64, PMLOG_THROTTLER_TDC_SOC_PERCENTAGE = 65, PMLOG_THROTTLER_TDC_USR_PERCENTAGE = 66, PMLOG_THROTTLER_PPT0_PERCENTAGE = 67, PMLOG_THROTTLER_PPT1_PERCENTAGE = 68, PMLOG_THROTTLER_PPT2_PERCENTAGE = 69, PMLOG_THROTTLER_PPT3_PERCENTAGE = 70, PMLOG_THROTTLER_FIT_PERCENTAGE = 71, PMLOG_THROTTLER_GFX_APCC_PLUS_PERCENTAGE = 72, PMLOG_BOARD_POWER = 73, PMLOG_MAX_SENSORS_REAL }; //Throttle Status [Flags] public enum ADL_THROTTLE_NOTIFICATION { ADL_PMLOG_THROTTLE_POWER = 1 << 0, ADL_PMLOG_THROTTLE_THERMAL = 1 << 1, ADL_PMLOG_THROTTLE_CURRENT = 1 << 2, }; public enum ADL_PMLOG_SENSORS { ADL_SENSOR_MAXTYPES = 0, ADL_PMLOG_CLK_GFXCLK = 1, ADL_PMLOG_CLK_MEMCLK = 2, ADL_PMLOG_CLK_SOCCLK = 3, ADL_PMLOG_CLK_UVDCLK1 = 4, ADL_PMLOG_CLK_UVDCLK2 = 5, ADL_PMLOG_CLK_VCECLK = 6, ADL_PMLOG_CLK_VCNCLK = 7, ADL_PMLOG_TEMPERATURE_EDGE = 8, ADL_PMLOG_TEMPERATURE_MEM = 9, ADL_PMLOG_TEMPERATURE_VRVDDC = 10, ADL_PMLOG_TEMPERATURE_VRMVDD = 11, ADL_PMLOG_TEMPERATURE_LIQUID = 12, ADL_PMLOG_TEMPERATURE_PLX = 13, ADL_PMLOG_FAN_RPM = 14, ADL_PMLOG_FAN_PERCENTAGE = 15, ADL_PMLOG_SOC_VOLTAGE = 16, ADL_PMLOG_SOC_POWER = 17, ADL_PMLOG_SOC_CURRENT = 18, ADL_PMLOG_INFO_ACTIVITY_GFX = 19, ADL_PMLOG_INFO_ACTIVITY_MEM = 20, ADL_PMLOG_GFX_VOLTAGE = 21, ADL_PMLOG_MEM_VOLTAGE = 22, ADL_PMLOG_ASIC_POWER = 23, ADL_PMLOG_TEMPERATURE_VRSOC = 24, ADL_PMLOG_TEMPERATURE_VRMVDD0 = 25, ADL_PMLOG_TEMPERATURE_VRMVDD1 = 26, ADL_PMLOG_TEMPERATURE_HOTSPOT = 27, ADL_PMLOG_TEMPERATURE_GFX = 28, ADL_PMLOG_TEMPERATURE_SOC = 29, ADL_PMLOG_GFX_POWER = 30, ADL_PMLOG_GFX_CURRENT = 31, ADL_PMLOG_TEMPERATURE_CPU = 32, ADL_PMLOG_CPU_POWER = 33, ADL_PMLOG_CLK_CPUCLK = 34, ADL_PMLOG_THROTTLER_STATUS = 35, // GFX ADL_PMLOG_CLK_VCN1CLK1 = 36, ADL_PMLOG_CLK_VCN1CLK2 = 37, ADL_PMLOG_SMART_POWERSHIFT_CPU = 38, ADL_PMLOG_SMART_POWERSHIFT_DGPU = 39, ADL_PMLOG_BUS_SPEED = 40, ADL_PMLOG_BUS_LANES = 41, ADL_PMLOG_TEMPERATURE_LIQUID0 = 42, ADL_PMLOG_TEMPERATURE_LIQUID1 = 43, ADL_PMLOG_CLK_FCLK = 44, ADL_PMLOG_THROTTLER_STATUS_CPU = 45, ADL_PMLOG_SSPAIRED_ASICPOWER = 46, // apuPower ADL_PMLOG_SSTOTAL_POWERLIMIT = 47, // Total Power limit ADL_PMLOG_SSAPU_POWERLIMIT = 48, // APU Power limit ADL_PMLOG_SSDGPU_POWERLIMIT = 49, // DGPU Power limit ADL_PMLOG_TEMPERATURE_HOTSPOT_GCD = 50, ADL_PMLOG_TEMPERATURE_HOTSPOT_MCD = 51, ADL_PMLOG_THROTTLER_TEMP_EDGE_PERCENTAGE = 52, ADL_PMLOG_THROTTLER_TEMP_HOTSPOT_PERCENTAGE = 53, ADL_PMLOG_THROTTLER_TEMP_HOTSPOT_GCD_PERCENTAGE = 54, ADL_PMLOG_THROTTLER_TEMP_HOTSPOT_MCD_PERCENTAGE = 55, ADL_PMLOG_THROTTLER_TEMP_MEM_PERCENTAGE = 56, ADL_PMLOG_THROTTLER_TEMP_VR_GFX_PERCENTAGE = 57, ADL_PMLOG_THROTTLER_TEMP_VR_MEM0_PERCENTAGE = 58, ADL_PMLOG_THROTTLER_TEMP_VR_MEM1_PERCENTAGE = 59, ADL_PMLOG_THROTTLER_TEMP_VR_SOC_PERCENTAGE = 60, ADL_PMLOG_THROTTLER_TEMP_LIQUID0_PERCENTAGE = 61, ADL_PMLOG_THROTTLER_TEMP_LIQUID1_PERCENTAGE = 62, ADL_PMLOG_THROTTLER_TEMP_PLX_PERCENTAGE = 63, ADL_PMLOG_THROTTLER_TDC_GFX_PERCENTAGE = 64, ADL_PMLOG_THROTTLER_TDC_SOC_PERCENTAGE = 65, ADL_PMLOG_THROTTLER_TDC_USR_PERCENTAGE = 66, ADL_PMLOG_THROTTLER_PPT0_PERCENTAGE = 67, ADL_PMLOG_THROTTLER_PPT1_PERCENTAGE = 68, ADL_PMLOG_THROTTLER_PPT2_PERCENTAGE = 69, ADL_PMLOG_THROTTLER_PPT3_PERCENTAGE = 70, ADL_PMLOG_THROTTLER_FIT_PERCENTAGE = 71, ADL_PMLOG_THROTTLER_GFX_APCC_PLUS_PERCENTAGE = 72, ADL_PMLOG_BOARD_POWER = 73, ADL_PMLOG_MAX_SENSORS_REAL } #region ADLAdapterInfo /// ADLAdapterInfo Structure [StructLayout(LayoutKind.Sequential)] public struct ADLAdapterInfo { /// The size of the structure int Size; /// Adapter Index public int AdapterIndex; /// Adapter UDID [MarshalAs(UnmanagedType.ByValTStr, SizeConst = Adl2.ADL_MAX_PATH)] public string UDID; /// Adapter Bus Number public int BusNumber; /// Adapter Driver Number public int DriverNumber; /// Adapter Function Number public int FunctionNumber; /// Adapter Vendor ID public int VendorID; /// Adapter Adapter name [MarshalAs(UnmanagedType.ByValTStr, SizeConst = Adl2.ADL_MAX_PATH)] public string AdapterName; /// Adapter Display name [MarshalAs(UnmanagedType.ByValTStr, SizeConst = Adl2.ADL_MAX_PATH)] public string DisplayName; /// Adapter Present status public int Present; /// Adapter Exist status public int Exist; /// Adapter Driver Path [MarshalAs(UnmanagedType.ByValTStr, SizeConst = Adl2.ADL_MAX_PATH)] public string DriverPath; /// Adapter Driver Ext Path [MarshalAs(UnmanagedType.ByValTStr, SizeConst = Adl2.ADL_MAX_PATH)] public string DriverPathExt; /// Adapter PNP String [MarshalAs(UnmanagedType.ByValTStr, SizeConst = Adl2.ADL_MAX_PATH)] public string PNPString; /// OS Display Index public int OSDisplayIndex; } /// ADLAdapterInfo Array [StructLayout(LayoutKind.Sequential)] public struct ADLAdapterInfoArray { /// ADLAdapterInfo Array [MarshalAs(UnmanagedType.ByValArray, SizeConst = Adl2.ADL_MAX_ADAPTERS)] public ADLAdapterInfo[] ADLAdapterInfo; } #endregion ADLAdapterInfo #region ADLDisplayInfo /// ADLDisplayID Structure [StructLayout(LayoutKind.Sequential)] public struct ADLDisplayID { /// Display Logical Index public int DisplayLogicalIndex; /// Display Physical Index public int DisplayPhysicalIndex; /// Adapter Logical Index public int DisplayLogicalAdapterIndex; /// Adapter Physical Index public int DisplayPhysicalAdapterIndex; } /// ADLDisplayInfo Structure [StructLayout(LayoutKind.Sequential)] public struct ADLDisplayInfo { /// Display Index public ADLDisplayID DisplayID; /// Display Controller Index public int DisplayControllerIndex; /// Display Name [MarshalAs(UnmanagedType.ByValTStr, SizeConst = Adl2.ADL_MAX_PATH)] public string DisplayName; /// Display Manufacturer Name [MarshalAs(UnmanagedType.ByValTStr, SizeConst = Adl2.ADL_MAX_PATH)] public string DisplayManufacturerName; /// Display Type : < The Display type. CRT, TV,CV,DFP are some of display types, public int DisplayType; /// Display output type public int DisplayOutputType; /// Connector type public int DisplayConnector; /// Indicating the display info bits' mask. public int DisplayInfoMask; /// Indicating the display info value. public int DisplayInfoValue; } #endregion ADLDisplayInfo #endregion Export Struct public class Adl2 { public const string Atiadlxx_FileName = "atiadlxx.dll"; #region Internal Constant /// Define the maximum path public const int ADL_MAX_PATH = 256; /// Define the maximum adapters public const int ADL_MAX_ADAPTERS = 40 /* 150 */; /// Define the maximum displays public const int ADL_MAX_DISPLAYS = 40 /* 150 */; /// Define the maximum device name length public const int ADL_MAX_DEVICENAME = 32; /// Define the successful public const int ADL_SUCCESS = 0; /// Define the failure public const int ADL_FAIL = -1; /// Define the driver ok public const int ADL_DRIVER_OK = 0; /// Maximum number of GL-Sync ports on the GL-Sync module public const int ADL_MAX_GLSYNC_PORTS = 8; /// Maximum number of GL-Sync ports on the GL-Sync module public const int ADL_MAX_GLSYNC_PORT_LEDS = 8; /// Maximum number of ADLMOdes for the adapter public const int ADL_MAX_NUM_DISPLAYMODES = 1024; /// Performance Metrics Log max sensors number public const int ADL_PMLOG_MAX_SENSORS = 256; #endregion Internal Constant // ///// ADL Create Function to create ADL Data /// If it is 1, then ADL will only return the physical exist adapters ///// retrun ADL Error Code public static int ADL2_Main_Control_Create(int enumConnectedAdapters, out nint adlContextHandle) { return NativeMethods.ADL2_Main_Control_Create(ADL_Main_Memory_Alloc_Impl_Reference, enumConnectedAdapters, out adlContextHandle); } public static void FreeMemory(nint buffer) { Memory_Free_Impl(buffer); } private static bool? isDllLoaded; public static bool Load() { if (isDllLoaded != null) return isDllLoaded.Value; try { Marshal.PrelinkAll(typeof(Adl2)); isDllLoaded = true; } catch (Exception e) when (e is DllNotFoundException or EntryPointNotFoundException) { Debug.WriteLine(e); isDllLoaded = false; } return isDllLoaded.Value; } private static ADL_Main_Memory_Alloc ADL_Main_Memory_Alloc_Impl_Reference = Memory_Alloc_Impl; /// Build in memory allocation function /// input size /// return the memory buffer private static nint Memory_Alloc_Impl(int size) { return Marshal.AllocCoTaskMem(size); } /// Build in memory free function /// input buffer private static void Memory_Free_Impl(nint buffer) { if (nint.Zero != buffer) { Marshal.FreeCoTaskMem(buffer); } } public static class NativeMethods { /// ADL Memory allocation function allows ADL to callback for memory allocation /// input size /// retrun ADL Error Code public delegate nint ADL_Main_Memory_Alloc(int size); // ///// ADL Create Function to create ADL Data /// Call back functin pointer which is ised to allocate memeory /// If it is 1, then ADL will only retuen the physical exist adapters ///// retrun ADL Error Code [DllImport(Atiadlxx_FileName)] public static extern int ADL2_Main_Control_Create(ADL_Main_Memory_Alloc callback, int enumConnectedAdapters, out nint adlContextHandle); /// ADL Destroy Function to free up ADL Data /// retrun ADL Error Code [DllImport(Atiadlxx_FileName)] public static extern int ADL2_Main_Control_Destroy(nint adlContextHandle); /// ADL Function to get the number of adapters /// return number of adapters /// retrun ADL Error Code [DllImport(Atiadlxx_FileName)] public static extern int ADL2_Adapter_NumberOfAdapters_Get(nint adlContextHandle, out int numAdapters); /// ADL Function to get the GPU adapter information /// return GPU adapter information /// the size of the GPU adapter struct /// retrun ADL Error Code [DllImport(Atiadlxx_FileName)] public static extern int ADL2_Adapter_AdapterInfo_Get(nint adlContextHandle, nint info, int inputSize); /// Function to determine if the adapter is active or not. /// The function is used to check if the adapter associated with iAdapterIndex is active /// Adapter Index. /// Status of the adapter. True: Active; False: Dsiabled /// Non zero is successfull [DllImport(Atiadlxx_FileName)] public static extern int ADL2_Adapter_Active_Get(nint adlContextHandle, int adapterIndex, out int status); /// Get display information based on adapter index /// Adapter Index /// return the total number of supported displays /// return ADLDisplayInfo Array for supported displays' information /// force detect or not /// return ADL Error Code [DllImport(Atiadlxx_FileName)] public static extern int ADL2_Display_DisplayInfo_Get( nint adlContextHandle, int adapterIndex, out int numDisplays, out nint displayInfoArray, int forceDetect ); [DllImport(Atiadlxx_FileName)] public static extern int ADL2_Overdrive_Caps( nint adlContextHandle, int adapterIndex, out int supported, out int enabled, out int version ); [DllImport(Atiadlxx_FileName)] public static extern int ADL2_New_QueryPMLogData_Get(nint adlContextHandle, int adapterIndex, out ADLPMLogDataOutput adlpmLogDataOutput); [DllImport(Atiadlxx_FileName)] public static extern int ADL2_Adapter_ASICFamilyType_Get(nint adlContextHandle, int adapterIndex, out ADLAsicFamilyType asicFamilyType, out int asicFamilyTypeValids); [DllImport(Atiadlxx_FileName)] public static extern int ADL2_SwitchableGraphics_Applications_Get( nint context, int iListType, out int lpNumApps, out nint lppAppList); [DllImport(Atiadlxx_FileName)] public static extern int ADL2_Adapter_VariBright_Caps( nint context, int iAdapterIndex, out int iSupported, out int iEnabled, out int iVersion); [DllImport(Atiadlxx_FileName)] public static extern int ADL2_Adapter_VariBrightEnable_Set( nint context, int iAdapterIndex, int iEnabled); // FPS [DllImport(Atiadlxx_FileName)] public static extern int ADL2_Adapter_FrameMetrics_Start( IntPtr context, int iAdapterIndex, int VidPnSourceId ); [DllImport(Atiadlxx_FileName)] public static extern int ADL2_Adapter_FrameMetrics_Stop( IntPtr context, int iAdapterIndex, int VidPnSourceId ); [DllImport(Atiadlxx_FileName)] public static extern int ADL2_Adapter_FrameMetrics_Get( IntPtr context, int iAdapterIndex, int VidPnSourceId, out float iFramesPerSecond ); [DllImport(Atiadlxx_FileName)] public static extern int ADL2_FPS_Settings_Get(IntPtr context, int iAdapterIndex, out ADLFPSSettingsOutput lpFPSSettings); [DllImport(Atiadlxx_FileName)] public static extern int ADL2_FPS_Settings_Set(IntPtr context, int iAdapterIndex, ADLFPSSettingsInput lpFPSSettings); [DllImport(Atiadlxx_FileName)] public static extern int ADL2_FPS_Settings_Reset(IntPtr context, int iAdapterIndex); [StructLayout(LayoutKind.Sequential)] public struct ADLFPSSettingsOutput { public int ulSize; public int bACFPSEnabled; public int bDCFPSEnabled; public int ulACFPSCurrent; public int ulDCFPSCurrent; public int ulACFPSMaximum; public int ulACFPSMinimum; public int ulDCFPSMaximum; public int ulDCFPSMinimum; } [StructLayout(LayoutKind.Sequential)] public struct ADLFPSSettingsInput { public int ulSize; public int bGlobalSettings; public int ulACFPSCurrent; public int ulDCFPSCurrent; // Assuming ulReserved is an array of 6 integers [MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)] public int[] ulReserved; } // Clocks [StructLayout(LayoutKind.Sequential)] public struct ADLODNPerformanceLevel { public int iClock; public int iVddc; public int iEnabled; } [StructLayout(LayoutKind.Sequential)] public struct ADLODNPerformanceLevels { public int iSize; public int iMode; public int iNumberOfPerformanceLevels; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 1)] public ADLODNPerformanceLevel[] aLevels; } [DllImport(Atiadlxx_FileName)] public static extern int ADL2_OverdriveN_SystemClocks_Get( nint context, int adapterIndex, ref ADLODNPerformanceLevels performanceLevels); [DllImport(Atiadlxx_FileName)] public static extern int ADL2_OverdriveN_SystemClocks_Set( nint context, int adapterIndex, ref ADLODNPerformanceLevels performanceLevels); [DllImport(Atiadlxx_FileName)] public static extern int ADL2_OverdriveN_MemoryClocks_Get( nint context, int adapterIndex, ref ADLODNPerformanceLevels performanceLevels); [DllImport(Atiadlxx_FileName)] public static extern int ADL2_OverdriveN_MemoryClocks_Set( nint context, int adapterIndex, ref ADLODNPerformanceLevels performanceLevels); } } ================================================ FILE: app/Gpu/AMD/AmdGpuControl.cs ================================================ using GHelper.Helpers; using System.Runtime.InteropServices; using static GHelper.Gpu.AMD.Adl2.NativeMethods; namespace GHelper.Gpu.AMD; // Reference: https://github.com/GPUOpen-LibrariesAndSDKs/display-library/blob/master/Sample-Managed/Program.cs public class AmdGpuControl : IGpuControl { private bool _isReady; private nint _adlContextHandle; private readonly ADLAdapterInfo _internalDiscreteAdapter; private readonly ADLAdapterInfo? _iGPU; public bool IsNvidia => false; public string FullName => _internalDiscreteAdapter!.AdapterName; private ADLAdapterInfo? FindByType(ADLAsicFamilyType type = ADLAsicFamilyType.Discrete) { ADL2_Adapter_NumberOfAdapters_Get(_adlContextHandle, out int numberOfAdapters); if (numberOfAdapters <= 0) return null; ADLAdapterInfoArray osAdapterInfoData = new(); int osAdapterInfoDataSize = Marshal.SizeOf(osAdapterInfoData); nint AdapterBuffer = Marshal.AllocCoTaskMem(osAdapterInfoDataSize); Marshal.StructureToPtr(osAdapterInfoData, AdapterBuffer, false); if (ADL2_Adapter_AdapterInfo_Get(_adlContextHandle, AdapterBuffer, osAdapterInfoDataSize) != Adl2.ADL_SUCCESS) return null; osAdapterInfoData = (ADLAdapterInfoArray)Marshal.PtrToStructure(AdapterBuffer, osAdapterInfoData.GetType())!; const int amdVendorId = 1002; // Determine which GPU is internal discrete AMD GPU ADLAdapterInfo internalDiscreteAdapter = osAdapterInfoData.ADLAdapterInfo .FirstOrDefault(adapter => { if (adapter.Exist == 0 || adapter.Present == 0) return false; if (adapter.VendorID != amdVendorId) return false; if (ADL2_Adapter_ASICFamilyType_Get(_adlContextHandle, adapter.AdapterIndex, out ADLAsicFamilyType asicFamilyType, out int asicFamilyTypeValids) != Adl2.ADL_SUCCESS) return false; asicFamilyType = (ADLAsicFamilyType)((int)asicFamilyType & asicFamilyTypeValids); return (asicFamilyType & type) != 0; }); if (internalDiscreteAdapter.Exist == 0) return null; return internalDiscreteAdapter; } public AmdGpuControl() { if (AppConfig.NoGpu() || !Adl2.Load()) return; try { if (Adl2.ADL2_Main_Control_Create(1, out _adlContextHandle) != Adl2.ADL_SUCCESS) return; } catch (Exception ex) { Logger.WriteLine(ex.Message); return; } ADLAdapterInfo? internalDiscreteAdapter = FindByType(ADLAsicFamilyType.Discrete); if (internalDiscreteAdapter is not null) { _internalDiscreteAdapter = (ADLAdapterInfo)internalDiscreteAdapter; _isReady = true; } _iGPU = FindByType(ADLAsicFamilyType.Integrated); } public bool IsValid => _isReady && _adlContextHandle != nint.Zero; public int? GetCurrentTemperature() { if (!IsValid) return null; if (ADL2_New_QueryPMLogData_Get(_adlContextHandle, _internalDiscreteAdapter.AdapterIndex, out ADLPMLogDataOutput adlpmLogDataOutput) != Adl2.ADL_SUCCESS) return null; ADLSingleSensorData temperatureSensor = adlpmLogDataOutput.Sensors[(int)ADLSensorType.PMLOG_TEMPERATURE_EDGE]; if (temperatureSensor.Supported == 0) return null; return temperatureSensor.Value; } public int? GetGpuUse() { if (!IsValid) return null; if (ADL2_New_QueryPMLogData_Get(_adlContextHandle, _internalDiscreteAdapter.AdapterIndex, out ADLPMLogDataOutput adlpmLogDataOutput) != Adl2.ADL_SUCCESS) return null; ADLSingleSensorData gpuUsage = adlpmLogDataOutput.Sensors[(int)ADLSensorType.PMLOG_INFO_ACTIVITY_GFX]; if (gpuUsage.Supported == 0) return null; return gpuUsage.Value; } public int? GetiGpuUse() { if (_adlContextHandle == nint.Zero || _iGPU == null) return null; if (ADL2_New_QueryPMLogData_Get(_adlContextHandle, ((ADLAdapterInfo)_iGPU).AdapterIndex, out ADLPMLogDataOutput adlpmLogDataOutput) != Adl2.ADL_SUCCESS) return null; ADLSingleSensorData gpuUsage = adlpmLogDataOutput.Sensors[(int)ADLSensorType.PMLOG_INFO_ACTIVITY_GFX]; if (gpuUsage.Supported == 0) return null; return gpuUsage.Value; } public int? GetGpuPower() { if (_adlContextHandle == nint.Zero || _iGPU == null) return null; if (ADL2_New_QueryPMLogData_Get(_adlContextHandle, ((ADLAdapterInfo)_iGPU).AdapterIndex, out ADLPMLogDataOutput adlpmLogDataOutput) != Adl2.ADL_SUCCESS) return null; ADLSingleSensorData gpuUsage = adlpmLogDataOutput.Sensors[(int)ADLSensorType.PMLOG_ASIC_POWER]; if (gpuUsage.Supported == 0) return null; return gpuUsage.Value; } public bool SetVariBright(int enabled) { if (_adlContextHandle == nint.Zero) return false; ADLAdapterInfo? iGPU = FindByType(ADLAsicFamilyType.Integrated); if (iGPU is null) return false; return ADL2_Adapter_VariBrightEnable_Set(_adlContextHandle, ((ADLAdapterInfo)iGPU).AdapterIndex, enabled) == Adl2.ADL_SUCCESS; } public bool GetVariBright(out int supported, out int enabled) { supported = enabled = -1; if (_adlContextHandle == nint.Zero) return false; ADLAdapterInfo? iGPU = FindByType(ADLAsicFamilyType.Integrated); if (iGPU is null) return false; if (ADL2_Adapter_VariBright_Caps(_adlContextHandle, ((ADLAdapterInfo)iGPU).AdapterIndex, out int supportedOut, out int enabledOut, out int version) != Adl2.ADL_SUCCESS) return false; supported = supportedOut; enabled = enabledOut; return true; } public void StartFPS() { if (_adlContextHandle == nint.Zero || _iGPU == null) return; ADL2_Adapter_FrameMetrics_Start(_adlContextHandle, ((ADLAdapterInfo)_iGPU).AdapterIndex, 0); } public void StopFPS() { if (_adlContextHandle == nint.Zero || _iGPU == null) return; ADL2_Adapter_FrameMetrics_Stop(_adlContextHandle, ((ADLAdapterInfo)_iGPU).AdapterIndex, 0); } public float GetFPS() { if (_adlContextHandle == nint.Zero || _iGPU == null) return 0; float fps; if (ADL2_Adapter_FrameMetrics_Get(_adlContextHandle, ((ADLAdapterInfo)_iGPU).AdapterIndex, 0, out fps) != Adl2.ADL_SUCCESS) return 0; return fps; } public int GetFPSLimit() { if (_adlContextHandle == nint.Zero || _iGPU == null) return -1; ADLFPSSettingsOutput settings; if (ADL2_FPS_Settings_Get(_adlContextHandle, ((ADLAdapterInfo)_iGPU).AdapterIndex, out settings) != Adl2.ADL_SUCCESS) return -1; Logger.WriteLine($"FPS Limit: {settings.ulACFPSCurrent}"); return settings.ulACFPSCurrent; } public int SetFPSLimit(int limit) { if (_adlContextHandle == nint.Zero || _iGPU == null) return -1; ADLFPSSettingsInput settings = new ADLFPSSettingsInput(); settings.ulACFPSCurrent = limit; settings.ulDCFPSCurrent = limit; settings.bGlobalSettings = 1; if (ADL2_FPS_Settings_Set(_adlContextHandle, ((ADLAdapterInfo)_iGPU).AdapterIndex, settings) != Adl2.ADL_SUCCESS) return 0; return 1; } public ADLODNPerformanceLevels? GetGPUClocks() { if (!IsValid) return null; ADLODNPerformanceLevels performanceLevels = new(); ADL2_OverdriveN_SystemClocks_Get(_adlContextHandle, _internalDiscreteAdapter.AdapterIndex, ref performanceLevels); return performanceLevels; } public void KillGPUApps() { if (!IsValid) return; nint appInfoPtr = nint.Zero; int appCount = 0; try { // Get switchable graphics applications information var result = ADL2_SwitchableGraphics_Applications_Get(_adlContextHandle, 2, out appCount, out appInfoPtr); if (result != 0) { throw new Exception("Failed to get switchable graphics applications. Error code: " + result); } // Convert the application data pointers to an array of structs var appInfoArray = new ADLSGApplicationInfo[appCount]; nint currentPtr = appInfoPtr; for (int i = 0; i < appCount; i++) { appInfoArray[i] = Marshal.PtrToStructure(currentPtr); currentPtr = nint.Add(currentPtr, Marshal.SizeOf()); } var appNames = new List(); for (int i = 0; i < appCount; i++) { if (appInfoArray[i].iGPUAffinity == 1) { Logger.WriteLine(appInfoArray[i].strFileName + ":" + appInfoArray[i].iGPUAffinity + "(" + appInfoArray[i].timeStamp + ")"); appNames.Add(Path.GetFileNameWithoutExtension(appInfoArray[i].strFileName)); } } List immune = new() { "svchost", "system", "ntoskrnl", "csrss", "winlogon", "wininit", "smss" }; foreach (string kill in appNames) if (!immune.Contains(kill.ToLower())) ProcessHelper.KillByName(kill); } catch (Exception ex) { Logger.WriteLine(ex.Message); } finally { // Clean up resources if (appInfoPtr != nint.Zero) { Marshal.FreeCoTaskMem(appInfoPtr); } } } private void ReleaseUnmanagedResources() { if (_adlContextHandle != nint.Zero) { ADL2_Main_Control_Destroy(_adlContextHandle); _adlContextHandle = nint.Zero; _isReady = false; } } public void Dispose() { ReleaseUnmanagedResources(); GC.SuppressFinalize(this); } ~AmdGpuControl() { ReleaseUnmanagedResources(); } } ================================================ FILE: app/Gpu/GPUModeControl.cs ================================================ using GHelper.Display; using GHelper.Gpu.NVidia; using GHelper.Helpers; using GHelper.USB; using Microsoft.Win32; using System.Diagnostics; namespace GHelper.Gpu { public class GPUModeControl { SettingsForm settings; public static int gpuMode; public static bool? gpuExists = null; public GPUModeControl(SettingsForm settingsForm) { settings = settingsForm; } public void InitGPUMode() { if (AppConfig.NoGpu()) { settings.HideGPUModes(false); return; } int eco = Program.acpi.DeviceGet(AsusACPI.GPUEco); int mux = Program.acpi.DeviceGet(AsusACPI.GPUMux); Logger.WriteLine("Eco flag : " + eco); Logger.WriteLine("Mux flag : " + mux); settings.VisualiseGPUButtons(eco >= 0, mux >= 0); if (mux == 0) { gpuMode = AsusACPI.GPUModeUltimate; } else { if (eco == 1) gpuMode = AsusACPI.GPUModeEco; else gpuMode = AsusACPI.GPUModeStandard; // GPU mode not supported if (eco < 0 && mux < 0) { if (gpuExists is null) gpuExists = Program.acpi.GetFan(AsusFan.GPU) >= 0; settings.HideGPUModes((bool)gpuExists); } } AppConfig.Set("gpu_mode", gpuMode); settings.VisualiseGPUMode(gpuMode); Aura.CustomRGB.ApplyGPUColor(gpuMode); } public void SetGPUMode(int GPUMode, int auto = 0) { int CurrentGPU = AppConfig.Get("gpu_mode"); AppConfig.Set("gpu_auto", auto); if (CurrentGPU == GPUMode) { settings.VisualiseGPUMode(); return; } var restart = false; var changed = false; int status; if (CurrentGPU == AsusACPI.GPUModeUltimate) { DialogResult dialogResult = MessageBox.Show(Properties.Strings.AlertUltimateOff, Properties.Strings.AlertUltimateTitle, MessageBoxButtons.YesNo); if (dialogResult == DialogResult.Yes) { status = Program.acpi.DeviceSet(AsusACPI.GPUMux, 1, "GPUMux"); restart = true; changed = true; } } else if (GPUMode == AsusACPI.GPUModeUltimate) { DialogResult dialogResult = MessageBox.Show(Properties.Strings.AlertUltimateOn, Properties.Strings.AlertUltimateTitle, MessageBoxButtons.YesNo); if (dialogResult == DialogResult.Yes) { if (AppConfig.NoAutoUltimate()) { Program.acpi.SetGPUEco(0); Thread.Sleep(500); int eco = Program.acpi.DeviceGet(AsusACPI.GPUEco); Logger.WriteLine("Eco flag : " + eco); if (eco == 1) { settings.VisualiseGPUMode(); return; } } status = Program.acpi.DeviceSet(AsusACPI.GPUMux, 0, "GPUMux"); restart = true; changed = true; } } else if (GPUMode == AsusACPI.GPUModeEco) { settings.VisualiseGPUMode(GPUMode); SetGPUEco(1); changed = true; } else if (GPUMode == AsusACPI.GPUModeStandard) { settings.VisualiseGPUMode(GPUMode); SetGPUEco(0); changed = true; } if (changed) { AppConfig.Set("gpu_mode", GPUMode); } if (restart) { settings.VisualiseGPUMode(); Process.Start("shutdown", "/r /t 1"); } } public void SetGPUEco(int eco) { settings.LockGPUModes(); Task.Run(async () => { int status = 1; if (eco == 1) { HardwareControl.KillGPUApps(); if (AppConfig.IsNVPlatform()) NvidiaGpuControl.StopNVService(); } Logger.WriteLine($"Running eco command {eco}"); try { status = Program.acpi.SetGPUEco(eco); await Task.Delay(TimeSpan.FromMilliseconds(AppConfig.Get("refresh_delay", 500))); settings.Invoke(delegate { InitGPUMode(); ScreenControl.AutoScreen(); }); if (eco == 0) { if (AppConfig.IsNVPlatform()) { await Task.Delay(TimeSpan.FromMilliseconds(AppConfig.Get("nv_delay", 5000))); NvidiaGpuControl.RestartNVService(); await Task.Delay(TimeSpan.FromMilliseconds(1000)); } else { await Task.Delay(TimeSpan.FromMilliseconds(3000)); } HardwareControl.RecreateGpuControl(); Program.modeControl.SetGPUClocks(false); } if (AppConfig.IsModeReapplyRequired()) { await Task.Delay(TimeSpan.FromMilliseconds(3000)); Program.modeControl.AutoPerformance(); } } catch (Exception ex) { Logger.WriteLine("Error setting GPU Eco: " + ex.Message); } }); } public static bool IsPlugged() { if (SystemInformation.PowerStatus.PowerLineStatus != PowerLineStatus.Online) return false; if (!AppConfig.Is("optimized_usbc")) return true; if (AppConfig.ContainsModel("FA507")) Thread.Sleep(1000); int chargerMode = Program.acpi.DeviceGet(AsusACPI.ChargerMode); Logger.WriteLine("ChargerStatus: " + chargerMode); if (chargerMode <= 0) return true; return (chargerMode & AsusACPI.ChargerBarrel) > 0; } public bool AutoGPUMode(bool optimized = false, int delay = 0) { bool GpuAuto = AppConfig.Is("gpu_auto"); bool ForceGPU = AppConfig.IsForceSetGPUMode() && !GpuAuto; int GpuMode = AppConfig.Get("gpu_mode"); if (!GpuAuto && !ForceGPU) return false; int eco = Program.acpi.DeviceGet(AsusACPI.GPUEco); int mux = Program.acpi.DeviceGet(AsusACPI.GPUMux); if (mux == 0) { if (optimized) SetGPUMode(AsusACPI.GPUModeStandard, 1); return false; } else { if (eco == 1) if ((GpuAuto && IsPlugged()) || (ForceGPU && GpuMode == AsusACPI.GPUModeStandard)) { if (delay > 0) Thread.Sleep(delay); SetGPUEco(0); return true; } if (eco == 0) if ((GpuAuto && !IsPlugged()) || (ForceGPU && GpuMode == AsusACPI.GPUModeEco)) { if (Program.acpi.IsXGConnected()) return false; if (HardwareControl.IsUsedGPU()) { DialogResult dialogResult = MessageBox.Show(Properties.Strings.AlertDGPU, Properties.Strings.AlertDGPUTitle, MessageBoxButtons.YesNo); if (dialogResult == DialogResult.No) return false; } if (delay > 0) Thread.Sleep(delay); SetGPUEco(1); return true; } } return false; } public void ToggleXGM(bool silent = false) { Task.Run(async () => { settings.LockGPUModes(); if (Program.acpi.DeviceGet(AsusACPI.GPUXG) == 1) { XGM.Reset(); HardwareControl.KillGPUApps(); if (silent) { Program.acpi.DeviceSet(AsusACPI.GPUXG, 0, "GPU XGM"); await Task.Delay(TimeSpan.FromSeconds(15)); } else { DialogResult dialogResult = DialogResult.No; settings.Invoke((MethodInvoker)delegate { dialogResult = MessageBox.Show(settings, "Did you close all applications running on XG Mobile?", "Disabling XG Mobile", MessageBoxButtons.YesNo); }); if (dialogResult == DialogResult.Yes) { Program.acpi.DeviceSet(AsusACPI.GPUXG, 0, "GPU XGM"); await Task.Delay(TimeSpan.FromSeconds(15)); } } } else { if (AppConfig.Is("xgm_special")) Program.acpi.DeviceSet(AsusACPI.GPUXG, 0x101, "GPU XGM"); else Program.acpi.DeviceSet(AsusACPI.GPUXG, 1, "GPU XGM"); XGM.Init(); await Task.Delay(TimeSpan.FromSeconds(15)); if (AppConfig.IsMode("auto_apply")) XGM.SetFan(AppConfig.GetFanConfig(AsusFan.XGM)); HardwareControl.RecreateGpuControl(); } settings.Invoke(delegate { InitGPUMode(); }); }); } public void KillGPUApps() { if (HardwareControl.GpuControl is not null) { HardwareControl.GpuControl.KillGPUApps(); } } public static bool IsHibernationEnabled() { try { using (RegistryKey key = Registry.LocalMachine.OpenSubKey(@"SYSTEM\CurrentControlSet\Control\Power")) { if (key != null) { object value = key.GetValue("HibernateEnabled"); if (value is int intValue) { return intValue != 0; } } } } catch (Exception ex) { Logger.WriteLine("Error checking hibernation status: " + ex.Message); } return true; } // Manually forcing standard mode on shutdown/hibernate for some exotic cases // https://github.com/seerge/g-helper/pull/855 public void StandardModeFix(bool hibernate = false) { if (!AppConfig.IsGPUFix()) return; // No config entry if (Program.acpi.DeviceGet(AsusACPI.GPUMux) == 0) return; // Ultimate mode if (hibernate && !IsHibernationEnabled()) return; Logger.WriteLine("Forcing Standard Mode on " + (hibernate ? "hibernation" : "shutdown")); Program.acpi.SetGPUEco(0); } } } ================================================ FILE: app/Gpu/IGpuControl.cs ================================================ namespace GHelper.Gpu; public interface IGpuControl : IDisposable { bool IsNvidia { get; } bool IsValid { get; } public string FullName { get; } int? GetCurrentTemperature(); int? GetGpuUse(); void KillGPUApps(); } ================================================ FILE: app/Gpu/NVidia/NvidiaGpuControl.cs ================================================ using GHelper.Helpers; using NvAPIWrapper.GPU; using NvAPIWrapper.Native; using NvAPIWrapper.Native.GPU; using NvAPIWrapper.Native.GPU.Structures; using NvAPIWrapper.Native.Interfaces.GPU; using System.Diagnostics; using static NvAPIWrapper.Native.GPU.Structures.PerformanceStates20InfoV1; namespace GHelper.Gpu.NVidia; public class NvidiaGpuControl : IGpuControl { public static int MaxCoreOffset = AppConfig.Get("max_gpu_core", 250); public static int MaxMemoryOffset = AppConfig.Get("max_gpu_memory", 500); public static int MinCoreOffset = AppConfig.Get("min_gpu_core", -250); public static int MinMemoryOffset = AppConfig.Get("min_gpu_memory", -500); public static int MinClockLimit = AppConfig.Get("min_gpu_clock", 400); public const int MaxClockLimit = 3000; private static PhysicalGPU? _internalGpu; public NvidiaGpuControl() { _internalGpu = GetInternalDiscreteGpu(); if (IsValid) { if (FullName.Contains("5080") || FullName.Contains("5090")) { MaxCoreOffset = AppConfig.Get("max_gpu_core", 400); MaxMemoryOffset = AppConfig.Get("max_gpu_memory", 1000); Logger.WriteLine($"NVIDIA GPU: {FullName} ({MaxCoreOffset},{MaxMemoryOffset})"); } if (FullName.Contains("5070 Ti") || FullName.Contains("4080") || FullName.Contains("4090")) { MaxCoreOffset = AppConfig.Get("max_gpu_core", 300); Logger.WriteLine($"NVIDIA GPU: {FullName} ({MaxCoreOffset},{MaxMemoryOffset})"); } } } public bool IsValid => _internalGpu != null; public bool IsNvidia => IsValid; public string FullName => _internalGpu!.FullName; public int? GetCurrentTemperature() { if (!IsValid) return null; PhysicalGPU internalGpu = _internalGpu!; IThermalSensor? gpuSensor = GPUApi.GetThermalSettings(internalGpu.Handle).Sensors .FirstOrDefault(s => s.Target == ThermalSettingsTarget.GPU); return gpuSensor?.CurrentTemperature; } public void Dispose() { } public void KillGPUApps() { if (!IsValid) return; PhysicalGPU internalGpu = _internalGpu!; try { Process[] processes = internalGpu.GetActiveApplications(); foreach (Process process in processes) try { Logger.WriteLine("Kill:" + process.ProcessName); ProcessHelper.KillByProcess(process); } catch (Exception ex) { Logger.WriteLine(ex.Message); } } catch (Exception ex) { Logger.WriteLine(ex.Message); } //GeneralApi.RestartDisplayDriver(); } public bool GetClocks(out int core, out int memory) { PhysicalGPU internalGpu = _internalGpu!; //Logger.WriteLine(internalGpu.FullName); //Logger.WriteLine(internalGpu.ArchitectInformation.ToString()); try { IPerformanceStates20Info states = GPUApi.GetPerformanceStates20(internalGpu.Handle); core = states.Clocks[PerformanceStateId.P0_3DPerformance][0].FrequencyDeltaInkHz.DeltaValue / 1000; memory = states.Clocks[PerformanceStateId.P0_3DPerformance][1].FrequencyDeltaInkHz.DeltaValue / 1000; Logger.WriteLine($"GET GPU CLOCKS: {core}, {memory}"); foreach (var delta in states.Voltages[PerformanceStateId.P0_3DPerformance]) { Logger.WriteLine("GPU VOLT:" + delta.IsEditable + " - " + delta.ValueDeltaInMicroVolt.DeltaValue); } return true; } catch (Exception ex) { Logger.WriteLine("GET GPU CLOCKS:" + ex.Message); core = memory = 0; return false; } } private static bool RunPowershellCommand(string script) { try { ProcessHelper.RunCMD("powershell", script); return true; } catch (Exception ex) { Logger.WriteLine(ex.ToString()); return false; } } public int GetMaxGPUCLock() { PhysicalGPU internalGpu = _internalGpu!; try { PrivateClockBoostLockV2 data = GPUApi.GetClockBoostLock(internalGpu.Handle); int limit = (int)data.ClockBoostLocks[0].VoltageInMicroV / 1000; Logger.WriteLine("GET CLOCK LIMIT: " + limit); return limit; } catch (Exception ex) { Logger.WriteLine("GET CLOCK LIMIT: " + ex.Message); return -1; } } public int SetMaxGPUClock(int clock) { if (clock < MinClockLimit || clock >= MaxClockLimit) clock = 0; int _clockLimit = GetMaxGPUCLock(); if (_clockLimit < 0 && clock == 0) return 0; if (_clockLimit != clock) { if (clock > 0) RunPowershellCommand($"nvidia-smi -lgc 0,{clock}"); else RunPowershellCommand($"nvidia-smi -rgc"); return 1; } else { return 0; } } public static void RestartNVService() { if (!ProcessHelper.IsUserAdministrator()) return; RunPowershellCommand(@"Restart-Service -Name 'NVDisplay.ContainerLocalSystem' -Force"); RunPowershellCommand(@"Restart-Service -Name 'NvContainerLocalSystem' -Force"); } public static void StopNVService() { if (!ProcessHelper.IsUserAdministrator()) return; RunPowershellCommand(@"Stop-Service -Name 'NvContainerLocalSystem' -Force"); RunPowershellCommand(@"Stop-Service -Name 'NVDisplay.ContainerLocalSystem' -Force"); } public int SetClocks(int core, int memory) { if (core < MinCoreOffset || core > MaxCoreOffset) return 0; if (memory < MinMemoryOffset || memory > MaxMemoryOffset) return 0; GetClocks(out int currentCore, out int currentMemory); // Nothing to set if (Math.Abs(core - currentCore) < 5 && Math.Abs(memory - currentMemory) < 5) return 0; PhysicalGPU internalGpu = _internalGpu!; var coreClock = new PerformanceStates20ClockEntryV1(PublicClockDomain.Graphics, new PerformanceStates20ParameterDelta(core * 1000)); var memoryClock = new PerformanceStates20ClockEntryV1(PublicClockDomain.Memory, new PerformanceStates20ParameterDelta(memory * 1000)); //var voltageEntry = new PerformanceStates20BaseVoltageEntryV1(PerformanceVoltageDomain.Core, new PerformanceStates20ParameterDelta(voltage)); PerformanceStates20ClockEntryV1[] clocks = { coreClock, memoryClock }; PerformanceStates20BaseVoltageEntryV1[] voltages = { }; PerformanceState20[] performanceStates = { new PerformanceState20(PerformanceStateId.P0_3DPerformance, clocks, voltages) }; var overclock = new PerformanceStates20InfoV1(performanceStates, 2, 0); try { Logger.WriteLine($"SET GPU CLOCKS: {core}, {memory}"); GPUApi.SetPerformanceStates20(internalGpu.Handle, overclock); } catch (Exception ex) { Logger.WriteLine("SET GPU CLOCKS: " + ex.Message); return -1; } return 1; } private static PhysicalGPU? GetInternalDiscreteGpu() { try { return PhysicalGPU .GetPhysicalGPUs() .FirstOrDefault(gpu => gpu.SystemType == SystemType.Laptop); } catch (Exception ex) { Debug.WriteLine(ex.Message); return null; } } public int? GetGpuUse() { if (!IsValid) return null; PhysicalGPU internalGpu = _internalGpu!; IUtilizationDomainInfo? gpuUsage = GPUApi.GetUsages(internalGpu.Handle).GPU; return (int?)gpuUsage?.Percentage; } } ================================================ FILE: app/Gpu/NVidia/NvidiaSmi.cs ================================================ using Ryzen; using System.Diagnostics; using System.Text.RegularExpressions; public static class NvidiaSmi { public static bool GetDisplayActiveStatus() { // Non AMD devices doesn't seem to be affected if (!RyzenControl.IsAMD()) return false; string commandOutput = RunNvidiaSmiCommand(); Logger.WriteLine(commandOutput); if (commandOutput.Length == 0) return false; if (!commandOutput.Contains("RTX 40")) return false; // Extract the "Display Active" status using regular expressions string displayActivePattern = @"Display Active\s+:\s+(\w+)"; Match match = Regex.Match(commandOutput, displayActivePattern, RegexOptions.IgnoreCase); if (match.Success) { string status = match.Groups[1].Value.ToLower().Trim(' '); return status == "enabled"; } return false; // Return false if the "Display Active" status is not found } public static int GetDefaultMaxGPUPower() { if (AppConfig.ContainsModel("GU605") || AppConfig.ContainsModel("GA605")) return 125; if (AppConfig.ContainsModel("GA403")) return 90; if (AppConfig.ContainsModel("FA607")) return 140; else return 175; } public static int GetMaxGPUPower() { string output = RunNvidiaSmiCommand("--query-gpu=power.max_limit --format csv,noheader,nounits"); output = output.Trim().Trim('\n', '\r').Replace(".00","").Replace(",00", ""); if (float.TryParse(output, out float floatValue)) { int intValue = (int)floatValue; if (intValue >= 50 && intValue <= 175) return intValue; } return GetDefaultMaxGPUPower(); } private static string RunNvidiaSmiCommand(string arguments = "-i 0 -q") { ProcessStartInfo startInfo = new ProcessStartInfo { FileName = "nvidia-smi", Arguments = arguments, RedirectStandardOutput = true, UseShellExecute = false, CreateNoWindow = true }; Process process = new Process { StartInfo = startInfo }; try { process.Start(); string output = process.StandardOutput.ReadToEnd(); process.WaitForExit(); return output; } catch (Exception ex) { //return File.ReadAllText(@"smi.txt"); Debug.WriteLine(ex.Message); } return ""; } } ================================================ FILE: app/Handheld.Designer.cs ================================================ namespace GHelper { partial class Handheld { /// /// Required designer variable. /// private System.ComponentModel.IContainer components = null; /// /// Clean up any resources being used. /// /// true if managed resources should be disposed; otherwise, false. protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } #region Windows Form Designer generated code /// /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// private void InitializeComponent() { panelDeadzones = new Panel(); panelRight = new Panel(); panelRT = new Panel(); pictureBox4 = new PictureBox(); trackRTMax = new TrackBar(); labelRT = new Label(); trackRTMin = new TrackBar(); labelRTTitle = new Label(); panelRS = new Panel(); pictureBox1 = new PictureBox(); trackRSMax = new TrackBar(); labelRS = new Label(); trackRSMin = new TrackBar(); labelRSTitle = new Label(); panelLeft = new Panel(); panelLT = new Panel(); pictureBox2 = new PictureBox(); trackLTMax = new TrackBar(); labelLT = new Label(); trackLTMin = new TrackBar(); labelLTTitle = new Label(); panelLS = new Panel(); pictureBox3 = new PictureBox(); trackLSMax = new TrackBar(); labelLS = new Label(); trackLSMin = new TrackBar(); labelLSTitle = new Label(); buttonReset = new UI.RButton(); panelBindings = new Panel(); panelBinding = new Panel(); labelBinding = new Label(); labelSecondary = new Label(); labelPrimary = new Label(); comboSecondary = new UI.RComboBox(); comboPrimary = new UI.RComboBox(); buttonView = new UI.RButton(); buttonLS = new UI.RButton(); buttonLT = new UI.RButton(); buttonLB = new UI.RButton(); buttonDPR = new UI.RButton(); buttonDPL = new UI.RButton(); buttonDPD = new UI.RButton(); buttonDPU = new UI.RButton(); buttonM2 = new UI.RButton(); buttonM1 = new UI.RButton(); buttonRS = new UI.RButton(); buttonMenu = new UI.RButton(); buttonRT = new UI.RButton(); buttonRB = new UI.RButton(); buttonB = new UI.RButton(); buttonA = new UI.RButton(); buttonY = new UI.RButton(); buttonX = new UI.RButton(); pictureAlly = new PictureBox(); panelVibra = new Panel(); checkController = new UI.RCheckBox(); pictureBox5 = new PictureBox(); labelVibra = new Label(); labelVibraTitle = new Label(); trackVibra = new TrackBar(); panelDeadzones.SuspendLayout(); panelRight.SuspendLayout(); panelRT.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)pictureBox4).BeginInit(); ((System.ComponentModel.ISupportInitialize)trackRTMax).BeginInit(); ((System.ComponentModel.ISupportInitialize)trackRTMin).BeginInit(); panelRS.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)pictureBox1).BeginInit(); ((System.ComponentModel.ISupportInitialize)trackRSMax).BeginInit(); ((System.ComponentModel.ISupportInitialize)trackRSMin).BeginInit(); panelLeft.SuspendLayout(); panelLT.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)pictureBox2).BeginInit(); ((System.ComponentModel.ISupportInitialize)trackLTMax).BeginInit(); ((System.ComponentModel.ISupportInitialize)trackLTMin).BeginInit(); panelLS.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)pictureBox3).BeginInit(); ((System.ComponentModel.ISupportInitialize)trackLSMax).BeginInit(); ((System.ComponentModel.ISupportInitialize)trackLSMin).BeginInit(); panelBindings.SuspendLayout(); panelBinding.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)pictureAlly).BeginInit(); panelVibra.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)pictureBox5).BeginInit(); ((System.ComponentModel.ISupportInitialize)trackVibra).BeginInit(); SuspendLayout(); // // panelDeadzones // panelDeadzones.Controls.Add(panelRight); panelDeadzones.Controls.Add(panelLeft); panelDeadzones.Dock = DockStyle.Top; panelDeadzones.Location = new Point(10, 527); panelDeadzones.Name = "panelDeadzones"; panelDeadzones.Size = new Size(1123, 258); panelDeadzones.TabIndex = 0; // // panelRight // panelRight.AutoSize = true; panelRight.Controls.Add(panelRT); panelRight.Controls.Add(panelRS); panelRight.Dock = DockStyle.Left; panelRight.Location = new Point(560, 0); panelRight.MinimumSize = new Size(560, 0); panelRight.Name = "panelRight"; panelRight.Size = new Size(560, 258); panelRight.TabIndex = 48; // // panelRT // panelRT.AutoSize = true; panelRT.AutoSizeMode = AutoSizeMode.GrowAndShrink; panelRT.Controls.Add(pictureBox4); panelRT.Controls.Add(trackRTMax); panelRT.Controls.Add(labelRT); panelRT.Controls.Add(trackRTMin); panelRT.Controls.Add(labelRTTitle); panelRT.Dock = DockStyle.Top; panelRT.Location = new Point(0, 124); panelRT.Margin = new Padding(4); panelRT.MaximumSize = new Size(0, 124); panelRT.Name = "panelRT"; panelRT.Size = new Size(560, 124); panelRT.TabIndex = 51; // // pictureBox4 // pictureBox4.BackgroundImage = Properties.Resources.icons8_xbox_rt_32; pictureBox4.BackgroundImageLayout = ImageLayout.Zoom; pictureBox4.ErrorImage = null; pictureBox4.InitialImage = null; pictureBox4.Location = new Point(16, 18); pictureBox4.Margin = new Padding(4, 2, 4, 10); pictureBox4.Name = "pictureBox4"; pictureBox4.Size = new Size(32, 32); pictureBox4.TabIndex = 43; pictureBox4.TabStop = false; // // trackRTMax // trackRTMax.Location = new Point(272, 48); trackRTMax.Margin = new Padding(4, 2, 4, 2); trackRTMax.Maximum = 100; trackRTMax.Minimum = 50; trackRTMax.Name = "trackRTMax"; trackRTMax.RightToLeft = RightToLeft.No; trackRTMax.Size = new Size(280, 90); trackRTMax.TabIndex = 30; trackRTMax.TickFrequency = 5; trackRTMax.TickStyle = TickStyle.TopLeft; trackRTMax.Value = 100; // // labelRT // labelRT.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point); labelRT.Location = new Point(363, 13); labelRT.Margin = new Padding(4, 0, 4, 0); labelRT.Name = "labelRT"; labelRT.Size = new Size(176, 32); labelRT.TabIndex = 29; labelRT.Text = "0 - 100%"; labelRT.TextAlign = ContentAlignment.TopRight; // // trackRTMin // trackRTMin.LargeChange = 100; trackRTMin.Location = new Point(6, 48); trackRTMin.Margin = new Padding(4, 2, 4, 2); trackRTMin.Maximum = 50; trackRTMin.Name = "trackRTMin"; trackRTMin.RightToLeft = RightToLeft.No; trackRTMin.Size = new Size(280, 90); trackRTMin.SmallChange = 10; trackRTMin.TabIndex = 18; trackRTMin.TickFrequency = 5; trackRTMin.TickStyle = TickStyle.TopLeft; // // labelRTTitle // labelRTTitle.AutoSize = true; labelRTTitle.Location = new Point(56, 16); labelRTTitle.Margin = new Padding(4, 0, 4, 0); labelRTTitle.Name = "labelRTTitle"; labelRTTitle.Size = new Size(276, 32); labelRTTitle.TabIndex = 17; labelRTTitle.Text = "Right Trigger Deadzones"; // // panelRS // panelRS.AutoSize = true; panelRS.AutoSizeMode = AutoSizeMode.GrowAndShrink; panelRS.Controls.Add(pictureBox1); panelRS.Controls.Add(trackRSMax); panelRS.Controls.Add(labelRS); panelRS.Controls.Add(trackRSMin); panelRS.Controls.Add(labelRSTitle); panelRS.Dock = DockStyle.Top; panelRS.Location = new Point(0, 0); panelRS.Margin = new Padding(4); panelRS.MaximumSize = new Size(0, 124); panelRS.Name = "panelRS"; panelRS.Size = new Size(560, 124); panelRS.TabIndex = 50; // // pictureBox1 // pictureBox1.BackgroundImage = Properties.Resources.icons8_joystick_32; pictureBox1.BackgroundImageLayout = ImageLayout.Zoom; pictureBox1.ErrorImage = null; pictureBox1.InitialImage = null; pictureBox1.Location = new Point(16, 14); pictureBox1.Margin = new Padding(4, 2, 4, 10); pictureBox1.Name = "pictureBox1"; pictureBox1.Size = new Size(32, 32); pictureBox1.TabIndex = 43; pictureBox1.TabStop = false; // // trackRSMax // trackRSMax.Location = new Point(272, 48); trackRSMax.Margin = new Padding(4, 2, 4, 2); trackRSMax.Maximum = 100; trackRSMax.Minimum = 50; trackRSMax.Name = "trackRSMax"; trackRSMax.RightToLeft = RightToLeft.No; trackRSMax.Size = new Size(280, 90); trackRSMax.TabIndex = 30; trackRSMax.TickFrequency = 5; trackRSMax.TickStyle = TickStyle.TopLeft; trackRSMax.Value = 100; // // labelRS // labelRS.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point); labelRS.Location = new Point(363, 13); labelRS.Margin = new Padding(4, 0, 4, 0); labelRS.Name = "labelRS"; labelRS.Size = new Size(176, 32); labelRS.TabIndex = 29; labelRS.Text = "0 - 100%"; labelRS.TextAlign = ContentAlignment.TopRight; // // trackRSMin // trackRSMin.LargeChange = 100; trackRSMin.Location = new Point(6, 48); trackRSMin.Margin = new Padding(4, 2, 4, 2); trackRSMin.Maximum = 50; trackRSMin.Name = "trackRSMin"; trackRSMin.RightToLeft = RightToLeft.No; trackRSMin.Size = new Size(280, 90); trackRSMin.SmallChange = 10; trackRSMin.TabIndex = 18; trackRSMin.TickFrequency = 5; trackRSMin.TickStyle = TickStyle.TopLeft; // // labelRSTitle // labelRSTitle.AutoSize = true; labelRSTitle.Location = new Point(56, 14); labelRSTitle.Margin = new Padding(4, 0, 4, 0); labelRSTitle.Name = "labelRSTitle"; labelRSTitle.Size = new Size(251, 32); labelRSTitle.TabIndex = 17; labelRSTitle.Text = "Right Stick Deadzones"; // // panelLeft // panelLeft.AutoSize = true; panelLeft.Controls.Add(panelLT); panelLeft.Controls.Add(panelLS); panelLeft.Dock = DockStyle.Left; panelLeft.Location = new Point(0, 0); panelLeft.Margin = new Padding(4); panelLeft.MinimumSize = new Size(560, 0); panelLeft.Name = "panelLeft"; panelLeft.Padding = new Padding(0, 0, 0, 18); panelLeft.Size = new Size(560, 258); panelLeft.TabIndex = 47; // // panelLT // panelLT.AutoSize = true; panelLT.AutoSizeMode = AutoSizeMode.GrowAndShrink; panelLT.Controls.Add(pictureBox2); panelLT.Controls.Add(trackLTMax); panelLT.Controls.Add(labelLT); panelLT.Controls.Add(trackLTMin); panelLT.Controls.Add(labelLTTitle); panelLT.Dock = DockStyle.Top; panelLT.Location = new Point(0, 124); panelLT.Margin = new Padding(4); panelLT.MaximumSize = new Size(0, 124); panelLT.Name = "panelLT"; panelLT.Size = new Size(560, 124); panelLT.TabIndex = 51; // // pictureBox2 // pictureBox2.BackgroundImage = Properties.Resources.icons8_xbox_lt_32; pictureBox2.BackgroundImageLayout = ImageLayout.Zoom; pictureBox2.ErrorImage = null; pictureBox2.InitialImage = null; pictureBox2.Location = new Point(20, 14); pictureBox2.Margin = new Padding(4, 2, 4, 10); pictureBox2.Name = "pictureBox2"; pictureBox2.Size = new Size(32, 32); pictureBox2.TabIndex = 42; pictureBox2.TabStop = false; // // trackLTMax // trackLTMax.Location = new Point(272, 48); trackLTMax.Margin = new Padding(4, 2, 4, 2); trackLTMax.Maximum = 100; trackLTMax.Minimum = 50; trackLTMax.Name = "trackLTMax"; trackLTMax.RightToLeft = RightToLeft.No; trackLTMax.Size = new Size(280, 90); trackLTMax.TabIndex = 30; trackLTMax.TickFrequency = 5; trackLTMax.TickStyle = TickStyle.TopLeft; trackLTMax.Value = 100; // // labelLT // labelLT.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point); labelLT.Location = new Point(363, 13); labelLT.Margin = new Padding(4, 0, 4, 0); labelLT.Name = "labelLT"; labelLT.Size = new Size(176, 32); labelLT.TabIndex = 29; labelLT.Text = "0 - 100%"; labelLT.TextAlign = ContentAlignment.TopRight; // // trackLTMin // trackLTMin.LargeChange = 100; trackLTMin.Location = new Point(6, 48); trackLTMin.Margin = new Padding(4, 2, 4, 2); trackLTMin.Maximum = 50; trackLTMin.Name = "trackLTMin"; trackLTMin.RightToLeft = RightToLeft.No; trackLTMin.Size = new Size(280, 90); trackLTMin.SmallChange = 10; trackLTMin.TabIndex = 18; trackLTMin.TickFrequency = 5; trackLTMin.TickStyle = TickStyle.TopLeft; // // labelLTTitle // labelLTTitle.AutoSize = true; labelLTTitle.Location = new Point(60, 14); labelLTTitle.Margin = new Padding(4, 0, 4, 0); labelLTTitle.Name = "labelLTTitle"; labelLTTitle.Size = new Size(260, 32); labelLTTitle.TabIndex = 17; labelLTTitle.Text = "Left Trigger Deadzones"; // // panelLS // panelLS.AutoSize = true; panelLS.AutoSizeMode = AutoSizeMode.GrowAndShrink; panelLS.Controls.Add(pictureBox3); panelLS.Controls.Add(trackLSMax); panelLS.Controls.Add(labelLS); panelLS.Controls.Add(trackLSMin); panelLS.Controls.Add(labelLSTitle); panelLS.Dock = DockStyle.Top; panelLS.Location = new Point(0, 0); panelLS.Margin = new Padding(4); panelLS.MaximumSize = new Size(0, 124); panelLS.Name = "panelLS"; panelLS.Size = new Size(560, 124); panelLS.TabIndex = 48; // // pictureBox3 // pictureBox3.BackgroundImage = Properties.Resources.icons8_joystick_32; pictureBox3.BackgroundImageLayout = ImageLayout.Zoom; pictureBox3.ErrorImage = null; pictureBox3.InitialImage = null; pictureBox3.Location = new Point(20, 13); pictureBox3.Margin = new Padding(4, 2, 4, 10); pictureBox3.Name = "pictureBox3"; pictureBox3.Size = new Size(32, 32); pictureBox3.TabIndex = 42; pictureBox3.TabStop = false; // // trackLSMax // trackLSMax.Location = new Point(272, 48); trackLSMax.Margin = new Padding(4, 2, 4, 2); trackLSMax.Maximum = 100; trackLSMax.Minimum = 50; trackLSMax.Name = "trackLSMax"; trackLSMax.RightToLeft = RightToLeft.No; trackLSMax.Size = new Size(280, 90); trackLSMax.TabIndex = 30; trackLSMax.TickFrequency = 5; trackLSMax.TickStyle = TickStyle.TopLeft; trackLSMax.Value = 100; // // labelLS // labelLS.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point); labelLS.Location = new Point(363, 13); labelLS.Margin = new Padding(4, 0, 4, 0); labelLS.Name = "labelLS"; labelLS.Size = new Size(176, 32); labelLS.TabIndex = 29; labelLS.Text = "0 - 100%"; labelLS.TextAlign = ContentAlignment.TopRight; // // trackLSMin // trackLSMin.LargeChange = 100; trackLSMin.Location = new Point(6, 48); trackLSMin.Margin = new Padding(4, 2, 4, 2); trackLSMin.Maximum = 50; trackLSMin.Name = "trackLSMin"; trackLSMin.RightToLeft = RightToLeft.No; trackLSMin.Size = new Size(280, 90); trackLSMin.SmallChange = 10; trackLSMin.TabIndex = 18; trackLSMin.TickFrequency = 5; trackLSMin.TickStyle = TickStyle.TopLeft; // // labelLSTitle // labelLSTitle.AutoSize = true; labelLSTitle.Location = new Point(56, 13); labelLSTitle.Margin = new Padding(4, 0, 4, 0); labelLSTitle.Name = "labelLSTitle"; labelLSTitle.Size = new Size(235, 32); labelLSTitle.TabIndex = 17; labelLSTitle.Text = "Left Stick Deadzones"; // // buttonReset // buttonReset.Activated = false; buttonReset.Anchor = AnchorStyles.Bottom | AnchorStyles.Left; buttonReset.BackColor = SystemColors.ControlLight; buttonReset.BorderColor = Color.Transparent; buttonReset.BorderRadius = 2; buttonReset.FlatStyle = FlatStyle.Flat; buttonReset.Location = new Point(944, 39); buttonReset.Margin = new Padding(4, 2, 4, 2); buttonReset.Name = "buttonReset"; buttonReset.Secondary = true; buttonReset.Size = new Size(165, 50); buttonReset.TabIndex = 55; buttonReset.Text = "Reset"; buttonReset.UseVisualStyleBackColor = false; // // panelBindings // panelBindings.Controls.Add(panelBinding); panelBindings.Controls.Add(buttonView); panelBindings.Controls.Add(buttonLS); panelBindings.Controls.Add(buttonLT); panelBindings.Controls.Add(buttonLB); panelBindings.Controls.Add(buttonDPR); panelBindings.Controls.Add(buttonDPL); panelBindings.Controls.Add(buttonDPD); panelBindings.Controls.Add(buttonDPU); panelBindings.Controls.Add(buttonM2); panelBindings.Controls.Add(buttonM1); panelBindings.Controls.Add(buttonRS); panelBindings.Controls.Add(buttonMenu); panelBindings.Controls.Add(buttonRT); panelBindings.Controls.Add(buttonRB); panelBindings.Controls.Add(buttonB); panelBindings.Controls.Add(buttonA); panelBindings.Controls.Add(buttonY); panelBindings.Controls.Add(buttonX); panelBindings.Controls.Add(pictureAlly); panelBindings.Dock = DockStyle.Top; panelBindings.Location = new Point(10, 10); panelBindings.Name = "panelBindings"; panelBindings.Size = new Size(1123, 517); panelBindings.TabIndex = 1; // // panelBinding // panelBinding.Controls.Add(labelBinding); panelBinding.Controls.Add(labelSecondary); panelBinding.Controls.Add(labelPrimary); panelBinding.Controls.Add(comboSecondary); panelBinding.Controls.Add(comboPrimary); panelBinding.Location = new Point(372, 174); panelBinding.Name = "panelBinding"; panelBinding.Size = new Size(400, 186); panelBinding.TabIndex = 37; panelBinding.Visible = false; // // labelBinding // labelBinding.AutoSize = true; labelBinding.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point); labelBinding.Location = new Point(2, 11); labelBinding.Name = "labelBinding"; labelBinding.Size = new Size(183, 32); labelBinding.TabIndex = 31; labelBinding.Text = "Binding: Menu"; // // labelSecondary // labelSecondary.AutoSize = true; labelSecondary.Location = new Point(2, 122); labelSecondary.Name = "labelSecondary"; labelSecondary.Size = new Size(125, 32); labelSecondary.TabIndex = 30; labelSecondary.Text = "Secondary"; // // labelPrimary // labelPrimary.AutoSize = true; labelPrimary.Location = new Point(2, 63); labelPrimary.Name = "labelPrimary"; labelPrimary.Size = new Size(94, 32); labelPrimary.TabIndex = 29; labelPrimary.Text = "Primary"; // // comboSecondary // comboSecondary.BorderColor = Color.White; comboSecondary.ButtonColor = Color.FromArgb(255, 255, 255); comboSecondary.FlatStyle = FlatStyle.Flat; comboSecondary.Font = new Font("Segoe UI", 9F, FontStyle.Regular, GraphicsUnit.Point); comboSecondary.FormattingEnabled = true; comboSecondary.ItemHeight = 32; comboSecondary.Location = new Point(133, 121); comboSecondary.Margin = new Padding(4, 11, 4, 8); comboSecondary.Name = "comboSecondary"; comboSecondary.Size = new Size(254, 40); comboSecondary.TabIndex = 28; // // comboPrimary // comboPrimary.BorderColor = Color.White; comboPrimary.ButtonColor = Color.FromArgb(255, 255, 255); comboPrimary.FlatStyle = FlatStyle.Flat; comboPrimary.Font = new Font("Segoe UI", 9F, FontStyle.Regular, GraphicsUnit.Point); comboPrimary.FormattingEnabled = true; comboPrimary.ItemHeight = 32; comboPrimary.Location = new Point(133, 60); comboPrimary.Margin = new Padding(4, 11, 4, 8); comboPrimary.Name = "comboPrimary"; comboPrimary.Size = new Size(254, 40); comboPrimary.TabIndex = 27; // // buttonView // buttonView.Activated = false; buttonView.BackColor = SystemColors.ControlLight; buttonView.BorderColor = Color.Transparent; buttonView.BorderRadius = 5; buttonView.FlatAppearance.BorderSize = 0; buttonView.FlatStyle = FlatStyle.Flat; buttonView.ForeColor = SystemColors.ControlText; buttonView.ImageAlign = ContentAlignment.MiddleRight; buttonView.Location = new Point(175, 26); buttonView.Margin = new Padding(4); buttonView.Name = "buttonView"; buttonView.Secondary = true; buttonView.Size = new Size(147, 55); buttonView.TabIndex = 36; buttonView.Text = "View"; buttonView.TextImageRelation = TextImageRelation.ImageBeforeText; buttonView.UseVisualStyleBackColor = false; // // buttonLS // buttonLS.Activated = false; buttonLS.BackColor = SystemColors.ControlLight; buttonLS.BorderColor = Color.Transparent; buttonLS.BorderRadius = 5; buttonLS.FlatAppearance.BorderSize = 0; buttonLS.FlatStyle = FlatStyle.Flat; buttonLS.ForeColor = SystemColors.ControlText; buttonLS.ImageAlign = ContentAlignment.MiddleRight; buttonLS.Location = new Point(20, 403); buttonLS.Margin = new Padding(4); buttonLS.Name = "buttonLS"; buttonLS.Secondary = true; buttonLS.Size = new Size(147, 55); buttonLS.TabIndex = 35; buttonLS.Text = "LStick"; buttonLS.TextImageRelation = TextImageRelation.ImageBeforeText; buttonLS.UseVisualStyleBackColor = false; // // buttonLT // buttonLT.Activated = false; buttonLT.BackColor = SystemColors.ControlLight; buttonLT.BorderColor = Color.Transparent; buttonLT.BorderRadius = 5; buttonLT.FlatAppearance.BorderSize = 0; buttonLT.FlatStyle = FlatStyle.Flat; buttonLT.ForeColor = SystemColors.ControlText; buttonLT.ImageAlign = ContentAlignment.MiddleRight; buttonLT.Location = new Point(20, 88); buttonLT.Margin = new Padding(4); buttonLT.Name = "buttonLT"; buttonLT.Secondary = true; buttonLT.Size = new Size(147, 55); buttonLT.TabIndex = 34; buttonLT.Text = "LTrigger"; buttonLT.TextImageRelation = TextImageRelation.ImageBeforeText; buttonLT.UseVisualStyleBackColor = false; // // buttonLB // buttonLB.Activated = false; buttonLB.BackColor = SystemColors.ControlLight; buttonLB.BorderColor = Color.Transparent; buttonLB.BorderRadius = 5; buttonLB.FlatAppearance.BorderSize = 0; buttonLB.FlatStyle = FlatStyle.Flat; buttonLB.ForeColor = SystemColors.ControlText; buttonLB.ImageAlign = ContentAlignment.MiddleRight; buttonLB.Location = new Point(20, 25); buttonLB.Margin = new Padding(4); buttonLB.Name = "buttonLB"; buttonLB.Secondary = true; buttonLB.Size = new Size(147, 55); buttonLB.TabIndex = 33; buttonLB.Text = "LBumper"; buttonLB.TextImageRelation = TextImageRelation.ImageBeforeText; buttonLB.UseVisualStyleBackColor = false; // // buttonDPR // buttonDPR.Activated = false; buttonDPR.BackColor = SystemColors.ControlLight; buttonDPR.BorderColor = Color.Transparent; buttonDPR.BorderRadius = 5; buttonDPR.FlatAppearance.BorderSize = 0; buttonDPR.FlatStyle = FlatStyle.Flat; buttonDPR.ForeColor = SystemColors.ControlText; buttonDPR.ImageAlign = ContentAlignment.MiddleRight; buttonDPR.Location = new Point(20, 340); buttonDPR.Margin = new Padding(4); buttonDPR.Name = "buttonDPR"; buttonDPR.Secondary = true; buttonDPR.Size = new Size(147, 55); buttonDPR.TabIndex = 32; buttonDPR.Text = "DpadRight"; buttonDPR.TextImageRelation = TextImageRelation.ImageBeforeText; buttonDPR.UseVisualStyleBackColor = false; // // buttonDPL // buttonDPL.Activated = false; buttonDPL.BackColor = SystemColors.ControlLight; buttonDPL.BorderColor = Color.Transparent; buttonDPL.BorderRadius = 5; buttonDPL.FlatAppearance.BorderSize = 0; buttonDPL.FlatStyle = FlatStyle.Flat; buttonDPL.ForeColor = SystemColors.ControlText; buttonDPL.ImageAlign = ContentAlignment.MiddleRight; buttonDPL.Location = new Point(20, 277); buttonDPL.Margin = new Padding(4); buttonDPL.Name = "buttonDPL"; buttonDPL.Secondary = true; buttonDPL.Size = new Size(147, 55); buttonDPL.TabIndex = 31; buttonDPL.Text = "DpadLeft"; buttonDPL.TextImageRelation = TextImageRelation.ImageBeforeText; buttonDPL.UseVisualStyleBackColor = false; // // buttonDPD // buttonDPD.Activated = false; buttonDPD.BackColor = SystemColors.ControlLight; buttonDPD.BorderColor = Color.Transparent; buttonDPD.BorderRadius = 5; buttonDPD.FlatAppearance.BorderSize = 0; buttonDPD.FlatStyle = FlatStyle.Flat; buttonDPD.ForeColor = SystemColors.ControlText; buttonDPD.ImageAlign = ContentAlignment.MiddleRight; buttonDPD.Location = new Point(20, 214); buttonDPD.Margin = new Padding(4); buttonDPD.Name = "buttonDPD"; buttonDPD.Secondary = true; buttonDPD.Size = new Size(147, 55); buttonDPD.TabIndex = 30; buttonDPD.Text = "DpadDown"; buttonDPD.TextImageRelation = TextImageRelation.ImageBeforeText; buttonDPD.UseVisualStyleBackColor = false; // // buttonDPU // buttonDPU.Activated = false; buttonDPU.BackColor = SystemColors.ControlLight; buttonDPU.BorderColor = Color.Transparent; buttonDPU.BorderRadius = 5; buttonDPU.FlatAppearance.BorderSize = 0; buttonDPU.FlatStyle = FlatStyle.Flat; buttonDPU.ForeColor = SystemColors.ControlText; buttonDPU.ImageAlign = ContentAlignment.MiddleRight; buttonDPU.Location = new Point(20, 151); buttonDPU.Margin = new Padding(4); buttonDPU.Name = "buttonDPU"; buttonDPU.Secondary = true; buttonDPU.Size = new Size(147, 55); buttonDPU.TabIndex = 29; buttonDPU.Text = "DpadUp"; buttonDPU.TextImageRelation = TextImageRelation.ImageBeforeText; buttonDPU.UseVisualStyleBackColor = false; // // buttonM2 // buttonM2.Activated = false; buttonM2.BackColor = SystemColors.ControlLight; buttonM2.BorderColor = Color.Transparent; buttonM2.BorderRadius = 5; buttonM2.FlatAppearance.BorderSize = 0; buttonM2.FlatStyle = FlatStyle.Flat; buttonM2.ForeColor = SystemColors.ControlText; buttonM2.ImageAlign = ContentAlignment.MiddleRight; buttonM2.Location = new Point(330, 26); buttonM2.Margin = new Padding(4); buttonM2.Name = "buttonM2"; buttonM2.Secondary = true; buttonM2.Size = new Size(147, 55); buttonM2.TabIndex = 28; buttonM2.Text = "M2"; buttonM2.TextImageRelation = TextImageRelation.ImageBeforeText; buttonM2.UseVisualStyleBackColor = false; // // buttonM1 // buttonM1.Activated = false; buttonM1.BackColor = SystemColors.ControlLight; buttonM1.BorderColor = Color.Transparent; buttonM1.BorderRadius = 5; buttonM1.FlatAppearance.BorderSize = 0; buttonM1.FlatStyle = FlatStyle.Flat; buttonM1.ForeColor = SystemColors.ControlText; buttonM1.ImageAlign = ContentAlignment.MiddleRight; buttonM1.Location = new Point(650, 26); buttonM1.Margin = new Padding(4); buttonM1.Name = "buttonM1"; buttonM1.Secondary = true; buttonM1.Size = new Size(147, 55); buttonM1.TabIndex = 27; buttonM1.Text = "M1"; buttonM1.TextImageRelation = TextImageRelation.ImageBeforeText; buttonM1.UseVisualStyleBackColor = false; // // buttonRS // buttonRS.Activated = false; buttonRS.BackColor = SystemColors.ControlLight; buttonRS.BorderColor = Color.Transparent; buttonRS.BorderRadius = 5; buttonRS.FlatAppearance.BorderSize = 0; buttonRS.FlatStyle = FlatStyle.Flat; buttonRS.ForeColor = SystemColors.ControlText; buttonRS.ImageAlign = ContentAlignment.MiddleRight; buttonRS.Location = new Point(962, 403); buttonRS.Margin = new Padding(4); buttonRS.Name = "buttonRS"; buttonRS.Secondary = true; buttonRS.Size = new Size(147, 55); buttonRS.TabIndex = 23; buttonRS.Text = "RStick"; buttonRS.TextImageRelation = TextImageRelation.ImageBeforeText; buttonRS.UseVisualStyleBackColor = false; // // buttonMenu // buttonMenu.Activated = false; buttonMenu.BackColor = SystemColors.ControlLight; buttonMenu.BorderColor = Color.Transparent; buttonMenu.BorderRadius = 5; buttonMenu.FlatAppearance.BorderSize = 0; buttonMenu.FlatStyle = FlatStyle.Flat; buttonMenu.ForeColor = SystemColors.ControlText; buttonMenu.ImageAlign = ContentAlignment.MiddleRight; buttonMenu.Location = new Point(805, 26); buttonMenu.Margin = new Padding(4); buttonMenu.Name = "buttonMenu"; buttonMenu.Secondary = true; buttonMenu.Size = new Size(147, 55); buttonMenu.TabIndex = 22; buttonMenu.Text = "Menu"; buttonMenu.TextImageRelation = TextImageRelation.ImageBeforeText; buttonMenu.UseVisualStyleBackColor = false; // // buttonRT // buttonRT.Activated = false; buttonRT.BackColor = SystemColors.ControlLight; buttonRT.BorderColor = Color.Transparent; buttonRT.BorderRadius = 5; buttonRT.FlatAppearance.BorderSize = 0; buttonRT.FlatStyle = FlatStyle.Flat; buttonRT.ForeColor = SystemColors.ControlText; buttonRT.ImageAlign = ContentAlignment.MiddleRight; buttonRT.Location = new Point(962, 88); buttonRT.Margin = new Padding(4); buttonRT.Name = "buttonRT"; buttonRT.Secondary = true; buttonRT.Size = new Size(147, 55); buttonRT.TabIndex = 21; buttonRT.Text = "RTrigger"; buttonRT.TextImageRelation = TextImageRelation.ImageBeforeText; buttonRT.UseVisualStyleBackColor = false; // // buttonRB // buttonRB.Activated = false; buttonRB.BackColor = SystemColors.ControlLight; buttonRB.BorderColor = Color.Transparent; buttonRB.BorderRadius = 5; buttonRB.FlatAppearance.BorderSize = 0; buttonRB.FlatStyle = FlatStyle.Flat; buttonRB.ForeColor = SystemColors.ControlText; buttonRB.ImageAlign = ContentAlignment.MiddleRight; buttonRB.Location = new Point(962, 25); buttonRB.Margin = new Padding(4); buttonRB.Name = "buttonRB"; buttonRB.Secondary = true; buttonRB.Size = new Size(147, 55); buttonRB.TabIndex = 20; buttonRB.Text = "RBumper"; buttonRB.TextImageRelation = TextImageRelation.ImageBeforeText; buttonRB.UseVisualStyleBackColor = false; // // buttonB // buttonB.Activated = false; buttonB.BackColor = SystemColors.ControlLight; buttonB.BorderColor = Color.Transparent; buttonB.BorderRadius = 5; buttonB.FlatAppearance.BorderSize = 0; buttonB.FlatStyle = FlatStyle.Flat; buttonB.ForeColor = SystemColors.ControlText; buttonB.ImageAlign = ContentAlignment.MiddleRight; buttonB.Location = new Point(962, 340); buttonB.Margin = new Padding(4); buttonB.Name = "buttonB"; buttonB.Secondary = true; buttonB.Size = new Size(147, 55); buttonB.TabIndex = 19; buttonB.Text = "B"; buttonB.TextImageRelation = TextImageRelation.ImageBeforeText; buttonB.UseVisualStyleBackColor = false; // // buttonA // buttonA.Activated = false; buttonA.BackColor = SystemColors.ControlLight; buttonA.BorderColor = Color.Transparent; buttonA.BorderRadius = 5; buttonA.FlatAppearance.BorderSize = 0; buttonA.FlatStyle = FlatStyle.Flat; buttonA.ForeColor = SystemColors.ControlText; buttonA.ImageAlign = ContentAlignment.MiddleRight; buttonA.Location = new Point(962, 277); buttonA.Margin = new Padding(4); buttonA.Name = "buttonA"; buttonA.Secondary = true; buttonA.Size = new Size(147, 55); buttonA.TabIndex = 18; buttonA.Text = "A"; buttonA.TextImageRelation = TextImageRelation.ImageBeforeText; buttonA.UseVisualStyleBackColor = false; // // buttonY // buttonY.Activated = false; buttonY.BackColor = SystemColors.ControlLight; buttonY.BorderColor = Color.Transparent; buttonY.BorderRadius = 5; buttonY.FlatAppearance.BorderSize = 0; buttonY.FlatStyle = FlatStyle.Flat; buttonY.ForeColor = SystemColors.ControlText; buttonY.ImageAlign = ContentAlignment.MiddleRight; buttonY.Location = new Point(962, 214); buttonY.Margin = new Padding(4); buttonY.Name = "buttonY"; buttonY.Secondary = true; buttonY.Size = new Size(147, 55); buttonY.TabIndex = 17; buttonY.Text = "Y"; buttonY.TextImageRelation = TextImageRelation.ImageBeforeText; buttonY.UseVisualStyleBackColor = false; // // buttonX // buttonX.Activated = false; buttonX.BackColor = SystemColors.ControlLight; buttonX.BorderColor = Color.Transparent; buttonX.BorderRadius = 5; buttonX.FlatAppearance.BorderSize = 0; buttonX.FlatStyle = FlatStyle.Flat; buttonX.ForeColor = SystemColors.ControlText; buttonX.ImageAlign = ContentAlignment.MiddleRight; buttonX.Location = new Point(962, 151); buttonX.Margin = new Padding(4); buttonX.Name = "buttonX"; buttonX.Secondary = true; buttonX.Size = new Size(147, 55); buttonX.TabIndex = 16; buttonX.Text = "X"; buttonX.TextImageRelation = TextImageRelation.ImageBeforeText; buttonX.UseVisualStyleBackColor = false; // // pictureAlly // pictureAlly.BackgroundImage = Properties.Resources.ally; pictureAlly.BackgroundImageLayout = ImageLayout.Zoom; pictureAlly.Location = new Point(185, 97); pictureAlly.Name = "pictureAlly"; pictureAlly.Size = new Size(767, 354); pictureAlly.TabIndex = 0; pictureAlly.TabStop = false; // // panelVibra // panelVibra.AutoSize = true; panelVibra.AutoSizeMode = AutoSizeMode.GrowAndShrink; panelVibra.Controls.Add(checkController); panelVibra.Controls.Add(buttonReset); panelVibra.Controls.Add(pictureBox5); panelVibra.Controls.Add(labelVibra); panelVibra.Controls.Add(labelVibraTitle); panelVibra.Controls.Add(trackVibra); panelVibra.Dock = DockStyle.Top; panelVibra.Location = new Point(10, 785); panelVibra.Margin = new Padding(4); panelVibra.MaximumSize = new Size(0, 124); panelVibra.Name = "panelVibra"; panelVibra.Size = new Size(1123, 124); panelVibra.TabIndex = 47; // // checkController // checkController.Anchor = AnchorStyles.Bottom | AnchorStyles.Left; checkController.AutoSize = true; checkController.BackColor = SystemColors.ControlLight; checkController.Location = new Point(650, 41); checkController.Margin = new Padding(0); checkController.Name = "checkController"; checkController.Padding = new Padding(16, 6, 16, 6); checkController.Size = new Size(269, 48); checkController.TabIndex = 56; checkController.Text = "Disable Controller"; checkController.UseVisualStyleBackColor = false; // // pictureBox5 // pictureBox5.BackgroundImage = Properties.Resources.icons8_soonvibes_32; pictureBox5.BackgroundImageLayout = ImageLayout.Zoom; pictureBox5.ErrorImage = null; pictureBox5.InitialImage = null; pictureBox5.Location = new Point(13, 14); pictureBox5.Margin = new Padding(4, 2, 4, 10); pictureBox5.Name = "pictureBox5"; pictureBox5.Size = new Size(32, 32); pictureBox5.TabIndex = 45; pictureBox5.TabStop = false; // // labelVibra // labelVibra.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point); labelVibra.Location = new Point(408, 14); labelVibra.Margin = new Padding(4, 0, 4, 0); labelVibra.Name = "labelVibra"; labelVibra.Size = new Size(124, 32); labelVibra.TabIndex = 44; labelVibra.Text = "100%"; labelVibra.TextAlign = ContentAlignment.TopRight; // // labelVibraTitle // labelVibraTitle.AutoSize = true; labelVibraTitle.Location = new Point(54, 14); labelVibraTitle.Margin = new Padding(4, 0, 4, 0); labelVibraTitle.Name = "labelVibraTitle"; labelVibraTitle.Size = new Size(209, 32); labelVibraTitle.TabIndex = 43; labelVibraTitle.Text = "Vibration Strength"; // // trackVibra // trackVibra.Location = new Point(6, 48); trackVibra.Margin = new Padding(4, 2, 4, 2); trackVibra.Maximum = 100; trackVibra.Name = "trackVibra"; trackVibra.Size = new Size(546, 90); trackVibra.TabIndex = 42; trackVibra.TickFrequency = 5; trackVibra.TickStyle = TickStyle.TopLeft; trackVibra.Value = 100; // // Handheld // AutoScaleDimensions = new SizeF(13F, 32F); AutoScaleMode = AutoScaleMode.Font; AutoSize = true; ClientSize = new Size(1143, 912); Controls.Add(panelVibra); Controls.Add(panelDeadzones); Controls.Add(panelBindings); MaximizeBox = false; MinimizeBox = false; Name = "Handheld"; Padding = new Padding(10); ShowIcon = false; ShowInTaskbar = false; Text = "Controller"; panelDeadzones.ResumeLayout(false); panelDeadzones.PerformLayout(); panelRight.ResumeLayout(false); panelRight.PerformLayout(); panelRT.ResumeLayout(false); panelRT.PerformLayout(); ((System.ComponentModel.ISupportInitialize)pictureBox4).EndInit(); ((System.ComponentModel.ISupportInitialize)trackRTMax).EndInit(); ((System.ComponentModel.ISupportInitialize)trackRTMin).EndInit(); panelRS.ResumeLayout(false); panelRS.PerformLayout(); ((System.ComponentModel.ISupportInitialize)pictureBox1).EndInit(); ((System.ComponentModel.ISupportInitialize)trackRSMax).EndInit(); ((System.ComponentModel.ISupportInitialize)trackRSMin).EndInit(); panelLeft.ResumeLayout(false); panelLeft.PerformLayout(); panelLT.ResumeLayout(false); panelLT.PerformLayout(); ((System.ComponentModel.ISupportInitialize)pictureBox2).EndInit(); ((System.ComponentModel.ISupportInitialize)trackLTMax).EndInit(); ((System.ComponentModel.ISupportInitialize)trackLTMin).EndInit(); panelLS.ResumeLayout(false); panelLS.PerformLayout(); ((System.ComponentModel.ISupportInitialize)pictureBox3).EndInit(); ((System.ComponentModel.ISupportInitialize)trackLSMax).EndInit(); ((System.ComponentModel.ISupportInitialize)trackLSMin).EndInit(); panelBindings.ResumeLayout(false); panelBinding.ResumeLayout(false); panelBinding.PerformLayout(); ((System.ComponentModel.ISupportInitialize)pictureAlly).EndInit(); panelVibra.ResumeLayout(false); panelVibra.PerformLayout(); ((System.ComponentModel.ISupportInitialize)pictureBox5).EndInit(); ((System.ComponentModel.ISupportInitialize)trackVibra).EndInit(); ResumeLayout(false); PerformLayout(); } #endregion private Panel panelDeadzones; private Panel panelRight; private Panel panelRT; private PictureBox pictureBox4; private TrackBar trackRTMax; private Label labelRT; private TrackBar trackRTMin; private Label labelRTTitle; private Panel panelRS; private PictureBox pictureBox1; private TrackBar trackRSMax; private Label labelRS; private TrackBar trackRSMin; private Label labelRSTitle; private Panel panelLeft; private Panel panelLT; private PictureBox pictureBox2; private TrackBar trackLTMax; private Label labelLT; private TrackBar trackLTMin; private Label labelLTTitle; private Panel panelLS; private PictureBox pictureBox3; private TrackBar trackLSMax; private Label labelLS; private TrackBar trackLSMin; private Label labelLSTitle; private Panel panelBindings; private PictureBox pictureAlly; private UI.RButton buttonX; private UI.RButton buttonRS; private UI.RButton buttonMenu; private UI.RButton buttonRT; private UI.RButton buttonRB; private UI.RButton buttonB; private UI.RButton buttonA; private UI.RButton buttonY; private UI.RButton buttonM1; private UI.RButton buttonM2; private UI.RButton buttonLS; private UI.RButton buttonLT; private UI.RButton buttonLB; private UI.RButton buttonDPR; private UI.RButton buttonDPL; private UI.RButton buttonDPD; private UI.RButton buttonDPU; private UI.RButton buttonView; private UI.RButton buttonReset; private Panel panelBinding; private Label labelBinding; private Label labelSecondary; private Label labelPrimary; private UI.RComboBox comboSecondary; private UI.RComboBox comboPrimary; private Panel panelVibra; private PictureBox pictureBox5; private Label labelVibra; private Label labelVibraTitle; private TrackBar trackVibra; private UI.RCheckBox checkController; } } ================================================ FILE: app/Handheld.cs ================================================ using GHelper.Ally; using GHelper.UI; namespace GHelper { public partial class Handheld : RForm { static string activeBinding = ""; static RButton? activeButton; public Handheld() { InitializeComponent(); InitTheme(true); Text = Properties.Strings.Controller; labelLSTitle.Text = Properties.Strings.LSDeadzones; labelRSTitle.Text = Properties.Strings.RSDeadzones; labelLTTitle.Text = Properties.Strings.LTDeadzones; labelRTTitle.Text = Properties.Strings.RTDeadzones; labelVibraTitle.Text = Properties.Strings.VibrationStrength; checkController.Text = Properties.Strings.DisableController; buttonReset.Text = Properties.Strings.Reset; labelPrimary.Text = Properties.Strings.BindingPrimary; labelSecondary.Text = Properties.Strings.BindingSecondary; Shown += Handheld_Shown; Init(); trackLSMin.Scroll += Controller_Scroll; trackLSMax.Scroll += Controller_Scroll; trackRSMin.Scroll += Controller_Scroll; trackRSMax.Scroll += Controller_Scroll; trackLTMin.Scroll += Controller_Scroll; trackLTMax.Scroll += Controller_Scroll; trackRTMin.Scroll += Controller_Scroll; trackRTMax.Scroll += Controller_Scroll; trackVibra.Scroll += Controller_Scroll; buttonReset.Click += ButtonReset_Click; trackLSMin.ValueChanged += Controller_Complete; trackLSMax.ValueChanged += Controller_Complete; trackRSMin.ValueChanged += Controller_Complete; trackRSMax.ValueChanged += Controller_Complete; trackLTMin.ValueChanged += Controller_Complete; trackLTMax.ValueChanged += Controller_Complete; trackRTMin.ValueChanged += Controller_Complete; trackRTMax.ValueChanged += Controller_Complete; trackVibra.ValueChanged += Controller_Complete; ButtonBinding("m1", "M1", buttonM1); ButtonBinding("m2", "M2", buttonM2); ButtonBinding("a", "A", buttonA); ButtonBinding("b", "B", buttonB); ButtonBinding("x", "X", buttonX); ButtonBinding("y", "Y", buttonY); ButtonBinding("du", "DPad Up", buttonDPU); ButtonBinding("dd", "DPad Down", buttonDPD); ButtonBinding("dl", "DPad Left", buttonDPL); ButtonBinding("dr", "DPad Right", buttonDPR); ButtonBinding("rt", "Right Trigger", buttonRT); ButtonBinding("lt", "Left Trigger", buttonLT); ButtonBinding("rb", "Right Bumper", buttonRB); ButtonBinding("lb", "Left Bumper", buttonLB); ButtonBinding("rs", "Right Stick", buttonRS); ButtonBinding("ll", "Left Stick", buttonLS); ButtonBinding("vb", "View", buttonView); ButtonBinding("mb", "Menu", buttonMenu); ComboBinding(comboPrimary); ComboBinding(comboSecondary); checkController.Checked = AppConfig.Is("controller_disabled"); checkController.CheckedChanged += CheckController_CheckedChanged; } private void CheckController_CheckedChanged(object? sender, EventArgs e) { AppConfig.Set("controller_disabled", checkController.Checked ? 1 : 0); AllyControl.DisableXBoxController(checkController.Checked); } private void ComboBinding(RComboBox combo) { combo.DropDownStyle = ComboBoxStyle.DropDownList; combo.DisplayMember = "Value"; combo.ValueMember = "Key"; foreach (var item in AllyControl.BindCodes) combo.Items.Add(new KeyValuePair(item.Key, item.Value)); combo.SelectedValueChanged += Binding_SelectedValueChanged; } private void Binding_SelectedValueChanged(object? sender, EventArgs e) { if (sender is null) return; RComboBox combo = (RComboBox)sender; string value = ((KeyValuePair)combo.SelectedItem).Key; string binding = "bind" + (combo.Name == "comboPrimary" ? "" : "2") + "_" + activeBinding; if (value != "") AppConfig.Set(binding, value); else AppConfig.Remove(binding); VisualiseButton(activeButton, activeBinding); AllyControl.ApplyMode(); } private void SetComboValue(RComboBox combo, string value) { foreach (var item in AllyControl.BindCodes) if (item.Key == value) { combo.SelectedItem = item; return; } combo.SelectedIndex = 0; } private void VisualiseButton(RButton button, string binding) { if (button == null) return; string primary = AppConfig.GetString("bind_" + binding, ""); string secondary = AppConfig.GetString("bind2_" + binding, ""); if (primary != "" || secondary != "") { button.BorderColor = colorStandard; button.Activated = true; } else { button.Activated = false; } } private void ButtonBinding(string binding, string label, RButton button) { button.Click += (sender, EventArgs) => { buttonBinding_Click(sender, EventArgs, binding, label); }; VisualiseButton(button, binding); } void buttonBinding_Click(object sender, EventArgs e, string binding, string label) { if (sender is null) return; RButton button = (RButton)sender; panelBinding.Visible = true; activeButton = button; activeBinding = binding; labelBinding.Text = Properties.Strings.Binding + ": " + label; SetComboValue(comboPrimary, AppConfig.GetString("bind_" + binding, "")); SetComboValue(comboSecondary, AppConfig.GetString("bind2_" + binding, "")); } private void Controller_Complete(object? sender, EventArgs e) { AllyControl.SetDeadzones(); } private void ButtonReset_Click(object? sender, EventArgs e) { trackLSMin.Value = 0; trackLSMax.Value = 100; trackRSMin.Value = 0; trackRSMax.Value = 100; trackLTMin.Value = 0; trackLTMax.Value = 100; trackRTMin.Value = 0; trackRTMax.Value = 100; trackVibra.Value = 100; AppConfig.Remove("ls_min"); AppConfig.Remove("ls_max"); AppConfig.Remove("rs_min"); AppConfig.Remove("rs_max"); AppConfig.Remove("lt_min"); AppConfig.Remove("lt_max"); AppConfig.Remove("rt_min"); AppConfig.Remove("rt_max"); AppConfig.Remove("vibra"); VisualiseController(); } private void Init() { trackLSMin.Value = AppConfig.Get("ls_min", 0); trackLSMax.Value = AppConfig.Get("ls_max", 100); trackRSMin.Value = AppConfig.Get("rs_min", 0); trackRSMax.Value = AppConfig.Get("rs_max", 100); trackLTMin.Value = AppConfig.Get("lt_min", 0); trackLTMax.Value = AppConfig.Get("lt_max", 100); trackRTMin.Value = AppConfig.Get("rt_min", 0); trackRTMax.Value = AppConfig.Get("rt_max", 100); trackVibra.Value = AppConfig.Get("vibra", 100); VisualiseController(); } private void VisualiseController() { labelLS.Text = $"{trackLSMin.Value} - {trackLSMax.Value}%"; labelRS.Text = $"{trackRSMin.Value} - {trackRSMax.Value}%"; labelLT.Text = $"{trackLTMin.Value} - {trackLTMax.Value}%"; labelRT.Text = $"{trackRTMin.Value} - {trackRTMax.Value}%"; labelVibra.Text = $"{trackVibra.Value}%"; } private void Controller_Scroll(object? sender, EventArgs e) { AppConfig.Set("ls_min", trackLSMin.Value); AppConfig.Set("ls_max", trackLSMax.Value); AppConfig.Set("rs_min", trackRSMin.Value); AppConfig.Set("rs_max", trackRSMax.Value); AppConfig.Set("lt_min", trackLTMin.Value); AppConfig.Set("lt_max", trackLTMax.Value); AppConfig.Set("rt_min", trackRTMin.Value); AppConfig.Set("rt_max", trackRTMax.Value); AppConfig.Set("vibra", trackVibra.Value); VisualiseController(); } private void Handheld_Shown(object? sender, EventArgs e) { Height = Program.settingsForm.Height; Top = Program.settingsForm.Top; Left = Program.settingsForm.Left - Width - 5; } } } ================================================ FILE: app/Handheld.resx ================================================  text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 ================================================ FILE: app/HardwareControl.cs ================================================ using GHelper; using GHelper.Battery; using GHelper.Fan; using GHelper.Gpu; using GHelper.Gpu.AMD; using GHelper.Gpu.NVidia; using GHelper.Helpers; using System.Diagnostics; using System.Management; public static class HardwareControl { public static IGpuControl? GpuControl; public static float? cpuTemp = -1; public static float? gpuTemp = -1; public static decimal? batteryRate = 0; public static decimal batteryHealth = -1; public static decimal batteryCapacity = -1; public static decimal? designCapacity; public static decimal? fullCapacity; public static decimal? chargeCapacity; public static string? batteryCharge; public static string? cpuFan; public static string? gpuFan; public static string? midFan; public static int? gpuUse; static long lastUpdate; static bool isPZ13 = AppConfig.IsPZ13(); static bool _chargeWatt = AppConfig.Is("charge_watt"); public static bool chargeWatt { get { return _chargeWatt; } set { AppConfig.Set("charge_watt", value ? 1 : 0); _chargeWatt = value; } } private static int GetGpuUse() { try { int? gpuUse = GpuControl?.GetGpuUse(); Logger.WriteLine("GPU usage: " + GpuControl?.FullName + " " + gpuUse + "%"); if (gpuUse is not null) return (int)gpuUse; } catch (Exception ex) { Debug.WriteLine(ex.ToString()); } return 0; } public static void GetBatteryStatus() { batteryRate = 0; chargeCapacity = 0; try { ManagementScope scope = new ManagementScope("root\\WMI"); ObjectQuery query = new ObjectQuery("SELECT * FROM BatteryStatus"); using ManagementObjectSearcher searcher = new ManagementObjectSearcher(scope, query); foreach (ManagementObject obj in searcher.Get().Cast()) { chargeCapacity = Convert.ToDecimal(obj["RemainingCapacity"]); decimal? discharge = Program.acpi.GetBatteryDischarge(); if (discharge is not null) { batteryRate = discharge; return; } decimal chargeRate = Convert.ToDecimal(obj["ChargeRate"]); decimal dischargeRate = Convert.ToDecimal(obj["DischargeRate"]); if (chargeRate > 0) batteryRate = chargeRate / 1000; else batteryRate = -dischargeRate / 1000; } } catch (Exception ex) { Debug.WriteLine("Discharge Reading: " + ex.Message); } } public static void ReadFullChargeCapacity() { if (fullCapacity > 0) return; try { ManagementScope scope = new ManagementScope("root\\WMI"); ObjectQuery query = new ObjectQuery("SELECT * FROM BatteryFullChargedCapacity"); using ManagementObjectSearcher searcher = new ManagementObjectSearcher(scope, query); foreach (ManagementObject obj in searcher.Get().Cast()) { fullCapacity = Convert.ToDecimal(obj["FullChargedCapacity"]); } } catch (Exception ex) { Debug.WriteLine("Full Charge Reading: " + ex.Message); } } public static void ReadDesignCapacity() { if (designCapacity > 0) return; try { ManagementScope scope = new ManagementScope("root\\WMI"); ObjectQuery query = new ObjectQuery("SELECT * FROM BatteryStaticData"); using ManagementObjectSearcher searcher = new ManagementObjectSearcher(scope, query); foreach (ManagementObject obj in searcher.Get().Cast()) { designCapacity = Convert.ToDecimal(obj["DesignedCapacity"]); } } catch (Exception ex) { Debug.WriteLine("Design Capacity Reading: " + ex.Message); } } public static void RefreshBatteryHealth() { batteryHealth = GetBatteryHealth() * 100; } public static decimal GetBatteryHealth() { if (designCapacity is null) { ReadDesignCapacity(); } ReadFullChargeCapacity(); if (designCapacity is null || fullCapacity is null || designCapacity == 0 || fullCapacity == 0) { return -1; } decimal health = (decimal)fullCapacity / (decimal)designCapacity; Logger.WriteLine("Design Capacity: " + designCapacity + "mWh, Full Charge Capacity: " + fullCapacity + "mWh, Health: " + health + "%"); return health; } public static float? GetCPUTemp() { var last = DateTimeOffset.Now.ToUnixTimeSeconds(); if (Math.Abs(last - lastUpdate) < 2) return cpuTemp; lastUpdate = last; if (isPZ13) return (float)GetCPUTempWMI(); cpuTemp = Program.acpi.DeviceGet(AsusACPI.Temp_CPU); if (cpuTemp < 0) try { using (var ct = new PerformanceCounter("Thermal Zone Information", "Temperature", @"\_TZ.THRM", true)) { cpuTemp = ct.NextValue() - 273; } } catch (Exception ex) { //Debug.WriteLine("Failed reading CPU temp :" + ex.Message); } return cpuTemp; } static double GetCPUTempWMI() { try { string wmiNamespace = @"root\WMI"; string wmiQuery = @"SELECT * FROM MSAcpi_ThermalZoneTemperature WHERE InstanceName = 'ACPI\\QCOM0C5A\\1_0'"; // ACPI\\ThermalZone\\THRM_0 using (ManagementObjectSearcher searcher = new ManagementObjectSearcher(wmiNamespace, wmiQuery)) { foreach (ManagementObject obj in searcher.Get()) { double tempKelvin = Convert.ToDouble(obj["CurrentTemperature"]); return (tempKelvin / 10) - 273.15; } } } catch (Exception ex) { //Logger.WriteLine("Error retrieving temperature: " + ex.Message); } return -1; } public static float? GetGPUTemp() { try { gpuTemp = GpuControl?.GetCurrentTemperature(); } catch (Exception ex) { gpuTemp = -1; //Debug.WriteLine("Failed reading GPU temp :" + ex.Message); } if (gpuTemp is null || gpuTemp < 0) { gpuTemp = Program.acpi.DeviceGet(AsusACPI.Temp_GPU); } return gpuTemp; } public static void ReadSensors(bool log = false) { batteryRate = 0; gpuUse = -1; if (Program.acpi is null) return; cpuFan = FanSensorControl.FormatFan(AsusFan.CPU, Program.acpi.GetFan(AsusFan.CPU)); gpuFan = FanSensorControl.FormatFan(AsusFan.GPU, Program.acpi.GetFan(AsusFan.GPU)); midFan = FanSensorControl.FormatFan(AsusFan.Mid, Program.acpi.GetFan(AsusFan.Mid)); cpuTemp = GetCPUTemp(); gpuTemp = GetGPUTemp(); if (log) Logger.WriteLine($"Temps: {cpuTemp} {gpuTemp} {cpuFan} {gpuFan} {midFan}"); ReadFullChargeCapacity(); GetBatteryStatus(); if (fullCapacity > 0 && chargeCapacity > 0) { batteryCapacity = Math.Min(100, (decimal)chargeCapacity / (decimal)fullCapacity * 100); if (batteryCapacity > 99 && BatteryControl.chargeFull) BatteryControl.UnSetBatteryLimitFull(); if (chargeWatt) { batteryCharge = Math.Round((decimal)chargeCapacity / 1000, 1).ToString() + "Wh"; } else { batteryCharge = Math.Round(batteryCapacity, 1) + "%"; } } } public static double GetBatteryChargePercentage() { double batteryCharge = 0; try { ManagementObjectSearcher searcher = new ManagementObjectSearcher("SELECT * FROM Win32_Battery"); foreach (ManagementObject battery in searcher.Get()) { batteryCharge = Convert.ToDouble(battery["EstimatedChargeRemaining"]); break; // Assuming only one battery } } catch (ManagementException e) { Console.WriteLine("An error occurred while querying for WMI data: " + e.Message); } return batteryCharge; } public static bool IsUsedGPU(int threshold = 10) { if (GetGpuUse() > threshold) { Thread.Sleep(1000); return (GetGpuUse() > threshold); } return false; } public static NvidiaGpuControl? GetNvidiaGpuControl() { if ((bool)GpuControl?.IsNvidia) return (NvidiaGpuControl)GpuControl; else return null; } public static void RecreateGpuControlWithDelay(int delay = 5) { // Re-enabling the discrete GPU takes a bit of time, // so a simple workaround is to refresh again after that happens Task.Run(async () => { await Task.Delay(TimeSpan.FromSeconds(delay)); RecreateGpuControl(); }); } public static void RecreateGpuControl() { if (AppConfig.NoGpu()) return; try { GpuControl?.Dispose(); IGpuControl _gpuControl = new NvidiaGpuControl(); if (_gpuControl.IsValid) { GpuControl = _gpuControl; Logger.WriteLine(GpuControl.FullName); return; } _gpuControl.Dispose(); _gpuControl = new AmdGpuControl(); if (_gpuControl.IsValid) { GpuControl = _gpuControl; if (GpuControl.FullName.Contains("6850M")) AppConfig.Set("xgm_special", 1); Logger.WriteLine(GpuControl.FullName); return; } _gpuControl.Dispose(); Logger.WriteLine("dGPU not found"); GpuControl = null; } catch (Exception ex) { Debug.WriteLine("Can't connect to GPU " + ex.ToString()); } } public static void KillGPUApps() { List tokill = new() { "EADesktop", "epicgameslauncher", "ASUSSmartDisplayControl" }; foreach (string kill in tokill) ProcessHelper.KillByName(kill); if (AppConfig.Is("kill_gpu_apps") && GpuControl is not null) { GpuControl.KillGPUApps(); } } } ================================================ FILE: app/Helpers/AsusService.cs ================================================ using System.Diagnostics; namespace GHelper.Helpers { public static class AsusService { static List services = new() { "ArmouryCrateControlInterface", "ArmouryCrateProArtService", "AsHidService", "ASUSOptimization", "AsusAppService", "ASUSLinkNear", "ASUSLinkRemote", "ASUSSoftwareManager", "ASUSLiveUpdateAgent", "ASUSSwitch", "ASUSSystemAnalysis", "ASUSSystemDiagnosis", "AsusCertService" }; //"AsusPTPService", static List processesAC = new() { "ArmouryCrateSE.Service", "ArmouryCrate.Service", "LightingService", }; static List servicesAC = new() { "ArmouryCrateSEService", "ArmouryCrateService", "LightingService", }; public static bool IsAsusOptimizationRunning() { return Process.GetProcessesByName("AsusOptimization").Length > 0; } public static bool IsArmouryRunning() { var acService = Process.GetProcessesByName("ArmouryCrate.Service").Length > 0; var lightingService = Process.GetProcessesByName("LightingService").Length > 0; Logger.WriteLine($"AC Service: {acService}, Lighting Service: {lightingService}"); return acService || lightingService; } public static void RunArmouryUninstaller() { Process.Start(new ProcessStartInfo("https://dlcdnets.asus.com/pub/ASUS/mb/14Utilities/Armoury_Crate_Uninstall_Tool.zip") { UseShellExecute = true }); } public static bool IsOSDRunning() { return Process.GetProcessesByName("AsusOSD").Length > 0; } public static int GetRunningCount() { int count = 0; foreach (string service in services) { if (Process.GetProcessesByName(service).Count() > 0) count++; } if (AppConfig.IsStopAC()) foreach (string service in processesAC) { if (Process.GetProcessesByName(service).Count() > 0) { count++; Logger.WriteLine(service); } } return count; } public static void StopAsusServices() { foreach (string service in services) { ProcessHelper.StopDisableService(service); } if (AppConfig.IsStopAC()) { foreach (string service in servicesAC) { ProcessHelper.StopDisableService(service, "Manual"); } Thread.Sleep(1000); } } public static void StartAsusServices() { foreach (string service in services) { ProcessHelper.StartEnableService(service); } if (AppConfig.IsStopAC()) { foreach (string service in servicesAC) { ProcessHelper.StartEnableService(service); } Thread.Sleep(1000); } } } } ================================================ FILE: app/Helpers/Audio.cs ================================================ using NAudio.CoreAudioApi; namespace GHelper.Helpers { internal class Audio { public static bool ToggleMicMute() { using (var enumerator = new MMDeviceEnumerator()) { var commDevice = enumerator.GetDefaultAudioEndpoint(DataFlow.Capture, Role.Communications); var consoleDevice = enumerator.GetDefaultAudioEndpoint(DataFlow.Capture, Role.Console); var mmDevice = enumerator.GetDefaultAudioEndpoint(DataFlow.Capture, Role.Multimedia); bool status = !commDevice.AudioEndpointVolume.Mute; commDevice.AudioEndpointVolume.Mute = status; consoleDevice.AudioEndpointVolume.Mute = status; mmDevice.AudioEndpointVolume.Mute = status; Logger.WriteLine(commDevice.ToString() + ":" + status); Logger.WriteLine(consoleDevice.ToString() + ":" + status); Logger.WriteLine(mmDevice.ToString() + ":" + status); return status; } } public static bool IsMicMuted() { try { using (var deviceEnumerator = new MMDeviceEnumerator()) { var commDevice = deviceEnumerator.GetDefaultAudioEndpoint(DataFlow.Capture, Role.Communications); return commDevice.AudioEndpointVolume.Mute; } } catch (Exception ex) { Logger.WriteLine("Error checking mic mute status: " + ex.Message); return false; // Assume not muted in case of error } } public static bool IsMuted() { try { using (var deviceEnumerator = new MMDeviceEnumerator()) { var defaultDevice = deviceEnumerator.GetDefaultAudioEndpoint(DataFlow.Render, Role.Multimedia); return defaultDevice.AudioEndpointVolume.Mute; } } catch (Exception ex) { Logger.WriteLine("Error checking mute status: " + ex.Message); return false; // Assume not muted in case of error } } } } ================================================ FILE: app/Helpers/ClamshellModeControl.cs ================================================ using GHelper.Display; using GHelper.Mode; using Microsoft.Win32; namespace GHelper.Helpers { internal class ClamshellModeControl { public ClamshellModeControl() { //Save current setting if hibernate or shutdown to prevent reverting the user set option. CheckAndSaveLidAction(); } public bool IsExternalDisplayConnected() { try { var devicesList = ScreenInterrogatory.GetAllDevices(); var devices = devicesList.ToArray(); string internalName = AppConfig.GetString("internal_display"); foreach (var device in devices) { if (device.outputTechnology != ScreenInterrogatory.DISPLAYCONFIG_VIDEO_OUTPUT_TECHNOLOGY.DISPLAYCONFIG_OUTPUT_TECHNOLOGY_INTERNAL && device.outputTechnology != ScreenInterrogatory.DISPLAYCONFIG_VIDEO_OUTPUT_TECHNOLOGY.DISPLAYCONFIG_OUTPUT_TECHNOLOGY_DISPLAYPORT_EMBEDDED && device.monitorFriendlyDeviceName != internalName) { Logger.WriteLine("Found external screen: " + device.monitorFriendlyDeviceName + ":" + device.outputTechnology.ToString()); //Already found one, we do not have to check whether there are more return true; } } } catch (Exception ex) { Logger.WriteLine(ex.ToString()); } return false; } public bool IsClamshellEnabled() { return AppConfig.Is("toggle_clamshell_mode"); } public bool IsChargerConnected() { return SystemInformation.PowerStatus.PowerLineStatus == PowerLineStatus.Online; } public bool IsClamshellReady() { return IsExternalDisplayConnected() && (IsChargerConnected() || AppConfig.Is("clamshell_battery")); } public void ToggleLidAction() { if (!IsClamshellEnabled()) { return; } if (IsClamshellReady()) { EnableClamshellMode(); } else { DisableClamshellMode(); } } public static void DisableClamshellMode() { if (PowerNative.GetLidAction(true) == GetDefaultLidAction()) return; PowerNative.SetLidAction(GetDefaultLidAction(), true); Logger.WriteLine("Disengaging Clamshell Mode"); } public static void EnableClamshellMode() { if (PowerNative.GetLidAction(true) == 0) return; PowerNative.SetLidAction(0, true); Logger.WriteLine("Engaging Clamshell Mode"); } public void UnregisterDisplayEvents() { SystemEvents.DisplaySettingsChanged -= SystemEvents_DisplaySettingsChanged; } public void RegisterDisplayEvents() { SystemEvents.DisplaySettingsChanged += SystemEvents_DisplaySettingsChanged; } private void SystemEvents_DisplaySettingsChanged(object? sender, EventArgs e) { Logger.WriteLine("Display configuration changed."); if (IsClamshellEnabled()) ToggleLidAction(); if (Program.settingsForm.Visible) ScreenControl.InitScreen(); if (AppConfig.IsForceMiniled()) ScreenControl.InitMiniled(); } private static int CheckAndSaveLidAction() { if (AppConfig.Get("clamshell_default_lid_action", -1) != -1) { //Seting was alredy set. Do not touch it return AppConfig.Get("clamshell_default_lid_action", -1); } try { int val = PowerNative.GetLidAction(true); //If it is 0 then it is likely already set by clamshell mdoe //If 0 was set by the user, then why do they even use clamshell mode? //We only care about hibernate or shutdown setting here if (val == 2 || val == 3) { AppConfig.Set("clamshell_default_lid_action", val); return val; } } catch (Exception ex) { Logger.WriteLine("Can't get Lid Action: " + ex.ToString()); } return 1; } //Power users can change that setting. //0 = Do nothing //1 = Sleep (default) //2 = Hibernate //3 = Shutdown private static int GetDefaultLidAction() { int val = AppConfig.Get("clamshell_default_lid_action", 1); if (val < 0 || val > 3) { val = 1; } return val; } } } ================================================ FILE: app/Helpers/ColorUtilities.cs ================================================ using System.Runtime.CompilerServices; namespace GHelper.Helpers { public class ColorUtils { // Method to get the weighted average between two colors public static Color GetWeightedAverage(Color color1, Color color2, float weight) { int red = (int)Math.Round(color1.R * (1 - weight) + color2.R * weight); int green = (int)Math.Round(color1.G * (1 - weight) + color2.G * weight); int blue = (int)Math.Round(color1.B * (1 - weight) + color2.B * weight); red = Math.Min(255, Math.Max(0, red)); green = Math.Min(255, Math.Max(0, green)); blue = Math.Min(255, Math.Max(0, blue)); return Color.FromArgb(red, green, blue); } public static Color GetMidColor(Color color1, Color color2) { return Color.FromArgb((color1.R + color2.R) / 2, (color1.G + color2.G) / 2, (color1.B + color2.B) / 2); } public static Color GetDominantColor(Bitmap bmp) { //Used for tally int r = 0; int g = 0; int b = 0; int total = 0; for (int x = 0; x < bmp.Width; x++) { for (int y = 0; y < bmp.Height; y++) { Color clr = bmp.GetPixel(x, y); r += clr.R; g += clr.G; b += clr.B; total++; } } //Calculate average r /= total; g /= total; b /= total; return Color.FromArgb(r, g, b); } public class HSV { public double Hue { get; set; } public double Saturation { get; set; } public double Value { get; set; } public Color ToRGB() { var hue = Hue * 6; var saturation = Saturation; var value = Value; double red; double green; double blue; if (saturation == 0) { red = green = blue = value; } else { var i = Convert.ToInt32(Math.Floor(hue)); var f = hue - i; var p = value * (1 - saturation); var q = value * (1 - saturation * f); var t = value * (1 - saturation * (1 - f)); int mod = i % 6; red = new[] { value, q, p, p, t, value }[mod]; green = new[] { t, value, value, q, p, p }[mod]; blue = new[] { p, p, t, value, value, q }[mod]; } return Color.FromArgb(Convert.ToInt32(red * 255), Convert.ToInt32(green * 255), Convert.ToInt32(blue * 255)); } public static HSV ToHSV(Color rgb) { double red = rgb.R / 255.0; double green = rgb.G / 255.0; double blue = rgb.B / 255.0; var min = Math.Min(red, Math.Min(green, blue)); var max = Math.Max(red, Math.Max(green, blue)); var delta = max - min; double hue; double saturation = 0; var value = max; if (max != 0) saturation = delta / max; if (delta == 0) hue = 0; else { if (red == max) hue = (green - blue) / delta + (green < blue ? 6 : 0); else if (green == max) hue = 2 + (blue - red) / delta; else hue = 4 + (red - green) / delta; hue /= 6; } return new HSV { Hue = hue, Saturation = saturation, Value = value }; } public static Color UpSaturation(Color rgb, float increse = 0.2f) //make color more colored { if (rgb.R == rgb.G && rgb.G == rgb.B) return rgb; var hsv_color = ToHSV(rgb); hsv_color.Saturation = Math.Min(hsv_color.Saturation + increse, 1.00f); return hsv_color.ToRGB(); } } public class SmoothColor { public Color RGB { get { return Interpolate(); } set { clr = value; } } Color Interpolate() { clr_ = ColorInterpolator.InterpolateBetween(clr, clr_, smooth); return clr_; } private float smooth = 0.65f; //smooth private Color clr = new Color(); private Color clr_ = new Color(); static class ColorInterpolator { delegate byte ComponentSelector(Color color); static ComponentSelector _redSelector = color => color.R; static ComponentSelector _greenSelector = color => color.G; static ComponentSelector _blueSelector = color => color.B; public static Color InterpolateBetween(Color endPoint1, Color endPoint2, double lambda) { if (lambda < 0 || lambda > 1) throw new ArgumentOutOfRangeException("lambda"); if (endPoint1 != endPoint2) { return Color.FromArgb( InterpolateComponent(endPoint1, endPoint2, lambda, _redSelector), InterpolateComponent(endPoint1, endPoint2, lambda, _greenSelector), InterpolateComponent(endPoint1, endPoint2, lambda, _blueSelector) ); } return endPoint1; } [MethodImpl(MethodImplOptions.AggressiveInlining)] static byte InterpolateComponent(Color end1, Color end2, double lambda, ComponentSelector selector) { return (byte)(selector(end1) + (selector(end2) - selector(end1)) * lambda); } } } } } ================================================ FILE: app/Helpers/DynamicLightingHelper.cs ================================================ using Microsoft.Win32; namespace GHelper.Helpers { public static class DynamicLightingHelper { const string LightingKey = @"HKEY_CURRENT_USER\Software\Microsoft\Lighting"; const string LightingValue = "AmbientLightingEnabled"; public enum DynamicLightingEffect { Solid = 0, Breathing = 1, Rainbow = 2, Wave = 4, Wheel = 5, Gradient = 6 } public static bool IsEnabled() { if (Environment.OSVersion.Version.Build < 22000) return false; if (ProcessHelper.IsRunningAsSystem()) return false; Logger.WriteLine("Dynamic lighting status: " + Registry.GetValue(LightingKey, LightingValue, 0)); return (int?)Registry.GetValue(LightingKey, LightingValue, 0) > 0; } public static void SetRegStatus(int status = 1) { try { Registry.SetValue(LightingKey, LightingValue, status, RegistryValueKind.DWord); SetDynamicLightingOnAllDevices(status); Logger.WriteLine($"Dynamic lighting: {status}"); } catch (Exception ex) { Logger.WriteLine($"Error setting value for dynamic lighting: {ex.Message}"); } } static void WriteLightingValue(string name, object value, RegistryValueKind kind) { Registry.SetValue(LightingKey, name, value, kind); using var devicesKey = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Lighting\Devices", true); if (devicesKey == null) return; foreach (var dev in devicesKey.GetSubKeyNames()) { using var dk = devicesKey.OpenSubKey(dev, true); if (dk == null) continue; dk.SetValue(name, value, kind); } } static int ToDlColorDword(System.Drawing.Color c) { // Dynamic Lighting registry expects AABBGGRR on this system (R/B swapped vs AARRGGBB). unchecked { return (c.A << 24) | (c.B << 16) | (c.G << 8) | c.R; } } public static void SetEffect( DynamicLightingEffect effect, Color? color = null, Color? color2 = null, int? brightness = null, int? speed = null) { try { // Let Windows own the device WriteLightingValue("ControlledByForegroundApp", 0, RegistryValueKind.DWord); // Enable lighting if needed WriteLightingValue("AmbientLightingEnabled", 1, RegistryValueKind.DWord); // Core selector WriteLightingValue("EffectType", (int)effect, RegistryValueKind.DWord); WriteLightingValue("EffectMode", 0, RegistryValueKind.DWord); if (brightness.HasValue) WriteLightingValue("Brightness", Math.Clamp(brightness.Value, 0, 100), RegistryValueKind.DWord); if (speed.HasValue) WriteLightingValue("Speed", Math.Clamp(speed.Value, 0, 10), RegistryValueKind.DWord); if (color.HasValue) { WriteLightingValue("Color", ToDlColorDword(color.Value), RegistryValueKind.DWord); } if (color2.HasValue) { WriteLightingValue("Color2", ToDlColorDword(color2.Value), RegistryValueKind.DWord); } Logger.WriteLine($"Dynamic lighting effect set: {effect}"); } catch (Exception ex) { Logger.WriteLine($"Dynamic lighting effect error: {ex}"); } } static void SetDynamicLightingOnAllDevices(int status = 1) { RegistryKey? devicesKey = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Lighting\Devices", true); if (devicesKey != null) { foreach (string deviceKeyName in devicesKey.GetSubKeyNames()) { RegistryKey? deviceKey = devicesKey.OpenSubKey(deviceKeyName, true); if (deviceKey != null && deviceKey.GetValue(LightingValue) != null) { deviceKey.SetValue(LightingValue, status, RegistryValueKind.DWord); } } } } public static void Init() { if (!AppConfig.IsDynamicLightingInit()) return; if (Environment.OSVersion.Version.Build < 22000) return; if (IsEnabled()) return; SetRegStatus(1); Thread.Sleep(500); SetRegStatus(0); } public static void OpenSettings() { ProcessHelper.RunCMD("explorer", "ms-settings:personalization-lighting"); } } } ================================================ FILE: app/Helpers/Logger.cs ================================================ using System.Diagnostics; public static class Logger { public static string appPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\GHelper"; public static string logFile = appPath + "\\log.txt"; public static void WriteLine(string logMessage) { Debug.WriteLine($"{DateTime.Now}: {logMessage}"); if (!Directory.Exists(appPath)) Directory.CreateDirectory(appPath); try { using (StreamWriter w = File.AppendText(logFile)) { w.WriteLine($"{DateTime.Now}: {logMessage}"); w.Close(); } } catch { } if (new Random().Next(100) == 1) Cleanup(); } public static void Cleanup() { try { var file = File.ReadAllLines(logFile); int skip = Math.Max(0, file.Count() - 2000); File.WriteAllLines(logFile, file.Skip(skip).ToArray()); } catch { } } } ================================================ FILE: app/Helpers/OSDBase.cs ================================================ using System.Drawing.Imaging; using System.Runtime.InteropServices; namespace GHelper.Helpers { public class OSDNativeForm : NativeWindow, IDisposable { private bool _disposed = false; private byte _alpha = 250; private Size _size = new Size(350, 50); private Point _location = new Point(50, 50); protected virtual void PerformPaint(PaintEventArgs e) { } protected internal void Invalidate() { UpdateLayeredWindow(); } private void UpdateLayeredWindow() { Bitmap bitmap1 = new Bitmap(Size.Width, Size.Height, PixelFormat.Format32bppArgb); using (Graphics graphics1 = Graphics.FromImage(bitmap1)) { Rectangle rectangle1; SIZE size1; POINT point1; POINT point2; BLENDFUNCTION blendfunction1; rectangle1 = new Rectangle(0, 0, Size.Width, Size.Height); PerformPaint(new PaintEventArgs(graphics1, rectangle1)); nint ptr1 = User32.GetDC(nint.Zero); nint ptr2 = Gdi32.CreateCompatibleDC(ptr1); nint ptr3 = bitmap1.GetHbitmap(Color.FromArgb(0)); nint ptr4 = Gdi32.SelectObject(ptr2, ptr3); size1.cx = Size.Width; size1.cy = Size.Height; point1.x = Location.X; point1.x = Location.X; point1.y = Location.Y; point2.x = 0; point2.y = 0; blendfunction1 = new BLENDFUNCTION(); blendfunction1.BlendOp = 0; blendfunction1.BlendFlags = 0; blendfunction1.SourceConstantAlpha = _alpha; blendfunction1.AlphaFormat = 1; User32.UpdateLayeredWindow(Handle, ptr1, ref point1, ref size1, ptr2, ref point2, 0, ref blendfunction1, 2); //2=ULW_ALPHA Gdi32.SelectObject(ptr2, ptr4); User32.ReleaseDC(nint.Zero, ptr1); Gdi32.DeleteObject(ptr3); Gdi32.DeleteDC(ptr2); } } public virtual void Show() { if (Handle == nint.Zero) //if handle don't equal to zero - window was created and just hided CreateWindowOnly(); User32.ShowWindow(Handle, User32.SW_SHOWNOACTIVATE); } public virtual void Hide() { if (Handle == nint.Zero) return; User32.ShowWindow(Handle, User32.SW_HIDE); DestroyHandle(); } public virtual void Close() { Hide(); Dispose(); } private void CreateWindowOnly() { CreateParams params1 = new CreateParams(); params1.Caption = "FloatingNativeWindow"; int nX = _location.X; int nY = _location.Y; Screen screen1 = Screen.FromHandle(Handle); if (nX + _size.Width > screen1.Bounds.Width) { nX = screen1.Bounds.Width - _size.Width; } if (nY + _size.Height > screen1.Bounds.Height) { nY = screen1.Bounds.Height - _size.Height; } _location = new Point(nX, nY); Size size1 = _size; Point point1 = _location; params1.X = nX; params1.Y = nY; params1.Height = size1.Height; params1.Width = size1.Width; params1.Parent = nint.Zero; uint ui = User32.WS_POPUP; params1.Style = (int)ui; params1.ExStyle = User32.WS_EX_TOPMOST | User32.WS_EX_TOOLWINDOW | User32.WS_EX_LAYERED | User32.WS_EX_NOACTIVATE | User32.WS_EX_TRANSPARENT; CreateHandle(params1); UpdateLayeredWindow(); } protected virtual void SetBoundsCore(int x, int y, int width, int height) { if (X != x || Y != y || Width != width || Height != height) { if (Handle != nint.Zero) { int num1 = 20; if (X == x && Y == y) { num1 |= 2; } if (Width == width && Height == height) { num1 |= 1; } User32.SetWindowPos(Handle, nint.Zero, x, y, width, height, (uint)num1); } else { Location = new Point(x, y); Size = new Size(width, height); } } } #region # Properties # /// /// Get or set position of top-left corner of floating native window in screen coordinates /// public virtual Point Location { get { return _location; } set { if (Handle != nint.Zero) { SetBoundsCore(value.X, value.Y, _size.Width, _size.Height); RECT rect = new RECT(); User32.GetWindowRect(Handle, ref rect); _location = new Point(rect.left, rect.top); UpdateLayeredWindow(); } else { _location = value; } } } /// /// Get or set size of client area of floating native window /// public virtual Size Size { get { return _size; } set { if (Handle != nint.Zero) { SetBoundsCore(_location.X, _location.Y, value.Width, value.Height); RECT rect = new RECT(); User32.GetWindowRect(Handle, ref rect); _size = new Size(rect.right - rect.left, rect.bottom - rect.top); UpdateLayeredWindow(); } else { _size = value; } } } /// /// Gets or sets the height of the floating native window /// public int Height { get { return _size.Height; } set { _size = new Size(_size.Width, value); } } /// /// Gets or sets the width of the floating native window /// public int Width { get { return _size.Width; } set { _size = new Size(value, _size.Height); } } /// /// Get or set x-coordinate of top-left corner of floating native window in screen coordinates /// public int X { get { return _location.X; } set { Location = new Point(value, Location.Y); } } /// /// Get or set y-coordinate of top-left corner of floating native window in screen coordinates /// public int Y { get { return _location.Y; } set { Location = new Point(Location.X, value); } } /// /// Get rectangle represented client area of floating native window in client coordinates(top-left corner always has coord. 0,0) /// public Rectangle Bound { get { return new Rectangle(new Point(0, 0), _size); } } /// /// Get or set full opacity(255) or full transparency(0) or any intermediate state for floating native window transparency /// public byte Alpha { get { return _alpha; } set { if (_alpha == value) return; _alpha = value; UpdateLayeredWindow(); } } #endregion #region IDisposable Members public void Dispose() { Dispose(true); GC.SuppressFinalize(this); } private void Dispose(bool disposing) { if (!_disposed) { DestroyHandle(); _disposed = true; } } #endregion } #region # Win32 # [StructLayout(LayoutKind.Sequential)] internal struct POINT { public int x; public int y; } [StructLayout(LayoutKind.Sequential)] internal struct RECT { public int left; public int top; public int right; public int bottom; } [StructLayout(LayoutKind.Sequential)] internal struct SIZE { public int cx; public int cy; } [StructLayout(LayoutKind.Sequential)] internal struct TRACKMOUSEEVENTS { public uint cbSize; public uint dwFlags; public nint hWnd; public uint dwHoverTime; } [StructLayout(LayoutKind.Sequential)] internal struct MSG { public nint hwnd; public int message; public nint wParam; public nint lParam; public int time; public int pt_x; public int pt_y; } [StructLayout(LayoutKind.Sequential, Pack = 1)] internal struct BLENDFUNCTION { public byte BlendOp; public byte BlendFlags; public byte SourceConstantAlpha; public byte AlphaFormat; } internal class User32 { public const uint WS_POPUP = 0x80000000; public const int WS_EX_TOPMOST = 0x8; public const int WS_EX_TOOLWINDOW = 0x80; public const int WS_EX_LAYERED = 0x80000; public const int WS_EX_TRANSPARENT = 0x20; public const int WS_EX_NOACTIVATE = 0x08000000; public const int SW_SHOWNOACTIVATE = 4; public const int SW_HIDE = 0; public const uint AW_HOR_POSITIVE = 0x1; public const uint AW_HOR_NEGATIVE = 0x2; public const uint AW_VER_POSITIVE = 0x4; public const uint AW_VER_NEGATIVE = 0x8; public const uint AW_CENTER = 0x10; public const uint AW_HIDE = 0x10000; public const uint AW_ACTIVATE = 0x20000; public const uint AW_SLIDE = 0x40000; public const uint AW_BLEND = 0x80000; // Methods private User32() { } [DllImport("User32.dll", CharSet = CharSet.Auto)] internal static extern bool AnimateWindow(nint hWnd, uint dwTime, uint dwFlags); [DllImport("User32.dll", CharSet = CharSet.Auto)] internal static extern bool ClientToScreen(nint hWnd, ref POINT pt); [DllImport("User32.dll", CharSet = CharSet.Auto)] internal static extern bool DispatchMessage(ref MSG msg); [DllImport("User32.dll", CharSet = CharSet.Auto)] internal static extern bool DrawFocusRect(nint hWnd, ref RECT rect); [DllImport("User32.dll", CharSet = CharSet.Auto)] internal static extern nint GetDC(nint hWnd); [DllImport("User32.dll", CharSet = CharSet.Auto)] internal static extern nint GetFocus(); [DllImport("User32.dll", CharSet = CharSet.Auto)] internal static extern ushort GetKeyState(int virtKey); [DllImport("User32.dll", CharSet = CharSet.Auto)] internal static extern bool GetMessage(ref MSG msg, int hWnd, uint wFilterMin, uint wFilterMax); [DllImport("User32.dll", CharSet = CharSet.Auto)] internal static extern nint GetParent(nint hWnd); [DllImport("user32.dll", CharSet = CharSet.Auto, ExactSpelling = true)] public static extern bool GetClientRect(nint hWnd, [In, Out] ref RECT rect); [DllImport("User32.dll", CharSet = CharSet.Auto)] internal static extern int GetWindowLong(nint hWnd, int nIndex); [DllImport("User32.dll", CharSet = CharSet.Auto)] internal static extern nint GetWindow(nint hWnd, int cmd); [DllImport("User32.dll", CharSet = CharSet.Auto)] internal static extern bool GetWindowRect(nint hWnd, ref RECT rect); [DllImport("User32.dll", CharSet = CharSet.Auto)] internal static extern bool HideCaret(nint hWnd); [DllImport("User32.dll", CharSet = CharSet.Auto)] internal static extern bool InvalidateRect(nint hWnd, ref RECT rect, bool erase); [DllImport("User32.dll", CharSet = CharSet.Auto)] internal static extern nint LoadCursor(nint hInstance, uint cursor); [DllImport("user32.dll", CharSet = CharSet.Auto, ExactSpelling = true)] public static extern int MapWindowPoints(nint hWndFrom, nint hWndTo, [In, Out] ref RECT rect, int cPoints); [DllImport("User32.dll", CharSet = CharSet.Auto)] internal static extern bool MoveWindow(nint hWnd, int x, int y, int width, int height, bool repaint); [DllImport("User32.dll", CharSet = CharSet.Auto)] internal static extern bool PeekMessage(ref MSG msg, int hWnd, uint wFilterMin, uint wFilterMax, uint wFlag); [DllImport("User32.dll", CharSet = CharSet.Auto)] internal static extern bool PostMessage(nint hWnd, int Msg, uint wParam, uint lParam); [DllImport("User32.dll", CharSet = CharSet.Auto)] internal static extern bool ReleaseCapture(); [DllImport("User32.dll", CharSet = CharSet.Auto)] internal static extern int ReleaseDC(nint hWnd, nint hDC); [DllImport("User32.dll", CharSet = CharSet.Auto)] internal static extern bool ScreenToClient(nint hWnd, ref POINT pt); [DllImport("User32.dll", CharSet = CharSet.Auto)] internal static extern uint SendMessage(nint hWnd, int Msg, uint wParam, uint lParam); [DllImport("User32.dll", CharSet = CharSet.Auto)] internal static extern nint SetCursor(nint hCursor); [DllImport("User32.dll", CharSet = CharSet.Auto)] internal static extern nint SetFocus(nint hWnd); [DllImport("User32.dll", CharSet = CharSet.Auto)] internal static extern int SetWindowLong(nint hWnd, int nIndex, int newLong); [DllImport("User32.dll", CharSet = CharSet.Auto)] internal static extern int SetWindowPos(nint hWnd, nint hWndAfter, int X, int Y, int Width, int Height, uint flags); [DllImport("User32.dll", CharSet = CharSet.Auto)] internal static extern bool SetWindowRgn(nint hWnd, nint hRgn, bool redraw); [DllImport("User32.dll", CharSet = CharSet.Auto)] internal static extern bool ShowCaret(nint hWnd); [DllImport("User32.dll", CharSet = CharSet.Auto)] internal static extern bool SetCapture(nint hWnd); [DllImport("User32.dll", CharSet = CharSet.Auto)] internal static extern int ShowWindow(nint hWnd, short cmdShow); [DllImport("User32.dll", CharSet = CharSet.Auto)] internal static extern bool SystemParametersInfo(uint uiAction, uint uiParam, ref int bRetValue, uint fWinINI); [DllImport("User32.dll", CharSet = CharSet.Auto)] internal static extern bool TrackMouseEvent(ref TRACKMOUSEEVENTS tme); [DllImport("User32.dll", CharSet = CharSet.Auto)] internal static extern bool TranslateMessage(ref MSG msg); [DllImport("User32.dll", CharSet = CharSet.Auto)] internal static extern bool UpdateLayeredWindow(nint hwnd, nint hdcDst, ref POINT pptDst, ref SIZE psize, nint hdcSrc, ref POINT pprSrc, int crKey, ref BLENDFUNCTION pblend, int dwFlags); [DllImport("User32.dll", CharSet = CharSet.Auto)] internal static extern bool UpdateWindow(nint hwnd); [DllImport("User32.dll", CharSet = CharSet.Auto)] internal static extern bool WaitMessage(); [DllImport("user32.dll", CharSet = CharSet.Auto, ExactSpelling = true)] public static extern bool AdjustWindowRectEx(ref RECT lpRect, int dwStyle, bool bMenu, int dwExStyle); } internal class Gdi32 { // Methods private Gdi32() { } [DllImport("gdi32.dll", CharSet = CharSet.Auto)] internal static extern int CombineRgn(nint dest, nint src1, nint src2, int flags); [DllImport("gdi32.dll", CharSet = CharSet.Auto)] internal static extern nint CreateBrushIndirect(ref LOGBRUSH brush); [DllImport("gdi32.dll", CharSet = CharSet.Auto)] internal static extern nint CreateCompatibleDC(nint hDC); [DllImport("gdi32.dll", CharSet = CharSet.Auto)] internal static extern nint CreateRectRgnIndirect(ref RECT rect); [DllImport("gdi32.dll", CharSet = CharSet.Auto)] internal static extern bool DeleteDC(nint hDC); [DllImport("gdi32.dll", CharSet = CharSet.Auto)] internal static extern nint DeleteObject(nint hObject); [DllImport("gdi32.dll", CharSet = CharSet.Auto)] internal static extern int GetClipBox(nint hDC, ref RECT rectBox); [DllImport("gdi32.dll", CharSet = CharSet.Auto)] internal static extern bool PatBlt(nint hDC, int x, int y, int width, int height, uint flags); [DllImport("gdi32.dll", CharSet = CharSet.Auto)] internal static extern int SelectClipRgn(nint hDC, nint hRgn); [DllImport("gdi32.dll", CharSet = CharSet.Auto)] internal static extern nint SelectObject(nint hDC, nint hObject); } [StructLayout(LayoutKind.Sequential)] public struct LOGBRUSH { public uint lbStyle; public uint lbColor; public uint lbHatch; } #endregion } ================================================ FILE: app/Helpers/OnScreenKeyboard.cs ================================================ using System.Diagnostics; using System.Runtime.InteropServices; namespace GHelper.Helpers { public static class OnScreenKeyboard { static OnScreenKeyboard() { var version = Environment.OSVersion.Version; switch (version.Major) { case 6: switch (version.Minor) { case 2: // Windows 10 (ok) break; } break; default: break; } } private static void StartTabTip() { var p = Process.Start(@"C:\Program Files\Common Files\Microsoft Shared\ink\TabTip.exe"); int handle = 0; while ((handle = NativeMethods.FindWindow("IPTIP_Main_Window", "")) <= 0) { Thread.Sleep(100); } } public static void ToggleVisibility() { var type = Type.GetTypeFromCLSID(Guid.Parse("4ce576fa-83dc-4F88-951c-9d0782b4e376")); var instance = (ITipInvocation)Activator.CreateInstance(type); instance.Toggle(NativeMethods.GetDesktopWindow()); Marshal.ReleaseComObject(instance); } public static void Show() { int handle = NativeMethods.FindWindow("IPTIP_Main_Window", ""); if (handle <= 0) // nothing found { StartTabTip(); Thread.Sleep(100); } // on some devices starting TabTip don't show keyboard, on some does ¯\_(ツ)_/¯ if (!IsOpen()) { ToggleVisibility(); } } public static void Hide() { if (IsOpen()) { ToggleVisibility(); } } public static bool Close() { // find it int handle = NativeMethods.FindWindow("IPTIP_Main_Window", ""); bool active = handle > 0; if (active) { // don't check style - just close NativeMethods.SendMessage(handle, NativeMethods.WM_SYSCOMMAND, NativeMethods.SC_CLOSE, 0); } return active; } public static bool IsOpen() { return GetIsOpen1709() ?? GetIsOpenLegacy(); } [DllImport("user32.dll", SetLastError = false)] private static extern IntPtr FindWindowEx(IntPtr parent, IntPtr after, string className, string title = null); [DllImport("user32.dll", SetLastError = false)] private static extern uint GetWindowLong(IntPtr wnd, int index); private static bool? GetIsOpen1709() { // if there is a top-level window - the keyboard is closed var wnd = FindWindowEx(IntPtr.Zero, IntPtr.Zero, WindowClass1709, WindowCaption1709); if (wnd != IntPtr.Zero) return false; var parent = IntPtr.Zero; for (; ; ) { parent = FindWindowEx(IntPtr.Zero, parent, WindowParentClass1709); if (parent == IntPtr.Zero) return null; // no more windows, keyboard state is unknown // if it's a child of a WindowParentClass1709 window - the keyboard is open wnd = FindWindowEx(parent, IntPtr.Zero, WindowClass1709, WindowCaption1709); if (wnd != IntPtr.Zero) return true; } } private static bool GetIsOpenLegacy() { var wnd = FindWindowEx(IntPtr.Zero, IntPtr.Zero, WindowClass); if (wnd == IntPtr.Zero) return false; var style = GetWindowStyle(wnd); return style.HasFlag(WindowStyle.Visible) && !style.HasFlag(WindowStyle.Disabled); } private const string WindowClass = "IPTip_Main_Window"; private const string WindowParentClass1709 = "ApplicationFrameWindow"; private const string WindowClass1709 = "Windows.UI.Core.CoreWindow"; private const string WindowCaption1709 = "Microsoft Text Input Application"; private enum WindowStyle : uint { Disabled = 0x08000000, Visible = 0x10000000, } private static WindowStyle GetWindowStyle(IntPtr wnd) { return (WindowStyle)GetWindowLong(wnd, -16); } } [ComImport] [Guid("37c994e7-432b-4834-a2f7-dce1f13b834b")] [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] interface ITipInvocation { void Toggle(IntPtr hwnd); } internal static class NativeMethods { [DllImport("user32.dll", EntryPoint = "FindWindow")] internal static extern int FindWindow(string lpClassName, string lpWindowName); [DllImport("user32.dll", EntryPoint = "SendMessage")] internal static extern int SendMessage(int hWnd, uint Msg, int wParam, int lParam); [DllImport("user32.dll", EntryPoint = "GetDesktopWindow", SetLastError = false)] internal static extern IntPtr GetDesktopWindow(); [DllImport("user32.dll", EntryPoint = "GetWindowLong")] internal static extern int GetWindowLong(int hWnd, int nIndex); internal const int GWL_STYLE = -16; internal const int GWL_EXSTYLE = -20; internal const int WM_SYSCOMMAND = 0x0112; internal const int SC_CLOSE = 0xF060; internal const int WS_DISABLED = 0x08000000; internal const int WS_VISIBLE = 0x10000000; } } ================================================ FILE: app/Helpers/ProcessHelper.cs ================================================ using System.Diagnostics; using System.Security.Principal; namespace GHelper.Helpers { public static class ProcessHelper { private static long lastAdmin; private static bool? _isSystem; public static bool IsRunningAsSystem() { if (_isSystem.HasValue) return _isSystem.Value; using (WindowsIdentity identity = WindowsIdentity.GetCurrent()) { if (identity == null) _isSystem = false; else _isSystem = string.Equals(identity.Name, @"NT AUTHORITY\SYSTEM", StringComparison.OrdinalIgnoreCase); } return _isSystem.Value; } public static void CheckAlreadyRunning() { Process currentProcess = Process.GetCurrentProcess(); Process[] processes = Process.GetProcessesByName(currentProcess.ProcessName); if (processes.Length > 1) { foreach (Process process in processes) if (process.Id != currentProcess.Id) try { process.Kill(); } catch (Exception ex) { Logger.WriteLine(ex.ToString()); MessageBox.Show(Properties.Strings.AppAlreadyRunningText, Properties.Strings.AppAlreadyRunning, MessageBoxButtons.OK); Application.Exit(); return; } } } public static bool IsUserAdministrator() { WindowsIdentity identity = WindowsIdentity.GetCurrent(); WindowsPrincipal principal = new WindowsPrincipal(identity); return principal.IsInRole(WindowsBuiltInRole.Administrator); } public static void RunAsAdmin(string? param = null, bool force = false) { if (Math.Abs(DateTimeOffset.Now.ToUnixTimeMilliseconds() - lastAdmin) < 2000) return; lastAdmin = DateTimeOffset.Now.ToUnixTimeMilliseconds(); // Check if the current user is an administrator if (!IsUserAdministrator() || force) { ProcessStartInfo startInfo = new ProcessStartInfo(); startInfo.UseShellExecute = true; startInfo.WorkingDirectory = Environment.CurrentDirectory; startInfo.FileName = Application.ExecutablePath; startInfo.Arguments = param; startInfo.Verb = "runas"; try { Process.Start(startInfo); Application.Exit(); } catch (Exception ex) { Logger.WriteLine(ex.Message); } } } public static void KillByName(string name) { foreach (var process in Process.GetProcessesByName(name)) { try { process.Kill(); Logger.WriteLine($"Stopped: {process.ProcessName}"); } catch (Exception ex) { Logger.WriteLine($"Failed to stop: {process.ProcessName} {ex.Message}"); } } } public static void KillByProcess(Process process) { try { process.Kill(); Logger.WriteLine($"Stopped: {process.ProcessName}"); } catch (Exception ex) { Logger.WriteLine($"Failed to stop: {process.ProcessName} {ex.Message}"); } } public static void StopDisableService(string serviceName, string disable = "Disabled") { try { string script = $"Get-Service -Name \"{serviceName}\" | Stop-Service -Force -PassThru | Set-Service -StartupType {disable}"; Logger.WriteLine(script); RunCMD("powershell", script); } catch (Exception ex) { Logger.WriteLine(ex.ToString()); } } public static void StartEnableService(string serviceName, bool automatic = true) { try { string script = $"Set-Service -Name \"{serviceName}\" -Status running" + (automatic? " -StartupType Automatic":""); Logger.WriteLine(script); RunCMD("powershell", script); } catch (Exception ex) { Logger.WriteLine(ex.ToString()); } } public static string RunCMD(string name, string args, string? directory = null) { var cmd = new Process(); cmd.StartInfo.UseShellExecute = false; cmd.StartInfo.CreateNoWindow = true; cmd.StartInfo.RedirectStandardOutput = true; cmd.StartInfo.WindowStyle = ProcessWindowStyle.Hidden; cmd.StartInfo.FileName = name; cmd.StartInfo.Arguments = args; if (directory != null) cmd.StartInfo.WorkingDirectory = directory; cmd.Start(); var watch = Stopwatch.StartNew(); string result = cmd.StandardOutput.ReadToEnd().Replace(Environment.NewLine, " ").Trim(' '); watch.Stop(); Logger.WriteLine(name + " " + args); Logger.WriteLine(watch.ElapsedMilliseconds + " ms: " + result); cmd.WaitForExit(); return result; } public static void SetPriority(ProcessPriorityClass priorityClass = ProcessPriorityClass.Normal) { try { using (Process p = Process.GetCurrentProcess()) p.PriorityClass = priorityClass; } catch (Exception ex) { Logger.WriteLine(ex.ToString()); } } } } ================================================ FILE: app/Helpers/RestrictedProcessHelper.cs ================================================ using System.Diagnostics; using System.Runtime.InteropServices; using System.Text; public static class RestrictedProcessHelper { /// Runs a process as a non-elevated version of the current user. public static Process? RunAsRestrictedUser(string fileName, string? args = null) { if (string.IsNullOrWhiteSpace(fileName)) throw new ArgumentException("Value cannot be null or whitespace.", nameof(fileName)); if (!GetRestrictedSessionUserToken(out var hRestrictedToken)) { return null; } try { var si = new STARTUPINFO(); si.cb = Marshal.SizeOf(si); si.dwFlags = 0x1; si.wShowWindow = 0x00; // Set the window to be hidden var pi = new PROCESS_INFORMATION(); var cmd = new StringBuilder(); cmd.Append('"').Append(fileName).Append('"'); if (!string.IsNullOrWhiteSpace(args)) { cmd.Append(' ').Append(args); } Logger.WriteLine($"Launching {cmd}"); if (!CreateProcessAsUser( hRestrictedToken, null, cmd, IntPtr.Zero, IntPtr.Zero, true, // inherit handle 0, IntPtr.Zero, Path.GetDirectoryName(fileName), ref si, out pi)) { return null; } return Process.GetProcessById(pi.dwProcessId); } finally { CloseHandle(hRestrictedToken); } } private static bool GetRestrictedSessionUserToken(out IntPtr token) { token = IntPtr.Zero; if (!SaferCreateLevel(SaferScope.User, SaferLevel.NormalUser, SaferOpenFlags.Open, out var hLevel, IntPtr.Zero)) { return false; } IntPtr hRestrictedToken = IntPtr.Zero; TOKEN_MANDATORY_LABEL tml = default; tml.Label.Sid = IntPtr.Zero; IntPtr tmlPtr = IntPtr.Zero; try { if (!SaferComputeTokenFromLevel(hLevel, IntPtr.Zero, out hRestrictedToken, 0, IntPtr.Zero)) { return false; } // Set the token to medium integrity. tml.Label.Attributes = SE_GROUP_INTEGRITY; tml.Label.Sid = IntPtr.Zero; if (!ConvertStringSidToSid("S-1-16-8192", out tml.Label.Sid)) { return false; } tmlPtr = Marshal.AllocHGlobal(Marshal.SizeOf(tml)); Marshal.StructureToPtr(tml, tmlPtr, false); if (!SetTokenInformation(hRestrictedToken, TOKEN_INFORMATION_CLASS.TokenIntegrityLevel, tmlPtr, (uint)Marshal.SizeOf(tml))) { return false; } token = hRestrictedToken; hRestrictedToken = IntPtr.Zero; // make sure finally() doesn't close the handle } finally { SaferCloseLevel(hLevel); SafeCloseHandle(hRestrictedToken); if (tml.Label.Sid != IntPtr.Zero) { LocalFree(tml.Label.Sid); } if (tmlPtr != IntPtr.Zero) { Marshal.FreeHGlobal(tmlPtr); } } return true; } [StructLayout(LayoutKind.Sequential)] private struct PROCESS_INFORMATION { public IntPtr hProcess; public IntPtr hThread; public int dwProcessId; public int dwThreadId; } [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] private struct STARTUPINFO { public Int32 cb; public string lpReserved; public string lpDesktop; public string lpTitle; public Int32 dwX; public Int32 dwY; public Int32 dwXSize; public Int32 dwYSize; public Int32 dwXCountChars; public Int32 dwYCountChars; public Int32 dwFillAttribute; public Int32 dwFlags; public Int16 wShowWindow; public Int16 cbReserved2; public IntPtr lpReserved2; public IntPtr hStdInput; public IntPtr hStdOutput; public IntPtr hStdError; } [StructLayout(LayoutKind.Sequential)] private struct SID_AND_ATTRIBUTES { public IntPtr Sid; public uint Attributes; } [StructLayout(LayoutKind.Sequential)] private struct TOKEN_MANDATORY_LABEL { public SID_AND_ATTRIBUTES Label; } public enum SaferLevel : uint { Disallowed = 0, Untrusted = 0x1000, Constrained = 0x10000, NormalUser = 0x20000, FullyTrusted = 0x40000 } public enum SaferScope : uint { Machine = 1, User = 2 } [Flags] public enum SaferOpenFlags : uint { Open = 1 } [DllImport("advapi32", SetLastError = true, CallingConvention = CallingConvention.StdCall)] private static extern bool SaferCreateLevel(SaferScope scope, SaferLevel level, SaferOpenFlags openFlags, out IntPtr pLevelHandle, IntPtr lpReserved); [DllImport("advapi32", SetLastError = true, CallingConvention = CallingConvention.StdCall)] private static extern bool SaferComputeTokenFromLevel(IntPtr LevelHandle, IntPtr InAccessToken, out IntPtr OutAccessToken, int dwFlags, IntPtr lpReserved); [DllImport("advapi32", SetLastError = true)] private static extern bool SaferCloseLevel(IntPtr hLevelHandle); [DllImport("advapi32.dll", SetLastError = true, CharSet = CharSet.Unicode)] private static extern bool ConvertStringSidToSid(string StringSid, out IntPtr ptrSid); [DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)] [return: MarshalAs(UnmanagedType.Bool)] private static extern bool CloseHandle(IntPtr hObject); private static bool SafeCloseHandle(IntPtr hObject) { return (hObject == IntPtr.Zero) ? true : CloseHandle(hObject); } [DllImport("kernel32.dll", SetLastError = true)] static extern IntPtr LocalFree(IntPtr hMem); enum TOKEN_INFORMATION_CLASS { /// /// The buffer receives a TOKEN_USER structure that contains the user account of the token. /// TokenUser = 1, /// /// The buffer receives a TOKEN_GROUPS structure that contains the group accounts associated with the token. /// TokenGroups, /// /// The buffer receives a TOKEN_PRIVILEGES structure that contains the privileges of the token. /// TokenPrivileges, /// /// The buffer receives a TOKEN_OWNER structure that contains the default owner security identifier (SID) for newly created objects. /// TokenOwner, /// /// The buffer receives a TOKEN_PRIMARY_GROUP structure that contains the default primary group SID for newly created objects. /// TokenPrimaryGroup, /// /// The buffer receives a TOKEN_DEFAULT_DACL structure that contains the default DACL for newly created objects. /// TokenDefaultDacl, /// /// The buffer receives a TOKEN_SOURCE structure that contains the source of the token. TOKEN_QUERY_SOURCE access is needed to retrieve this information. /// TokenSource, /// /// The buffer receives a TOKEN_TYPE value that indicates whether the token is a primary or impersonation token. /// TokenType, /// /// The buffer receives a SECURITY_IMPERSONATION_LEVEL value that indicates the impersonation level of the token. If the access token is not an impersonation token, the function fails. /// TokenImpersonationLevel, /// /// The buffer receives a TOKEN_STATISTICS structure that contains various token statistics. /// TokenStatistics, /// /// The buffer receives a TOKEN_GROUPS structure that contains the list of restricting SIDs in a restricted token. /// TokenRestrictedSids, /// /// The buffer receives a DWORD value that indicates the Terminal Services session identifier that is associated with the token. /// TokenSessionId, /// /// The buffer receives a TOKEN_GROUPS_AND_PRIVILEGES structure that contains the user SID, the group accounts, the restricted SIDs, and the authentication ID associated with the token. /// TokenGroupsAndPrivileges, /// /// Reserved. /// TokenSessionReference, /// /// The buffer receives a DWORD value that is nonzero if the token includes the SANDBOX_INERT flag. /// TokenSandBoxInert, /// /// Reserved. /// TokenAuditPolicy, /// /// The buffer receives a TOKEN_ORIGIN value. /// TokenOrigin, /// /// The buffer receives a TOKEN_ELEVATION_TYPE value that specifies the elevation level of the token. /// TokenElevationType, /// /// The buffer receives a TOKEN_LINKED_TOKEN structure that contains a handle to another token that is linked to this token. /// TokenLinkedToken, /// /// The buffer receives a TOKEN_ELEVATION structure that specifies whether the token is elevated. /// TokenElevation, /// /// The buffer receives a DWORD value that is nonzero if the token has ever been filtered. /// TokenHasRestrictions, /// /// The buffer receives a TOKEN_ACCESS_INFORMATION structure that specifies security information contained in the token. /// TokenAccessInformation, /// /// The buffer receives a DWORD value that is nonzero if virtualization is allowed for the token. /// TokenVirtualizationAllowed, /// /// The buffer receives a DWORD value that is nonzero if virtualization is enabled for the token. /// TokenVirtualizationEnabled, /// /// The buffer receives a TOKEN_MANDATORY_LABEL structure that specifies the token's integrity level. /// TokenIntegrityLevel, /// /// The buffer receives a DWORD value that is nonzero if the token has the UIAccess flag set. /// TokenUIAccess, /// /// The buffer receives a TOKEN_MANDATORY_POLICY structure that specifies the token's mandatory integrity policy. /// TokenMandatoryPolicy, /// /// The buffer receives the token's logon security identifier (SID). /// TokenLogonSid, /// /// The maximum value for this enumeration /// MaxTokenInfoClass } [DllImport("advapi32.dll", SetLastError = true)] static extern Boolean SetTokenInformation( IntPtr TokenHandle, TOKEN_INFORMATION_CLASS TokenInformationClass, IntPtr TokenInformation, UInt32 TokenInformationLength); const uint SE_GROUP_INTEGRITY = 0x00000020; [DllImport("advapi32.dll", SetLastError = true, CharSet = CharSet.Unicode)] static extern bool CreateProcessAsUser( IntPtr hToken, string? lpApplicationName, StringBuilder? lpCommandLine, IntPtr lpProcessAttributes, IntPtr lpThreadAttributes, bool bInheritHandles, uint dwCreationFlags, IntPtr lpEnvironment, string? lpCurrentDirectory, ref STARTUPINFO lpStartupInfo, out PROCESS_INFORMATION lpProcessInformation); } ================================================ FILE: app/Helpers/Startup.cs ================================================ using GHelper.Helpers; using Microsoft.Win32.TaskScheduler; using System.Diagnostics; using System.Reflection; using System.Security.Principal; public class Startup { static string taskName = "GHelper"; static string chargeTaskName = taskName + "Charge"; static string strExeFilePath = Application.ExecutablePath.Trim(); public static bool IsScheduled() { try { using (TaskService taskService = new TaskService()) return (taskService.RootFolder.AllTasks.Any(t => t.Name == taskName)); } catch (Exception e) { Logger.WriteLine("Can't check startup task status: " + e.Message); return false; } } public static void ReScheduleAdmin() { if (ProcessHelper.IsUserAdministrator() && IsScheduled()) { UnSchedule(); Schedule(); } } public static void StartupCheck() { using (TaskService taskService = new TaskService()) { var task = taskService.RootFolder.AllTasks.FirstOrDefault(t => t.Name == taskName); if (task != null) { try { string action = task.Definition.Actions.FirstOrDefault()!.ToString().Trim(); bool needsReschedule = false; if (!strExeFilePath.Equals(action, StringComparison.OrdinalIgnoreCase)) { if (!File.Exists(action)) { Logger.WriteLine("Startup file doesn't exist: " + action); needsReschedule = true; } else { try { var currentVer = Assembly.GetEntryAssembly().GetName().Version; var fv = FileVersionInfo.GetVersionInfo(action).FileVersion.Split('.'); var scheduledVer = new Version( int.Parse(fv[0]), fv.Length > 1 ? int.Parse(fv[1]) : 0, fv.Length > 2 ? int.Parse(fv[2]) : 0, fv.Length > 3 ? int.Parse(fv[3]) : 0 ); if (currentVer > scheduledVer) { Logger.WriteLine($"Startup file is older {scheduledVer}, current is {currentVer}"); needsReschedule = true; } } catch (Exception ex) { Logger.WriteLine("Can't compare assembly versions: " + ex.Message); } } } if (needsReschedule) { if (task.Definition.Principal.RunLevel == TaskRunLevel.Highest && !ProcessHelper.IsUserAdministrator()) { ProcessHelper.RunAsAdmin(); return; } Logger.WriteLine("Rescheduling to: " + strExeFilePath); UnSchedule(); Schedule(); } } catch (Exception ex) { Logger.WriteLine($"Can't check startup task: {ex.Message}"); } if (taskService.RootFolder.AllTasks.FirstOrDefault(t => t.Name == chargeTaskName) == null) ScheduleCharge(); } } } public static void UnscheduleCharge() { using (TaskService taskService = new TaskService()) { try { taskService.RootFolder.DeleteTask(chargeTaskName); } catch (Exception e) { Logger.WriteLine("Can't remove charge limit task: " + e.Message); } } } public static void ScheduleCharge() { if (strExeFilePath is null) return; using (TaskDefinition td = TaskService.Instance.NewTask()) { td.RegistrationInfo.Description = "G-Helper Charge Limit"; td.Triggers.Add(new BootTrigger()); td.Triggers.Add(new EventTrigger { Subscription = "" }); td.Actions.Add(strExeFilePath, "charge"); td.Principal.UserId = "SYSTEM"; td.Principal.LogonType = TaskLogonType.ServiceAccount; td.Principal.RunLevel = TaskRunLevel.Highest; td.Settings.MultipleInstances = TaskInstancesPolicy.IgnoreNew; td.Settings.StopIfGoingOnBatteries = false; td.Settings.DisallowStartIfOnBatteries = false; td.Settings.ExecutionTimeLimit = TimeSpan.FromSeconds(30); try { TaskService.Instance.RootFolder.RegisterTaskDefinition(chargeTaskName, td); Logger.WriteLine("Charge limit task scheduled: " + strExeFilePath); } catch (Exception e) { Logger.WriteLine("Can't create a charge limit task: " + e.Message); } } } public static void Schedule() { using (TaskDefinition td = TaskService.Instance.NewTask()) { td.RegistrationInfo.Description = "G-Helper Auto Start"; td.Triggers.Add(new LogonTrigger { Delay = TimeSpan.FromSeconds(1) }); td.Actions.Add(strExeFilePath); td.Principal.LogonType = TaskLogonType.InteractiveToken; if (ProcessHelper.IsUserAdministrator()) td.Principal.RunLevel = TaskRunLevel.Highest; td.Settings.StopIfGoingOnBatteries = false; td.Settings.DisallowStartIfOnBatteries = false; td.Settings.ExecutionTimeLimit = TimeSpan.Zero; try { TaskService.Instance.RootFolder.RegisterTaskDefinition(taskName, td); } catch (Exception e) { if (ProcessHelper.IsUserAdministrator()) MessageBox.Show("Can't create a start up task. Try running Task Scheduler by hand and manually deleting GHelper task if it exists there.", "Scheduler Error", MessageBoxButtons.OK); else ProcessHelper.RunAsAdmin(); } Logger.WriteLine("Startup task scheduled: " + strExeFilePath); } ScheduleCharge(); } public static void UnSchedule() { using (TaskService taskService = new TaskService()) { try { taskService.RootFolder.DeleteTask(taskName); } catch (Exception e) { if (ProcessHelper.IsUserAdministrator()) MessageBox.Show("Can't remove task. Try running Task Scheduler by hand and manually deleting GHelper task if it exists there.", "Scheduler Error", MessageBoxButtons.OK); else ProcessHelper.RunAsAdmin(); } } UnscheduleCharge(); } } ================================================ FILE: app/Helpers/ToastForm.cs ================================================ using System.Diagnostics; using System.Drawing.Drawing2D; namespace GHelper.Helpers { static class Drawing { public static GraphicsPath RoundedRect(Rectangle bounds, int radius) { int diameter = radius * 2; Size size = new Size(diameter, diameter); Rectangle arc = new Rectangle(bounds.Location, size); GraphicsPath path = new GraphicsPath(); if (radius == 0) { path.AddRectangle(bounds); return path; } path.AddArc(arc, 180, 90); arc.X = bounds.Right - diameter; path.AddArc(arc, 270, 90); arc.Y = bounds.Bottom - diameter; path.AddArc(arc, 0, 90); arc.X = bounds.Left; path.AddArc(arc, 90, 90); path.CloseFigure(); return path; } public static void FillRoundedRectangle(this Graphics graphics, Brush brush, Rectangle bounds, int cornerRadius) { using (GraphicsPath path = RoundedRect(bounds, cornerRadius)) { graphics.FillPath(brush, path); } } } public enum ToastIcon { BrightnessUp, BrightnessDown, BacklightUp, BacklightDown, Touchpad, Microphone, MicrophoneMute, FnLock, Battery, Charger, Controller } public class ToastForm : OSDNativeForm { protected static string toastText = "Balanced"; protected static ToastIcon? toastIcon = null; protected static System.Windows.Forms.Timer timer = new System.Windows.Forms.Timer(); public ToastForm() { timer.Tick += timer_Tick; timer.Enabled = false; timer.Interval = 2000; } protected override void PerformPaint(PaintEventArgs e) { Brush brush = new SolidBrush(Color.FromArgb(150, Color.Black)); e.Graphics.SmoothingMode = SmoothingMode.AntiAlias; e.Graphics.FillRoundedRectangle(brush, Bound, 10); StringFormat format = new StringFormat(); format.LineAlignment = StringAlignment.Center; format.Alignment = StringAlignment.Center; Bitmap? icon = null; switch (toastIcon) { case ToastIcon.BrightnessUp: icon = Properties.Resources.brightness_up; break; case ToastIcon.BrightnessDown: icon = Properties.Resources.brightness_down; break; case ToastIcon.BacklightUp: icon = Properties.Resources.backlight_up; break; case ToastIcon.BacklightDown: icon = Properties.Resources.backlight_down; break; case ToastIcon.Microphone: icon = Properties.Resources.icons8_microphone_96; break; case ToastIcon.MicrophoneMute: icon = Properties.Resources.icons8_mute_unmute_96; break; case ToastIcon.Touchpad: icon = Properties.Resources.icons8_touchpad_96; break; case ToastIcon.FnLock: icon = Properties.Resources.icons8_function; break; case ToastIcon.Battery: icon = Properties.Resources.icons8_charged_battery_96; break; case ToastIcon.Charger: icon = Properties.Resources.icons8_charging_battery_96; break; case ToastIcon.Controller: icon = Properties.Resources.icons8_controller_96; break; } int shiftX = 0; if (icon is not null) { e.Graphics.DrawImage(icon, 18, 18, 64, 64); shiftX = 40; } e.Graphics.DrawString(toastText, new Font("Segoe UI", 36f, FontStyle.Bold, GraphicsUnit.Pixel), new SolidBrush(Color.White), new PointF(Bound.Width / 2 + shiftX, Bound.Height / 2), format); } public static void ReadText(string text) { ProcessStartInfo startInfo = new ProcessStartInfo(); startInfo.FileName = "PowerShell.exe"; startInfo.Arguments = $"-Command \"Add-Type -AssemblyName System.Speech; (New-Object System.Speech.Synthesis.SpeechSynthesizer).Speak('{text}')\""; startInfo.CreateNoWindow = true; Process.Start(startInfo); } public void RunToast(string text, ToastIcon? icon = null) { if (AppConfig.Is("disable_osd")) return; Program.settingsForm.Invoke(delegate { //Hide(); timer.Stop(); toastText = text; toastIcon = icon; Screen screen1 = Screen.FromHandle(Handle); Width = Math.Max(300, 100 + toastText.Length * 22); Height = 100; X = (screen1.Bounds.Width - Width) / 2; Y = screen1.Bounds.Height - 300 - Height; Show(); timer.Start(); //if (AppConfig.Is("narrator")) ReadText(text); Program.settingsForm.AccessibilityObject.RaiseAutomationNotification( System.Windows.Forms.Automation.AutomationNotificationKind.ActionCompleted, System.Windows.Forms.Automation.AutomationNotificationProcessing.MostRecent, text); }); } private void timer_Tick(object? sender, EventArgs e) { //Debug.WriteLine("Toast end"); Hide(); timer.Stop(); } } } ================================================ FILE: app/Helpers/TouchscreenHelper.cs ================================================ using GHelper.Helpers; public static class TouchscreenHelper { public static bool? GetStatus() { try { ProcessHelper.RunAsAdmin(); return ProcessHelper.RunCMD("powershell", "(Get-PnpDevice -FriendlyName '*touch*screen*').Status").Contains("OK"); } catch (Exception ex) { Logger.WriteLine($"Can't get touchscreen status: {ex.Message}"); return null; } } public static void ToggleTouchscreen(bool status) { try { ProcessHelper.RunAsAdmin(); ProcessHelper.RunCMD("powershell", (status ? "Enable-PnpDevice" : "Disable-PnpDevice") + " -InstanceId (Get-PnpDevice -FriendlyName '*touch*screen*').InstanceId -Confirm:$false"); } catch (Exception ex) { Logger.WriteLine($"Can't toggle touchscreen: {ex.Message}"); } } } ================================================ FILE: app/Input/InputDispatcher.cs ================================================ using GHelper.Display; using GHelper.Helpers; using GHelper.Mode; using GHelper.USB; using Microsoft.Win32; using System.Diagnostics; using System.Management; using System.Text.RegularExpressions; namespace GHelper.Input { public class InputDispatcher { System.Timers.Timer timer = new System.Timers.Timer(AppConfig.Get("keyboard_timeout_refresh", 1000)); public static bool backlightActivity = true; public static bool lidClose = false; public static bool tentMode = false; private static bool? _fnLock = null; private static string? _asusPath = null; private static long lastSleep; public static Keys keyProfile = (Keys)AppConfig.Get("keybind_profile", (int)Keys.F5); public static Keys keyApp = (Keys)AppConfig.Get("keybind_app", (int)Keys.F12); public static Keys keyProfile0 = (Keys)AppConfig.Get("keybind_profile_0", (int)Keys.F17); public static Keys keyProfile1 = (Keys)AppConfig.Get("keybind_profile_1", (int)Keys.F18); public static Keys keyProfile2 = (Keys)AppConfig.Get("keybind_profile_2", (int)Keys.F16); public static Keys keyProfile3 = (Keys)AppConfig.Get("keybind_profile_3", (int)Keys.F19); public static Keys keyProfile4 = (Keys)AppConfig.Get("keybind_profile_4", (int)Keys.F20); public static Keys keyXGM = (Keys)AppConfig.Get("keybind_xgm", (int)Keys.F21); public static ModifierKeys keyModifier = GetModifierKeys("modifier_keybind", ModifierKeys.Shift | ModifierKeys.Control); public static ModifierKeys keyModifierAlt = GetModifierKeys("modifier_keybind_alt", ModifierKeys.Shift | ModifierKeys.Control | ModifierKeys.Alt); static ModeControl modeControl = Program.modeControl; static bool isTUF = AppConfig.IsTUF(); KeyboardListener listener; KeyboardHook hook = new KeyboardHook(); public InputDispatcher() { byte[] result = Program.acpi.DeviceInit(); Debug.WriteLine($"Init: {BitConverter.ToString(result)}"); Program.acpi.SubscribeToEvents(WatcherEventArrived); //Task.Run(Program.acpi.RunListener); hook.KeyPressed += new EventHandler(KeyPressed); RegisterKeys(); timer.Elapsed += Timer_Elapsed; } private void Timer_Elapsed(object? sender, System.Timers.ElapsedEventArgs e) { if (GetBacklight() == 0) return; TimeSpan iddle = NativeMethods.GetIdleTime(); int kb_timeout; if (SystemInformation.PowerStatus.PowerLineStatus == PowerLineStatus.Online) kb_timeout = AppConfig.Get("keyboard_ac_timeout", 0); else kb_timeout = AppConfig.Get("keyboard_timeout", 60); if (kb_timeout == 0) return; if (backlightActivity && iddle.TotalSeconds > kb_timeout) { backlightActivity = false; Aura.ApplyBrightness(0, "Timeout"); } if (!backlightActivity && iddle.TotalSeconds < kb_timeout) { backlightActivity = true; SetBacklightAuto(); } //Logger.WriteLine("Iddle: " + iddle.TotalSeconds); } public void Init() { if (listener is not null) listener.Dispose(); Program.acpi.DeviceInit(); if (!AsusService.IsAsusOptimizationRunning()) { Program.acpi.DeviceGet(AsusACPI.CameraShutter); listener = new KeyboardListener(HandleEvent); } else { Logger.WriteLine("Optimization service is running"); } InitBacklightTimer(); MuteLEDInit(); InitCamera(); } public static void InitFNLock() { if (IsHardwareFnLock()) HardwareFnLock(AppConfig.Is("fn_lock")); } public void InitBacklightTimer() { timer.Enabled = AppConfig.Get("keyboard_timeout") > 0 && SystemInformation.PowerStatus.PowerLineStatus != PowerLineStatus.Online || AppConfig.Get("keyboard_ac_timeout") > 0 && SystemInformation.PowerStatus.PowerLineStatus == PowerLineStatus.Online; } private static ModifierKeys GetModifierKeys(string configKey, ModifierKeys defaultModifiers) { string configValue = AppConfig.GetString(configKey, ""); if (string.IsNullOrWhiteSpace(configValue)) return defaultModifiers; ModifierKeys modifiers = ModifierKeys.None; HashSet keys = new HashSet(configValue.Split('-'), StringComparer.OrdinalIgnoreCase); if (keys.Contains("win")) modifiers |= ModifierKeys.Win; if (keys.Contains("shift")) modifiers |= ModifierKeys.Shift; if (keys.Contains("control")) modifiers |= ModifierKeys.Control; if (keys.Contains("alt")) modifiers |= ModifierKeys.Alt; return modifiers; } public void RegisterKeys() { hook.UnregisterAll(); string actionM1 = AppConfig.GetString("m1"); string actionM2 = AppConfig.GetString("m2"); if (keyProfile != Keys.None) { hook.RegisterHotKey(keyModifier, keyProfile); hook.RegisterHotKey(keyModifierAlt, keyProfile); } if (keyApp != Keys.None) hook.RegisterHotKey(keyModifier, keyApp); if (!AppConfig.Is("skip_hotkeys")) { if (AppConfig.IsDUO() || (AppConfig.IsVivoZenbook() && AppConfig.IsOLED())) { hook.RegisterHotKey(keyModifierAlt, Keys.F7); hook.RegisterHotKey(keyModifierAlt, Keys.F8); } hook.RegisterHotKey(keyModifierAlt, Keys.F13); hook.RegisterHotKey(keyModifierAlt, Keys.F14); hook.RegisterHotKey(keyModifierAlt, Keys.F15); hook.RegisterHotKey(keyModifierAlt, keyProfile0); hook.RegisterHotKey(keyModifierAlt, keyProfile1); hook.RegisterHotKey(keyModifierAlt, keyProfile2); hook.RegisterHotKey(keyModifierAlt, keyProfile3); hook.RegisterHotKey(keyModifierAlt, keyProfile4); hook.RegisterHotKey(keyModifierAlt, keyXGM); hook.RegisterHotKey(ModifierKeys.Control, Keys.VolumeDown); hook.RegisterHotKey(ModifierKeys.Control, Keys.VolumeUp); hook.RegisterHotKey(ModifierKeys.Shift, Keys.VolumeDown); hook.RegisterHotKey(ModifierKeys.Shift, Keys.VolumeUp); hook.RegisterHotKey(keyModifier, Keys.F20); } if (!AppConfig.IsZ13() && !AppConfig.IsAlly() && !AppConfig.IsVivoZenPro()) { if (actionM1 is not null && actionM1.Length > 0) hook.RegisterHotKey(ModifierKeys.None, Keys.VolumeDown); if (actionM2 is not null && actionM2.Length > 0) hook.RegisterHotKey(ModifierKeys.None, Keys.VolumeUp); } if (AppConfig.IsAlly()) { hook.RegisterHotKey(keyModifierAlt, Keys.F1); hook.RegisterHotKey(keyModifierAlt, Keys.F2); hook.RegisterHotKey(keyModifierAlt, Keys.F3); hook.RegisterHotKey(keyModifierAlt, Keys.F4); hook.RegisterHotKey(keyModifierAlt, Keys.F6); hook.RegisterHotKey(keyModifierAlt, Keys.F9); } // FN-Lock group if (AppConfig.Is("fn_lock") && !IsHardwareFnLock()) for (Keys i = Keys.F1; i <= Keys.F11; i++) hook.RegisterHotKey(ModifierKeys.None, i); // Arrow-lock group if (AppConfig.Is("arrow_lock") && AppConfig.IsDUO()) { hook.RegisterHotKey(ModifierKeys.None, Keys.Left); hook.RegisterHotKey(ModifierKeys.None, Keys.Right); hook.RegisterHotKey(ModifierKeys.None, Keys.Up); hook.RegisterHotKey(ModifierKeys.None, Keys.Down); } } public static int[] ParseHexValues(string input) { string pattern = @"\b(0x[0-9A-Fa-f]{1,2}|[0-9A-Fa-f]{1,2})\b"; if (!Regex.IsMatch(input, $"^{pattern}(\\s+{pattern})*$")) return new int[0]; MatchCollection matches = Regex.Matches(input, pattern); int[] hexValues = new int[matches.Count]; for (int i = 0; i < matches.Count; i++) { string hexValueStr = matches[i].Value; int hexValue = int.Parse(hexValueStr.StartsWith("0x", StringComparison.OrdinalIgnoreCase) ? hexValueStr.Substring(2) : hexValueStr, System.Globalization.NumberStyles.HexNumber); hexValues[i] = hexValue; } return hexValues; } static void CustomKey(string configKey = "m3") { string command = AppConfig.GetString(configKey + "_custom"); int[] hexKeys = new int[0]; try { hexKeys = ParseHexValues(command); } catch { } switch (hexKeys.Length) { case 1: KeyboardHook.KeyPress((Keys)hexKeys[0]); break; case 2: KeyboardHook.KeyKeyPress((Keys)hexKeys[0], (Keys)hexKeys[1]); break; case 3: KeyboardHook.KeyKeyKeyPress((Keys)hexKeys[0], (Keys)hexKeys[1], (Keys)hexKeys[2]); break; case 4: KeyboardHook.KeyKeyKeyKeyPress((Keys)hexKeys[0], (Keys)hexKeys[1], (Keys)hexKeys[2], (Keys)hexKeys[3]); break; default: LaunchProcess(command); break; } } static void SetBrightness(bool up, bool hotkey = false) { int brightness = -1; if (isTUF) brightness = ScreenBrightness.Get(); if (AppConfig.SwappedBrightness() && !hotkey) up = !up; int step = AppConfig.Get("brightness_step", 10); if (step != 10) { Program.toast.RunToast(ScreenBrightness.Adjust(up ? step : -step) + "%", up ? ToastIcon.BrightnessUp : ToastIcon.BrightnessDown); return; } Program.acpi.DeviceSet(AsusACPI.UniversalControl, up ? AsusACPI.Brightness_Up : AsusACPI.Brightness_Down, "Brightness"); if (isTUF) { if (AppConfig.SwappedBrightness()) return; if (!up && brightness <= 0) return; if (up && brightness >= 100) return; Thread.Sleep(100); if (brightness == ScreenBrightness.Get()) Program.toast.RunToast(ScreenBrightness.Adjust(up ? step : -step) + "%", up ? ToastIcon.BrightnessUp : ToastIcon.BrightnessDown); } } static void SetBrightnessDimming(int delta) { int brightness = VisualControl.SetBrightness(delta: delta); if (brightness >= 0) Program.toast.RunToast(brightness + "%", (delta < 0) ? ToastIcon.BrightnessDown : ToastIcon.BrightnessUp); } public void KeyPressed(object sender, KeyPressedEventArgs e) { Logger.WriteLine(e.Key.ToString() + " " + e.Modifier.ToString()); if (e.Modifier == ModifierKeys.None) { if (AppConfig.NoMKeys()) { switch (e.Key) { case Keys.F2: KeyboardHook.KeyPress(Keys.VolumeDown); return; case Keys.F3: KeyboardHook.KeyPress(Keys.VolumeUp); return; case Keys.F4: ToggleMic(); return; } } if (AppConfig.IsProArt()) { switch (e.Key) { case Keys.F2: KeyboardHook.KeyPress(Keys.VolumeDown); return; case Keys.F3: KeyboardHook.KeyPress(Keys.VolumeUp); return; case Keys.F4: HandleEvent(199); // Backlight cycle return; case Keys.F5: SetBrightness(false); return; case Keys.F6: SetBrightness(true); return; case Keys.F7: KeyboardHook.KeyKeyPress(Keys.LWin, Keys.P); return; case Keys.F8: HandleEvent(126); // Emojis return; case Keys.F9: ToggleMic(); // MicMute return; case Keys.F10: HandleEvent(133); // Camera Toggle return; case Keys.F11: KeyboardHook.KeyPress(Keys.Snapshot); // PrintScreen return; } } if (AppConfig.IsZ13() || AppConfig.IsDUO()) { switch (e.Key) { case Keys.F11: HandleEvent(199); return; } } if (AppConfig.MediaKeys()) { switch (e.Key) { case Keys.F2: KeyboardHook.KeyPress(Keys.MediaPreviousTrack); return; case Keys.F3: KeyboardHook.KeyPress(Keys.MediaPlayPause); return; case Keys.F4: KeyboardHook.KeyPress(Keys.MediaNextTrack); return; } } switch (e.Key) { case Keys.F1: KeyboardHook.KeyPress(Keys.VolumeMute); break; case Keys.F2: SetBacklight(-1, true); break; case Keys.F3: SetBacklight(1, true); break; case Keys.F4: KeyProcess("fnf4"); break; case Keys.F5: KeyProcess("fnf5"); break; case Keys.F6: KeyboardHook.KeyPress(Keys.Snapshot); break; case Keys.F7: SetBrightness(false); break; case Keys.F8: SetBrightness(true); break; case Keys.F9: KeyboardHook.KeyKeyPress(Keys.LWin, Keys.P); break; case Keys.F10: ToggleTouchpadEvent(true); break; case Keys.F11: SleepEvent(); break; case Keys.VolumeDown: KeyProcess("m1"); break; case Keys.VolumeUp: KeyProcess("m2"); break; case Keys.Left: KeyboardHook.KeyPress(Keys.Home); break; case Keys.Right: KeyboardHook.KeyPress(Keys.End); break; case Keys.Up: KeyboardHook.KeyPress(Keys.PageUp); break; case Keys.Down: KeyboardHook.KeyPress(Keys.PageDown); break; default: break; } } if (e.Modifier == keyModifier) { if (e.Key == keyProfile) modeControl.CyclePerformanceMode(); if (e.Key == keyApp) Program.SettingsToggle(); if (e.Key == Keys.F20) ToggleMic(); } if (e.Modifier == keyModifierAlt) { if (e.Key == keyProfile) modeControl.CyclePerformanceMode(true); if (e.Key == keyProfile0) modeControl.SetPerformanceMode(0, true); if (e.Key == keyProfile1) modeControl.SetPerformanceMode(1, true); if (e.Key == keyProfile2) modeControl.SetPerformanceMode(2, true); if (e.Key == keyProfile3) modeControl.SetPerformanceMode(3, true); if (e.Key == keyProfile4) modeControl.SetPerformanceMode(4, true); if (e.Key == keyXGM) Program.settingsForm.gpuControl.ToggleXGM(true); switch (e.Key) { case Keys.F1: SetBrightness(false); break; case Keys.F2: SetBrightness(true); break; case Keys.F3: Program.settingsForm.gpuControl.ToggleXGM(true); break; case Keys.F4: Program.settingsForm.BeginInvoke(Program.settingsForm.allyControl.ToggleModeHotkey); break; case Keys.F6: ToggleTouchScreen(); break; case Keys.F7: if (AppConfig.IsDUO()) SetScreenpad(-10); else SetBrightnessDimming(-10); break; case Keys.F8: if (AppConfig.IsDUO()) SetScreenpad(10); else SetBrightnessDimming(10); break; case Keys.F9: Program.settingsForm.BeginInvoke(Program.settingsForm.allyControl.ToggleFPSLimit, true); break; case Keys.F13: ToggleScreenRate(); break; case Keys.F14: Program.toast.RunToast(Properties.Strings.EcoMode); Program.settingsForm.gpuControl.SetGPUMode(AsusACPI.GPUModeEco); break; case Keys.F15: Program.toast.RunToast(Properties.Strings.StandardMode); Program.settingsForm.gpuControl.SetGPUMode(AsusACPI.GPUModeStandard); break; } } if (e.Modifier == (ModifierKeys.Control)) { switch (e.Key) { case Keys.VolumeDown: // Screen brightness down on CTRL+VolDown SetBrightness(false); break; case Keys.VolumeUp: // Screen brightness up on CTRL+VolUp SetBrightness(true); break; } } if (e.Modifier == (ModifierKeys.Shift)) { switch (e.Key) { case Keys.VolumeDown: // Keyboard backlight down on SHIFT+VolDown SetBacklight(-1); break; case Keys.VolumeUp: // Keyboard backlight up on SHIFT+VolUp SetBacklight(1); break; } } } public static void KeyProcess(string name = "m3") { string action = AppConfig.GetString(name); if (action is null || action.Length <= 1) { if (name == "m4") action = "ghelper"; if (name == "fnf4") action = "aura"; if (name == "fnf5") action = "performance"; if (name == "m3" && !AsusService.IsAsusOptimizationRunning()) action = "micmute"; if (name == "fnc") action = "fnlock"; if (name == "fnv") action = "visual"; if (name == "fne") action = "calculator"; } switch (action) { case "mute": KeyboardHook.KeyPress(Keys.VolumeMute); break; case "play": KeyboardHook.KeyPress(Keys.MediaPlayPause); break; case "screenshot": KeyboardHook.KeyPress(Keys.Snapshot); break; case "lock": Logger.WriteLine("Screen lock"); NativeMethods.LockScreen(); break; case "screen": Logger.WriteLine("Screen off toggle"); NativeMethods.TurnOffScreen(); break; case "miniled": if (ScreenCCD.GetHDRStatus()) return; string miniledName = ScreenControl.ToogleMiniled(); Program.toast.RunToast(miniledName, miniledName == Properties.Strings.OneZone ? ToastIcon.BrightnessDown : ToastIcon.BrightnessUp); break; case "aura": Program.settingsForm.BeginInvoke(Program.settingsForm.CycleAuraMode, Control.ModifierKeys == Keys.Shift ? -1 : 1); break; case "visual": Program.settingsForm.BeginInvoke(Program.settingsForm.CycleVisualMode, Control.ModifierKeys == Keys.Shift ? -1 : 1); break; case "performance": modeControl.CyclePerformanceMode(Control.ModifierKeys == Keys.Shift); break; case "ghelper": try { Program.settingsForm.BeginInvoke(delegate { Program.SettingsToggle(); }); } catch (Exception ex) { Debug.WriteLine(ex); } break; case "fnlock": ToggleFnLock(); break; case "micmute": ToggleMic(); break; case "brightness_up": SetBrightness(true); break; case "brightness_down": SetBrightness(false); break; case "screenpad_up": SetScreenpad(10); break; case "screenpad_down": SetScreenpad(-10); break; case "custom": CustomKey(name); break; case "calculator": LaunchProcess("calc"); break; case "controller": Program.settingsForm.BeginInvoke(Program.settingsForm.allyControl.ToggleModeHotkey); break; case "touchscreen": ToggleTouchScreen(); break; default: break; } } static void MuteLED() { Thread.Sleep(500); Program.acpi.DeviceSet(AsusACPI.SoundMuteLed, Audio.IsMuted() ? 1 : 0, "SoundLed"); } static void ToggleTouchScreen() { var status = !TouchscreenHelper.GetStatus(); Logger.WriteLine("Touchscreen status: " + status); if (status is not null) { Program.toast.RunToast(Properties.Strings.Touchscreen + " " + ((bool)status ? Properties.Strings.On : Properties.Strings.Off), ToastIcon.Touchpad); TouchscreenHelper.ToggleTouchscreen((bool)status); } } static void ToggleMic() { bool muteStatus = Audio.ToggleMicMute(); Program.toast.RunToast(muteStatus ? Properties.Strings.Muted : Properties.Strings.Unmuted, muteStatus ? ToastIcon.MicrophoneMute : ToastIcon.Microphone); if (AppConfig.IsVivoZenbook()) Program.acpi.DeviceSet(AsusACPI.MicMuteLed, muteStatus ? 1 : 0, "MicmuteLed"); } static void MuteLEDInit() { if (!AppConfig.IsVivoZenbook()) return; if (Program.acpi.DeviceGet(AsusACPI.MicMuteLed) >= 0) Program.acpi.DeviceSet(AsusACPI.MicMuteLed, Audio.IsMicMuted() ? 1 : 0, "MicmuteLedInit"); if (Program.acpi.DeviceGet(AsusACPI.SoundMuteLed) >= 0) Program.acpi.DeviceSet(AsusACPI.SoundMuteLed, Audio.IsMuted() ? 1 : 0, "SoundLedInit"); } static bool GetTouchpadState() { using (var key = Registry.CurrentUser.OpenSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\PrecisionTouchPad\Status", false)) { Logger.WriteLine("Touchpad status:" + key?.GetValue("Enabled")?.ToString()); return key?.GetValue("Enabled")?.ToString() == "1"; } } static void ToggleTouchpadEvent(bool hotkey = false) { if (hotkey || !AppConfig.IsHardwareTouchpadToggle()) ToggleTouchpad(); Thread.Sleep(200); Program.toast.RunToast(GetTouchpadState() ? Properties.Strings.On : Properties.Strings.Off, ToastIcon.Touchpad); } static void ToggleTouchpad() { if (AppConfig.IsROG()) { AsusHid.WriteInput([AsusHid.INPUT_ID, 0xF4, 0x6B], "USB Touchpad"); } else { KeyboardHook.KeyKeyKeyPress(Keys.LWin, Keys.LControlKey, Keys.F24, 50); } } static void SleepEvent() { if (Math.Abs(DateTimeOffset.Now.ToUnixTimeMilliseconds() - lastSleep) < 1000) return; lastSleep = DateTimeOffset.Now.ToUnixTimeMilliseconds(); Program.acpi.DeviceSet(AsusACPI.UniversalControl, AsusACPI.KB_Sleep, "Sleep"); } public static void ToggleArrowLock() { int arLock = AppConfig.Is("arrow_lock") ? 0 : 1; AppConfig.Set("arrow_lock", arLock); Program.settingsForm.BeginInvoke(Program.inputDispatcher.RegisterKeys); Program.toast.RunToast("Arrow-Lock " + (arLock == 1 ? Properties.Strings.On : Properties.Strings.Off), ToastIcon.FnLock); } public static bool IsHardwareFnLock() { if (AppConfig.IsHardwareFnLock()) return true; if (_fnLock is null) { var fnLockStatus = Program.acpi.DeviceGet(AsusACPI.FnLock); Logger.WriteLine("FnLock Support: " + fnLockStatus); _fnLock = fnLockStatus >= 0; } return (bool)_fnLock; } public static void HardwareFnLock(bool fnLock) { Program.acpi.DeviceSet(AsusACPI.FnLock, fnLock ^ AppConfig.IsInvertedFNLock() ? 1 : 0, "FnLock"); AsusHid.WriteInput([AsusHid.INPUT_ID, 0xD0, 0x4E, fnLock ? (byte)0x00 : (byte)0x01], "USB FnLock"); } public static void ToggleFnLock() { bool fnLock = !AppConfig.Is("fn_lock"); AppConfig.Set("fn_lock", fnLock ? 1 : 0); if (IsHardwareFnLock()) HardwareFnLock(fnLock); else Program.settingsForm.BeginInvoke(Program.inputDispatcher.RegisterKeys); Program.settingsForm.BeginInvoke(Program.settingsForm.VisualiseFnLock); Program.toast.RunToast(fnLock ? Properties.Strings.FnLockOn : Properties.Strings.FnLockOff, ToastIcon.FnLock); } public static void SetSlateMode(int status) { try { Registry.SetValue(@"HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\PriorityControl", "ConvertibleSlateMode", status, RegistryValueKind.DWord); Logger.WriteLine("Setting ConvertibleSlateMode : " + status); } catch (Exception ex) { Logger.WriteLine("Can't set ConvertibleSlateMode: " + ex.Message); } } public static void TabletMode() { if (AppConfig.Is("disable_tablet")) return; bool touchpadState = GetTouchpadState(); bool tabletState = Program.acpi.DeviceGet(AsusACPI.TabletState) > 0; int slateState = Program.acpi.DeviceGet(AsusACPI.SlateMode); Logger.WriteLine($"Tablet: {tabletState} | SlateMode: {slateState} | Touchpad: {touchpadState}"); if (slateState >= 0) SetSlateMode(slateState); if (tabletState && touchpadState || !tabletState && !touchpadState) ToggleTouchpad(); } static int GetTentState() { var tentState = Program.acpi.DeviceGet(AsusACPI.TentState); Logger.WriteLine($"Tent: {tentState}"); return tentState; } public static void TentMode() { var tentState = GetTentState(); if (tentState < 0) return; tentMode = tentState > 0; Aura.ApplyBrightness(tentMode ? 0 : GetBacklight(), "Tent"); } static void HandleEvent(int EventID) { // The ROG Ally uses different M-key codes. // We'll special-case the translation of those. if (AppConfig.IsAlly()) { switch (EventID) { // This is both the M1 and M2 keys. // There's a way to differentiate, apparently, but it isn't over USB or any other obvious protocol. case 165: KeyProcess("paddle"); return; // The Command Center ("play-looking") button below the select key. case 166: KeyProcess("cc"); return; // The M4/ROG key. case 56: case 147: KeyProcess("m4"); return; case 162: OnScreenKeyboard.Show(); return; case 124: KeyProcess("m3"); return; } } // All other devices seem to use the same HID key-codes, // so we can process them all the same. else { switch (EventID) { case 95: // Z13 Side button KeyProcess("m4"); return; case 134: // FN + F12 ON OLD DEVICES case 139: // ProArt F12 KeyProcess("m4"); return; case 124: // M3 KeyProcess("m3"); return; case 56: // M4 / Rog button KeyProcess("m4"); return; case 55: // Arconym KeyProcess("m6"); return; case 181: // FN + Numpad Enter KeyProcess("fne"); return; case 174: // FN+F5 case 153: // FN+F5 OLD MODELS modeControl.CyclePerformanceMode(Control.ModifierKeys == Keys.Shift); return; case 178: // FN+LEFT ARROW / FN + F4 Program.settingsForm.BeginInvoke(Program.settingsForm.CycleAuraMode, -1); return; case 179: // FN+F4 KeyProcess("fnf4"); return; case 138: // Fn + V KeyProcess("fnv"); return; case 158: // Fn + C KeyProcess("fnc"); return; case 189: // Tablet mode TabletMode(); return; case 197: // FN+F2 SetBacklight(-1); return; case 196: // FN+F3 SetBacklight(1); return; case 199: // ON Z13 - FN+F11 - cycles backlight SetBacklight(4); return; case 46: // Fn + F4 Vivobook Brightness down if (Control.ModifierKeys == Keys.Control && AppConfig.IsOLED()) { SetBrightnessDimming(-10); } break; case 47: // Fn + F5 Vivobook Brightness up if (Control.ModifierKeys == Keys.Control && AppConfig.IsOLED()) { SetBrightnessDimming(10); } break; } } if (!AsusService.IsAsusOptimizationRunning()) HandleOptimizationEvent(EventID); } // Asus Optimization service Events static void HandleOptimizationEvent(int EventID) { switch (EventID) { case 16: // FN+F7 if (Control.ModifierKeys == Keys.Shift) { if (AppConfig.IsDUO()) SetScreenpad(-10); else Program.settingsForm.BeginInvoke(Program.settingsForm.CycleMatrix, -1); } else if (Control.ModifierKeys == Keys.Control && AppConfig.IsOLED()) { SetBrightnessDimming(-10); } else { SetBrightness(false, true); } break; case 32: // FN+F8 if (Control.ModifierKeys == Keys.Shift) { if (AppConfig.IsDUO()) SetScreenpad(10); else Program.settingsForm.BeginInvoke(Program.settingsForm.CycleMatrix, 1); } else if (Control.ModifierKeys == Keys.Control && AppConfig.IsOLED()) { SetBrightnessDimming(10); } else { SetBrightness(true, true); } break; case 133: // Camera Toggle ToggleCamera(); break; case 107: // FN+F10 ToggleTouchpadEvent(); break; case 108: // FN+F11 if (!AppConfig.IsHardwareHotkeys()) SleepEvent(); else lastSleep = DateTimeOffset.Now.ToUnixTimeMilliseconds(); break; case 106: // Screenpad button on DUO if (Control.ModifierKeys == Keys.Shift) ToggleScreenpad(); else SetScreenpad(100); break; case 51: // Fn+F6 on old TUFs case 53: // Fn+F6 on GA-502DU model NativeMethods.TurnOffScreen(); return; case 126: // Fn+F8 emojis popup KeyboardHook.KeyKeyPress(Keys.LWin, Keys.OemSemicolon); return; case 78: // Fn + ESC ToggleFnLock(); return; case 75: // Fn + Arrow Lock ToggleArrowLock(); return; case 136: // FN + F12 if (!AppConfig.IsHardwareHotkeys()) Program.acpi.DeviceSet(AsusACPI.UniversalControl, AsusACPI.Airplane, "Airplane"); return; case 50: // Sound Mute Event MuteLED(); return; case 157: // Zenbook DUO FN+F modeControl.CyclePerformanceMode(Control.ModifierKeys == Keys.Shift); return; case 250: // Tent Mode TentMode(); return; } } public static int GetBacklight() { int backlight_power = AppConfig.Get("keyboard_brightness", 1); int backlight_battery = AppConfig.Get("keyboard_brightness_ac", 1); bool onBattery = SystemInformation.PowerStatus.PowerLineStatus != PowerLineStatus.Online; int backlight; //backlight = onBattery ? Math.Min(backlight_battery, backlight_power) : Math.Max(backlight_battery, backlight_power); backlight = onBattery ? backlight_battery : backlight_power; return Math.Max(Math.Min(3, backlight), 0); } public static void AutoKeyboard() { if (AppConfig.HasTabletMode()) TabletMode(); if (lidClose) { Logger.WriteLine("Skipping Backlight Init: Lid Closed"); return; } if (tentMode) { tentMode = GetTentState() > 0; if (tentMode) { Logger.WriteLine("Skipping Backlight Init: Tent Mode"); return; } } if (!AppConfig.Is("skip_aura")) { Aura.Init(); Aura.ApplyPower(); Aura.ApplyAura(); } SetBacklightAuto(true); } public static void SetBacklightAuto(bool init = false) { if (lidClose || tentMode) return; Aura.ApplyBrightness(GetBacklight(), "Auto", init); backlightActivity = true; } public static void StartupBacklight() { Aura.DirectBrightness(GetBacklight(), "Startup"); } public static void SetBacklight(int delta, bool force = false) { int backlight_power = AppConfig.Get("keyboard_brightness", 1); int backlight_battery = AppConfig.Get("keyboard_brightness_ac", 1); bool onBattery = SystemInformation.PowerStatus.PowerLineStatus != PowerLineStatus.Online; int backlight = onBattery ? backlight_battery : backlight_power; int backlightMax = AppConfig.Get("max_brightness", 3); if (delta > backlightMax) backlight = ++backlight % (backlightMax + 1); else backlight = Math.Max(Math.Min(backlightMax, backlight + delta), 0); if (onBattery) AppConfig.Set("keyboard_brightness_ac", backlight); else AppConfig.Set("keyboard_brightness", backlight); if (force || !AsusService.IsAsusOptimizationRunning()) { Aura.ApplyBrightness(backlight, "HotKey"); } if (!AsusService.IsOSDRunning()) { string[] backlightNames = new string[] { Properties.Strings.BacklightOff, Properties.Strings.BacklightLow, Properties.Strings.BacklightMid, Properties.Strings.BacklightMax }; Program.toast.RunToast(backlightNames[backlight], delta > 0 ? ToastIcon.BacklightUp : ToastIcon.BacklightDown); } } public static void ToggleScreenpad() { int toggle = AppConfig.Is("screenpad_toggle") ? 0 : 1; int brightness = toggle == 0 ? -10 : AppConfig.Get("screenpad", 100); Debug.WriteLine($"Screenpad toggle = {toggle}"); ApplyScreenpadAction(brightness, true); AppConfig.Set("screenpad_toggle", toggle); Program.toast.RunToast($"Screen Pad " + (toggle == 1 ? "On" : "Off"), toggle > 0 ? ToastIcon.BrightnessUp : ToastIcon.BrightnessDown); } public static void ToggleScreenRate() { AppConfig.Set("screen_auto", 0); ScreenControl.ToggleScreenRate(); } private static string GetAsusPath() { if (_asusPath == null) { try { using (var searcher = new ManagementObjectSearcher(@"Select * from Win32_SystemDriver WHERE Name='ATKWMIACPIIO'")) { foreach (var driver in searcher.Get()) { string path = driver["PathName"].ToString(); _asusPath = Path.GetDirectoryName(path); break; } } } catch (Exception ex) { Logger.WriteLine(ex.Message); } } return _asusPath; } public static void ToggleCamera() { int cameraShutter = Program.acpi.DeviceGet(AsusACPI.CameraShutter); Logger.WriteLine("Camera Shutter status: " + cameraShutter); if (cameraShutter == 0) { Program.acpi.DeviceSet(AsusACPI.CameraShutter, 1, "CameraShutterOn"); Program.toast.RunToast($"Camera Off"); } else if (cameraShutter == 1) { Program.acpi.DeviceSet(AsusACPI.CameraShutter, 0, "CameraShutterOff"); Program.toast.RunToast($"Camera On"); } else if (cameraShutter == 1048577) { Program.acpi.DeviceSet(AsusACPI.CameraShutter, 5, "CameraShutter"); Program.toast.RunToast($"Camera Off"); } else if (cameraShutter == 1048576) { Program.acpi.DeviceSet(AsusACPI.CameraShutter, 4, "CameraShutter"); Program.toast.RunToast($"Camera On"); } else if (cameraShutter == 262144) { Program.toast.RunToast($"Camera Off"); } else if (cameraShutter == 262145) { Program.toast.RunToast($"Camera On"); } else { SetCamera(2); } } private static void SetCamera(int status, bool toast = true) { string asusPath = GetAsusPath(); var cameraStatus = AppConfig.Get("camera_status"); if (status == 2 && cameraStatus >= 0) status = cameraStatus > 0 ? 0 : 1; var result = ProcessHelper.RunCMD($"{asusPath}\\AsusHotkey.exe", $"-MFCameraCommand {status} 1 0", asusPath); var cameraLedStatus = Program.acpi.DeviceGet(AsusACPI.CameraLed); Logger.WriteLine("Camera LED: " + cameraLedStatus); AppConfig.Set("camera_status", cameraLedStatus); if (toast) { string statusText = cameraLedStatus switch { 0 => "On", 1 => "Off", _ => "Toggled" }; Program.toast.RunToast($"Camera {statusText}"); } } private static void InitCamera() { var cameraStatus = AppConfig.Get("camera_status"); if (cameraStatus >= 0) SetCamera(cameraStatus, false); } private static System.Threading.Timer screenpadActionTimer; private static int screenpadBrightnessToSet; public static void ApplyScreenpadAction(int brightness, bool instant = true) { var delay = AppConfig.Get("screenpad_delay", 1500); //Action Action action = (b) => { if (b >= 0) Program.acpi.DeviceSet(AsusACPI.ScreenPadToggle, 1, "ScreenpadOn"); int[] brightnessValues = [0, 4, 9, 14, 21, 32, 48, 73, 111, 169, 255]; Program.acpi.DeviceSet(AsusACPI.ScreenPadBrightness, brightnessValues[Math.Min(brightnessValues.Length - 1, Math.Max(0, b / 10))], "Screenpad"); if (b < 0) Program.acpi.DeviceSet(AsusACPI.ScreenPadToggle, 0, "ScreenpadOff"); }; if (delay <= 0 || instant) //instant action { action(brightness); } else //delayed action { //Timer Approach if (screenpadActionTimer == null) { screenpadActionTimer = new System.Threading.Timer(_ => action(screenpadBrightnessToSet), null, Timeout.Infinite, Timeout.Infinite); } //Start Timer screenpadBrightnessToSet = brightness; screenpadActionTimer.Change(delay, Timeout.Infinite); } } public static void SetScreenpad(int delta) { int brightness = AppConfig.Get("screenpad", 100); if (delta == 100) { if (brightness < 0) brightness = 100; else if (brightness >= 100) brightness = 0; else brightness = -10; ApplyScreenpadAction(brightness, false); } else { brightness = Math.Max(Math.Min(100, brightness + delta), 0); ApplyScreenpadAction(brightness); } AppConfig.Set("screenpad", brightness); string toast; if (brightness < 0) toast = "Off"; else toast = brightness.ToString() + "%"; Program.toast.RunToast($"Screen Pad {toast}", delta > 0 ? ToastIcon.BrightnessUp : ToastIcon.BrightnessDown); } public static void InitScreenpad() { if (!AppConfig.IsDUO()) return; int brightness = AppConfig.Get("screenpad"); if (brightness != -1) ApplyScreenpadAction(brightness); } public static void SetStatusLED(bool status) { Program.acpi.DeviceSet(AsusACPI.StatusLed, status ? 7 : 0, "StatusLED"); } public static void InitStatusLed() { if (AppConfig.IsAutoStatusLed()) SetStatusLED(true); } public static void ShutdownStatusLed() { if (AppConfig.IsAutoStatusLed()) SetStatusLED(false); } static void LaunchProcess(string command = "") { if (string.IsNullOrEmpty(command)) return; try { if (command.StartsWith("shutdown")) ProcessHelper.RunCMD("cmd", "/C " + command); else RestrictedProcessHelper.RunAsRestrictedUser(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.System), "cmd.exe"), "/C " + command); } catch (Exception ex) { Logger.WriteLine($"Failed to run: {command} {ex.Message}"); } } static void WatcherEventArrived(object sender, EventArrivedEventArgs e) { if (e.NewEvent is null) return; int EventID = int.Parse(e.NewEvent["EventID"].ToString()); Logger.WriteLine("WMI event " + EventID); if (AppConfig.NoWMI()) return; HandleEvent(EventID); } } } ================================================ FILE: app/Input/KeyboardHook.cs ================================================ using System.Runtime.InteropServices; public sealed class KeyboardHook : IDisposable { // Registers a hot key with Windows. [DllImport("user32.dll")] private static extern bool RegisterHotKey(IntPtr hWnd, int id, uint fsModifiers, uint vk); // Unregisters the hot key with Windows. [DllImport("user32.dll")] private static extern bool UnregisterHotKey(IntPtr hWnd, int id); [DllImport("user32.dll")] private static extern IntPtr CallNextHookEx(IntPtr hhk, int nCode, IntPtr wParam, IntPtr lParam); [DllImport("user32.dll", SetLastError = true)] public static extern void keybd_event(byte virtualKey, byte scanCode, uint flags, IntPtr extraInfo); public const int KEYEVENTF_EXTENDEDKEY = 1; public const int KEYEVENTF_KEYUP = 2; private const byte VK_LWIN = 0x5B; private const byte VK_LCONTROL = 0xA2; [DllImport("user32.dll")] public static extern void mouse_event(uint dwFlags, uint dx, uint dy, uint cButtons, uint dwExtraInfo); //Mouse actions private const int MOUSEEVENTF_LEFTDOWN = 0x02; private const int MOUSEEVENTF_LEFTUP = 0x04; private const int MOUSEEVENTF_RIGHTDOWN = 0x08; private const int MOUSEEVENTF_RIGHTUP = 0x10; private const int MOUSEEVENTF_MIDDOWN = 0x20; private const int MOUSEEVENTF_MIDTUP = 0x40; public static void KeyPress(Keys key) { switch (key) { case Keys.LButton: mouse_event(MOUSEEVENTF_LEFTDOWN | MOUSEEVENTF_LEFTUP, (uint)Cursor.Position.X, (uint)Cursor.Position.Y, 0, 0); return; case Keys.RButton: mouse_event(MOUSEEVENTF_RIGHTDOWN | MOUSEEVENTF_RIGHTUP, (uint)Cursor.Position.X, (uint)Cursor.Position.Y, 0, 0); return; case Keys.MButton: mouse_event(MOUSEEVENTF_MIDDOWN | MOUSEEVENTF_MIDTUP, (uint)Cursor.Position.X, (uint)Cursor.Position.Y, 0, 0); return; } keybd_event((byte)key, 0, KEYEVENTF_EXTENDEDKEY, IntPtr.Zero); Thread.Sleep(1); keybd_event((byte)key, 0, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP, IntPtr.Zero); } public static void KeyKeyPress(Keys key, Keys key2) { keybd_event((byte)key, 0, KEYEVENTF_EXTENDEDKEY, IntPtr.Zero); keybd_event((byte)key2, 0, KEYEVENTF_EXTENDEDKEY, IntPtr.Zero); Thread.Sleep(1); keybd_event((byte)key2, 0, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP, IntPtr.Zero); keybd_event((byte)key, 0, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP, IntPtr.Zero); } public static void KeyKeyKeyPress(Keys key, Keys key2, Keys key3, int sleep = 1) { keybd_event((byte)key, 0, KEYEVENTF_EXTENDEDKEY, IntPtr.Zero); keybd_event((byte)key2, 0, KEYEVENTF_EXTENDEDKEY, IntPtr.Zero); keybd_event((byte)key3, 0, KEYEVENTF_EXTENDEDKEY, IntPtr.Zero); Thread.Sleep(sleep); keybd_event((byte)key3, 0, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP, IntPtr.Zero); keybd_event((byte)key2, 0, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP, IntPtr.Zero); keybd_event((byte)key, 0, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP, IntPtr.Zero); } public static void KeyKeyKeyKeyPress(Keys key, Keys key2, Keys key3, Keys key4, int sleep = 1) { keybd_event((byte)key, 0, KEYEVENTF_EXTENDEDKEY, IntPtr.Zero); keybd_event((byte)key2, 0, KEYEVENTF_EXTENDEDKEY, IntPtr.Zero); keybd_event((byte)key3, 0, KEYEVENTF_EXTENDEDKEY, IntPtr.Zero); keybd_event((byte)key4, 0, KEYEVENTF_EXTENDEDKEY, IntPtr.Zero); Thread.Sleep(sleep); keybd_event((byte)key4, 0, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP, IntPtr.Zero); keybd_event((byte)key3, 0, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP, IntPtr.Zero); keybd_event((byte)key2, 0, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP, IntPtr.Zero); keybd_event((byte)key, 0, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP, IntPtr.Zero); } /// /// Represents the window that is used internally to get the messages. /// private class Window : NativeWindow, IDisposable { private static int WM_HOTKEY = 0x0312; public static Keys? fakeKey; public Window() { // create the handle for the window. this.CreateHandle(new CreateParams()); } /// /// Overridden to get the notifications. /// /// protected override void WndProc(ref Message m) { base.WndProc(ref m); // check if we got a hot key pressed. if (m.Msg == WM_HOTKEY) { // get the keys. Keys key = (Keys)(((int)m.LParam >> 16) & 0xFFFF); ModifierKeys modifier = (ModifierKeys)((int)m.LParam & 0xFFFF); // invoke the event to notify the parent. if (KeyPressed != null) KeyPressed(this, new KeyPressedEventArgs(modifier, key)); } } public event EventHandler KeyPressed; #region IDisposable Members public void Dispose() { this.DestroyHandle(); } #endregion } private Window _window = new Window(); private int _currentId; public KeyboardHook() { // register the event of the inner native window. _window.KeyPressed += delegate (object sender, KeyPressedEventArgs args) { if (KeyPressed != null) KeyPressed(this, args); }; } /// /// Registers a hot key in the system. /// /// The modifiers that are associated with the hot key. /// The key itself that is associated with the hot key. public void RegisterHotKey(ModifierKeys modifier, Keys key) { // increment the counter. _currentId = _currentId + 1; // register the hot key. if (!RegisterHotKey(_window.Handle, _currentId, (uint)modifier, (uint)key)) Logger.WriteLine("Couldn’t register " + key); } /// /// A hot key has been pressed. /// public event EventHandler KeyPressed; #region IDisposable Members public void UnregisterAll() { // unregister all the registered hot keys. for (int i = _currentId; i > 0; i--) { UnregisterHotKey(_window.Handle, i); } } public void Dispose() { UnregisterAll(); // dispose the inner native window. _window.Dispose(); } #endregion } /// /// Event Args for the event that is fired after the hot key has been pressed. /// public class KeyPressedEventArgs : EventArgs { private ModifierKeys _modifier; private Keys _key; internal KeyPressedEventArgs(ModifierKeys modifier, Keys key) { _modifier = modifier; _key = key; } public ModifierKeys Modifier { get { return _modifier; } } public Keys Key { get { return _key; } } } /// /// The enumeration of possible modifiers. /// [Flags] public enum ModifierKeys : uint { None = 0, Alt = 1, Control = 2, Shift = 4, Win = 8 } ================================================ FILE: app/Input/KeyboardListener.cs ================================================ using GHelper.USB; using HidSharp; using System.Text; namespace GHelper.Input { public class KeyboardListener { CancellationTokenSource cancellationTokenSource = new CancellationTokenSource(); Action _handler; static int retry = 0; public KeyboardListener(Action KeyHandler) { _handler = KeyHandler; var task = Task.Run(Listen); } private void Listen() { HidStream? input = AsusHid.FindHidStream(AsusHid.INPUT_ID); // Fallback int count = 0; while (input == null && count++ < 10) { Thread.Sleep(1000); input = AsusHid.FindHidStream(AsusHid.INPUT_ID); } if (input == null) { Logger.WriteLine($"Input device not found"); return; } AsusHid.WriteInput(Encoding.ASCII.GetBytes("ZASUS Tech.Inc.")); Logger.WriteLine($"Input: {input.Device.DevicePath}"); try { while (!cancellationTokenSource.Token.IsCancellationRequested) { // Emergency break if (input == null || !input.CanRead) { Logger.WriteLine("Listener terminated"); break; } input.ReadTimeout = int.MaxValue; var data = input.Read(); if (cancellationTokenSource.Token.IsCancellationRequested) break; if (data.Length > 1 && data[0] == AsusHid.INPUT_ID && data[1] > 0 && data[1] != 236) { Logger.WriteLine($"Key: {data[1]}"); _handler(data[1]); } } Logger.WriteLine("Listener stopped"); } catch (Exception ex) { Logger.WriteLine($"Listener exited: {ex.Message}"); if (retry++ < 2) { Thread.Sleep(300); Logger.WriteLine($"Restarting listener {retry}"); Listen(); } } } public void Dispose() { cancellationTokenSource?.Cancel(); } } } ================================================ FILE: app/Matrix.Designer.cs ================================================ namespace GHelper { partial class Matrix { /// /// Required designer variable. /// private System.ComponentModel.IContainer components = null; /// /// Clean up any resources being used. /// /// true if managed resources should be disposed; otherwise, false. protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } #region Windows Form Designer generated code /// /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// private void InitializeComponent() { pictureMatrix = new PictureBox(); trackZoom = new TrackBar(); buttonPicture = new UI.RButton(); panelPicture = new Panel(); panelMain = new Panel(); panelButtons = new Panel(); buttonReset = new UI.RButton(); panelGamma = new Panel(); labelGamma = new Label(); labelGammaTitle = new Label(); trackGamma = new TrackBar(); panelContrast = new Panel(); labelContrast = new Label(); labelContrastTitle = new Label(); trackContrast = new TrackBar(); panelRotation = new Panel(); comboRotation = new UI.RComboBox(); labelRotation = new Label(); panelScaling = new Panel(); comboScaling = new UI.RComboBox(); labelScaling = new Label(); panelZoom = new Panel(); labelZoom = new Label(); labelZoomTitle = new Label(); ((System.ComponentModel.ISupportInitialize)pictureMatrix).BeginInit(); ((System.ComponentModel.ISupportInitialize)trackZoom).BeginInit(); panelPicture.SuspendLayout(); panelMain.SuspendLayout(); panelButtons.SuspendLayout(); panelGamma.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)trackGamma).BeginInit(); panelContrast.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)trackContrast).BeginInit(); panelRotation.SuspendLayout(); panelScaling.SuspendLayout(); panelZoom.SuspendLayout(); SuspendLayout(); // // pictureMatrix // pictureMatrix.BackColor = Color.Black; pictureMatrix.Cursor = Cursors.SizeAll; pictureMatrix.Location = new Point(731, 27); pictureMatrix.Name = "pictureMatrix"; pictureMatrix.Size = new Size(81, 73); pictureMatrix.TabIndex = 0; pictureMatrix.TabStop = false; // // trackZoom // trackZoom.LargeChange = 50; trackZoom.Location = new Point(16, 52); trackZoom.Maximum = 200; trackZoom.Minimum = 10; trackZoom.Name = "trackZoom"; trackZoom.Size = new Size(782, 90); trackZoom.SmallChange = 10; trackZoom.TabIndex = 2; trackZoom.TickFrequency = 20; trackZoom.TickStyle = TickStyle.TopLeft; trackZoom.Value = 100; // // buttonPicture // buttonPicture.Activated = false; buttonPicture.BackColor = SystemColors.ControlLight; buttonPicture.BorderColor = Color.Transparent; buttonPicture.BorderRadius = 5; buttonPicture.FlatAppearance.BorderSize = 0; buttonPicture.FlatStyle = FlatStyle.Flat; buttonPicture.Image = Properties.Resources.icons8_matrix_32; buttonPicture.Location = new Point(16, 19); buttonPicture.Name = "buttonPicture"; buttonPicture.Secondary = true; buttonPicture.Size = new Size(258, 56); buttonPicture.TabIndex = 3; buttonPicture.Text = "Picture / Gif"; buttonPicture.TextAlign = ContentAlignment.MiddleRight; buttonPicture.TextImageRelation = TextImageRelation.ImageBeforeText; buttonPicture.UseVisualStyleBackColor = false; // // panelPicture // panelPicture.BackColor = Color.Black; panelPicture.Controls.Add(pictureMatrix); panelPicture.Dock = DockStyle.Top; panelPicture.Location = new Point(0, 0); panelPicture.Name = "panelPicture"; panelPicture.Size = new Size(834, 419); panelPicture.TabIndex = 4; // // panelMain // panelMain.AutoSize = true; panelMain.Controls.Add(panelButtons); panelMain.Controls.Add(panelGamma); panelMain.Controls.Add(panelContrast); panelMain.Controls.Add(panelRotation); panelMain.Controls.Add(panelScaling); panelMain.Controls.Add(panelZoom); panelMain.Controls.Add(panelPicture); panelMain.Dock = DockStyle.Top; panelMain.Location = new Point(20, 20); panelMain.Name = "panelMain"; panelMain.Size = new Size(834, 1104); panelMain.TabIndex = 5; // // panelButtons // panelButtons.Controls.Add(buttonReset); panelButtons.Controls.Add(buttonPicture); panelButtons.Dock = DockStyle.Top; panelButtons.Location = new Point(0, 1010); panelButtons.Name = "panelButtons"; panelButtons.Size = new Size(834, 94); panelButtons.TabIndex = 6; // // buttonReset // buttonReset.Activated = false; buttonReset.BackColor = SystemColors.ControlLight; buttonReset.BorderColor = Color.Transparent; buttonReset.BorderRadius = 5; buttonReset.FlatAppearance.BorderSize = 0; buttonReset.FlatStyle = FlatStyle.Flat; buttonReset.Image = Properties.Resources.icons8_refresh_32; buttonReset.Location = new Point(290, 19); buttonReset.Name = "buttonReset"; buttonReset.Secondary = true; buttonReset.Size = new Size(258, 56); buttonReset.TabIndex = 4; buttonReset.Text = "Reset"; buttonReset.TextAlign = ContentAlignment.MiddleRight; buttonReset.TextImageRelation = TextImageRelation.ImageBeforeText; buttonReset.UseVisualStyleBackColor = false; // // panelGamma // panelGamma.AutoSize = true; panelGamma.Controls.Add(labelGamma); panelGamma.Controls.Add(labelGammaTitle); panelGamma.Controls.Add(trackGamma); panelGamma.Dock = DockStyle.Top; panelGamma.Location = new Point(0, 865); panelGamma.Name = "panelGamma"; panelGamma.Size = new Size(834, 145); panelGamma.TabIndex = 7; // // labelGamma // labelGamma.Anchor = AnchorStyles.Top | AnchorStyles.Right; labelGamma.Font = new Font("Segoe UI", 9F, FontStyle.Regular, GraphicsUnit.Point); labelGamma.Location = new Point(673, 17); labelGamma.Name = "labelGamma"; labelGamma.Size = new Size(125, 32); labelGamma.TabIndex = 4; labelGamma.Text = "Brightness"; labelGamma.TextAlign = ContentAlignment.TopRight; // // labelGammaTitle // labelGammaTitle.AutoSize = true; labelGammaTitle.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point); labelGammaTitle.Location = new Point(16, 17); labelGammaTitle.Name = "labelGammaTitle"; labelGammaTitle.Size = new Size(134, 32); labelGammaTitle.TabIndex = 3; labelGammaTitle.Text = "Brightness"; // // trackGamma // trackGamma.LargeChange = 50; trackGamma.Location = new Point(16, 52); trackGamma.Maximum = 100; trackGamma.Minimum = -100; trackGamma.Name = "trackGamma"; trackGamma.Size = new Size(782, 90); trackGamma.SmallChange = 10; trackGamma.TabIndex = 2; trackGamma.TickFrequency = 20; trackGamma.TickStyle = TickStyle.TopLeft; // // panelContrast // panelContrast.AutoSize = true; panelContrast.Controls.Add(labelContrast); panelContrast.Controls.Add(labelContrastTitle); panelContrast.Controls.Add(trackContrast); panelContrast.Dock = DockStyle.Top; panelContrast.Location = new Point(0, 720); panelContrast.Name = "panelContrast"; panelContrast.Size = new Size(834, 145); panelContrast.TabIndex = 6; // // labelContrast // labelContrast.Anchor = AnchorStyles.Top | AnchorStyles.Right; labelContrast.Font = new Font("Segoe UI", 9F, FontStyle.Regular, GraphicsUnit.Point); labelContrast.Location = new Point(701, 17); labelContrast.Name = "labelContrast"; labelContrast.Size = new Size(103, 32); labelContrast.TabIndex = 4; labelContrast.Text = "Contrast"; labelContrast.TextAlign = ContentAlignment.TopRight; // // labelContrastTitle // labelContrastTitle.AutoSize = true; labelContrastTitle.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point); labelContrastTitle.Location = new Point(16, 17); labelContrastTitle.Name = "labelContrastTitle"; labelContrastTitle.Size = new Size(111, 32); labelContrastTitle.TabIndex = 3; labelContrastTitle.Text = "Contrast"; // // trackContrast // trackContrast.LargeChange = 50; trackContrast.Location = new Point(16, 52); trackContrast.Maximum = 200; trackContrast.Minimum = 10; trackContrast.Name = "trackContrast"; trackContrast.Size = new Size(782, 90); trackContrast.SmallChange = 10; trackContrast.TabIndex = 2; trackContrast.TickFrequency = 20; trackContrast.TickStyle = TickStyle.TopLeft; trackContrast.Value = 100; // // panelRotation // panelRotation.Controls.Add(comboRotation); panelRotation.Controls.Add(labelRotation); panelRotation.Dock = DockStyle.Top; panelRotation.Location = new Point(0, 642); panelRotation.Name = "panelRotation"; panelRotation.Size = new Size(834, 78); panelRotation.TabIndex = 8; // // comboRotation // comboRotation.BorderColor = Color.White; comboRotation.ButtonColor = Color.FromArgb(255, 255, 255); comboRotation.Font = new Font("Segoe UI", 9F, FontStyle.Regular, GraphicsUnit.Point); comboRotation.FormattingEnabled = true; comboRotation.ItemHeight = 32; comboRotation.Items.AddRange(new object[] { "Straight", "Diagonal" }); comboRotation.Location = new Point(279, 17); comboRotation.Margin = new Padding(4, 11, 4, 8); comboRotation.Name = "comboRotation"; comboRotation.Size = new Size(322, 40); comboRotation.TabIndex = 17; // // labelRotation // labelRotation.AutoSize = true; labelRotation.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point); labelRotation.Location = new Point(16, 20); labelRotation.Name = "labelRotation"; labelRotation.Size = new Size(190, 32); labelRotation.TabIndex = 4; labelRotation.Text = "Image Rotation"; // // panelScaling // panelScaling.Controls.Add(comboScaling); panelScaling.Controls.Add(labelScaling); panelScaling.Dock = DockStyle.Top; panelScaling.Location = new Point(0, 564); panelScaling.Name = "panelScaling"; panelScaling.Size = new Size(834, 78); panelScaling.TabIndex = 7; // // comboScaling // comboScaling.BorderColor = Color.White; comboScaling.ButtonColor = Color.FromArgb(255, 255, 255); comboScaling.Font = new Font("Segoe UI", 9F, FontStyle.Regular, GraphicsUnit.Point); comboScaling.FormattingEnabled = true; comboScaling.ItemHeight = 32; comboScaling.Items.AddRange(new object[] { "Default", "Low", "High", "Bilinear", "Bicubic", "NearestNeighbor", "HighQualityBilinear", "HighQualityBicubic" }); comboScaling.Location = new Point(279, 17); comboScaling.Margin = new Padding(4, 11, 4, 8); comboScaling.Name = "comboScaling"; comboScaling.Size = new Size(322, 40); comboScaling.TabIndex = 17; // // labelScaling // labelScaling.AutoSize = true; labelScaling.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point); labelScaling.Location = new Point(16, 20); labelScaling.Name = "labelScaling"; labelScaling.Size = new Size(185, 32); labelScaling.TabIndex = 4; labelScaling.Text = "Scaling Quality"; // // panelZoom // panelZoom.AutoSize = true; panelZoom.Controls.Add(labelZoom); panelZoom.Controls.Add(labelZoomTitle); panelZoom.Controls.Add(trackZoom); panelZoom.Dock = DockStyle.Top; panelZoom.Location = new Point(0, 419); panelZoom.Name = "panelZoom"; panelZoom.Size = new Size(834, 145); panelZoom.TabIndex = 5; // // labelZoom // labelZoom.Anchor = AnchorStyles.Top | AnchorStyles.Right; labelZoom.AutoSize = true; labelZoom.Font = new Font("Segoe UI", 9F, FontStyle.Regular, GraphicsUnit.Point); labelZoom.Location = new Point(731, 17); labelZoom.Name = "labelZoom"; labelZoom.Size = new Size(77, 32); labelZoom.TabIndex = 4; labelZoom.Text = "Zoom"; // // labelZoomTitle // labelZoomTitle.AutoSize = true; labelZoomTitle.Font = new Font("Segoe UI", 9F, FontStyle.Bold, GraphicsUnit.Point); labelZoomTitle.Location = new Point(16, 17); labelZoomTitle.Name = "labelZoomTitle"; labelZoomTitle.Size = new Size(81, 32); labelZoomTitle.TabIndex = 3; labelZoomTitle.Text = "Zoom"; // // Matrix // AutoScaleDimensions = new SizeF(192F, 192F); AutoScaleMode = AutoScaleMode.Dpi; AutoSize = true; ClientSize = new Size(874, 1142); Controls.Add(panelMain); MaximizeBox = false; MinimizeBox = false; MinimumSize = new Size(900, 0); Name = "Matrix"; Padding = new Padding(20); ShowIcon = false; ShowInTaskbar = false; Text = "Matrix"; ((System.ComponentModel.ISupportInitialize)pictureMatrix).EndInit(); ((System.ComponentModel.ISupportInitialize)trackZoom).EndInit(); panelPicture.ResumeLayout(false); panelMain.ResumeLayout(false); panelMain.PerformLayout(); panelButtons.ResumeLayout(false); panelGamma.ResumeLayout(false); panelGamma.PerformLayout(); ((System.ComponentModel.ISupportInitialize)trackGamma).EndInit(); panelContrast.ResumeLayout(false); panelContrast.PerformLayout(); ((System.ComponentModel.ISupportInitialize)trackContrast).EndInit(); panelRotation.ResumeLayout(false); panelRotation.PerformLayout(); panelScaling.ResumeLayout(false); panelScaling.PerformLayout(); panelZoom.ResumeLayout(false); panelZoom.PerformLayout(); ResumeLayout(false); PerformLayout(); } #endregion private PictureBox pictureMatrix; private TrackBar trackZoom; private UI.RButton buttonPicture; private Panel panelPicture; private Panel panelMain; private Panel panelZoom; private Label labelZoom; private Label labelZoomTitle; private Panel panelButtons; private UI.RButton buttonReset; private Panel panelScaling; private Label labelScaling; private UI.RComboBox comboScaling; private Panel panelRotation; private UI.RComboBox comboRotation; private Label labelRotation; private Panel panelContrast; private Label labelContrast; private Label labelContrastTitle; private TrackBar trackContrast; private Panel panelGamma; private Label labelGamma; private Label labelGammaTitle; private TrackBar trackGamma; } } ================================================ FILE: app/Matrix.cs ================================================ using GHelper.AnimeMatrix; using GHelper.UI; namespace GHelper { public partial class Matrix : RForm { public AniMatrixControl matrixControl = Program.settingsForm.matrixControl; private bool Dragging; private int xPos; private int yPos; private int baseX; private int baseY; private float uiScale; Image picture; MemoryStream ms = new MemoryStream(); public Matrix() { InitializeComponent(); InitTheme(true); Text = Properties.Strings.AnimeMatrix; labelZoomTitle.Text = Properties.Strings.Zoom; labelScaling.Text = Properties.Strings.ScalingQuality; labelRotation.Text = Properties.Strings.ImageRotation; labelContrastTitle.Text = Properties.Strings.Contrast; labelGammaTitle.Text = Properties.Strings.Brightness; buttonPicture.Text = Properties.Strings.PictureGif; buttonReset.Text = Properties.Strings.Reset; Shown += Matrix_Shown; FormClosing += Matrix_FormClosed; buttonPicture.Click += ButtonPicture_Click; buttonReset.Click += ButtonReset_Click; pictureMatrix.MouseUp += PictureMatrix_MouseUp; pictureMatrix.MouseMove += PictureMatrix_MouseMove; pictureMatrix.MouseDown += PictureMatrix_MouseDown; trackZoom.MouseUp += TrackZoom_MouseUp; trackZoom.ValueChanged += TrackZoom_Changed; trackZoom.Value = Math.Min(trackZoom.Maximum, AppConfig.Get("matrix_zoom", 100)); trackContrast.MouseUp += TrackMatrix_MouseUp; trackContrast.ValueChanged += TrackMatrix_ValueChanged; trackContrast.Value = Math.Min(trackContrast.Maximum, AppConfig.Get("matrix_contrast", 100)); trackGamma.MouseUp += TrackMatrix_MouseUp; trackGamma.ValueChanged += TrackMatrix_ValueChanged; trackGamma.Value = Math.Min(trackGamma.Maximum, AppConfig.Get("matrix_gamma", 0)); VisualiseMatrix(); comboScaling.DropDownStyle = ComboBoxStyle.DropDownList; comboScaling.SelectedIndex = AppConfig.Get("matrix_quality", 0); comboScaling.SelectedValueChanged += ComboScaling_SelectedValueChanged; comboRotation.DropDownStyle = ComboBoxStyle.DropDownList; comboRotation.SelectedIndex = AppConfig.Get("matrix_rotation", 0); comboRotation.SelectedValueChanged += ComboRotation_SelectedValueChanged; ; uiScale = panelPicture.Width / matrixControl.deviceMatrix.MaxColumns / 3; panelPicture.Height = (int)(matrixControl.deviceMatrix.MaxRows * uiScale); } private void TrackMatrix_ValueChanged(object? sender, EventArgs e) { VisualiseMatrix(); } private void TrackMatrix_MouseUp(object? sender, MouseEventArgs e) { AppConfig.Set("matrix_contrast", trackContrast.Value); AppConfig.Set("matrix_gamma", trackGamma.Value); SetMatrixPicture(false); } private void ComboRotation_SelectedValueChanged(object? sender, EventArgs e) { AppConfig.Set("matrix_rotation", comboRotation.SelectedIndex); SetMatrixPicture(false); } private void ComboScaling_SelectedValueChanged(object? sender, EventArgs e) { AppConfig.Set("matrix_quality", comboScaling.SelectedIndex); SetMatrixPicture(false); } private void Matrix_FormClosed(object? sender, FormClosingEventArgs e) { if (picture is not null) picture.Dispose(); if (ms is not null) ms.Dispose(); pictureMatrix.Dispose(); GC.Collect(GC.MaxGeneration, GCCollectionMode.Forced); } private void VisualiseMatrix() { labelZoom.Text = trackZoom.Value + "%"; labelContrast.Text = trackContrast.Value + "%"; labelGamma.Text = trackGamma.Value + "%"; } private void ButtonReset_Click(object? sender, EventArgs e) { AppConfig.Set("matrix_gamma", 0); AppConfig.Set("matrix_contrast", 100); AppConfig.Set("matrix_zoom", 100); AppConfig.Set("matrix_x", 0); AppConfig.Set("matrix_y", 0); trackZoom.Value = 100; trackContrast.Value = 100; trackGamma.Value = 0; SetMatrixPicture(); } private void TrackZoom_MouseUp(object? sender, EventArgs e) { AppConfig.Set("matrix_zoom", trackZoom.Value); SetMatrixPicture(); } private void TrackZoom_Changed(object? sender, EventArgs e) { VisualiseMatrix(); } private void PictureMatrix_MouseDown(object? sender, MouseEventArgs e) { if (e.Button == MouseButtons.Left) { Dragging = true; xPos = e.X; yPos = e.Y; } } private void PictureMatrix_MouseMove(object? sender, MouseEventArgs e) { Control c = sender as Control; if (Dragging && c != null) { c.Top = e.Y + c.Top - yPos; c.Left = e.X + c.Left - xPos; } } private void PictureMatrix_MouseUp(object? sender, MouseEventArgs e) { Dragging = false; Control c = sender as Control; int matrixX = (int)((baseX - c.Left) / uiScale); int matrixY = (int)((baseY - c.Top) / uiScale); AppConfig.Set("matrix_x", matrixX); AppConfig.Set("matrix_y", matrixY); SetMatrixPicture(false); } private void Matrix_Shown(object? sender, EventArgs e) { FormPosition(); SetMatrixPicture(); } private void SetMatrixPicture(bool visualise = true) { matrixControl.SetMatrixPicture(AppConfig.GetString("matrix_picture"), visualise); } private void ButtonPicture_Click(object? sender, EventArgs e) { matrixControl.OpenMatrixPicture(); } public void FormPosition() { if (Height > Program.settingsForm.Height) { Top = Program.settingsForm.Top + Program.settingsForm.Height - Height; } else { Height = Program.settingsForm.Height; Top = Program.settingsForm.Top; } Left = Program.settingsForm.Left - Width - 5; } public void VisualiseMatrix(string fileName) { if (picture is not null) picture.Dispose(); using (var fs = new FileStream(fileName, FileMode.Open)) { ms.SetLength(0); fs.CopyTo(ms); ms.Position = 0; fs.Close(); picture = Image.FromStream(ms); int width = picture.Width; int height = picture.Height; int matrixX = AppConfig.Get("matrix_x", 0); int matrixY = AppConfig.Get("matrix_y", 0); int matrixZoom = AppConfig.Get("matrix_zoom", 100); float scale = Math.Min((float)panelPicture.Width / (float)width, (float)panelPicture.Height / (float)height) * matrixZoom / 100; pictureMatrix.Width = (int)(width * scale); pictureMatrix.Height = (int)(height * scale); baseX = panelPicture.Width - pictureMatrix.Width; baseY = 0; pictureMatrix.Left = baseX - (int)(matrixX * uiScale); pictureMatrix.Top = baseY - (int)(matrixY * uiScale); pictureMatrix.SizeMode = PictureBoxSizeMode.Zoom; pictureMatrix.Image = picture; } } } } ================================================ FILE: app/Matrix.resx ================================================  text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 ================================================ FILE: app/Mode/ModeControl.cs ================================================ using GHelper.Gpu.NVidia; using GHelper.Helpers; using GHelper.USB; using Ryzen; namespace GHelper.Mode { public class ModeControl { static SettingsForm settings = Program.settingsForm; private static bool customFans = false; private static int customPower = 0; private static bool customTemp = false; private int _cpuUV = 0; private int _igpuUV = 0; private bool _ryzenPower = false; static System.Timers.Timer reapplyTimer = default!; static System.Timers.Timer modeToggleTimer = default!; public ModeControl() { reapplyTimer = new System.Timers.Timer(AppConfig.GetMode("reapply_time", 30) * 1000); reapplyTimer.Enabled = false; reapplyTimer.Elapsed += ReapplyTimer_Elapsed; } private void ReapplyTimer_Elapsed(object? sender, System.Timers.ElapsedEventArgs e) { SetCPUTemp(AppConfig.GetMode("cpu_temp")); SetRyzenPower(); } public void AutoPerformance(bool powerChanged = false) { var Plugged = SystemInformation.PowerStatus.PowerLineStatus; int mode = AppConfig.Get("performance_" + (int)Plugged); if (mode != -1) SetPerformanceMode(mode, powerChanged); else SetPerformanceMode(Modes.GetCurrent()); } public void ResetPerformanceMode() { ResetRyzen(); Program.acpi.DeviceSet(AsusACPI.PerformanceMode, Modes.GetCurrentBase(), "Mode"); // Default power mode AppConfig.RemoveMode("powermode"); PowerNative.SetPowerMode(Modes.GetCurrentBase()); } public void Toast() { Program.toast.RunToast(Modes.GetCurrentName(), SystemInformation.PowerStatus.PowerLineStatus == PowerLineStatus.Online ? ToastIcon.Charger : ToastIcon.Battery); } public void SetPerformanceMode(int mode = -1, bool notify = false) { int oldMode = Modes.GetCurrent(); if (mode < 0) mode = oldMode; if (!Modes.Exists(mode)) mode = 0; settings.ShowMode(mode); Modes.SetCurrent(mode); Task.Run(async () => { bool reset = AppConfig.IsResetRequired() && (Modes.GetBase(oldMode) == Modes.GetBase(mode)) && customPower > 0 && !AppConfig.IsMode("auto_apply_power"); customFans = false; customPower = 0; customTemp = false; SetModeLabel(); // Workaround for not properly resetting limits on G14 2024 if (reset) { Program.acpi.DeviceSet(AsusACPI.PerformanceMode, (Modes.GetBase(oldMode) != 1) ? AsusACPI.PerformanceTurbo : AsusACPI.PerformanceBalanced, "ModeReset"); await Task.Delay(TimeSpan.FromMilliseconds(1500)); } if (AppConfig.Is("status_mode")) Program.acpi.DeviceSet(AsusACPI.StatusMode, [0x00, Modes.GetBase(mode) == AsusACPI.PerformanceSilent ? (byte)0x02 : (byte)0x03], "StatusMode"); int status = Program.acpi.DeviceSet(AsusACPI.PerformanceMode, AppConfig.IsManualModeRequired() ? AsusACPI.PerformanceManual : Modes.GetBase(mode), "Mode"); // Vivobook fallback if (status != 1) Program.acpi.SetVivoMode(Modes.GetBase(mode)); SetGPUClocks(); await Task.Delay(TimeSpan.FromMilliseconds(100)); AutoFans(); await Task.Delay(TimeSpan.FromMilliseconds(1000)); AutoPower(); var command = AppConfig.GetModeString("mode_command"); if (command is not null) { Logger.WriteLine("Running mode command: " + command); RestrictedProcessHelper.RunAsRestrictedUser(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.System), "cmd.exe"), "/C " + command); } }); if (AppConfig.Is("xgm_fan")) XGM.Reset(); if (notify) Toast(); if (!AppConfig.Is("skip_powermode")) { // Windows power mode if (AppConfig.GetModeString("powermode") is not null) PowerNative.SetPowerMode(AppConfig.GetModeString("powermode")); else PowerNative.SetPowerMode(Modes.GetBase(mode)); if (AppConfig.Is("aspm") && PowerNative.GetASPM() > 0) PowerNative.SetASPM(0); } // CPU Boost setting override if (AppConfig.GetMode("auto_boost") != -1) PowerNative.SetCPUBoost(AppConfig.GetMode("auto_boost")); settings.FansInit(); } private void ModeToggleTimer_Elapsed(object? sender, System.Timers.ElapsedEventArgs e) { modeToggleTimer.Stop(); Logger.WriteLine($"Timed mode: {Modes.GetCurrent()}"); SetPerformanceMode(); } public void CyclePerformanceMode(bool back = false) { int delay = AppConfig.Get("mode_delay"); if (delay > 0) { if (modeToggleTimer is null) { modeToggleTimer = new System.Timers.Timer(delay); modeToggleTimer.Elapsed += ModeToggleTimer_Elapsed; } modeToggleTimer.Stop(); modeToggleTimer.Start(); Modes.SetCurrent(Modes.GetNext(back)); Toast(); } else { SetPerformanceMode(Modes.GetNext(back), true); } } public void AutoFans(bool force = false) { customFans = false; if (AppConfig.IsMode("auto_apply") || force) { bool xgmFan = false; if (AppConfig.Is("xgm_fan")) { XGM.SetFan(AppConfig.GetFanConfig(AsusFan.XGM)); xgmFan = Program.acpi.IsXGConnected(); } int cpuResult = Program.acpi.SetFanCurve(AsusFan.CPU, AppConfig.GetFanConfig(AsusFan.CPU)); int gpuResult = Program.acpi.SetFanCurve(AsusFan.GPU, AppConfig.GetFanConfig(AsusFan.GPU)); if (AppConfig.Is("mid_fan")) Program.acpi.SetFanCurve(AsusFan.Mid, AppConfig.GetFanConfig(AsusFan.Mid)); // Alternative way to set fan curve if (cpuResult != 1 || gpuResult != 1) { cpuResult = Program.acpi.SetFanRange(AsusFan.CPU, AppConfig.GetFanConfig(AsusFan.CPU)); gpuResult = Program.acpi.SetFanRange(AsusFan.GPU, AppConfig.GetFanConfig(AsusFan.GPU)); // Something went wrong, resetting to default profile if (cpuResult != 1 || gpuResult != 1) { Program.acpi.DeviceSet(AsusACPI.PerformanceMode, Modes.GetCurrentBase(), "Reset Mode"); settings.LabelFansResult("Model doesn't support custom fan curves"); } } else { settings.LabelFansResult(""); customFans = true; } // force set PPTs for missbehaving bios on FX507/517 series if ((AppConfig.IsPowerRequired() || xgmFan) && !AppConfig.IsMode("auto_apply_power")) { Task.Run(async () => { await Task.Delay(TimeSpan.FromSeconds(1)); Program.acpi.DeviceSet(AsusACPI.PPT_APUA0, 80, "PowerLimit Fix A0"); Program.acpi.DeviceSet(AsusACPI.PPT_APUA3, 80, "PowerLimit Fix A3"); }); } } SetModeLabel(); } public void AutoPower(bool launchAsAdmin = false) { customPower = 0; bool applyPower = AppConfig.IsMode("auto_apply_power"); bool applyFans = AppConfig.IsMode("auto_apply"); if (applyPower && !applyFans && AppConfig.IsFanRequired()) { AutoFans(true); Thread.Sleep(500); } if (applyPower) SetPower(launchAsAdmin); Thread.Sleep(500); SetGPUPower(); AutoRyzen(); } public void SetModeLabel() { settings.SetModeLabel(Properties.Strings.PerformanceMode + ": " + Modes.GetCurrentName() + (customFans ? "+" : "") + ((customPower > 0) ? " " + customPower + "W" : "")); } public void SetRyzenPower(bool init = false) { if (init) _ryzenPower = true; if (!_ryzenPower) return; if (!RyzenControl.IsRingExsists()) return; if (!AppConfig.IsMode("auto_apply_power")) return; int limit_total = AppConfig.GetMode("limit_total"); int limit_slow = AppConfig.GetMode("limit_slow", limit_total); if (limit_total > AsusACPI.MaxTotal) return; if (limit_total < AsusACPI.MinTotal) return; var stapmResult = SendCommand.set_stapm_limit((uint)limit_total * 1000); if (init) Logger.WriteLine($"STAPM: {limit_total} {stapmResult}"); var slowResult = SendCommand.set_slow_limit((uint)limit_slow * 1000); if (init) Logger.WriteLine($"SLOW: {limit_slow} {slowResult}"); var fastResult = SendCommand.set_fast_limit((uint)limit_slow * 1000); if (init) Logger.WriteLine($"FAST: {limit_slow} {fastResult}"); } public void SetPower(bool launchAsAdmin = false) { bool allAMD = Program.acpi.IsAllAmdPPT(); bool isAMD = RyzenControl.IsAMD(); int limit_total = AppConfig.GetMode("limit_total"); int limit_cpu = AppConfig.GetMode("limit_cpu"); int limit_slow = AppConfig.GetMode("limit_slow"); int limit_fast = AppConfig.GetMode("limit_fast"); if (limit_slow < 0 || allAMD) limit_slow = limit_total; if (limit_total > AsusACPI.MaxTotal) return; if (limit_total < AsusACPI.MinTotal) return; if (limit_cpu > AsusACPI.MaxCPU) return; if (limit_cpu < AsusACPI.MinCPU) return; if (limit_fast > AsusACPI.MaxTotal) return; if (limit_fast < AsusACPI.MinTotal) return; if (limit_slow > AsusACPI.MaxTotal) return; if (limit_slow < AsusACPI.MinTotal) return; // SPL and SPPT if (Program.acpi.DeviceGet(AsusACPI.PPT_APUA0) >= 0) { Program.acpi.DeviceSet(AsusACPI.PPT_APUA3, limit_total, "PowerLimit A3"); Program.acpi.DeviceSet(AsusACPI.PPT_APUA0, limit_slow, "PowerLimit A0"); customPower = limit_total; } else if (isAMD) { if (ProcessHelper.IsUserAdministrator()) { SetRyzenPower(true); } else if (launchAsAdmin) { ProcessHelper.RunAsAdmin("cpu"); return; } } if (Program.acpi.IsAllAmdPPT()) // CPU limit all amd models { Program.acpi.DeviceSet(AsusACPI.PPT_CPUB0, limit_cpu, "PowerLimit B0"); customPower = limit_cpu; } else if (isAMD && Program.acpi.DeviceGet(AsusACPI.PPT_APUC1) >= 0) // FPPT boost for non all-amd models { Program.acpi.DeviceSet(AsusACPI.PPT_APUC1, limit_fast, "PowerLimit C1"); } SetModeLabel(); } public void SetGPUClocks(bool launchAsAdmin = true, bool reset = false) { Task.Run(() => { int core = AppConfig.GetMode("gpu_core"); int memory = AppConfig.GetMode("gpu_memory"); int clock_limit = AppConfig.GetMode("gpu_clock_limit"); if (reset) core = memory = clock_limit = 0; if (core == -1 && memory == -1 && clock_limit == -1) return; //if ((gpu_core > -5 && gpu_core < 5) && (gpu_memory > -5 && gpu_memory < 5)) launchAsAdmin = false; if (Program.acpi.DeviceGet(AsusACPI.GPUEco) == 1) { Logger.WriteLine("Clocks: Eco"); return; } if (HardwareControl.GpuControl is null) { Logger.WriteLine("Clocks: NoGPUControl"); return; } if (!HardwareControl.GpuControl!.IsNvidia) { Logger.WriteLine("Clocks: NotNvidia"); return; } using NvidiaGpuControl nvControl = (NvidiaGpuControl)HardwareControl.GpuControl; try { int statusLimit = nvControl.SetMaxGPUClock(clock_limit); int statusClocks = nvControl.SetClocks(core, memory); if ((statusLimit != 0 || statusClocks != 0) && launchAsAdmin) ProcessHelper.RunAsAdmin("gpu"); } catch (Exception ex) { Logger.WriteLine("Clocks Error:" + ex.ToString()); } settings.GPUInit(); }); } public void SetGPUPower() { int gpu_boost = AppConfig.GetMode("gpu_boost"); int gpu_temp = AppConfig.GetMode("gpu_temp"); int gpu_power = AppConfig.GetMode("gpu_power"); int boostResult = -1; if (gpu_power >= AsusACPI.MinGPUPower && gpu_power <= AsusACPI.MaxGPUPower && Program.acpi.DeviceGet(AsusACPI.GPU_POWER) >= 0) Program.acpi.DeviceSet(AsusACPI.GPU_POWER, gpu_power, "PowerLimit TGP (GPU VAR)"); if (gpu_boost >= AsusACPI.MinGPUBoost && gpu_boost <= AsusACPI.MaxGPUBoost && Program.acpi.DeviceGet(AsusACPI.PPT_GPUC0) >= 0) boostResult = Program.acpi.DeviceSet(AsusACPI.PPT_GPUC0, gpu_boost, "PowerLimit C0 (GPU BOOST)"); if (gpu_temp >= AsusACPI.MinGPUTemp && gpu_temp <= AsusACPI.MaxGPUTemp && Program.acpi.DeviceGet(AsusACPI.PPT_GPUC2) >= 0) Program.acpi.DeviceSet(AsusACPI.PPT_GPUC2, gpu_temp, "PowerLimit C2 (GPU TEMP)"); // Fallback if (boostResult == 0) Program.acpi.DeviceSet(AsusACPI.PPT_GPUC0, gpu_boost, "PowerLimit C0"); } public void SetCPUTemp(int? cpuTemp, bool init = false) { if (cpuTemp == RyzenControl.MaxTemp && customTemp) { cpuTemp = RyzenControl.DefaultTemp; Logger.WriteLine($"Custom CPU Temp reset"); } if (cpuTemp >= RyzenControl.MinTemp && cpuTemp < RyzenControl.MaxTemp) { var resultCPU = SendCommand.set_tctl_temp((uint)cpuTemp); if (init) Logger.WriteLine($"CPU Temp: {cpuTemp} {resultCPU}"); if (resultCPU == Smu.Status.OK) customTemp = cpuTemp != RyzenControl.DefaultTemp; } } public void SetUV(int cpuUV) { if (!RyzenControl.IsSupportedUV()) return; if (cpuUV >= RyzenControl.MinCPUUV && cpuUV <= RyzenControl.MaxCPUUV) { var uvResult = SendCommand.set_coall(cpuUV); Logger.WriteLine($"UV: {cpuUV} {uvResult}"); if (uvResult == Smu.Status.OK) _cpuUV = cpuUV; } } public void SetUViGPU(int igpuUV) { if (!RyzenControl.IsSupportedUViGPU()) return; if (igpuUV >= RyzenControl.MinIGPUUV && igpuUV <= RyzenControl.MaxIGPUUV) { var iGPUResult = SendCommand.set_cogfx(igpuUV); Logger.WriteLine($"iGPU UV: {igpuUV} {iGPUResult}"); if (iGPUResult == Smu.Status.OK) _igpuUV = igpuUV; } } public void SetRyzen(bool launchAsAdmin = false) { if (!ProcessHelper.IsUserAdministrator()) { if (launchAsAdmin) ProcessHelper.RunAsAdmin("uv"); return; } if (!RyzenControl.IsRingExsists()) return; try { SetUV(AppConfig.GetMode("cpu_uv", 0)); SetUViGPU(AppConfig.GetMode("igpu_uv", 0)); SetCPUTemp(AppConfig.GetMode("cpu_temp"), true); } catch (Exception ex) { Logger.WriteLine("UV Error: " + ex.ToString()); } reapplyTimer.Enabled = AppConfig.IsMode("auto_uv"); } public void ResetRyzen() { if (_cpuUV != 0) SetUV(0); if (_igpuUV != 0) SetUViGPU(0); reapplyTimer.Enabled = false; } public void AutoRyzen() { if (!RyzenControl.IsAMD()) return; if (AppConfig.IsMode("auto_uv")) SetRyzen(); else ResetRyzen(); } public void ShutdownReset() { if (!AppConfig.IsShutdownReset()) return; Program.acpi.DeviceSet(AsusACPI.PerformanceMode,AsusACPI.PerformanceBalanced, "Mode Reset"); } } } ================================================ FILE: app/Mode/Modes.cs ================================================ namespace GHelper.Mode { internal class Modes { static Dictionary settings = new Dictionary { { "mode_base", "_" }, { "mode_name", "_" }, { "powermode", "string" }, { "limit_total", "int" }, { "limit_slow", "int" }, { "limit_fast", "int" }, { "limit_cpu", "int" }, { "fan_profile_cpu", "string" }, { "fan_profile_gpu", "string" }, { "fan_profile_mid", "string" }, { "gpu_power", "int" }, { "gpu_boost", "int" }, { "gpu_temp", "int" }, { "gpu_core", "int" }, { "gpu_memory", "int" }, { "gpu_clock_limit", "int" }, { "cpu_temp", "_" }, { "cpu_uv", "_" }, { "igpu_uv", "_" }, { "auto_boost", "int" }, { "auto_apply", "int" }, { "auto_apply_power", "int" }, { "auto_uv", "_" } }; const int maxModes = 20; public static Dictionary GetDictonary() { Dictionary modes = new Dictionary { {2, Properties.Strings.Silent}, {0, Properties.Strings.Balanced}, {1, Properties.Strings.Turbo} }; for (int i = 3; i < maxModes; i++) { if (Exists(i)) modes.Add(i, GetName(i)); } return modes; } public static List GetList() { List modes = new() { 2, 0, 1 }; for (int i = 3; i < maxModes; i++) { if (Exists(i)) modes.Add(i); } return modes; } public static void Remove(int mode) { foreach (string clean in settings.Keys) { AppConfig.Remove(clean + "_" + mode); } } public static int Add() { int currentMode = GetCurrent(); for (int i = 3; i < maxModes; i++) { if (Exists(i)) continue; AppConfig.Set("mode_base_" + i, GetCurrentBase()); AppConfig.Set("mode_name_" + i, "Custom " + (i - 2)); if (Exists(currentMode)) { foreach (var kvp in settings) { if (kvp.Value == "_") continue; string sourceKey = kvp.Key + "_" + currentMode; string targetKey = kvp.Key + "_" + i; if (!AppConfig.Exists(sourceKey)) continue; if (kvp.Value == "int") AppConfig.Set(targetKey, AppConfig.Get(sourceKey)); else AppConfig.Set(targetKey, AppConfig.GetString(sourceKey)); } } return i; } return -1; } public static int GetCurrent() { return AppConfig.Get("performance_mode"); } public static bool IsCurrentCustom() { return GetCurrent() > 2; } public static void SetCurrent(int mode) { AppConfig.Set("performance_" + (int)SystemInformation.PowerStatus.PowerLineStatus, mode); AppConfig.Set("performance_mode", mode); } public static int GetCurrentBase() { return GetBase(GetCurrent()); } public static string GetCurrentName() { return GetName(GetCurrent()); } public static bool Exists(int mode) { return GetBase(mode) >= 0; } public static int GetBase(int mode) { if (mode >= 0 && mode <= 2) return mode; else return AppConfig.Get("mode_base_" + mode); } public static string GetName(int mode) { switch (mode) { case 0: return Properties.Strings.Balanced; case 1: return Properties.Strings.Turbo; case 2: return Properties.Strings.Silent; default: return AppConfig.GetString("mode_name_" + mode); } } public static int GetNext(bool back = false) { var modes = GetList(); int index = modes.IndexOf(GetCurrent()); if (back) { index--; if (index < 0) index = modes.Count - 1; return modes[index]; } else { index++; if (index > modes.Count - 1) index = 0; return modes[index]; } } } } ================================================ FILE: app/Mode/PowerNative.cs ================================================ using Microsoft.Win32; using System.Runtime.InteropServices; namespace GHelper.Mode { internal class PowerNative { [DllImport("PowrProf.dll", CharSet = CharSet.Unicode)] static extern UInt32 PowerWriteDCValueIndex(IntPtr RootPowerKey, [MarshalAs(UnmanagedType.LPStruct)] Guid SchemeGuid, [MarshalAs(UnmanagedType.LPStruct)] Guid SubGroupOfPowerSettingsGuid, [MarshalAs(UnmanagedType.LPStruct)] Guid PowerSettingGuid, int AcValueIndex); [DllImport("PowrProf.dll", CharSet = CharSet.Unicode)] static extern UInt32 PowerWriteACValueIndex(IntPtr RootPowerKey, [MarshalAs(UnmanagedType.LPStruct)] Guid SchemeGuid, [MarshalAs(UnmanagedType.LPStruct)] Guid SubGroupOfPowerSettingsGuid, [MarshalAs(UnmanagedType.LPStruct)] Guid PowerSettingGuid, int AcValueIndex); [DllImport("PowrProf.dll", CharSet = CharSet.Unicode)] static extern UInt32 PowerReadACValueIndex(IntPtr RootPowerKey, [MarshalAs(UnmanagedType.LPStruct)] Guid SchemeGuid, [MarshalAs(UnmanagedType.LPStruct)] Guid SubGroupOfPowerSettingsGuid, [MarshalAs(UnmanagedType.LPStruct)] Guid PowerSettingGuid, out IntPtr AcValueIndex ); [DllImport("PowrProf.dll", CharSet = CharSet.Unicode)] static extern UInt32 PowerReadDCValueIndex(IntPtr RootPowerKey, [MarshalAs(UnmanagedType.LPStruct)] Guid SchemeGuid, [MarshalAs(UnmanagedType.LPStruct)] Guid SubGroupOfPowerSettingsGuid, [MarshalAs(UnmanagedType.LPStruct)] Guid PowerSettingGuid, out IntPtr AcValueIndex ); [DllImport("powrprof.dll")] static extern uint PowerReadACValue( IntPtr RootPowerKey, Guid SchemeGuid, Guid SubGroupOfPowerSettingGuid, Guid PowerSettingGuid, ref int Type, ref IntPtr Buffer, ref uint BufferSize ); [DllImport("PowrProf.dll", CharSet = CharSet.Unicode)] static extern UInt32 PowerSetActiveScheme(IntPtr RootPowerKey, [MarshalAs(UnmanagedType.LPStruct)] Guid SchemeGuid); [DllImport("PowrProf.dll", CharSet = CharSet.Unicode)] static extern UInt32 PowerGetActiveScheme(IntPtr UserPowerKey, out IntPtr ActivePolicyGuid); static readonly Guid GUID_CPU = new Guid("54533251-82be-4824-96c1-47b60b740d00"); static readonly Guid GUID_BOOST = new Guid("be337238-0d82-4146-a960-4f3749d470c7"); private static Guid GUID_SLEEP_SUBGROUP = new Guid("238c9fa8-0aad-41ed-83f4-97be242c8f20"); private static Guid GUID_HIBERNATEIDLE = new Guid("9d7815a6-7ee4-497e-8888-515a05f02364"); private static Guid GUID_SYSTEM_BUTTON_SUBGROUP = new Guid("4f971e89-eebd-4455-a8de-9e59040e7347"); private static Guid GUID_LIDACTION = new Guid("5CA83367-6E45-459F-A27B-476B1D01C936"); private static Guid GUID_SUB_PCIEXPRESS = new Guid("501a4d13-42af-4429-9fd1-a8218c268e20"); private static Guid GUID_PCI_EXPRESS_ASPM = new Guid("ee12f906-d277-404b-b6da-e5fa1a576df5"); [DllImportAttribute("powrprof.dll", EntryPoint = "PowerGetActualOverlayScheme")] public static extern uint PowerGetActualOverlayScheme(out Guid ActualOverlayGuid); [DllImportAttribute("powrprof.dll", EntryPoint = "PowerGetEffectiveOverlayScheme")] public static extern uint PowerGetEffectiveOverlayScheme(out Guid EffectiveOverlayGuid); [DllImportAttribute("powrprof.dll", EntryPoint = "PowerSetActiveOverlayScheme")] public static extern uint PowerSetActiveOverlayScheme(Guid OverlaySchemeGuid); const string POWER_SILENT = "961cc777-2547-4f9d-8174-7d86181b8a7a"; const string POWER_BALANCED = "00000000-0000-0000-0000-000000000000"; const string POWER_TURBO = "ded574b5-45a0-4f42-8737-46345c09c238"; const string PLAN_BALANCED = "381b4222-f694-41f0-9685-ff5bb260df2e"; const string PLAN_HIGH_PERFORMANCE = "8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c"; static List overlays = new() { POWER_BALANCED, POWER_TURBO, POWER_SILENT, }; public static Dictionary powerModes = new Dictionary { { POWER_SILENT, "Best Power Efficiency" }, { POWER_BALANCED, "Balanced" }, { POWER_TURBO, "Best Performance" }, { PLAN_HIGH_PERFORMANCE, "High Performance Plan"}, }; static Guid GetActiveScheme() { IntPtr pActiveSchemeGuid; var hr = PowerGetActiveScheme(IntPtr.Zero, out pActiveSchemeGuid); Guid activeSchemeGuid = (Guid)Marshal.PtrToStructure(pActiveSchemeGuid, typeof(Guid)); return activeSchemeGuid; } public static int GetCPUBoost() { IntPtr AcValueIndex; Guid activeSchemeGuid = GetActiveScheme(); UInt32 value = PowerReadACValueIndex(IntPtr.Zero, activeSchemeGuid, GUID_CPU, GUID_BOOST, out AcValueIndex); return AcValueIndex.ToInt32(); } public static void SetCPUBoost(int boost = 0) { Guid activeSchemeGuid = GetActiveScheme(); if (boost == GetCPUBoost()) return; var hrAC = PowerWriteACValueIndex( IntPtr.Zero, activeSchemeGuid, GUID_CPU, GUID_BOOST, boost); PowerSetActiveScheme(IntPtr.Zero, activeSchemeGuid); var hrDC = PowerWriteDCValueIndex( IntPtr.Zero, activeSchemeGuid, GUID_CPU, GUID_BOOST, boost); PowerSetActiveScheme(IntPtr.Zero, activeSchemeGuid); Logger.WriteLine("Boost " + boost); } public static string GetPowerMode() { if (GetActiveScheme().ToString() == PLAN_HIGH_PERFORMANCE) return PLAN_HIGH_PERFORMANCE; PowerGetEffectiveOverlayScheme(out Guid activeScheme); return activeScheme.ToString(); } public static void SetPowerMode(string scheme) { if (scheme == PLAN_HIGH_PERFORMANCE) { SetPowerPlan(scheme); return; } else { // Power plan from config or defaulting to balanced SetPowerPlan(AppConfig.GetModeString("scheme")); } if (!overlays.Contains(scheme)) return; Guid guidScheme = new Guid(scheme); uint status = PowerGetEffectiveOverlayScheme(out Guid activeScheme); if (GetBatterySaverStatus()) { Logger.WriteLine("Battery Saver detected"); return; } if (status != 0 || activeScheme != guidScheme) { status = PowerSetActiveOverlayScheme(guidScheme); Logger.WriteLine("Power Mode " + activeScheme + " -> " + scheme + ":" + (status == 0 ? "OK" : status)); } } public static void SetPowerPlan(string scheme) { // Skipping power modes if (overlays.Contains(scheme)) return; if (scheme is null) scheme = PLAN_BALANCED; var activeScheme = GetActiveScheme().ToString(); if (activeScheme == scheme) return; uint status = PowerSetActiveScheme(IntPtr.Zero, new Guid(scheme)); Logger.WriteLine($"Power Plan {activeScheme} -> {scheme} :" + (status == 0 ? "OK" : status)); } public static string GetDefaultPowerMode(int mode) { switch (mode) { case 1: // turbo return POWER_TURBO; case 2: //silent return POWER_SILENT; default: // balanced return POWER_BALANCED; } } public static void SetPowerMode(int mode) { SetPowerMode(GetDefaultPowerMode(mode)); } public static int GetASPM() { Guid activeSchemeGuid = GetActiveScheme(); IntPtr activeIndex; PowerReadACValueIndex(IntPtr.Zero, activeSchemeGuid, GUID_SUB_PCIEXPRESS, GUID_PCI_EXPRESS_ASPM, out activeIndex); return activeIndex.ToInt32(); } public static void SetASPM(int status = 0) { Guid activeSchemeGuid = GetActiveScheme(); var hrAC = PowerWriteACValueIndex( IntPtr.Zero, activeSchemeGuid, GUID_SUB_PCIEXPRESS, GUID_PCI_EXPRESS_ASPM, status); PowerSetActiveScheme(IntPtr.Zero, activeSchemeGuid); Logger.WriteLine("Changed ASPM to " + status); } public static int GetLidAction(bool ac) { Guid activeSchemeGuid = GetActiveScheme(); IntPtr activeIndex; if (ac) PowerReadACValueIndex(IntPtr.Zero, activeSchemeGuid, GUID_SYSTEM_BUTTON_SUBGROUP, GUID_LIDACTION, out activeIndex); else PowerReadDCValueIndex(IntPtr.Zero, activeSchemeGuid, GUID_SYSTEM_BUTTON_SUBGROUP, GUID_LIDACTION, out activeIndex); return activeIndex.ToInt32(); } public static void SetLidAction(int action, bool acOnly = false) { /** * 1: Do nothing * 2: Seelp * 3: Hibernate * 4: Shutdown */ Guid activeSchemeGuid = GetActiveScheme(); var hrAC = PowerWriteACValueIndex( IntPtr.Zero, activeSchemeGuid, GUID_SYSTEM_BUTTON_SUBGROUP, GUID_LIDACTION, action); PowerSetActiveScheme(IntPtr.Zero, activeSchemeGuid); if (!acOnly) { var hrDC = PowerWriteDCValueIndex( IntPtr.Zero, activeSchemeGuid, GUID_SYSTEM_BUTTON_SUBGROUP, GUID_LIDACTION, action); PowerSetActiveScheme(IntPtr.Zero, activeSchemeGuid); } Logger.WriteLine("Changed Lid Action to " + action); } public static int GetHibernateAfter() { Guid activeSchemeGuid = GetActiveScheme(); IntPtr seconds; PowerReadDCValueIndex(IntPtr.Zero, activeSchemeGuid, GUID_SLEEP_SUBGROUP, GUID_HIBERNATEIDLE, out seconds); Logger.WriteLine("Hibernate after " + seconds); return (seconds.ToInt32() / 60); } public static void SetHibernateAfter(int minutes) { int seconds = minutes * 60; Guid activeSchemeGuid = GetActiveScheme(); var hrAC = PowerWriteDCValueIndex( IntPtr.Zero, activeSchemeGuid, GUID_SLEEP_SUBGROUP, GUID_HIBERNATEIDLE, seconds); PowerSetActiveScheme(IntPtr.Zero, activeSchemeGuid); Logger.WriteLine("Setting Hibernate after " + seconds + ": " + (hrAC == 0 ? "OK" : hrAC)); } [DllImport("Kernel32")] private static extern bool GetSystemPowerStatus(SystemPowerStatus sps); public enum ACLineStatus : byte { Offline = 0, Online = 1, Unknown = 255 } public enum BatteryFlag : byte { High = 1, Low = 2, Critical = 4, Charging = 8, NoSystemBattery = 128, Unknown = 255 } // Fields must mirror their unmanaged counterparts, in order [StructLayout(LayoutKind.Sequential)] public class SystemPowerStatus { public ACLineStatus ACLineStatus; public BatteryFlag BatteryFlag; public Byte BatteryLifePercent; public Byte SystemStatusFlag; public Int32 BatteryLifeTime; public Int32 BatteryFullLifeTime; } public static bool GetBatterySaverStatus() { try { var status = Registry.GetValue(@"HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Power", "EnergySaverState", null); if (status == null) { SystemPowerStatus sps = new SystemPowerStatus(); GetSystemPowerStatus(sps); return (sps.SystemStatusFlag > 0); } return (int)status == 1; } catch (Exception e) { Logger.WriteLine("Can't check EnergySaverState" + e.Message); return false; } } } } ================================================ FILE: app/NativeMethods.cs ================================================ using System.Runtime.InteropServices; public static class NativeMethods { internal struct LASTINPUTINFO { public uint cbSize; public uint dwTime; } [DllImport("User32.dll")] private static extern bool GetLastInputInfo(ref LASTINPUTINFO plii); public static TimeSpan GetIdleTime() { LASTINPUTINFO lastInPut = new LASTINPUTINFO(); lastInPut.cbSize = (uint)Marshal.SizeOf(lastInPut); GetLastInputInfo(ref lastInPut); return TimeSpan.FromMilliseconds((uint)Environment.TickCount - lastInPut.dwTime); } private const int WM_SYSCOMMAND = 0x0112; private const int SC_MONITORPOWER = 0xF170; private const int MONITOR_OFF = 2; [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)] public static extern int RegisterWindowMessage(string lpString); [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)] private static extern IntPtr SendMessage(nint hWnd, int hMsg, int wParam, int lParam); [DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)] private static extern uint FormatMessage(uint dwFlags, IntPtr lpSource, uint dwMessageId, uint dwLanguageId, out string lpBuffer, uint nSize, IntPtr Arguments); [DllImport("user32.dll", SetLastError = true)] [return: MarshalAs(UnmanagedType.Bool)] private static extern bool LockWorkStation(); public static void LockScreen() { LockWorkStation(); } public static void TurnOffScreen() { Form f = new Form(); IntPtr result = SendMessage(f.Handle, WM_SYSCOMMAND, SC_MONITORPOWER, MONITOR_OFF); if (result == IntPtr.Zero) { int error = Marshal.GetLastWin32Error(); string message = ""; uint formatFlags = 0x00001000 | 0x00000200 | 0x00000100 | 0x00000080; uint formatResult = FormatMessage(formatFlags, IntPtr.Zero, (uint)error, 0, out message, 0, IntPtr.Zero); if (formatResult == 0) { message = "Unknown error."; } Logger.WriteLine($"Failed to turn off screen. Error code: {error}. {message}"); } } // Monitor Power detection internal const uint DEVICE_NOTIFY_WINDOW_HANDLE = 0x0; internal const uint DEVICE_NOTIFY_SERVICE_HANDLE = 0x1; internal const int WM_POWERBROADCAST = 0x0218; internal const int PBT_POWERSETTINGCHANGE = 0x8013; [DllImport("User32.dll", SetLastError = true)] internal static extern IntPtr RegisterPowerSettingNotification(IntPtr hWnd, [In] Guid PowerSettingGuid, uint Flags); [DllImport("User32.dll", SetLastError = true)] internal static extern bool UnregisterPowerSettingNotification(IntPtr hWnd); [StructLayout(LayoutKind.Sequential, Pack = 4)] internal struct POWERBROADCAST_SETTING { public Guid PowerSetting; public uint DataLength; public byte Data; } public class PowerSettingGuid { // 0=Powered by AC, 1=Powered by Battery, 2=Powered by short-term source (UPC) public static Guid AcdcPowerSource { get; } = new Guid("5d3e9a59-e9D5-4b00-a6bd-ff34ff516548"); // POWERBROADCAST_SETTING.Data = 1-100 public static Guid BatteryPercentageRemaining { get; } = new Guid("a7ad8041-b45a-4cae-87a3-eecbb468a9e1"); // Windows 8+: 0=Monitor Off, 1=Monitor On, 2=Monitor Dimmed public static Guid ConsoleDisplayState { get; } = new Guid("6fe69556-704a-47a0-8f24-c28d936fda47"); // Windows 8+, Session 0 enabled: 0=User providing Input, 2=User Idle public static Guid GlobalUserPresence { get; } = new Guid("786E8A1D-B427-4344-9207-09E70BDCBEA9"); // 0=Monitor Off, 1=Monitor On. public static Guid MonitorPowerGuid { get; } = new Guid("02731015-4510-4526-99e6-e5a17ebd1aea"); // 0=Battery Saver Off, 1=Battery Saver On. public static Guid PowerSavingStatus { get; } = new Guid("E00958C0-C213-4ACE-AC77-FECCED2EEEA5"); // Windows 8+: 0=Off, 1=On, 2=Dimmed public static Guid SessionDisplayStatus { get; } = new Guid("2B84C20E-AD23-4ddf-93DB-05FFBD7EFCA5"); // Windows 8+, no Session 0: 0=User providing Input, 2=User Idle public static Guid SessionUserPresence { get; } = new Guid("3C0F4548-C03F-4c4d-B9F2-237EDE686376"); // 0=Exiting away mode 1=Entering away mode public static Guid SystemAwaymode { get; } = new Guid("98a7f580-01f7-48aa-9c0f-44352c29e5C0"); /* Windows 8+ */ // POWERBROADCAST_SETTING.Data not used public static Guid IdleBackgroundTask { get; } = new Guid(0x515C31D8, 0xF734, 0x163D, 0xA0, 0xFD, 0x11, 0xA0, 0x8C, 0x91, 0xE8, 0xF1); public static Guid PowerSchemePersonality { get; } = new Guid(0x245D8541, 0x3943, 0x4422, 0xB0, 0x25, 0x13, 0xA7, 0x84, 0xF6, 0x79, 0xB7); // The Following 3 Guids are the POWERBROADCAST_SETTING.Data result of PowerSchemePersonality public static Guid MinPowerSavings { get; } = new Guid("8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c"); public static Guid MaxPowerSavings { get; } = new Guid("a1841308-3541-4fab-bc81-f71556f20b4a"); public static Guid TypicalPowerSavings { get; } = new Guid("381b4222-f694-41f0-9685-ff5bb260df2e"); public static Guid LIDSWITCH_STATE_CHANGE = new Guid("ba3e0f4d-b817-4094-a2d1-d56379e6a0f3"); } } ================================================ FILE: app/Peripherals/IPeripheral.cs ================================================  namespace GHelper.Peripherals { public enum PeripheralType { Mouse, Keyboard } public interface IPeripheral { public bool IsDeviceReady { get; } public bool Wireless { get; } public int Battery { get; } public bool Charging { get; } public bool CanExport(); public byte[] Export(); public bool Import(byte[] blob); public PeripheralType DeviceType(); public string GetDisplayName(); public bool HasBattery(); public void SynchronizeDevice(); public void ReadBattery(); } } ================================================ FILE: app/Peripherals/Mouse/AsusMouse.cs ================================================ using GHelper.AnimeMatrix.Communication; using GHelper.AnimeMatrix.Communication.Platform; using System.Runtime.CompilerServices; using System.Text; namespace GHelper.Peripherals.Mouse { public enum PowerOffSetting { Minutes1 = 0, Minutes2 = 1, Minutes3 = 2, Minutes5 = 3, Minutes10 = 4, Never = 0xFF } public enum DebounceTime { OFF = 0x00, //?? not sure because mice with this setting have no "disabled". But the mouse accepts and stores 0x00 just fine MS8 = 0x01, MS12 = 0x02, MS16 = 0x03, MS20 = 0x04, MS24 = 0x05, MS28 = 0x06, MS32 = 0x07 } public enum PollingRate { PR125Hz = 0, PR250Hz = 1, PR500Hz = 2, PR1000Hz = 3, PR2000Hz = 4, PR4000Hz = 5, PR8000Hz = 6, PR16000Hz = 7 //for whenever that gets supported lol } public enum LiftOffDistance { Low = 0, High = 1 } public enum AnimationDirection { Clockwise = 0x0, CounterClockwise = 0x1 } public enum AnimationSpeed { Slow = 0x9, Medium = 0x7, Fast = 0x5 } public enum LightingMode { Off = 0xF0, Static = 0x0, Breathing = 0x1, ColorCycle = 0x2, Rainbow = 0x3, React = 0x4, Comet = 0x5, BatteryState = 0x6 } public enum LightingZone { Logo = 0x00, Scrollwheel = 0x01, Underglow = 0x02, All = 0x03, Dock = 0x04, } public class LightingSetting { public LightingSetting() { //Some Sane defaults LightingMode = LightingMode.Static; AnimationSpeed = AnimationSpeed.Medium; AnimationDirection = AnimationDirection.Clockwise; RandomColor = false; Brightness = 25; RGBColor = Color.Red; } public LightingMode LightingMode { get; set; } public int Brightness { get; set; } public Color RGBColor { get; set; } public bool RandomColor { get; set; } public AnimationSpeed AnimationSpeed { get; set; } public AnimationDirection AnimationDirection { get; set; } public byte[] Export() { byte[] data = new byte[0]; data = data .Append((byte)LightingMode) // 1 Byte .Concat(BitConverter.GetBytes(Brightness)) // 4 Bytes .Concat(BitConverter.GetBytes(RGBColor.ToArgb())) // 4 Bytes .Concat(BitConverter.GetBytes(RandomColor)) // 1 Byte .Append((byte)AnimationSpeed) // 1 Byte .Append((byte)AnimationDirection) // 1 Byte .ToArray(); //12 bytes return data; } public bool Import(byte[] blob) { if (blob.Length != 12) { //Data must be 12 bytes return false; } LightingMode = (LightingMode)blob[0]; Brightness = BitConverter.ToInt32(blob, 1); RGBColor = Color.FromArgb(BitConverter.ToInt32(blob, 5)); RandomColor = BitConverter.ToBoolean(blob, 9); AnimationSpeed = (AnimationSpeed)blob[10]; AnimationDirection = (AnimationDirection)blob[11]; return true; } public override bool Equals(object? obj) { return obj is LightingSetting setting && LightingMode == setting.LightingMode && Brightness == setting.Brightness && RGBColor.Equals(setting.RGBColor) && RandomColor == setting.RandomColor && AnimationSpeed == setting.AnimationSpeed && AnimationDirection == setting.AnimationDirection; } public override int GetHashCode() { return HashCode.Combine(LightingMode, Brightness, RGBColor, RandomColor, AnimationSpeed, AnimationDirection); } public override string? ToString() { return "LightingMode: " + LightingMode + ", Color (" + RGBColor.R + ", " + RGBColor.G + ", " + RGBColor.B + "), Brightness: " + Brightness + "%, LightingSpeed: " + AnimationSpeed + ", RandomColor:" + RandomColor + ", AnimationDirection:" + AnimationDirection; } } public class AsusMouseDPI { public AsusMouseDPI() { Color = Color.Red; DPI = 800; } public Color Color { get; set; } public uint DPI { get; set; } public override string? ToString() { return "DPI: " + DPI + ", Color (" + Color.R + ", " + Color.G + ", " + Color.B + ")"; } public byte[] Export() { byte[] data = new byte[0]; data = data .Concat(BitConverter.GetBytes(DPI)) // 4 bytes .Concat(BitConverter.GetBytes(Color.ToArgb())) // 4 bytes .ToArray(); //8 bytes return data; } public bool Import(byte[] blob) { if (blob.Length != 8) { //Data must be 8 bytes return false; } DPI = BitConverter.ToUInt32(blob, 0); Color = Color.FromArgb(BitConverter.ToInt32(blob, 4)); return true; } } public abstract class AsusMouse : Device, IPeripheral { private static string[] POLLING_RATES = { "125 Hz", "250 Hz", "500 Hz", "1000 Hz", "2000 Hz", "4000 Hz", "8000 Hz", "16000 Hz" }; internal const bool PACKET_LOGGER_ALWAYS_ON = false; public event EventHandler? Disconnect; public event EventHandler? BatteryUpdated; public event EventHandler? MouseReadyChanged; private readonly string path; protected byte reportId = 0x00; public bool IsDeviceReady { get; protected set; } private void SetDeviceReady(bool ready) { bool notify = false; if (IsDeviceReady != ready) { notify = true; } IsDeviceReady = ready; if (MouseReadyChanged is not null && notify) { MouseReadyChanged(this, EventArgs.Empty); } } public bool Wireless { get; protected set; } public int Battery { get; protected set; } public bool Charging { get; protected set; } public LightingSetting[] LightingSetting { get; protected set; } public int LowBatteryWarning { get; protected set; } public PowerOffSetting PowerOffSetting { get; protected set; } public LiftOffDistance LiftOffDistance { get; protected set; } public int DpiProfile { get; protected set; } public int CurrentDPIProfileCount { get; protected set; } public AsusMouseDPI[] DpiSettings { get; protected set; } public int Profile { get; protected set; } public PollingRate PollingRate { get; protected set; } public bool AngleSnapping { get; protected set; } public short AngleAdjustmentDegrees { get; protected set; } public DebounceTime Debounce { get; protected set; } public int Acceleration { get; protected set; } public int Deceleration { get; protected set; } public bool MotionSync { get; protected set; } public bool ZoneMode { get; protected set; } public int ZoneModeDPI { get; set; } = 1600; public PollingRate ZoneModePollingRate { get; set; } = PollingRate.PR4000Hz; public AsusMouse(ushort vendorId, ushort productId, string path, bool wireless) : base(vendorId, productId) { this.path = path; this.Wireless = wireless; DpiSettings = new AsusMouseDPI[1]; CurrentDPIProfileCount = DPIProfileCount(); if (SupportedLightingZones().Length == 0) { LightingSetting = new LightingSetting[1]; } else { LightingSetting = new LightingSetting[SupportedLightingZones().Length]; } this.reportId = 0x00; } public AsusMouse(ushort vendorId, ushort productId, string path, bool wireless, byte reportId) : this(vendorId, productId, path, wireless) { this.reportId = reportId; } public bool CanExport() { return true; } //GMP1 = G-Helper Mouse Profile Version 1 :D private static readonly byte[] MAGIC = { (byte)'G', (byte)'M', (byte)'P', (byte)'1' }; public byte[] Export() { byte[] data = new byte[0]; data = data .Concat(MAGIC) // 4 Byte Magic .ToArray(); foreach (LightingSetting ls in LightingSetting) { data = data.Concat(ls.Export()).ToArray(); // Append 12 bytes for each Lighting setting } data = data // = 6 Bytes .Concat(BitConverter.GetBytes(LowBatteryWarning)) // 4 Bytes .Append((byte)PowerOffSetting) // 1 Byte .Append((byte)LiftOffDistance) // 1 Byte .ToArray(); foreach (AsusMouseDPI dpi in DpiSettings) { data = data.Concat(dpi.Export()).ToArray(); // Append 8 bytes for each DPI Profile } data = data // = 13 Bytes .Append((byte)PollingRate) // 1 Byte .Concat(BitConverter.GetBytes(AngleSnapping)) // 1 Byte .Concat(BitConverter.GetBytes(AngleAdjustmentDegrees)) // 2 Bytes .Append((byte)Debounce) // 1 Byte .Concat(BitConverter.GetBytes(Acceleration)) // 4 Bytes .Concat(BitConverter.GetBytes(Deceleration)) // 4 Bytes .ToArray(); //Total length: 4 + (LightingSetting.Length * 12) + 6 + (DPIProfileCount() + 8) + 13 Bytes return data; } public bool Import(byte[] blob) { int expectedLength = 4 + (LightingSetting.Length * 12) + 6 + (DPIProfileCount() * 8) + 13; if (blob.Length != expectedLength) { //Wrong lenght. Will not decode properly anyways. Logger.WriteLine(GetDisplayName() + " Import: Failed to import due to wrong data Lenght. Expected: " + expectedLength + " Is: " + blob.Length); return false; } if (blob[0] != MAGIC[0] || blob[1] != MAGIC[1] || blob[2] != MAGIC[2] || blob[3] != MAGIC[3]) { //MAGIC does not match. Maybe some other profile or not even a profile at all. Logger.WriteLine(GetDisplayName() + " Import: Failed to import. Magic Wrong: " + ByteArrayToString(blob)); return false; } int offset = 4; // skip MAGIC for (int i = 0; i < LightingSetting.Length; ++i) { byte[] data = blob.Skip(offset).Take(12).ToArray(); // Read 12 Byte blocks offset += 12; if (!LightingSetting[i].Import(data)) { Logger.WriteLine(GetDisplayName() + " Import: Failed to import LightingSetting. Data: " + ByteArrayToString(data)); return false; } } LowBatteryWarning = BitConverter.ToInt32(blob, offset); offset += 4; PowerOffSetting = (PowerOffSetting)blob[offset++]; LiftOffDistance = (LiftOffDistance)blob[offset++]; for (int i = 0; i < DpiSettings.Length; ++i) { byte[] data = blob.Skip(offset).Take(8).ToArray(); // Read 8 Byte blocks offset += 8; if (!DpiSettings[i].Import(data)) { Logger.WriteLine(GetDisplayName() + " Import: Failed to import DPISettings. Data: " + ByteArrayToString(data)); return false; } } PollingRate = (PollingRate)blob[offset++]; AngleSnapping = BitConverter.ToBoolean(blob, offset++); AngleAdjustmentDegrees = BitConverter.ToInt16(blob, offset); offset += 2; Acceleration = BitConverter.ToInt32(blob, offset); offset += 4; Deceleration = BitConverter.ToInt32(blob, offset); offset += 4; //Apply Settings to the mouse if (HasBattery()) SetEnergySettings(LowBatteryWarning, PowerOffSetting); SetPollingRate(PollingRate); if (HasLiftOffSetting()) SetLiftOffDistance(LiftOffDistance); if (HasAngleSnapping()) SetAngleSnapping(AngleSnapping); if (HasAngleTuning()) SetAngleAdjustment(AngleAdjustmentDegrees); if (HasAcceleration()) SetAcceleration(Acceleration); if (HasDeceleration()) SetDeceleration(Deceleration); if (HasRGB()) { for (int i = 0; i < SupportedLightingZones().Length; ++i) { LightingZone lz = SupportedLightingZones()[i]; LightingSetting ls = LightingSettingForZone(lz); SetLightingSetting(ls, lz); } } for (int i = 0; i < DPIProfileCount(); ++i) { AsusMouseDPI dpi = DpiSettings[i]; SetDPIForProfile(dpi, i + 1); } return true; } public override bool Equals(object? obj) { if (obj is not AsusMouse item) { return false; } return this.VendorID().Equals(item.VendorID()) && this.ProductID().Equals(item.ProductID()) && this.path.Equals(item.path); } public override int GetHashCode() { int hash = 23; hash = hash * 31 + VendorID(); hash = hash * 31 + ProductID(); hash = hash * 31 + path.GetHashCode(); return hash; } public void Connect() { SetProvider(); HidSharp.DeviceList.Local.Changed += Device_Changed; } public override void Dispose() { Logger.WriteLine(GetDisplayName() + ": Disposing"); HidSharp.DeviceList.Local.Changed -= Device_Changed; base.Dispose(); } private void Device_Changed(object? sender, HidSharp.DeviceListChangedEventArgs e) { //Use this to validate whether the device is still connected. //If not, this will also initiate the disconnect and cleanup sequence. CheckConnection(); } //Override this for non battery devices to check whether the connection is still there //This function should automatically disconnect the device in GHelper if the device is no longer there or the pipe is broken. public virtual void CheckConnection() { ReadBattery(); } public bool IsDeviceConnected() { try { return HidSharp.DeviceList.Local.GetHidDevices(VendorID(), ProductID()) .FirstOrDefault(x => x.DevicePath.Contains(path)) != null; } catch { return false; } } public virtual int USBTimeout() { return 300; } public virtual int USBPacketSize() { return 65; } public override void SetProvider() { _usbProvider = new WindowsUsbProvider(_vendorId, _productId, path, USBTimeout()); } protected virtual void OnDisconnect() { Logger.WriteLine(GetDisplayName() + ": OnDisconnect()"); if (Disconnect is not null) { Disconnect(this, EventArgs.Empty); } } protected static bool IsPacketLoggerEnabled() { #if DEBUG return true; #else return AppConfig.Get("usb_packet_logger") == 1 || PACKET_LOGGER_ALWAYS_ON; #endif } protected virtual bool IsMouseError(byte[] packet) { return packet[1] == 0xFF && packet[2] == 0xAA; } protected virtual long MeasuredIO(Action ioFunc, byte[] param) { var watch = System.Diagnostics.Stopwatch.StartNew(); ioFunc(param); watch.Stop(); return watch.ElapsedMilliseconds; } [MethodImpl(MethodImplOptions.Synchronized)] protected virtual byte[]? WriteForResponse(byte[] packet) { Array.Resize(ref packet, USBPacketSize()); byte[] response = new byte[USBPacketSize()]; response[0] = reportId; int retries = 3; while (retries > 0) { response = new byte[USBPacketSize()]; try { if (IsPacketLoggerEnabled()) Logger.WriteLine(GetDisplayName() + ": Sending packet: " + ByteArrayToString(packet) + " Try " + (retries - 2) + " of 3"); long time = MeasuredIO(Write, packet); if (IsPacketLoggerEnabled()) Logger.WriteLine(GetDisplayName() + ": Write took " + time + "ms"); time = MeasuredIO(Read, response); if (IsPacketLoggerEnabled()) Logger.WriteLine(GetDisplayName() + ": Read took " + time + "ms"); if (IsMouseError(response)) { if (IsPacketLoggerEnabled()) Logger.WriteLine(GetDisplayName() + ": Read packet: " + ByteArrayToString(response)); Logger.WriteLine(GetDisplayName() + ": Mouse returned error (FF AA). Packet probably not supported by mouse firmware."); //Error. Mouse could not understand or process the sent packet return response; } if (response[1] == 0 && response[2] == 0 && response[3] == 0) { if (IsPacketLoggerEnabled()) Logger.WriteLine(GetDisplayName() + ": Read packet: " + ByteArrayToString(response)); Logger.WriteLine(GetDisplayName() + ": Received empty packet. Stopping here."); //Empty packet return null; } //Not the response we were looking for, continue reading while (response[0] != packet[0] || response[1] != packet[1] || response[2] != packet[2]) { if (IsPacketLoggerEnabled()) Logger.WriteLine(GetDisplayName() + ": Read wrong packet left in buffer: " + ByteArrayToString(response) + ". Retrying..."); //Read again time = MeasuredIO(Read, response); if (IsPacketLoggerEnabled()) Logger.WriteLine(GetDisplayName() + ": Read took " + time + "ms"); } if (IsPacketLoggerEnabled()) Logger.WriteLine(GetDisplayName() + ": Read packet: " + ByteArrayToString(response)); return response; } catch (IOException e) { Logger.WriteLine(GetDisplayName() + ": Failed to read packet " + e.Message); OnDisconnect(); return null; } catch (TimeoutException e) { Logger.WriteLine(GetDisplayName() + ": Timeout reading packet " + e.Message + " Trying again."); retries--; continue; } catch (ObjectDisposedException) { Logger.WriteLine(GetDisplayName() + ": Channel closed "); OnDisconnect(); return null; } } return null; } public abstract string GetDisplayName(); public PeripheralType DeviceType() { return PeripheralType.Mouse; } public virtual void SynchronizeDevice() { DpiSettings = new AsusMouseDPI[DPIProfileCount()]; ReadBattery(); if (HasBattery() && Battery <= 0 && Charging == false) { //Likely only the dongle connected and the mouse is either sleeping or turned off. //The mouse will not respond with proper data, but empty responses at this point SetDeviceReady(false); return; } SetDeviceReady(true); ReadProfile(); ReadDPI(); ReadPollingRate(); ReadLiftOffDistance(); ReadDebounce(); ReadAcceleration(); ReadLightingSetting(); ReadMotionSync(); ReadZoneMode(); } // ------------------------------------------------------------------------------ // Battery // ------------------------------------------------------------------------------ public virtual bool HasBattery() { return true; } public virtual bool HasAutoPowerOff() { return false; } public virtual int LowBatteryWarningStep() { return 10; } public virtual int LowBatteryWarningMax() { return 50; } public virtual bool HasLowBatteryWarning() { return false; } protected virtual byte[] GetBatteryReportPacket() { return new byte[] { reportId, 0x12, 0x07 }; } protected virtual int ParseBattery(byte[] packet) { if (packet[1] == 0x12 && packet[2] == 0x07) { return packet[5]; } return -1; } protected virtual bool ParseChargingState(byte[] packet) { if (packet[1] == 0x12 && packet[2] == 0x07) { return packet[10] > 0; } return false; } protected virtual PowerOffSetting ParsePowerOffSetting(byte[] packet) { if (packet[1] == 0x12 && packet[2] == 0x07) { return (PowerOffSetting)packet[6]; } return PowerOffSetting.Never; } protected virtual int ParseLowBatteryWarning(byte[] packet) { if (packet[1] == 0x12 && packet[2] == 0x07) { return packet[7]; } return 0; } protected virtual byte[] GetUpdateEnergySettingsPacket(int lowBatteryWarning, PowerOffSetting powerOff) { return new byte[] { reportId, 0x51, 0x37, 0x00, 0x00, (byte)powerOff, 0x00, (byte)lowBatteryWarning }; } public void SetEnergySettings(int lowBatteryWarning, PowerOffSetting powerOff) { if (!HasAutoPowerOff() && !HasLowBatteryWarning()) { return; } WriteForResponse(GetUpdateEnergySettingsPacket(lowBatteryWarning, powerOff)); FlushSettings(); Logger.WriteLine(GetDisplayName() + ": Got Auto Power Off: " + powerOff + " - Low Battery Warnning at: " + lowBatteryWarning + "%"); this.PowerOffSetting = powerOff; this.LowBatteryWarning = lowBatteryWarning; } public void ReadBattery() { if (!HasBattery() && !HasAutoPowerOff()) { return; } byte[]? response = WriteForResponse(GetBatteryReportPacket()); if (response is null) return; if (HasBattery()) { Battery = ParseBattery(response); Charging = ParseChargingState(response); //If the device goes to standby it will not report battery state anymore. SetDeviceReady(Battery > 0); if (!IsDeviceReady) { Logger.WriteLine(GetDisplayName() + ": Device gone"); return; } Logger.WriteLine(GetDisplayName() + ": Got Battery Percentage " + Battery + "% - Charging:" + Charging); if (BatteryUpdated is not null) { BatteryUpdated(this, EventArgs.Empty); } } if (HasAutoPowerOff()) { PowerOffSetting = ParsePowerOffSetting(response); } if (HasLowBatteryWarning()) { LowBatteryWarning = ParseLowBatteryWarning(response); } if (HasLowBatteryWarning() || HasAutoPowerOff()) { string pos = HasAutoPowerOff() ? PowerOffSetting.ToString() : "Not Supported"; string lbw = HasLowBatteryWarning() ? LowBatteryWarning.ToString() : "Not Supported"; Logger.WriteLine(GetDisplayName() + ": Got Auto Power Off: " + pos + " - Low Battery Warnning at: " + lbw + "%"); } } // ------------------------------------------------------------------------------ // Profiles // ------------------------------------------------------------------------------ public abstract int ProfileCount(); public virtual bool HasProfiles() { return true; } protected virtual int ParseProfile(byte[] packet) { if (packet[1] == 0x12 && packet[2] == 0x00 && packet[3] == 0x00) { return packet[11]; } Logger.WriteLine(GetDisplayName() + ": Failed to decode active profile"); return 0; } protected virtual int ParseDPIProfile(byte[] packet) { if (packet[1] == 0x12 && packet[2] == 0x00 && packet[3] == 0x00) { return packet[12]; } Logger.WriteLine(GetDisplayName() + ": Failed to decode active profile"); return 1; } protected virtual byte[] GetReadProfilePacket() { return new byte[] { reportId, 0x12, 0x00 }; } protected virtual byte[] GetUpdateProfilePacket(int profile) { return new byte[] { reportId, 0x50, 0x02, (byte)profile }; } public void ReadProfile() { if (!HasProfiles()) { return; } byte[]? response = WriteForResponse(GetReadProfilePacket()); if (response is null) return; Profile = ParseProfile(response); if (DPIProfileCount() > 1) { DpiProfile = ParseDPIProfile(response); if (CanChangeDPICount()) { int count = response[19]; if (count >= 2 && count <= 4) { CurrentDPIProfileCount = count; } } } Logger.WriteLine(GetDisplayName() + ": Active Profile " + (Profile + 1) + ((DPIProfileCount() > 1 ? ", Active DPI Profile: " + DpiProfile : "")) + ((CanChangeDPICount() ? ", DPI Count: " + CurrentDPIProfileCount : ""))); } public void SetProfile(int profile) { if (!HasProfiles()) { return; } if (profile > ProfileCount() || profile < 0) { Logger.WriteLine(GetDisplayName() + ": Profile:" + profile + " is invalid."); return; } WriteForResponse(GetUpdateProfilePacket(profile)); FlushSettings(); Logger.WriteLine(GetDisplayName() + ": Profile set to " + profile); this.Profile = profile; } // ------------------------------------------------------------------------------ // Polling Rate and Angle Snapping // ------------------------------------------------------------------------------ public virtual bool HasAngleSnapping() { return false; } public virtual bool HasAngleTuning() { return false; } public virtual int AngleTuningStep() { return 1; } public virtual int AngleTuningMin() { return -20; } public virtual int AngleTuningMax() { return 20; } public virtual string PollingRateDisplayString(PollingRate pollingRate) { return POLLING_RATES[(int)pollingRate]; } public virtual int PollingRateCount() { return SupportedPollingrates().Length; } public virtual int PollingRateIndex(PollingRate pollingRate) { for (int i = 0; i < PollingRateCount(); ++i) { if (SupportedPollingrates()[i] == pollingRate) { return i; } } return -1; } public virtual bool IsPollingRateSupported(PollingRate pollingRate) { return SupportedPollingrates().Contains(pollingRate); } public abstract PollingRate[] SupportedPollingrates(); public virtual bool CanSetPollingRate() { return true; } protected virtual byte[] GetReadPollingRatePacket() { return new byte[] { reportId, 0x12, 0x04, 0x00 }; } protected virtual byte[] GetUpdatePollingRatePacket(PollingRate pollingRate) { return new byte[] { reportId, 0x51, 0x31, 0x04, 0x00, (byte)pollingRate }; } protected virtual byte[] GetUpdateAngleSnappingPacket(bool angleSnapping) { return new byte[] { reportId, 0x51, 0x31, 0x06, 0x00, (byte)(angleSnapping ? 0x01 : 0x00) }; } protected virtual byte[] GetUpdateAngleAdjustmentPacket(short angleAdjustment) { return new byte[] { reportId, 0x51, 0x31, 0x0B, 0x00, (byte)(angleAdjustment & 0xFF), (byte)((angleAdjustment >> 8) & 0xFF) }; } protected virtual PollingRate ParsePollingRate(byte[] packet) { if (packet[1] == 0x12 && packet[2] == 0x04 && packet[3] == 0x00) { byte raw = packet[13]; byte highNibble = (byte)(raw >> 4); if (highNibble > 0) return (PollingRate)highNibble; else return (PollingRate)(raw & 0x0F); } return PollingRate.PR125Hz; } protected virtual bool ParseAngleSnapping(byte[] packet) { if (packet[1] == 0x12 && packet[2] == 0x04 && packet[3] == 0x00) { return packet[17] == 0x01; } return false; } protected virtual short ParseAngleAdjustment(byte[] packet) { if (packet[1] == 0x12 && packet[2] == 0x04 && packet[3] == 0x00) { return (short)(packet[20] << 8 | packet[19]); } return 0; } public void ReadPollingRate() { if (!CanSetPollingRate()) { return; } byte[]? response = WriteForResponse(GetReadPollingRatePacket()); if (response is null) return; PollingRate = ParsePollingRate(response); Logger.WriteLine(GetDisplayName() + ": Pollingrate: " + PollingRateDisplayString(PollingRate) + " (" + PollingRate + ")"); if (HasAngleSnapping()) { AngleSnapping = ParseAngleSnapping(response); if (HasAngleTuning()) AngleAdjustmentDegrees = ParseAngleAdjustment(response); Logger.WriteLine(GetDisplayName() + ": Angle Snapping enabled: " + AngleSnapping + ", Angle Adjustment: " + AngleAdjustmentDegrees + "°"); } } public void SetPollingRate(PollingRate pollingRate) { if (!CanSetPollingRate()) { return; } if (!IsPollingRateSupported(pollingRate)) { Logger.WriteLine(GetDisplayName() + ": Pollingrate:" + pollingRate + " is not supported by this mouse."); return; } WriteForResponse(GetUpdatePollingRatePacket(pollingRate)); FlushSettings(); Logger.WriteLine(GetDisplayName() + ": Pollingrate set to " + PollingRateDisplayString(pollingRate)); this.PollingRate = pollingRate; } public void SetAngleSnapping(bool angleSnapping) { if (!HasAngleSnapping()) { return; } WriteForResponse(GetUpdateAngleSnappingPacket(angleSnapping)); FlushSettings(); Logger.WriteLine(GetDisplayName() + ": Angle Snapping set to " + angleSnapping); this.AngleSnapping = angleSnapping; } public void SetAngleAdjustment(short angleAdjustment) { if (!HasAngleTuning()) { return; } if (angleAdjustment < AngleTuningMin() || angleAdjustment > AngleTuningMax()) { Logger.WriteLine(GetDisplayName() + ": Angle Adjustment:" + angleAdjustment + " is outside of range [" + AngleTuningMin() + "; " + AngleTuningMax() + "]."); return; } WriteForResponse(GetUpdateAngleAdjustmentPacket(angleAdjustment)); FlushSettings(); Logger.WriteLine(GetDisplayName() + ": Angle Adjustment set to " + angleAdjustment); this.AngleAdjustmentDegrees = angleAdjustment; } // ------------------------------------------------------------------------------ // Acceleration/Deceleration // ------------------------------------------------------------------------------ public virtual bool HasAcceleration() { return false; } public virtual bool HasDeceleration() { return false; } public virtual int MaxAcceleration() { return 0; } public virtual int MaxDeceleration() { return 0; } protected virtual byte[] GetChangeAccelerationPacket(int acceleration) { return new byte[] { reportId, 0x51, 0x31, 0x07, 0x00, (byte)acceleration }; } protected virtual byte[] GetChangeDecelerationPacket(int deceleration) { return new byte[] { reportId, 0x51, 0x31, 0x08, 0x00, (byte)deceleration }; } public virtual void SetAcceleration(int acceleration) { if (!HasAcceleration()) { return; } if (acceleration > MaxAcceleration() || acceleration < 0) { Logger.WriteLine(GetDisplayName() + ": Acceleration " + acceleration + " is invalid."); return; } WriteForResponse(GetChangeAccelerationPacket(acceleration)); FlushSettings(); Logger.WriteLine(GetDisplayName() + ": Acceleration set to " + acceleration); this.Acceleration = acceleration; } public virtual void SetDeceleration(int deceleration) { if (!HasDeceleration()) { return; } if (deceleration > MaxDeceleration() || deceleration < 0) { Logger.WriteLine(GetDisplayName() + ": Deceleration " + deceleration + " is invalid."); return; } WriteForResponse(GetChangeDecelerationPacket(deceleration)); FlushSettings(); Logger.WriteLine(GetDisplayName() + ": Deceleration set to " + deceleration); this.Deceleration = deceleration; } protected virtual byte[] GetReadAccelerationPacket() { return new byte[] { reportId, 0x12, 0x04, 0x01 }; } protected virtual int ParseAcceleration(byte[] packet) { if (packet[1] != 0x12 || packet[2] != 0x04 || packet[3] != 0x01) { return 0; } return packet[5]; } protected virtual int ParseDeceleration(byte[] packet) { if (packet[1] != 0x12 || packet[2] != 0x04 || packet[3] != 0x01) { return 0; } return packet[7]; } public virtual void ReadAcceleration() { if (!HasAcceleration() && !HasDeceleration()) { return; } byte[]? response = WriteForResponse(GetReadAccelerationPacket()); if (response is null) return; if (HasAcceleration()) { Acceleration = ParseAcceleration(response); Logger.WriteLine(GetDisplayName() + ": Read Acceleration: " + Acceleration); } if (HasDeceleration()) { Deceleration = ParseDeceleration(response); Logger.WriteLine(GetDisplayName() + ": Read Deceleration: " + Deceleration); } } // ------------------------------------------------------------------------------ // DPI // ------------------------------------------------------------------------------ public abstract int DPIProfileCount(); public virtual bool HasDPIColors() { return false; } public virtual int DPIIncrements() { return 50; } public virtual bool CanChangeDPIProfile() { return DPIProfileCount() > 1; } public virtual bool CanChangeDPICount() { return false; } public virtual int MaxDPI() { return 2000; } public virtual int MinDPI() { return 100; } public virtual bool HasXYDPI() { return false; } protected virtual byte[] GetChangeDPIProfilePacket(int profile) { //legacy function kept for TUFM3 return new byte[] { reportId, 0x51, 0x31, 0x0A, 0x00, (byte)profile }; } protected virtual byte[] GetSetDPIProfileCountPacket(int count) { return new byte[] { reportId, 0x51, 0x31, 0x0A, 0x00, (byte)count }; } protected virtual byte[] GetChangeDPIProfilePacket2(int profile) { return new byte[] { reportId, 0x51, 0x31, 0x09, 0x00, (byte)profile }; } //profiles start to count at 1 public virtual void SetDPIProfile(int profile) { if (!CanChangeDPIProfile()) { this.DpiProfile = profile; return; } if (profile > CurrentDPIProfileCount || profile < 1) { Logger.WriteLine(GetDisplayName() + ": DPI Profile:" + profile + " is invalid."); return; } //The first DPI profile is 1 WriteForResponse(GetChangeDPIProfilePacket2(profile)); FlushSettings(); Logger.WriteLine(GetDisplayName() + ": DPI Profile set to " + profile); this.DpiProfile = profile; } protected virtual byte[] GetReadDPIPacket() { if (!HasXYDPI()) { return new byte[] { reportId, 0x12, 0x04, 0x00 }; } return new byte[] { reportId, 0x12, 0x04, 0x02 }; } protected virtual byte[]? GetUpdateDPIPacket(AsusMouseDPI dpi, int profile) { if (dpi is null) { return null; } if (dpi.DPI > MaxDPI() || dpi.DPI < MinDPI()) { return null; } ushort dpiEncoded = (ushort)((dpi.DPI - DPIIncrements()) / DPIIncrements()); if (HasDPIColors()) { return new byte[] { reportId, 0x51, 0x31, (byte)(profile - 1), 0x00, (byte)(dpiEncoded & 0xFF), (byte)((dpiEncoded >> 8) & 0xFF), dpi.Color.R, dpi.Color.G, dpi.Color.B }; } else { return new byte[] { reportId, 0x51, 0x31, (byte)(profile - 1), 0x00, (byte)(dpiEncoded & 0xFF), (byte)((dpiEncoded >> 8) & 0xFF) }; } } protected virtual void ParseDPI(byte[] packet) { if (packet[1] != 0x12 || packet[2] != 0x04 || (packet[3] != 0x02 && HasXYDPI())) { return; } for (int i = 0; i < DPIProfileCount(); ++i) { if (DpiSettings[i] is null) { DpiSettings[i] = new AsusMouseDPI(); } int offset = HasXYDPI() ? (5 + (i * 4)) : (5 + (i * 2)); uint b1 = packet[offset]; uint b2 = packet[offset + 1]; DpiSettings[i].DPI = (uint)((b2 << 8 | b1) * DPIIncrements() + DPIIncrements()); } } protected virtual byte[] GetReadDPIColorsPacket() { return new byte[] { reportId, 0x12, 0x04, 0x03 }; } protected virtual void ParseDPIColors(byte[] packet) { if (packet[1] != 0x12 || packet[2] != 0x04 || packet[3] != 0x03) { return; } for (int i = 0; i < DPIProfileCount(); ++i) { if (DpiSettings[i] is null) { DpiSettings[i] = new AsusMouseDPI(); } int offset = 5 + (i * 3); DpiSettings[i].Color = Color.FromArgb(packet[offset], packet[offset + 1], packet[offset + 2]); } } public void ReadDPI() { byte[]? response = WriteForResponse(GetReadDPIPacket()); if (response is null) return; ParseDPI(response); if (HasDPIColors()) { response = WriteForResponse(GetReadDPIColorsPacket()); if (response is null) return; ParseDPIColors(response); } for (int i = 0; i < DPIProfileCount(); ++i) { Logger.WriteLine(GetDisplayName() + ": Read DPI Setting " + (i + 1) + ": " + DpiSettings[i].ToString()); } } public void SetDPIForProfile(AsusMouseDPI dpi, int profile) { if (profile > DPIProfileCount() || profile < 1) { Logger.WriteLine(GetDisplayName() + ": DPI Profile:" + profile + " is invalid."); return; } byte[]? packet = GetUpdateDPIPacket(dpi, profile); if (packet == null) { Logger.WriteLine(GetDisplayName() + ": DPI setting for profile " + profile + " does not exist or is invalid."); return; } WriteForResponse(packet); FlushSettings(); Logger.WriteLine(GetDisplayName() + ": DPI for profile " + profile + " set to " + DpiSettings[profile - 1].DPI); //this.DpiProfile = profile; this.DpiSettings[profile - 1] = dpi; } public void SetDPIProfileCount(int count) { if (count < 2 || count > 4) return; WriteForResponse(GetSetDPIProfileCountPacket(count)); // Resync settings for all profiles for (int i = 0; i < count; i++) { if (DpiSettings[i] != null) { WriteForResponse(GetUpdateDPIPacket(DpiSettings[i], i + 1)); } } FlushSettings(); CurrentDPIProfileCount = count; Logger.WriteLine(GetDisplayName() + ": DPI Profile Count set to " + count); } public void AddDPIProfile() { if (CurrentDPIProfileCount >= 4) return; int newIndex = CurrentDPIProfileCount; // Set defaults for new slot if (DpiSettings[newIndex] == null) DpiSettings[newIndex] = new AsusMouseDPI(); if (newIndex == 2) // Slot 3 { DpiSettings[newIndex].DPI = 1600; DpiSettings[newIndex].Color = Color.Blue; } else if (newIndex == 3) // Slot 4 { DpiSettings[newIndex].DPI = 3200; DpiSettings[newIndex].Color = Color.Green; } SetDPIProfileCount(CurrentDPIProfileCount + 1); } public void DeleteDPIProfile(int index) { if (CurrentDPIProfileCount <= 2) return; if (index < 0 || index >= CurrentDPIProfileCount) return; // Shift Logic for (int i = index; i < CurrentDPIProfileCount - 1; i++) { // Create new object to avoid reference copy if (DpiSettings[i+1] != null) { DpiSettings[i] = new AsusMouseDPI { DPI = DpiSettings[i+1].DPI, Color = DpiSettings[i+1].Color }; } } // Cleanup last element DpiSettings[CurrentDPIProfileCount - 1] = null; SetDPIProfileCount(CurrentDPIProfileCount - 1); if (DpiProfile > CurrentDPIProfileCount) DpiProfile = CurrentDPIProfileCount; } // ------------------------------------------------------------------------------ // Lift-off Distance // ------------------------------------------------------------------------------ public virtual bool HasLiftOffSetting() { return false; } protected virtual byte[] GetReadLiftOffDistancePacket() { return new byte[] { reportId, 0x12, 0x06 }; } //This also resets the "calibration" to default. There is no seperate command to only set the lift off distance protected virtual byte[] GetUpdateLiftOffDistancePacket(LiftOffDistance liftOffDistance) { return new byte[] { reportId, 0x51, 0x35, 0xFF, 0x00, 0xFF, ((byte)liftOffDistance) }; } protected virtual LiftOffDistance ParseLiftOffDistance(byte[] packet) { if (packet[1] != 0x12 || packet[2] != 0x06) { return LiftOffDistance.Low; } return (LiftOffDistance)packet[8]; } public void ReadLiftOffDistance() { if (!HasLiftOffSetting()) { return; } byte[]? response = WriteForResponse(GetReadLiftOffDistancePacket()); if (response is null) return; LiftOffDistance = ParseLiftOffDistance(response); Logger.WriteLine(GetDisplayName() + ": Read Lift Off Setting: " + LiftOffDistance); } public void SetLiftOffDistance(LiftOffDistance liftOffDistance) { if (!HasLiftOffSetting()) { return; } WriteForResponse(GetUpdateLiftOffDistancePacket(liftOffDistance)); FlushSettings(); Logger.WriteLine(GetDisplayName() + ": Set Liftoff Distance to " + liftOffDistance); this.LiftOffDistance = liftOffDistance; } // ------------------------------------------------------------------------------ // Debounce // ------------------------------------------------------------------------------ public virtual bool HasDebounceSetting() { return false; } public virtual int DebounceTimeInMS(DebounceTime dbt) { switch (dbt) { case DebounceTime.MS8: return 8; case DebounceTime.MS12: return 12; case DebounceTime.MS16: return 16; case DebounceTime.MS20: return 20; case DebounceTime.MS24: return 24; case DebounceTime.MS28: return 28; case DebounceTime.MS32: return 32; default: return 0; } } public virtual DebounceTime MinDebounce() { return DebounceTime.MS12; } public virtual DebounceTime MaxDebounce() { return DebounceTime.MS32; } protected virtual byte[] GetReadDebouncePacket() { return new byte[] { reportId, 0x12, 0x04, 0x00 }; } protected virtual byte[] GetUpdateDebouncePacket(DebounceTime debounce) { return new byte[] { reportId, 0x51, 0x31, 0x05, 0x00, ((byte)debounce) }; } protected virtual DebounceTime ParseDebounce(byte[] packet) { if (packet[1] != 0x12 || packet[2] != 0x04 || packet[3] != 0x00) { return MinDebounce(); } if (packet[15] < (int)MinDebounce()) { return MinDebounce(); } if (packet[15] > (int)MaxDebounce()) { return MaxDebounce(); } return (DebounceTime)packet[15]; } public void ReadDebounce() { if (!HasDebounceSetting()) { return; } byte[]? response = WriteForResponse(GetReadDebouncePacket()); if (response is null) return; Debounce = ParseDebounce(response); Logger.WriteLine(GetDisplayName() + ": Read Debouce Setting: " + Debounce); } public void SetDebounce(DebounceTime debounce) { if (!HasDebounceSetting()) { return; } WriteForResponse(GetUpdateDebouncePacket(debounce)); FlushSettings(); Logger.WriteLine(GetDisplayName() + ": Set Debouce to " + debounce); this.Debounce = debounce; } // ------------------------------------------------------------------------------ // Motion Sync // ------------------------------------------------------------------------------ public virtual bool HasMotionSync() { return false; } protected virtual byte[] GetUpdateMotionSyncPacket(bool enabled) { return new byte[] { reportId, 0x51, 0x31, 0x12, 0x00, (byte)(enabled ? 0x01 : 0x00) }; } public void SetMotionSync(bool enabled) { if (!HasMotionSync()) { return; } // Motion Sync cannot be enabled at 8000Hz polling rate if (PollingRate == PollingRate.PR8000Hz && enabled) { Logger.WriteLine(GetDisplayName() + ": Motion Sync cannot be enabled at 8000Hz polling rate."); return; } WriteForResponse(GetUpdateMotionSyncPacket(enabled)); FlushSettings(); Logger.WriteLine(GetDisplayName() + ": Motion Sync set to " + enabled); this.MotionSync = enabled; } protected virtual byte[] GetReadMotionSyncPacket() { return new byte[] { reportId, 0x12, 0x04, 0x04 }; } protected virtual bool ParseMotionSync(byte[] packet) { if (packet[1] == 0x12 && packet[2] == 0x04 && packet[3] == 0x04) { return packet[5] == 0x01; } return false; } public void ReadMotionSync() { if (!HasMotionSync()) { return; } byte[]? response = WriteForResponse(GetReadMotionSyncPacket()); if (response is null) return; MotionSync = ParseMotionSync(response); Logger.WriteLine(GetDisplayName() + ": Motion Sync: " + MotionSync); } // ------------------------------------------------------------------------------ // Zone Mode // ------------------------------------------------------------------------------ public virtual bool HasZoneMode() { return false; } protected virtual byte[] GetUpdateZoneModePacket(bool enabled) { // DPI formula: ((DPI - 50) / 50) - using 2 bytes int dpiVal = (ZoneModeDPI - 50) / 50; byte dpiLow = (byte)(dpiVal & 0xFF); byte dpiHigh = (byte)((dpiVal >> 8) & 0xFF); return new byte[] { reportId, 0x51, 0x44, 0x00, 0x00, (byte)(enabled ? 0x01 : 0x00), (byte)ZoneModePollingRate, dpiLow, dpiHigh }; } public void SetZoneMode(bool enabled) { if (!HasZoneMode()) { return; } WriteForResponse(GetUpdateZoneModePacket(enabled)); FlushSettings(); Logger.WriteLine(GetDisplayName() + ": Zone Mode set to " + enabled); this.ZoneMode = enabled; } public void UpdateZoneModeDPI(int dpi) { if (!HasZoneMode() || !ZoneMode) { return; } ZoneModeDPI = dpi; WriteForResponse(GetUpdateZoneModePacket(true)); FlushSettings(); Logger.WriteLine(GetDisplayName() + ": Zone Mode DPI set to " + dpi); } public void UpdateZoneModePollingRate(PollingRate pollingRate) { if (!HasZoneMode() || !ZoneMode) { return; } ZoneModePollingRate = pollingRate; WriteForResponse(GetUpdateZoneModePacket(true)); FlushSettings(); Logger.WriteLine(GetDisplayName() + ": Zone Mode Polling Rate set to " + pollingRate); } protected virtual byte[] GetReadZoneModePacket() { return new byte[] { reportId, 0x12, 0x14 }; } protected virtual void ParseZoneMode(byte[] packet) { if (packet[1] == 0x12 && packet[2] == 0x14) { ZoneMode = packet[5] == 0x01; ZoneModePollingRate = (PollingRate)packet[6]; // DPI formula: (byteL + byteH * 256) * 50 + 50 if (packet.Length > 8) { int dpiVal = packet[7] | (packet[8] << 8); ZoneModeDPI = dpiVal * 50 + 50; } else { ZoneModeDPI = packet[7] * 50 + 50; } } } public void ReadZoneMode() { if (!HasZoneMode()) { return; } byte[]? response = WriteForResponse(GetReadZoneModePacket()); if (response is null) return; ParseZoneMode(response); Logger.WriteLine(GetDisplayName() + ": Zone Mode: " + ZoneMode + ", DPI: " + ZoneModeDPI + ", PollingRate: " + ZoneModePollingRate); } // ------------------------------------------------------------------------------ // RGB // ------------------------------------------------------------------------------ public virtual bool HasRGB() { return false; } public virtual int MaxBrightness() { return 100; } //Override to remap lighting mode IDs. //From OpenRGB code it looks like some mice have different orders of the modes or do not support some modes at all. protected virtual byte IndexForLightingMode(LightingMode lightingMode) { return ((byte)lightingMode); } //Also override this for the reverse mapping protected virtual LightingMode LightingModeForIndex(byte lightingMode) { //We do not support other mods. we treat them as off. True off is actually 0xF0. if (lightingMode > 0x06) { return LightingMode.Off; } return ((LightingMode)lightingMode); } //And this if not all modes are supported public virtual bool IsLightingModeSupported(LightingMode lightingMode) { return true; } public virtual bool SupportsRandomColor(LightingMode lightingMode) { return lightingMode == LightingMode.Comet; } public virtual bool SupportsAnimationDirection(LightingMode lightingMode) { return lightingMode == LightingMode.Rainbow || lightingMode == LightingMode.Comet; } public virtual bool SupportsAnimationSpeed(LightingMode lightingMode) { return lightingMode == LightingMode.Rainbow; } public virtual bool SupportsColorSetting(LightingMode lightingMode) { return lightingMode == LightingMode.Static || lightingMode == LightingMode.Breathing || lightingMode == LightingMode.Comet || lightingMode == LightingMode.React; } public virtual LightingZone[] SupportedLightingZones() { return new LightingZone[] { LightingZone.Logo }; } public virtual int IndexForZone(LightingZone zone) { LightingZone[] lz = SupportedLightingZones(); for (int i = 0; i < lz.Length; ++i) { if (lz[i] == zone) { return i; } } return 0; } public virtual bool IsLightingZoned() { if (LightingSetting.Length < 2) { return false; } //Check whether all zones are the same or not for (int i = 1; i < LightingSetting.Length; ++i) { if (LightingSetting[i] is null || LightingSetting[i - 1] is null || !LightingSetting[i].Equals(LightingSetting[i - 1])) { return true; } } return false; } public virtual bool IsLightingModeSupportedForZone(LightingMode lm, LightingZone lz) { if (lz == LightingZone.All) { return true; } return lm == LightingMode.Static || lm == LightingMode.Breathing || lm == LightingMode.ColorCycle || lm == LightingMode.React; } public virtual LightingSetting LightingSettingForZone(LightingZone zone) { if (zone == LightingZone.All) { //First zone is treated as ALL for reading purpose return LightingSetting[0]; } return LightingSetting[IndexForZone(zone)]; } protected virtual byte[] GetReadLightingModePacket(LightingZone zone) { int idx = 0; if (zone != LightingZone.All) { idx = IndexForZone(zone); } return new byte[] { reportId, 0x12, 0x03, (byte)idx }; } protected virtual byte[] GetUpdateLightingModePacket(LightingSetting lightingSetting, LightingZone zone) { if (lightingSetting.Brightness < 0 || lightingSetting.Brightness > MaxBrightness()) { Logger.WriteLine(GetDisplayName() + ": Brightness " + lightingSetting.Brightness + " is out of range [0;" + MaxBrightness() + "]. Setting to " + (MaxBrightness() / 4) + " ."); lightingSetting.Brightness = MaxBrightness() / 4; // set t0 25% of max brightness } if (!IsLightingModeSupported(lightingSetting.LightingMode)) { Logger.WriteLine(GetDisplayName() + ": Lighting Mode " + lightingSetting.LightingMode + " is not supported. Setting to Color Cycle ;)"); lightingSetting.LightingMode = LightingMode.ColorCycle; } return new byte[] { reportId, 0x51, 0x28, (byte)zone, 0x00, IndexForLightingMode(lightingSetting.LightingMode), (byte)lightingSetting.Brightness, lightingSetting.RGBColor.R, lightingSetting.RGBColor.G, lightingSetting.RGBColor.B, (byte)(SupportsAnimationDirection(lightingSetting.LightingMode) ? lightingSetting.AnimationDirection : 0x00), (byte)((lightingSetting.RandomColor && SupportsRandomColor(lightingSetting.LightingMode)) ? 0x01: 0x00), (byte)(SupportsAnimationSpeed(lightingSetting.LightingMode) ? lightingSetting.AnimationSpeed : 0x00) }; } protected virtual LightingSetting? ParseLightingSetting(byte[] packet) { if (packet[1] != 0x12 || packet[2] != 0x03) { return null; } LightingSetting setting = new LightingSetting(); setting.LightingMode = LightingModeForIndex(packet[5]); setting.Brightness = packet[6]; setting.RGBColor = Color.FromArgb(packet[7], packet[8], packet[9]); setting.AnimationDirection = SupportsAnimationDirection(setting.LightingMode) ? (AnimationDirection)packet[11] : AnimationDirection.Clockwise; setting.RandomColor = SupportsRandomColor(setting.LightingMode) && packet[12] == 0x01; setting.AnimationSpeed = SupportsAnimationSpeed(setting.LightingMode) ? (AnimationSpeed)packet[13] : AnimationSpeed.Medium; //If the mouse reports an out of range value, which it does when the current setting has no speed option, chose medium as default if (setting.AnimationSpeed != AnimationSpeed.Fast && setting.AnimationSpeed != AnimationSpeed.Medium && setting.AnimationSpeed != AnimationSpeed.Slow) { setting.AnimationSpeed = AnimationSpeed.Medium; } return setting; } public virtual void ReadLightingSetting() { if (!HasRGB()) { return; } LightingZone[] lz = SupportedLightingZones(); for (int i = 0; i < lz.Length; ++i) { byte[]? response = WriteForResponse(GetReadLightingModePacket(lz[i])); if (response is null) return; LightingSetting? ls = ParseLightingSetting(response); if (ls is null) { Logger.WriteLine(GetDisplayName() + ": Failed to read RGB Setting for Zone " + lz[i].ToString()); continue; } Logger.WriteLine(GetDisplayName() + ": Read RGB Setting for Zone " + lz[i].ToString() + ": " + ls.ToString()); LightingSetting[i] = ls; } } public void SetLightingSetting(LightingSetting lightingSetting, LightingZone zone) { if (!HasRGB() || lightingSetting is null) { return; } WriteForResponse(GetUpdateLightingModePacket(lightingSetting, zone)); FlushSettings(); Logger.WriteLine(GetDisplayName() + ": Set RGB Setting for zone " + zone.ToString() + ": " + lightingSetting.ToString()); if (zone == LightingZone.All) { for (int i = 0; i < this.LightingSetting.Length; ++i) { this.LightingSetting[i] = lightingSetting; } } else { this.LightingSetting[IndexForZone(zone)] = lightingSetting; } } protected virtual byte[] GetSaveProfilePacket() { return new byte[] { reportId, 0x50, 0x03 }; } public void FlushSettings() { WriteForResponse(GetSaveProfilePacket()); Logger.WriteLine(GetDisplayName() + ": Settings Flushed "); } public override string? ToString() { return ""; } public static string ByteArrayToString(byte[] packet) { StringBuilder hex = new StringBuilder(packet.Length * 2); foreach (byte b in packet) hex.AppendFormat("{0:x2} ", b); return hex.ToString(); } } } ================================================ FILE: app/Peripherals/Mouse/Models/Chakram.cs ================================================  namespace GHelper.Peripherals.Mouse.Models { //P704 public class Chakram : AsusMouse { public Chakram() : base(0x0B05, 0x18E5, "mi_00", true) { } protected Chakram(ushort vendorId, bool wireless) : base(0x0B05, vendorId, "mi_00", wireless) { } public override int DPIProfileCount() { return 4; } public override string GetDisplayName() { return "ROG Chakram (Wireless)"; } public override PollingRate[] SupportedPollingrates() { return new PollingRate[] { PollingRate.PR125Hz, PollingRate.PR250Hz, PollingRate.PR500Hz, PollingRate.PR1000Hz }; } public override int ProfileCount() { return 3; } public override int MaxDPI() { return 16_000; } public override bool HasDebounceSetting() { return true; } public override bool HasLiftOffSetting() { return true; } public override int DPIIncrements() { return 100; } public override bool HasRGB() { return true; } public override int MaxBrightness() { return 4; } public override LightingZone[] SupportedLightingZones() { return new LightingZone[] { LightingZone.Logo, LightingZone.Scrollwheel, LightingZone.Underglow }; } public override bool HasAutoPowerOff() { return true; } public override bool HasAngleSnapping() { return true; } public override bool HasAngleTuning() { return false; } public override bool HasLowBatteryWarning() { return true; } public override int LowBatteryWarningStep() { return 25; } public override int LowBatteryWarningMax() { return 100; } protected override int ParseBattery(byte[] packet) { return base.ParseBattery(packet) * 25; } protected override int ParseLowBatteryWarning(byte[] packet) { return base.ParseLowBatteryWarning(packet) * 25; } protected override byte[] GetUpdateEnergySettingsPacket(int lowBatteryWarning, PowerOffSetting powerOff) { return base.GetUpdateEnergySettingsPacket(lowBatteryWarning / 25, powerOff); } protected override byte[] GetReadLightingModePacket(LightingZone zone) { return new byte[] { 0x00, 0x12, 0x03, 0x00 }; } protected LightingSetting? ParseLightingSetting(byte[] packet, LightingZone zone) { if (packet[1] != 0x12 || packet[2] != 0x03) { return null; } int offset = 5 + (((int)zone) * 5); LightingSetting setting = new LightingSetting(); setting.LightingMode = LightingModeForIndex(packet[offset + 0]); setting.Brightness = packet[offset + 1]; setting.RGBColor = Color.FromArgb(packet[offset + 2], packet[offset + 3], packet[offset + 4]); setting.AnimationDirection = SupportsAnimationDirection(setting.LightingMode) ? (AnimationDirection)packet[21] : AnimationDirection.Clockwise; if (setting.AnimationDirection != AnimationDirection.Clockwise && setting.AnimationDirection != AnimationDirection.CounterClockwise) { setting.AnimationDirection = AnimationDirection.Clockwise; } setting.RandomColor = SupportsRandomColor(setting.LightingMode) && packet[22] == 0x01; setting.AnimationSpeed = SupportsAnimationSpeed(setting.LightingMode) ? (AnimationSpeed)packet[23] : AnimationSpeed.Medium; //If the mouse reports an out of range value, which it does when the current setting has no speed option, chose medium as default if (setting.AnimationSpeed != AnimationSpeed.Fast && setting.AnimationSpeed != AnimationSpeed.Medium && setting.AnimationSpeed != AnimationSpeed.Slow) { setting.AnimationSpeed = AnimationSpeed.Medium; } return setting; } public override void ReadLightingSetting() { if (!HasRGB()) { return; } //Mouse sends all lighting zones in one response //21: Direction //22: Random //23: Speed // 20 21 22 23 //00 12 03 00 00 [03 04 00 00 ff] [03 04 00 00 ff] [03 04 00 00 ff] 00 04 00 00 //00 12 03 00 00 [05 02 ff 00 ff] [05 02 ff 00 ff] [05 02 ff 00 ff] 00 01 01 00 //00 12 03 00 00 [03 01 00 00 ff] [03 01 00 00 ff] [03 01 00 00 ff] 00 01 00 01 byte[]? response = WriteForResponse(GetReadLightingModePacket(LightingZone.All)); if (response is null) return; LightingZone[] lz = SupportedLightingZones(); for (int i = 0; i < lz.Length; ++i) { LightingSetting? ls = ParseLightingSetting(response, lz[i]); if (ls is null) { Logger.WriteLine(GetDisplayName() + ": Failed to read RGB Setting for Zone " + lz[i].ToString()); continue; } Logger.WriteLine(GetDisplayName() + ": Read RGB Setting for Zone " + lz[i].ToString() + ": " + ls.ToString()); LightingSetting[i] = ls; } } public override bool CanChangeDPIProfile() { return false; } } public class ChakramWired : Chakram { public ChakramWired() : base(0x18E3, false) { } public override string GetDisplayName() { return "ROG Chakram (Wired)"; } } } ================================================ FILE: app/Peripherals/Mouse/Models/ChakramCore.cs ================================================  namespace GHelper.Peripherals.Mouse.Models { //P511 public class ChakramCore : AsusMouse { public ChakramCore() : base(0x0B05, 0x1958, "mi_00", false) { } public override int DPIProfileCount() { return 4; } public override string GetDisplayName() { return "ROG Chakram Core"; } public override PollingRate[] SupportedPollingrates() { return new PollingRate[] { PollingRate.PR125Hz, PollingRate.PR250Hz, PollingRate.PR500Hz, PollingRate.PR1000Hz }; } public override int ProfileCount() { return 3; } public override int MaxDPI() { return 16_000; } public override bool HasDebounceSetting() { return false; } public override bool HasLiftOffSetting() { return true; } public override int DPIIncrements() { return 100; } public override bool HasRGB() { return true; } public override int MaxBrightness() { return 4; } public override LightingZone[] SupportedLightingZones() { return new LightingZone[] { LightingZone.Logo, LightingZone.Scrollwheel }; } public override bool IsLightingModeSupported(LightingMode lightingMode) { return lightingMode == LightingMode.Static || lightingMode == LightingMode.Breathing || lightingMode == LightingMode.ColorCycle || lightingMode == LightingMode.React; } //Mouse has React mapped to 0x03 instead of 0x04 like other mice protected override byte IndexForLightingMode(LightingMode lightingMode) { if (lightingMode == LightingMode.React) { return 0x03; } return ((byte)lightingMode); } //Mouse has React mapped to 0x03 instead of 0x04 like other mice protected override LightingMode LightingModeForIndex(byte lightingMode) { if (lightingMode == 0x03) { return LightingMode.React; } return base.LightingModeForIndex(lightingMode); } public override bool HasBattery() { return false; } public override bool HasAngleSnapping() { return true; } public override bool HasAngleTuning() { return false; } protected override byte[] GetReadLightingModePacket(LightingZone zone) { return new byte[] { 0x00, 0x12, 0x03, 0x00 }; } protected LightingSetting? ParseLightingSetting(byte[] packet, LightingZone zone) { if (packet[1] != 0x12 || packet[2] != 0x03) { return null; } int offset = 5 + (((int)zone) * 5); LightingSetting setting = new LightingSetting(); setting.LightingMode = LightingModeForIndex(packet[offset + 0]); setting.Brightness = packet[offset + 1]; setting.RGBColor = Color.FromArgb(packet[offset + 2], packet[offset + 3], packet[offset + 4]); setting.AnimationDirection = SupportsAnimationDirection(setting.LightingMode) ? (AnimationDirection)packet[21] : AnimationDirection.Clockwise; if (setting.AnimationDirection != AnimationDirection.Clockwise && setting.AnimationDirection != AnimationDirection.CounterClockwise) { setting.AnimationDirection = AnimationDirection.Clockwise; } setting.RandomColor = SupportsRandomColor(setting.LightingMode) && packet[22] == 0x01; setting.AnimationSpeed = SupportsAnimationSpeed(setting.LightingMode) ? (AnimationSpeed)packet[23] : AnimationSpeed.Medium; //If the mouse reports an out of range value, which it does when the current setting has no speed option, chose medium as default if (setting.AnimationSpeed != AnimationSpeed.Fast && setting.AnimationSpeed != AnimationSpeed.Medium && setting.AnimationSpeed != AnimationSpeed.Slow) { setting.AnimationSpeed = AnimationSpeed.Medium; } return setting; } public override void ReadLightingSetting() { if (!HasRGB()) { return; } //Mouse sends all lighting zones in one response //21: Direction //22: Random //23: Speed // 20 21 22 23 //00 12 03 00 00 [03 04 00 00 ff] [03 04 00 00 ff] [03 04 00 00 ff] 00 04 00 00 //00 12 03 00 00 [05 02 ff 00 ff] [05 02 ff 00 ff] [05 02 ff 00 ff] 00 01 01 00 //00 12 03 00 00 [03 01 00 00 ff] [03 01 00 00 ff] [03 01 00 00 ff] 00 01 00 01 byte[]? response = WriteForResponse(GetReadLightingModePacket(LightingZone.All)); if (response is null) return; LightingZone[] lz = SupportedLightingZones(); for (int i = 0; i < lz.Length; ++i) { LightingSetting? ls = ParseLightingSetting(response, lz[i]); if (ls is null) { Logger.WriteLine(GetDisplayName() + ": Failed to read RGB Setting for Zone " + lz[i].ToString()); continue; } Logger.WriteLine(GetDisplayName() + ": Read RGB Setting for Zone " + lz[i].ToString() + ": " + ls.ToString()); LightingSetting[i] = ls; } } public override bool CanChangeDPIProfile() { return false; } protected override LiftOffDistance ParseLiftOffDistance(byte[] packet) { if (packet[1] != 0x12 || packet[2] != 0x06) { return LiftOffDistance.Low; } return (LiftOffDistance)packet[5]; } protected override byte[] GetUpdateLiftOffDistancePacket(LiftOffDistance liftOffDistance) { return new byte[] { 0x00, 0x51, 0x35, 0x00, 0x00, ((byte)liftOffDistance) }; } } } ================================================ FILE: app/Peripherals/Mouse/Models/ChakramX.cs ================================================  namespace GHelper.Peripherals.Mouse.Models { public class ChakramX : AsusMouse { public ChakramX() : base(0x0B05, 0x1A1A, "mi_00", true) { } protected ChakramX(ushort vendorId, bool wireless) : base(0x0B05, vendorId, "mi_00", wireless) { } public override string GetDisplayName() { return "ROG Chakram X (Wireless)"; } public override PollingRate[] SupportedPollingrates() { return new PollingRate[] { PollingRate.PR250Hz, PollingRate.PR500Hz, PollingRate.PR1000Hz }; } public override bool HasAngleSnapping() { return true; } public override int ProfileCount() { return 5; } public override int DPIProfileCount() { return 4; } public override int MaxDPI() { return 36_000; } public override bool HasXYDPI() { return true; } public override bool HasDebounceSetting() { return true; } public override bool HasLiftOffSetting() { return true; } public override bool HasRGB() { return true; } public override LightingZone[] SupportedLightingZones() { return new LightingZone[] { LightingZone.Logo, LightingZone.Scrollwheel, LightingZone.Underglow }; } public override bool HasAutoPowerOff() { return true; } public override bool HasAngleTuning() { return true; } public override bool HasLowBatteryWarning() { return true; } public override bool HasDPIColors() { return true; } } public class ChakramXWired : ChakramX { public ChakramXWired() : base(0x1A18, false) { } public override string GetDisplayName() { return "ROG Chakram X (Wired)"; } public override PollingRate[] SupportedPollingrates() { return new PollingRate[] { PollingRate.PR250Hz, PollingRate.PR500Hz, PollingRate.PR1000Hz, PollingRate.PR2000Hz, PollingRate.PR4000Hz, PollingRate.PR8000Hz }; } } } ================================================ FILE: app/Peripherals/Mouse/Models/GladiusII.cs ================================================ namespace GHelper.Peripherals.Mouse.Models { //P504 public class GladiusIIOrigin : AsusMouse { public GladiusIIOrigin() : base(0x0B05, 0x1877, "mi_02", false) { } public GladiusIIOrigin(ushort productId, string path) : base(0x0B05, productId, path, false) { } public override int DPIProfileCount() { return 2; } public override string GetDisplayName() { return "Gladius II Origin"; } public override PollingRate[] SupportedPollingrates() { return new PollingRate[] { PollingRate.PR125Hz, PollingRate.PR250Hz, PollingRate.PR500Hz, PollingRate.PR1000Hz }; } public override int ProfileCount() { return 1; } public override int MaxDPI() { return 12_000; } public override bool HasRGB() { return true; } public override bool HasAutoPowerOff() { return false; } public override bool HasAngleSnapping() { return true; } public override bool HasAngleTuning() { return false; } public override bool HasDebounceSetting() { return true; } public override bool HasLiftOffSetting() { return true; } public override bool HasLowBatteryWarning() { return false; } public override bool HasBattery() { return false; } public override bool HasDPIColors() { return false; } public override bool IsLightingModeSupported(LightingMode lightingMode) { return lightingMode == LightingMode.Static || lightingMode == LightingMode.Breathing || lightingMode == LightingMode.ColorCycle || lightingMode == LightingMode.Rainbow || lightingMode == LightingMode.React || lightingMode == LightingMode.Comet; } public override LightingZone[] SupportedLightingZones() { return new LightingZone[] { LightingZone.Logo, LightingZone.Scrollwheel, LightingZone.Underglow }; } public override int DPIIncrements() { return 100; } public override bool CanChangeDPIProfile() { return true; } public override int MaxBrightness() { return 4; } protected override byte[] GetUpdateLightingModePacket(LightingSetting lightingSetting, LightingZone zone) { /* * This mouse uses different speed values for rainbow mode compared to others. * 51 28 03 00 03 04 FF 00 00 00 00 [8C] 00 00 00 00 * 51 28 03 00 03 04 FF 00 00 00 00 [64] 00 00 00 00 * 51 28 03 00 03 04 FF 00 00 00 00 [3F] 00 00 00 00 */ if (lightingSetting.LightingMode == LightingMode.Rainbow) { byte speed = 0x3F; switch (lightingSetting.AnimationSpeed) { case AnimationSpeed.Slow: speed = 0x3F; break; case AnimationSpeed.Medium: speed = 0x64; break; case AnimationSpeed.Fast: speed = 0x8C; break; } return new byte[] { reportId, 0x51, 0x28, (byte)zone, 0x00, IndexForLightingMode(lightingSetting.LightingMode), (byte)lightingSetting.Brightness, 0xFF, 0x00, 0x00, (byte)(SupportsAnimationDirection(lightingSetting.LightingMode) ? lightingSetting.AnimationDirection : 0x00), (byte)((lightingSetting.RandomColor && SupportsRandomColor(lightingSetting.LightingMode)) ? 0x01: 0x00), (byte)(SupportsAnimationSpeed(lightingSetting.LightingMode) ? speed : 0x00) }; } return base.GetUpdateLightingModePacket(lightingSetting, zone); } protected override byte[] GetReadLightingModePacket(LightingZone zone) { return new byte[] { 0x00, 0x12, 0x03, 0x00 }; } protected LightingSetting? ParseLightingSetting(byte[] packet, LightingZone zone) { if (packet[1] != 0x12 || packet[2] != 0x03) { return null; } int offset = 5 + (((int)zone) * 5); LightingSetting setting = new LightingSetting(); setting.LightingMode = LightingModeForIndex(packet[offset + 0]); setting.Brightness = packet[offset + 1]; setting.RGBColor = Color.FromArgb(packet[offset + 2], packet[offset + 3], packet[offset + 4]); return setting; } public override void ReadLightingSetting() { if (!HasRGB()) { return; } //Mouse sends all lighting zones in one response Direction, Random col, Speed //00 12 03 00 00 [00 04 ff 00 80] [00 04 00 ff ff] [00 04 ff ff ff] 00 [00] [00] [00] 00 00 //00 12 03 00 00 [03 04 00 00 00] [03 04 00 00 00] [03 04 00 00 00] 00 [00] [00] [07] 00 00 byte[]? response = WriteForResponse(GetReadLightingModePacket(LightingZone.All)); if (response is null) return; LightingZone[] lz = SupportedLightingZones(); for (int i = 0; i < lz.Length; ++i) { LightingSetting? ls = ParseLightingSetting(response, lz[i]); if (ls is null) { Logger.WriteLine(GetDisplayName() + ": Failed to read RGB Setting for Zone " + lz[i].ToString()); continue; } ls.AnimationDirection = SupportsAnimationDirection(ls.LightingMode) ? (AnimationDirection)response[21] : AnimationDirection.Clockwise; ls.RandomColor = SupportsRandomColor(ls.LightingMode) && response[22] == 0x01; ls.AnimationSpeed = SupportsAnimationSpeed(ls.LightingMode) ? (AnimationSpeed)response[23] : AnimationSpeed.Medium; if (ls.AnimationSpeed != AnimationSpeed.Fast && ls.AnimationSpeed != AnimationSpeed.Medium && ls.AnimationSpeed != AnimationSpeed.Slow) { ls.AnimationSpeed = AnimationSpeed.Medium; } Logger.WriteLine(GetDisplayName() + ": Read RGB Setting for Zone " + lz[i].ToString() + ": " + ls.ToString()); LightingSetting[i] = ls; } } protected override PollingRate ParsePollingRate(byte[] packet) { if (packet[1] == 0x12 && packet[2] == 0x04 && packet[3] == 0x00) { return (PollingRate)packet[9]; } return PollingRate.PR125Hz; } protected override byte[] GetUpdatePollingRatePacket(PollingRate pollingRate) { return new byte[] { reportId, 0x51, 0x31, 0x02, 0x00, (byte)pollingRate }; } protected override bool ParseAngleSnapping(byte[] packet) { if (packet[1] == 0x12 && packet[2] == 0x04 && packet[3] == 0x00) { return packet[13] == 0x01; } return false; } protected override byte[] GetUpdateAngleSnappingPacket(bool angleSnapping) { return new byte[] { reportId, 0x51, 0x31, 0x04, 0x00, (byte)(angleSnapping ? 0x01 : 0x00) }; } protected override DebounceTime ParseDebounce(byte[] packet) { if (packet[1] != 0x12 || packet[2] != 0x04 || packet[3] != 0x00) { return DebounceTime.MS12; } if (packet[11] < 0x02) { return DebounceTime.MS12; } if (packet[11] > 0x07) { return DebounceTime.MS32; } return (DebounceTime)packet[11]; } protected override byte[] GetUpdateDebouncePacket(DebounceTime debounce) { return new byte[] { reportId, 0x51, 0x31, 0x03, 0x00, ((byte)debounce) }; } } //P502 public class GladiusII : GladiusIIOrigin { public GladiusII() : base(0x1845, "mi_02") { } public override string GetDisplayName() { return "Gladius II Origin"; } public override int ProfileCount() { return 3; } } //P504 public class GladiusIIOriginPink : GladiusIIOrigin { public GladiusIIOriginPink() : base(0x18CD, "mi_02") { } public override string GetDisplayName() { return "Gladius II PNK LTD"; } public override int ProfileCount() { return 3; } public override LightingZone[] SupportedLightingZones() { return new LightingZone[] { LightingZone.Scrollwheel, LightingZone.Underglow }; } protected override byte[] GetUpdateLightingModePacket(LightingSetting lightingSetting, LightingZone zone) { /* * This mouse uses different speed values for rainbow mode compared to others. * 51 28 03 00 03 04 FF 00 00 00 00 [8C] 00 00 00 00 * 51 28 03 00 03 04 FF 00 00 00 00 [64] 00 00 00 00 * 51 28 03 00 03 04 FF 00 00 00 00 [3F] 00 00 00 00 */ byte speed = (byte)(SupportsAnimationSpeed(lightingSetting.LightingMode) ? lightingSetting.AnimationSpeed : 0x00); if (lightingSetting.LightingMode == LightingMode.Rainbow) { speed = 0x64; switch (lightingSetting.AnimationSpeed) { case AnimationSpeed.Slow: speed = 0x8C; break; case AnimationSpeed.Medium: speed = 0x64; break; case AnimationSpeed.Fast: speed = 0x3F; break; } } return new byte[] { reportId, 0x51, 0x28, (byte)zone, 0x00, IndexForLightingMode(lightingSetting.LightingMode), (byte)lightingSetting.Brightness, 0x00, // this mouse has 2 colors per LED capability, but we do not suppor this yet, so we disable it lightingSetting.RGBColor.R, lightingSetting.RGBColor.G, lightingSetting.RGBColor.B, 0x00, 0x00, 0x00, //this would be the second set of RGB Colors if we ever support this (byte)(SupportsAnimationDirection(lightingSetting.LightingMode) ? lightingSetting.AnimationDirection : 0x00), (byte)((lightingSetting.RandomColor && SupportsRandomColor(lightingSetting.LightingMode)) ? 0x01: 0x00), speed }; } protected LightingSetting? ParseLightingSetting(byte[] packet, LightingZone zone) { if (packet[1] != 0x12 || packet[2] != 0x03) { return null; } //skip first block as it seems to be empty. Maybe only filled to certain configurations. int offset = 5 + 9 + (((int)zone) * 9); LightingSetting setting = new LightingSetting(); setting.LightingMode = LightingModeForIndex(packet[offset + 0]); setting.Brightness = packet[offset + 1]; //Offset 2 is a bool that says whether dual color RGB is in use. Unsupported for now by GHelper setting.RGBColor = Color.FromArgb(packet[offset + 3], packet[offset + 4], packet[offset + 5]); //Offset 7 - 9 are the second RGB colors, unuse as not supported yet return setting; } public override void ReadLightingSetting() { if (!HasRGB()) { return; } //Mouse sends all lighting zones in one response Direction, Random col, Speed //First block seems emtpy? //00 12 03 00 00 [00 00 00 00 00 00 00 00 00] [03 04 01 00 00 00 00 00 00] [03 04 01 00 00 00 00 00 00] [00 01 8c] //Length 9, offset 5 //Direction byte[]? response = WriteForResponse(GetReadLightingModePacket(LightingZone.All)); if (response is null) return; LightingZone[] lz = SupportedLightingZones(); for (int i = 0; i < lz.Length; ++i) { LightingSetting? ls = ParseLightingSetting(response, lz[i]); if (ls is null) { Logger.WriteLine(GetDisplayName() + ": Failed to read RGB Setting for Zone " + lz[i].ToString()); continue; } ls.AnimationDirection = SupportsAnimationDirection(ls.LightingMode) ? (AnimationDirection)response[32] : AnimationDirection.Clockwise; ls.RandomColor = SupportsRandomColor(ls.LightingMode) && response[33] == 0x01; //Rainbow uses different speed values for whatever reason if (response[12] == 0x03) { byte speed = response[34]; switch (speed) { case 0x3F: ls.AnimationSpeed = AnimationSpeed.Fast; break; case 0x64: ls.AnimationSpeed = AnimationSpeed.Medium; break; case 0x8C: ls.AnimationSpeed = AnimationSpeed.Slow; break; default: ls.AnimationSpeed = AnimationSpeed.Medium; break; } } else { ls.AnimationSpeed = SupportsAnimationSpeed(ls.LightingMode) ? (AnimationSpeed)response[34] : AnimationSpeed.Medium; if (ls.AnimationSpeed != AnimationSpeed.Fast && ls.AnimationSpeed != AnimationSpeed.Medium && ls.AnimationSpeed != AnimationSpeed.Slow) { ls.AnimationSpeed = AnimationSpeed.Medium; } } Logger.WriteLine(GetDisplayName() + ": Read RGB Setting for Zone " + lz[i].ToString() + ": " + ls.ToString()); LightingSetting[i] = ls; } } } } ================================================ FILE: app/Peripherals/Mouse/Models/GladiusIIIAimpoint.cs ================================================ namespace GHelper.Peripherals.Mouse.Models { //P711 public class GladiusIIIAimpoint : AsusMouse { public GladiusIIIAimpoint() : base(0x0B05, 0x1A72, "mi_00", true) { } protected GladiusIIIAimpoint(ushort productId, bool wireless) : base(0x0B05, productId, "mi_00", wireless) { } protected GladiusIIIAimpoint(ushort productId, bool wireless, string endpoint, byte reportId) : base(0x0B05, productId, endpoint, wireless, reportId) { } public override int DPIProfileCount() { return 4; } public override string GetDisplayName() { return "ROG Gladius III Aimpoint (Wireless)"; } public override PollingRate[] SupportedPollingrates() { return new PollingRate[] { PollingRate.PR125Hz, PollingRate.PR250Hz, PollingRate.PR500Hz, PollingRate.PR1000Hz }; } public override int ProfileCount() { return 5; } public override int MaxDPI() { return 36_000; } public override bool HasXYDPI() { return true; } public override bool HasDebounceSetting() { return true; } public override bool HasLiftOffSetting() { return true; } public override bool HasRGB() { return true; } public override LightingZone[] SupportedLightingZones() { return new LightingZone[] { LightingZone.Logo, LightingZone.Scrollwheel, LightingZone.Underglow }; } public override bool HasAutoPowerOff() { return true; } public override bool HasAngleSnapping() { return true; } public override bool HasAngleTuning() { return true; } public override bool HasLowBatteryWarning() { return true; } public override bool HasDPIColors() { return true; } } public class GladiusIIIAimpointWired : GladiusIIIAimpoint { public GladiusIIIAimpointWired() : base(0x1A70, false) { } public override string GetDisplayName() { return "ROG Gladius III Aimpoint (Wired)"; } } public class GladiusIIIAimpointEva2 : GladiusIIIAimpoint { public GladiusIIIAimpointEva2() : base(0x1B0C, true) { } public GladiusIIIAimpointEva2(ushort productId) : base(productId, false) { } public override string GetDisplayName() { return "ROG Gladius III Eva 2 (Wireless)"; } public override LightingZone[] SupportedLightingZones() { return new LightingZone[] { LightingZone.Logo }; } public override bool IsLightingModeSupported(LightingMode lightingMode) { return lightingMode == LightingMode.Static || lightingMode == LightingMode.Breathing || lightingMode == LightingMode.ColorCycle || lightingMode == LightingMode.React || lightingMode == LightingMode.Comet || lightingMode == LightingMode.BatteryState; } } public class GladiusIIIAimpointEva2Wired : GladiusIIIAimpointEva2 { public GladiusIIIAimpointEva2Wired() : base(0x1B0A) { } public override string GetDisplayName() { return "ROG Gladius III Eva 2 (Wired)"; } } public class GladiusIIIAimpointOmni : GladiusIIIAimpoint { public GladiusIIIAimpointOmni() : base(0x1ACE, true, "mi_02&col03", 0x03) { } public override string GetDisplayName() { return "ROG Gladius III Aimpoint (OMNI)"; } public override int USBPacketSize() { return 64; } } } ================================================ FILE: app/Peripherals/Mouse/Models/GladiusIIIWireless.cs ================================================ namespace GHelper.Peripherals.Mouse.Models { //P706_Wireless public class GladiusIIIWireless : AsusMouse { public GladiusIIIWireless() : base(0x0B05, 0x197F, "mi_00", true) { } protected GladiusIIIWireless(ushort vendorId, bool wireless) : base(0x0B05, vendorId, "mi_00", wireless) { } public override int DPIProfileCount() { return 4; } public override string GetDisplayName() { return "ROG Gladius III (Wireless)"; } public override PollingRate[] SupportedPollingrates() { return new PollingRate[] { PollingRate.PR125Hz, PollingRate.PR250Hz, PollingRate.PR500Hz, PollingRate.PR1000Hz }; } public override int ProfileCount() { return 5; } public override int MaxDPI() { return 26_000; } public override bool HasDebounceSetting() { return true; } public override bool HasLiftOffSetting() { return true; } public override bool HasRGB() { return true; } public override LightingZone[] SupportedLightingZones() { return new LightingZone[] { LightingZone.Logo, LightingZone.Scrollwheel, LightingZone.Underglow }; } public override bool HasAutoPowerOff() { return true; } public override bool HasAngleSnapping() { return true; } public override bool HasLowBatteryWarning() { return true; } } public class GladiusIIIWired : GladiusIIIWireless { public GladiusIIIWired() : base(0x197d, false) { } public override string GetDisplayName() { return "ROG Gladius III (Wired)"; } } //P514 public class GladiusIII : GladiusIIIWireless { public GladiusIII() : base(0x197B, false) { } public override string GetDisplayName() { return "ROG Gladius III"; } public override bool HasAutoPowerOff() { return false; } public override bool HasLowBatteryWarning() { return false; } public override bool HasBattery() { return false; } public override bool IsLightingModeSupported(LightingMode lightingMode) { return lightingMode == LightingMode.Static || lightingMode == LightingMode.Breathing || lightingMode == LightingMode.ColorCycle || lightingMode == LightingMode.Rainbow || lightingMode == LightingMode.React || lightingMode == LightingMode.Comet; } } } ================================================ FILE: app/Peripherals/Mouse/Models/GladiusIIWireless.cs ================================================ namespace GHelper.Peripherals.Mouse.Models { public class GladiusIIWireless : AsusMouse { public GladiusIIWireless() : base(0x0B05, 0x18A0, "mi_02", true) { } public override int DPIProfileCount() { return 2; } public override string GetDisplayName() { return "Gladius II Wireless"; } public override PollingRate[] SupportedPollingrates() { return new PollingRate[] { PollingRate.PR125Hz, PollingRate.PR250Hz, PollingRate.PR500Hz, PollingRate.PR1000Hz }; } public override int ProfileCount() { return 1; } public override int MaxDPI() { return 16_000; } public override bool HasRGB() { return true; } public override bool HasAutoPowerOff() { return true; } public override bool HasAngleSnapping() { return true; } public override bool HasAngleTuning() { return true; } public override bool HasDebounceSetting() { return true; } public override bool HasLiftOffSetting() { return false; } public override bool HasLowBatteryWarning() { return true; } public override int LowBatteryWarningStep() { return 25; } public override bool HasBattery() { return true; } public override bool HasDPIColors() { return false; } public override bool IsLightingModeSupported(LightingMode lightingMode) { return lightingMode == LightingMode.Static || lightingMode == LightingMode.Breathing || lightingMode == LightingMode.ColorCycle || lightingMode == LightingMode.React || lightingMode == LightingMode.BatteryState; } public override LightingZone[] SupportedLightingZones() { return new LightingZone[] { LightingZone.Logo, LightingZone.Scrollwheel }; } public override int DPIIncrements() { return 100; } public override bool CanChangeDPIProfile() { return true; } public override int MaxBrightness() { return 4; } //Has 25% increments protected override int ParseBattery(byte[] packet) { if (packet[1] == 0x12 && packet[2] == 0x07) { return packet[5] * 25; } return -1; } protected override byte[] GetUpdateLightingModePacket(LightingSetting lightingSetting, LightingZone zone) { /* * This mouse uses different speed values for rainbow mode compared to others. * 51 28 03 00 03 04 FF 00 00 00 00 [8C] 00 00 00 00 * 51 28 03 00 03 04 FF 00 00 00 00 [64] 00 00 00 00 * 51 28 03 00 03 04 FF 00 00 00 00 [3F] 00 00 00 00 */ if (lightingSetting.LightingMode == LightingMode.Rainbow) { byte speed = 0x3F; switch (lightingSetting.AnimationSpeed) { case AnimationSpeed.Slow: speed = 0x3F; break; case AnimationSpeed.Medium: speed = 0x64; break; case AnimationSpeed.Fast: speed = 0x8C; break; } return new byte[] { reportId, 0x51, 0x28, (byte)zone, 0x00, IndexForLightingMode(lightingSetting.LightingMode), (byte)lightingSetting.Brightness, 0xFF, 0x00, 0x00, (byte)(SupportsAnimationDirection(lightingSetting.LightingMode) ? lightingSetting.AnimationDirection : 0x00), (byte)((lightingSetting.RandomColor && SupportsRandomColor(lightingSetting.LightingMode)) ? 0x01: 0x00), (byte)(SupportsAnimationSpeed(lightingSetting.LightingMode) ? speed : 0x00) }; } return base.GetUpdateLightingModePacket(lightingSetting, zone); } protected override byte[] GetReadLightingModePacket(LightingZone zone) { return new byte[] { 0x00, 0x12, 0x03, 0x00 }; } protected LightingSetting? ParseLightingSetting(byte[] packet, LightingZone zone) { if (packet[1] != 0x12 || packet[2] != 0x03) { return null; } int offset = 5 + (((int)zone) * 5); LightingSetting setting = new LightingSetting(); setting.LightingMode = LightingModeForIndex(packet[offset + 0]); setting.Brightness = packet[offset + 1]; setting.RGBColor = Color.FromArgb(packet[offset + 2], packet[offset + 3], packet[offset + 4]); return setting; } public override void ReadLightingSetting() { if (!HasRGB()) { return; } //Mouse sends all lighting zones in one response Direction, Random col, Speed //00 12 03 00 00 [00 04 ff 00 80] [00 04 00 ff ff] [00 04 ff ff ff] 00 [00] [00] [00] 00 00 //00 12 03 00 00 [03 04 00 00 00] [03 04 00 00 00] [03 04 00 00 00] 00 [00] [00] [07] 00 00 byte[]? response = WriteForResponse(GetReadLightingModePacket(LightingZone.All)); if (response is null) return; LightingZone[] lz = SupportedLightingZones(); for (int i = 0; i < lz.Length; ++i) { LightingSetting? ls = ParseLightingSetting(response, lz[i]); if (ls is null) { Logger.WriteLine(GetDisplayName() + ": Failed to read RGB Setting for Zone " + lz[i].ToString()); continue; } ls.AnimationDirection = SupportsAnimationDirection(ls.LightingMode) ? (AnimationDirection)response[21] : AnimationDirection.Clockwise; ls.RandomColor = SupportsRandomColor(ls.LightingMode) && response[22] == 0x01; ls.AnimationSpeed = SupportsAnimationSpeed(ls.LightingMode) ? (AnimationSpeed)response[23] : AnimationSpeed.Medium; if (ls.AnimationSpeed != AnimationSpeed.Fast && ls.AnimationSpeed != AnimationSpeed.Medium && ls.AnimationSpeed != AnimationSpeed.Slow) { ls.AnimationSpeed = AnimationSpeed.Medium; } Logger.WriteLine(GetDisplayName() + ": Read RGB Setting for Zone " + lz[i].ToString() + ": " + ls.ToString()); LightingSetting[i] = ls; } } protected override PollingRate ParsePollingRate(byte[] packet) { if (packet[1] == 0x12 && packet[2] == 0x04 && packet[3] == 0x00) { return (PollingRate)packet[9]; } return PollingRate.PR125Hz; } protected override byte[] GetUpdatePollingRatePacket(PollingRate pollingRate) { return new byte[] { reportId, 0x51, 0x31, 0x02, 0x00, (byte)pollingRate }; } protected override bool ParseAngleSnapping(byte[] packet) { if (packet[1] == 0x12 && packet[2] == 0x04 && packet[3] == 0x00) { return packet[13] == 0x01; } return false; } protected override byte[] GetUpdateAngleSnappingPacket(bool angleSnapping) { return new byte[] { reportId, 0x51, 0x31, 0x04, 0x00, (byte)(angleSnapping ? 0x01 : 0x00) }; } protected override DebounceTime ParseDebounce(byte[] packet) { if (packet[1] != 0x12 || packet[2] != 0x04 || packet[3] != 0x00) { return DebounceTime.MS12; } if (packet[11] < 0x02) { return DebounceTime.MS12; } if (packet[11] > 0x07) { return DebounceTime.MS32; } return (DebounceTime)packet[11]; } protected override byte[] GetUpdateDebouncePacket(DebounceTime debounce) { return new byte[] { reportId, 0x51, 0x31, 0x03, 0x00, ((byte)debounce) }; } } } ================================================ FILE: app/Peripherals/Mouse/Models/HarpeAceAimLab.cs ================================================ namespace GHelper.Peripherals.Mouse.Models { //P713_Wireless public class HarpeAceAimLabEdition : AsusMouse { public HarpeAceAimLabEdition() : base(0x0B05, 0x1A94, "mi_00", true) { } protected HarpeAceAimLabEdition(ushort productId, bool wireless, string endpoint, byte reportId) : base(0x0B05, productId, endpoint, wireless, reportId) { } public override int DPIProfileCount() { return 4; } public override string GetDisplayName() { return "ROG Harpe Ace Aim Lab Edition (Wireless)"; } public override PollingRate[] SupportedPollingrates() { return new PollingRate[] { PollingRate.PR125Hz, PollingRate.PR250Hz, PollingRate.PR500Hz, PollingRate.PR1000Hz, PollingRate.PR2000Hz, PollingRate.PR4000Hz, PollingRate.PR8000Hz, }; } public override int ProfileCount() { return 5; } public override int MaxDPI() { return 36_000; } public override int MinDPI() { return 50; } public override bool HasXYDPI() { return true; } public override bool HasDebounceSetting() { return true; } public override bool HasLiftOffSetting() { return true; } public override bool HasRGB() { return true; } public override LightingZone[] SupportedLightingZones() { return new LightingZone[] { LightingZone.Scrollwheel }; } public override bool IsLightingModeSupported(LightingMode lightingMode) { return lightingMode == LightingMode.Static || lightingMode == LightingMode.Breathing || lightingMode == LightingMode.ColorCycle || lightingMode == LightingMode.React || lightingMode == LightingMode.BatteryState || lightingMode == LightingMode.Off; } public override bool HasAutoPowerOff() { return true; } public override bool HasAngleSnapping() { return true; } public override bool HasAngleTuning() { return true; } public override bool HasLowBatteryWarning() { return true; } public override bool HasDPIColors() { return true; } public override int AngleTuningStep() { return 1; } public override int AngleTuningMin() { return -30; } public override int AngleTuningMax() { return 30; } public override bool HasAcceleration() { return true; } public override bool HasDeceleration() { return true; } public override int MaxAcceleration() { return 9; } public override int MaxDeceleration() { return 9; } } public class HarpeAceAimLabEditionWired : HarpeAceAimLabEdition { public HarpeAceAimLabEditionWired() : base(0x1A92, false, "mi_00", 0x00) { } public override string GetDisplayName() { return "ROG Harpe Ace Aim Lab Edition (Wired)"; } } public class HarpeAceAimLabEditionOmni : HarpeAceAimLabEdition { public HarpeAceAimLabEditionOmni() : base(0x1ACE, true, "mi_02&col03", 0x03) { } public override string GetDisplayName() { return "ROG Harpe Ace Aim Lab Edition (OMNI)"; } public override int USBPacketSize() { return 64; } } public class HarpeAceExtremeWeird : HarpeAceAimLabEdition { public HarpeAceExtremeWeird() : base(0x1B67, false, "mi_00", 0x00) { } public override int MaxDPI() { return 42_000; } public override string GetDisplayName() { return "ROG Harpe Ace Extreme (Wired)"; } } public class HarpeAceExtremeOmni : HarpeAceAimLabEdition { public HarpeAceExtremeOmni() : base(0x1ACE, true, "mi_02&col03", 0x03) { } public override string GetDisplayName() { return "ROG Harpe Ace Extreme (OMNI)"; } public override int USBPacketSize() { return 64; } public override int MaxDPI() { return 42_000; } } } ================================================ FILE: app/Peripherals/Mouse/Models/HarpeAceMini.cs ================================================ namespace GHelper.Peripherals.Mouse.Models { //P716_Wireless public class HarpeAceMiniWired : AsusMouse { public HarpeAceMiniWired() : base(0x0B05, 0x1B63, "mi_00", false) { } protected HarpeAceMiniWired(ushort productId, bool wireless, string endpoint, byte reportId) : base(0x0B05, productId, endpoint, wireless, reportId) { } public override int DPIProfileCount() { return 4; } public override string GetDisplayName() { return "Harpe Ace Mini (Wired)"; } public override bool CanChangeDPICount() { return true; } public override PollingRate[] SupportedPollingrates() { return new PollingRate[] { PollingRate.PR125Hz, PollingRate.PR250Hz, PollingRate.PR500Hz, PollingRate.PR1000Hz }; } public override int ProfileCount() { return 5; } public override int MaxDPI() { return 42_000; } public override bool HasXYDPI() { return true; } public override bool HasLiftOffSetting() { return true; } public override bool HasRGB() { return true; } public override LightingZone[] SupportedLightingZones() { return new LightingZone[] { LightingZone.Scrollwheel }; } public override bool IsLightingModeSupported(LightingMode lightingMode) { return lightingMode == LightingMode.Static || lightingMode == LightingMode.Breathing || lightingMode == LightingMode.ColorCycle || lightingMode == LightingMode.React || lightingMode == LightingMode.BatteryState || lightingMode == LightingMode.Off; } public override bool HasAutoPowerOff() { return true; } public override bool HasAngleSnapping() { return true; } public override bool HasAngleTuning() { return true; } public override bool HasLowBatteryWarning() { return true; } public override bool HasDPIColors() { return true; } public override int AngleTuningStep() { return 5; } public override int USBPacketSize() { return 64; } } public class HarpeAceMiniOmni : HarpeAceMiniWired { public HarpeAceMiniOmni() : base(0x1ACE, true, "mi_02&col03", 0x03) { } public override string GetDisplayName() { return "Harpe Ace Mini (OMNI)"; } } } ================================================ FILE: app/Peripherals/Mouse/Models/HarpeIIAce.cs ================================================ namespace GHelper.Peripherals.Mouse.Models { //P723 - ROG HARPE II ACE (USB Wired) public class HarpeIIAceWired : AsusMouse { public HarpeIIAceWired() : base(0x0B05, 0x1C69, "mi_00", false) { } protected HarpeIIAceWired(ushort productId, bool wireless, string endpoint, byte reportId) : base(0x0B05, productId, endpoint, wireless, reportId) { } public override string GetDisplayName() { return "ROG HARPE II ACE (Wired)"; } public override int DPIProfileCount() { return 4; } public override int MaxDPI() { return 42_000; } public override int MinDPI() { return 100; } public override bool HasXYDPI() { return true; } public override bool HasDPIColors() { return true; } public override bool HasBattery() { return true; } public override bool HasAutoPowerOff() { return true; } public override bool HasLowBatteryWarning() { return true; } public override int ProfileCount() { return 5; } public override PollingRate[] SupportedPollingrates() { return new PollingRate[] { PollingRate.PR125Hz, PollingRate.PR250Hz, PollingRate.PR500Hz, PollingRate.PR1000Hz, PollingRate.PR2000Hz, PollingRate.PR4000Hz, PollingRate.PR8000Hz }; } public override bool HasLiftOffSetting() { return true; } public override bool HasAngleSnapping() { return true; } public override bool HasAngleTuning() { return true; } public override bool HasMotionSync() { return true; } public override bool HasRGB() { return true; } public override LightingZone[] SupportedLightingZones() { return new LightingZone[] { LightingZone.Scrollwheel }; } public override bool IsLightingModeSupported(LightingMode lightingMode) { return lightingMode == LightingMode.Static || lightingMode == LightingMode.Breathing || lightingMode == LightingMode.ColorCycle || lightingMode == LightingMode.React || lightingMode == LightingMode.BatteryState || lightingMode == LightingMode.Off; } public override bool CanChangeDPICount() { return true; } public override int USBPacketSize() { return 64; } } //P723 - ROG HARPE II ACE (Wireless 2.4GHz RF) public class HarpeIIAceWireless : HarpeIIAceWired { public HarpeIIAceWireless() : base(0x1AD0, true, "mi_02&col03", 0x03) { } public override string GetDisplayName() { return "ROG HARPE II ACE (Wireless)"; } public override bool HasZoneMode() { return true; } } } ================================================ FILE: app/Peripherals/Mouse/Models/KerisIIAce.cs ================================================ namespace GHelper.Peripherals.Mouse.Models { public class KerisIIAceWired : AsusMouse { public KerisIIAceWired() : base(0x0B05, 0x1B16, "mi_00", true) { } protected KerisIIAceWired(ushort productId, bool wireless, string endpoint, byte reportId) : base(0x0B05, productId, endpoint, wireless, reportId) { } public override int DPIProfileCount() { return 4; } public override string GetDisplayName() { return "ROG Keris II Ace (Wired)"; } public override PollingRate[] SupportedPollingrates() { return new PollingRate[] { PollingRate.PR125Hz, PollingRate.PR250Hz, PollingRate.PR500Hz, PollingRate.PR1000Hz }; } public override int ProfileCount() { return 5; } public override int MaxDPI() { return 42_000; } public override bool HasLiftOffSetting() { return true; } public override bool HasRGB() { return true; } public override bool HasXYDPI() { return true; } public override bool IsLightingModeSupported(LightingMode lightingMode) { return lightingMode == LightingMode.Static || lightingMode == LightingMode.Breathing || lightingMode == LightingMode.ColorCycle || lightingMode == LightingMode.BatteryState || lightingMode == LightingMode.React || lightingMode == LightingMode.Off; } public override bool HasAutoPowerOff() { return true; } public override bool HasAngleSnapping() { return true; } public override bool HasAngleTuning() { return true; } public override bool HasLowBatteryWarning() { return true; } public override bool HasDPIColors() { return true; } public override int AngleTuningStep() { return 5; } } public class KerisAceIIOmni : KerisIIAceWired { public KerisAceIIOmni() : base(0x1ACE, true, "mi_02&col03", 0x03) { } public override string GetDisplayName() { return "ROG Keris II Ace (OMNI)"; } public override int USBPacketSize() { return 64; } } } ================================================ FILE: app/Peripherals/Mouse/Models/KerisIIOrigin.cs ================================================ namespace GHelper.Peripherals.Mouse.Models { public class KerisIIOriginWired : AsusMouse { public KerisIIOriginWired() : base(0x0B05, 0x1C0C, "mi_00", true) { } protected KerisIIOriginWired(ushort productId, bool wireless, string endpoint, byte reportId) : base(0x0B05, productId, endpoint, wireless, reportId) { } public override int DPIProfileCount() { return 4; } public override bool CanChangeDPICount() { return true; } public override string GetDisplayName() { return "ROG Keris II Origin (Wired)"; } public override PollingRate[] SupportedPollingrates() { return new PollingRate[] { PollingRate.PR125Hz, PollingRate.PR250Hz, PollingRate.PR500Hz, PollingRate.PR1000Hz, PollingRate.PR2000Hz, PollingRate.PR4000Hz, PollingRate.PR8000Hz }; } public override int ProfileCount() { return 5; } public override int MaxDPI() { return 42_000; } public override bool HasLiftOffSetting() { return true; } public override bool HasRGB() { return true; } public override LightingZone[] SupportedLightingZones() { return new LightingZone[] { LightingZone.Logo, LightingZone.Scrollwheel, LightingZone.Underglow }; } public override bool HasXYDPI() { return true; } public override bool IsLightingModeSupported(LightingMode lightingMode) { return lightingMode == LightingMode.Static || lightingMode == LightingMode.Breathing || lightingMode == LightingMode.ColorCycle || lightingMode == LightingMode.BatteryState || lightingMode == LightingMode.React || lightingMode == LightingMode.Off; } public override bool HasAutoPowerOff() { return true; } public override bool HasAngleSnapping() { return true; } public override bool HasAngleTuning() { return true; } public override bool HasLowBatteryWarning() { return true; } public override bool HasDPIColors() { return true; } public override int AngleTuningStep() { return 5; } public override int USBPacketSize() { return 64; } } public class KerisIIOriginOmni : KerisIIOriginWired { public KerisIIOriginOmni() : base(0x1ACE, true, "mi_02&col03", 0x03) { } public override string GetDisplayName() { return "ROG Keris II Origin (OMNI)"; } } } ================================================ FILE: app/Peripherals/Mouse/Models/KerisWireless.cs ================================================ namespace GHelper.Peripherals.Mouse.Models { //P513 public class KerisWireless : AsusMouse { public KerisWireless() : base(0x0B05, 0x1960, "mi_00", true) { } protected KerisWireless(ushort vendorId, bool wireless) : base(0x0B05, vendorId, "mi_00", wireless) { } public override int DPIProfileCount() { return 4; } public override string GetDisplayName() { return "ROG Keris (Wireless)"; } public override PollingRate[] SupportedPollingrates() { return new PollingRate[] { PollingRate.PR125Hz, PollingRate.PR250Hz, PollingRate.PR500Hz, PollingRate.PR1000Hz }; } public override int ProfileCount() { return 3; } public override int MaxDPI() { return 16_000; } public override bool HasLiftOffSetting() { return true; } public override bool HasRGB() { return true; } public override bool HasAutoPowerOff() { return true; } public override bool HasAngleSnapping() { return true; } public override bool HasAngleTuning() { return false; } public override bool HasLowBatteryWarning() { return true; } public override bool HasDPIColors() { return false; } public override bool IsLightingModeSupported(LightingMode lightingMode) { return lightingMode == LightingMode.Static || lightingMode == LightingMode.Breathing || lightingMode == LightingMode.ColorCycle || lightingMode == LightingMode.React || lightingMode == LightingMode.BatteryState || lightingMode == LightingMode.Off; } //Has 25% increments protected override int ParseBattery(byte[] packet) { if (packet[1] == 0x12 && packet[2] == 0x07) { return packet[5] * 25; } return -1; } public override int DPIIncrements() { return 100; } public override bool HasDebounceSetting() { return true; } public override bool CanChangeDPIProfile() { return false; } protected override byte[] GetUpdateEnergySettingsPacket(int lowBatteryWarning, PowerOffSetting powerOff) { return base.GetUpdateEnergySettingsPacket(lowBatteryWarning / 25, powerOff); } protected override int ParseLowBatteryWarning(byte[] packet) { int lowBat = base.ParseLowBatteryWarning(packet); return lowBat * 25; } protected override LiftOffDistance ParseLiftOffDistance(byte[] packet) { if (packet[1] != 0x12 || packet[2] != 0x06) { return LiftOffDistance.Low; } return (LiftOffDistance)packet[5]; } protected override byte[] GetUpdateLiftOffDistancePacket(LiftOffDistance liftOffDistance) { return new byte[] { 0x00, 0x51, 0x35, 0x00, 0x00, ((byte)liftOffDistance) }; } public override LightingZone[] SupportedLightingZones() { return new LightingZone[] { LightingZone.Logo, LightingZone.Scrollwheel }; } public override int MaxBrightness() { return 4; } protected override byte IndexForLightingMode(LightingMode lightingMode) { if (lightingMode == LightingMode.Off) { return 0xFF; } return ((byte)lightingMode); } } //P509 public class Keris : KerisWireless { public Keris() : base(0x195C, false) { } public override string GetDisplayName() { return "ROG Keris"; } public override bool HasBattery() { return false; } public override bool HasLowBatteryWarning() { return false; } public override bool HasAutoPowerOff() { return false; } } public class KerisWirelessWired : KerisWireless { public KerisWirelessWired() : base(0x195E, false) { } public override string GetDisplayName() { return "ROG Keris (Wired)"; } } public class KerisWirelessEvaEdition : KerisWireless { public KerisWirelessEvaEdition() : base(0x1A59, true) { } public override string GetDisplayName() { return "ROG Keris EVA Edition"; } } public class KerisWirelessEvaEditionWired : KerisWireless { public KerisWirelessEvaEditionWired() : base(0x1A57, false) { } public override string GetDisplayName() { return "ROG Keris EVA Edition (Wired)"; } } } ================================================ FILE: app/Peripherals/Mouse/Models/KerisWirelssAimpoint.cs ================================================ namespace GHelper.Peripherals.Mouse.Models { //P709_Wireless public class KerisWirelssAimpoint : AsusMouse { public KerisWirelssAimpoint() : base(0x0B05, 0x1A68, "mi_00", true) { } protected KerisWirelssAimpoint(ushort vendorId, bool wireless) : base(0x0B05, vendorId, "mi_00", wireless) { } protected KerisWirelssAimpoint(ushort productId, bool wireless, string endpoint, byte reportId) : base(0x0B05, productId, endpoint, wireless, reportId) { } public override int DPIProfileCount() { return 4; } public override string GetDisplayName() { return "ROG Keris Wireless Aimpoint (Wireless)"; } public override PollingRate[] SupportedPollingrates() { return new PollingRate[] { PollingRate.PR125Hz, PollingRate.PR250Hz, PollingRate.PR500Hz, PollingRate.PR1000Hz }; } public override int ProfileCount() { return 5; } public override int MaxDPI() { return 36_000; } public override bool HasXYDPI() { return true; } public override bool HasDebounceSetting() { return true; } public override bool HasLiftOffSetting() { return true; } public override bool HasRGB() { return true; } public override LightingZone[] SupportedLightingZones() { return new LightingZone[] { LightingZone.Logo }; } public override bool IsLightingModeSupported(LightingMode lightingMode) { return lightingMode == LightingMode.Static || lightingMode == LightingMode.Breathing || lightingMode == LightingMode.ColorCycle || lightingMode == LightingMode.BatteryState || lightingMode == LightingMode.React; } public override bool HasAutoPowerOff() { return true; } public override bool HasAngleSnapping() { return true; } public override bool HasAngleTuning() { return true; } public override bool HasLowBatteryWarning() { return true; } public override bool HasDPIColors() { return true; } } public class KerisWirelssAimpointWired : KerisWirelssAimpoint { public KerisWirelssAimpointWired() : base(0x1A66, false) { } public override string GetDisplayName() { return "ROG Keris Wireless Aimpoint (Wired)"; } } public class KerisWirelssAimpointOmni : KerisWirelssAimpoint { public KerisWirelssAimpointOmni() : base(0x1ACE, true, "mi_02&col03", 0x03) { } public override string GetDisplayName() { return "Keris Wireless Aimpoint (OMNI)"; } public override int USBPacketSize() { return 64; } } } ================================================ FILE: app/Peripherals/Mouse/Models/Pugio.cs ================================================ namespace GHelper.Peripherals.Mouse.Models { //P503 public class Pugio : AsusMouse { public Pugio() : base(0x0B05, 0x1846, "mi_02", false) { } public override int DPIProfileCount() { return 2; } public override string GetDisplayName() { return "ROG Pugio"; } public override PollingRate[] SupportedPollingrates() { return new PollingRate[] { PollingRate.PR125Hz, PollingRate.PR250Hz, PollingRate.PR500Hz, PollingRate.PR1000Hz }; } public override int ProfileCount() { return 3; } public override int MaxDPI() { return 7_200; } public override int DPIIncrements() { return 50; } public override int MinDPI() { return 50; } public override bool HasLiftOffSetting() { return true; } public override bool HasRGB() { return true; } public override bool HasAngleSnapping() { return true; } public override bool CanChangeDPIProfile() { return true; } public override bool HasBattery() { return false; } public override bool HasAutoPowerOff() { return false; } //00 12 04 00 00 1f 00 07 00 [03] 00 02 00 00 00 protected override PollingRate ParsePollingRate(byte[] packet) { if (packet[1] == 0x12 && packet[2] == 0x04 && packet[3] == 0x00) { return (PollingRate)packet[9]; } return PollingRate.PR125Hz; } public override int MaxBrightness() { return 4; } public override LightingZone[] SupportedLightingZones() { return new LightingZone[] { LightingZone.Logo, LightingZone.Scrollwheel, LightingZone.Underglow }; } public override bool IsLightingModeSupported(LightingMode lightingMode) { return lightingMode == LightingMode.Static || lightingMode == LightingMode.Breathing || lightingMode == LightingMode.ColorCycle || lightingMode == LightingMode.Rainbow || lightingMode == LightingMode.React || lightingMode == LightingMode.Comet; } protected override byte[] GetUpdateLightingModePacket(LightingSetting lightingSetting, LightingZone zone) { // 00 51 28 03 00 00 04 00 ff 40 00 00 00 00 00 00 00 00 00 00 /* * This mouse uses different speed values for rainbow mode compared to others. * 00 51 28 03 00 03 04 FF 00 00 00 00 [8C] 00 00 00 00 * 00 51 28 03 00 03 04 FF 00 00 00 00 [64] 00 00 00 00 * 00 51 28 03 00 03 04 FF 00 00 00 00 [3F] 00 00 00 00 */ if (lightingSetting.LightingMode == LightingMode.Rainbow) { byte speed = 0x3F; switch (lightingSetting.AnimationSpeed) { case AnimationSpeed.Slow: speed = 0x3F; break; case AnimationSpeed.Medium: speed = 0x64; break; case AnimationSpeed.Fast: speed = 0x8C; break; } return new byte[] { reportId, 0x51, 0x28, (byte)zone, 0x00, IndexForLightingMode(lightingSetting.LightingMode), (byte)lightingSetting.Brightness, 0xFF, 0x00, 0x00, (byte)(SupportsAnimationDirection(lightingSetting.LightingMode) ? lightingSetting.AnimationDirection : 0x00), (byte)((lightingSetting.RandomColor && SupportsRandomColor(lightingSetting.LightingMode)) ? 0x01: 0x00), (byte)(SupportsAnimationSpeed(lightingSetting.LightingMode) ? speed : 0x00) }; } return base.GetUpdateLightingModePacket(lightingSetting, zone); } protected override byte[] GetReadLightingModePacket(LightingZone zone) { return new byte[] { 0x00, 0x12, 0x03, 0x00 }; } protected LightingSetting? ParseLightingSetting(byte[] packet, LightingZone zone) { if (packet[1] != 0x12 || packet[2] != 0x03) { return null; } int offset = 5 + (((int)zone) * 5); LightingSetting setting = new LightingSetting(); setting.LightingMode = LightingModeForIndex(packet[offset + 0]); setting.Brightness = packet[offset + 1]; setting.RGBColor = Color.FromArgb(packet[offset + 2], packet[offset + 3], packet[offset + 4]); return setting; } public override void ReadLightingSetting() { if (!HasRGB()) { return; } //Mouse sends all lighting zones in one response (0x19) Direction, Random col, Speed //00 12 03 00 00 [03 04 00 00 00] [03 04 00 00 00] [03 04 00 00 00] 01 [00] [00] [8c] 00 //00 12 03 00 00 [00 04 00 00 00] [00 04 00 00 00] [00 04 00 00 00] 01 [00] [00] [00] 00 byte[]? response = WriteForResponse(GetReadLightingModePacket(LightingZone.All)); if (response is null) return; LightingZone[] lz = SupportedLightingZones(); for (int i = 0; i < lz.Length; ++i) { LightingSetting? ls = ParseLightingSetting(response, lz[i]); if (ls is null) { Logger.WriteLine(GetDisplayName() + ": Failed to read RGB Setting for Zone " + lz[i].ToString()); continue; } ls.AnimationDirection = SupportsAnimationDirection(ls.LightingMode) ? (AnimationDirection)response[21] : AnimationDirection.Clockwise; ls.RandomColor = SupportsRandomColor(ls.LightingMode) && response[22] == 0x01; ls.AnimationSpeed = SupportsAnimationSpeed(ls.LightingMode) ? (AnimationSpeed)response[23] : AnimationSpeed.Medium; if (ls.AnimationSpeed != AnimationSpeed.Fast && ls.AnimationSpeed != AnimationSpeed.Medium && ls.AnimationSpeed != AnimationSpeed.Slow) { ls.AnimationSpeed = AnimationSpeed.Medium; } Logger.WriteLine(GetDisplayName() + ": Read RGB Setting for Zone " + lz[i].ToString() + ": " + ls.ToString()); LightingSetting[i] = ls; } } } } ================================================ FILE: app/Peripherals/Mouse/Models/PugioII.cs ================================================  namespace GHelper.Peripherals.Mouse.Models { //P705 public class PugioII : AsusMouse { public PugioII() : base(0x0B05, 0x1908, "mi_00", true) { } protected PugioII(ushort vendorId, bool wireless) : base(0x0B05, vendorId, "mi_00", wireless) { } public override int DPIProfileCount() { return 4; } public override string GetDisplayName() { return "ROG Pugio II (Wireless)"; } public override PollingRate[] SupportedPollingrates() { return new PollingRate[] { PollingRate.PR125Hz, PollingRate.PR250Hz, PollingRate.PR500Hz, PollingRate.PR1000Hz }; } public override int ProfileCount() { return 3; } public override int MaxDPI() { return 16_000; } public override bool HasDebounceSetting() { return true; } public override bool HasLiftOffSetting() { return true; } public override int DPIIncrements() { return 100; } public override bool HasRGB() { return true; } public override int MaxBrightness() { return 4; } public override LightingZone[] SupportedLightingZones() { return new LightingZone[] { LightingZone.Logo, LightingZone.Scrollwheel, LightingZone.Underglow }; } public override bool HasAutoPowerOff() { return true; } public override bool HasAngleSnapping() { return true; } public override bool HasAngleTuning() { return false; } public override bool HasLowBatteryWarning() { return true; } public override int LowBatteryWarningStep() { return 25; } public override int LowBatteryWarningMax() { return 100; } protected override int ParseBattery(byte[] packet) { return base.ParseBattery(packet) * 25; } protected override int ParseLowBatteryWarning(byte[] packet) { return base.ParseLowBatteryWarning(packet) * 25; } protected override byte[] GetUpdateEnergySettingsPacket(int lowBatteryWarning, PowerOffSetting powerOff) { return base.GetUpdateEnergySettingsPacket(lowBatteryWarning / 25, powerOff); } protected override byte[] GetReadLightingModePacket(LightingZone zone) { return new byte[] { 0x00, 0x12, 0x03, 0x00 }; } protected LightingSetting? ParseLightingSetting(byte[] packet, LightingZone zone) { if (packet[1] != 0x12 || packet[2] != 0x03) { return null; } int offset = 5 + (((int)zone) * 5); LightingSetting setting = new LightingSetting(); setting.LightingMode = LightingModeForIndex(packet[offset + 0]); setting.Brightness = packet[offset + 1]; setting.RGBColor = Color.FromArgb(packet[offset + 2], packet[offset + 3], packet[offset + 4]); setting.AnimationDirection = SupportsAnimationDirection(setting.LightingMode) ? (AnimationDirection)packet[21] : AnimationDirection.Clockwise; if (setting.AnimationDirection != AnimationDirection.Clockwise && setting.AnimationDirection != AnimationDirection.CounterClockwise) { setting.AnimationDirection = AnimationDirection.Clockwise; } setting.RandomColor = SupportsRandomColor(setting.LightingMode) && packet[22] == 0x01; setting.AnimationSpeed = SupportsAnimationSpeed(setting.LightingMode) ? (AnimationSpeed)packet[23] : AnimationSpeed.Medium; //If the mouse reports an out of range value, which it does when the current setting has no speed option, chose medium as default if (setting.AnimationSpeed != AnimationSpeed.Fast && setting.AnimationSpeed != AnimationSpeed.Medium && setting.AnimationSpeed != AnimationSpeed.Slow) { setting.AnimationSpeed = AnimationSpeed.Medium; } return setting; } public override void ReadLightingSetting() { if (!HasRGB()) { return; } //Mouse sends all lighting zones in one response //21: Direction //22: Random //23: Speed // 20 21 22 23 //00 12 03 00 00 [03 04 00 00 ff] [03 04 00 00 ff] [03 04 00 00 ff] 00 04 00 00 //00 12 03 00 00 [05 02 ff 00 ff] [05 02 ff 00 ff] [05 02 ff 00 ff] 00 01 01 00 //00 12 03 00 00 [03 01 00 00 ff] [03 01 00 00 ff] [03 01 00 00 ff] 00 01 00 01 byte[]? response = WriteForResponse(GetReadLightingModePacket(LightingZone.All)); if (response is null) return; LightingZone[] lz = SupportedLightingZones(); for (int i = 0; i < lz.Length; ++i) { LightingSetting? ls = ParseLightingSetting(response, lz[i]); if (ls is null) { Logger.WriteLine(GetDisplayName() + ": Failed to read RGB Setting for Zone " + lz[i].ToString()); continue; } Logger.WriteLine(GetDisplayName() + ": Read RGB Setting for Zone " + lz[i].ToString() + ": " + ls.ToString()); LightingSetting[i] = ls; } } public override bool CanChangeDPIProfile() { return false; } } public class PugioIIWired : PugioII { public PugioIIWired() : base(0x1906, false) { } public override string GetDisplayName() { return "ROG Pugio II (Wired)"; } } } ================================================ FILE: app/Peripherals/Mouse/Models/SpathaX.cs ================================================  namespace GHelper.Peripherals.Mouse.Models { //SPATHA_WIRELESS public class SpathaX : AsusMouse { public SpathaX() : base(0x0B05, 0x1979, "mi_00", true) { } protected SpathaX(ushort vendorId, bool wireless) : base(0x0B05, vendorId, "mi_00", wireless) { } public override string GetDisplayName() { return "ROG Spatha X (Wireless)"; } public override PollingRate[] SupportedPollingrates() { return new PollingRate[] { PollingRate.PR250Hz, PollingRate.PR500Hz, PollingRate.PR1000Hz }; } public override bool HasAngleSnapping() { return true; } public override int ProfileCount() { return 5; } public override int DPIProfileCount() { return 4; } public override int MaxDPI() { return 19_000; } public override bool HasXYDPI() { return false; } public override bool HasDebounceSetting() { return false; } public override bool HasLiftOffSetting() { return true; } public override bool HasRGB() { return true; } public override LightingZone[] SupportedLightingZones() { return new LightingZone[] { LightingZone.Logo, LightingZone.Scrollwheel, LightingZone.Underglow }; } public override bool HasAutoPowerOff() { return true; } public override bool HasAngleTuning() { return false; } public override bool HasLowBatteryWarning() { return true; } public override bool HasDPIColors() { return true; } } public class SpathaXWired : SpathaX { public SpathaXWired() : base(0x1977, false) { } public override string GetDisplayName() { return "ROG Spatha X (Wired)"; } } } ================================================ FILE: app/Peripherals/Mouse/Models/StrixCarry.cs ================================================ namespace GHelper.Peripherals.Mouse.Models { //P508 public class StrixCarry : AsusMouse { public StrixCarry() : base(0x0B05, 0x18B4, "mi_01", true) { } public override int DPIProfileCount() { return 2; } public override string GetDisplayName() { return "ROG Strix Carry (Wireless)"; } public override PollingRate[] SupportedPollingrates() { return new PollingRate[] { PollingRate.PR125Hz, PollingRate.PR250Hz, PollingRate.PR500Hz, PollingRate.PR1000Hz }; } public override int ProfileCount() { return 3; } public override int MaxDPI() { return 7_200; } public override int DPIIncrements() { return 50; } public override int MinDPI() { return 50; } public override bool HasDebounceSetting() { return true; } public override bool HasLiftOffSetting() { //Potentially does nothing. AC does not show the setting, but the mouse responds to it and stores it. return true; } public override bool HasRGB() { return false; } public override bool HasAutoPowerOff() { return true; } public override bool HasAngleSnapping() { return true; } public override bool HasXYDPI() { return false; } public override bool CanChangeDPIProfile() { return false; } //Has 25% increments only. protected override int ParseBattery(byte[] packet) { if (packet[1] == 0x12 && packet[2] == 0x07) { return packet[7] * 25; } return -1; } protected override PowerOffSetting ParsePowerOffSetting(byte[] packet) { if (packet[1] == 0x12 && packet[2] == 0x07) { return (PowerOffSetting)packet[5]; } return PowerOffSetting.Never; } protected override PollingRate ParsePollingRate(byte[] packet) { if (packet[1] == 0x12 && packet[2] == 0x04 && packet[3] == 0x00) { return (PollingRate)packet[9]; } return PollingRate.PR125Hz; } protected override byte[] GetUpdatePollingRatePacket(PollingRate pollingRate) { return new byte[] { reportId, 0x51, 0x31, 0x02, 0x00, (byte)pollingRate }; } protected override bool ParseAngleSnapping(byte[] packet) { if (packet[1] == 0x12 && packet[2] == 0x04 && packet[3] == 0x00) { return packet[13] == 0x01; } return false; } protected override byte[] GetUpdateAngleSnappingPacket(bool angleSnapping) { return new byte[] { reportId, 0x51, 0x31, 0x04, 0x00, (byte)(angleSnapping ? 0x01 : 0x00) }; } protected override DebounceTime ParseDebounce(byte[] packet) { if (packet[1] != 0x12 || packet[2] != 0x04 || packet[3] != 0x00) { return DebounceTime.MS12; } if (packet[11] < 0x02) { return DebounceTime.MS12; } if (packet[11] > 0x07) { return DebounceTime.MS32; } return (DebounceTime)packet[11]; } protected override byte[] GetUpdateDebouncePacket(DebounceTime debounce) { return new byte[] { reportId, 0x51, 0x31, 0x03, 0x00, ((byte)debounce) }; } protected override int ParseProfile(byte[] packet) { if (packet[1] == 0x12 && packet[2] == 0x00 && packet[3] == 0x00) { return packet[10]; } Logger.WriteLine(GetDisplayName() + ": Failed to decode active profile"); return 0; } protected override int ParseDPIProfile(byte[] packet) { if (packet[1] == 0x12 && packet[2] == 0x00 && packet[3] == 0x00) { return packet[11]; } Logger.WriteLine(GetDisplayName() + ": Failed to decode active profile"); return 1; } protected override byte[] GetUpdateEnergySettingsPacket(int lowBatteryWarning, PowerOffSetting powerOff) { return new byte[] { 0x00, 0x51, 0x37, 0x00, 0x00, (byte)powerOff, 0x00, (byte)lowBatteryWarning }; } } } ================================================ FILE: app/Peripherals/Mouse/Models/StrixEvolve.cs ================================================ namespace GHelper.Peripherals.Mouse.Models { public class StrixEvolve : AsusMouse { public StrixEvolve() : base(0x0B05, 0x185B, "mi_00", false) { } public override int DPIProfileCount() { return 2; } public override string GetDisplayName() { return "Strix Evolve"; } public override PollingRate[] SupportedPollingrates() { return new PollingRate[] { PollingRate.PR125Hz, PollingRate.PR250Hz, PollingRate.PR500Hz, PollingRate.PR1000Hz }; } public override int ProfileCount() { return 2; } public override int MaxDPI() { return 7_200; } public override bool HasRGB() { return true; } public override bool HasAutoPowerOff() { return false; } public override bool HasDebounceSetting() { return true; } public override bool HasLowBatteryWarning() { return false; } public override bool HasBattery() { return false; } public override bool HasDPIColors() { return false; } public override bool IsLightingModeSupported(LightingMode lightingMode) { return lightingMode == LightingMode.Static || lightingMode == LightingMode.Breathing || lightingMode == LightingMode.ColorCycle || lightingMode == LightingMode.React; } public override LightingZone[] SupportedLightingZones() { return new LightingZone[] { LightingZone.Logo }; } public override int DPIIncrements() { return 100; } public override int MinDPI() { return 50; } public override bool CanChangeDPIProfile() { return true; } public override int MaxBrightness() { return 4; } public override bool HasLiftOffSetting() { return true; } public override bool HasAngleSnapping() { return true; } } } ================================================ FILE: app/Peripherals/Mouse/Models/StrixImpact.cs ================================================ namespace GHelper.Peripherals.Mouse.Models { //P303 public class StrixImpact : AsusMouse { public StrixImpact() : base(0x0B05, 0x1847, "mi_02", false) { } public StrixImpact(ushort productId, string path) : base(0x0B05, productId, path, false) { } public override int DPIProfileCount() { return 2; } public override string GetDisplayName() { return "Strix Impact"; } public override PollingRate[] SupportedPollingrates() { return new PollingRate[] { PollingRate.PR125Hz, PollingRate.PR250Hz, PollingRate.PR500Hz, PollingRate.PR1000Hz }; } public override int ProfileCount() { return 1; } public override int MaxDPI() { return 5_000; } public override bool HasRGB() { return true; } public override bool HasAutoPowerOff() { return false; } public override bool HasDebounceSetting() { return true; } public override bool HasLowBatteryWarning() { return false; } public override bool HasBattery() { return false; } public override bool HasDPIColors() { return false; } public override bool IsLightingModeSupported(LightingMode lightingMode) { return lightingMode == LightingMode.Static || lightingMode == LightingMode.Breathing || lightingMode == LightingMode.ColorCycle || lightingMode == LightingMode.React; } public override LightingZone[] SupportedLightingZones() { return new LightingZone[] { LightingZone.Logo }; } public override int DPIIncrements() { return 50; } public override bool CanChangeDPIProfile() { return true; } public override int MaxBrightness() { return 4; } protected override byte[] GetUpdateLightingModePacket(LightingSetting lightingSetting, LightingZone zone) { /* * 51 28 00 00 [00] [04] [35 04 FF] 00 00 00 00 00 00 00 */ return new byte[] { reportId, 0x51, 0x28, 0x00, 0x00, IndexForLightingMode(lightingSetting.LightingMode), (byte)lightingSetting.Brightness, lightingSetting.RGBColor.R, lightingSetting.RGBColor.G, lightingSetting.RGBColor.B }; } protected override byte[] GetReadLightingModePacket(LightingZone zone) { return new byte[] { 0x00, 0x12, 0x03, 0x00 }; } protected LightingSetting? ParseLightingSetting(byte[] packet, LightingZone zone) { if (packet[1] != 0x12 || packet[2] != 0x03) { return null; } int offset = 5 + (((int)zone) * 5); LightingSetting setting = new LightingSetting(); setting.LightingMode = LightingModeForIndex(packet[offset + 0]); setting.Brightness = packet[offset + 1]; setting.RGBColor = Color.FromArgb(packet[offset + 2], packet[offset + 3], packet[offset + 4]); return setting; } public override void ReadLightingSetting() { if (!HasRGB()) { return; } //Mouse sends all lighting zones in one response Direction, Random col, Speed //00 12 03 00 00 [00 04 ff 00 80] [00 04 00 ff ff] [00 04 ff ff ff] 00 [00] [00] [00] 00 00 //00 12 03 00 00 [03 04 00 00 00] [03 04 00 00 00] [03 04 00 00 00] 00 [00] [00] [07] 00 00 byte[]? response = WriteForResponse(GetReadLightingModePacket(LightingZone.All)); if (response is null) return; LightingZone[] lz = SupportedLightingZones(); for (int i = 0; i < lz.Length; ++i) { LightingSetting? ls = ParseLightingSetting(response, lz[i]); if (ls is null) { Logger.WriteLine(GetDisplayName() + ": Failed to read RGB Setting for Zone " + lz[i].ToString()); continue; } ls.AnimationDirection = SupportsAnimationDirection(ls.LightingMode) ? (AnimationDirection)response[21] : AnimationDirection.Clockwise; ls.RandomColor = SupportsRandomColor(ls.LightingMode) && response[22] == 0x01; ls.AnimationSpeed = SupportsAnimationSpeed(ls.LightingMode) ? (AnimationSpeed)response[23] : AnimationSpeed.Medium; if (ls.AnimationSpeed != AnimationSpeed.Fast && ls.AnimationSpeed != AnimationSpeed.Medium && ls.AnimationSpeed != AnimationSpeed.Slow) { ls.AnimationSpeed = AnimationSpeed.Medium; } Logger.WriteLine(GetDisplayName() + ": Read RGB Setting for Zone " + lz[i].ToString() + ": " + ls.ToString()); LightingSetting[i] = ls; } } protected override PollingRate ParsePollingRate(byte[] packet) { if (packet[1] == 0x12 && packet[2] == 0x04 && packet[3] == 0x00) { return (PollingRate)packet[9]; } return PollingRate.PR125Hz; } protected override byte[] GetUpdatePollingRatePacket(PollingRate pollingRate) { return new byte[] { reportId, 0x51, 0x31, 0x02, 0x00, (byte)pollingRate }; } protected override bool ParseAngleSnapping(byte[] packet) { if (packet[1] == 0x12 && packet[2] == 0x04 && packet[3] == 0x00) { return packet[13] == 0x01; } return false; } protected override byte[] GetUpdateAngleSnappingPacket(bool angleSnapping) { return new byte[] { reportId, 0x51, 0x31, 0x04, 0x00, (byte)(angleSnapping ? 0x01 : 0x00) }; } protected override DebounceTime ParseDebounce(byte[] packet) { if (packet[1] != 0x12 || packet[2] != 0x04 || packet[3] != 0x00) { return DebounceTime.MS12; } if (packet[11] < 0x02) { return DebounceTime.MS12; } if (packet[11] > 0x07) { return DebounceTime.MS32; } return (DebounceTime)packet[11]; } protected override byte[] GetUpdateDebouncePacket(DebounceTime debounce) { return new byte[] { reportId, 0x51, 0x31, 0x03, 0x00, ((byte)debounce) }; } } } ================================================ FILE: app/Peripherals/Mouse/Models/StrixImpactII.cs ================================================ namespace GHelper.Peripherals.Mouse.Models { //P506 public class StrixImpactII : AsusMouse { public StrixImpactII() : base(0x0B05, 0x18E1, "mi_00", false) { } public StrixImpactII(ushort pid) : base(0x0B05, pid, "mi_00", false) { } public override int DPIProfileCount() { return 4; } public override string GetDisplayName() { return "ROG Strix Impact II"; } public override PollingRate[] SupportedPollingrates() { return new PollingRate[] { PollingRate.PR125Hz, PollingRate.PR250Hz, PollingRate.PR500Hz, PollingRate.PR1000Hz }; } public override int ProfileCount() { return 3; } public override int MaxDPI() { return 6_200; } public override bool HasRGB() { return true; } public override bool HasAutoPowerOff() { return false; } public override bool HasAngleSnapping() { return true; } public override bool HasAngleTuning() { return false; } public override bool HasDebounceSetting() { return true; } public override bool HasLowBatteryWarning() { return false; } public override bool HasBattery() { return false; } public override bool HasDPIColors() { return false; } public override bool IsLightingModeSupported(LightingMode lightingMode) { return lightingMode == LightingMode.Static || lightingMode == LightingMode.Breathing || lightingMode == LightingMode.ColorCycle || lightingMode == LightingMode.React; } public override LightingZone[] SupportedLightingZones() { return new LightingZone[] { LightingZone.Logo, LightingZone.Scrollwheel, LightingZone.Underglow }; } public override int DPIIncrements() { return 100; } public override bool CanChangeDPIProfile() { return true; } public override int MaxBrightness() { return 4; } protected override byte IndexForLightingMode(LightingMode lightingMode) { if (lightingMode == LightingMode.React) { return 0x03; } return ((byte)lightingMode); } protected override LightingMode LightingModeForIndex(byte lightingMode) { if (lightingMode == 0x03) { return LightingMode.React; } return base.LightingModeForIndex(lightingMode); } protected override byte[] GetReadLightingModePacket(LightingZone zone) { return new byte[] { 0x00, 0x12, 0x03, 0x00 }; } protected LightingSetting? ParseLightingSetting(byte[] packet, LightingZone zone) { if (packet[1] != 0x12 || packet[2] != 0x03) { return null; } int offset = 5 + (((int)zone) * 5); LightingSetting setting = new LightingSetting(); setting.LightingMode = LightingModeForIndex(packet[offset + 0]); setting.Brightness = packet[offset + 1]; setting.RGBColor = Color.FromArgb(packet[offset + 2], packet[offset + 3], packet[offset + 4]); return setting; } public override void ReadLightingSetting() { if (!HasRGB()) { return; } //Mouse sends all lighting zones in one response //00 12 03 00 00 [00 04 ff 00 80] [00 04 00 ff ff] [00 04 ff ff ff] 00 00 00 00 00 00 00 00 00 00 00 00 00 0 byte[]? response = WriteForResponse(GetReadLightingModePacket(LightingZone.All)); if (response is null) return; LightingZone[] lz = SupportedLightingZones(); for (int i = 0; i < lz.Length; ++i) { LightingSetting? ls = ParseLightingSetting(response, lz[i]); if (ls is null) { Logger.WriteLine(GetDisplayName() + ": Failed to read RGB Setting for Zone " + lz[i].ToString()); continue; } Logger.WriteLine(GetDisplayName() + ": Read RGB Setting for Zone " + lz[i].ToString() + ": " + ls.ToString()); LightingSetting[i] = ls; } } } public class StrixImpactIIElectroPunk : StrixImpactII { public StrixImpactIIElectroPunk() : base(0x1956) { } public override string GetDisplayName() { return "ROG Strix Impact II Electro Punk"; } } } ================================================ FILE: app/Peripherals/Mouse/Models/StrixImpactIII.cs ================================================ namespace GHelper.Peripherals.Mouse.Models { //P518 public class StrixImpactIII : AsusMouse { public StrixImpactIII() : base(0x0B05, 0x1A88, "mi_00", false) { } public override int DPIProfileCount() { return 4; } public override string GetDisplayName() { return "ROG Strix Impact III"; } public override PollingRate[] SupportedPollingrates() { return new PollingRate[] { PollingRate.PR125Hz, PollingRate.PR250Hz, PollingRate.PR500Hz, PollingRate.PR1000Hz }; } public override int ProfileCount() { return 3; } public override int MaxDPI() { return 12_000; } public override bool HasRGB() { return true; } public override LightingZone[] SupportedLightingZones() { return new LightingZone[] { LightingZone.Logo, LightingZone.Scrollwheel }; } public override bool IsLightingModeSupported(LightingMode lightingMode) { return lightingMode == LightingMode.Static || lightingMode == LightingMode.Breathing || lightingMode == LightingMode.ColorCycle || lightingMode == LightingMode.React || lightingMode == LightingMode.Off; } public override bool HasBattery() { return false; } public override bool HasAngleSnapping() { return true; } public override bool HasLowBatteryWarning() { return false; } } } ================================================ FILE: app/Peripherals/Mouse/Models/StrixImpactIIIWireless.cs ================================================ namespace GHelper.Peripherals.Mouse.Models { //P520 public class StrixImpactIIIWirelessOmni : AsusMouse { public StrixImpactIIIWirelessOmni() : base(0x0B05, 0x1ACE, "mi_02&col03", true, 0x03) { } public override int DPIProfileCount() { return 4; } public override string GetDisplayName() { return "Strix Impact III Wireless (OMNI)"; } public override PollingRate[] SupportedPollingrates() { return new PollingRate[] { PollingRate.PR125Hz, PollingRate.PR250Hz, PollingRate.PR500Hz, PollingRate.PR1000Hz }; } public override int ProfileCount() { return 5; } public override int MaxDPI() { return 36_000; } public override bool HasXYDPI() { return true; } public override bool HasLiftOffSetting() { return true; } public override bool HasRGB() { return true; } public override LightingZone[] SupportedLightingZones() { return new LightingZone[] { LightingZone.Scrollwheel }; } public override bool IsLightingModeSupported(LightingMode lightingMode) { return lightingMode == LightingMode.Static || lightingMode == LightingMode.Breathing || lightingMode == LightingMode.ColorCycle || lightingMode == LightingMode.React || lightingMode == LightingMode.BatteryState || lightingMode == LightingMode.Off; } public override bool HasAutoPowerOff() { return true; } public override bool HasAngleSnapping() { return true; } public override bool HasAngleTuning() { return true; } public override bool HasLowBatteryWarning() { return true; } public override bool HasDPIColors() { return true; } public override int AngleTuningStep() { return 5; } public override int USBPacketSize() { return 64; } } } ================================================ FILE: app/Peripherals/Mouse/Models/StrixImpactIIWireless.cs ================================================ namespace GHelper.Peripherals.Mouse.Models { //P513 public class StrixImpactIIWireless : AsusMouse { public StrixImpactIIWireless() : base(0x0B05, 0x1949, "mi_00", true) { } protected StrixImpactIIWireless(ushort vendorId, bool wireless) : base(0x0B05, vendorId, "mi_00", wireless) { } public override int DPIProfileCount() { return 4; } public override string GetDisplayName() { return "ROG Strix Impact II (Wireless)"; } public override PollingRate[] SupportedPollingrates() { return new PollingRate[] { PollingRate.PR125Hz, PollingRate.PR250Hz, PollingRate.PR500Hz, PollingRate.PR1000Hz }; } public override int ProfileCount() { return 3; } public override int MaxDPI() { return 16_000; } public override bool HasLiftOffSetting() { return true; } public override bool HasRGB() { return true; } public override bool HasAutoPowerOff() { return true; } public override bool HasAngleSnapping() { return true; } public override bool HasAngleTuning() { return false; } public override bool HasLowBatteryWarning() { return true; } public override bool HasDPIColors() { return false; } public override bool IsLightingModeSupported(LightingMode lightingMode) { return lightingMode == LightingMode.Static || lightingMode == LightingMode.Breathing || lightingMode == LightingMode.ColorCycle || lightingMode == LightingMode.React || lightingMode == LightingMode.BatteryState || lightingMode == LightingMode.Off; } public override LightingZone[] SupportedLightingZones() { return new LightingZone[] { LightingZone.Logo, LightingZone.Scrollwheel }; } //Has 25% increments protected override int ParseBattery(byte[] packet) { if (packet[1] == 0x12 && packet[2] == 0x07) { return packet[5] * 25; } return -1; } public override int DPIIncrements() { return 100; } public override bool CanChangeDPIProfile() { return false; } protected override byte[] GetUpdateEnergySettingsPacket(int lowBatteryWarning, PowerOffSetting powerOff) { return base.GetUpdateEnergySettingsPacket(lowBatteryWarning / 25, powerOff); } protected override int ParseLowBatteryWarning(byte[] packet) { int lowBat = base.ParseLowBatteryWarning(packet); return lowBat * 25; } protected override LiftOffDistance ParseLiftOffDistance(byte[] packet) { if (packet[1] != 0x12 || packet[2] != 0x06) { return LiftOffDistance.Low; } return (LiftOffDistance)packet[5]; } protected override byte[] GetUpdateLiftOffDistancePacket(LiftOffDistance liftOffDistance) { return new byte[] { 0x00, 0x51, 0x35, 0x00, 0x00, ((byte)liftOffDistance) }; } public override int MaxBrightness() { return 4; } public override bool HasDebounceSetting() { return true; } protected override byte IndexForLightingMode(LightingMode lightingMode) { if (lightingMode == LightingMode.Off) { return 0xFF; } return ((byte)lightingMode); } protected override byte[] GetReadLightingModePacket(LightingZone zone) { return new byte[] { 0x00, 0x12, 0x03, 0x00 }; } protected LightingSetting? ParseLightingSetting(byte[] packet, LightingZone zone) { if (packet[1] != 0x12 || packet[2] != 0x03) { return null; } int offset = 5 + (((int)zone) * 5); LightingSetting setting = new LightingSetting(); setting.LightingMode = LightingModeForIndex(packet[offset + 0]); setting.Brightness = packet[offset + 1]; setting.RGBColor = Color.FromArgb(packet[offset + 2], packet[offset + 3], packet[offset + 4]); return setting; } public override void ReadLightingSetting() { if (!HasRGB()) { return; } //Mouse sends all lighting zones in one response //00 12 03 00 00 [00 04 ff 00 80] [00 04 00 ff ff] [00 04 ff ff ff] 00 00 00 00 00 00 00 00 00 00 00 00 00 0 //No idea what the 3rd zone is as the mouse only has 2 byte[]? response = WriteForResponse(GetReadLightingModePacket(LightingZone.All)); if (response is null) return; LightingZone[] lz = SupportedLightingZones(); for (int i = 0; i < lz.Length; ++i) { LightingSetting? ls = ParseLightingSetting(response, lz[i]); if (ls is null) { Logger.WriteLine(GetDisplayName() + ": Failed to read RGB Setting for Zone " + lz[i].ToString()); continue; } Logger.WriteLine(GetDisplayName() + ": Read RGB Setting for Zone " + lz[i].ToString() + ": " + ls.ToString()); LightingSetting[i] = ls; } } } public class StrixImpactIIWirelessWired : StrixImpactIIWireless { public StrixImpactIIWirelessWired() : base(0x1947, false) { } public override string GetDisplayName() { return "ROG Strix Impact II (Wired)"; } } } ================================================ FILE: app/Peripherals/Mouse/Models/TUFM3.cs ================================================ namespace GHelper.Peripherals.Mouse.Models { //P306_Wireless public class TUFM3 : AsusMouse { public TUFM3() : base(0x0B05, 0x1910, "mi_01", false) { } public TUFM3(ushort productId, string path) : base(0x0B05, productId, path, false) { } public override int DPIProfileCount() { return 4; } public override string GetDisplayName() { return "TUF GAMING M3"; } public override PollingRate[] SupportedPollingrates() { return new PollingRate[] { PollingRate.PR125Hz, PollingRate.PR250Hz, PollingRate.PR500Hz, PollingRate.PR1000Hz }; } //Mouse has React mapped to 0x03 instead of 0x04 like other mice protected override byte IndexForLightingMode(LightingMode lightingMode) { if (lightingMode == LightingMode.React) { return 0x03; } return ((byte)lightingMode); } //Mouse has React mapped to 0x03 instead of 0x04 like other mice protected override LightingMode LightingModeForIndex(byte lightingMode) { if (lightingMode == 0x03) { return LightingMode.React; } return base.LightingModeForIndex(lightingMode); } public override int ProfileCount() { return 1; } public override int MaxDPI() { return 7_000; } public override bool HasBattery() { return false; } public override bool HasLiftOffSetting() { return false; } public override LightingZone[] SupportedLightingZones() { return new LightingZone[] { LightingZone.Logo }; } public override bool HasRGB() { return true; } public override bool HasAngleSnapping() { return true; } public override int DPIIncrements() { return 100; } public override bool CanChangeDPIProfile() { return true; } public override bool HasDebounceSetting() { return true; } public override int MaxBrightness() { return 4; } public override bool IsLightingModeSupported(LightingMode lightingMode) { return lightingMode == LightingMode.Static || lightingMode == LightingMode.Breathing || lightingMode == LightingMode.ColorCycle || lightingMode == LightingMode.React; } } public class TUFM3GenII : TUFM3 { public TUFM3GenII() : base(0x1A9B, "mi_02") { } public override string GetDisplayName() { return "TUF GAMING M3 (Gen II)"; } public override int MaxBrightness() { return 100; } public override int MaxDPI() { return 8_000; } public override int MinDPI() { return 100; } public override int DPIIncrements() { return 50; } public override bool HasDPIColors() { return true; } protected override int ParseDPIProfile(byte[] packet) { return base.ParseDPIProfile(packet) + 1; } protected override byte[] GetChangeDPIProfilePacket(int profile) { return new byte[] { reportId, 0x51, 0x31, 0x0A, 0x00, 0x04 }; } protected override byte[] GetChangeDPIProfilePacket2(int profile) { return new byte[] { reportId, 0x51, 0x31, 0x09, 0x00, (byte)(profile - 1) }; } } } ================================================ FILE: app/Peripherals/Mouse/Models/TUFM4Air.cs ================================================ namespace GHelper.Peripherals.Mouse.Models { //P307 public class TUFM4Air : AsusMouse { public TUFM4Air() : base(0x0B05, 0x1A03, "mi_00", false) { } public override int DPIProfileCount() { return 4; } public override string GetDisplayName() { return "TUF GAMING M4 Air"; } public override PollingRate[] SupportedPollingrates() { return new PollingRate[] { PollingRate.PR125Hz, PollingRate.PR250Hz, PollingRate.PR500Hz, PollingRate.PR1000Hz }; } public override int ProfileCount() { return 3; } public override int MaxDPI() { return 16_000; } public override bool HasLiftOffSetting() { return true; } public override bool HasAngleSnapping() { return true; } public override bool HasAngleTuning() { return false; } public override bool HasBattery() { return false; } public override int DPIIncrements() { return 100; } } } ================================================ FILE: app/Peripherals/Mouse/Models/TUFM4Wireless.cs ================================================ namespace GHelper.Peripherals.Mouse.Models { //P306_Wireless public class TUFM4Wirelss : AsusMouse { public TUFM4Wirelss() : base(0x0B05, 0x19F4, "mi_00", true) { } public TUFM4Wirelss(ushort productId, bool wireless) : base(0x0B05, productId, "mi_00", wireless) { } public override int DPIProfileCount() { return 4; } public override string GetDisplayName() { return "TUF GAMING M4 (Wireless)"; } public override PollingRate[] SupportedPollingrates() { return new PollingRate[] { PollingRate.PR125Hz, PollingRate.PR250Hz, PollingRate.PR500Hz, PollingRate.PR1000Hz }; } public override int ProfileCount() { return 3; } public override int MaxDPI() { return 12_000; } public override bool HasLiftOffSetting() { return false; } public override bool HasDebounceSetting() { return true; } public override bool HasAutoPowerOff() { return true; } public override bool HasAngleSnapping() { return true; } public override bool HasAngleTuning() { return false; } public override bool HasLowBatteryWarning() { return true; } public override bool HasDPIColors() { return false; } public override int DPIIncrements() { return 100; } public override bool CanChangeDPIProfile() { return true; } } //P310 public class TUFM4WirelssCN : TUFM4Wirelss { public TUFM4WirelssCN() : base(0x1A8D, true) { } public override string GetDisplayName() { return "TX GAMING MOUSE (Wireless)"; } } //P519_Wireless public class TXGamingMini : TUFM4Wirelss { public TXGamingMini() : base(0x1AF5, true) { } public TXGamingMini(ushort productId, bool wireless) : base(productId, wireless) { } public override int DPIIncrements() { return 50; } public override string GetDisplayName() { return "TX GAMING MOUSE Mini (Wireless)"; } public override bool HasXYDPI() { return true; } } //P519_Wired public class TXGamingMiniWired : TXGamingMini { public TXGamingMiniWired() : base(0x1AF3, false) { } public override int DPIIncrements() { return 50; } public override string GetDisplayName() { return "TX GAMING MOUSE Mini (Wired)"; } } } ================================================ FILE: app/Peripherals/Mouse/Models/TUFM5.cs ================================================ namespace GHelper.Peripherals.Mouse.Models { //P304 public class TUFM5 : AsusMouse { public TUFM5() : base(0x0B05, 0x1898, "mi_02", false) { } public override int DPIProfileCount() { return 2; } public override string GetDisplayName() { return "TUF GAMING M5"; } public override PollingRate[] SupportedPollingrates() { return new PollingRate[] { PollingRate.PR125Hz, PollingRate.PR250Hz, PollingRate.PR500Hz, PollingRate.PR1000Hz }; } //Mouse has React mapped to 0x03 instead of 0x04 like other mice protected override byte IndexForLightingMode(LightingMode lightingMode) { if (lightingMode == LightingMode.React) { return 0x03; } return ((byte)lightingMode); } //Mouse has React mapped to 0x03 instead of 0x04 like other mice protected override LightingMode LightingModeForIndex(byte lightingMode) { if (lightingMode == 0x03) { return LightingMode.React; } return base.LightingModeForIndex(lightingMode); } public override int ProfileCount() { return 3; } public override int MaxDPI() { return 6_200; } public override bool HasBattery() { return false; } public override bool HasLiftOffSetting() { return false; } public override LightingZone[] SupportedLightingZones() { return new LightingZone[] { LightingZone.Logo }; } public override bool HasRGB() { return true; } public override bool HasAngleSnapping() { return true; } public override int DPIIncrements() { return 100; } public override bool CanChangeDPIProfile() { return true; } public override bool HasDebounceSetting() { return true; } public override int MaxBrightness() { return 4; } public override bool IsLightingModeSupported(LightingMode lightingMode) { return lightingMode == LightingMode.Static || lightingMode == LightingMode.Breathing || lightingMode == LightingMode.ColorCycle || lightingMode == LightingMode.React; } protected override byte[] GetUpdatePollingRatePacket(PollingRate pollingRate) { return new byte[] { reportId, 0x51, 0x31, 0x02, 0x00, (byte)pollingRate }; } protected override byte[] GetUpdateAngleSnappingPacket(bool angleSnapping) { return new byte[] { reportId, 0x51, 0x31, 0x04, 0x00, (byte)(angleSnapping ? 0x01 : 0x00) }; } protected override PollingRate ParsePollingRate(byte[] packet) { if (packet[1] == 0x12 && packet[2] == 0x04 && packet[3] == 0x00) { return (PollingRate)packet[9]; } return PollingRate.PR125Hz; } protected override bool ParseAngleSnapping(byte[] packet) { if (packet[1] == 0x12 && packet[2] == 0x04 && packet[3] == 0x00) { return packet[13] == 0x01; } return false; } protected override byte[] GetUpdateDebouncePacket(DebounceTime debounce) { return new byte[] { reportId, 0x51, 0x31, 0x03, 0x00, ((byte)debounce) }; } protected override DebounceTime ParseDebounce(byte[] packet) { if (packet[1] != 0x12 || packet[2] != 0x04 || packet[3] != 0x00) { return DebounceTime.MS12; } if (packet[11] < 0x02) { return DebounceTime.MS12; } if (packet[11] > 0x07) { return DebounceTime.MS32; } return (DebounceTime)packet[11]; } } } ================================================ FILE: app/Peripherals/PeripheralsProvider.cs ================================================ using GHelper.Peripherals.Mouse; using GHelper.Peripherals.Mouse.Models; using HidSharp; using System.IO; using System.Runtime.CompilerServices; using System.Text; namespace GHelper.Peripherals { public class PeripheralsProvider { private static readonly object _LOCK = new object(); public static List ConnectedMice = new List(); public static event EventHandler? DeviceChanged; private static System.Timers.Timer timer = new System.Timers.Timer(1000); static PeripheralsProvider() { timer.Elapsed += DeviceTimer_Elapsed; } private static long lastRefresh; public static bool IsMouseConnected() { lock (_LOCK) { return ConnectedMice.Count > 0; } } public static bool IsDeviceConnected(IPeripheral peripheral) { return AllPeripherals().Contains(peripheral); } //Expand if keyboards or other device get supported later. public static bool IsAnyPeripheralConnect() { return IsMouseConnected(); } public static List AllPeripherals() { List l = new List(); lock (_LOCK) { l.AddRange(ConnectedMice); } return l; } public static void RefreshBatteryForAllDevices() { RefreshBatteryForAllDevices(false); } public static void RefreshBatteryForAllDevices(bool force) { //Polling the battery every 20s should be enough if (!force && Math.Abs(DateTimeOffset.Now.ToUnixTimeMilliseconds() - lastRefresh) < 20_000) return; lastRefresh = DateTimeOffset.Now.ToUnixTimeMilliseconds(); List l = AllPeripherals(); foreach (IPeripheral m in l) { if (!m.IsDeviceReady) { //Try to sync the device if that hasn't been done yet m.SynchronizeDevice(); } else { m.ReadBattery(); } } } public static void Disconnect(AsusMouse am) { lock (_LOCK) { am.Disconnect -= Mouse_Disconnect; am.MouseReadyChanged -= MouseReadyChanged; am.BatteryUpdated -= BatteryUpdated; ConnectedMice.Remove(am); } if (DeviceChanged is not null) { DeviceChanged(am, EventArgs.Empty); } } public static void Connect(AsusMouse am) { if (IsDeviceConnected(am)) { //Mouse already connected; return; } try { am.Connect(); } catch (IOException e) { Logger.WriteLine(am.GetDisplayName() + " failed to connect to device: " + e); return; } //The Mouse might needs a few ms to register all its subdevices or the sync will fail. //Retry 3 times. Do not call this on main thread! It would block the UI int tries = 0; while (!am.IsDeviceReady && tries < 3) { Thread.Sleep(250); Logger.WriteLine(am.GetDisplayName() + " synchronising. Try " + (tries + 1)); am.SynchronizeDevice(); ++tries; } lock (_LOCK) { ConnectedMice.Add(am); } Logger.WriteLine(am.GetDisplayName() + " added to the list: " + ConnectedMice.Count + " device are conneted."); am.Disconnect += Mouse_Disconnect; am.MouseReadyChanged += MouseReadyChanged; am.BatteryUpdated += BatteryUpdated; if (DeviceChanged is not null) { DeviceChanged(am, EventArgs.Empty); } UpdateSettingsView(); } private static void BatteryUpdated(object? sender, EventArgs e) { UpdateSettingsView(); } private static void MouseReadyChanged(object? sender, EventArgs e) { UpdateSettingsView(); } private static void Mouse_Disconnect(object? sender, EventArgs e) { if (sender is null) { return; } AsusMouse am = (AsusMouse)sender; lock (_LOCK) { ConnectedMice.Remove(am); } Logger.WriteLine(am.GetDisplayName() + " reported disconnect. " + ConnectedMice.Count + " device are conneted."); am.Dispose(); UpdateSettingsView(); } private static void UpdateSettingsView() { Program.settingsForm.Invoke(delegate { Program.settingsForm.VisualizePeripherals(); }); } [MethodImpl(MethodImplOptions.Synchronized)] public static void DetectAllAsusMice() { //Add one line for every supported mouse class here to support them. DedectOmniMouse(); DetectMouse(new ChakramX()); DetectMouse(new ChakramXWired()); DetectMouse(new GladiusIIIAimpoint()); DetectMouse(new GladiusIIIAimpointWired()); DetectMouse(new GladiusIIOrigin()); DetectMouse(new GladiusIIOriginPink()); DetectMouse(new GladiusII()); DetectMouse(new GladiusIIWireless()); DetectMouse(new KerisWireless()); DetectMouse(new KerisWirelessWired()); DetectMouse(new Keris()); DetectMouse(new KerisWirelessEvaEdition()); DetectMouse(new KerisWirelessEvaEditionWired()); DetectMouse(new TUFM4Air()); DetectMouse(new TUFM4Wirelss()); DetectMouse(new TUFM4WirelssCN()); DetectMouse(new StrixImpactIIWireless()); DetectMouse(new StrixImpactIIWirelessWired()); DetectMouse(new GladiusIIIWireless()); DetectMouse(new GladiusIIIWired()); DetectMouse(new GladiusIII()); DetectMouse(new GladiusIIIAimpointEva2()); DetectMouse(new GladiusIIIAimpointEva2Wired()); DetectMouse(new HarpeAceAimLabEdition()); DetectMouse(new HarpeAceAimLabEditionWired()); DetectMouse(new HarpeAceExtremeWeird()); DetectMouse(new HarpeAceMiniWired()); DetectMouse(new HarpeIIAceWireless()); DetectMouse(new HarpeIIAceWired()); DetectMouse(new TUFM3()); DetectMouse(new TUFM3GenII()); DetectMouse(new TUFM5()); DetectMouse(new KerisWirelssAimpoint()); DetectMouse(new KerisWirelssAimpointWired()); DetectMouse(new KerisIIAceWired()); DetectMouse(new KerisIIOriginWired()); DetectMouse(new PugioII()); DetectMouse(new PugioIIWired()); DetectMouse(new StrixImpactII()); DetectMouse(new StrixImpactIIElectroPunk()); DetectMouse(new Chakram()); DetectMouse(new ChakramWired()); DetectMouse(new ChakramCore()); DetectMouse(new SpathaX()); DetectMouse(new SpathaXWired()); DetectMouse(new StrixCarry()); DetectMouse(new StrixImpactIII()); DetectMouse(new StrixImpact()); DetectMouse(new TXGamingMini()); DetectMouse(new TXGamingMiniWired()); DetectMouse(new Pugio()); } public static void DedectOmniMouse() { try { var device = DeviceList.Local.GetHidDevices(0x0B05, 0x1ACE).FirstOrDefault(x => x.DevicePath.Contains("mi_02&col03")); if (device is null) return; var config = new OpenConfiguration(); config.SetOption(OpenOption.Interruptible, true); config.SetOption(OpenOption.Exclusive, false); config.SetOption(OpenOption.Priority, 10); using (var stream = device.Open(config)) { var response = new byte[64]; stream.Write(new byte[] { 0x03, 0x12, 0x12, 0x01 }); stream.Read(response); Logger.WriteLine("Omni Mouse ID1: " + Encoding.ASCII.GetString(response.Skip(5).Take(12).ToArray())); stream.Write(new byte[] { 0x03, 0x12, 0x12, 0x02 }); stream.Read(response); Logger.WriteLine("Omni Mouse ID: " + BitConverter.ToString(response)); var signatureBytes = response.Skip(5).Take(12).ToArray(); string signatureStr = Encoding.ASCII.GetString(signatureBytes); Logger.WriteLine("Signature: " + BitConverter.ToString(signatureBytes) + " = " + signatureStr); AsusMouse omniMouse = signatureStr switch { var s when s.StartsWith("B241226660") => new HarpeAceMiniOmni(), // B24122666061 var s when s.StartsWith("B23") => new HarpeAceAimLabEditionOmni(), // B23072800062 var s when s.StartsWith("B241") => new HarpeAceAimLabEditionOmni(), // B24122666771 var s when s.StartsWith("B2501") => new HarpeAceAimLabEditionOmni(), // B25010476524 var s when s.StartsWith("B2504") => new HarpeAceAimLabEditionOmni(), // B25043063148 var s when s.StartsWith("S7") => new HarpeAceMiniOmni(), // S7MPKR053847 var s when s.StartsWith("B24") => new HarpeAceMiniOmni(), // B24082550833 var s when s.StartsWith("B25") => new HarpeAceMiniOmni(), // B25030817186 var s when s.StartsWith("R1") => new KerisWirelssAimpointOmni(), // R13121351391 var s when s.StartsWith("F24") => new KerisWirelssAimpointOmni(), // F24B21DD03F4 var s when s.StartsWith("FB") => new KerisWirelssAimpointOmni(), // FBA0CC1D6F9C var s when s.StartsWith("024") => new KerisAceIIOmni(), // 024031316969 var s when s.StartsWith("02501") => new KerisAceIIOmni(), // 0250105027981 var s when s.StartsWith("025") => new KerisIIOriginOmni(), // 025050613700 var s when s.StartsWith("20") => new StrixImpactIIIWirelessOmni(), // 202405290700 var s when s.StartsWith("R8") => new GladiusIIIAimpointOmni(), // R82020155689 var s when s.StartsWith("R6") => new GladiusIIIAimpointOmni(), // R60120331787 var s when s.StartsWith("RC") => new GladiusIIIAimpointOmni(), // RC1519430455 var s when s.StartsWith("R903") => new GladiusIIIAimpointOmni(), // R90319215881 var s when s.StartsWith("R923") => new GladiusIIIAimpointOmni(), // R92307410710 var s when s.StartsWith("R9") => new KerisWirelssAimpointOmni(), // R90518300572 var s when s.StartsWith("T5") => new HarpeAceExtremeOmni(), // T5MPKR018406 _ => new HarpeAceAimLabEditionOmni() }; DetectMouse(omniMouse); } } catch { return; } } public static void DetectMouse(AsusMouse am) { if (am.IsDeviceConnected() && !IsDeviceConnected(am)) { Logger.WriteLine("Detected a new" + am.GetDisplayName() + " . Connecting..."); Connect(am); } } public static void RegisterForDeviceEvents() { HidSharp.DeviceList.Local.Changed += Device_Changed; } public static void UnregisterForDeviceEvents() { HidSharp.DeviceList.Local.Changed -= Device_Changed; } private static void Device_Changed(object? sender, HidSharp.DeviceListChangedEventArgs e) { timer.Start(); } private static void DeviceTimer_Elapsed(object? sender, System.Timers.ElapsedEventArgs e) { timer.Stop(); Logger.WriteLine("HID Device Event: Checking for new ASUS Mice"); DetectAllAsusMice(); if (AppConfig.IsZ13()) Program.inputDispatcher.Init(); } } } ================================================ FILE: app/Program.cs ================================================ using GHelper.Ally; using GHelper.Battery; using GHelper.Display; using GHelper.Gpu; using GHelper.Helpers; using GHelper.Input; using GHelper.Mode; using GHelper.Peripherals; using GHelper.USB; using Microsoft.Win32; using Ryzen; using System.Diagnostics; using System.Globalization; using System.Reflection; using System.Text; using static NativeMethods; namespace GHelper { static class Program { public static NotifyIcon trayIcon; public static AsusACPI acpi; public static SettingsForm settingsForm = new SettingsForm(); public static ModeControl modeControl = new ModeControl(); public static GPUModeControl gpuControl = new GPUModeControl(settingsForm); public static AllyControl allyControl = new AllyControl(settingsForm); public static ClamshellModeControl clamshellControl = new ClamshellModeControl(); public static ToastForm toast = new ToastForm(); public static IntPtr unRegPowerNotify, unRegPowerNotifyLid; public static int WM_TASKBARCREATED = 0; private static long lastAuto; private static long lastTheme; public static InputDispatcher? inputDispatcher; private static PowerLineStatus isPlugged = SystemInformation.PowerStatus.PowerLineStatus; // The main entry point for the application public static void Main(string[] args) { string action = ""; if (args.Length > 0) action = args[0]; if (action == "charge") { if (AppConfig.IsZ13()) { AsusHid.Write([ [AsusHid.AURA_ID, 0xB9], Encoding.ASCII.GetBytes("]ASUS Tech.Inc."), [AsusHid.AURA_ID, 0x05, 0x20, 0x31, 0, 0x1A], [AsusHid.AURA_ID, 0xC0, 0x03, 0x01] ], "Init"); } BatteryLimit(); try { InputDispatcher.StartupBacklight(); } catch (Exception ex) { Logger.WriteLine($"Startup Backlight: {ex.Message}"); } Application.Exit(); return; } string language = AppConfig.GetString("language"); if (language != null && language.Length > 0) Thread.CurrentThread.CurrentUICulture = CultureInfo.GetCultureInfo(language); else { var culture = CultureInfo.CurrentUICulture; if (culture.ToString() == "kr") culture = CultureInfo.GetCultureInfo("ko"); Thread.CurrentThread.CurrentUICulture = culture; } ProcessHelper.CheckAlreadyRunning(); ProcessHelper.SetPriority(); Logger.WriteLine("------------"); Logger.WriteLine("App launched: " + AppConfig.GetModel() + " :" + Assembly.GetExecutingAssembly().GetName().Version.ToString() + CultureInfo.CurrentUICulture + (ProcessHelper.IsUserAdministrator() ? "." : "")); var startCount = AppConfig.Get("start_count") + 1; AppConfig.Set("start_count", startCount); Logger.WriteLine("Start Count: " + startCount); acpi = new AsusACPI(); if (!acpi.IsConnected() && AppConfig.IsASUS()) { DialogResult dialogResult = MessageBox.Show(Properties.Strings.ACPIError, Properties.Strings.StartupError, MessageBoxButtons.YesNo); if (dialogResult == DialogResult.Yes) { Process.Start(new ProcessStartInfo("https://www.asus.com/support/FAQ/1047338/") { UseShellExecute = true }); } Application.Exit(); return; } ProcessHelper.KillByName("ASUSSmartDisplayControl"); Application.EnableVisualStyles(); HardwareControl.RecreateGpuControl(); RyzenControl.Init(); trayIcon = new NotifyIcon { Text = "G-Helper", Icon = Properties.Resources.standard, Visible = true }; WM_TASKBARCREATED = RegisterWindowMessage("TaskbarCreated"); Logger.WriteLine($"Tray Icon: {trayIcon.Visible} | {WM_TASKBARCREATED}"); settingsForm.SetContextMenu(); trayIcon.MouseClick += TrayIcon_MouseClick; trayIcon.MouseMove += TrayIcon_MouseMove; inputDispatcher = new InputDispatcher(); settingsForm.InitAura(); settingsForm.InitMatrix(); XGM.Init(); SetAutoModes(init: true); // Subscribing for system power change events SystemEvents.PowerModeChanged += SystemEvents_PowerModeChanged; SystemEvents.UserPreferenceChanged += SystemEvents_UserPreferenceChanged; SystemEvents.SessionSwitch += SystemEvents_SessionSwitch; SystemEvents.SessionEnding += SystemEvents_SessionEnding; clamshellControl.RegisterDisplayEvents(); clamshellControl.ToggleLidAction(); // Subscribing for monitor power on events unRegPowerNotify = NativeMethods.RegisterPowerSettingNotification(settingsForm.Handle, PowerSettingGuid.ConsoleDisplayState, NativeMethods.DEVICE_NOTIFY_WINDOW_HANDLE); unRegPowerNotifyLid = NativeMethods.RegisterPowerSettingNotification(settingsForm.Handle, PowerSettingGuid.LIDSWITCH_STATE_CHANGE, NativeMethods.DEVICE_NOTIFY_WINDOW_HANDLE); Task task = Task.Run((Action)PeripheralsProvider.DetectAllAsusMice); PeripheralsProvider.RegisterForDeviceEvents(); if (Environment.CurrentDirectory.Trim('\\') == Application.StartupPath.Trim('\\') || action.Length > 0) { SettingsToggle(false); } switch (action) { case "cpu": Startup.ReScheduleAdmin(); settingsForm.FansToggle(); break; case "gpu": Startup.ReScheduleAdmin(); settingsForm.FansToggle(1); break; case "services": settingsForm.extraForm = new Extra(); settingsForm.extraForm.Show(); settingsForm.extraForm.ServiesToggle(); break; case "uv": Startup.ReScheduleAdmin(); settingsForm.FansToggle(2); modeControl.SetRyzen(); break; case "colors": Task.Run(async () => { await ColorProfileHelper.InstallProfile(); settingsForm.Invoke(delegate { settingsForm.InitVisual(); }); }); break; default: Task.Run(Startup.StartupCheck); break; } Task.Run(() => { settingsForm.VisualiseArmoury(AsusService.IsArmouryRunning()); }); Application.Run(); } private static void SystemEvents_SessionEnding(object sender, SessionEndingEventArgs e) { gpuControl.StandardModeFix(); modeControl.ShutdownReset(); BatteryControl.AutoBattery(); InputDispatcher.ShutdownStatusLed(); } private static void SystemEvents_SessionSwitch(object sender, SessionSwitchEventArgs e) { if (e.Reason == SessionSwitchReason.SessionLogon || e.Reason == SessionSwitchReason.SessionUnlock) { Logger.WriteLine("Session:" + e.Reason.ToString()); Aura.sessionLock = false; ScreenControl.AutoScreen(); } if (e.Reason == SessionSwitchReason.SessionLock) { Logger.WriteLine("Session:" + e.Reason.ToString()); Aura.sessionLock = true; } } static void SystemEvents_UserPreferenceChanged(object sender, UserPreferenceChangedEventArgs e) { if (Math.Abs(DateTimeOffset.Now.ToUnixTimeMilliseconds() - lastTheme) < 2000) return; switch (e.Category) { case UserPreferenceCategory.General: bool changed = settingsForm.InitTheme(); settingsForm.InitContextMenuTheme(); settingsForm.VisualiseIcon(); if (changed) { Debug.WriteLine("Theme Changed"); lastTheme = DateTimeOffset.Now.ToUnixTimeMilliseconds(); } if (settingsForm.fansForm is not null && settingsForm.fansForm.Text != "") settingsForm.fansForm.InitTheme(); if (settingsForm.extraForm is not null && settingsForm.extraForm.Text != "") settingsForm.extraForm.InitTheme(); if (settingsForm.updatesForm is not null && settingsForm.updatesForm.Text != "") settingsForm.updatesForm.InitTheme(); if (settingsForm.matrixForm is not null && settingsForm.matrixForm.Text != "") settingsForm.matrixForm.InitTheme(); if (settingsForm.handheldForm is not null && settingsForm.handheldForm.Text != "") settingsForm.handheldForm.InitTheme(); break; } } public static bool SetAutoModes(bool powerChanged = false, bool init = false, bool wakeup = false) { int skipDelay = wakeup ? 10000 : 3000; if (Math.Abs(DateTimeOffset.Now.ToUnixTimeMilliseconds() - lastAuto) < skipDelay) return false; lastAuto = DateTimeOffset.Now.ToUnixTimeMilliseconds(); isPlugged = SystemInformation.PowerStatus.PowerLineStatus; Logger.WriteLine("AutoSetting for " + isPlugged.ToString()); BatteryControl.AutoBattery(init); if (init) InputDispatcher.InitScreenpad(); DynamicLightingHelper.Init(); ScreenControl.InitOptimalBrightness(); inputDispatcher.Init(); //HardwareControl.ReadSensors(true); modeControl.AutoPerformance(powerChanged); settingsForm.matrixControl.SetDevice(true); InputDispatcher.InitStatusLed(); XGM.InitLight(); if (AppConfig.IsAlly()) { allyControl.Init(); } else { InputDispatcher.AutoKeyboard(); } bool switched = gpuControl.AutoGPUMode(delay: 1000); if (!switched) { gpuControl.InitGPUMode(); ScreenControl.AutoScreen(); } ScreenControl.InitMiniled(); VisualControl.InitBrightness(); return true; } private static void SystemEvents_PowerModeChanged(object sender, PowerModeChangedEventArgs e) { if (e.Mode == PowerModes.Suspend) { Logger.WriteLine("Power Mode Changed:" + e.Mode.ToString()); gpuControl.StandardModeFix(true); modeControl.ShutdownReset(); InputDispatcher.ShutdownStatusLed(); } if (SystemInformation.PowerStatus.PowerLineStatus == isPlugged) return; Logger.WriteLine($"Power Mode {e.Mode}: {SystemInformation.PowerStatus.PowerLineStatus}"); if (AppConfig.Is("disable_power_event")) return; int delay = AppConfig.Get("charger_delay"); if (delay > 0) { Logger.WriteLine($"Charger Delay: {delay}"); Thread.Sleep(delay); if (SystemInformation.PowerStatus.PowerLineStatus == isPlugged) return; } SetAutoModes(powerChanged: true); } public static void SettingsToggle(bool checkForFocus = true, bool trayClick = false) { if (settingsForm.Visible) { // If helper window is not on top, this just focuses on the app again // Pressing the ghelper button again will hide the app if (checkForFocus && !settingsForm.HasAnyFocus(trayClick) && !AppConfig.Is("topmost")) { settingsForm.ShowAll(); } else { settingsForm.HideAll(); } } else { var screen = Screen.PrimaryScreen; if (screen is null) screen = Screen.FromControl(settingsForm); settingsForm.Location = screen.WorkingArea.Location; settingsForm.Left = screen.WorkingArea.Width - 10 - settingsForm.Width; settingsForm.Top = screen.WorkingArea.Height - 10 - settingsForm.Height; settingsForm.Show(); settingsForm.ShowAll(); settingsForm.Left = screen.WorkingArea.Width - 10 - settingsForm.Width; if (AppConfig.IsAlly()) settingsForm.Top = Math.Max(10, screen.Bounds.Height - 110 - settingsForm.Height); else settingsForm.Top = screen.WorkingArea.Height - 10 - settingsForm.Height; settingsForm.VisualiseGPUMode(); } } static void TrayIcon_MouseClick(object? sender, MouseEventArgs e) { if (e.Button == MouseButtons.Left) SettingsToggle(trayClick: true); } static void TrayIcon_MouseMove(object? sender, MouseEventArgs e) { settingsForm.RefreshSensors(); } static void OnExit(object sender, EventArgs e) { if (trayIcon is not null) { trayIcon.Visible = false; trayIcon.Dispose(); } PeripheralsProvider.UnregisterForDeviceEvents(); clamshellControl.UnregisterDisplayEvents(); NativeMethods.UnregisterPowerSettingNotification(unRegPowerNotify); NativeMethods.UnregisterPowerSettingNotification(unRegPowerNotifyLid); Application.Exit(); } static void BatteryLimit() { try { int limit = AppConfig.Get("charge_limit"); if (limit > 0 && limit < 100) { Logger.WriteLine($"------- Startup Battery Limit {limit} -------"); ProcessHelper.StartEnableService("ATKWMIACPIIO", false); Logger.WriteLine($"Connecting to ACPI"); acpi = new AsusACPI(); Logger.WriteLine($"Setting Limit"); acpi.DeviceSet(AsusACPI.BatteryLimit, limit, "Limit"); } } catch (Exception ex) { Logger.WriteLine("Startup Battery Limit Error: " + ex.Message); } } } } ================================================ FILE: app/Properties/Resources.Designer.cs ================================================ //------------------------------------------------------------------------------ // // This code was generated by a tool. // Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ namespace GHelper.Properties { using System; /// /// A strongly-typed resource class, for looking up localized strings, etc. /// // This class was auto-generated by the StronglyTypedResourceBuilder // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Resources { private static global::System.Resources.ResourceManager resourceMan; private static global::System.Globalization.CultureInfo resourceCulture; [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] internal Resources() { } /// /// Returns the cached ResourceManager instance used by this class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] internal static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("GHelper.Properties.Resources", typeof(Resources).Assembly); resourceMan = temp; } return resourceMan; } } /// /// Overrides the current thread's CurrentUICulture property for all /// resource lookups using this strongly typed resource class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] internal static global::System.Globalization.CultureInfo Culture { get { return resourceCulture; } set { resourceCulture = value; } } /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap ally { get { object obj = ResourceManager.GetObject("ally", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap backlight { get { object obj = ResourceManager.GetObject("backlight", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap backlight_down { get { object obj = ResourceManager.GetObject("backlight_down", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap backlight_up { get { object obj = ResourceManager.GetObject("backlight_up", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap brightness_down { get { object obj = ResourceManager.GetObject("brightness_down", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap brightness_up { get { object obj = ResourceManager.GetObject("brightness_up", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Icon similar to (Icon). /// internal static System.Drawing.Icon dark_eco { get { object obj = ResourceManager.GetObject("dark_eco", resourceCulture); return ((System.Drawing.Icon)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Icon similar to (Icon). /// internal static System.Drawing.Icon dark_standard { get { object obj = ResourceManager.GetObject("dark_standard", resourceCulture); return ((System.Drawing.Icon)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap dot_eco { get { object obj = ResourceManager.GetObject("dot_eco", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap dot_standard { get { object obj = ResourceManager.GetObject("dot_standard", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap dot_ultimate { get { object obj = ResourceManager.GetObject("dot_ultimate", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Icon similar to (Icon). /// internal static System.Drawing.Icon eco { get { object obj = ResourceManager.GetObject("eco", resourceCulture); return ((System.Drawing.Icon)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap icons8_add_64 { get { object obj = ResourceManager.GetObject("icons8_add_64", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap icons8_animation_32 { get { object obj = ResourceManager.GetObject("icons8-animation-32", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap icons8_automation_32 { get { object obj = ResourceManager.GetObject("icons8-automation-32", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap icons8_batterie_voll_geladen_48 { get { object obj = ResourceManager.GetObject("icons8_batterie_voll_geladen_48", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap icons8_bicycle_48__1_ { get { object obj = ResourceManager.GetObject("icons8-bicycle-48 (1)", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap icons8_brightness_32 { get { object obj = ResourceManager.GetObject("icons8-brightness-32", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap icons8_charged_battery_96 { get { object obj = ResourceManager.GetObject("icons8_charged_battery_96", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap icons8_charging_battery_32 { get { object obj = ResourceManager.GetObject("icons8-charging-battery-32", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap icons8_charging_battery_96 { get { object obj = ResourceManager.GetObject("icons8_charging_battery_96", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap icons8_color_32 { get { object obj = ResourceManager.GetObject("icons8-color-32", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap icons8_controller_32 { get { object obj = ResourceManager.GetObject("icons8-controller-32", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap icons8_controller_96 { get { object obj = ResourceManager.GetObject("icons8_controller_96", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap icons8_controls_32 { get { object obj = ResourceManager.GetObject("icons8-controls-32", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap icons8_dollar_32 { get { object obj = ResourceManager.GetObject("icons8-dollar-32", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap icons8_edit_32 { get { object obj = ResourceManager.GetObject("icons8_edit_32", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap icons8_fan_32 { get { object obj = ResourceManager.GetObject("icons8_fan_32", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap icons8_fan_48 { get { object obj = ResourceManager.GetObject("icons8-fan-48", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap icons8_fiat_500_48 { get { object obj = ResourceManager.GetObject("icons8-fiat-500-48", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap icons8_function { get { object obj = ResourceManager.GetObject("icons8_function", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap icons8_game_controller_48 { get { object obj = ResourceManager.GetObject("icons8-game-controller-48", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap icons8_gauge_32 { get { object obj = ResourceManager.GetObject("icons8-gauge-32", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap icons8_heartbeat_32 { get { object obj = ResourceManager.GetObject("icons8-heartbeat-32", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap icons8_help_32 { get { object obj = ResourceManager.GetObject("icons8-help-32", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap icons8_hibernate_32 { get { object obj = ResourceManager.GetObject("icons8-hibernate-32", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap icons8_joystick_32 { get { object obj = ResourceManager.GetObject("icons8-joystick-32", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap icons8_keyboard_32 { get { object obj = ResourceManager.GetObject("icons8-keyboard-32", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap icons8_keyboard_32__1_ { get { object obj = ResourceManager.GetObject("icons8-keyboard-32 (1)", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap icons8_ladende_batterie_48 { get { object obj = ResourceManager.GetObject("icons8_ladende_batterie_48", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap icons8_laptop_32 { get { object obj = ResourceManager.GetObject("icons8-laptop-32", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap icons8_leaf_48 { get { object obj = ResourceManager.GetObject("icons8-leaf-48", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap icons8_log_32 { get { object obj = ResourceManager.GetObject("icons8-log-32", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap icons8_matrix_32 { get { object obj = ResourceManager.GetObject("icons8-matrix-32", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap icons8_maus_32 { get { object obj = ResourceManager.GetObject("icons8_maus_32", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap icons8_maus_48 { get { object obj = ResourceManager.GetObject("icons8_maus_48", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap icons8_mauszeiger_50 { get { object obj = ResourceManager.GetObject("icons8_mauszeiger_50", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap icons8_microphone_96 { get { object obj = ResourceManager.GetObject("icons8_microphone_96", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap icons8_mute_unmute_96 { get { object obj = ResourceManager.GetObject("icons8_mute_unmute_96", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap icons8_next_32 { get { object obj = ResourceManager.GetObject("icons8-next-32", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap icons8_processor_32 { get { object obj = ResourceManager.GetObject("icons8_processor_32", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap icons8_project_management_48__1_ { get { object obj = ResourceManager.GetObject("icons8-project-management-48 (1)", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap icons8_quit_32 { get { object obj = ResourceManager.GetObject("icons8-quit-32", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap icons8_refresh_32 { get { object obj = ResourceManager.GetObject("icons8-refresh-32", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap icons8_remove_64 { get { object obj = ResourceManager.GetObject("icons8_remove_64", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap icons8_rocket_32 { get { object obj = ResourceManager.GetObject("icons8_rocket_32", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap icons8_rocket_48 { get { object obj = ResourceManager.GetObject("icons8-rocket-48", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap icons8_save_32 { get { object obj = ResourceManager.GetObject("icons8-save-32", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap icons8_search_32 { get { object obj = ResourceManager.GetObject("icons8-search-32", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap icons8_settings_32 { get { object obj = ResourceManager.GetObject("icons8-settings-32", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap icons8_share_32 { get { object obj = ResourceManager.GetObject("icons8_share_32", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap icons8_software_32 { get { object obj = ResourceManager.GetObject("icons8_software_32", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap icons8_software_32_white { get { object obj = ResourceManager.GetObject("icons8-software-32-white", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap icons8_soonvibes_32 { get { object obj = ResourceManager.GetObject("icons8-soonvibes-32", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap icons8_spa_flower_48 { get { object obj = ResourceManager.GetObject("icons8-spa-flower-48", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap icons8_temperature_32 { get { object obj = ResourceManager.GetObject("icons8_temperature_32", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap icons8_touchpad_96 { get { object obj = ResourceManager.GetObject("icons8_touchpad_96", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap icons8_video_48 { get { object obj = ResourceManager.GetObject("icons8_video_48", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap icons8_video_card_32 { get { object obj = ResourceManager.GetObject("icons8-video-card-32", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap icons8_voltage_32 { get { object obj = ResourceManager.GetObject("icons8_voltage_32", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap icons8_xbox_lt_32 { get { object obj = ResourceManager.GetObject("icons8-xbox-lt-32", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap icons8_xbox_rt_32 { get { object obj = ResourceManager.GetObject("icons8-xbox-rt-32", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Icon similar to (Icon). /// internal static System.Drawing.Icon light_eco { get { object obj = ResourceManager.GetObject("light_eco", resourceCulture); return ((System.Drawing.Icon)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Icon similar to (Icon). /// internal static System.Drawing.Icon light_standard { get { object obj = ResourceManager.GetObject("light_standard", resourceCulture); return ((System.Drawing.Icon)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap lighting_dot_24 { get { object obj = ResourceManager.GetObject("lighting_dot_24", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap lighting_dot_32 { get { object obj = ResourceManager.GetObject("lighting_dot_32", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap lighting_dot_48 { get { object obj = ResourceManager.GetObject("lighting_dot_48", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Bitmap. /// internal static System.Drawing.Bitmap cross_23 { get { object obj = ResourceManager.GetObject("cross_23", resourceCulture); return ((System.Drawing.Bitmap)(obj)); } } /// /// Looks up a localized resource of type System.Byte[]. /// internal static byte[] MFont { get { object obj = ResourceManager.GetObject("MFont", resourceCulture); return ((byte[])(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Icon similar to (Icon). /// internal static System.Drawing.Icon standard { get { object obj = ResourceManager.GetObject("standard", resourceCulture); return ((System.Drawing.Icon)(obj)); } } /// /// Looks up a localized resource of type System.Drawing.Icon similar to (Icon). /// internal static System.Drawing.Icon ultimate { get { object obj = ResourceManager.GetObject("ultimate", resourceCulture); return ((System.Drawing.Icon)(obj)); } } } } ================================================ FILE: app/Properties/Resources.resx ================================================  text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 ..\Resources\lighting_dot_48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\lighting_dot_24.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\icons8-charged-battery-96.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\icons8-search-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\icons8-edit-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\icons8-microphone-96.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\icons8-maus-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\icons8-bicycle-48 (1).png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\standard.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\eco.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\icons8-mute-unmute-96.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\icons8-batterie-voll-geladen-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\icons8-spa-flower-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\icons8-quit-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\icons8-controller-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\icons8-controls-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\icons8-next-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\icons8-automation-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\light-standard.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\brightness-up.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\icons8-processor-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\icons8-fiat-500-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\icons8-touchpad-96.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\icons8-game-controller-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\icons8-help-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\light-eco.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\icons8-matrix-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\icons8-laptop-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\ally.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\icons8-remove-64.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\icons8-function-mac-96.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\icons8-joystick-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\icons8-keyboard-32 (1).png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\icons8-xbox-lt-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\icons8-video-card-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\backlight.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\icons8-color-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\icons8-refresh-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\icons8-hibernate-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\ultimate.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\icons8-keyboard-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\icons8-xbox-rt-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\icons8-controller-96.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\icons8-fan-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\icons8-settings-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\icons8-maus-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\icons8-charging-battery-96.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\icons8-animation-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\dot-ultimate.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\icons8-heartbeat-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\brightness-down.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\backlight-up.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\backlight-down.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\icons8-brightness-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\dot-standard.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\icons8-rocket-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\dark-eco.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\icons8-project-management-48 (1).png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\icons8-mauszeiger-50.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\icons8-save-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\icons8-ladende-batterie-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\dark-standard.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\icons8-video-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\Font.otf;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 ..\Resources\dot-eco.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\icons8-gauge-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\icons8-rocket-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\icons8-fan-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\icons8-voltage-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\icons8-software-32-white.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\icons8-log-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\icons8-temperature-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\icons8-leaf-48.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\icons8-add-64.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\icons8-software-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\icons8-share-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\icons8-soonvibes-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\lighting_dot_32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\icons8-charging-battery-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\icons8-dollar-32.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\cross-23.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ================================================ FILE: app/Properties/Settings.Designer.cs ================================================ //------------------------------------------------------------------------------ // // This code was generated by a tool. // Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ namespace GHelper.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.4.0.0")] internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); public static Settings Default { get { return defaultInstance; } } } } ================================================ FILE: app/Properties/Settings.settings ================================================  ================================================ FILE: app/Properties/Strings.Designer.cs ================================================ //------------------------------------------------------------------------------ // // This code was generated by a tool. // Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // //------------------------------------------------------------------------------ namespace GHelper.Properties { using System; /// /// A strongly-typed resource class, for looking up localized strings, etc. /// // This class was auto-generated by the StronglyTypedResourceBuilder // class via a tool like ResGen or Visual Studio. // To add or remove a member, edit your .ResX file then rerun ResGen // with the /str option, or rebuild your VS project. [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Strings { private static global::System.Resources.ResourceManager resourceMan; private static global::System.Globalization.CultureInfo resourceCulture; [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] internal Strings() { } /// /// Returns the cached ResourceManager instance used by this class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] internal static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("GHelper.Properties.Strings", typeof(Strings).Assembly); resourceMan = temp; } return resourceMan; } } /// /// Overrides the current thread's CurrentUICulture property for all /// resource lookups using this strongly typed resource class. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] internal static global::System.Globalization.CultureInfo Culture { get { return resourceCulture; } set { resourceCulture = value; } } /// /// Looks up a localized string similar to Acceleration. /// internal static string Acceleration { get { return ResourceManager.GetString("Acceleration", resourceCulture); } } /// /// Looks up a localized string similar to Can't connect to ASUS ACPI. Application can't function without it. Try to install Asus System Control Interface. /// internal static string ACPIError { get { return ResourceManager.GetString("ACPIError", resourceCulture); } } /// /// Looks up a localized string similar to Restart your device to apply changes. /// internal static string AlertAPUMemoryRestart { get { return ResourceManager.GetString("AlertAPUMemoryRestart", resourceCulture); } } /// /// Looks up a localized string similar to Restart now?. /// internal static string AlertAPUMemoryRestartTitle { get { return ResourceManager.GetString("AlertAPUMemoryRestartTitle", resourceCulture); } } /// /// Looks up a localized string similar to Looks like GPU is in heavy use, disable it?. /// internal static string AlertDGPU { get { return ResourceManager.GetString("AlertDGPU", resourceCulture); } } /// /// Looks up a localized string similar to Eco Mode. /// internal static string AlertDGPUTitle { get { return ResourceManager.GetString("AlertDGPUTitle", resourceCulture); } } /// /// Looks up a localized string similar to Switching off Ultimate Mode requires restart. /// internal static string AlertUltimateOff { get { return ResourceManager.GetString("AlertUltimateOff", resourceCulture); } } /// /// Looks up a localized string similar to Ultimate Mode requires restart. /// internal static string AlertUltimateOn { get { return ResourceManager.GetString("AlertUltimateOn", resourceCulture); } } /// /// Looks up a localized string similar to Reboot now?. /// internal static string AlertUltimateTitle { get { return ResourceManager.GetString("AlertUltimateTitle", resourceCulture); } } /// /// Looks up a localized string similar to Ally Controller. /// internal static string AllyController { get { return ResourceManager.GetString("AllyController", resourceCulture); } } /// /// Looks up a localized string similar to Ambient mode may increase resource usage. /// internal static string AmbientModeResources { get { return ResourceManager.GetString("AmbientModeResources", resourceCulture); } } /// /// Looks up a localized string similar to Animation Speed. /// internal static string AnimationSpeed { get { return ResourceManager.GetString("AnimationSpeed", resourceCulture); } } /// /// Looks up a localized string similar to Anime Matrix. /// internal static string AnimeMatrix { get { return ResourceManager.GetString("AnimeMatrix", resourceCulture); } } /// /// Looks up a localized string similar to App already running. /// internal static string AppAlreadyRunning { get { return ResourceManager.GetString("AppAlreadyRunning", resourceCulture); } } /// /// Looks up a localized string similar to G-Helper is already running. Check system tray for an icon.. /// internal static string AppAlreadyRunningText { get { return ResourceManager.GetString("AppAlreadyRunningText", resourceCulture); } } /// /// Looks up a localized string similar to Apply. /// internal static string Apply { get { return ResourceManager.GetString("Apply", resourceCulture); } } /// /// Looks up a localized string similar to Apply Custom Fan Curve. /// internal static string ApplyFanCurve { get { return ResourceManager.GetString("ApplyFanCurve", resourceCulture); } } /// /// Looks up a localized string similar to Apply Power Limits. /// internal static string ApplyPowerLimits { get { return ResourceManager.GetString("ApplyPowerLimits", resourceCulture); } } /// /// Looks up a localized string similar to Auto adjust Windows Power Modes. /// internal static string ApplyWindowsPowerPlan { get { return ResourceManager.GetString("ApplyWindowsPowerPlan", resourceCulture); } } /// /// Looks up a localized string similar to Memory Assigned to GPU. /// internal static string APUMemory { get { return ResourceManager.GetString("APUMemory", resourceCulture); } } /// /// Looks up a localized string similar to Asus Services Running. /// internal static string AsusServicesRunning { get { return ResourceManager.GetString("AsusServicesRunning", resourceCulture); } } /// /// Looks up a localized string similar to Battery State. /// internal static string AuraBatteryState { get { return ResourceManager.GetString("AuraBatteryState", resourceCulture); } } /// /// Looks up a localized string similar to Breathe. /// internal static string AuraBreathe { get { return ResourceManager.GetString("AuraBreathe", resourceCulture); } } /// /// Looks up a localized string similar to Clockwise. /// internal static string AuraClockwise { get { return ResourceManager.GetString("AuraClockwise", resourceCulture); } } /// /// Looks up a localized string similar to Color Cycle. /// internal static string AuraColorCycle { get { return ResourceManager.GetString("AuraColorCycle", resourceCulture); } } /// /// Looks up a localized string similar to Comet. /// internal static string AuraComet { get { return ResourceManager.GetString("AuraComet", resourceCulture); } } /// /// Looks up a localized string similar to Counterclockwise. /// internal static string AuraCounterClockwise { get { return ResourceManager.GetString("AuraCounterClockwise", resourceCulture); } } /// /// Looks up a localized string similar to Fast. /// internal static string AuraFast { get { return ResourceManager.GetString("AuraFast", resourceCulture); } } /// /// Looks up a localized string similar to Lighting Mode. /// internal static string AuraLightingMode { get { return ResourceManager.GetString("AuraLightingMode", resourceCulture); } } /// /// Looks up a localized string similar to Normal. /// internal static string AuraNormal { get { return ResourceManager.GetString("AuraNormal", resourceCulture); } } /// /// Looks up a localized string similar to Rainbow. /// internal static string AuraRainbow { get { return ResourceManager.GetString("AuraRainbow", resourceCulture); } } /// /// Looks up a localized string similar to Random. /// internal static string AuraRandomColor { get { return ResourceManager.GetString("AuraRandomColor", resourceCulture); } } /// /// Looks up a localized string similar to React. /// internal static string AuraReact { get { return ResourceManager.GetString("AuraReact", resourceCulture); } } /// /// Looks up a localized string similar to Slow. /// internal static string AuraSlow { get { return ResourceManager.GetString("AuraSlow", resourceCulture); } } /// /// Looks up a localized string similar to Static. /// internal static string AuraStatic { get { return ResourceManager.GetString("AuraStatic", resourceCulture); } } /// /// Looks up a localized string similar to Strobe. /// internal static string AuraStrobe { get { return ResourceManager.GetString("AuraStrobe", resourceCulture); } } /// /// Looks up a localized string similar to All. /// internal static string AuraZoneAll { get { return ResourceManager.GetString("AuraZoneAll", resourceCulture); } } /// /// Looks up a localized string similar to Dock. /// internal static string AuraZoneDock { get { return ResourceManager.GetString("AuraZoneDock", resourceCulture); } } /// /// Looks up a localized string similar to Logo. /// internal static string AuraZoneLogo { get { return ResourceManager.GetString("AuraZoneLogo", resourceCulture); } } /// /// Looks up a localized string similar to Scrollwheel. /// internal static string AuraZoneScroll { get { return ResourceManager.GetString("AuraZoneScroll", resourceCulture); } } /// /// Looks up a localized string similar to Underglow. /// internal static string AuraZoneUnderglow { get { return ResourceManager.GetString("AuraZoneUnderglow", resourceCulture); } } /// /// Looks up a localized string similar to Auto Apply. /// internal static string AutoApply { get { return ResourceManager.GetString("AutoApply", resourceCulture); } } /// /// Looks up a localized string similar to Auto. /// internal static string AutoMode { get { return ResourceManager.GetString("AutoMode", resourceCulture); } } /// /// Looks up a localized string similar to Sets 60Hz to save battery, and back when plugged. /// internal static string AutoRefreshTooltip { get { return ResourceManager.GetString("AutoRefreshTooltip", resourceCulture); } } /// /// Looks up a localized string similar to Awake. /// internal static string Awake { get { return ResourceManager.GetString("Awake", resourceCulture); } } /// /// Looks up a localized string similar to Low. /// internal static string BacklightLow { get { return ResourceManager.GetString("BacklightLow", resourceCulture); } } /// /// Looks up a localized string similar to Max. /// internal static string BacklightMax { get { return ResourceManager.GetString("BacklightMax", resourceCulture); } } /// /// Looks up a localized string similar to Mid. /// internal static string BacklightMid { get { return ResourceManager.GetString("BacklightMid", resourceCulture); } } /// /// Looks up a localized string similar to Off. /// internal static string BacklightOff { get { return ResourceManager.GetString("BacklightOff", resourceCulture); } } /// /// Looks up a localized string similar to Timeout plugged / on battery (0 - ON). /// internal static string BacklightTimeout { get { return ResourceManager.GetString("BacklightTimeout", resourceCulture); } } /// /// Looks up a localized string similar to Backlight Timeout when on battery. /// internal static string BacklightTimeoutBattery { get { return ResourceManager.GetString("BacklightTimeoutBattery", resourceCulture); } } /// /// Looks up a localized string similar to Backlight Timeout when plugged. /// internal static string BacklightTimeoutPlugged { get { return ResourceManager.GetString("BacklightTimeoutPlugged", resourceCulture); } } /// /// Looks up a localized string similar to Balanced. /// internal static string Balanced { get { return ResourceManager.GetString("Balanced", resourceCulture); } } /// /// Looks up a localized string similar to Charge. /// internal static string BatteryCharge { get { return ResourceManager.GetString("BatteryCharge", resourceCulture); } } /// /// Looks up a localized string similar to Battery Charge Limit. /// internal static string BatteryChargeLimit { get { return ResourceManager.GetString("BatteryChargeLimit", resourceCulture); } } /// /// Looks up a localized string similar to Battery Health. /// internal static string BatteryHealth { get { return ResourceManager.GetString("BatteryHealth", resourceCulture); } } /// /// Looks up a localized string similar to One time charge to 100%. /// internal static string BatteryLimitFull { get { return ResourceManager.GetString("BatteryLimitFull", resourceCulture); } } /// /// Looks up a localized string similar to Binding. /// internal static string Binding { get { return ResourceManager.GetString("Binding", resourceCulture); } } /// /// Looks up a localized string similar to Primary. /// internal static string BindingPrimary { get { return ResourceManager.GetString("BindingPrimary", resourceCulture); } } /// /// Looks up a localized string similar to Secondary. /// internal static string BindingSecondary { get { return ResourceManager.GetString("BindingSecondary", resourceCulture); } } /// /// Looks up a localized string similar to BIOS and Driver Updates. /// internal static string BiosAndDriverUpdates { get { return ResourceManager.GetString("BiosAndDriverUpdates", resourceCulture); } } /// /// Looks up a localized string similar to Boot. /// internal static string Boot { get { return ResourceManager.GetString("Boot", resourceCulture); } } /// /// Looks up a localized string similar to Boot Sound. /// internal static string BootSound { get { return ResourceManager.GetString("BootSound", resourceCulture); } } /// /// Looks up a localized string similar to Brightness. /// internal static string Brightness { get { return ResourceManager.GetString("Brightness", resourceCulture); } } /// /// Looks up a localized string similar to Brightness Down. /// internal static string BrightnessDown { get { return ResourceManager.GetString("BrightnessDown", resourceCulture); } } /// /// Looks up a localized string similar to Brightness Up. /// internal static string BrightnessUp { get { return ResourceManager.GetString("BrightnessUp", resourceCulture); } } /// /// Looks up a localized string similar to Black and white tray icon. /// internal static string BWTrayIcon { get { return ResourceManager.GetString("BWTrayIcon", resourceCulture); } } /// /// Looks up a localized string similar to Calibrate. /// internal static string Calibrate { get { return ResourceManager.GetString("Calibrate", resourceCulture); } } /// /// Looks up a localized string similar to Charging. /// internal static string Charging { get { return ResourceManager.GetString("Charging", resourceCulture); } } /// /// Looks up a localized string similar to Color. /// internal static string Color { get { return ResourceManager.GetString("Color", resourceCulture); } } /// /// Looks up a localized string similar to Contrast. /// internal static string Contrast { get { return ResourceManager.GetString("Contrast", resourceCulture); } } /// /// Looks up a localized string similar to Controller. /// internal static string Controller { get { return ResourceManager.GetString("Controller", resourceCulture); } } /// /// Looks up a localized string similar to CPU Boost. /// internal static string CPUBoost { get { return ResourceManager.GetString("CPUBoost", resourceCulture); } } /// /// Looks up a localized string similar to Custom. /// internal static string Custom { get { return ResourceManager.GetString("Custom", resourceCulture); } } /// /// Looks up a localized string similar to Deceleration. /// internal static string Deceleration { get { return ResourceManager.GetString("Deceleration", resourceCulture); } } /// /// Looks up a localized string similar to Default. /// internal static string Default { get { return ResourceManager.GetString("Default", resourceCulture); } } /// /// Looks up a localized string similar to Disable Controller. /// internal static string DisableController { get { return ResourceManager.GetString("DisableController", resourceCulture); } } /// /// Looks up a localized string similar to Please disable Windows > Dynamic Lighting. /// internal static string DisableDynamicLighting { get { return ResourceManager.GetString("DisableDynamicLighting", resourceCulture); } } /// /// Looks up a localized string similar to Disable on lid close. /// internal static string DisableOnLidClose { get { return ResourceManager.GetString("DisableOnLidClose", resourceCulture); } } /// /// Looks up a localized string similar to Disable screen overdrive. /// internal static string DisableOverdrive { get { return ResourceManager.GetString("DisableOverdrive", resourceCulture); } } /// /// Looks up a localized string similar to Discharging. /// internal static string Discharging { get { return ResourceManager.GetString("Discharging", resourceCulture); } } /// /// Looks up a localized string similar to Donate. /// internal static string Donate { get { return ResourceManager.GetString("Donate", resourceCulture); } } /// /// Looks up a localized string similar to Download Color Profiles. /// internal static string DownloadColorProfiles { get { return ResourceManager.GetString("DownloadColorProfiles", resourceCulture); } } /// /// Looks up a localized string similar to Download. /// internal static string DownloadUpdate { get { return ResourceManager.GetString("DownloadUpdate", resourceCulture); } } /// /// Looks up a localized string similar to Drivers and Software. /// internal static string DriverAndSoftware { get { return ResourceManager.GetString("DriverAndSoftware", resourceCulture); } } /// /// Looks up a localized string similar to Disables dGPU to save battery. /// internal static string EcoGPUTooltip { get { return ResourceManager.GetString("EcoGPUTooltip", resourceCulture); } } /// /// Looks up a localized string similar to Eco. /// internal static string EcoMode { get { return ResourceManager.GetString("EcoMode", resourceCulture); } } /// /// Looks up a localized string similar to Enable GPU on shutdown (prevents issue with Eco mode). /// internal static string EnableGPUOnShutdown { get { return ResourceManager.GetString("EnableGPUOnShutdown", resourceCulture); } } /// /// Looks up a localized string similar to Disabling the dGPU by going into Eco mode while Display Mode in NVIDIA Control Panel is not set to Optimus might cause problems with brightness controls until after the next reboot. /// ///Do you still want to continue?. /// internal static string EnableOptimusText { get { return ResourceManager.GetString("EnableOptimusText", resourceCulture); } } /// /// Looks up a localized string similar to NVIDIA Display Mode is not set to Optimus. /// internal static string EnableOptimusTitle { get { return ResourceManager.GetString("EnableOptimusTitle", resourceCulture); } } /// /// Looks up a localized string similar to Energy Settings. /// internal static string EnergySettings { get { return ResourceManager.GetString("EnergySettings", resourceCulture); } } /// /// Looks up a localized string similar to Export Profile. /// internal static string Export { get { return ResourceManager.GetString("Export", resourceCulture); } } /// /// Looks up a localized string similar to Extra. /// internal static string Extra { get { return ResourceManager.GetString("Extra", resourceCulture); } } /// /// Looks up a localized string similar to Extra Settings. /// internal static string ExtraSettings { get { return ResourceManager.GetString("ExtraSettings", resourceCulture); } } /// /// Looks up a localized string similar to Factory Defaults. /// internal static string FactoryDefaults { get { return ResourceManager.GetString("FactoryDefaults", resourceCulture); } } /// /// Looks up a localized string similar to Fan Curves. /// internal static string FanCurves { get { return ResourceManager.GetString("FanCurves", resourceCulture); } } /// /// Looks up a localized string similar to CPU Fan Profile. /// internal static string FanProfileCPU { get { return ResourceManager.GetString("FanProfileCPU", resourceCulture); } } /// /// Looks up a localized string similar to GPU Fan Profile. /// internal static string FanProfileGPU { get { return ResourceManager.GetString("FanProfileGPU", resourceCulture); } } /// /// Looks up a localized string similar to Mid Fan Profile. /// internal static string FanProfileMid { get { return ResourceManager.GetString("FanProfileMid", resourceCulture); } } /// /// Looks up a localized string similar to Fan Profiles. /// internal static string FanProfiles { get { return ResourceManager.GetString("FanProfiles", resourceCulture); } } /// /// Looks up a localized string similar to Fans and Power. /// internal static string FansAndPower { get { return ResourceManager.GetString("FansAndPower", resourceCulture); } } /// /// Looks up a localized string similar to Fan. /// internal static string FanSpeed { get { return ResourceManager.GetString("FanSpeed", resourceCulture); } } /// /// Looks up a localized string similar to Fans + Power. /// internal static string FansPower { get { return ResourceManager.GetString("FansPower", resourceCulture); } } /// /// Looks up a localized string similar to Flicker-free Dimming. /// internal static string FlickerFreeDimming { get { return ResourceManager.GetString("FlickerFreeDimming", resourceCulture); } } /// /// Looks up a localized string similar to Process Fn+F hotkeys without Fn. /// internal static string FnLock { get { return ResourceManager.GetString("FnLock", resourceCulture); } } /// /// Looks up a localized string similar to FN-Lock Off. /// internal static string FnLockOff { get { return ResourceManager.GetString("FnLockOff", resourceCulture); } } /// /// Looks up a localized string similar to FN-Lock On. /// internal static string FnLockOn { get { return ResourceManager.GetString("FnLockOn", resourceCulture); } } /// /// Looks up a localized string similar to Dynamic Boost. /// internal static string GPUBoost { get { return ResourceManager.GetString("GPUBoost", resourceCulture); } } /// /// Looks up a localized string similar to Changing. /// internal static string GPUChanging { get { return ResourceManager.GetString("GPUChanging", resourceCulture); } } /// /// Looks up a localized string similar to Core Clock Offset. /// internal static string GPUCoreClockOffset { get { return ResourceManager.GetString("GPUCoreClockOffset", resourceCulture); } } /// /// Looks up a localized string similar to Memory Clock Offset. /// internal static string GPUMemoryClockOffset { get { return ResourceManager.GetString("GPUMemoryClockOffset", resourceCulture); } } /// /// Looks up a localized string similar to GPU Mode. /// internal static string GPUMode { get { return ResourceManager.GetString("GPUMode", resourceCulture); } } /// /// Looks up a localized string similar to iGPU only. /// internal static string GPUModeEco { get { return ResourceManager.GetString("GPUModeEco", resourceCulture); } } /// /// Looks up a localized string similar to iGPU + dGPU. /// internal static string GPUModeStandard { get { return ResourceManager.GetString("GPUModeStandard", resourceCulture); } } /// /// Looks up a localized string similar to dGPU exclusive. /// internal static string GPUModeUltimate { get { return ResourceManager.GetString("GPUModeUltimate", resourceCulture); } } /// /// Looks up a localized string similar to GPU Power. /// internal static string GPUPower { get { return ResourceManager.GetString("GPUPower", resourceCulture); } } /// /// Looks up a localized string similar to GPU Settings. /// internal static string GPUSettings { get { return ResourceManager.GetString("GPUSettings", resourceCulture); } } /// /// Looks up a localized string similar to Temperature Target. /// internal static string GPUTempTarget { get { return ResourceManager.GetString("GPUTempTarget", resourceCulture); } } /// /// Looks up a localized string similar to Minutes till Hibernation in sleep on battery (0 - OFF). /// internal static string HibernateAfter { get { return ResourceManager.GetString("HibernateAfter", resourceCulture); } } /// /// Looks up a localized string similar to High. /// internal static string High { get { return ResourceManager.GetString("High", resourceCulture); } } /// /// Looks up a localized string similar to Image Rotation. /// internal static string ImageRotation { get { return ResourceManager.GetString("ImageRotation", resourceCulture); } } /// /// Looks up a localized string similar to Import Profile. /// internal static string Import { get { return ResourceManager.GetString("Import", resourceCulture); } } /// /// Looks up a localized string similar to Interval Off. /// internal static string IntervalOff { get { return ResourceManager.GetString("IntervalOff", resourceCulture); } } /// /// Looks up a localized string similar to Interval {0}s. /// internal static string IntervalSeconds { get { return ResourceManager.GetString("IntervalSeconds", resourceCulture); } } /// /// Looks up a localized string similar to Key Bindings. /// internal static string KeyBindings { get { return ResourceManager.GetString("KeyBindings", resourceCulture); } } /// /// Looks up a localized string similar to Keyboard. /// internal static string Keyboard { get { return ResourceManager.GetString("Keyboard", resourceCulture); } } /// /// Looks up a localized string similar to Stop all apps using GPU when switching to Eco. /// internal static string KillGpuApps { get { return ResourceManager.GetString("KillGpuApps", resourceCulture); } } /// /// Looks up a localized string similar to Laptop Backlight. /// internal static string LaptopBacklight { get { return ResourceManager.GetString("LaptopBacklight", resourceCulture); } } /// /// Looks up a localized string similar to Laptop Keyboard. /// internal static string LaptopKeyboard { get { return ResourceManager.GetString("LaptopKeyboard", resourceCulture); } } /// /// Looks up a localized string similar to Laptop Screen. /// internal static string LaptopScreen { get { return ResourceManager.GetString("LaptopScreen", resourceCulture); } } /// /// Looks up a localized string similar to LED Status Indicators. /// internal static string LEDStatusIndicators { get { return ResourceManager.GetString("LEDStatusIndicators", resourceCulture); } } /// /// Looks up a localized string similar to Legend. /// internal static string Legend { get { return ResourceManager.GetString("Legend", resourceCulture); } } /// /// Looks up a localized string similar to Can't check local version. /// internal static string LegendGray { get { return ResourceManager.GetString("LegendGray", resourceCulture); } } /// /// Looks up a localized string similar to Updated. /// internal static string LegendGreen { get { return ResourceManager.GetString("LegendGreen", resourceCulture); } } /// /// Looks up a localized string similar to Update Available. /// internal static string LegendRed { get { return ResourceManager.GetString("LegendRed", resourceCulture); } } /// /// Looks up a localized string similar to Lid. /// internal static string Lid { get { return ResourceManager.GetString("Lid", resourceCulture); } } /// /// Looks up a localized string similar to Lightbar. /// internal static string Lightbar { get { return ResourceManager.GetString("Lightbar", resourceCulture); } } /// /// Looks up a localized string similar to Lighting. /// internal static string Lighting { get { return ResourceManager.GetString("Lighting", resourceCulture); } } /// /// Looks up a localized string similar to Lock Screen. /// internal static string LockScreen { get { return ResourceManager.GetString("LockScreen", resourceCulture); } } /// /// Looks up a localized string similar to Logo. /// internal static string Logo { get { return ResourceManager.GetString("Logo", resourceCulture); } } /// /// Looks up a localized string similar to Low. /// internal static string Low { get { return ResourceManager.GetString("Low", resourceCulture); } } /// /// Looks up a localized string similar to Left Stick Deadzones. /// internal static string LSDeadzones { get { return ResourceManager.GetString("LSDeadzones", resourceCulture); } } /// /// Looks up a localized string similar to Left Trigger Deadzones. /// internal static string LTDeadzones { get { return ResourceManager.GetString("LTDeadzones", resourceCulture); } } /// /// Looks up a localized string similar to Audio Visualizer. /// internal static string MatrixAudio { get { return ResourceManager.GetString("MatrixAudio", resourceCulture); } } /// /// Looks up a localized string similar to Binary Banner. /// internal static string MatrixBanner { get { return ResourceManager.GetString("MatrixBanner", resourceCulture); } } /// /// Looks up a localized string similar to Bright. /// internal static string MatrixBright { get { return ResourceManager.GetString("MatrixBright", resourceCulture); } } /// /// Looks up a localized string similar to Clock. /// internal static string MatrixClock { get { return ResourceManager.GetString("MatrixClock", resourceCulture); } } /// /// Looks up a localized string similar to Dim. /// internal static string MatrixDim { get { return ResourceManager.GetString("MatrixDim", resourceCulture); } } /// /// Looks up a localized string similar to Rog Logo. /// internal static string MatrixLogo { get { return ResourceManager.GetString("MatrixLogo", resourceCulture); } } /// /// Looks up a localized string similar to Medium. /// internal static string MatrixMedium { get { return ResourceManager.GetString("MatrixMedium", resourceCulture); } } /// /// Looks up a localized string similar to Off. /// internal static string MatrixOff { get { return ResourceManager.GetString("MatrixOff", resourceCulture); } } /// /// Looks up a localized string similar to Picture. /// internal static string MatrixPicture { get { return ResourceManager.GetString("MatrixPicture", resourceCulture); } } /// /// Looks up a localized string similar to Max refresh rate for lower latency. /// internal static string MaxRefreshTooltip { get { return ResourceManager.GetString("MaxRefreshTooltip", resourceCulture); } } /// /// Looks up a localized string similar to 60Hz refresh rate to save battery. /// internal static string MinRefreshTooltip { get { return ResourceManager.GetString("MinRefreshTooltip", resourceCulture); } } /// /// Looks up a localized string similar to Minute. /// internal static string Minute { get { return ResourceManager.GetString("Minute", resourceCulture); } } /// /// Looks up a localized string similar to Minutes. /// internal static string Minutes { get { return ResourceManager.GetString("Minutes", resourceCulture); } } /// /// Looks up a localized string similar to Angle Snapping / Tuning. /// internal static string MouseAngleSnapping { get { return ResourceManager.GetString("MouseAngleSnapping", resourceCulture); } } /// /// Looks up a localized string similar to Auto Power Off After. /// internal static string MouseAutoPowerOff { get { return ResourceManager.GetString("MouseAutoPowerOff", resourceCulture); } } /// /// Looks up a localized string similar to Button Response. /// internal static string MouseButtonResponse { get { return ResourceManager.GetString("MouseButtonResponse", resourceCulture); } } /// /// Looks up a localized string similar to Import failed. Selected file is not a valid mouse profile or corrutpted.. /// internal static string MouseImportFailed { get { return ResourceManager.GetString("MouseImportFailed", resourceCulture); } } /// /// Looks up a localized string similar to Lift Off Distance. /// internal static string MouseLiftOffDistance { get { return ResourceManager.GetString("MouseLiftOffDistance", resourceCulture); } } /// /// Looks up a localized string similar to Low Battery Warning at. /// internal static string MouseLowBatteryWarning { get { return ResourceManager.GetString("MouseLowBatteryWarning", resourceCulture); } } /// /// Looks up a localized string similar to Motion Sync. /// internal static string MouseMotionSync { get { return ResourceManager.GetString("MouseMotionSync", resourceCulture); } } /// /// Looks up a localized string similar to Performance. /// internal static string MousePerformance { get { return ResourceManager.GetString("MousePerformance", resourceCulture); } } /// /// Looks up a localized string similar to Synchronize with mouse. /// internal static string MouseSynchronize { get { return ResourceManager.GetString("MouseSynchronize", resourceCulture); } } /// /// Looks up a localized string similar to Zone Mode. /// internal static string MouseZoneMode { get { return ResourceManager.GetString("MouseZoneMode", resourceCulture); } } /// /// Looks up a localized string similar to Multi Zone. /// internal static string Multizone { get { return ResourceManager.GetString("Multizone", resourceCulture); } } /// /// Looks up a localized string similar to Multi Zone Strong. /// internal static string MultizoneStrong { get { return ResourceManager.GetString("MultizoneStrong", resourceCulture); } } /// /// Looks up a localized string similar to Muted. /// internal static string Muted { get { return ResourceManager.GetString("Muted", resourceCulture); } } /// /// Looks up a localized string similar to Mute Mic. /// internal static string MuteMic { get { return ResourceManager.GetString("MuteMic", resourceCulture); } } /// /// Looks up a localized string similar to Never. /// internal static string Never { get { return ResourceManager.GetString("Never", resourceCulture); } } /// /// Looks up a localized string similar to New updates. /// internal static string NewUpdates { get { return ResourceManager.GetString("NewUpdates", resourceCulture); } } /// /// Looks up a localized string similar to No new updates. /// internal static string NoNewUpdates { get { return ResourceManager.GetString("NoNewUpdates", resourceCulture); } } /// /// Looks up a localized string similar to Not Connected. /// internal static string NotConnected { get { return ResourceManager.GetString("NotConnected", resourceCulture); } } /// /// Looks up a localized string similar to Off. /// internal static string Off { get { return ResourceManager.GetString("Off", resourceCulture); } } /// /// Looks up a localized string similar to On. /// internal static string On { get { return ResourceManager.GetString("On", resourceCulture); } } /// /// Looks up a localized string similar to One Zone. /// internal static string OneZone { get { return ResourceManager.GetString("OneZone", resourceCulture); } } /// /// Looks up a localized string similar to Open G-Helper window. /// internal static string OpenGHelper { get { return ResourceManager.GetString("OpenGHelper", resourceCulture); } } /// /// Looks up a localized string similar to Optimized. /// internal static string Optimized { get { return ResourceManager.GetString("Optimized", resourceCulture); } } /// /// Looks up a localized string similar to Switch to Eco on battery and to Standard when plugged in. /// internal static string OptimizedGPUTooltip { get { return ResourceManager.GetString("OptimizedGPUTooltip", resourceCulture); } } /// /// Looks up a localized string similar to Keep GPU disabled on USB-C charger in Optimized mode. /// internal static string OptimizedUSBC { get { return ResourceManager.GetString("OptimizedUSBC", resourceCulture); } } /// /// Looks up a localized string similar to Other. /// internal static string Other { get { return ResourceManager.GetString("Other", resourceCulture); } } /// /// Looks up a localized string similar to Overdrive. /// internal static string Overdrive { get { return ResourceManager.GetString("Overdrive", resourceCulture); } } /// /// Looks up a localized string similar to Mode. /// internal static string PerformanceMode { get { return ResourceManager.GetString("PerformanceMode", resourceCulture); } } /// /// Looks up a localized string similar to Peripherals. /// internal static string Peripherals { get { return ResourceManager.GetString("Peripherals", resourceCulture); } } /// /// Looks up a localized string similar to Picture / Gif. /// internal static string PictureGif { get { return ResourceManager.GetString("PictureGif", resourceCulture); } } /// /// Looks up a localized string similar to Play / Pause. /// internal static string PlayPause { get { return ResourceManager.GetString("PlayPause", resourceCulture); } } /// /// Looks up a localized string similar to Polling Rate. /// internal static string PollingRate { get { return ResourceManager.GetString("PollingRate", resourceCulture); } } /// /// Looks up a localized string similar to Power Limits. /// internal static string PowerLimits { get { return ResourceManager.GetString("PowerLimits", resourceCulture); } } /// /// Looks up a localized string similar to Power Limits is an experimental feature. Use carefully and at your own risk!. /// internal static string PPTExperimental { get { return ResourceManager.GetString("PPTExperimental", resourceCulture); } } /// /// Looks up a localized string similar to PrintScreen. /// internal static string PrintScreen { get { return ResourceManager.GetString("PrintScreen", resourceCulture); } } /// /// Looks up a localized string similar to Profile. /// internal static string Profile { get { return ResourceManager.GetString("Profile", resourceCulture); } } /// /// Looks up a localized string similar to Quit. /// internal static string Quit { get { return ResourceManager.GetString("Quit", resourceCulture); } } /// /// Looks up a localized string similar to Reset. /// internal static string Reset { get { return ResourceManager.GetString("Reset", resourceCulture); } } /// /// Looks up a localized string similar to Something is using dGPU and preventing Eco mode. Let G-Helper try to restart dGPU in device manager? (Please proceed at your own risk). /// internal static string RestartGPU { get { return ResourceManager.GetString("RestartGPU", resourceCulture); } } /// /// Looks up a localized string similar to RPM. /// internal static string RPM { get { return ResourceManager.GetString("RPM", resourceCulture); } } /// /// Looks up a localized string similar to Right Stick Deadzones. /// internal static string RSDeadzones { get { return ResourceManager.GetString("RSDeadzones", resourceCulture); } } /// /// Looks up a localized string similar to Right Trigger Deadzones. /// internal static string RTDeadzones { get { return ResourceManager.GetString("RTDeadzones", resourceCulture); } } /// /// Looks up a localized string similar to Run on Startup. /// internal static string RunOnStartup { get { return ResourceManager.GetString("RunOnStartup", resourceCulture); } } /// /// Looks up a localized string similar to Scaling Quality. /// internal static string ScalingQuality { get { return ResourceManager.GetString("ScalingQuality", resourceCulture); } } /// /// Looks up a localized string similar to Screenpad Brightness Down. /// internal static string ScreenPadDown { get { return ResourceManager.GetString("ScreenPadDown", resourceCulture); } } /// /// Looks up a localized string similar to Screenpad Brightness Up. /// internal static string ScreenPadUp { get { return ResourceManager.GetString("ScreenPadUp", resourceCulture); } } /// /// Looks up a localized string similar to Shutdown. /// internal static string Shutdown { get { return ResourceManager.GetString("Shutdown", resourceCulture); } } /// /// Looks up a localized string similar to Silent. /// internal static string Silent { get { return ResourceManager.GetString("Silent", resourceCulture); } } /// /// Looks up a localized string similar to Battery Level. /// internal static string SlashBatteryLevel { get { return ResourceManager.GetString("SlashBatteryLevel", resourceCulture); } } /// /// Looks up a localized string similar to Bit Stream. /// internal static string SlashBitStream { get { return ResourceManager.GetString("SlashBitStream", resourceCulture); } } /// /// Looks up a localized string similar to Bounce. /// internal static string SlashBounce { get { return ResourceManager.GetString("SlashBounce", resourceCulture); } } /// /// Looks up a localized string similar to Buzzer. /// internal static string SlashBuzzer { get { return ResourceManager.GetString("SlashBuzzer", resourceCulture); } } /// /// Looks up a localized string similar to Flow. /// internal static string SlashFlow { get { return ResourceManager.GetString("SlashFlow", resourceCulture); } } /// /// Looks up a localized string similar to Flux. /// internal static string SlashFlux { get { return ResourceManager.GetString("SlashFlux", resourceCulture); } } /// /// Looks up a localized string similar to Game Over. /// internal static string SlashGameOver { get { return ResourceManager.GetString("SlashGameOver", resourceCulture); } } /// /// Looks up a localized string similar to Hazard. /// internal static string SlashHazard { get { return ResourceManager.GetString("SlashHazard", resourceCulture); } } /// /// Looks up a localized string similar to Interfacing. /// internal static string SlashInterfacing { get { return ResourceManager.GetString("SlashInterfacing", resourceCulture); } } /// /// Looks up a localized string similar to Loading. /// internal static string SlashLoading { get { return ResourceManager.GetString("SlashLoading", resourceCulture); } } /// /// Looks up a localized string similar to Slash. /// internal static string SlashMode { get { return ResourceManager.GetString("SlashMode", resourceCulture); } } /// /// Looks up a localized string similar to Phantom. /// internal static string SlashPhantom { get { return ResourceManager.GetString("SlashPhantom", resourceCulture); } } /// /// Looks up a localized string similar to Ramp. /// internal static string SlashRamp { get { return ResourceManager.GetString("SlashRamp", resourceCulture); } } /// /// Looks up a localized string similar to Spectrum. /// internal static string SlashSpectrum { get { return ResourceManager.GetString("SlashSpectrum", resourceCulture); } } /// /// Looks up a localized string similar to Start. /// internal static string SlashStart { get { return ResourceManager.GetString("SlashStart", resourceCulture); } } /// /// Looks up a localized string similar to Static. /// internal static string SlashStatic { get { return ResourceManager.GetString("SlashStatic", resourceCulture); } } /// /// Looks up a localized string similar to Transmission. /// internal static string SlashTransmission { get { return ResourceManager.GetString("SlashTransmission", resourceCulture); } } /// /// Looks up a localized string similar to Sleep. /// internal static string Sleep { get { return ResourceManager.GetString("Sleep", resourceCulture); } } /// /// Looks up a localized string similar to Enables dGPU for standard use. /// internal static string StandardGPUTooltip { get { return ResourceManager.GetString("StandardGPUTooltip", resourceCulture); } } /// /// Looks up a localized string similar to Standard. /// internal static string StandardMode { get { return ResourceManager.GetString("StandardMode", resourceCulture); } } /// /// Looks up a localized string similar to Start. /// internal static string Start { get { return ResourceManager.GetString("Start", resourceCulture); } } /// /// Looks up a localized string similar to Starting Services. /// internal static string StartingServices { get { return ResourceManager.GetString("StartingServices", resourceCulture); } } /// /// Looks up a localized string similar to Startup Error. /// internal static string StartupError { get { return ResourceManager.GetString("StartupError", resourceCulture); } } /// /// Looks up a localized string similar to Stop. /// internal static string Stop { get { return ResourceManager.GetString("Stop", resourceCulture); } } /// /// Looks up a localized string similar to Stop GPU Applications. /// internal static string StopGPUApps { get { return ResourceManager.GetString("StopGPUApps", resourceCulture); } } /// /// Looks up a localized string similar to Stopping Services. /// internal static string StoppingServices { get { return ResourceManager.GetString("StoppingServices", resourceCulture); } } /// /// Looks up a localized string similar to Toggle Aura. /// internal static string ToggleAura { get { return ResourceManager.GetString("ToggleAura", resourceCulture); } } /// /// Looks up a localized string similar to Auto Toggle Clamshell Mode. /// internal static string ToggleClamshellMode { get { return ResourceManager.GetString("ToggleClamshellMode", resourceCulture); } } /// /// Looks up a localized string similar to Toggle Fn-Lock. /// internal static string ToggleFnLock { get { return ResourceManager.GetString("ToggleFnLock", resourceCulture); } } /// /// Looks up a localized string similar to Toggle Miniled (if supported). /// internal static string ToggleMiniled { get { return ResourceManager.GetString("ToggleMiniled", resourceCulture); } } /// /// Looks up a localized string similar to Toggle Screen. /// internal static string ToggleScreen { get { return ResourceManager.GetString("ToggleScreen", resourceCulture); } } /// /// Looks up a localized string similar to Toggle Touchscreen. /// internal static string ToggleTouchscreen { get { return ResourceManager.GetString("ToggleTouchscreen", resourceCulture); } } /// /// Looks up a localized string similar to Touchscreen. /// internal static string Touchscreen { get { return ResourceManager.GetString("Touchscreen", resourceCulture); } } /// /// Looks up a localized string similar to Turbo. /// internal static string Turbo { get { return ResourceManager.GetString("Turbo", resourceCulture); } } /// /// Looks up a localized string similar to Turned off. /// internal static string TurnedOff { get { return ResourceManager.GetString("TurnedOff", resourceCulture); } } /// /// Looks up a localized string similar to Disable on battery. /// internal static string TurnOffOnBattery { get { return ResourceManager.GetString("TurnOffOnBattery", resourceCulture); } } /// /// Looks up a localized string similar to Routes laptop screen to dGPU, maximizing FPS. /// internal static string UltimateGPUTooltip { get { return ResourceManager.GetString("UltimateGPUTooltip", resourceCulture); } } /// /// Looks up a localized string similar to Ultimate. /// internal static string UltimateMode { get { return ResourceManager.GetString("UltimateMode", resourceCulture); } } /// /// Looks up a localized string similar to Undervolting is an experimental and risky feature. If applied values are too low for your hardware, it can become unstable, shut down or cause data corruption. If you want to try - start from small values first, click Apply and test what works for you.. /// internal static string UndervoltingRisky { get { return ResourceManager.GetString("UndervoltingRisky", resourceCulture); } } /// /// Looks up a localized string similar to Unmuted. /// internal static string Unmuted { get { return ResourceManager.GetString("Unmuted", resourceCulture); } } /// /// Looks up a localized string similar to Updates. /// internal static string Updates { get { return ResourceManager.GetString("Updates", resourceCulture); } } /// /// Looks up a localized string similar to Version. /// internal static string VersionLabel { get { return ResourceManager.GetString("VersionLabel", resourceCulture); } } /// /// Looks up a localized string similar to Vibration Strength. /// internal static string VibrationStrength { get { return ResourceManager.GetString("VibrationStrength", resourceCulture); } } /// /// Looks up a localized string similar to Visual Mode. /// internal static string VisualMode { get { return ResourceManager.GetString("VisualMode", resourceCulture); } } /// /// Looks up a localized string similar to Visual Modes are not available when HDR is active. /// internal static string VisualModesHDR { get { return ResourceManager.GetString("VisualModesHDR", resourceCulture); } } /// /// Looks up a localized string similar to Visual Modes are not available when laptop screen is off. /// internal static string VisualModesScreen { get { return ResourceManager.GetString("VisualModesScreen", resourceCulture); } } /// /// Looks up a localized string similar to Volume Down. /// internal static string VolumeDown { get { return ResourceManager.GetString("VolumeDown", resourceCulture); } } /// /// Looks up a localized string similar to Volume Mute. /// internal static string VolumeMute { get { return ResourceManager.GetString("VolumeMute", resourceCulture); } } /// /// Looks up a localized string similar to Volume Up. /// internal static string VolumeUp { get { return ResourceManager.GetString("VolumeUp", resourceCulture); } } /// /// Looks up a localized string similar to Keep app window always on top. /// internal static string WindowTop { get { return ResourceManager.GetString("WindowTop", resourceCulture); } } /// /// Looks up a localized string similar to Zoom. /// internal static string Zoom { get { return ResourceManager.GetString("Zoom", resourceCulture); } } } } ================================================ FILE: app/Properties/Strings.ar.resx ================================================  text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 تسارع تعذر الاتصال بنظام الطاقة المتقدم من أسوس. لا يمكن للتطبيق العمل بدون هذا النظام. يرجى محاولة تثبيت واجهة التحكم لنظام أسوس. أعد تشغيل جهازك لتطبيق التغييرات هل تريد إعادة التشغيل الآن؟ يبدو أن وحدة معالجة الرسومات قيد الاستخدام المكثف، هل ترغب في تعطيلها؟ وضع التوفير إيقاف وضع الأداء العالي يتطلب إعادة تشغيل تفعيل وضع الأداء العالي يتطلب إعادة تشغيل إعادة التشغيل الآن؟ وحدة تحكم ألي سرعة الحركة أنمي ماتريكس التطبيق يعمل بالفعل التطبيق يعمل بالفعل. يمكنك العثور على أيقونته في شريط المهام بجانب الساعة. تطبيق تطبيق منحنى المروحة المخصص تطبيق حدود الطاقة ضبط أوضاع طاقة ويندوز تلقائيًا الذاكرة المخصصة لوحدة معالجة الرسومات خدمات أسوس قيد التشغيل حالة البطارية تنفس باتجاه عقارب الساعة دورة الألوان مذنب عكس عقارب الساعة سريع وضع الإضاءة عادي قوس قزح عشوائي تفاعل بطيء ثابت وميض الكل القاعدة الشعار عجلة التمرير الإضاءة السفلية تطبيق تلقائي تلقائي يضبط الترددَ على 60 هرتز لتوفيرِ البطاريةِ، ويعود للوضعِ السابقِ عند التوصيلِ بالكهرباء نشط منخفض أقصى متوسط إيقاف مهلة الإضاءة عند التوصيل/على البطارية (0 - تشغيل) مهلة إضاءة الخلفية عند استخدام البطارية مهلة إضاءة الخلفية عند التوصيل بالكهرباء متوازن شحن حد شحن البطارية صحة البطارية شحن لمرة واحدة إلى 100٪ ربط أساسي ثانوي تحديثات البيوس والتعريفات إقلاع صوت الإقلاع السطوع تخفيض السطوع رفع السطوع أيقونة شريط المهام بالأبيض والأسود معايرة جاري الشحن اللون التباين وحدة التحكم تعزيز وحدة المعالجة المركزية مخصص إبطاء افتراضي تعطيل وحدة التحكم تعطيل عند إغلاق الغطاء تعطيل تسريع الشاشة تفريغ الشحن تحميل ملفات تعريف الألوان تحميل التعريفات والبرامج تعطيلُ كرتِ الشاشةِ المنفصلِ لتوفيرِ البطاريةِ توفير الطاقة تفعيل كرت الشاشة عند الإغلاق (يمنع مشاكل وضع التوفير) تعطيل كرت الشاشة المنفصل عن طريق وضع التوفير بينما وضع العرض في لوحة تحكم NVIDIA غير مضبوط على Optimus قد يسبب مشاكل في التحكم بالسطوع حتى إعادة التشغيل القادمة. هل ترغب في المتابعة؟ وضع عرض NVIDIA غير مضبوط على Optimus إعدادات الطاقة تصدير الملف الشخصي إضافي إعدادات إضافية إعدادات المصنع الافتراضية منحنيات المروحة ملف تعريف مروحة وحدة المعالجة المركزية ملف تعريف مروحة وحدة معالجة الرسومات ملف تعريف المروحة المتوسطة ملفات تعريف المروحة المراوح والطاقة المروحة المراوح + الطاقة تعتيم بدون وميض معالجة مفاتيح Fn+F بدون Fn إيقاف قفل FN تشغيل قفل FN تعزيز ديناميكي جاري التغيير إزاحة تردد النواة إزاحة تردد الذاكرة وضع وحدة معالجة الرسومات وحدة معالجة الرسومات المدمجة فقط وحدة معالجة الرسومات المدمجة + المنفصلة وحدة معالجة الرسومات المنفصلة حصرًا طاقة وحدة معالجة الرسومات إعدادات وحدة معالجة الرسومات هدف درجة الحرارة دقائق حتى السبات أثناء النوم على البطارية (0 - إيقاف) مرتفع تدوير الصورة استيراد الملف الشخصي تعيينات المفاتيح لوحة المفاتيح إيقاف جميع التطبيقات التي تستخدم وحدة معالجة الرسومات عند التبديل إلى وضع التوفير إضاءة خلفية للحاسوب المحمول لوحة مفاتيح الحاسوب المحمول شاشة الحاسوب المحمول مؤشرات حالة LED غطاء شريط الإضاءة الإضاءة قفل الشاشة الشعار منخفض مناطق الخمول للعصا اليسرى مناطق الخمول للزناد الأيسر مؤثرات الصوت المرئية لافتة ثنائية ساطع ساعة خافت شعار ROG متوسط إيقاف صورة أعلى معدل تحديث لأقل تأخير معدل تحديث 60 هرتز لتوفير البطارية دقيقة دقائق Angle Snapping / Tuning إيقاف تشغيل الماوس تلقائيًا بعد استجابة أزرار الماوس فشل الاستيراد. الملف المحدد ليس ملف إعدادات ماوس صالح أو تالف. مسافة رفع الماوس تحذير بطارية الماوس المنخفضة عند أداء مزامنة مع الماوس عدة مناطق عدة مناطق قوية مكتوم كتم الميكروفون أبدًا تحديثات جديدة لا توجد تحديثات جديدة غير متصل إيقاف تشغيل منطقة واحدة فتح نافذة G-Helper محسّن التبديلُ إلى وضعِ التوفيرِ عند استخدامِ البطاريةِ وإلى وضعٍ قياسيٍّ عند التوصيلِ بالكهرباءِ الحفاظ على وحدة معالجة الرسومات معطلة عند استخدام شاحن USB-C في الوضع المحسّن أخرى تسريع وضع الأجهزة الطرفية صورة / Gif تشغيل / إيقاف مؤقت معدل الاستطلاع حدود الطاقة حدود الطاقة هي ميزة تجريبية. استخدمها بحذر وعلى مسؤوليتك الخاصة! طباعة الشاشة ملف التعريف خروج إعادة ضبط هناك شيء يستخدم وحدة معالجة الرسومات المنفصلة ويمنع وضع التوفير. هل تريد أن يحاول G-Helper إعادة تشغيل وحدة معالجة الرسومات في مدير الأجهزة؟ (يرجى المتابعة على مسؤوليتك الخاصة) دورة في الدقيقة مناطق الخمول للعصا اليمنى مناطق الخمول للزناد الأيمن تشغيل عند بدء النظام جودة التحجيم خفض سطوع ScreenPad زيادة سطوع ScreenPad إيقاف التشغيل هادئ سكون تفعيلُ وحدةِ معالجةِ الرسوماتِ المنفصلةِ للاستخدامِ القياسيِّ قياسي بدء بدء الخدمات خطأ في بدء التشغيل إيقاف إيقاف تطبيقات وحدة معالجة الرسومات إيقاف الخدمات تبديل Aura تبديل وضع الحاسوب المغلق تلقائيًا تبديل قفل Fn تبديل Miniled (إذا كان مدعومًا) تبديل الشاشة تبديل شاشة اللمس شاشة اللمس توربو تم إيقافها تعطيل على البطارية توجيهُ شاشةِ الحاسوبِ المحمولِ إلى وحدةِ معالجةِ الرسوماتِ المنفصلةِ، مما يزيدُ عددَ الإطاراتِ في الثانيةِ مستوى عالي تقليل الفولتية هي ميزة تجريبية وخطرة. إذا كانت القيم المطبقة منخفضة جدًا لجهازك، فقد يصبح غير مستقر، أو يتوقف أو يتسبب في تلف البيانات. إذا كنت ترغب في التجربة - ابدأ بقيم صغيرة أولاً، انقر على تطبيق واختبر ما يناسبك. غير مكتوم التحديثات الإصدار قوة الاهتزاز وضع العرض أوضاع العرض غير متاحة عندما يكون HDR نشطًا أوضاع العرض غير متاحة عندما تكون شاشة الحاسوب المحمول مطفأة خفض الصوت كتم الصوت رفع الصوت إبقاء نافذة التطبيق دائمًا في المقدمة تكبير تبرع مفتاح الرموز لا يمكن التحقق من الإصدار المحلي Can't check local version يتوفر تحديث Update Available محدّث Updated ارتداد سلاش تحميل تدفق إرسال تدفق انسياب شبح نطاق خطر توصيل منحدر انتهت اللعبة بدء إنذار ثابت مستوى البطارية إيقاف الفاصل الزمني الفاصل الزمني {0}ث الرجاء تعطيل ويندوز > الإضاءة الديناميكية الوضع المحيط قد يزيد من استخدام الموارد Motion Sync Zone Mode ================================================ FILE: app/Properties/Strings.da.resx ================================================  text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Acceleration Kan ikke oprette forbindelse til ASUS ACPI. Applikationen kan ikke fungere uden. Prøv at installere Asus System Control Interface Genstart din enhed for at anvende ændringerne Genstart nu? Ser ud til at GPU er i kraftig brug, vil du deaktivere den? Øko-tilstand Slukning af Ultimativ tilstand kræver genstart Ultimativ tilstand kræver genstart Genstart nu? Ally Controller Animationshastighed Anime Matrix App'en kører allerede G-Helper kører allerede. Tjek systembakken for et ikon. Anvend Anvend blæserkurve Anvend strømgrænser Automatisk justering af Windows strømtilstande Hukommelse tildelt til GPU Kørende ASUS-tjenester Batteritilstand Vejrtrækning Med uret Farvecyklus Komet Mod uret Hurtig Lystilstand Normal Regnbue Tilfældig Reager Langsom Statisk Strobelys Alle Dock Logo Scroll-hjul Underglød Anvend automatisk Automatisk Sætter 60 Hz for at spare på batteri, og tilbage når tilsluttet Vågen Lav Maksimal Mellem Slukket Timeout tilsluttet / på batteri (0 - TIL) Baggrundslys timeout på batteri Timeout for baggrundslys når tilsluttet Balanceret Opladning Batteriopladningsgrænse Batteritilstand Engangsopladning til 100% Binding Primær Sekundær BIOS og driveropdateringer Boot Opstarts-lyd Lysstyrke Lysstyrke ned Lysstyrke op Sort/hvid bakkeikon Kalibrer Oplader Farve Kontrast Controller CPU Boost Brugerdefineret Deceleration Standard Deaktiver Controller Deaktiver ved lukning af låg Deaktiver Overdrive på skærmen Aflader Hent farveprofiler Hent Drivere og software Deaktiverer dGPU for at spare på batteriet Øko Aktiver GPU ved nedlukning (forhindrer problemer med Øko-tilstand) Deaktivering af dGPU ved at gå i Øko-tilstand, mens visningstilstand i NVIDIA Kontrolpanel ikke er indstillet til Optimus kan forårsage problemer med lysstyrkekontrol indtil efter næste genstart. Vil du stadig fortsætte? NVIDIA Visningstilstand er ikke indstillet til Optimus Energiindstillinger Eksporter profil Ekstra Ekstra indstillinger Gendan standarder Blæserkurver CPU blæserkurveprofil GPU blæserkurveprofil Midt blæserprofil Blæserprofiler Blæsere og strøm Blæser Blæser + Strøm Flimmerfri dæmpning Aktiver Fn + F genvejstaster uden Fn Fn-lås fra Fn-lås til Dynamisk boost Skifter Core Clock offset Memory Clock offset GPU-tilstand Kun iGPU iGPU + dGPU dGPU eksklusivt GPU-strøm GPU-indstillinger Temperaturmål Minutter til dvale i standby på batteriet (0 - OFF) Høj Billedrotation Importer profil Tastebindinger Tastatur Stop alle apps der bruger GPU når du skifter til Øko Laptop baggrundsbelysning Laptop-tastatur Laptop-skærm LED statusindikatorer Låg Lightbar Belysning Låseskærm Logo Lav Venstre stick dødzoner Venstre udløser dødzoner Lydvisualisering Binær banner Kraftigt Ur Dæmpet ROG logo Middel Slukket Billede Maks. opdateringshastighed for lavere latenstid 60Hz opdateringshastighed for at spare på batteriet minut minutter Angle Snapping / Tuning Automatisk slukning efter Knaprespons Import mislykkedes. Den valgte fil er ikke en gyldig museprofil eller den er korrupteret. Løfteafstand Lav batteriadvarsel ved Ydelse Synkroniser med mus Multizone Multizone stærk Lydløs Lydløs mikrofon Aldrig Nye opdateringer Ingen nye opdateringer Ikke tilsluttet Fra Til En zone Åbn G-Helper vindue Optimeret Skift til Øko på batteri og til Standard, når tilsluttet strøm Hold GPU deaktiveret på USB-C oplader i optimeret tilstand Andet Overdrive Tilstand Tilbehør Billede / Gif Afspil / Pause Polling Rate Strømgrænser Strømgrænser er en eksperimentel funktion. Brug omhyggeligt og på egen risiko! PrintScreen Profil Afslut Nulstil Noget bruger dGPU og forhindrer Øko-tilstand. Lad G-Helper forsøge at genstarte dGPU i enhedshåndtering? (fortsæt på egen risiko) RPM Højre stick dødzoner Højre udløser dødzoner Kør ved opstart Skaleringskvalitet Screenpad lysstyrke ned Skærmtastatur lysstyrke op Luk ned Lydløs Standby Aktiverer dGPU til standardbrug Standard Start Starter tjenester Startfejl Stop Stop GPU-programmer Stopper tjenester Slå Aura til/fra Slå automatisk Clamshell-tilstand til/fra Slå Fn-lås til/fra Slå MiniLED til/fra (hvis understøttet) Slå skærmen til/fra Toggle Touchscreen Touchscreen Turbo Slukket Deaktiver på batteri Kobler laptop-skærmen direkte til dGPU, hvilket maksimerer FPS Ultimativ Undervolting er en eksperimentel og risikabel funktion. Hvis de anvendte værdier er for lave for din hardware, kan det blive ustabilt, lukke ned eller forårsage datakorruption. Hvis du ønsker at prøve - start fra små værdier først, klik på Anvend og test hvad der virker for dig. Ikke lydløs Opdateringer Version Vibrationsstyrke Visuel tilstand Visuelle tilstande er ikke tilgængelige, når HDR er aktiv Visuelle tilstande er ikke tilgængelige, når laptopskærmen er slukket Lydstyrke ned Lydløs Lydstyrke op Hold altid appvinduet øverst Zoom Donate Legend Can't check local version Can't check local version Update Available Update Available Updated Updated Bounce Slash Loading Bit Stream Transmission Flow Flux Phantom Spectrum Hazard Interfacing Ramp Game Over Start Buzzer Static Battery Level Interval Off Interval {0}s Please disable Windows > Dynamic Lighting Ambient mode may increase resource usage Motion Sync Zone Mode ================================================ FILE: app/Properties/Strings.de.resx ================================================  text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Beschleunigung Verbindung zu ASUS ACPI fehlgeschlagen. G-Helper kann nicht ausgeführt werden. Bitte installiere ASUS System Control Interface. Gerät neu starten, um Änderungen anzuwenden? Jetzt neu starten? Die GPU wird gerade verwendet. Trotzdem deaktivieren? Eco Modus Deaktivieren des Ultimate Modus benötigt einen Neustart. Aktivieren des Ultimate Modus benötigt einen Neustart. Jetzt neu starten? Ally Controller Animationsgeschwindigkeit AniMe Matrix Die Anwendung läuft bereits G-Helper läuft bereits. Bitte prüfe den Systemtray. Anwenden Lüfterkurve anwenden Leistungsgrenzen anwenden Windows Leistungsmodus automatisch anpassen GPU zugewiesener Speicher ASUS Dienste laufen Batteriezustand Atmen Im Uhrzeigersinn Farbwechsel Komet Gegen den Uhrzeigersinn Schnell Beleuchtungsmodus Normal Regenbogen Zufällig Reagierend Langsam Statisch Stroboskop Alle Dock Logo Scrollrad Front Automatisch anwenden Auto 60Hz im Batteriebetrieb. Maximal, wenn eingesteckt. Im Betrieb Niedrig Max Mittel Aus Timeout angeschlossen / bei Akku (0 = An) Backlight Timeout when on battery Backlight Timeout when plugged Ausbalanciert Akkustand Ladebegrenzung Batteriezustand Einmalig auf 100% aufladen Binding Primär Sekundär BIOS und Treiber Updates Hochfahren Boot-Sound Helligkeit Helligkeit verringern Helligkeit erhöhen Taskleistensymbol in Schwarzweiß Kalibrieren Lädt Farbe Kontrast Controller CPU-Boost Benutzerdefiniert Verlangsamung Standard Controller deaktivieren Beim Schließen des Deckels deaktivieren Bildschirm: Overdrive abschalten Entlädt Farbprofile herunterladen Download Treiber und Software dGPU zum Stromsparen abschalten Eco Aktiviere GPU beim Herunterfahren (verhindert Problem im Eco-Modus) Die dGPU zu deaktivieren, indem Sie in den Eco-Modus wechseln während der Anzeigemodus nicht auf Optimus eingestellt ist, kann zu Problemen mit der Helligkeitseinstellung führen. Trotzdem fortfahren? Nvidia Anzeigemodus ist nicht auf Optimus eingestellt Energieeinstellungen Profil exportieren Extra Extra-Einstellungen Werkseinstellungen Lüfterkurven CPU Lüfterprofil GPU Lüfterprofil Mittleres Lüfterprofil Lüfterprofile Lüfter und Leistung Lüfter Lüfter + Leistung Flackerfreies Dimmen Fn+F Funktionen ohne Fn Taste nutzen Fn-Sperre aus Fn-Sperre an Dynamic Boost Wechseln Kernfrequenz Anpassung Speicherfrequenz Anpassung GPU Modus Nur iGPU iGPU + dGPU Nur dGPU GPU-Leistung GPU Einstellungen Maximale GPU Temperatur Minuten bis zum Ruhezustand im Standby (0 = Aus) Hoch Bilddrehung Profil importieren Tastenbelegung Tastatur Alle Anwendungen auf der dGPU beim Wechsel in den Eco Modus beenden. Laptopbeleuchtung Laptoptastatur Laptopbildschirm LED-Statusanzeige Deckel Leuchtstreifen Beleuchtung Bildschirm sperren Logo Niedrig Left Stick Deadzones Left Trigger Deadzones Audio Visualisierung Binäres Banner Hell Uhr Dunkel ROG Logo Mittel Aus Bild Maximale Wiederholrate für niedrigste Latenz 60Hz um Strom zu sparen Minute Minuten Angle Snapping / Tuning Automatisch abschalten nach Tastenreaktionsgeschwindigkeit Import fehlgeschlagen. Die ausgewählte Datei ist kein gültiges Mausprofil oder beschädigt. Lift Off Distance Batteriewarnung bei Leistung Maus synchronisieren Multi Zone Multi Zone Strong Stumm Mikrofon stummschalten Niemals Neue Updates: Keine Updates Nicht verbunden Aus An One Zone G-Helper Fenster öffnen Optimiert Eco-Modus im Batteriebetrieb. Standard, wenn eingesteckt. dGPU beim USB-C Laden im Optimierten Modus deaktiviert lassen Sonstiges Overdrive Leistungsmodus Zubehör Bild / GIF Wiedergabe / Pause Abfragerate Leistungsbegrenzung Leistungsbegrenzung ist experimentell. Nutzung erfolgt auf eigene Gefahr! Druck Profil Schließen Zurücksetzen Ein Prozess verhindert den Wechsel in den Eco-Modus. dGPU neu starten? Fortfahren auf eigene Gefahr. U/Min Right Stick Deadzones Right Trigger Deadzones Beim Start ausführen Skalierungsqualität Screenpad Helligkeit verringern Screenpad-Helligkeit erhöhen Herunterfahren Leise Standby dGPU aktivieren Standard Starten Starte Dienste Startfehler Beenden GPU Anwendungen beenden Beende Dienste Aura umschalten Clamshell Modus automatisch aktivieren FN Sperre umschalten MiniLED umschalten Bildschirm umschalten Touchscreen umschalten Touchscreen Turbo Ausgeschaltet Im Batteriebetrieb abschalten Verbindet den Bildschirm mit der dGPU für maximale Leistung. Ultimativ Die Spannungsabsenkung (Undervolting) ist experimentell und birgt Risiken. Wenn die Spannung zu weit abgesenkt wird, wird der Computer instabil und kann abstürzen, was zu Datenverlust führen kann. Es empfiehlt sich mit kleinen Werten anzufangen und ausgiebig zu testen, um den idealen Wert zu finden. Laut Aktualisierungen Version Vibrationsstärke Darstellungsmodus Darstellungsmodi sind nicht verfügbar, wenn HDR aktiv ist. Modi nicht verfügbar, wenn Laptop-Bildschirm aus ist. Lautstärke verringern Stummschalten Lautstärke erhöhen Fenster immer über allen anderen Zoom Spenden Legende Kann lokale Version nicht überprüfen Can't check local version Update verfügbar Update Available Aktuell Updated Bounce Slash Loading Bit Stream Transmission Flow Flux Phantom Spectrum Hazard Interfacing Ramp Game Over Start Buzzer Static Battery Level Interval Off Interval {0}s Bitte deaktivieren Sie Windows Dynamische Beleuchtung Ambient-Modus kann die Ressourcennutzung erhöhen Motion Sync Zone Mode ================================================ FILE: app/Properties/Strings.es.resx ================================================  text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Aceleración No se pudo conectar con ASUS ACPI. La aplicación no puede funcionar sin el recurso. Instale Asus System Control Interface Reinicia el dispositivo para aplicar los cambios ¿Reiniciar ahora? Detectado uso intensivo de la GPU, ¿deshabilitarla? Modo Eco Desactivar el Modo Ultimate requiere reiniciar Activar el Modo Ultimate requiere reiniciar ¿Reiniciar ahora? Mando Ally Velocidad AniMe Matrix La apliación ya está ejecutándose G-Helper ya está ejecutándose. Compruebe la bandeja del sistema. Aplicar Aplicar curva personalizada Aplicar límites de energía Autoajustar plan de energía Windows Memoria asignada a GPU Servicios de Asus en ejecución Estado de la batería Respiración Sentido horario Ciclo de color Cometa Sentido anti-horario Rápido Modo de iluminación Normal Arcoíris Aleatorio Sensible Lento Estático Estroboscópico Todo Dock Logo Rueda de desplazamiento Underglow Autoaplicar Automático Establece 60Hz con batería y revierte cuando está enchufado Encendida Bajo Máximo Medio Apagado Tiempo de espera conectado / con batería (0 - ON) Tiempo de retroiluminación con batería Tiempo de retroiluminación conectado Equilibrado Carga Límite de carga Salud de la batería Cargar una vez al 100% Emparejado Primario Secundario Actualizaciones de BIOS y Drivers Al arrancar Sonido al arranque Brillo Bajar brillo Subir brillo Icono de bandeja blanco y negro Calibrar Cargando Color Contraste Mando CPU Boost Personalizado Desaceleración Por defecto Deshabilitar mando Desactivar al cerrar la tapa Desactivar Overdrive Descargando Descargar perfiles de color Descargar Drivers y Software Deshabilita la dGPU para ahorrar batería Eco Habilitar GPU al apagar (evita problemas con el modo Eco) Deshabilitar la dGPU cambiando a modo Eco mientras el Modo de Pantalla en el Panel de Control de NVIDIA no está configurado en Optimus puede causar problemas con el control del brillo hasta después del próximo reinicio. ¿Seguro que desea continuar? Modo de Pantalla NVIDIA no está configurado en Optimus Ajustes de energía Exportar perfil Adicional Opciones adicionales Valores de fábrica Curvas de ventiladores Perfil ventilador CPU Perfil ventilador GPU Perfil ventilador central Ventiladores Ventiladores y energía Fan Ventiladores + Energía Atenuación sin parpadeo Usar teclas de acceso rápido (Fn+F) sin pulsar Fn Tecla Fn normal Tecla Fn bloqueada Dynamic Boost Cargando Core Clock Offset Memory Clock Offset Modo de GPU Sólo iGPU iGPU + dGPU Exclusivo dGPU Energía de GPU Ajustes de GPU Temperatura objetivo Minutos hasta hibernación en suspensión con batería (0 - OFF) Alto Rotación de imagen Importar perfil Teclas de acceso rápido Teclado Detener todas las aplicaciones que usan la dGPU cuando se cambia a Eco Retroiluminación Teclado del portátil Pantalla del portátil Indicadores de estado LED Tapa Barra de luz Iluminación Pantalla de bloqueo Logo Bajo Punto muerto stick izquierdo Punto muerto gatillo izquierdo Visualizador de audio Banner binario Brillante Reloj Tenue Logo ROG Medio Apagado Imagen Frecuencia de actualización máxima para una latencia más baja Frecuencia de actualización de 60Hz para ahorrar batería Minuto Minutos Corrección de Ángulo / Ajuste Auto-apagar tras Respuesta del botón Importación fallida. El archivo seleccionado no es un perfil válido o está corrupto. Distancia de despegue (LOD) Aviso de batería baja al Rendimiento Sincronizar con el ratón Multizona Multizona fuerte Silenciado Silenciar micrófono Nunca Nuevas actualizaciones No hay actualizaciones No conectado Apagado Encendido Una zona Abrir ventana G-Helper Optimizado Cambiar a Eco con batería y a Estándar cuando está enchufado Deshabilitar dGPU con cargador USB-C en modo Optimizado Otro Overdrive Modo Periféricos Imagen / Gif Reproducir / Pausar Velocidad de respuesta Límites de energía Los límites de energía son una característica experimental. ¡Úselo con cuidado y bajo su propio riesgo! Capturar pantalla Perfil Quitar Reiniciar Algo está usando la dGPU e impide el modo Eco. ¿Reiniciar dGPU en el administrador de dispositivos? (Proceda bajo su propio riesgo) RPM Punto muerto stick derecho Punto muerto gatillo derecho Ejecutar al inicio Calidad del escalado Bajar brillo ScreenPad Subir brillo ScreenPad Al apagar Silencio En suspensión Habilita la dGPU para uso estándar Estándar Iniciar Iniciando servicios Error al iniciar Detener Detener aplicaciones dGPU Deteniendo servicios Alternar Aura Cambiar automáticamente a modo Clamshell Alternar bloqueo Fn Alternar Miniled (si compatible) Alternar pantalla Alternar pantalla táctil Pantalla táctil Turbo Apagado Apagar con batería Enruta la pantalla del portátil a la dGPU, maximizando FPS Ultimate Undervolting es una característica experimental. Aplicar valores demasiado bajos puede causar inestabilidad en el hardware o corrupción de datos. Si desea probar, empiece con valores pequeños, haga click en Aplicar y pruebe. No silenciado Actualización Versión Intensidad de vibración Modo visual Los modos visuales no están disponibles cuando el HDR está activo Los modos visuales no están disponibles cuando la pantalla portátil está apagada Bajar volumen Silenciar volumen Subir volumen Mantener aplicación siempre visible Zoom Donar Leyenda No se puede comprobar la versión local Can't check local version Actualización disponible Update Available Actualizado Updated Bote Barra inclinada Cargando Flujo de bits Transmisión Fluir Flujo Fantasma Espectro Peligro Interfaces Rampa Fin de la partida Comenzar Zumbador Estático Nivel de Batería Intervalo Apagado Intervalo {0}s Por favor, desactive Windows > Iluminación dinámica El modo ambiente puede aumentar el uso de recursos Sincronización de movimiento Modo zona ================================================ FILE: app/Properties/Strings.fr.resx ================================================  text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Accélération Connexion impossible avec ASUS ACPI. L'application ne peut fonctionner sans. Veuillez installer Asus System Control Interface Redémarrez votre appareil pour appliquer les modifications Redémarrer maintenant ? Le GPU semble être surchargé, voulez-vous le désactiver ? Mode Éco Désactiver le Mode Ultime requiert un redémarrage Activer le Mode Ultime requiert un redémarrage Redémarrer maintenant ? Contrôleur Ally Vitesse de l'animation Anime Matrix L'application est déjà en cours d'exécution G-Helper est déjà en cours d'exécution. Vérifiez la barre d'état système. Appliquer Appliquer la courbe Appliquer les limites Ajustement auto des modes de gestion alim. Windows Mémoire attribuée au GPU Services Asus actifs État de la batterie Pulsation Sens horaire Cycle de couleur Comète Sens antihoraire Rapide Effets d'éclairage Normal Arc-en-ciel Aléatoire Réagir Lent Statique Stroboscopique Tout Station d'accueil Logo Molette Led ROG Appliquer automatiquement Automatique Limite à 60 Hz pour éco. batterie, valeur normale sur secteur Allumé Faible Maximum Moyen Désactivé Délai branché / sur batterie (0 - ON) Délai de rétro-éclairage sur batterie Délai de rétro-éclairage sur secteur Équilibré Charge de la batterie Limite de charge Santé de la batterie Charge unique à 100% Liaison Primaire Secondaire Mises à jour BIOS et pilotes Au démarrage Son au démarrage Luminosité Baisser la luminosité Augmenter la luminosité Icône de la zone de notification en noir et blanc Calibrer Taux de charge Couleur Contraste Contrôleur CPU Boost Personnalisé Décélération Par défaut Désactiver le contrôleur Désactiver à la fermeture du capot Désactiver l'overdrive de l'écran Taux de décharge Télécharger les profils de couleurs Télécharger Pilotes et logiciels Désactive le dGPU pour préserver la batterie Éco Activer le GPU lors de l'arrêt (empêche les problèmes avec le mode Éco) Désactiver le dGPU en passant au mode Eco pendant que le mode d'affichage dans le panneau de configuration NVIDIA n'est pas réglé sur Optimus peut causer des problèmes avec les commandes de luminosité jusqu'au prochain redémarrage. Voulez-vous continuer ? Le mode d'affichage NVIDIA n'est pas réglé sur Optimus Paramètres d'énergie Exporter profil + d'options Paramètres supplémentaires Paramètres d'usine Courbes des ventilateurs Profil du ventilateur CPU Profil du ventilateur GPU Profil du ventilateur central Profil des ventilateurs Ventilateurs + Puissance Ventilateur Ventilateurs + Puissance Gradation OLED sans scintillement Traiter les raccourcis clavier Fn+F sans Fn Verrouillage Fn désactivé Verrouillage Fn activé Dynamic Boost Changement Ajustement fréq. de base Ajustement fréq. mémoire Mode GPU iGPU uniquement iGPU + dGPU dGPU exclusif Puissance du GPU Paramètres du GPU Température cible Minutes avant mise en veille prolongée sur batterie (0 - OFF) Élevé Rotation de l'image Importer profil Raccourcis clavier Clavier Arrêter toutes les applications utilisant la dGPU lors du passage au mode Eco Rétroéclairage du clavier Clavier Écran Indicateurs d'état LED Capot Barre lumineuse Éclairage Écran de verrouillage Logo Faible Stick gauche des zones mortes Gâchette gauche des zones mortes Visualiseur Audio Bannière binaire Lumineux Horloge Faible Logo ROG Moyen Éteint Images Rafraîchissement maximum, faible latence Rafraichîssement 60 Hz pour économiser de la batterie Minute Minutes Angle Snapping / Tuning Arrêt automatique après Réponse du bouton Échec de l'importation. Le fichier sélectionné n'est pas un profil de souris valide ou corrompu. Hauteur de détection Avertissement de batterie faible à Performance Synchroniser avec le pointeur Multi-zones Forte zone multiple Son désactivé Désactiver le micro Jamais Nouvelles mises à jour Aucune mise à jour disponible Non connecté Désactivé Activé Une zone Ouvrir G-Helper Optimisé Éco sur batterie, bascule vers Standard sur secteur Garder le GPU désactivé lorsque branché via USB-C en mode Optimisé Autres Overdrive Mode Périphériques Image / Gif Lecture / Pause Fréquence d'interrogation Limites de puissance Limites de puissance est une fonctionnalité expérimentale. Faire attention, à utiliser à vos risques ! Capture d'écran Profil Quitter Réinitialiser Un programme utilise le dGPU et empêche le passage en mode Éco. Laissez G-Helper tenter un redémarrage du dGPU dans le gestionnaire de tâches ? (Procéder à vos propres risques) RPM Stick droit des zones mortes Gâchette droite des zones mortes Exécuter au démarrage Qualité de Mise à l'échelle (Scaling) Baisser la luminosité du Screenpad Augmenter la luminosité du Screenpad Arrêter Silencieux Veille Active le dGPU pour une utilisation standard Standard Démarrer Démarrage des services Erreur au lancement Stop Arrêt des applications dGPU Arrêt des services Activer Aura Basculer automatiquement en mode Clamshell Activer/désactiver Fn-Lock Activer Miniled (si supporté) Allumer l'écran Activer/désactiver l'écran tactile Écran tactile Turbo Éteint Éteindre sur batterie Redirige l'écran du portable vers le dGPU, maximisation taux FPS Ultime L'undervolting est une fonctionnalité expérimentale et risquée. Si les valeurs appliquées sont trop faibles, elles peuvent causer de l'instabilité, éteindre l'ordinateur ou causer une corruption de données. Si vous voulez essayer - commencer avec des petites valeurs, cliquez sur Appliquer et testez ce qui fonctionne pour vous. Son activé Mises à jour Version Intensité de la vibration Mode d'affichage Les modes visuels ne sont pas disponibles lorsque le HDR est actif Les modes visuels ne sont pas disponibles lorsque l'écran de l'ordinateur portable est éteint Vol- Mettre en sourdine Vol+ Maintenir la fenêtre au premier plan Zoom Faire un don Légende Impossible de vérifier la version actuelle Can't check local version Mise à jour disponible Update Available Mis à jour Updated Bounce Slash Сhargement Flux de bits Transmission Flow Flux Phantom Spectrum Hazard Interfacing Rampe Game Over Début Buzzer Statique Niveau de la batterie Intervalle désactivé Intervalle {0}s Veuillez désactiver l'Éclairage dynamique Windows > Le mode Ambiant peut augmenter l'utilisation des ressources Motion Sync Zone Mode ================================================ FILE: app/Properties/Strings.hu.resx ================================================  text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Gyorsítás Nem sikerült csatlakozni az ASUS ACPI-hez, az alkalmazás nem működik enélkül. Próbáld meg telepíteni az ASUS rendszervezérlő interfész-t Indítsd újra az eszközödet a változtatások érvényesítéséhez Újraindítás most? Úgy tűnik használatban van a GPU. Biztosan letiltod? Eco mód Az Ultimate mód kikapcsolása után újraindítás szükséges Az Ultimate mód használatához újraindítás szükséges Újraindítja most? Ally vezérlő Animáció sebessége Anime Matrix Az alkalmazás már el lett inítva A G-Helper már fut. A rendszertárcán megtalálod az alkalmazás ikonját. Alkalmaz Egyedi ventigörbe használata Teljesítménykorlátok alkalmazása A Windows energiagazdálkodási módok automatikus beállítása A GPU-nak kiosztott memória Asus szolgáltatások futnak Akkuállapot Lélegző Jobbra forog Színváltás Üstökös Balra forog Gyors Világítás típusa Normál Szivárvány Véletlen Reagál Lassú Állandó Stroboszkóp Mindegyik Dokk Logó Görgetés Alsó világítás Automatikus alkalmazás Automata Átállítja 60Hz-re, hogy spóroljon az akku-val, majd töltőn vissza Ébren Alacsony Maximum Közepes Ki Késleltetés töltés / akku módban (0 - BE) Háttérvilágítás időkorlátja akkumulátoros üzemmódban Háttérvilágítás időkorlátja hálózati áramról való üzemeléskor Teljesítmény Töltés Töltési korlát Akku állapot Egyszeri 100%-os feltöltés Hozzárendelés Elsődleges Másodlagos BIOS és illesztőprogram frissítések Rendszerbetöltés Rendszerindítási hang Fényerő Fényerő csökkentése Fényerő növelése Fekete-fehér tálca ikon Kalibrálás Töltés Szín Kontraszt Kontroller CPU gyorsítás Egyéni Lassítás Alapért. Kontoller letiltása Letiltása képernyő lehajtásakor Képernyőtúlhajtás letiltása Merülés Színprofilok letöltése Letöltés Illesztőprogramok és alkalmazások Letiltja a dGPU-t, hogy spóroljon az akkuval Eco GPU engedélyezése kikapcsoláskor (megakadályozza az Eco mód problémát) A dGPU letiltása Eco módba kapcsolással, miközben az NVIDIA Vezérlőpultban a Kijelző mód nincs Optimus-ra állítva, problémákat okozhat a fényerővezérlésben, amíg a következő újraindítás meg nem történik. Folytatni szeretnéd? NVIDIA kijelzőmód nincs Optimus-ra állítva Energia beállítások Profil exportálása Extra Extra beállítások Gyári alapértékek Ventilátorgörbe CPU ventilátor profil GPU ventilátor profil Középső ventilátor profil Ventilátor profilok Ventilátor és energia Ventilátor Venti + energia Villogásmentes halványítás Fn + F gyorsgombok feldolgozása Fn nélkül Fn-Lock Ki Fn-Lock Be Dinamikus gyorsítás Váltás... Magórajel eltolás Memória órajel eltolás GPU mód Csak iGPU iGPU + dGPU kizárólag dGPU GPU erő GPU beállítások Célhőmérséklet Akku módban az alvó módból Hibernálásig eltelt idő (0 - KI) Magas Kép elforgatás Profil importálása Gyorsbillentyűk Billentyűzet Eco módba lépéskor minden alkalmazást leállít, ami a GPU-t használja Laptop háttérvilágítás Laptop billentyűzet Laptop kijelző LED Állapotjelzők Fedél Fénysáv Világítás Képernyő zarolása Logó Alacsony Bal kar irányító holtjátékai Bal ravasz holtjátékai Hang vizualizáció Bináris logó Fényes Óra Halvány Rog logó Közepes Ki Kép Max frissítési gyakoriság kevés késleltetéshez 60Hz-s frissítési gyakoriság, hogy spóroljon az akkuval perc perc Angle Snapping / Tuning Automatikus kikapcsolás idő múlva Gomb funkciója Importálás nem sikerült. A kiválasztott fájl nem érvényes egérprofil, vagy sérült. Emelési távolság Alacsony akkumulátor figyelmeztetés ekkor Teljesítmény Szinkronizálás egérrel Multi Zóna Erős Multi Zóna Mikrofon Ki Mikrofon némítása Soha Új frissítés Nincs új frissítés Nincs csatlakoztatva Ki Be Egy Zóna G-Helper ablak megnyitása Optimalizált Akkus módban váltson Eco módra, töltéskor pedig Standard-ra Optimalizált módban USB-C-s töltés közben tartsa letiltva a GPU-t Egyéb Túlhajtás Üzemmód Perifériák Kép / Gif Indít / Megállít Polling Rate Teljesítménykorlátok A Teljesítménykorlát egy kísérleti funkció. Használja körültekintően és saját felelősségére! PrintScreen Profil Bezárás Visszaállítás Valami használja még a dGPU-t, ezzel megakadályozva az Eco móda lépést. Próbálja meg a G-Helper újraindítani a dGPU-t az eszközkezelőben? (Kérjük, saját felelősségére folytassa) Fordulatszám Jobb kar irányító holtjátékai Right Trigger Deadzones Indítás a rendszerrel Scaling Quality Screenpad fényerő csökkentése Screenpad fényerő növelése Leállítás Csendes Alvás Általános használathoz engedélyezi a dGPU-t Standard Indítás Szolgáltatások elindítása Indítási hiba Leállít GPU alkalmazások leállítása Szolgáltatások leállítása AURA ki-/bekapcsolása Auto Toggle Clamshell Mode Fn-Lock ki-/bekapcsolása MiniLED ki-/bekapcsolása (ha támogatott) Képernyő ki-/bekapcsolása Érintőképernyő ki-/bekapcsolása Touchscreen Turbó Kikapcsolva Akkus üzemmódban kikapcsol A jobb FPS érdekében a laptop kijelzőt közvetlenül a GPU-n keresztül működteti Ultimate Undervolting is an experimental and risky feature. If applied values are too low for your hardware, it can become unstable, shut down or cause data corruption. If you want to try - start from small values first, click Apply and test what works for you. Mikrofon Be Frissítések Verzió Vibration Strength Képernyőszín Mód Visual Modes are not available when HDR is active Visual Modes are not available when laptop screen is off Lehalkítás Némítás Hangosítás Alkalmazás maradjon mindig felül Zoom Donate Legend Can't check local version Can't check local version Update Available Update Available Updated Updated Bounce Slash Loading Bit Stream Transmission Flow Flux Phantom Spectrum Hazard Interfacing Ramp Game Over Start Buzzer Static Battery Level Interval Off Interval {0}s Please disable Windows > Dynamic Lighting Ambient mode may increase resource usage Motion Sync Zone Mode ================================================ FILE: app/Properties/Strings.id.resx ================================================  text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Akselerasi Tidak dapat terhubung ke ASUS ACPI. tanpanya aplikasi tidak dapat berfungsi. Cobalah untuk menginstal Asus System Control Interface Muat ulang perangkat anda untuk menerapkan perubahan Mulai ulang sekarang? Tampaknya GPU sedang digunakan intensif, nonaktifkan? Mode Eco Mematikan Mode Ultimate memerlukan restart. Mode Ultimate memerlukan restart Mulai ulang sekarang? Ally Controller Kecepatan Animasi Anime Matrix Aplikasi sudah berjalan G-Helper sudah berjalan. Periksa system tray untuk menemukan ikonnya. Terapkan Terapkan Custom Fan Curve Terapkan Batas Daya Otomatis sesuaikan Mode Daya Windows Memory Assigned to GPU Layanan Asus Berjalan Status Baterai Bernapas Searah Jarum Jam Siklus Warna Komet Berlawanan Jarum Jam Cepat Mode Pencahayaan Normal Pelangi Acak Reaksi Pelan Statis Berkedip Semua Dok Logo Roda Gulir Cahaya Bawah Terapkan Secara Otomatis Otomatis Atur ke 60Hz untuk menghemat baterai, dan kembalikan saat mengisi daya Bangun Lemah Kuat Sedang Mati Waktu tunggu dicolokan / menggunakan baterai (0 - Hidup) Backlight Timeout when on battery Backlight Timeout when plugged Seimbang Baterai Batas Pengisian Baterai Kesehatan Baterai Isi daya sekali hingga mencapai 100% Binding Utama Sekunder Pembaruan BIOS dan Driver Boot Suara Boot Kecerahan Kurangi Kecerahan Tingkatkan Kecerahan Black and white tray icon Kalibrasi Mengisi Daya Warna Kontras Controller CPU Boost Kustom Perlambatan Standar Disable Controller Disable on lid close Nonaktifkan screen overdrive Tidak mengisi Download Color Profiles Unduh Driver dan Software Menonaktikan dGPU untuk menghemat baterai Eco Enable GPU on shutdown (prevents issue with Eco mode) Menonaktikan dGPU dengan masuk ke mode Eco saat Mode Tampilan di Panel Kontrol NVIDIA tidak diatur ke Optimus mungkin dapat menyebabkan masalah dengan kontrol kecerahan hingga mulai ulang berikutnya. Apakah Anda masih ingin melanjutkan? Mode Tampilan NVIDIA tidak diatur ke Optimus Pengaturan Energi Ekspor Profil Ekstra Pengaturan Ekstra Setelan Pabrik Kurva Kipas Profil Kipas CPU Profil Kipas GPU Profil Kipas Sedang Profil Kipas Kipas dan Daya Kipas Kipas + Daya Flicker-free Dimming Proses tombol pintas Fn+F tanpa Fn FN-Lock Off FN-Lock On Dynamic Boost Mengubah Core Clock Offset Memory Clock Offset Mode GPU Hanya iGPU iGPU + dGPU dGPU eksklusif GPU Power Pengaturan GPU Target Suhu Menit hingga Hibernasi dalam mode tidur saat menggunakan baterai (0 - Mati) Tinggi Rotasi Gambar Impor Profil Pintasan Keyboard Keyboard Hentikan semua aplikasi yang menggunakan GPU saat beralih ke mode Eco Laptop Backlight Laptop Keyboard Layar Laptop LED Status Indicators Lid Lightbar Lighting Layar Kunci Logo Rendah Left Stick Deadzones Left Trigger Deadzones Visualisasi Audio Binary Banner Terang Jam Redup Logo Rog Sedang Mati Gambar Maks refresh rate untuk mengurangi latensi 60Hz refresh rate untuk menghemat baterai Menit Menit Angle Snapping / Tuning Mati Otomatis Setelah Respon Tombol Import failed. Selected file is not a valid mouse profile or corrutpted. Jarak Angkat Peringatan Baterai Rendah pada Performa Sinkronkan dengan mouse Multi Zone Multi Zone Strong Di Bisukan Bisukan Mic Jangan Pernah Pembaruan Terbaru Tidak ada pembaruan Tidak Tersambung Mati Hidup One Zone Buka Jendela G-Helper Dioptimalkan Beralih ke Mode Eco saat menggunakan baterai dan ke Mode Standar saat mengisi daya. Tetap matikan GPU pada pengisi daya USB-C dalam mode Dioptimalkan Lainnya Overdrive Mode Periferal Gambar / Gif Putar / Jeda Polling Rate Batas Daya Batas Daya adalah fitur eksperimental. Gunakan dengan hati-hati dan atas risiko Anda sendiri! PrintScreen Profil Keluar Reset Ada yang menggunakan dGPU dan mencegah mode Eco. Biarkan G-Helper mencoba memulai ulang dGPU di pengelola perangkat? (Silakan lanjutkan dengan risiko Anda sendiri) RPM Right Stick Deadzones Right Trigger Deadzones Jalankan di Startup Scaling Quality Kurangi Kecerahan Screenpad Tingkatkan Kecerahan Screenpad Matikan Diam Tidur Mengaktifkan dGPU untuk penggunaan standar Standar Mulai Memulai Services Startup Error Berhenti Hentikan Aplikasi GPU Menghentikan Services Hidupkan/Matikan Aura Otomatis Hidupkan/Matikan Mode Clamshell Hidupkan/Matikan Fn-Lock Toggle Miniled (jika didukung) Hidupkan/Matikan Layar Toggle Touchscreen Touchscreen Turbo Dimatikan Matikan saat menggunakan baterai Merutekan layar laptop ke dGPU, memaksimalkan FPS Ultimate Undervolting adalah fitur eksperimental dan berisiko. Jika nilai yang diterapkan terlalu rendah untuk perangkat keras Anda, ini dapat menjadi tidak stabil, mati mendadak, atau menyebabkan kerusakan data. Jika Anda ingin mencobanya, mulailah dengan nilai kecil terlebih dahulu, klik Terapkan, dan uji apa yang cocok untuk Anda. Bunyikan Pembaruan Versi Kekuatan Getaran Mode Visual Mode Visual tidak tersedia saat HDR aktif Mode Visual tidak tersedia saat layar laptop mati Volume Turun Volume Bisu Volume Naik Jaga agar jendela aplikasi selalu di atas Perbesar Donate Legend Can't check local version Can't check local version Update Available Update Available Updated Updated Bounce Slash Loading Bit Stream Transmission Flow Flux Phantom Spectrum Hazard Interfacing Ramp Game Over Start Buzzer Static Battery Level Interval Off Interval {0}s Please disable Windows > Dynamic Lighting Ambient mode may increase resource usage Motion Sync Zone Mode ================================================ FILE: app/Properties/Strings.it.resx ================================================  text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Accelerazione Impossibile connettersi ad ASUS ACPI. Senza di essa l'applicazione non può funzionare. Prova ad installare Asus System Control Interface Riavvia il dispositivo per applicare le modifiche Riavviare ora? Uso intensivo della GPU, disabilitare? Modalità Eco Per disattivare la modalità Estrema è necessario riavviare Per attivare la modalità Estrema è necessario riavviare Riavviare ora? Ally Controller Velocità animazione Anime Matrix App già in esecuzione G-Helper è già in esecuzione. Controlla l'icona nel system tray. Applica Applica Curve Ventola Applica Limiti di Potenza Regola Piano Energetico di Windows in automatico Memoria assegnata alla GPU Servizi Asus in Esecuzione Stato Batteria Respiro Senso Orario Ciclo Colori Cometa Senso Antiorario Veloce Modalità Illuminazione Normale Arcobaleno Casuale Reazione Lenta Statico Strobo Tutte Dock Logo Rotellina Underglow Auto Applica Auto Imposta 60Hz per risparmiare batteria, reimposta quando in carica In uso Basso Massimo Medio Spento Timeout in carica / a batteria (0 - ACCESO) Timeout retroilluminazione quando in batteria Backlight Timeout when plugged Bilanciato Carica Limite Ricarica Batteria Salute Batteria One time charge to 100% Binding Primario Secondario Aggiornamenti Driver e BIOS Avvio Suono Di Avvio Luminosità Riduci Luminosità Aumenta Luminosità Black and white tray icon Calibrazione In carica Colore Contrasto Controller Boost CPU Personalizzato Decelerazione Default Disabilita Controller Disattiva a schermo chiuso Disabilita Overdrive Schermo Scaricamento Scarica Profili Colore Scarica Driver e Software Disabilita dGPU per risparmiare energia Eco Abilita la GPU allo spegnimento (evita problemi con la modalità Eco) Disabilitare la dGPU impostando la modalità Eco quando non è attiva la modalità schermo Optimus nel Pannello di Controllo NVIDIA può causare problemi al controllo della luminosità fino al prossimo riavvio. Sei sicuro di voler continuare? Modalità schermo NVIDIA non impostata su Optimus Risparmio Energia Esporta Profilo Extra Impostazioni aggiuntive Valori Predefiniti Curve Ventola Profilo Ventola CPU Profilo Ventola GPU Profilo Ventola Centrale Profili Ventola Alimentazione e Ventole Ventola Ventole + Alimentazione Flicker-free Dimming Elabora i tasti Fn+F direttamente senza Fn Blocco FN Disattivo Blocco FN Attivo Boost Dinamico Impostando Offset Clock Core Offset Clock Memoria Modalità GPU Solo iGPU iGPU + dGPU Solo dGPU Potenza GPU Impostazioni GPU Temperatura Target Iberna dopo X minuti se alimentato a batteria (0 - ACCESO) Elevato Rotazione Immagine Importa Profilo Associazione Tasti Tastiera Arresta tutte le app che usano la GPU passando ad Eco Retroilluminazione Laptop Tastiera Laptop Schermo Laptop Indicatori Di Stato LED Schermo Barra Luminosa Illuminazione Schermata di blocco Logo Basso Zona morta della levetta sinistra Zona morta dell'interruttore sinistro Visualizzatore Audio Banner Binario Luminoso Orologio Tenue Logo ROG Medio Spento Immagine Massimo refresh rate per latenza ridotta 60Hz refresh rate per risparmiare batteria Minuto Minuti Angle Snapping / Tuning Auto-disattivazione dopo Risposta Tasto Mouse Importazione non riuscita. Il file selezionato non è un profilo di mouse valido o è corrotto. Lift Off Distance Avviso Batteria Mouse in Esaurimento Prestazioni Sincronizza con Mouse Multi Zona Multi Zone Strong Muto Silenzia microfono Mai Nuovi aggiornamenti Sistema aggiornato Non Connesso Spento Acceso One Zone Apri G-Helper Ottimizzata Passa ad Eco se alimentato a batteria e a Standard quando in carica Disabilita GPU durante ricarica tramite USB-C in modalità Ottimizzata Altro Overdrive Profilo Periferiche Immagine / Gif Riproduci / Pausa Polling Rate Limiti di Potenza I Limiti di Potenza sono una funzione sperimentale. Usare con cautela e a proprio rischio! PrintScreen Profilo Esci Reimposta Qualcosa sta utilizzando la dGPU e impedisce il passaggio alla modalità Eco. Vuoi che G-Helper provi a riavviare la dGPU in gestione dispositivi? (Procedi a tuo rischio) RPM Zona morta della levetta destra Zona morta dell'interruttore destro Esegui all'Avvio Scaling Quality Riduci luminosità Screenpad Aumenta luminosità Screenpad Spegnimento Silenzioso Sospensione Abilita la dGPU solo quando richiesto da app e giochi Standard Avvia Servizi in avvio Errore Avvio Arresta Arresta applicazioni GPU Servizi in arresto Alterna Aura Attiva automaticamente la modalità a conchiglia Alterna Blocco-Fn Alterna Miniled (se supportato) Alterna Schermo Attiva/Disattiva Touchscreen Touchscreen Turbo Spento Disattiva quando alimentato a batteria Utilizza la dGPU in modalità esclusiva, massimizzando gli FPS Estrema L'undervolting è una funzione sperimentale e rischiosa. Se i valori applicati sono troppo bassi per il tuo dispositivo, esso potrebbe diventare instabile, spegnersi o perdere dati. Se vuoi provare - inizia dapprima con valori contenuti, clicca Applica e verifica se funziona tutto correttamente. Smutato Aggiornamenti Versione Intensità vibrazione Visual Mode Le Visual Modes non sono disponibili quando l'HDR è attivo Le Visual Modes non sono disponibili quando lo schermo del portatile è spento Diminuisci Volume Azzera Volume Aumenta Volume Mantieni applicazione sempre in primo piano Zoom Dona Legend Impossibile verificare la versione locale Can't check local version Aggiornamento Disponibile Update Available Aggiornato Updated Rimbalzo Slash Caricamento Bit Stream Trasmissione Flow Flux Phantom Spectrum Hazard Interfacing Ramp Game Over Start Buzzer Statico Livello Batteria Interval Off Intervallo {0}s Per favore disabilita Windows > Illuminazione Dinamica La modalità Ambient può aumentare l'utilizzo delle risorse Motion Sync Zone Mode ================================================ FILE: app/Properties/Strings.ja.resx ================================================  text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Acceleration ASUS ACPIに接続できません。 Asus System Control Interfaceをインストールしてください 変更を適用するにはデバイスを再起動してください 再起動しますか? GPUが大量に使用されているようです。無効にしますか? エコモード Ultimate モードをオフにするには再起動が必要です Ultimate モードには再起動が必要です 今すぐ再起動? Allyコントローラ アニメーション速度 AniMe Matrix アプリは既に実行中です G-Helperは既に実行されています。システムトレイのアイコンをチェックしてください。 適用 カスタムファンカーブの適用 電力制限を適用する Windows電源モードを自動調整 GPUに割り当てられたメモリ Asusサービスを実行中 バッテリーの状態 呼吸 時計回り カラーサイクル コメット 反時計回り 高速 照明モード 普通 ランダム リアクト 低速 固定 ストロボ 全て ドック ロゴ Scrollwheel アンダーグロー 自動的に適用 自動 電源接続時にバッテリーを節約するために60Hzを設定する 起動中 Low Max Mid オフ バッテリー / 接続時間 (0 - ON) バッテリー時のバックライトタイムアウト 電源接続時のバックライトのタイムアウト バランス 充電 バッテリー充電制限 バッテリー健康度 100%までの一回限りの充電 Binding Primary Secondary BIOS とドライバの更新 ブート 起動音 明るさ 明るさダウン 明るさを上げる 白黒トレイアイコン キャリブレーション 充電中 カラー コントラスト コントローラー CPUブースト カスタム Deceleration 既定 コントローラーを無効化 フタを閉じた時に無効化 スクリーンオーバードライブを無効にする 放電中 カラープロファイルをダウンロード ダウンロード ドライバとソフトウェア バッテリー節約のためにdGPUを無効にします エコ シャットダウン時にGPUを有効にする (エコモードでの問題を防ぐ) NVIDIA Control Panel の ディスプレイモード が Optimus に設定されていない場合、エコモードに入って dGPU を無効にすると、次回再起動するまで明るさコントロールに問題が生じる可能性があります。 続行しますか? NVIDIA ディスプレイモードが Optimus に設定されていません エネルギー設定 プロファイルをエクスポート その他 その他の設定 出荷時のデフォルト設定 ファンカーブ CPUファンプロファイル GPU ファンプロファイル ミッドファンプロファイル ファンプロファイル ファンとパワー ファン ファン + パワー フリッカーフリー調光 FnなしでFn+Fホットキーを処理 FNロック オフ FNロック オン Dynamic Boost Changing コアクロックオフセット メモリクロックオフセット GPUモード iGPU のみ iGPU + dGPU dGPU 専用 GPU電力 GPU設定 温度ターゲット スリープ時にバッテリーを停止するまでの時間 (0 - OFF) High 画像の回転 プロファイルをインポート キー割り当て キーボード エコに切り替えるときにGPUを使用しているすべてのアプリを停止します ラップトップのバックライト ラップトップキーボード ラップトップ画面 LEDステータス表示 フタ ライトバー ライティング ロック画面 ロゴ Low 左スティックデッドゾーン 左トリガーデッドゾーン オーディオビジュアライザー Binary Banner 明度調整 時計 Dim Rog ロゴ Medium オフ 画像 最大リフレッシュレートで低遅延を実現 バッテリーを節約するために60Hzのリフレッシュレートを使用 Minute Minutes Angle Snapping / Tuning 自動電源オフ ボタンの応答 インポートに失敗しました。選択したファイルは有効なマウスプロファイルではないか、壊れています。 持ち上げ距離 バッテリー残量低下警告 パフォーマンス マウスと同期 Multi Zone Multi Zone Strong ミュート マイクをミュートする なし 新しい更新 アップデートはありません 未接続 オフ オン 1つのゾーン G-Helperウィンドウを開く 最適化 Switch to Eco on battery and to Standard when plugged in 最適化モードでUSB-C充電器でGPUを無効にする その他 オーバードライブ モード 周辺機器 画像 / Gif 再生 / 一時停止 ポーリング レート 電力制限 電力制限は実験的な機能です。慎重に、ご自身の責任において使用してください! PrintScreen プロファイル 終了 リセット 何らかの問題が dGPU を使用しており、エコモードを防止しています。G-Helper をデバイスマネージャーで dGPU を再起動させてください。(自己責任で進んでください) RPM 右スティックのデッドゾーン 右トリガーデッドゾーン 起動時に実行する スケーリング品質 画面の明るさダウン 画面の明るさを上げる シャットダウン サイレント スリープ 標準的な使用のために dGPU を有効にします 標準 スタート サービスを開始 起動エラー ストップ GPU アプリケーションを停止 サービスの停止中 Auraを切り替える クランシェルモードの自動切り替え Fn-Lockを切り替える Toggle Miniled (if supported) 画面を切り替える タッチスクリーンの切り替え タッチスクリーン ターボ 無効 バッテリーを無効にする ラップトップ画面をdGPUにルーティングし、FPSを最大化 Ultimate アンダーボルトは、実験的で危険な機能です。 適用される値がハードウェアに低すぎると、不安定になったり、シャットダウンしたり、データが破損したりする可能性があります。 試してみたい場合 - 最初に小さい値から始めて、適用をクリックして、何があなたに役立つかをテストします。 ミュート解除 アップデート バージョン 振動の強さ ビジュアルモード HDRがアクティブな場合、ビジュアルモードは利用できません ラップトップ画面がオフの場合、ビジュアルモードは使用できません 音量ダウン 音量ミュート 音量アップ アプリのウィンドウを常にトップに表示する ズーム 寄付 凡例 ローカルバージョンを確認できません Can't check local version アップデートが利用できます Update Available 更新 Updated Bounce Slash Loading Bit Stream Transmission Flow Flux Phantom Spectrum Hazard Interfacing Ramp Game Over Start Buzzer Static バッテリー残量 インターバルオフ 間隔 {0}秒 Windows > 動的ライティングを無効にしてください アンビエントモードはリソース使用量を増加させる可能性があります モーションシンク Zoneモード ================================================ FILE: app/Properties/Strings.ko.resx ================================================  text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 가속 ASUS ACPI에 연결할 수 없어 응용 프로그램이 작동하지 않습니다. Asus System Control Interface를 먼저 설치하십시오. 변경 사항을 적용하려면 기기를 다시 시작하십시오. 지금 다시 시작하시겠습니까? GPU 사용량이 높습니다. 비활성화하시겠습니까? Eco 모드 Ultimate 모드를 끄기 위해서는 다시 시작해야 합니다. Ultimate 모드를 켜기 위해서는 다시 시작해야 합니다. 지금 다시 시작하시겠습니까? Ally 컨트롤러 애니메이션 속도 Anime Matrix 프로그램이 이미 실행중입니다. G-Helper가 이미 실행중입니다. 시스템 트레이에서 아이콘을 확인하십시오. 적용 사용자 설정 팬 커브 적용 전력 제한 적용 윈도우 전원 모드 자동조절 GPU에 할당된 메모리 실행 중인 Asus 서비스 배터리 상태 숨쉬기 시계 방향 색 순환 혜성 반시계 방향 빠르게 조명 모드 보통 무지개 랜덤 반응 느리게 정적 섬광 전체 로고 스크롤 휠 하단 조명 자동 적용 자동 배터리 사용 중에만 60Hz 설정 활성 낮음 최대 중간 꺼짐 전원 / 배터리 사용 중 자동 꺼짐 시간 (0 - 항상 켜짐) 배터리 사용 중 백라이트 자동 꺼짐 전원 사용 중 백라이트 자동 꺼짐 균형 잔량 배터리 충전 제한 배터리 수명 이번만 100%까지 충전 바인딩 Primary Secondary 바이오스/드라이버 업데이트 부팅 부팅 사운드 밝기 밝기 감소 밝기 증가 흑백 트레이 아이콘 보정 충전 중 색상 대비 컨트롤러 CPU 부스트 사용자 설정 감속 기본 컨트롤러 비활성화 덮개를 닫을 시 비활성화 화면 OD 끄기 방전 중 색상 프로필 다운로드 다운로드 드라이버와 소프트웨어 배터리 절약을 위해 dGPU 비활성화 Eco 종료 시 GPU 활성화 (Eco 모드 문제 방지) NVIDIA 제어판에서 디스플레이 모드가 Optimus로 설정되지 않은 상태에서 Eco 모드로 전환하여 dGPU를 비활성화하면 다시 시작하기 전까지 밝기 조절에 문제가 발생할 수 있습니다. 계속 진행하시겠습니까? NVIDIA 디스플레이 모드가 Optimus로 설정되어 있지 않습니다. Energy Settings 프로필 내보내기 추가 설정 추가 설정 공장 설정 팬 커브 CPU 팬 프로필 GPU 팬 프로필 중간 팬 프로필 팬 프로필 팬 속도/전력 팬 + 전력 플리커 프리 디밍 Fn 키를 누르지 않고 Fn+F 핫키 작동 FN-Lock 꺼짐 FN-Lock 켜짐 다이나믹 부스트 바꾸는 중 코어 클럭 오프셋 메모리 클럭 오프셋 GPU 모드 iGPU만 사용 iGPU + dGPU dGPU만 사용 GPU Power GPU 설정 목표 온도 최대 절전 모드 전환 시간 (0 - 꺼짐) 높게 이미지 방향 프로필 가져오기 키 바인딩 키보드 Eco 모드로 전환 시 GPU를 사용하는 모든 앱 중지 백라이트 키보드 화면 LED 상태 표시등 덮개 라이트바 조명 잠금화면 로고 낮게 왼쪽 스틱 데드존 왼쪽 트리거 데드존 오디오 비주얼라이저 Binary Banner 밝게 시계 어둡게 Rog 로고 중간 끄기 사진 최대 주사율 설정 60Hz 주사율 설정 분 후 분 후 Angle Snapping / Tuning 자동 전원 꺼짐 버튼 응답 가져오기 실패. 유효한 마우스 프로필이 아니거나 손상된 파일입니다. 들어올림 거리 배터리 부족 경고 알림 성능 마우스와 동기화 다중 영역 다중 영역 강도 음소거 마이크 음소거 사용 안함 새 업데이트 새 업데이트 없음 연결되지 않음 꺼짐 켜짐 단일 영역 G-Helper 열기 최적화 배터리 사용 중에만 Eco 모드로 전환 최적화 모드에서 PD 충전 시 GPU 비활성화 기타 설정 오버드라이브 성능 모드 주변 장치 사진 / Gif 재생 / 정지 폴링레이트 전력 제한 전력 제한은 실험적인 기능입니다. 주의하여 사용하세요! PrintScreen 프로필 종료 초기화 dGPU가 사용중이기 때문에 Eco 모드로 전환할 수 없습니다. 장치 관리자에서 dGPU를 재시작하시겠습니까? RPM 오른쪽 스틱 데드존 오른쪽 트리거 데드존 시스템 시작 시 실행 스케일링 품질 Screenpad 밝기 감소 Screenpad 밝기 증가 종료 조용 절전 표준 모드에서 dGPU 켜기 표준 시작 서비스 시작 중 시작 오류 중지 GPU를 사용하는 앱 중지 서비스 중지 중 Aura 전환 클램셸 모드 자동 전환 Fn-Lock 전환 Miniled 전환 (지원하는 기기만) 화면 전환 터치스크린 전환 터치스크린 터보 꺼짐 배터리 사용 중에는 끄기 노트북 화면을 dGPU와 연결, FPS 최대화 Ultimate 언더볼팅은 실험적이며 위험한 기능입니다. 적용 값이 너무 낮은 경우 시스템이 불안정해지고, 강제 종료되거나 데이터 손상을 유발할 수 있습니다. 낮은 값부터 적용하여 잘 작동하는지 확인해 보십시오. 음소거 해제 업데이트 버전 진동 세기 비주얼 모드 HDR이 켜져 있을 때에는 비주얼 모드를 사용할 수 없습니다. 노트북 화면이 꺼져 있을 때는 비주얼 모드 사용 불가 볼륨 작게 음소거 볼륨 크게 창을 항상 맨 위로 유지 확대/축소 후원 범례 설치된 버전 확인 불가 Can't check local version 업데이트 이용 가능 Update Available 업데이트됨 Updated Bounce Slash Loading Bit Stream Transmission Flow Flux Phantom Spectrum Hazard Interfacing Ramp Game Over Start Buzzer Static Battery Level Interval Off Interval {0}s Please disable Windows > Dynamic Lighting Ambient mode may increase resource usage Motion Sync Zone Mode ================================================ FILE: app/Properties/Strings.lt.resx ================================================  text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Greitėjimas Nepavyko prisijungti prie ASUS ACPI. Programėlė be jo negali veikti. Pabandykite įdiegti Asus System Control Interface Norėdami pritaikyti pakeitimus, paleiskite įrenginį iš naujo Paleisti iš naujo? Panašu, kad jūsų GPU yra intensyviai naudojamas. Išjungti jį? Ekonomiškas režimas Maksimalaus režimo išjungimas reikalauja paleidimo iš naujo Maksimalus režimas reikalauja paleidimo iš naujo Paleisti iš naujo dabar? „Ally“ valdiklis Animacijos greitis Anime matrica Programėlė jau paleista G-Helper jau paleistas. Patikrinkite, ar sistemos juostelėje nėra piktogramos. Taikyti Taikyti tinkintą kreivę Taikyti galios ribas Automatiškai derinti Windows energijos režimus Atmintis priskirta vaizdo plokštei Veikiančios Asus tarnybos Būsena Kvėpavimas Pagal laikrodžio rodyklę Spalvų ciklas Kometa Prieš laikrodžio rodyklę Greitas Apšvietimo režimas Įprastas Vaivorykštė Atsitiktinė Reaktyvinis Lėtas Statinis Blyksniai Visi Jungčių stotelė Logotipas Ratukas Apatinis apšvietimas Taikyti automatiškai Automatinis Baterijos režimu nustatomas 60Hz dažn., atstatoma įkraunant Pabudus Žem. Maks. Vid. Išjungta Apšvietimo laikas įkraunant / baterija (0 – ĮJUNGTA) Foninio apšvietimo laikas akumuliatoriaus režimu Foninio apšvietimo laikas įkraunant Balansuotas Įkrova Įkrovos riba Baterijos būklė Vienkartinė įkrova iki 100% Saistymas Pirminis Antrinis BIOS ir tvarkyklių naujinimai Paleidžiant Paleidimo garsas Ryškumas Ryškumo mažinimas Ryškumo didinimas Naudoti juodai baltą piktogramą Kalibruoti Įkrovimas Spalva Kontrastas Valdiklis CPU spartinimas Tinkintas Lėtėjimas Numatytas Išjungti valdiklį Išjungti uždarius gaubtą Išjungti ekrano pikselių spartinimą Iškrovimas Atsisiųsti spalvų profilius Atsisiųsti Tvarkyklės ir programinė įranga Išjungiamas dGPU (tausojama baterija) Ekonomiškas Įgalinti GPU išjungimo metu (apsauga nuo „Eco“ režimo problemos) Jei ekrano režimas NVIDIA valdymo skyde yra nenustatytas į Optimus, kai dGPU yra išjungtas perjungus į ekonominį režimą, gali kilti problemų su ryškumo valdymu iki kito paleidimo iš naujo. Vis tiek norite tęsti? NVIDIA ekrano režimas nenustatytas į Optimus Energijos nustatymai Eksportuoti profilį Išplėstiniai Išplėstiniai nustatymai Numatytieji Aušintuvų kreivės CPU aušintuvo profilis GPU aušintuvo profilis Vidurinio aušintuvo profilis Aušintuvų profiliai Aušintuvai ir galia Aušintuvas Aušintuvai + galia Užtamsinimas be mirgėjimo Apdoroti Fn+F sparčiuosius klavišus be Fn FN užraktas išjungtas FN užraktas įjungtas Dinaminis spartinimas Keičiamas Branduolių taktų poslinkis Atminties taktų poslinkis GPU režimas Tik iGPU iGPU + dGPU Tik dGPU GPU galia GPU nustatymai Temperatūros tikslas Užmigimo laikas akumuliatoriaus režimu (0 – IŠJUNGTA) Aukštas Atvaizdo pasukimas Importuoti profilį Klavišų priskyrimas Klaviatūra Sustabdyti visas GPU naudojančias programėles, kai perjungiama į ekon. režimą Apšvietimas Klaviatūra Ekranas LED būsenos indikatoriai Dangtis Šviesos juosta Apšvietimas Užrakinimo ekranas Logotipas Žemas Kairiojo jungiklio nejautrumo zonos Kairiojo jungiklio nejautrumo zonos Garso vizualizatorius Dvejetainė vėliava Šviesi Laikrodis Temdymas Rog logotipas Vidutinis Išjungta Paveikslėlis Maksimalus kadrų dažnis (mažesnė delsa) Nustatomas 60Hz kadrų dažnis (tausojama baterija) min. min. Angle Snapping / Tuning Automatiškai išjungti po Klavišo atsakas Importuoti nepavyko. Pasirinktas failas nėra galiojantis pelės profilis arba yra sugadintas. Pakilimo atstumas Senkančio akumuliatoriaus įspėjimas Našumas Sinchronizuoti su pele Kelios zonos Kelių zonų stiprumas Išjungta Mikrofono nutildymas Niekada Naujinimai Nėra naujinimų Neprijungta Išjungta Įjungta Viena zona Atidaryti G-Helper langą Optimizuotas Įkraunant - įprastas režimas; naudojant bateriją - ekonomiškas režimas Išjungti GPU optimizuotame režime, kai naudojamas USB-C įkroviklis Kita Pikselių spartinimas Režimas Išoriniai įrenginiai Paveikslėlis / GIF Paleisti / Pristabdyti Iškvietų dažnis Galios ribos Galios ribos yra eksperimentinė funkcija. Naudokitės atsargiai! Ekrano kopija Profilis Išeiti Atstatyti Kažkas naudoja dGPU ir neleidžia įjungti ekonomiško režimo. Norite leisti G-Helper bandyti iš naujo paleisti dGPU įrenginių tvarkytuvėje? (Tęskite savo rizika) aps. Dešiniojo jungiklio nejautrumo zonos Dešiniojo jungiklio nejautrumo zonos Paleisti įjungus sistemą Mastelio kokybė Ekrano skydelio ryškumo mažinimas Ekrano skydelio ryškumo didinimas Išjungus Tylus Miegant Įjungiamas dGPU (įprastam naudojimui) Įprastas Paleisti Paleidžiamos tarnybos Paleidimo klaida Stabdyti Stabdyti GPU programėles Stabdomos tarnybos Perjungti Aura Automatiškai perjungti Clamshell režimą Perjungti Fn-Lock Perjungti Miniled (jei palaikoma) Perjungti ekraną Valdyti jutiklinį ekraną Jutiklinis ekranas Turbo Išjungta Išjungti naudojant akumuliatorių Nukreipiama į dGPU (maksimaliai padidinamas kadrų kiekis) Maksimalus Įtampos mažinimas yra eksperimentinė ir pavojinga funkcija. Jei pritaikytos reikšmės yra per mažos jūsų aparatinei įrangai, ji gali tapti nestabili, išsijungti arba pažeisti duomenų vientisumą. Jei norite pabandyti, iš pirmo pradėkite nuo mažų reikšmių, spustelėkite „Taikyti“ ir išbandykite, kas jums tinka. Įjungta Naujinimai Versija Vibracijos stiprumas Vizualinis režimas Vizualiniai režimai nepasiekiami, kuomet įjungtas HDR Vizualiniai režimai nepasiekiami, kuomet kompiuterio ekranas išjungtas Garsumo mažinimas Garsumo nutildymas Garsumo didinimas Visada rodyti programėlės langą viršuje Mastelis Paremti Legenda Nepavyko patikrinti vietinės versijos Can't check local version Išleista nauja versija Update Available Atnaujinta Updated Atšokimas Kirtis Įkėlimas Bitų srautas Perdavimas Srautas „Flux“ Fantomas Spektras Grėsmė Sąveika Rampa Žaidimo pabaiga Pradėti „Buzzer“ Statinis Baterijos įkrovos lygis Intervalas išjungtas Intervalas {0} s. Išjunkite „Windows“ > „Dinaminis apšvietimas“ „Ambient“ režimas gali padidinti energijos suvartojimą Motion Sync Zone Mode ================================================ FILE: app/Properties/Strings.pl.resx ================================================  text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Przyśpieszenie Nie można odnaleźć sterownika ASUS ACPI. Aplikacja nie może bez niego funkcjonować. Spróbuj zainstalować Asus System Control Interface Uruchom ponownie, aby zastosować ustawienia Uruchomić ponownie teraz? Wygląda na to, że GPU jest mocno obciążone. Wyłączyć? Tryb Eco Wyłączenie trybu Ultimate wymaga ponownego uruchomienia Tryb Ultimate wymaga ponownego uruchomienia Uruchomić ponownie teraz? Kontroler Ally Prędkość animacji Anime Matrix Aplikacja jest już uruchomiona G-Helper jest już uruchomiony. Sprawdź obszar powiadomień na pasku zadań. Zastosuj Zastosuj krzywe Zastosuj limity Dostosuj systemowy Tryb Zasilania Pamięć przypisana do GPU Uruchomione usługi Asus Stan baterii Oddychanie W prawo Pętla kolorów Kometa W lewo Szybka Tryb oświetlenia Normalna Tęcza Losowo Tryb reaktywny Powolna Statyczny Stroboskop Wszystko Dock Logo Rolka Dolna poświata Zastosuj automatycznie Auto Automatycznie ustaw odświeżanie 60 Hz w czasie pracy na baterii Włączone Niskie Wysokie Średnie Wyłączone Limit czasu podłączonego / na baterii (0 - Włączony) Czas podświetlenia na baterii Czas podświetlenia po podłączeniu Balans Naładowanie Limit ładowania baterii Stan baterii Jednorazowo naładuj do 100% Przypisanie klawiszy Podstawowe Drugorzędne Aktualizacje BIOS i sterowników Uruchamianie Dźwięk podczas rozruchu Jasność Zmniejsz jasność Zwiększ jasność Czarnobiała ikona obszaru powiadomień Kalibruj Ładowanie Kolor Kontrast Kontroler Zwiększenie taktowania CPU Niestandardowy Spowolnienie Domyślny Wyłącz kontroler Wyłącz po zamknięciu pokrywy Wyłącz funkcję Overdrive monitora Zużycie mocy Pobieranie profili kolorów Pobierz Sterowniki i oprogramowanie Wyłącza dedykowane GPU aby oszczędzić baterię Eco Aktywuj GPU przy wyłączaniu (zapobiega problemom z trybem Eco) Wyłączenie dGPU przez przejście do trybu Eco, podczas gdy tryb wyświetlania w Panelu sterowania NVIDIA nie jest ustawiony na Optimus, może powodować problemy z regulacją jasności do czasu następnego restartu systemu. Nadal chcesz kontynuować? Tryb wyświetlania NVIDIA nie jest ustawiony na Optimus Ustawienia zasilania Eksportuj profil Ustawienia Dodatkowe ustawienia Ustawienia fabryczne Krzywe wentylatorów Krzywa wentylatora CPU Krzywa wentylatora GPU Krzywa wentylatora centralnego Tryb krzywych Wentylatory i moc Went Dostosuj Przyciemnianie bez migotania Używaj klawiszy funkcyjnych bez przycisku Fn Fn-Lock wył. Fn-Lock wł. Dynamic Boost Przełączanie Przesunięcie zegara rdzenia Przesunięcie zegara pamięci Tryb GPU tylko iGPU iGPU + dGPU tylko dGPU Moc GPU Ustawienia GPU Temperatura docelowa Czas przejścia w hibernację na baterii (0 - wcale) Wysoka Obracanie obrazu Importuj profil Ustawienia klawiszy skrótów Klawiatura Zatrzymaj wszystkie aplikacje używające GPU podczas przełączania na Eco Podświetlenie Klawiatura laptopa Ekran laptopa Wskaźniki stanu Pokrywa Lightbar Oświetlenie Ekran blokady Logo Niska Martwe strefy lewego joysticka Martwe strefy lewego triggera Wizualizer muzyki Binarny Jasny Zegar Ciemny Logo ROG Średni Wyłączony Obraz Maksymalna częstotliwość odświeżania dla mniejszych opóźnień Częstotliwość odświeżania 60 Hz dla oszczędzania baterii min. min. Angle Snapping / Tuning Przejście w tryb uśpienia po Reakcja przycisków Błąd importu. Wybrany plik jest uszkodzony lub nie jest poprawnym profilem myszy. Wysokość reakcji sensora Ostrzeżenie o niskim poziomie baterii Wydajność Synchronizuj z myszką Wiele stref Wiele stref (mocniejsze) Wyciszony Wyciszenie mikrofonu Nigdy Nowe aktualizacje Brak aktualizacji Nie połączono Wyłączony Włączony Jedna strefa Otwórz okno G-Helper Optymalny Przełącza na Eco w czasie pracy na baterii i na Standard po podłączeniu W trybie Optymalnym wyłącz GPU podczas ładowania przez USB-C Inne Overdrive Tryb zasilania Urządzenia peryferyjne Obraz / GIF Odtwórz / Pauza Częstotliwość raportowania Limit mocy Ustawienie limitu mocy jest funkcją eksperymentalną. Używaj ostrożnie, na własną odpowiedzialność! Zrzut ekranu Profil Zamknij Reset Coś korzysta z dGPU, uniemożliwiając włączenie trybu Eco. Czy G-Helper ma zresetować dGPU w Menadżerze Urządzeń? (Korzystasz na własne ryzyko) RPM Martwe strefy prawego joysticka Martwe strefy prawego triggera Uruchom przy starcie Jakość skalowania Zmniejsz jasność ScreenPad Zwiększ jasność ScreenPad Zamknij Cichy Uśpij Włącza dGPU dla standardowego użycia Standard Start Uruchamianie usług Błąd uruchamiania Stop Zatrzymaj aplikacje używające GPU Zatrzymywanie usług Przełącz Aura Automatyczny tryb pracy z zamkniętą pokrywą Przełącz Fn-Lock Przełącz MiniLED Przełącz ekran Włącz/wyłącz ekran dotykowy Ekran dotykowy Turbo Wyłączony Wyłączony na baterii Podłącza ekran laptopa bezpośrednio do dedykowanego GPU Ultimate Undervolting jest funkcją eksperymentalną i ryzykowną. Jeżeli zastosowane wartości są za niskie dla Twojego urządzenia, może ono działać niestabilnie, wyłączyć się lub uszkodzić dane. Chcąc wypróbować tę funkcję, zacznij od niewielkich wartości, zastosuj je i sprawdź efekt. Włączony Aktualizacje Wersja Siła wibracji Tryb wyświetlania Tryby wyświetlania nie są dostępne, kiedy HDR jest włączone Tryby wyświetlania nie są dostępne, kiedy ekran laptopa jest wyłączony Zmniejsz głośność Wyciszenie Zwiększ głośność Zachowaj okno aplikacji zawsze na wierzchu Przybliżenie Wesprzyj Legenda Brak informacji Can't check local version Dostępna aktualizacja Update Available Wersja aktualna Updated Skaczący Slash Ładowanie Strumień bitów Transmisja Płynny Strumień Fantom Spektrum Zagrożenie Interfacing Rampa Koniec gry Start Buzzer Statyczny Poziom baterii Bez przerwy Interwał {0} s Wyłącz Windows > Oświetlenie dynamiczne Tryb ambient może zwiększyć zużycie zasobów Motion Sync Zone Mode ================================================ FILE: app/Properties/Strings.pt-BR.resx ================================================  text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Aceleração Não foi possível conectar ao ASUS ACPI. O aplicativo não pode funcionar sem isso. Tente instalar Asus System Controle Interface Reinicie seu dispositivo para aplicar as alterações Reiniciar agora? Parece que o GPU está em uso pesado. Modo econômico Passar ao Modo Final implica na reinicialização do sistema Modo Ultimado necessita de reinicialização. Reiniciar agora ? Controle Ally Velocidade da Animação AniMe Matrix O applicativo já está em execução G-Helper já está em execução. Verifique a barra de sistema Aplicar Aplicar a curva personalizada Aplicar as limitações de energia Ajuste automático dos modos de energia do Windows Memória Atribuída à GPU Serviços da Asus em execução Estado da bateria Repiração Sentido horário Ciclo de cores Comet Sentido anti-horário Rápido Modo de iluminação Normal Arco-íris Aleatório Sensível Lento Estático Estroboscópio Tudo Dock Logo Roda de Rolagem Underglow Aplicar automaticamente Automático Menor taxa de atualização quando estiver na bateria Acordado Baixo Máximo Meio Desligado Tempo limite plugado / na bateria (0 - ligado) Tempo de retroiluminação com bateria Tempo de retroiluminação ligado Equilibrado Carga Limite de carga Saúde da bateria Carregar uma vez até 100% Vinculação Primário Secundário Atualizações do BIOS e drivers Ao ligar Som de inicialização Nível do brilho Diminuir Brilho Aumentar Brilho Ícone da bandeja preto e branco Calibrar Carregando Cor Contraste Controle CPU Boost Personalizado Desaceleração Padrão Desativar Controle Desativar ao fechar a tampa Desativar o overdrive da tela Descarregando Baixar Perfis de Cor Baixar Drivers e Software Desativar o dGPU para economizar energia Econômico Ativar a GPU ao desligar (impede problemas com o modo Eco) Desativar a dGPU entrando no modo Eco enquanto o Modo de Exibição no painel de controle da NVIDIA não está definido como Optimus pode causar problemas com os controles de brilho até a próxima reinicialização. Ainda quer continuar? Modo de Exibição de NVIDIA não está definido como Optimus Configurações de Energia Exportar Perfil Adicional Configurações adicionais Padrão de fábrica Curvas de ventilador Perfil de ventilador CPU Perfil de ventilador GPU Perfil de ventilador central Perfis de ventilador Ventiladores e Energía Ventilador Ventiladores + Energía Atenuação sem cintilação Processar teclas de atalho Fn+F sem pressionar Fn Tecla Fn desbloqueada Tecla Fn bloqueada Boost dinâmico Carregando Aumento da frequência básica Aumento da frequência da memória Modo de GPU Só iGPU iGPU + dGPU Exclusivamente dGPU Potência da GPU Parâmetros de GPU Alvo de temperatura Minutos até Hibernação em suspensão na bateria (0 — Desligado) Alto Rotação de Imagem Importar Perfil Combinações de teclas Teclado Parar todos os aplicativos que usam a GPU ao alternar para o modo Eco Configurações de iluminação Teclado Tela Indicadores de estado do LED Tampa Barra de luz Iluminação Tela de bloqueio Logo Baixo Zona morta do analógico esquerdo Zona morta do gatilho esquerdo Visualizador de áudio Bandeira Binária Brilho Relógio Escuro Logo ROG Médio Desligado Imagem Taxa de atualização máxima e menor latência Taxa de atualização à 60Hz para economizar bateria Minuto Minutos Angle Snapping / Tuning Desligamento automático após Resposta do Botão Falha na importação. O arquivo selecionado não é um perfil de mouse válido ou está corrompido. Distância de Decolagem (LOD) Aviso de bateria fraca em Desempenho Sincronizar com o mouse Multi zona Multi Zona Forte Silenciado Desligar microfone Nunca Novas atualizações Não há novas atualizações Não Conectado Desligado Ligado Uma Zona Abrir G-Helper Otimizado Passar ao Ecônomico em bateria e voltar quando carregando Manter a GPU desativada ao usar um carregador USB-C no modo Otimizado Outro Overdrive Modo Periféricos Imagem / Gif Reproduzir / Pausar Velocidade de resposta Limitações de Energia Limitações de Energia é uma funcionalidade experimental. Use com cuidado. Captura de tela Perfil Sair Redefinir Algo está usando dGPU e impedindo o modo Eco. Deixe G-Helper tentar reiniciar o dGPU no gerenciador de dispositivos? (Por favor, proceda por sua conta e risco) RPM Zona morta do analógico direito Zona morta do gatilho direito Executar ao iniciar Qualidade de Escala Redução do brilho da Screenpad Aumento do brilho da Screenpad Desligar Silencioso Hibernação Liga o dGPU para uso padrão Padrão Iniciar Iniciando os serviços Erro de inicialização Parar Parar aplicativos GPU Parando os serviços Alternar Aura Alternar automaticamente o Modo Clamshell Alternar bloqueio de Fn Alternar Miniled (se suportado) Alternar Tela Alternar Touchscreen Tela de toque Turbo Desligado Desligar em bateria Direciona a tela do computador ao dGPU Ultimate A subvoltagem é um recurso experimental e arriscado. Se os valores aplicados forem muito baixos para seu hardware, ele poderá ficar instável, ser desligado ou causar corrupção de dados. Se quiser experimentar, comece com valores pequenos primeiro, clique em Aplicar e teste o que funciona para você. Não silenciado Atualizações Versão Intensidade da Vibração Modo visual Modos visuais não estão disponíveis quando o HDR está ativo Modos Visuais não estão disponíveis quando a tela do portátil está desligada Abaixar o volume Mudo Aumentar o volume Manter a janela do aplicativo sempre no topo Zoom Doar Legenda Não é possível verificar a versão local Can't check local version Atualização disponível Update Available Atualizado Updated Bounce Slash Loading Bit Stream Transmission Flow Flux Phantom Spectrum Hazard Interfacing Ramp Game Over Start Buzzer Static Battery Level Interval Off Interval {0}s Please disable Windows > Dynamic Lighting Ambient mode may increase resource usage Motion Sync Zone Mode ================================================ FILE: app/Properties/Strings.pt-PT.resx ================================================  text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Aceleração Não foi possível conectar ao ASUS ACPI. O programa não funciona sem esse serviço. Tente instalar Asus System Control Interface Reinicie o dispositivo para aplicar as alterações Reiniciar agora? Parece que o GPU está em uso pesado, desativá-lo? Modo económico Passar ao Modo Ultimate implica o reinício do sistema Modo Ultimate implica o reinício do sistema Reiniciar agora? Controlador Ally Velocidade da Animação AniMe Matrix O programa já está em execução G-Helper já está em execução. Verifique o tabuleiro do sistema pelo ícone. Aplicar Aplicar a curva personalizada Aplicar as limitações de energia Ajuste automático dos modos de energia do Windows Memória Alocada à GPU Serviços da Asus em execução Estado da bateria Respiração No sentido horário Ciclo de cores Cometa No sentido anti-horário Rápido Modo de iluminação Normal Arco-íris Aleatório Reagir Lento Estático Estroboscópio Todos Dock Logo Roda de Deslocamento Underglow Aplicar automaticamente Automático Define a taxa de atualização automaticamente para poupar bateria Acordado Baixo Máximo Médio Desligado Tempo limite ligado à corrente / na bateria (0 - ON) Desligar o ecrã após (em Bateria) Desligar o ecrã após (ligado à corrente) Equilibrado Carga Limite de carga Estado da bateria Carregamento único até 100% Vinculação Primário Secundário Atualizações de Drivers e da BIOS Ao ligar Som de ligar Nível do brilho Diminuir o brilho Aumentar o brilho Ícone da bandeja a preto e branco Calibrar Carregando Cor Contraste Controlador Turbo do CPU Personalizado Desaceleração Padrão Desativar Controlador Desativar ao fechar a tampa Desativar o overdrive do ecrã Descarregando Descarregar Perfis de Cor Transferir Drivers e Software Desativar o dGPU para poupar energia Económico Ativar a GPU no encerramento (previne o problema do modo Eco) Desativar a dGPU por ativar o modo Eco enquanto o Modo de Ecrã no Painel de Controlo da NVIDIA não está definido para Optimus pode causar problemas com os controlos do brilho do painel até ao próximo reinício. Quer prosseguir? O Modo de Ecrã da NVIDIA não está definido para Optimus Configurações de Energia Exportar Perfil Adicional Configurações adicionais Padrão de fábrica Curvas das Ventoinhas Perfil da Ventoinha do CPU Perfil da Ventoinha da GPU Perfil da Ventoinha Central Perfis das Ventoinhas Ventoinhas e Potência Fan Ventoinhas + Potência Atenuação sem cintilação Processar teclas de atalho Fn+F sem pressionar Fn Tecla FN desbloqueada Tecla FN bloqueada Boost dinâmico Carregando Frequência da GPU Frequência da Memória Modo da GPU Só iGPU iGPU + dGPU Exclusivamente dGPU Potência da GPU Parâmetros de GPU Temperatura limite Minutos para a hibernação em suspensão, na bateria (0 - OFF) Alto Rotação de imagem Importar perfil Combinações de teclas Teclado Parar todos os programas que usam a GPU ao alternar para o modo Eco Configurações de iluminação Teclado Ecrã Indicadores de Estado LED Tampa Barra de Luz Iluminação Ecrã de bloqueio Logo Baixo Zonas Mortas do Manípulo Esquerdo Zonas Mortas do Gatilho Esquerdo Visualizador de áudio Bandeira Binária Brilho Relógio Escuro Logo ROG Médio Desligado Imagem Taxa de atualização máxima e menor latência Taxa de atualização de 60Hz para poupar bateria Minuto Minutos Angle Snapping / Tuning Desligar automaticamente após Resposta do botão A importação falhou. O ficheiro selecionado não é um perfil de rato válido ou está corrompido. Distância de Lift Off Aviso de bateria fraca Desempenho do rato Sincronizar com o rato Múltipla Zona Múltipla Zona Forte Silenciado Desligar microfone Nunca Novas atualizações Sem novas atualizações Não conectado Desligado Ligado Uma Zona Abrir G-Helper Otimizado Mudar para Eco em bateria, e mudar para Standard quando ligado à corrente Manter a GPU desativada ao usar um carregador USB-C no modo Otimizado Outro Overdrive Modo Periféricos Imagem / Gif Reproduzir / Pausar Taxa de Amostragem Limites de Potência Os Limites de Potência são uma funcionalidade experimental. Use com cuidado! Captura de ecrã Perfil Sair Redefinir Algum processo está a utilizar a dGPU, impedindo o modo Eco. Deixar o G-Helper tentar reiniciar a dGPU no gestor de dispositivos? (Proceda por sua conta e risco) RPM Zonas Mortas do Manípulo Direito Zonas Mortas do Gatilho Direito Executar ao iniciar Qualidade de Escala Diminuir o brilho do ScreenPad Aumentar o brilho do ScreenPad Desligar Silencioso Hibernação Liga o dGPU para uso padrão Padrão Iniciar Iniciando os serviços Erro de inicialização Parar Parar programas que usem a GPU Parando os serviços Alternar Aura Alternar automaticamente o Modo Clamshell Alternar Fn-Lock Alternar MiniLED (se suportado) Alternar Ecrã Alternar Ecrã Tátil Ecrã Tátil Turbo Desligado Desligar em bateria O ecrã do portátil está ligado diretamente à dGPU, maximizando FPS Ultimate Undervolting é uma funcionalidade experimental e arriscada. Se os valores aplicados foram baixos para o hardware, podem existir instabilidades, desligar e causar corrupção de dados. Caso queira, comece por valores pequenos no início, clique em Aplicar e teste o que funciona para o hardware. Não silenciado Atualizações Versão Intensidade da Vibração Modo Visual Os Modos Visuais não estão disponíveis quando o HDR está ativo Os Modos Visuais não estão disponíveis quando o ecrã do portátil está desligado Diminuir o volume Sem som Aumentar o volume Manter a janela do aplicativo sempre no topo Ampliar Doar Legenda Não é possível verificar a versão local Can't check local version Atualização disponível Update Available Atualizado Updated Saltar Barra A carregar Fluxo de Bits Transmissão Fluxo Fluxo Fantasma Espectro Perigo Interligação Rampa Fim do Jogo Começar Campainha Estático Nível da Bateria Intervalo Desligado Intervalo {0}s Por favor, desative o Windows > Iluminação Dinâmica O modo ambiente pode aumentar o uso de recursos Motion Sync Zone Mode ================================================ FILE: app/Properties/Strings.resx ================================================  text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Acceleration Can't connect to ASUS ACPI. Application can't function without it. Try to install Asus System Control Interface Restart your device to apply changes Restart now? Looks like GPU is in heavy use, disable it? Eco Mode Switching off Ultimate Mode requires restart Ultimate Mode requires restart Reboot now? Ally Controller Animation Speed Anime Matrix App already running G-Helper is already running. Check system tray for an icon. Apply Apply Custom Fan Curve Apply Power Limits Auto adjust Windows Power Modes Memory Assigned to GPU Asus Services Running Battery State Breathe Clockwise Color Cycle Comet Counterclockwise Fast Lighting Mode Normal Rainbow Random React Slow Static Strobe All Dock Logo Scrollwheel Underglow Auto Apply Auto Sets 60Hz to save battery, and back when plugged Awake Low Max Mid Off Timeout plugged / on battery (0 - ON) Backlight Timeout when on battery Backlight Timeout when plugged Balanced Charge Battery Charge Limit Battery Health One time charge to 100% Binding Primary Secondary BIOS and Driver Updates Boot Boot Sound Brightness Brightness Down Brightness Up Black and white tray icon Calibrate Charging Color Contrast Controller CPU Boost Custom Deceleration Default Disable Controller Disable on lid close Disable screen overdrive Discharging Download Color Profiles Download Drivers and Software Disables dGPU to save battery Eco Enable GPU on shutdown (prevents issue with Eco mode) Disabling the dGPU by going into Eco mode while Display Mode in NVIDIA Control Panel is not set to Optimus might cause problems with brightness controls until after the next reboot. Do you still want to continue? NVIDIA Display Mode is not set to Optimus Energy Settings Export Profile Extra Extra Settings Factory Defaults Fan Curves CPU Fan Profile GPU Fan Profile Mid Fan Profile Fan Profiles Fans and Power Fan Fans + Power Flicker-free Dimming Process Fn+F hotkeys without Fn FN-Lock Off FN-Lock On Dynamic Boost Changing Core Clock Offset Memory Clock Offset GPU Mode iGPU only iGPU + dGPU dGPU exclusive GPU Power GPU Settings Temperature Target Minutes till Hibernation in sleep on battery (0 - OFF) High Image Rotation Import Profile Key Bindings Keyboard Stop all apps using GPU when switching to Eco Laptop Backlight Laptop Keyboard Laptop Screen LED Status Indicators Lid Lightbar Lighting Lock Screen Logo Low Left Stick Deadzones Left Trigger Deadzones Audio Visualizer Binary Banner Bright Clock Dim Rog Logo Medium Off Picture Max refresh rate for lower latency 60Hz refresh rate to save battery Minute Minutes Angle Snapping / Tuning Auto Power Off After Button Response Import failed. Selected file is not a valid mouse profile or corrutpted. Lift Off Distance Low Battery Warning at Performance Synchronize with mouse Multi Zone Multi Zone Strong Muted Mute Mic Never New updates No new updates Not Connected Off On One Zone Open G-Helper window Optimized Switch to Eco on battery and to Standard when plugged in Keep GPU disabled on USB-C charger in Optimized mode Other Overdrive Mode Peripherals Picture / Gif Play / Pause Polling Rate Power Limits Power Limits is an experimental feature. Use carefully and at your own risk! PrintScreen Profile Quit Reset Something is using dGPU and preventing Eco mode. Let G-Helper try to restart dGPU in device manager? (Please proceed at your own risk) RPM Right Stick Deadzones Right Trigger Deadzones Run on Startup Scaling Quality Screenpad Brightness Down Screenpad Brightness Up Shutdown Silent Sleep Enables dGPU for standard use Standard Start Starting Services Startup Error Stop Stop GPU Applications Stopping Services Toggle Aura Auto Toggle Clamshell Mode Toggle Fn-Lock Toggle Miniled (if supported) Toggle Screen Toggle Touchscreen Touchscreen Turbo Turned off Disable on battery Routes laptop screen to dGPU, maximizing FPS Ultimate Undervolting is an experimental and risky feature. If applied values are too low for your hardware, it can become unstable, shut down or cause data corruption. If you want to try - start from small values first, click Apply and test what works for you. Unmuted Updates Version Vibration Strength Visual Mode Visual Modes are not available when HDR is active Visual Modes are not available when laptop screen is off Volume Down Volume Mute Volume Up Keep app window always on top Zoom Donate Legend Can't check local version Can't check local version Update Available Update Available Updated Updated Bounce Slash Loading Bit Stream Transmission Flow Flux Phantom Spectrum Hazard Interfacing Ramp Game Over Start Buzzer Static Battery Level Interval Off Interval {0}s Please disable Windows > Dynamic Lighting Ambient mode may increase resource usage Motion Sync Zone Mode ================================================ FILE: app/Properties/Strings.ro.resx ================================================  text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Accelerare Nu se poate conecta la ASUS ACPI. Aplicația nu poate funcționa fără aceasta. Încercați să instalați Asus System Control Interface Reporniți dispozitivul pentru a aplica modificările Reporniți acum? Se pare că GPU-ul este folosit intens, dezactivați? Modul Eco Oprirea modului Ultimate necesită o repornire de sistem Modul Ultimate necesită o repornire a sistemului Reporniți acum? Ally Controller Viteza animației Matricea Anime Aplicația rulează deja G-Helper deja rulează. Verificați bara de sistem pentru o iconiță. Aplică Aplicați curba personalizată Aplică limitele de putere Reglare automată a modului de alimentare Windows Memorie alocată GPU-ului Servicii Asus în derulare Starea bateriei Respirație În sensul acelor de ceas Ciclu de culori Cometă În sens invers acelor de ceas Rapid Mod iluminare Normal Curcubeu Aleatoriu Reacție Încet Static Stroboscop Toate Dock Logo Rotiță scroll Iluminare de jos Aplicare automată Automat Setează ecranul la 60Hz pentru a economisi bateria, și înapoi cât se încarcă Treaz Low Max Mid Off Timeout conectat / folosind bateria (0 - ON) Timp oprire iluminare pe baterie Timp oprire iluminare când e conectat Echilibrat Încărcare Limita de încărcare a bateriei Sănătatea bateriei Încarcă o dată la 100% Binding Primary Secondary Actualizări BIOS și Driver Pornire Sunet la pornire Luminozitate Scăderea luminozității Mărirea luminozității Black and white tray icon Calibrează Se încarcă Culoare Contrast Controller Accelerare CPU Personalizat Decelerare Implicit Disable Controller Disable on lid close Dezactivează screen overdrive Se descarcă Download Color Profiles Descarcă Drivers și Aplicații Dezactivează dGPU pentru a economisi bateria Eco Enable GPU on shutdown (prevents issue with Eco mode) Dezactivarea dGPU pentru a utiliza modul Eco, în timp ce Display Mode în NVIDIA Control Panel nu este setat la modul Optimus, poate cauza probleme cu controalele de luminozitate până la următoarea repornire. Încă mai vrei să continui? NVIDIA Display Mode nu este setat la modul Optimus Setări energie Export Profile Extra Setări suplimentare Setările implicite ale fabricii Curbe ventilator Profil ventilator CPU Profil ventilator GPU Profil mediu ventilator Profiluri ventilatoare Vent. și putere Vent Fans + Power Flicker-free Dimming Procesează tastele Fn+F fără Fn FN-Lock Off FN-Lock On Dynamic Boost Modificare Core Clock Offset Memory Clock Offset Modul GPU Doar iGPU iGPU + dGPU exclusiv dGPU GPU Power Setări GPU Temperatura țintă Minute până la Hibernare în mod repaus pe baterie (0 - Oprit) Ridicat Image Rotation Import Profile Asocieri taste Tastatură Opriți toate aplicațiile care folosesc GPU când treceți în modul Eco Lumina de fundal Tastatură Laptop Ecran Laptop LED Status Indicators Capac Lightbar Iluminare Lock Screen Logo-ul Scăzut Left Stick Deadzones Left Trigger Deadzones Vizualizator audio Binary Banner Luminos Ceas Dim Logo-ul ROG Mediu Oprit Imagine Rata maximă de reîmprospătare pentru latență mai mică 60Hz rată de reîmprospătare pentru a economisi bateria Minut Minute Angle Snapping / Tuning Oprire automată după Răspuns buton Import failed. Selected file is not a valid mouse profile or corrutpted. Distanța de oprire Avertizare baterie scăzută la Performanță Sincronizare cu mouse-ul Multi Zone Multi Zone Strong Muted Oprire microfon Niciodată Actualizări noi Nu există actualizări noi Neconectat Off On One Zone Deschide fereastra G-Helper Optimizat Schimbă la modul Eco pe baterie și la Standard când este conectat Păstraţi GPU dezactivat când încărcătorul USB-C e folosit în modul Optimized Altele Overdrive Mod Periferice Poză / Gif Redare / Pauză Rată sondaj Limite de putere Limitele de putere sunt o funcție experimentală. Folosiți cu atenție și pe propriul risc! PrintScreen Profil Închide Reset Ceva folosește dGPU și previne modul Eco. Permiteți G-Helper să repornească dGPU în managerul de dispozitive? (Continuați pe propriul risc) RPM Right Stick Deadzones Right Trigger Deadzones Rulează la pornirea sistemului Scaling Quality Scade luminozitate Screenpad Mărește luminozitate Screenpad Oprire Silențios Somn Activează dGPU pentru uz standard Standard Start Se pornesc serviciile Eroare la Pornire Stop Oprește aplicațiile care folosesc GPU Se opresc serviciile Toggle Aura Auto Toggle Mod Clamshell Toggle Fn-Lock Toggle Miniled (dacă e suportat) Toggle Ecran Toggle Touchscreen Touchscreen Turbo Dezactivat Dezactivează când bateria e folosită Rutează ecranul laptop-ului spre dGPU, maximizând FPS Ultimate Undervolting este o funcțiune experimentală și riscantă. Dacă valorile aplicate sunt prea mici pentru hardware-ul dumneavoastră, acesta poate deveni instabil, a se opri sau să corupă datele. Dacă vrei să încerci - mai întâi începe de la valori mici, apasă Aplică și testează ce funcționează pentru tine. Unmuted Actualizări Versiune Vibration Strength Visual Mode Visual Modes are not available when HDR is active Visual Modes are not available when laptop screen is off Buton scădere volum Buton dezactivare sunet Buton mărire volum Păstrează aplicația mereu deasupra Zoom Donate Legend Can't check local version Can't check local version Update Available Update Available Updated Updated Bounce Slash Loading Bit Stream Transmission Flow Flux Phantom Spectrum Hazard Interfacing Ramp Game Over Start Buzzer Static Battery Level Interval Off Interval {0}s Please disable Windows > Dynamic Lighting Ambient mode may increase resource usage Motion Sync Zone Mode ================================================ FILE: app/Properties/Strings.tr.resx ================================================  text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Hızlandırma ASUS ACPI bağlanılamıyor. Uygulama onsuz çalışamaz. Asus Sistem Kontrol Arayüzünü kurmayı deneyin Değişiklikleri uygulamak için cihazınızı yeniden başlatın Şimdi yeniden başlatılsın mı? GPU yoğun kullanımda gibi, devre dışı bırakılsın mı? Eko Modu Ultimate Modu kapatmak yeniden başlatmayı gerektirir Ultimate Mod için yeniden başlatılmalı Şimdi yeniden başlatılsın mı? Ally Kontrolcüsü Animasyon Hızı Anime Matrix Uygulama zaten çalışıyor G-Helper zaten çalışıyor. Simge için görev çubuğunu kontrol edin. Uygula Özel Fan Eğrisini Uygula Güç Sınırlarını Uygula Windows Güç Modlarını otomatik ayarla GPU için Atanan Bellek Çalışan Asus Hizmetleri Pil Durumu Nefes Saat Yönünde Renk Döngüsü Kuyruklu Yıldız Saat Yönünün Tersine Hızlı Işıklandırma Modu Normal Gökkuşağı Rastgele Reaksiyon Yavaş Sabit Flaş Tümü Yuva Logo Kaydırma Tekerleği Alttan Aydınlatma Otomatik Uygula Otomatik Pil tasarrufu için 60Hz kullanılır, şarja takıldığında eski haline gelir Uyanış Düşük Yüksek Orta Kapalı Pilde klavye ışığı kapanma süresi Pildeyken Arka Işık Zaman Aşımı Fişe takılıyken Arka Işık Zaman Aşımı Dengeli Şarj Pil Şarj Limiti Pil Sağlığı Tek seferlik %100'e kadar şarj Tuş Atamaları Birincil İkincil BIOS ve Sürücü Güncellemeleri Açılış Açılış sesi Parlaklık Parlaklığı Azalt Parlaklığı Artır Siyah ve beyaz tepsi simgesi Kalibrasyon Şarj oluyor Renk Kontrast Kontrolcü CPU Artışı Özel Yavaşlama Varsayılan Kontrolcüyü Devre Dışı Bırak Kapak kapandığında devre dışı bırak Ekran overdrive özelliğini devre dışı bırak Şarj Azalıyor Renk Profillerini İndir İndir Sürücüler ve Yazılımlar Pil tasarrufu için dGPU devre dışı bırakılır Eko Kapatma sırasında GPU'yu etkinleştir (Eco modundaki sorunları önler) NVIDIA Denetim Masası'ndaki Görüntü Modu Optimus olarak ayarlı değilken Eko moduna geçilerek harici GPU'nun devre dışı bırakılması, bir sonraki yeniden başlatmaya kadar parlaklık ayarlarında sorunlara neden olabilir. Yine de devam etmek istiyor musunuz? NVIDIA Görüntü Modu Optimus olarak ayarlanmamış Enerji Ayarları Profili Dışa Aktar Ek Özellikler Ek Ayarlar Fabrika Ayarları Fan Eğrileri CPU Fan Profili GPU Fan Profili Orta Fan Profili Fan Profilleri Fanlar ve Güç Fan Fanlar + Güç Titreşimsiz Karartma Fn+F kısayolunu Fn tuşuna basmadan çalıştır FN-Lock Kapalı FN-Lock Açık Dynamic Boost Değiştiriliyor Çekirdek Frekans Dengesi Bellek Frekans Dengesi GPU Modu Sadece iGPU iGPU + dGPU Ayrıcalıklı dGPU GPU Gücü GPU Ayarları Sıcaklık Hedefi Uyku modunda, Hazırda Bekleme Moduna geçiş dakikası (0 - KAPALI) Yüksek Görüntü Döndürme Profili İçe Aktar Tuş Atamaları Klavye Eco moda geçerken GPU kullanan tüm uygulamaları durdur Laptop Aydınlatması Laptop Klavyesi Laptop Ekranı LED Durum Göstergeleri Kapak Işık Çubuğu Işıklandırma Kilit Ekranı Logo Düşük Sol Çubuk Ölü Bölgeleri Sol Tetik Ölü Bölgeleri Ses Görselleştirici İkili Afiş Parlak Saat Mat Rog Logosu Orta Kapalı Resim En düşük gecikme için en yüksek yenileme hızı Pil tasarrufu için 60Hz yenileme hızı Dakika Dakika Angle Snapping / Tuning Sonrasında Otomatik Kapat Tuş Tepkisi İçe aktarma başarısız oldu. Seçilen dosya geçerli bir fare profili değil veya bozuk. Havalanma Mesafesi Düşük Pil Uyarısı seviyesi Performans Fare ile eşitle Çoklu Bölge Çoklu Bölge Güçlü Susturuldu Mikrofonu Sustur Asla Yeni güncellemeler Yeni güncelleme yok Bağlı Değil Kapalı Açık Tek Bölge G-Helper penceresini aç İyileştirilmiş Pil ile çalışırken Eco moda, Elektrik ile Standart moda geçilir İyileştirilmiş modda USB-C şarj cihazı bağlıyken, GPU devre dışı kalsın Diğer Overdrive Performans Modu Çevre Birimleri Resim / Gif Oynat / Duraklat Yoklama Sıklığı Güç Sınırları Güç Sınırları deneysel bir özelliktir. Riski göze alarak dikkatli kullanın! PrintScreen Profil Çıkış Sıfırla Bir şey harici GPU'yu kullanıyor ve Eco modunu engelliyor. G-Helper aygıt yöneticisinde harici GPU'yu yeniden başlatmayı denesin mi? (Kendi sorumluluğunuzdadır) RPM Sağ Çubuk Ölü Bölgeleri Sağ Tetik Ölü Bölgeleri Başlangıçta Çalıştır Ölçeklendirme Kalitesi Screenpad Parlaklığını Azalt Screenpad Parlaklığını Artır Kapanış Sessiz Uyku Standart kullanım için dGPU etkinleştirilir Standart Başlat Hizmetler Başlatılıyor Başlatma Hatası Durdur GPU Uygulamalarını Durdur Hizmetler Durduruluyor Aura Değiştir Otomatik Clamshell Modunu Aç Fn-Lock Değiştir Miniled Değiştir (destekleniyorsa) Ekranı Değiştir Dokunmatik Ekranı Değiştir Dokunmatik ekran Turbo Kapatıldı Pille çalışırken kapat Dizüstü ekranı doğrudan dGPU üstünden çalışır FPS artar Ultimate Düşük voltaj deneysel ve riskli bir özelliktir. Uygulanan değerler cihaz için çok düşükse, cihazı stabil çalışmayabilir, kapanabilir veya veri kaybına uğrayabilir. Yine de denemek istiyorsanız, önce küçük değerlerden başlayın ve sizin için uygun olanı test edin. Ses açık Güncellemeler Sürüm Titreşim Yoğunluğu Görsel Mod HDR etkin olduğunda Görsel Modlar kullanılamaz Bilgisayar ekranı kapalı olduğunda Görsel Modlar kullanılamaz Sesi Azalt Sesi Kapat Sesi Artır Uygulama penceresini her zaman en üstte tut Yakınlaştır Bağış Gösterge Yerel sürüm denetlenemiyor Can't check local version Güncelleme Mevcut Update Available Güncellendi Updated Sıçrama Kesik Yükleniyor Bit Akışı İletim Akış Akıntı Hayalet Spektrum Tehlike Arayüz Rampa Oyun Bitti Başlat Zil Statik Pil Seviyesi Aralık Kapalı Aralık {0} Lütfen Windows > Dinamik Aydınlatma'yı devre dışı bırakın Ambians modu kaynak kullanımını artırabilir Motion Sync Zone Mode ================================================ FILE: app/Properties/Strings.uk.resx ================================================  text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Прискорення Не вдається під'єднатися до ASUS ACPI. Програма не може працювати без нього. Спробуйте встановити Asus System Control Interface Перезавантажте ваш пристрій, щоб зміни набули чинності Перезавантажити зараз? Здається, що GPU використовується, вимкнути її? Еко Режим Вимкнення ультимативного режиму потребує перезавантаження Ультимативний режим потребує перезавантаження Перезавантажити зараз? Ally Контролер Швидкість Анімації Аніме Матриця Програма вже запущена G-Helper вже запущено. Перевірте значок у системному лотку. Застосувати Застосувати профілі кулерів Застосувати потужність Автоматично застосовувати Windows Power Modes Пам'ять призначена на GPU Кількість запущених сервісів Asus Стан батареї Дихання Направо Зміна Кольорів Комета Наліво Швидка Підсвітка Нормальна Веселка Випадкова Реактивна Повільна Статична Стробоскоп Все Док Лого Колесо Низ Автоматично Авто Частота 60Гц на батареї та максимальна на зарядці Робота Низька Максимальна Середня Вимкнена Тайм-аут на зарядці / на батареї (0 - УВІМК) Тайм-аут підсвітки на батареї Тайм-аут підсвітки на зарядці Баланс Заряд Ліміт заряду батареї Стан батареї Одноразовий заряд до 100% Прив'язка Первинна Додаткова Оновлення BIOS та драйверів Старт Звук завантаження Яскравість Зменшити яскравість Підвищити яскравість Чорно-біла іконка трею Калібр. Зарядка Колір Контраст Контролер CPU Boost Своє Уповільнення За замовчуванням Вимкнути контролер Вимкнути при закритті Вимкнути овердрайв дисплею Розрядка Завантажити Колірні Профілі Завантажити Драйвери та програми Вимикає dGPU, щоб зберегти заряд Еко Увімкнути GPU при вимиканні лептопу Вимкнення dGPU коли NVIDIA Display Mode не встановлено в режим Optimus може спричинити проблеми з управлінням яскравістю до наступного перезавантаження. Ви все ще хочете продовжити? NVIDIA Display Mode не в режимі Optimus Налаштування Енергії Експортувати Профіль Додатково Додаткові Налаштування Скинути Профілі кулерів Профіль кулеру CPU Профіль кулеру GPU Профіль додаткового кулеру Профілі кулерів Кулери та Потужність Fan Кулери та Потужність Безмерехтливе Затемнення Гарячі клавіші Fn+F працюють без натискання Fn FN-Lock Вимк. FN-Lock Увімк. Dynamic Boost Зміна Core Clock Offset Memory Clock Offset Режим Графіки Тільки iGPU iGPU + dGPU Ексклюзивний dGPU Потужність GPU Параметри GPU Temperature Target Хвилин до режиму глибокого сну з акумулятором (0 - Вимкнено) Висока Поворот Імпорт Профілю Прив'язки клавіш Клавіатура Закривати додатки, що використовують GPU, під час переходу в режим Eco Підсвітка Клавіатура Дисплей LED-Індикатори стану Кришка Лайтбар Ілюмінація Блокування екрану Лого Низька Лівий стік - Deadzone Лівий тригер - Deadzone Аудіо візуалізатор Бінарний банер Яскрава Годинник Слабка Логотип Rog Середня Вимкнена Картинка Максимальна частота оновлення для мінімізації затримок Частота 60Гц, щоб зберегти заряд батареї Хвил. Хвилини Angle Snapping / Tuning Авто-вимикання Відповідь Кнопок Не вдалося імпортувати профіль. Вибраний файл не є допустимим профілем миші або є пошкодженим. Відстань підйому Попередження про низький заряд Режим Швидкодії Синхронізувати з мишею Мульти зона Мульти зона сильна Беззвучний Вимкнути мікрофон Ніколи Є оновлення Немає оновлень Не під'єднано Вимк. Увімк. Одна зона Відкрити вікно G-Helper Авто Вмикає Еко на батареї та Стандартний на зарядці Вимикати GPU на зарядці від USB-C в режимі Авто Інше Овердрайв Режим Периферія Картинка / GIF Відтворення / Пауза Частота опитування Ліміти Потужності Налаштування лімітів потужності є експериментальною функцією. Використовуйте обережно та на свій страх і ризик! Print Screen Профіль Вихід Скинути Щось використовує dGPU та запобігає Еко-режиму. Дозвольте G-Helper спробувати перезапустити dGPU у менеджері пристрою? (Будь ласка, продовжуйте на власний ризик) Оберти Правий стік - Deadzone Правий тригер - Deadzone Запускати на старті Масштабування Зменшити яскравість Screenpad Збільшити яскравість Screenpad Вимикання Тихий Сон Вмикає dGPU для нормального використання Стандартний Запустити Запускаються сервіси Помилка запуску Зупинити Зупинити GPU додатки Зупиняються сервіси Аура Автоматично вмикати режим Clamshell Fn-Lock Міні-лед (якщо є) Вимкнути екран Сенсорний екран Сенсорний екран Турбо Вимкнений Вимкнути на батареї Підключає екран лептопу до dGPU, щоб підвищити FPS Ультімейт Undervolting є експериментальним. Якщо значення занизькі для вашого CPU, це може спричинити нестабільність або пошкодити дані. Якщо хочете спробувати - почніть з малих значень, натисніть «Застосувати» та перевірте, чи стабільно все працює. Активний Оновлення Версія Сила вібрації Візуальний режим Візуальні режими недоступні, коли HDR активний Візуальні режими недоступні, коли екран вимкнений Зменшення гучності Вимкнення звуку Збільшення гучності Тримати вікно завжди зверху Зум Донат Легенда Немає даних Can't check local version Є оновлення Update Available Оновлено Updated Відскок Слеш Завантаження Bit Stream Трансмісія Потік Flux Phantom Spectrum Hazard Interfacing Ramp Game Over Почати Buzzer Static Рівень заряду батареї Interval Off Interval {0}s Вимкніть Windows > > Динамічне освітлення Режим Ambient може збільшити використання ресурсів Motion Sync Zone Mode ================================================ FILE: app/Properties/Strings.vi.resx ================================================  text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Gia tốc Không thể kết nối đến ASUS ACPI. Chương trình cần nó để có thể hoạt động. Hãy thử cài lại Asus System Control Interface Khởi động lại thiết bị của bạn để áp dụng thay đổi Khởi động lại ngay? Có vẻ như GPU rời đang được sử dụng nhiều, tắt nó? Chế độ Tiết kiệm Chuyển sang Chế độ Tối thượng cần phải khởi động lại Chế độ Tối thượng yêu cầu phải khởi động lại Khởi động lại ngay? Bộ điều khiển Ally Tốc độ AniMe Matrix Chương trình đã chạy G-Helper đã chạy. Hãy kiểm tra khay hệ thống Áp dụng Áp dụng Đường cong quạt tuỳ chỉnh Áp dụng Giới hạn công suất Tự động điều chỉnh Kế hoạch nguồn của Windows Bộ nhớ chuyển cho GPU Dịch vụ Asus đang chạy Trạng thái pin Hơi thở Chiều kim đồng hồ Chuyển màu Sao chổi Ngược chiều kim đồng hồ Nhanh Chế độ sáng Bình thường Cầu vồng Ngẫu nhiên Phản ứng Chậm Tĩnh Nhấp nháy Tất cả Dock kết nối Biểu tượng Con lăn chuột Underglow Áp dụng tự động Tự động Chuyển về 60Hz khi không cắm sạc và 120Hz khi cắm sạc Đang bật Thấp Cao Trung bình Tắt Số giây để tắt đèn nền bàn phím(khi dùng pin) Số giây để tắt đèn nền bàn phím(khi dùng pin) Số giây để tắt đèn bàn phím (khi cắm dây) Cân bằng Sạc Giới hạn sạc Sức khoẻ pin Sạc 1 lần đến 100% Binding Chính Phụ Cập nhật BIOS và driver Khởi động Tiếng ROG khi bật máy Độ sáng Giảm độ sáng Tăng độ sáng Logo đen trắng ở thanh tác vụ Cân chỉnh Đang sạc Màu Độ tương phản Bộ điều khiển Tăng tốc CPU Tuỳ chỉnh Giảm tốc Mặc định Tắt điều khiển Tắt khi gập máy xuống Tắt Overdrive Đang không sạc Download Color Profiles Tải xuống Driver và phần mềm Tắt GPU rời để tiết kiệm pin Tiết kiệm Khởi chạy GPU khi máy tắt (tránh vấn đề khi chạy chế độ Eco) Vô hiệu hóa GPU rời bằng cách chuyển sang chế độ Eco trong khi chế độ màn hình trong NVIDIA Control Panel chưa được đổi thành Optimus có thể gây ra lỗi điều chỉnh độ sáng cho đến khi khởi động lại. Bạn có muốn tiếp tục không? Chế độ màn hình trong NVIDIA chưa được chỉnh sang Optimus Các chế độ năng lượng Xuất cấu hình ra file Thêm Cài đặt bổ sung Đặt về mặc định Chế độ Quạt Cấu hình Quạt CPU Cấu hình Quạt GPU Cấu hình Quạt giữa Cấu hình Quạt Quạt và Công suất Quạt Quạt + Công suất Flicker-free Dimming Dùng những tổ hợp phím Fn+F mà không cần Fn Tắt khóa Fn Bật khóa Fn Tăng tốc năng động Đang đổi GPU Bù trừ Tốc độ Nhân GPU Bù trừ Tốc độ RAM GPU Chế độ GPU Chỉ dùng GPU tích hợp GPU tích hợp + GPU rời Chỉ dùng GPU rời Chế độ điện GPU Cài đặt GPU Nhiệt độ đích Minutes till Hibernation in sleep on battery (0 - OFF) Cao Xoay Hình Ảnh Nhập cấu hình từ file Tổ hợp phím Bàn phím Ngưng tất cả app dùng GPU khi đổi sang chế độ Eco Độ sáng đèn nền Bàn phím Laptop Màn hình Laptop Đèn báo LED Màn gập Thanh sáng Ánh sáng Màn hình khoá Biểu tượng Thấp Deadzone stick trái Deadzone trigger trái Sóng nhạc Nhị phân Sáng Đồng hồ Sáng mờ Logo ROG Vừa phải Tắt Hình ảnh Tần số quét tối đa để có độ trễ thấp Tần số quét 60Hz để tiết kiệm pin Phút Minutes Angle Snapping / Tuning Auto Power Off After Button Response Import failed. Selected file is not a valid mouse profile or corrutpted. Lift Off Distance Low Battery Warning at Performance Synchronize with mouse Multi Zone Multi Zone Strong Muted Tắt Mic Never New updates No new updates Not Connected Off On One Zone Mở cửa sổ G-Helper Tối ưu Chuyển về Tiết kiệm khi dùng pin và Tiêu chuẩn khi cắm sạc Tắt GPU khi dùng sạc Type-C ở Chế độ Tối ưu Khác Overdrive Chế độ Hiệu suất Peripherals Ảnh tĩnh / Ảnh động Phát / Dừng Polling Rate Giới hạn công suất Giới hạn công suất là tính năng thử nghiệm. Sử dụng nó cẩn thận và tự chịu mọi rủi ro! Chụp màn hình Profile Thoát Reset Something is using dGPU and preventing Eco mode. Let G-Helper try to restart dGPU in device manager? (Please proceed at your own risk) VTP Right Stick Deadzones Right Trigger Deadzones Chạy khi khởi động Scaling Quality Screenpad Brightness Down Screenpad Brightness Up Tắt nguồn Im lặng Ngủ Bật GPU rời song song với GPU tích hợp Tiêu chuẩn Start Starting Services Khởi động lỗi Stop Stop GPU Applications Stopping Services Bật tắt Aura Auto Toggle Clamshell Mode Toggle Fn-Lock Bật tắt Miniled(Nếu có hỗ trợ) Bật tắt màn hình Toggle Touchscreen Touchscreen Turbo Đã tắt Tắt khi không cắm sạc Chỉ dùng GPU rời, tối đa hóa FPS Tối thượng Undervolting is an experimental and risky feature. If applied values are too low for your hardware, it can become unstable, shut down or cause data corruption. If you want to try - start from small values first, click Apply and test what works for you. Unmuted Updates Phiên bản Vibration Strength Visual Mode Visual Modes are not available when HDR is active Visual Modes are not available when laptop screen is off Giảm âm lượng Tắt âm lượng Tăng âm lượng Giữ cửa sổ ở trên cùng Zoom Donate Legend Can't check local version Can't check local version Update Available Update Available Updated Updated Bounce Slash Loading Bit Stream Transmission Flow Flux Phantom Spectrum Hazard Interfacing Ramp Game Over Start Buzzer Static Battery Level Interval Off Interval {0}s Please disable Windows > Dynamic Lighting Ambient mode may increase resource usage Motion Sync Zone Mode ================================================ FILE: app/Properties/Strings.zh-CN.resx ================================================  text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 加速 无法连接到ASUS ACPI。 没有它应用程序将无法运行。 请尝试安装Asus System Control Interface驱动。 重新启动您的设备以应用更改 现在重启? 看起来 GPU 正在被重度使用,是否禁用? 集显模式 关闭独显直连需要重启 切换到独显直连需要重启 现在重启吗? Ally 控制器 动画速度 Anime Matrix 应用已经在运行 G-Helper已经在运行。 请查看系统托盘中的图标。 应用 应用自定义风扇曲线 应用功率限制 自动调整Windows电源模式 分配给 GPU 的内存 正在运行的 Asus 服务 电池状态 呼吸 顺时针 彩色循环 彗星 逆时针 快速 灯效模式 正常 彩虹 随机 触发 恒亮(静态) 闪烁 全部 Dock Logo 滚轮 底灯 自动应用 自动 使用电池时设置为60Hz,并在插上电源时恢复 唤醒时 低亮度 高亮度 中亮度 背光关闭 插电/电池时熄灭时间(0表示长亮) 充电模式下的背光超时 电源模式下的背光超时 平衡模式 电池电量 电池充电限制 电池健康 一次性充电至 100% 绑定 主要 次要 BIOS 和驱动程序更新 开机时 开机音效 亮度 降低亮度 提高亮度 黑白托盘图标 校准 充电中 颜色 对比 控制器 CPU 睿频 自定义设置 减速 默认 禁用控制器 合盖时禁用 禁用屏幕快速显示(OD) 正在放电 下载颜色配置文件 下载 驱动程序和软件 禁用独显以节省电池电量 集显模式 在关闭时启用 GPU (防止与 Eco 模式出现问题) NVIDIA 控制面板中的显示模式未设置为 Optimus 时,通过集显模式禁用独立显卡可能会使亮度控制出现问题,直到下次重启后才能恢复。 确定还要继续吗? NVIDIA 显示模式未设置为 Optimus 电源设置 导出配置文件 更多 更多设置 恢复默认设置 风扇曲线 CPU 风扇配置文件 GPU 风扇配置文件 Mid 风扇配置文件 风扇配置 风扇和电源 风扇 风扇 + 功率 低亮度防闪烁功能 打开FnLock (无需按下FN使用FN+(F1-F12)热键) Fn锁定关 Fn锁定开 动态加速 切换中... 核心频率偏移量 显存频率偏移量 显卡模式 仅限核显 核显 + 独显 独显直连 GPU 功率 GPU 设置 温度目标 在使用电池时几分钟后进入休眠状态 (0 - 关闭) 图像旋转 导入配置 按键绑定 键盘 当切换到集显模式时,停止所有正在使用独显的应用 背光 笔记本键盘 笔记本屏幕 LED 状态指示器 盖子 灯条 背光 锁定屏幕 徽标 左摇杆死区 左扳机死区 音频可视化器 Anime Matrix 标识 明亮 时钟 暗淡 ROG logo 关闭 图片 更高的刷新率和更低的延迟 调整刷新率为60Hz以节省电量 分钟 分钟 Angle Snapping / Tuning 自动关闭时间 按键响应 导入失败,选中的文件不是有效的配置文件或已损坏。 响应高度 低于该电量时警告 性能 和鼠标同步 多区 多区强化 麦克风关闭 静音麦克风 从不 有更新 无更新 未连接 单区 打开G-Helper窗口 自动切换 使用电池时切换到集显模式,并在插上电源后重新启用标准模式 在自动切换模式下,使用USB-C为笔记本供电时禁用GPU 其他 超频 性能模式 外设 图片/动图 播放/暂停 回报率 功率限制 功率限制 是实验性功能。 谨慎使用,风险自负! 截图 配置 退出 重置 有程序正在使用独显并阻止进入集显模式。要让 G-Helper 在设备管理器中重新启动独显吗?(请自行承担风险) 转/分钟 右摇杆死区 右扳机死区 开机自启 缩放质量 Screenpad亮度降低 Screenpad亮度增加 关机时 静音模式 睡眠时 启用独显以供日常使用 标准模式 启动 启动服务中... 启动错误 停止 停止使用 GPU 的程序 停止服务中... 切换 Aura 模式 自动切换合盖模式 切换 Fn 锁定 切换 MiniLED (如果支持) 关闭屏幕 切换触摸屏 触摸屏 增强模式 已关闭 使用电池时关闭 开启独显直连获得最佳帧率 独显直连 降低电压是实验性的危险功能。 如果对硬件应用的值太低,可能会产生不稳定、关闭现象或造成数据损坏问题。 如果你想要尝试,应先从小值开始,点击应用并测试合适的值。 麦克风开启 更新 版本 震动强度 色域模式 HDR 开启时不支持色域模式 笔记本自带屏幕关闭时不支持色域模式 音量降低 静音 音量增加 窗口置顶 缩放 赞助 Legend 无法检查本地版本 Can't check local version 有可用更新 Update Available 已更新 Updated Bounce Slash 加载中 Bit Stream Transmission Flow Flux Phantom Spectrum Hazard Interfacing Ramp 游戏结束 启动 Buzzer 恒亮(静态) 电池电量 Interval Off 间隔 {0}秒 请关闭个性化 > 动态光效 环境模式可能会增加资源使用 动态同步 Zone 模式 ================================================ FILE: app/Properties/Strings.zh-TW.resx ================================================  text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 滑鼠加速 無法連結到華碩 ACPI,應用程式無法執行。 請嘗試安裝 Asus System Control Interface 重新啟動裝置以套用變更 現在重新啟動? 看起來 GPU 正在被重度使用,是否禁用? 節能模式 關閉獨顯需要重新啟動 獨顯輸出需要重新啟動 立即重新啟動? Ally控制器 動畫速度 AniMeMatrix™ 程式正在執行 G-Helper 正在執行。 請檢查右下系統匣。 套用 套用自定義風扇曲線 套用功率限制 自動調整 Windows 電源模式 分配給 GPU 的記憶體 執行中的華碩服務 電池狀態 呼吸 順時針 色彩循環 彗星 逆時針 快速 燈效模式 正常 彩虹 隨機 觸發 靜態恆亮 閃爍 全部 底座 Logo 滾輪 底光 自動套用 自動 使用電池時設定為 60Hz,並在插上電源時恢復 喚醒時 最大 中等 關閉 閒置幾秒後關閉燈光:插電時 / 使用電池 (0 = 不關閉) 閒置時關閉燈光(電池模式) 閒置時關閉燈光(充電模式) 效能 充電 電池充電上限 電池健康度 僅本次將電力充滿 綁定 主要 次要 BIOS 與驅動程式更新 開機時 開機音效 亮度 螢幕亮度降低 螢幕亮度提高 工作列圖示黑白化 校準 充電中 顏色 對比 控制器 CPU 加速 自定義設置 滑鼠減速 預設 停用控制器 蓋上螢幕時取消 禁用螢幕加速OD 使用電池中 下載色彩設定檔 下載 驅動程式與軟體 禁用獨顯以節省電池電量 節能模式 關機前啟動顯卡(解決切換顯卡節能模式&混合輸出和亮度的某些問題) 「Nvidia控制面板」中的顯示模式未設置為自動切換時,透過G-Helper的節能模式禁用獨顯可能導致螢幕亮度控制出現問題直到下次重新開機後。 是否繼續? Nvidia顯示模式未設置為自動切換 電源設定 匯出設定檔 更多 更多設定 恢復原廠設定 風扇曲線 CPU 風扇設定檔 GPU 風扇設定檔 小風扇設定檔 風扇設定檔 風扇和電源 風扇 自定義 不閃屏調光(Flicker-free Dimming) 使用 Fn + F1~F12 功能時無須按下Fn鍵 Fn鎖定解除 Fn鎖定 動態加速 (Dynamic Boost) 切換中... 核心時脈偏移量(Offset) 顯示卡記憶體偏移量(Offset) GPU 模式 僅限內顯 內顯 + 獨顯 獨立顯卡 顯卡功耗 顯卡設定 GPU溫度上限 使用電池下何時進入休眠(0=關閉此功能) 圖像旋轉 匯入設定檔 按鍵綁定 鍵盤 切換至節能模式時,關閉所有正在使用獨顯的程式 背光 鍵盤背光 螢幕顯示 LED狀態指示器 螢幕背蓋 燈條 亮度 鎖定螢幕 Logo 左搖桿死區 左扳機(LT)死區 音效視覺化 横幅 明亮 時鐘 黯淡 ROG logo 關閉 圖片 更高的更新率和更低延遲 維持60Hz以節省電量 分鐘 分鐘 直線修正/定位角度 自動關閉電源 按鍵回應 匯入失敗,所選檔案並非有效的滑鼠設定檔或該檔已毀損 響應高度(LOD) 低電量警告 性能設定 與滑鼠同步 多區 多區強化 已靜音 麥克風開關 永不 新的更新 沒有新的更新 未連線 關閉 開啟 單區 開啟G-Helper視窗 自動調節 使用電池時切換到,插入電源時切換到標準模式 自動調節模式下,使用USB-C充電時持續關閉獨顯 其他 OD 性能模式 週邊設備 圖片/動圖 播放/暫停 輪詢率 功率限制 功率限制是實驗性功能。謹慎使用,風險自負! 截圖 設定檔 退出 重設 有其他程式正在使用獨顯導致無法切換至節能模式. 是否讓 G-Helper 於裝置管理員重新啟動獨顯? (請自行評估風險) RPM 右搖桿死區 右扳機(RT)死區 開機時自動執行 縮放品質 第二觸控螢幕亮度降低 第二觸控螢幕亮度提高 關機時 靜音 睡眠時 自動切換獨立顯卡以及整合式顯卡 (MS-Hybrid) 標準模式 啟動 正在啟動服務 啟動錯誤 停止 停止GPU相關程式 正在停止服務 切換 Aura 模式 翻蓋模式 (蓋上筆電但有外接螢幕時,系統仍會持續運行) 切換 Fn-Lock 切換 mini-LED (若有支援) 切換螢幕 切換螢幕觸控 觸控螢幕 極速 已關閉 電池模式時關閉 開啟獨顯輸出獲得最佳幀數 獨顯輸出 降壓是一項實驗性且有風險的功能,若設定的值過低,可能造成系統不穩定甚至無預警關機,建議可先嘗試較小的降壓數值,並點擊"套用"來測試適合你的使用狀況 已取消靜音 更新驅動 版本 震動強度 色域模式 HDR開啟時不支援色域模式 筆電螢幕闔上時不支援色域模式 音量降低 靜音 音量增加 視窗置頂 縮放 捐贈 Legend 無法檢查本機版本 Can't check local version 有可用的更新 Update Available 已更新 Updated Bounce Slash Loading Bit Stream Transmission Flow Flux Phantom Spectrum Hazard Interfacing Ramp Game Over Start Buzzer Static Battery Level Interval Off 間隔 {0}秒 Please disable Windows > Dynamic Lighting Ambient mode may increase resource usage 動態同步 Zone 模式 ================================================ FILE: app/Properties/launchSettings.json ================================================ { "profiles": { "GHelper": { "commandName": "Project" } } } ================================================ FILE: app/Ryzen/OpenLibSys.cs ================================================ //----------------------------------------------------------------------------- // Author : hiyohiyo // Mail : hiyohiyo@crystalmark.info // Web : http://openlibsys.org/ // License : The modified BSD license // // Copyright 2007-2009 OpenLibSys.org. All rights reserved. //----------------------------------------------------------------------------- // This is support library for WinRing0 1.3.x. using System.Runtime.InteropServices; namespace Ryzen { public class Ols : IDisposable { const string dllNameX64 = "WinRing0x64.dll"; const string dllName = "WinRing0.dll"; // for this support library public enum Status { NO_ERROR = 0, DLL_NOT_FOUND = 1, DLL_INCORRECT_VERSION = 2, DLL_INITIALIZE_ERROR = 3, } // for WinRing0 public enum OlsDllStatus { OLS_DLL_NO_ERROR = 0, OLS_DLL_UNSUPPORTED_PLATFORM = 1, OLS_DLL_DRIVER_NOT_LOADED = 2, OLS_DLL_DRIVER_NOT_FOUND = 3, OLS_DLL_DRIVER_UNLOADED = 4, OLS_DLL_DRIVER_NOT_LOADED_ON_NETWORK = 5, OLS_DLL_UNKNOWN_ERROR = 9 } // for WinRing0 public enum OlsDriverType { OLS_DRIVER_TYPE_UNKNOWN = 0, OLS_DRIVER_TYPE_WIN_9X = 1, OLS_DRIVER_TYPE_WIN_NT = 2, OLS_DRIVER_TYPE_WIN_NT4 = 3, // Obsolete OLS_DRIVER_TYPE_WIN_NT_X64 = 4, OLS_DRIVER_TYPE_WIN_NT_IA64 = 5 } // for WinRing0 public enum OlsErrorPci : uint { OLS_ERROR_PCI_BUS_NOT_EXIST = 0xE0000001, OLS_ERROR_PCI_NO_DEVICE = 0xE0000002, OLS_ERROR_PCI_WRITE_CONFIG = 0xE0000003, OLS_ERROR_PCI_READ_CONFIG = 0xE0000004 } // Bus Number, Device Number and Function Number to PCI Device Address public uint PciBusDevFunc(uint bus, uint dev, uint func) { return (bus & 0xFF) << 8 | (dev & 0x1F) << 3 | func & 7; } // PCI Device Address to Bus Number public uint PciGetBus(uint address) { return address >> 8 & 0xFF; } // PCI Device Address to Device Number public uint PciGetDev(uint address) { return address >> 3 & 0x1F; } // PCI Device Address to Function Number public uint PciGetFunc(uint address) { return address & 7; } [DllImport("kernel32")] public extern static nint LoadLibrary(string lpFileName); [DllImport("kernel32", SetLastError = true)] private static extern bool FreeLibrary(nint hModule); [DllImport("kernel32", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = false)] private static extern nint GetProcAddress(nint hModule, [MarshalAs(UnmanagedType.LPStr)] string lpProcName); private nint module = nint.Zero; private uint status = (uint)Status.NO_ERROR; public Ols() { string fileName; if (nint.Size == 8) { fileName = dllNameX64; } else { fileName = dllName; } module = LoadLibrary(fileName); if (module == nint.Zero) { status = (uint)Status.DLL_NOT_FOUND; } else { GetDllStatus = (_GetDllStatus)GetDelegate("GetDllStatus", typeof(_GetDllStatus)); GetDllVersion = (_GetDllVersion)GetDelegate("GetDllVersion", typeof(_GetDllVersion)); GetDriverVersion = (_GetDriverVersion)GetDelegate("GetDriverVersion", typeof(_GetDriverVersion)); GetDriverType = (_GetDriverType)GetDelegate("GetDriverType", typeof(_GetDriverType)); InitializeOls = (_InitializeOls)GetDelegate("InitializeOls", typeof(_InitializeOls)); DeinitializeOls = (_DeinitializeOls)GetDelegate("DeinitializeOls", typeof(_DeinitializeOls)); IsCpuid = (_IsCpuid)GetDelegate("IsCpuid", typeof(_IsCpuid)); IsMsr = (_IsMsr)GetDelegate("IsMsr", typeof(_IsMsr)); IsTsc = (_IsTsc)GetDelegate("IsTsc", typeof(_IsTsc)); Hlt = (_Hlt)GetDelegate("Hlt", typeof(_Hlt)); HltTx = (_HltTx)GetDelegate("HltTx", typeof(_HltTx)); HltPx = (_HltPx)GetDelegate("HltPx", typeof(_HltPx)); Rdmsr = (_Rdmsr)GetDelegate("Rdmsr", typeof(_Rdmsr)); RdmsrTx = (_RdmsrTx)GetDelegate("RdmsrTx", typeof(_RdmsrTx)); RdmsrPx = (_RdmsrPx)GetDelegate("RdmsrPx", typeof(_RdmsrPx)); Wrmsr = (_Wrmsr)GetDelegate("Wrmsr", typeof(_Wrmsr)); WrmsrTx = (_WrmsrTx)GetDelegate("WrmsrTx", typeof(_WrmsrTx)); WrmsrPx = (_WrmsrPx)GetDelegate("WrmsrPx", typeof(_WrmsrPx)); Rdpmc = (_Rdpmc)GetDelegate("Rdpmc", typeof(_Rdpmc)); RdpmcTx = (_RdpmcTx)GetDelegate("RdpmcTx", typeof(_RdpmcTx)); RdpmcPx = (_RdpmcPx)GetDelegate("RdpmcPx", typeof(_RdpmcPx)); Cpuid = (_Cpuid)GetDelegate("Cpuid", typeof(_Cpuid)); CpuidTx = (_CpuidTx)GetDelegate("CpuidTx", typeof(_CpuidTx)); CpuidPx = (_CpuidPx)GetDelegate("CpuidPx", typeof(_CpuidPx)); Rdtsc = (_Rdtsc)GetDelegate("Rdtsc", typeof(_Rdtsc)); RdtscTx = (_RdtscTx)GetDelegate("RdtscTx", typeof(_RdtscTx)); RdtscPx = (_RdtscPx)GetDelegate("RdtscPx", typeof(_RdtscPx)); ReadIoPortByte = (_ReadIoPortByte)GetDelegate("ReadIoPortByte", typeof(_ReadIoPortByte)); ReadIoPortWord = (_ReadIoPortWord)GetDelegate("ReadIoPortWord", typeof(_ReadIoPortWord)); ReadIoPortDword = (_ReadIoPortDword)GetDelegate("ReadIoPortDword", typeof(_ReadIoPortDword)); ReadIoPortByteEx = (_ReadIoPortByteEx)GetDelegate("ReadIoPortByteEx", typeof(_ReadIoPortByteEx)); ReadIoPortWordEx = (_ReadIoPortWordEx)GetDelegate("ReadIoPortWordEx", typeof(_ReadIoPortWordEx)); ReadIoPortDwordEx = (_ReadIoPortDwordEx)GetDelegate("ReadIoPortDwordEx", typeof(_ReadIoPortDwordEx)); WriteIoPortByte = (_WriteIoPortByte)GetDelegate("WriteIoPortByte", typeof(_WriteIoPortByte)); WriteIoPortWord = (_WriteIoPortWord)GetDelegate("WriteIoPortWord", typeof(_WriteIoPortWord)); WriteIoPortDword = (_WriteIoPortDword)GetDelegate("WriteIoPortDword", typeof(_WriteIoPortDword)); WriteIoPortByteEx = (_WriteIoPortByteEx)GetDelegate("WriteIoPortByteEx", typeof(_WriteIoPortByteEx)); WriteIoPortWordEx = (_WriteIoPortWordEx)GetDelegate("WriteIoPortWordEx", typeof(_WriteIoPortWordEx)); WriteIoPortDwordEx = (_WriteIoPortDwordEx)GetDelegate("WriteIoPortDwordEx", typeof(_WriteIoPortDwordEx)); SetPciMaxBusIndex = (_SetPciMaxBusIndex)GetDelegate("SetPciMaxBusIndex", typeof(_SetPciMaxBusIndex)); ReadPciConfigByte = (_ReadPciConfigByte)GetDelegate("ReadPciConfigByte", typeof(_ReadPciConfigByte)); ReadPciConfigWord = (_ReadPciConfigWord)GetDelegate("ReadPciConfigWord", typeof(_ReadPciConfigWord)); ReadPciConfigDword = (_ReadPciConfigDword)GetDelegate("ReadPciConfigDword", typeof(_ReadPciConfigDword)); ReadPciConfigByteEx = (_ReadPciConfigByteEx)GetDelegate("ReadPciConfigByteEx", typeof(_ReadPciConfigByteEx)); ReadPciConfigWordEx = (_ReadPciConfigWordEx)GetDelegate("ReadPciConfigWordEx", typeof(_ReadPciConfigWordEx)); ReadPciConfigDwordEx = (_ReadPciConfigDwordEx)GetDelegate("ReadPciConfigDwordEx", typeof(_ReadPciConfigDwordEx)); ReadPciConfigDwordEx64 = (_ReadPciConfigDwordEx64)GetDelegate("ReadPciConfigDwordEx", typeof(_ReadPciConfigDwordEx64)); WritePciConfigByte = (_WritePciConfigByte)GetDelegate("WritePciConfigByte", typeof(_WritePciConfigByte)); WritePciConfigWord = (_WritePciConfigWord)GetDelegate("WritePciConfigWord", typeof(_WritePciConfigWord)); WritePciConfigDword = (_WritePciConfigDword)GetDelegate("WritePciConfigDword", typeof(_WritePciConfigDword)); WritePciConfigByteEx = (_WritePciConfigByteEx)GetDelegate("WritePciConfigByteEx", typeof(_WritePciConfigByteEx)); WritePciConfigWordEx = (_WritePciConfigWordEx)GetDelegate("WritePciConfigWordEx", typeof(_WritePciConfigWordEx)); WritePciConfigDwordEx = (_WritePciConfigDwordEx)GetDelegate("WritePciConfigDwordEx", typeof(_WritePciConfigDwordEx)); WritePciConfigDwordEx64 = (_WritePciConfigDwordEx64)GetDelegate("WritePciConfigDwordEx", typeof(_WritePciConfigDwordEx64)); FindPciDeviceById = (_FindPciDeviceById)GetDelegate("FindPciDeviceById", typeof(_FindPciDeviceById)); FindPciDeviceByClass = (_FindPciDeviceByClass)GetDelegate("FindPciDeviceByClass", typeof(_FindPciDeviceByClass)); /* ReadDmiMemory = (_ReadDmiMemory)GetDelegate("ReadDmiMemory", typeof(_ReadDmiMemory)); ReadPhysicalMemory = (_ReadPhysicalMemory)GetDelegate("ReadPhysicalMemory", typeof(_ReadPhysicalMemory)); WritePhysicalMemory = (_WritePhysicalMemory)GetDelegate("WritePhysicalMemory", typeof(_WritePhysicalMemory)); */ if (!( GetDllStatus != null && GetDllVersion != null && GetDriverVersion != null && GetDriverType != null && InitializeOls != null && DeinitializeOls != null && IsCpuid != null && IsMsr != null && IsTsc != null && Hlt != null && HltTx != null && HltPx != null && Rdmsr != null && RdmsrTx != null && RdmsrPx != null && Wrmsr != null && WrmsrTx != null && WrmsrPx != null && Rdpmc != null && RdpmcTx != null && RdpmcPx != null && Cpuid != null && CpuidTx != null && CpuidPx != null && Rdtsc != null && RdtscTx != null && RdtscPx != null && ReadIoPortByte != null && ReadIoPortWord != null && ReadIoPortDword != null && ReadIoPortByteEx != null && ReadIoPortWordEx != null && ReadIoPortDwordEx != null && WriteIoPortByte != null && WriteIoPortWord != null && WriteIoPortDword != null && WriteIoPortByteEx != null && WriteIoPortWordEx != null && WriteIoPortDwordEx != null && SetPciMaxBusIndex != null && ReadPciConfigByte != null && ReadPciConfigWord != null && ReadPciConfigDword != null && ReadPciConfigByteEx != null && ReadPciConfigWordEx != null && ReadPciConfigDwordEx != null && ReadPciConfigDwordEx64 != null && WritePciConfigByte != null && WritePciConfigWord != null && WritePciConfigDword != null && WritePciConfigByteEx != null && WritePciConfigWordEx != null && WritePciConfigDwordEx != null && WritePciConfigDwordEx64 != null && FindPciDeviceById != null && FindPciDeviceByClass != null /*&& ReadDmiMemory != null && ReadPhysicalMemory != null && WritePhysicalMemory != null */ )) { status = (uint)Status.DLL_INCORRECT_VERSION; } if (InitializeOls() == 0) { status = (uint)Status.DLL_INITIALIZE_ERROR; } } } public uint GetStatus() { return status; } public void Dispose() { if (module != nint.Zero) { DeinitializeOls(); FreeLibrary(module); module = nint.Zero; } } public Delegate GetDelegate(string procName, Type delegateType) { nint ptr = GetProcAddress(module, procName); if (ptr != nint.Zero) { Delegate d = Marshal.GetDelegateForFunctionPointer(ptr, delegateType); return d; } int result = Marshal.GetHRForLastWin32Error(); throw Marshal.GetExceptionForHR(result); } //----------------------------------------------------------------------------- // DLL Information //----------------------------------------------------------------------------- public delegate uint _GetDllStatus(); public delegate uint _GetDllVersion(ref byte major, ref byte minor, ref byte revision, ref byte release); public delegate uint _GetDriverVersion(ref byte major, ref byte minor, ref byte revision, ref byte release); public delegate uint _GetDriverType(); public delegate int _InitializeOls(); public delegate void _DeinitializeOls(); public _GetDllStatus GetDllStatus = null; public _GetDriverType GetDriverType = null; public _GetDllVersion GetDllVersion = null; public _GetDriverVersion GetDriverVersion = null; public _InitializeOls InitializeOls = null; public _DeinitializeOls DeinitializeOls = null; //----------------------------------------------------------------------------- // CPU //----------------------------------------------------------------------------- public delegate int _IsCpuid(); public delegate int _IsMsr(); public delegate int _IsTsc(); public delegate int _Hlt(); public delegate int _HltTx(nuint threadAffinityMask); public delegate int _HltPx(nuint processAffinityMask); public delegate int _Rdmsr(uint index, ref uint eax, ref uint edx); public delegate int _RdmsrTx(uint index, ref uint eax, ref uint edx, nuint threadAffinityMask); public delegate int _RdmsrPx(uint index, ref uint eax, ref uint edx, nuint processAffinityMask); public delegate int _Wrmsr(uint index, uint eax, uint edx); public delegate int _WrmsrTx(uint index, uint eax, uint edx, nuint threadAffinityMask); public delegate int _WrmsrPx(uint index, uint eax, uint edx, nuint processAffinityMask); public delegate int _Rdpmc(uint index, ref uint eax, ref uint edx); public delegate int _RdpmcTx(uint index, ref uint eax, ref uint edx, nuint threadAffinityMask); public delegate int _RdpmcPx(uint index, ref uint eax, ref uint edx, nuint processAffinityMask); public delegate int _Cpuid(uint index, ref uint eax, ref uint ebx, ref uint ecx, ref uint edx); public delegate int _CpuidTx(uint index, ref uint eax, ref uint ebx, ref uint ecx, ref uint edx, nuint threadAffinityMask); public delegate int _CpuidPx(uint index, ref uint eax, ref uint ebx, ref uint ecx, ref uint edx, nuint processAffinityMask); public delegate int _Rdtsc(ref uint eax, ref uint edx); public delegate int _RdtscTx(ref uint eax, ref uint edx, nuint threadAffinityMask); public delegate int _RdtscPx(ref uint eax, ref uint edx, nuint processAffinityMask); public _IsCpuid IsCpuid = null; public _IsMsr IsMsr = null; public _IsTsc IsTsc = null; public _Hlt Hlt = null; public _HltTx HltTx = null; public _HltPx HltPx = null; public _Rdmsr Rdmsr = null; public _RdmsrTx RdmsrTx = null; public _RdmsrPx RdmsrPx = null; public _Wrmsr Wrmsr = null; public _WrmsrTx WrmsrTx = null; public _WrmsrPx WrmsrPx = null; public _Rdpmc Rdpmc = null; public _RdpmcTx RdpmcTx = null; public _RdpmcPx RdpmcPx = null; public _Cpuid Cpuid = null; public _CpuidTx CpuidTx = null; public _CpuidPx CpuidPx = null; public _Rdtsc Rdtsc = null; public _RdtscTx RdtscTx = null; public _RdtscPx RdtscPx = null; //----------------------------------------------------------------------------- // I/O //----------------------------------------------------------------------------- public delegate byte _ReadIoPortByte(ushort port); public delegate ushort _ReadIoPortWord(ushort port); public delegate uint _ReadIoPortDword(ushort port); public _ReadIoPortByte ReadIoPortByte; public _ReadIoPortWord ReadIoPortWord; public _ReadIoPortDword ReadIoPortDword; public delegate int _ReadIoPortByteEx(ushort port, ref byte value); public delegate int _ReadIoPortWordEx(ushort port, ref ushort value); public delegate int _ReadIoPortDwordEx(ushort port, ref uint value); public _ReadIoPortByteEx ReadIoPortByteEx; public _ReadIoPortWordEx ReadIoPortWordEx; public _ReadIoPortDwordEx ReadIoPortDwordEx; public delegate void _WriteIoPortByte(ushort port, byte value); public delegate void _WriteIoPortWord(ushort port, ushort value); public delegate void _WriteIoPortDword(ushort port, uint value); public _WriteIoPortByte WriteIoPortByte; public _WriteIoPortWord WriteIoPortWord; public _WriteIoPortDword WriteIoPortDword; public delegate int _WriteIoPortByteEx(ushort port, byte value); public delegate int _WriteIoPortWordEx(ushort port, ushort value); public delegate int _WriteIoPortDwordEx(ushort port, uint value); public _WriteIoPortByteEx WriteIoPortByteEx; public _WriteIoPortWordEx WriteIoPortWordEx; public _WriteIoPortDwordEx WriteIoPortDwordEx; //----------------------------------------------------------------------------- // PCI //----------------------------------------------------------------------------- public delegate void _SetPciMaxBusIndex(byte max); public _SetPciMaxBusIndex SetPciMaxBusIndex; public delegate byte _ReadPciConfigByte(uint pciAddress, byte regAddress); public delegate ushort _ReadPciConfigWord(uint pciAddress, byte regAddress); public delegate uint _ReadPciConfigDword(uint pciAddress, byte regAddress); public _ReadPciConfigByte ReadPciConfigByte; public _ReadPciConfigWord ReadPciConfigWord; public _ReadPciConfigDword ReadPciConfigDword; public delegate int _ReadPciConfigByteEx(uint pciAddress, uint regAddress, ref byte value); public delegate int _ReadPciConfigWordEx(uint pciAddress, uint regAddress, ref ushort value); public delegate int _ReadPciConfigDwordEx(uint pciAddress, uint regAddress, ref uint value); public _ReadPciConfigByteEx ReadPciConfigByteEx; public _ReadPciConfigWordEx ReadPciConfigWordEx; public _ReadPciConfigDwordEx ReadPciConfigDwordEx; public delegate int _ReadPciConfigDwordEx64(uint pciAddress, uint regAddress, ref ulong value); public _ReadPciConfigDwordEx64 ReadPciConfigDwordEx64; public delegate void _WritePciConfigByte(uint pciAddress, byte regAddress, byte value); public delegate void _WritePciConfigWord(uint pciAddress, byte regAddress, ushort value); public delegate void _WritePciConfigDword(uint pciAddress, byte regAddress, uint value); public _WritePciConfigByte WritePciConfigByte; public _WritePciConfigWord WritePciConfigWord; public _WritePciConfigDword WritePciConfigDword; public delegate int _WritePciConfigByteEx(uint pciAddress, uint regAddress, byte value); public delegate int _WritePciConfigWordEx(uint pciAddress, uint regAddress, ushort value); public delegate int _WritePciConfigDwordEx(uint pciAddress, uint regAddress, uint value); public _WritePciConfigByteEx WritePciConfigByteEx; public _WritePciConfigWordEx WritePciConfigWordEx; public _WritePciConfigDwordEx WritePciConfigDwordEx; public delegate int _WritePciConfigDwordEx64(uint pciAddress, uint regAddress, ulong value); public _WritePciConfigDwordEx64 WritePciConfigDwordEx64; public delegate uint _FindPciDeviceById(ushort vendorId, ushort deviceId, byte index); public delegate uint _FindPciDeviceByClass(byte baseClass, byte subClass, byte programIf, byte index); public _FindPciDeviceById FindPciDeviceById; public _FindPciDeviceByClass FindPciDeviceByClass; //----------------------------------------------------------------------------- // Physical Memory (unsafe) //----------------------------------------------------------------------------- /*public unsafe delegate uint _ReadDmiMemory(byte* buffer, uint count, uint unitSize); public _ReadDmiMemory ReadDmiMemory; public unsafe delegate uint _ReadPhysicalMemory(UIntPtr address, byte* buffer, uint count, uint unitSize); public unsafe delegate uint _WritePhysicalMemory(UIntPtr address, byte* buffer, uint count, uint unitSize); public _ReadPhysicalMemory ReadPhysicalMemory; public _WritePhysicalMemory WritePhysicalMemory; */ } } ================================================ FILE: app/Ryzen/RyzenControl.cs ================================================ // // This is a optimised/simplified version of Ryzen System Management Unit from https://github.com/JamesCJ60/Universal-x86-Tuning-Utility // I do not take credit for the full functionality of the code (c) // using GHelper.Helpers; using System.Management; using System.Net; namespace Ryzen { internal class RyzenControl { public static int MinCPUUV => AppConfig.Get("min_uv", -40); public static int MaxCPUUV => AppConfig.Get("max_uv", 0); public static int MinIGPUUV = AppConfig.Get("min_igpu_uv", -30); public static int MaxIGPUUV = AppConfig.Get("max_igpu_uv", 0); public static int MinTemp => AppConfig.Get("min_temp", 75); public const int MaxTemp = 98; public const int DefaultTemp = 96; public static int FAMID { get; protected set; } public static string CPUModel = ""; public static string CPUName = ""; //Zen1/+ - -1 //RAVEN - 0 //PICASSO - 1 //DALI - 2 //RENOIR/LUCIENNE - 3 //MATISSE - 4 //VANGOGH - 5 //VERMEER - 6 //CEZANNE/BARCELO - 7 //REMBRANDT - 8 //PHEONIX - 9 //RAPHAEL/DRAGON RANGE - 10 //MENDOCINO - 11 //HAWKPOINT - 12 //STRIXPOINT - 13 //STRIXHALO - 14 //FIRERANGE - 15 public static void Init() { //Get CPU name try { ManagementObjectSearcher myProcessorObject = new ManagementObjectSearcher("select * from Win32_Processor"); foreach (ManagementObject obj in myProcessorObject.Get()) { CPUName = obj["Name"].ToString(); CPUModel = obj["Caption"].ToString(); } } catch (Exception ex) { Logger.WriteLine(ex.Message); } FAMID = 99999; if (CPUModel.Contains("Model " + Convert.ToString(1)) || CPUModel.Contains("Model " + Convert.ToString(8))) { FAMID = -1; //Zen1/+ DT } if (CPUModel.Contains("Model " + Convert.ToString(17))) { FAMID = 0; //RAVEN } if (CPUModel.Contains("Model " + Convert.ToString(24))) { FAMID = 1; //PICASSO } if (CPUModel.Contains("Family " + Convert.ToString(23)) && CPUModel.Contains("Model " + Convert.ToString(32))) { FAMID = 2; //DALI } if (CPUModel.Contains("Model " + Convert.ToString(33))) { FAMID = 6; //VERMEER } if (CPUModel.Contains("Model " + Convert.ToString(96)) || CPUModel.Contains("Model " + Convert.ToString(104))) { FAMID = 3; //RENOIR/LUCIENNE } if (CPUModel.Contains("Model " + Convert.ToString(144))) { FAMID = 5; //VANGOGH } if (CPUModel.Contains("Model " + Convert.ToString(80))) { FAMID = 7; //CEZANNE/BARCELO } if (CPUModel.Contains("Family " + Convert.ToString(25)) && (CPUModel.Contains("Model " + Convert.ToString(63)) || CPUModel.Contains("Model " + Convert.ToString(68)))) { FAMID = 8; //REMBRANDT } if (CPUModel.Contains("Model " + Convert.ToString(116)) || CPUModel.Contains("Model " + Convert.ToString(120))) { FAMID = 9; //PHEONIX } if (CPUModel.Contains("Model " + Convert.ToString(97))) { FAMID = 10; //RAPHAEL/DRAGON RANGE } if (CPUModel.Contains("Model " + Convert.ToString(160))) { FAMID = 11; //MENDOCINO } if (CPUModel.Contains("Model " + Convert.ToString(117))) { FAMID = 12; //HAWKPOINT } if (CPUModel.Contains("Family " + Convert.ToString(26)) && CPUModel.Contains("Model " + Convert.ToString(36))) { FAMID = 13; //STRIXPOINT } if (CPUModel.Contains("Family " + Convert.ToString(26)) && CPUModel.Contains("Model " + Convert.ToString(112))) { FAMID = 14; //STRIXHALO } if (CPUModel.Contains("Family " + Convert.ToString(26)) && CPUModel.Contains("Model " + Convert.ToString(68)) && CPUName.Contains("HX")) { FAMID = 15; //FIRERANGE } Logger.WriteLine($"CPU: {FAMID} - {CPUName} - {CPUModel}"); SetAddresses(); } public static bool IsAMD() { if (CPUName.Length == 0) Init(); return CPUName.Contains("AMD") || CPUName.Contains("Ryzen") || CPUName.Contains("Athlon") || CPUName.Contains("Radeon") || CPUName.Contains("AMD Custom APU 0405"); } public static bool IsSupportedUV() { if (CPUName.Length == 0) Init(); return CPUName.Contains("RYZEN AI MAX") || CPUName.Contains("Ryzen AI 9") || CPUName.Contains("Ryzen 9") || CPUName.Contains("4900H") || CPUName.Contains("4800H") || CPUName.Contains("4600H"); } public static bool IsSupportedUViGPU() { if (CPUName.Length == 0) Init(); return CPUName.Contains("RYZEN AI MAX") || CPUName.Contains("6900H") || CPUName.Contains("7945H") || CPUName.Contains("7845H"); } public static bool IsRingExsists() { string exeDir = Path.GetDirectoryName(Application.ExecutablePath); return File.Exists(exeDir + "\\" + "WinRing0x64.dll") && File.Exists(exeDir + "\\" + "WinRing0x64.sys"); } public static void DownloadRing() { //var appVersion = new Version(Assembly.GetExecutingAssembly().GetName().Version.ToString()); //string requestUri = "https://github.com/seerge/g-helper/releases/download/v" + appVersion.Major + "." + appVersion.Minor + "/PluginAdvancedSettings.zip"; string requestUri = "https://github.com/seerge/g-helper/releases/download/v0.150/PluginAdvancedSettings.zip"; Uri uri = new Uri(requestUri); string exeDir = Path.GetDirectoryName(Application.ExecutablePath); string zipName = Path.GetFileName(uri.LocalPath); string zipLocation = exeDir + "\\" + zipName; using (WebClient client = new WebClient()) { Logger.WriteLine(requestUri); Logger.WriteLine(exeDir); Logger.WriteLine(zipName); try { client.DownloadFile(uri, zipLocation); } catch (Exception ex) { Logger.WriteLine(ex.Message); Logger.WriteLine(ex.ToString()); if (!ProcessHelper.IsUserAdministrator() && !ex.Message.Contains("remote server")) ProcessHelper.RunAsAdmin("uv"); return; } try { System.IO.Compression.ZipFile.ExtractToDirectory(zipLocation, exeDir, overwriteFiles: true); File.Delete(zipLocation); ProcessHelper.RunAsAdmin("uv", true); } catch (Exception ex) { Logger.WriteLine(ex.ToString()); } } } public static void SetAddresses() { Smu.SMU_PCI_ADDR = 0x00000000; Smu.SMU_OFFSET_ADDR = 0xB8; Smu.SMU_OFFSET_DATA = 0xBC; if (FAMID == -1) { Smu.MP1_ADDR_MSG = 0X3B10528; Smu.MP1_ADDR_RSP = 0X3B10564; Smu.MP1_ADDR_ARG = 0X3B10598; Smu.PSMU_ADDR_MSG = 0x3B1051C; Smu.PSMU_ADDR_RSP = 0X3B10568; Smu.PSMU_ADDR_ARG = 0X3B10590; } if (FAMID == 0 || FAMID == 1 || FAMID == 2 || FAMID == 3 || FAMID == 7) { Smu.MP1_ADDR_MSG = 0x3B10528; Smu.MP1_ADDR_RSP = 0x3B10564; Smu.MP1_ADDR_ARG = 0x3B10998; Smu.PSMU_ADDR_MSG = 0x3B10A20; Smu.PSMU_ADDR_RSP = 0x3B10A80; Smu.PSMU_ADDR_ARG = 0x3B10A88; } else if (FAMID == 5 || FAMID == 8 || FAMID == 9 || FAMID == 11 || FAMID == 12 || FAMID == 14) { Smu.MP1_ADDR_MSG = 0x3B10528; Smu.MP1_ADDR_RSP = 0x3B10578; Smu.MP1_ADDR_ARG = 0x3B10998; Smu.PSMU_ADDR_MSG = 0x3B10a20; Smu.PSMU_ADDR_RSP = 0x3B10a80; Smu.PSMU_ADDR_ARG = 0x3B10a88; } else if (FAMID == 13) { Smu.MP1_ADDR_MSG = 0x3B10928; Smu.MP1_ADDR_RSP = 0x3B10978; Smu.MP1_ADDR_ARG = 0x3B10998; Smu.PSMU_ADDR_MSG = 0x3B10a20; Smu.PSMU_ADDR_RSP = 0x3B10a80; Smu.PSMU_ADDR_ARG = 0x3B10a88; } else if (FAMID == 4 || FAMID == 6) { Smu.MP1_ADDR_MSG = 0x3B10530; Smu.MP1_ADDR_RSP = 0x3B1057C; Smu.MP1_ADDR_ARG = 0x3B109C4; Smu.PSMU_ADDR_MSG = 0x3B10524; Smu.PSMU_ADDR_RSP = 0x3B10570; Smu.PSMU_ADDR_ARG = 0x3B10A40; } else if (FAMID == 10 || FAMID == 15) { Smu.MP1_ADDR_MSG = 0x3B10530; Smu.MP1_ADDR_RSP = 0x3B1057C; Smu.MP1_ADDR_ARG = 0x3B109C4; Smu.PSMU_ADDR_MSG = 0x03B10524; Smu.PSMU_ADDR_RSP = 0x03B10570; Smu.PSMU_ADDR_ARG = 0x03B10A40; } else { Smu.MP1_ADDR_MSG = 0; Smu.MP1_ADDR_RSP = 0; Smu.MP1_ADDR_ARG = 0; Smu.PSMU_ADDR_MSG = 0; Smu.PSMU_ADDR_RSP = 0; Smu.PSMU_ADDR_ARG = 0; } } } } ================================================ FILE: app/Ryzen/RyzenSmu.cs ================================================ // // This is a optimised/simplified version of Ryzen System Management Unit from https://github.com/JamesCJ60/Universal-x86-Tuning-Utility // I do not take credit for the full functionality of the code (c) // [assembly: CLSCompliant(false)] namespace Ryzen { class Smu { public enum Status : int { BAD = 0x0, OK = 0x1, FAILED = 0xFF, UNKNOWN_CMD = 0xFE, CMD_REJECTED_PREREQ = 0xFD, CMD_REJECTED_BUSY = 0xFC } private static readonly Dictionary status = new Dictionary() { { Status.BAD, "BAD" }, { Status.OK, "OK" }, { Status.FAILED, "Failed" }, { Status.UNKNOWN_CMD, "Unknown Command" }, { Status.CMD_REJECTED_PREREQ, "CMD Rejected Prereq" }, { Status.CMD_REJECTED_BUSY, "CMD Rejected Busy" } }; Ols RyzenNbAccesss; public Smu(bool EnableDebug) { ShowDebug = EnableDebug; RyzenNbAccesss = new Ols(); // Check WinRing0 status switch (RyzenNbAccesss.GetDllStatus()) { case (uint)Ols.OlsDllStatus.OLS_DLL_NO_ERROR: if (ShowDebug) { //MessageBox.Show("Ols Dll is OK.", "Ols.OlsDllStatus:"); } break; case (uint)Ols.OlsDllStatus.OLS_DLL_DRIVER_NOT_LOADED: //MessageBox.Show("WinRing OLS_DRIVER_NOT_LOADED", "Ols.OlsDllStatus:"); throw new ApplicationException("WinRing OLS_DRIVER_NOT_LOADED"); case (uint)Ols.OlsDllStatus.OLS_DLL_UNSUPPORTED_PLATFORM: //MessageBox.Show("WinRing OLS_UNSUPPORTED_PLATFORM", "Ols.OlsDllStatus:"); throw new ApplicationException("WinRing OLS_UNSUPPORTED_PLATFORM"); case (uint)Ols.OlsDllStatus.OLS_DLL_DRIVER_NOT_FOUND: //MessageBox.Show("WinRing OLS_DLL_DRIVER_NOT_FOUND", "Ols.OlsDllStatus:"); throw new ApplicationException("WinRing OLS_DLL_DRIVER_NOT_FOUND"); case (uint)Ols.OlsDllStatus.OLS_DLL_DRIVER_UNLOADED: //MessageBox.Show("WinRing OLS_DLL_DRIVER_UNLOADED", "Ols.OlsDllStatus:"); throw new ApplicationException("WinRing OLS_DLL_DRIVER_UNLOADED"); case (uint)Ols.OlsDllStatus.OLS_DLL_DRIVER_NOT_LOADED_ON_NETWORK: //MessageBox.Show("WinRing DRIVER_NOT_LOADED_ON_NETWORK", "Ols.OlsDllStatus:"); throw new ApplicationException("WinRing DRIVER_NOT_LOADED_ON_NETWORK"); case (uint)Ols.OlsDllStatus.OLS_DLL_UNKNOWN_ERROR: //MessageBox.Show("WinRing OLS_DLL_UNKNOWN_ERROR", "Ols.OlsDllStatus:"); throw new ApplicationException("WinRing OLS_DLL_UNKNOWN_ERROR"); } } public void Initialize() { amdSmuMutex = new Mutex(); RyzenNbAccesss.InitializeOls(); // Check WinRing0 status switch (RyzenNbAccesss.GetStatus()) { case (uint)Ols.Status.NO_ERROR: if (ShowDebug) { //MessageBox.Show("Ols is OK.", "Ols.Status:"); ShowDebug = false; } break; case (uint)Ols.Status.DLL_NOT_FOUND: //MessageBox.Show("WinRing Status: DLL_NOT_FOUND", "Ols.Status:"); throw new ApplicationException("WinRing DLL_NOT_FOUND"); break; case (uint)Ols.Status.DLL_INCORRECT_VERSION: //MessageBox.Show("WinRing Status: DLL_INCORRECT_VERSION", "Ols.Status:"); throw new ApplicationException("WinRing DLL_INCORRECT_VERSION"); break; case (uint)Ols.Status.DLL_INITIALIZE_ERROR: //MessageBox.Show("WinRing Status: DLL_INITIALIZE_ERROR", "Ols.Status:"); throw new ApplicationException("WinRing DLL_INITIALIZE_ERROR"); break; default: break; } } public void Deinitialize() { RyzenNbAccesss.DeinitializeOls(); } public static uint SMU_PCI_ADDR { get; set; } public static uint SMU_OFFSET_ADDR { get; set; } public static uint SMU_OFFSET_DATA { get; set; } public static uint MP1_ADDR_MSG { get; set; } public static uint MP1_ADDR_RSP { get; set; } public static uint MP1_ADDR_ARG { get; set; } public static uint PSMU_ADDR_MSG { get; set; } public static uint PSMU_ADDR_RSP { get; set; } public static uint PSMU_ADDR_ARG { get; set; } public static uint[] args { get; set; } public bool ShowDebug { get; set; } private static Mutex amdSmuMutex; private const ushort SMU_TIMEOUT = 8192; public Status SendMp1(uint message, ref uint[] arguments) { var result = SendMsg(MP1_ADDR_MSG, MP1_ADDR_RSP, MP1_ADDR_ARG, message, ref arguments); //Logger.WriteLine($"RyzenMP1:{message} {arguments[0]} {result}"); return result; } public Status SendPsmu(uint message, ref uint[] arguments) { var result = SendMsg(PSMU_ADDR_MSG, PSMU_ADDR_RSP, PSMU_ADDR_ARG, message, ref arguments); //Logger.WriteLine($"RyzenPSMU:{message} {arguments[0]} {result}"); return result; } public Status SendMsg(uint SMU_ADDR_MSG, uint SMU_ADDR_RSP, uint SMU_ADDR_ARG, uint msg, ref uint[] args) { ushort timeout = SMU_TIMEOUT; uint[] cmdArgs = new uint[6]; int argsLength = args.Length; uint status = 0; if (argsLength > cmdArgs.Length) argsLength = cmdArgs.Length; for (int i = 0; i < argsLength; ++i) cmdArgs[i] = args[i]; if (amdSmuMutex.WaitOne(5000)) { // Clear response register bool temp; do temp = SmuWriteReg(SMU_ADDR_RSP, 0); while (!temp && --timeout > 0); if (timeout == 0) { amdSmuMutex.ReleaseMutex(); SmuReadReg(SMU_ADDR_RSP, ref status); return (Status)status; } // Write data for (int i = 0; i < cmdArgs.Length; ++i) SmuWriteReg(SMU_ADDR_ARG + (uint)(i * 4), cmdArgs[i]); // Send message SmuWriteReg(SMU_ADDR_MSG, msg); // Wait done if (!SmuWaitDone(SMU_ADDR_RSP)) { amdSmuMutex.ReleaseMutex(); SmuReadReg(SMU_ADDR_RSP, ref status); return (Status)status; } // Read back args for (int i = 0; i < args.Length; ++i) SmuReadReg(SMU_ADDR_ARG + (uint)(i * 4), ref args[i]); } amdSmuMutex.ReleaseMutex(); SmuReadReg(SMU_ADDR_RSP, ref status); return (Status)status; } public bool SmuWaitDone(uint SMU_ADDR_RSP) { bool res; ushort timeout = SMU_TIMEOUT; uint data = 0; do res = SmuReadReg(SMU_ADDR_RSP, ref data); while ((!res || data != 1) && --timeout > 0); if (timeout == 0 || data != 1) res = false; return res; } private bool SmuWriteReg(uint addr, uint data) { if (RyzenNbAccesss.WritePciConfigDwordEx(SMU_PCI_ADDR, SMU_OFFSET_ADDR, addr) == 1) { return RyzenNbAccesss.WritePciConfigDwordEx(SMU_PCI_ADDR, SMU_OFFSET_DATA, data) == 1; } return false; } private bool SmuReadReg(uint addr, ref uint data) { if (RyzenNbAccesss.WritePciConfigDwordEx(SMU_PCI_ADDR, SMU_OFFSET_ADDR, addr) == 1) { return RyzenNbAccesss.ReadPciConfigDwordEx(SMU_PCI_ADDR, SMU_OFFSET_DATA, ref data) == 1; } return false; } } } ================================================ FILE: app/Ryzen/SendCommand.cs ================================================ // // This is a optimised/simplified version of Ryzen System Management Unit from https://github.com/JamesCJ60/Universal-x86-Tuning-Utility // I do not take credit for the full functionality of the code (c) // namespace Ryzen { internal class SendCommand { //RAVEN - 0 //PICASSO - 1 //DALI - 2 //RENOIR/LUCIENNE - 3 //MATISSE - 4 //VANGOGH - 5 //VERMEER - 6 //CEZANNE/BARCELO - 7 //REMBRANDT - 8 //PHEONIX - 9 //RAPHAEL/DRAGON RANGE - 10 //MENDOCINO - 11 //HAWKPOINT - 12 //STRIXPOINT - 13 //STRIXHALO - 14 //FIRERANGE - 15 public static Smu RyzenAccess = new Smu(false); public static int FAMID = RyzenControl.FAMID; //STAMP Limit public static Smu.Status? set_stapm_limit(uint value) { RyzenAccess.Initialize(); uint[] Args = new uint[6]; Args[0] = value; Smu.Status? result = null; switch (FAMID) { case 0: case 1: case 2: result = RyzenAccess.SendMp1(0x1a, ref Args); break; case 3: case 5: case 7: case 8: case 9: case 11: case 12: case 13: result = RyzenAccess.SendMp1(0x14, ref Args); result = RyzenAccess.SendPsmu(0x31, ref Args); break; default: break; } RyzenAccess.Deinitialize(); return result; } //Fast Limit public static Smu.Status? set_fast_limit(uint value) { RyzenAccess.Initialize(); uint[] Args = new uint[6]; Args[0] = value; Smu.Status? result = null; switch (FAMID) { case 0: case 1: case 2: result = RyzenAccess.SendMp1(0x1b, ref Args); break; case 3: case 5: case 7: case 8: case 9: case 11: case 12: case 13: result = RyzenAccess.SendMp1(0x15, ref Args); result = RyzenAccess.SendPsmu(0x32, ref Args); break; default: break; } RyzenAccess.Deinitialize(); return result; } //Slow Limit public static Smu.Status? set_slow_limit(uint value) { RyzenAccess.Initialize(); uint[] Args = new uint[6]; Args[0] = value; Smu.Status? result = null; switch (FAMID) { case 0: case 1: case 2: result = RyzenAccess.SendMp1(0x1c, ref Args); break; case 3: case 5: case 7: case 8: case 9: case 11: case 12: case 13: result = RyzenAccess.SendMp1(0x16, ref Args); result = RyzenAccess.SendPsmu(0x33, ref Args); result = RyzenAccess.SendPsmu(0x34, ref Args); break; default: break; } RyzenAccess.Deinitialize(); return result; } //TCTL Temp Limit public static Smu.Status? set_tctl_temp(uint value) { RyzenAccess.Initialize(); uint[] Args = new uint[6]; Args[0] = value; Smu.Status? result = null; switch (FAMID) { case -1: result = RyzenAccess.SendPsmu(0x68, ref Args); break; case 0: case 1: case 2: result = RyzenAccess.SendMp1(0x1f, ref Args); break; case 3: case 5: case 7: case 8: case 9: case 11: case 12: case 13: case 14: result = RyzenAccess.SendMp1(0x19, ref Args); break; case 4: case 6: result = RyzenAccess.SendMp1(0x23, ref Args); result = RyzenAccess.SendPsmu(0x56, ref Args); break; case 10: case 15: result = RyzenAccess.SendMp1(0x3f, ref Args); result = RyzenAccess.SendPsmu(0x59, ref Args); break; default: break; } RyzenAccess.Deinitialize(); return result; } //Set All Core Curve Optimiser public static Smu.Status? set_coall(int value) { uint uvalue = Convert.ToUInt32(0x100000 - (uint)(-1 * value)); RyzenAccess.Initialize(); uint[] Args = new uint[6]; Args[0] = uvalue; Smu.Status? result = null; switch (FAMID) { case 3: case 7: result = RyzenAccess.SendMp1(0x55, ref Args); result = RyzenAccess.SendPsmu(0xB1, ref Args); break; case 4: case 6: result = RyzenAccess.SendMp1(0x36, ref Args); result = RyzenAccess.SendPsmu(0xB, ref Args); break; case 5: case 8: case 9: case 11: case 12: case 13: result = RyzenAccess.SendPsmu(0x5D, ref Args); break; case 14: result = RyzenAccess.SendMp1(0x4C, ref Args); result = RyzenAccess.SendPsmu(0x5D, ref Args); break; case 10: case 15: result = RyzenAccess.SendPsmu(0x7, ref Args); break; default: break; } RyzenAccess.Deinitialize(); return result; } //Set iGPU Curve Optimiser public static Smu.Status? set_cogfx(int value) { uint uvalue = Convert.ToUInt32(0x100000 - (uint)(-1 * value)); RyzenAccess.Initialize(); uint[] Args = new uint[6]; Args[0] = uvalue; Smu.Status? result = null; switch (FAMID) { case 3: case 7: result = RyzenAccess.SendMp1(0x64, ref Args); result = RyzenAccess.SendPsmu(0x57, ref Args); break; case 5: case 8: case 9: case 11: case 12: case 13: case 14: result = RyzenAccess.SendPsmu(0xb7, ref Args); break; default: break; } RyzenAccess.Deinitialize(); return result; } } } ================================================ FILE: app/Settings.Designer.cs ================================================ using GHelper.UI; namespace GHelper { partial class SettingsForm { /// /// Required designer variable. /// private System.ComponentModel.IContainer components = null; /// /// Clean up any resources being used. /// /// true if managed resources should be disposed; otherwise, false. protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } #region Windows Form Designer generated code /// /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// private void InitializeComponent() { panelMatrix = new Panel(); panelMatrixAuto = new Panel(); checkMatrixLid = new CheckBox(); checkMatrix = new CheckBox(); tableLayoutMatrix = new TableLayoutPanel(); comboMatrix = new RComboBox(); comboMatrixRunning = new RComboBox(); comboInterval = new RComboBox(); buttonMatrix = new RButton(); panelMatrixTitle = new Panel(); pictureMatrix = new PictureBox(); labelMatrix = new Label(); panelBattery = new Panel(); buttonBatteryFull = new RButton(); sliderBattery = new Slider(); panelBatteryTitle = new Panel(); labelBattery = new Label(); pictureBattery = new PictureBox(); labelBatteryTitle = new Label(); panelFooter = new Panel(); tableButtons = new TableLayoutPanel(); buttonDonate = new RBadgeButton(); buttonQuit = new RButton(); buttonUpdates = new RButton(); checkStartup = new CheckBox(); panelPerformance = new Panel(); tablePerf = new TableLayoutPanel(); buttonSilent = new RButton(); buttonBalanced = new RButton(); buttonTurbo = new RButton(); buttonFans = new RButton(); panelCPUTitle = new Panel(); picturePerf = new PictureBox(); labelPerf = new Label(); labelCPUFan = new Label(); panelGPU = new Panel(); labelTipGPU = new Label(); tableAMD = new TableLayoutPanel(); buttonAutoTDP = new RButton(); buttonOverlay = new RButton(); buttonFPS = new RButton(); tableGPU = new TableLayoutPanel(); buttonStopGPU = new RButton(); buttonEco = new RButton(); buttonStandard = new RButton(); buttonXGM = new RButton(); buttonOptimized = new RButton(); buttonUltimate = new RButton(); panelGPUTitle = new Panel(); pictureGPU = new PictureBox(); labelGPU = new Label(); labelGPUFan = new Label(); panelScreen = new Panel(); labelTipScreen = new Label(); tableScreen = new TableLayoutPanel(); buttonScreenAuto = new RButton(); button60Hz = new RButton(); button120Hz = new RButton(); buttonMiniled = new RButton(); buttonFHD = new RButton(); panelScreenTitle = new Panel(); labelMidFan = new Label(); pictureScreen = new PictureBox(); labelSreen = new Label(); panelKeyboard = new Panel(); labelBacklight = new Label(); tableLayoutKeyboard = new TableLayoutPanel(); buttonKeyboard = new RButton(); panelColor = new Panel(); pictureColor2 = new PictureBox(); pictureColor = new PictureBox(); buttonKeyboardColor = new RButton(); comboKeyboard = new RComboBox(); panelKeyboardTitle = new Panel(); buttonFnLock = new RButton(); pictureKeyboard = new PictureBox(); labelKeyboard = new Label(); panelStartup = new Panel(); labelCharge = new Label(); panelPeripherals = new Panel(); tableLayoutPeripherals = new TableLayoutPanel(); buttonPeripheral3 = new RButton(); buttonPeripheral2 = new RButton(); buttonPeripheral1 = new RButton(); panelAlly = new Panel(); tableLayoutAlly = new TableLayoutPanel(); buttonController = new RButton(); buttonBacklight = new RButton(); buttonControllerMode = new RButton(); panelAllyTitle = new Panel(); pictureAlly = new PictureBox(); labelAlly = new Label(); panelGamma = new Panel(); labelVisual = new Label(); tableVisual = new TableLayoutPanel(); buttonInstallColor = new RButton(); comboVisual = new RComboBox(); comboColorTemp = new RComboBox(); comboGamut = new RComboBox(); sliderGamma = new Slider(); panelGammaTitle = new Panel(); labelGamma = new Label(); pictureGamma = new PictureBox(); labelGammaTitle = new Label(); panelVersion = new Panel(); buttonEnergySaver = new RButton(); buttonAmdOled = new RButton(); buttonArmoury = new RButton(); labelVersion = new Label(); buttonHDRControl = new RButton(); panelMatrix.SuspendLayout(); panelMatrixAuto.SuspendLayout(); tableLayoutMatrix.SuspendLayout(); panelMatrixTitle.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)pictureMatrix).BeginInit(); panelBattery.SuspendLayout(); panelBatteryTitle.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)pictureBattery).BeginInit(); panelFooter.SuspendLayout(); tableButtons.SuspendLayout(); panelPerformance.SuspendLayout(); tablePerf.SuspendLayout(); panelCPUTitle.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)picturePerf).BeginInit(); panelGPU.SuspendLayout(); tableAMD.SuspendLayout(); tableGPU.SuspendLayout(); panelGPUTitle.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)pictureGPU).BeginInit(); panelScreen.SuspendLayout(); tableScreen.SuspendLayout(); panelScreenTitle.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)pictureScreen).BeginInit(); panelKeyboard.SuspendLayout(); tableLayoutKeyboard.SuspendLayout(); panelColor.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)pictureColor2).BeginInit(); ((System.ComponentModel.ISupportInitialize)pictureColor).BeginInit(); panelKeyboardTitle.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)pictureKeyboard).BeginInit(); panelStartup.SuspendLayout(); panelPeripherals.SuspendLayout(); tableLayoutPeripherals.SuspendLayout(); panelAlly.SuspendLayout(); tableLayoutAlly.SuspendLayout(); panelAllyTitle.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)pictureAlly).BeginInit(); panelGamma.SuspendLayout(); tableVisual.SuspendLayout(); panelGammaTitle.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)pictureGamma).BeginInit(); panelVersion.SuspendLayout(); SuspendLayout(); // // panelMatrix // panelMatrix.AccessibleRole = AccessibleRole.Grouping; panelMatrix.AutoSize = true; panelMatrix.AutoSizeMode = AutoSizeMode.GrowAndShrink; panelMatrix.Controls.Add(panelMatrixAuto); panelMatrix.Controls.Add(tableLayoutMatrix); panelMatrix.Controls.Add(panelMatrixTitle); panelMatrix.Dock = DockStyle.Top; panelMatrix.Location = new Point(11, 1071); panelMatrix.Margin = new Padding(0); panelMatrix.Name = "panelMatrix"; panelMatrix.Padding = new Padding(20, 20, 20, 11); panelMatrix.Size = new Size(827, 183); panelMatrix.TabIndex = 3; panelMatrix.TabStop = true; // // panelMatrixAuto // panelMatrixAuto.Controls.Add(checkMatrixLid); panelMatrixAuto.Controls.Add(checkMatrix); panelMatrixAuto.Dock = DockStyle.Top; panelMatrixAuto.Location = new Point(20, 132); panelMatrixAuto.Margin = new Padding(4); panelMatrixAuto.Name = "panelMatrixAuto"; panelMatrixAuto.Padding = new Padding(8, 0, 0, 0); panelMatrixAuto.Size = new Size(787, 40); panelMatrixAuto.TabIndex = 47; // // checkMatrixLid // checkMatrixLid.AutoSize = true; checkMatrixLid.Dock = DockStyle.Left; checkMatrixLid.ForeColor = SystemColors.GrayText; checkMatrixLid.Location = new Point(260, 0); checkMatrixLid.Margin = new Padding(8, 4, 8, 4); checkMatrixLid.Name = "checkMatrixLid"; checkMatrixLid.Size = new Size(253, 40); checkMatrixLid.TabIndex = 46; checkMatrixLid.Text = "Disable on lid close"; checkMatrixLid.UseVisualStyleBackColor = true; checkMatrixLid.Visible = true; // // checkMatrix // checkMatrix.AutoSize = true; checkMatrix.Dock = DockStyle.Left; checkMatrix.ForeColor = SystemColors.GrayText; checkMatrix.Location = new Point(8, 0); checkMatrix.Margin = new Padding(8, 4, 8, 4); checkMatrix.Name = "checkMatrix"; checkMatrix.Padding = new Padding(0, 0, 11, 0); checkMatrix.Size = new Size(252, 40); checkMatrix.TabIndex = 19; checkMatrix.Text = Properties.Strings.TurnOffOnBattery; checkMatrix.UseVisualStyleBackColor = true; // // tableLayoutMatrix // tableLayoutMatrix.AutoSize = true; tableLayoutMatrix.AutoSizeMode = AutoSizeMode.GrowAndShrink; tableLayoutMatrix.ColumnCount = 3; tableLayoutMatrix.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F)); tableLayoutMatrix.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F)); tableLayoutMatrix.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F)); tableLayoutMatrix.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F)); tableLayoutMatrix.Controls.Add(comboMatrix, 0, 0); tableLayoutMatrix.Controls.Add(comboMatrixRunning, 1, 0); tableLayoutMatrix.Controls.Add(comboInterval, 2, 0); tableLayoutMatrix.Controls.Add(buttonMatrix, 2, 0); tableLayoutMatrix.Dock = DockStyle.Top; tableLayoutMatrix.Location = new Point(20, 60); tableLayoutMatrix.Margin = new Padding(8, 4, 8, 4); tableLayoutMatrix.Name = "tableLayoutMatrix"; tableLayoutMatrix.Padding = new Padding(3, 0, 3, 0); tableLayoutMatrix.RowCount = 1; tableLayoutMatrix.RowStyles.Add(new RowStyle(SizeType.Percent, 100F)); tableLayoutMatrix.RowStyles.Add(new RowStyle(SizeType.Absolute, 20F)); tableLayoutMatrix.Size = new Size(787, 72); tableLayoutMatrix.TabIndex = 43; // // comboMatrix // comboMatrix.BorderColor = Color.White; comboMatrix.ButtonColor = Color.FromArgb(255, 255, 255); comboMatrix.Dock = DockStyle.Top; comboMatrix.Font = new Font("Segoe UI", 9F); comboMatrix.FormattingEnabled = true; comboMatrix.ItemHeight = 32; comboMatrix.Items.AddRange(new object[] { Properties.Strings.MatrixOff, Properties.Strings.MatrixDim, Properties.Strings.MatrixMedium, Properties.Strings.MatrixBright }); comboMatrix.Location = new Point(10, 8); comboMatrix.Margin = new Padding(7, 8, 7, 4); comboMatrix.Name = "comboMatrix"; comboMatrix.Size = new Size(246, 40); comboMatrix.TabIndex = 16; // // comboMatrixRunning // comboMatrixRunning.BorderColor = Color.White; comboMatrixRunning.ButtonColor = Color.FromArgb(255, 255, 255); comboMatrixRunning.Dock = DockStyle.Top; comboMatrixRunning.Font = new Font("Segoe UI", 9F); comboMatrixRunning.FormattingEnabled = true; comboMatrixRunning.ItemHeight = 32; comboMatrixRunning.Items.AddRange(new object[] { Properties.Strings.MatrixBanner, Properties.Strings.MatrixLogo, Properties.Strings.MatrixPicture, Properties.Strings.MatrixClock, Properties.Strings.MatrixAudio }); comboMatrixRunning.Location = new Point(270, 8); comboMatrixRunning.Margin = new Padding(7, 8, 7, 4); comboMatrixRunning.Name = "comboMatrixRunning"; comboMatrixRunning.Size = new Size(246, 40); comboMatrixRunning.TabIndex = 17; // // comboInterval // comboInterval.BorderColor = Color.White; comboInterval.ButtonColor = Color.FromArgb(255, 255, 255); comboInterval.Dock = DockStyle.Top; comboInterval.Font = new Font("Segoe UI", 9F); comboInterval.FormattingEnabled = true; comboInterval.ItemHeight = 32; comboInterval.Location = new Point(10, 60); comboInterval.Margin = new Padding(7, 8, 7, 4); comboInterval.Name = "comboInterval"; comboInterval.Size = new Size(246, 40); comboInterval.TabIndex = 19; comboInterval.Visible = false; // // buttonMatrix // buttonMatrix.Activated = false; buttonMatrix.AutoSize = true; buttonMatrix.AutoSizeMode = AutoSizeMode.GrowAndShrink; buttonMatrix.BackColor = SystemColors.ControlLight; buttonMatrix.BorderColor = Color.Transparent; buttonMatrix.BorderRadius = 2; buttonMatrix.Dock = DockStyle.Top; buttonMatrix.FlatAppearance.BorderSize = 0; buttonMatrix.FlatStyle = FlatStyle.Flat; buttonMatrix.Location = new Point(527, 4); buttonMatrix.Margin = new Padding(4); buttonMatrix.MaximumSize = new Size(0, 48); buttonMatrix.MinimumSize = new Size(0, 44); buttonMatrix.Name = "buttonMatrix"; buttonMatrix.Secondary = true; buttonMatrix.Size = new Size(253, 44); buttonMatrix.TabIndex = 18; buttonMatrix.Text = Properties.Strings.PictureGif; buttonMatrix.UseVisualStyleBackColor = false; // // panelMatrixTitle // panelMatrixTitle.Controls.Add(pictureMatrix); panelMatrixTitle.Controls.Add(labelMatrix); panelMatrixTitle.Dock = DockStyle.Top; panelMatrixTitle.Location = new Point(20, 20); panelMatrixTitle.Margin = new Padding(4); panelMatrixTitle.Name = "panelMatrixTitle"; panelMatrixTitle.Size = new Size(787, 40); panelMatrixTitle.TabIndex = 45; // // pictureMatrix // pictureMatrix.BackgroundImage = Properties.Resources.icons8_matrix_32; pictureMatrix.BackgroundImageLayout = ImageLayout.Zoom; pictureMatrix.Location = new Point(8, 3); pictureMatrix.Margin = new Padding(4); pictureMatrix.Name = "pictureMatrix"; pictureMatrix.Size = new Size(32, 32); pictureMatrix.TabIndex = 41; pictureMatrix.TabStop = false; // // labelMatrix // labelMatrix.AutoSize = true; labelMatrix.Font = new Font("Segoe UI", 9F, FontStyle.Bold); labelMatrix.Location = new Point(44, 0); labelMatrix.Margin = new Padding(4, 0, 4, 0); labelMatrix.Name = "labelMatrix"; labelMatrix.Size = new Size(170, 32); labelMatrix.TabIndex = 40; labelMatrix.Text = "Anime Matrix"; // // panelBattery // panelBattery.AutoSize = true; panelBattery.AutoSizeMode = AutoSizeMode.GrowAndShrink; panelBattery.Controls.Add(buttonBatteryFull); panelBattery.Controls.Add(sliderBattery); panelBattery.Controls.Add(panelBatteryTitle); panelBattery.Dock = DockStyle.Top; panelBattery.Location = new Point(11, 1683); panelBattery.Margin = new Padding(0); panelBattery.Name = "panelBattery"; panelBattery.Padding = new Padding(20, 15, 20, 0); panelBattery.Size = new Size(827, 104); panelBattery.TabIndex = 5; // // buttonBatteryFull // buttonBatteryFull.Activated = false; buttonBatteryFull.Anchor = AnchorStyles.Top | AnchorStyles.Right; buttonBatteryFull.BackColor = SystemColors.ControlLight; buttonBatteryFull.BorderColor = Color.Transparent; buttonBatteryFull.BorderRadius = 2; buttonBatteryFull.FlatAppearance.BorderSize = 0; buttonBatteryFull.FlatStyle = FlatStyle.Flat; buttonBatteryFull.Font = new Font("Segoe UI", 7.125F, FontStyle.Bold); buttonBatteryFull.ForeColor = SystemColors.ControlDark; buttonBatteryFull.Location = new Point(728, 62); buttonBatteryFull.Margin = new Padding(0); buttonBatteryFull.Name = "buttonBatteryFull"; buttonBatteryFull.Secondary = true; buttonBatteryFull.Size = new Size(73, 36); buttonBatteryFull.TabIndex = 41; buttonBatteryFull.Text = "100%"; buttonBatteryFull.UseVisualStyleBackColor = false; // // sliderBattery // sliderBattery.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; sliderBattery.Location = new Point(20, 60); sliderBattery.Margin = new Padding(4); sliderBattery.Max = 100; sliderBattery.Min = 40; sliderBattery.Name = "sliderBattery"; sliderBattery.Size = new Size(707, 40); sliderBattery.Step = 5; sliderBattery.TabIndex = 20; sliderBattery.Text = "sliderBattery"; sliderBattery.Value = 100; // // panelBatteryTitle // panelBatteryTitle.Controls.Add(labelBattery); panelBatteryTitle.Controls.Add(pictureBattery); panelBatteryTitle.Controls.Add(labelBatteryTitle); panelBatteryTitle.Dock = DockStyle.Top; panelBatteryTitle.Location = new Point(20, 15); panelBatteryTitle.Margin = new Padding(4); panelBatteryTitle.Name = "panelBatteryTitle"; panelBatteryTitle.Padding = new Padding(0, 0, 0, 4); panelBatteryTitle.Size = new Size(787, 44); panelBatteryTitle.TabIndex = 40; // // labelBattery // labelBattery.Anchor = AnchorStyles.Top | AnchorStyles.Right; labelBattery.Location = new Point(455, 0); labelBattery.Margin = new Padding(8, 0, 8, 0); labelBattery.Name = "labelBattery"; labelBattery.Size = new Size(324, 36); labelBattery.TabIndex = 39; labelBattery.Text = " "; labelBattery.TextAlign = ContentAlignment.TopRight; // // pictureBattery // pictureBattery.BackgroundImage = Properties.Resources.icons8_charging_battery_32; pictureBattery.BackgroundImageLayout = ImageLayout.Zoom; pictureBattery.Location = new Point(8, 3); pictureBattery.Margin = new Padding(4); pictureBattery.Name = "pictureBattery"; pictureBattery.Size = new Size(32, 32); pictureBattery.TabIndex = 38; pictureBattery.TabStop = false; // // labelBatteryTitle // labelBatteryTitle.Font = new Font("Segoe UI", 9F, FontStyle.Bold); labelBatteryTitle.Location = new Point(43, 0); labelBatteryTitle.Margin = new Padding(8, 0, 8, 0); labelBatteryTitle.Name = "labelBatteryTitle"; labelBatteryTitle.Size = new Size(467, 32); labelBatteryTitle.TabIndex = 37; labelBatteryTitle.Text = "Battery Charge Limit"; // // panelFooter // panelFooter.AutoSize = true; panelFooter.AutoSizeMode = AutoSizeMode.GrowAndShrink; panelFooter.Controls.Add(tableButtons); panelFooter.Dock = DockStyle.Top; panelFooter.Location = new Point(11, 1887); panelFooter.Margin = new Padding(0); panelFooter.Name = "panelFooter"; panelFooter.Padding = new Padding(20, 10, 20, 20); panelFooter.Size = new Size(827, 88); panelFooter.TabIndex = 7; // // tableButtons // tableButtons.AutoSize = true; tableButtons.ColumnCount = 3; tableButtons.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 33.3333321F)); tableButtons.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 33.3333321F)); tableButtons.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 33.3333321F)); tableButtons.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 27F)); tableButtons.Controls.Add(buttonDonate, 0, 0); tableButtons.Controls.Add(buttonQuit, 2, 0); tableButtons.Controls.Add(buttonUpdates, 1, 0); tableButtons.Dock = DockStyle.Top; tableButtons.Location = new Point(20, 10); tableButtons.Margin = new Padding(8, 4, 8, 4); tableButtons.Name = "tableButtons"; tableButtons.RowCount = 1; tableButtons.RowStyles.Add(new RowStyle(SizeType.Percent, 100F)); tableButtons.Size = new Size(787, 58); tableButtons.TabIndex = 25; // // buttonDonate // buttonDonate.Activated = false; buttonDonate.BackColor = SystemColors.ControlLight; buttonDonate.Badge = 0; buttonDonate.BorderColor = Color.Transparent; buttonDonate.BorderRadius = 2; buttonDonate.Dock = DockStyle.Top; buttonDonate.FlatStyle = FlatStyle.Flat; buttonDonate.Image = Properties.Resources.icons8_dollar_32; buttonDonate.ImageAlign = ContentAlignment.MiddleRight; buttonDonate.Location = new Point(4, 5); buttonDonate.Margin = new Padding(4, 5, 4, 5); buttonDonate.Name = "buttonDonate"; buttonDonate.Secondary = true; buttonDonate.Size = new Size(254, 48); buttonDonate.TabIndex = 3; buttonDonate.Text = "&Donate"; buttonDonate.TextImageRelation = TextImageRelation.ImageBeforeText; buttonDonate.UseVisualStyleBackColor = false; // // buttonQuit // buttonQuit.Activated = false; buttonQuit.BackColor = SystemColors.ControlLight; buttonQuit.BorderColor = Color.Transparent; buttonQuit.BorderRadius = 2; buttonQuit.Dock = DockStyle.Top; buttonQuit.FlatStyle = FlatStyle.Flat; buttonQuit.Image = Properties.Resources.icons8_quit_32; buttonQuit.Location = new Point(528, 5); buttonQuit.Margin = new Padding(4, 5, 4, 5); buttonQuit.Name = "buttonQuit"; buttonQuit.Secondary = true; buttonQuit.Size = new Size(255, 48); buttonQuit.TabIndex = 2; buttonQuit.Text = "&Quit"; buttonQuit.TextAlign = ContentAlignment.MiddleRight; buttonQuit.TextImageRelation = TextImageRelation.ImageBeforeText; buttonQuit.UseVisualStyleBackColor = false; // // buttonUpdates // buttonUpdates.Activated = false; buttonUpdates.BackColor = SystemColors.ControlLight; buttonUpdates.BorderColor = Color.Transparent; buttonUpdates.BorderRadius = 2; buttonUpdates.Dock = DockStyle.Top; buttonUpdates.FlatStyle = FlatStyle.Flat; buttonUpdates.Image = Properties.Resources.icons8_software_32_white; buttonUpdates.ImageAlign = ContentAlignment.MiddleRight; buttonUpdates.Location = new Point(266, 5); buttonUpdates.Margin = new Padding(4, 5, 4, 5); buttonUpdates.Name = "buttonUpdates"; buttonUpdates.Secondary = true; buttonUpdates.Size = new Size(254, 48); buttonUpdates.TabIndex = 1; buttonUpdates.Text = "&Updates"; buttonUpdates.TextImageRelation = TextImageRelation.ImageBeforeText; buttonUpdates.UseVisualStyleBackColor = false; // // checkStartup // checkStartup.AutoSize = true; checkStartup.Dock = DockStyle.Left; checkStartup.Location = new Point(20, 0); checkStartup.Margin = new Padding(11, 5, 11, 5); checkStartup.Name = "checkStartup"; checkStartup.Padding = new Padding(10, 0, 0, 0); checkStartup.Size = new Size(216, 50); checkStartup.TabIndex = 21; checkStartup.Text = Properties.Strings.RunOnStartup; checkStartup.UseVisualStyleBackColor = true; // // panelPerformance // panelPerformance.AccessibleRole = AccessibleRole.Grouping; panelPerformance.AutoSize = true; panelPerformance.AutoSizeMode = AutoSizeMode.GrowAndShrink; panelPerformance.Controls.Add(tablePerf); panelPerformance.Controls.Add(panelCPUTitle); panelPerformance.Dock = DockStyle.Top; panelPerformance.Location = new Point(11, 11); panelPerformance.Margin = new Padding(0); panelPerformance.Name = "panelPerformance"; panelPerformance.Padding = new Padding(20); panelPerformance.Size = new Size(827, 208); panelPerformance.TabIndex = 0; panelPerformance.TabStop = true; // // tablePerf // tablePerf.AutoSize = true; tablePerf.AutoSizeMode = AutoSizeMode.GrowAndShrink; tablePerf.ColumnCount = 4; tablePerf.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F)); tablePerf.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F)); tablePerf.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F)); tablePerf.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F)); tablePerf.Controls.Add(buttonSilent, 0, 0); tablePerf.Controls.Add(buttonBalanced, 1, 0); tablePerf.Controls.Add(buttonTurbo, 2, 0); tablePerf.Controls.Add(buttonFans, 3, 0); tablePerf.Dock = DockStyle.Top; tablePerf.Location = new Point(20, 60); tablePerf.Margin = new Padding(8, 4, 8, 4); tablePerf.Name = "tablePerf"; tablePerf.RowCount = 1; tablePerf.RowStyles.Add(new RowStyle(SizeType.Absolute, 128F)); tablePerf.Size = new Size(787, 128); tablePerf.TabIndex = 29; // // buttonSilent // buttonSilent.Activated = false; buttonSilent.BackColor = SystemColors.ControlLightLight; buttonSilent.BackgroundImageLayout = ImageLayout.None; buttonSilent.BorderColor = Color.Transparent; buttonSilent.BorderRadius = 5; buttonSilent.Dock = DockStyle.Fill; buttonSilent.FlatAppearance.BorderSize = 0; buttonSilent.FlatStyle = FlatStyle.Flat; buttonSilent.ForeColor = SystemColors.ControlText; buttonSilent.Image = Properties.Resources.icons8_bicycle_48__1_; buttonSilent.ImageAlign = ContentAlignment.BottomCenter; buttonSilent.Location = new Point(4, 4); buttonSilent.Margin = new Padding(4); buttonSilent.Name = "buttonSilent"; buttonSilent.Secondary = false; buttonSilent.Size = new Size(188, 120); buttonSilent.TabIndex = 1; buttonSilent.Text = "&Silent"; buttonSilent.TextImageRelation = TextImageRelation.ImageAboveText; buttonSilent.UseVisualStyleBackColor = false; // // buttonBalanced // buttonBalanced.Activated = false; buttonBalanced.BackColor = SystemColors.ControlLightLight; buttonBalanced.BorderColor = Color.Transparent; buttonBalanced.BorderRadius = 5; buttonBalanced.Dock = DockStyle.Fill; buttonBalanced.FlatAppearance.BorderSize = 0; buttonBalanced.FlatStyle = FlatStyle.Flat; buttonBalanced.ForeColor = SystemColors.ControlText; buttonBalanced.Image = Properties.Resources.icons8_fiat_500_48; buttonBalanced.ImageAlign = ContentAlignment.BottomCenter; buttonBalanced.Location = new Point(200, 4); buttonBalanced.Margin = new Padding(4); buttonBalanced.Name = "buttonBalanced"; buttonBalanced.Secondary = false; buttonBalanced.Size = new Size(188, 120); buttonBalanced.TabIndex = 1; buttonBalanced.Text = "&Balanced"; buttonBalanced.TextImageRelation = TextImageRelation.ImageAboveText; buttonBalanced.UseVisualStyleBackColor = false; // // buttonTurbo // buttonTurbo.Activated = false; buttonTurbo.BackColor = SystemColors.ControlLightLight; buttonTurbo.BorderColor = Color.Transparent; buttonTurbo.BorderRadius = 5; buttonTurbo.Dock = DockStyle.Fill; buttonTurbo.FlatAppearance.BorderSize = 0; buttonTurbo.FlatStyle = FlatStyle.Flat; buttonTurbo.ForeColor = SystemColors.ControlText; buttonTurbo.Image = Properties.Resources.icons8_rocket_48; buttonTurbo.ImageAlign = ContentAlignment.BottomCenter; buttonTurbo.Location = new Point(396, 4); buttonTurbo.Margin = new Padding(4); buttonTurbo.Name = "buttonTurbo"; buttonTurbo.Secondary = false; buttonTurbo.Size = new Size(188, 120); buttonTurbo.TabIndex = 2; buttonTurbo.Text = "&Turbo"; buttonTurbo.TextImageRelation = TextImageRelation.ImageAboveText; buttonTurbo.UseVisualStyleBackColor = false; // // buttonFans // buttonFans.Activated = false; buttonFans.BackColor = SystemColors.ControlLight; buttonFans.BorderColor = Color.Transparent; buttonFans.BorderRadius = 5; buttonFans.Dock = DockStyle.Fill; buttonFans.FlatAppearance.BorderSize = 0; buttonFans.FlatStyle = FlatStyle.Flat; buttonFans.Image = Properties.Resources.icons8_fan_48; buttonFans.ImageAlign = ContentAlignment.BottomCenter; buttonFans.Location = new Point(592, 4); buttonFans.Margin = new Padding(4); buttonFans.Name = "buttonFans"; buttonFans.Secondary = true; buttonFans.Size = new Size(191, 120); buttonFans.TabIndex = 3; buttonFans.Text = "&Fans + Power"; buttonFans.TextImageRelation = TextImageRelation.ImageAboveText; buttonFans.UseVisualStyleBackColor = false; // // panelCPUTitle // panelCPUTitle.Controls.Add(picturePerf); panelCPUTitle.Controls.Add(labelPerf); panelCPUTitle.Controls.Add(labelCPUFan); panelCPUTitle.Dock = DockStyle.Top; panelCPUTitle.Location = new Point(20, 20); panelCPUTitle.Margin = new Padding(4); panelCPUTitle.Name = "panelCPUTitle"; panelCPUTitle.Size = new Size(787, 40); panelCPUTitle.TabIndex = 30; // // picturePerf // picturePerf.BackgroundImage = Properties.Resources.icons8_gauge_32; picturePerf.BackgroundImageLayout = ImageLayout.Zoom; picturePerf.InitialImage = null; picturePerf.Location = new Point(8, 0); picturePerf.Margin = new Padding(4); picturePerf.Name = "picturePerf"; picturePerf.Size = new Size(32, 32); picturePerf.TabIndex = 35; picturePerf.TabStop = false; // // labelPerf // labelPerf.AccessibleRole = AccessibleRole.Caret; labelPerf.AutoSize = true; labelPerf.Font = new Font("Segoe UI", 9F, FontStyle.Bold); labelPerf.LiveSetting = System.Windows.Forms.Automation.AutomationLiveSetting.Polite; labelPerf.Location = new Point(40, 0); labelPerf.Margin = new Padding(8, 0, 8, 0); labelPerf.Name = "labelPerf"; labelPerf.Size = new Size(234, 32); labelPerf.TabIndex = 0; labelPerf.Text = "Performance Mode"; // // labelCPUFan // labelCPUFan.AccessibleRole = AccessibleRole.TitleBar; labelCPUFan.Anchor = AnchorStyles.Top | AnchorStyles.Right; labelCPUFan.Cursor = Cursors.Hand; labelCPUFan.Location = new Point(387, 0); labelCPUFan.Margin = new Padding(8, 0, 8, 0); labelCPUFan.Name = "labelCPUFan"; labelCPUFan.Size = new Size(400, 36); labelCPUFan.TabIndex = 33; labelCPUFan.Text = " "; labelCPUFan.TextAlign = ContentAlignment.TopRight; // // panelGPU // panelGPU.AccessibleRole = AccessibleRole.Grouping; panelGPU.AutoSize = true; panelGPU.AutoSizeMode = AutoSizeMode.GrowAndShrink; panelGPU.Controls.Add(labelTipGPU); panelGPU.Controls.Add(tableAMD); panelGPU.Controls.Add(tableGPU); panelGPU.Controls.Add(panelGPUTitle); panelGPU.Dock = DockStyle.Top; panelGPU.Location = new Point(11, 219); panelGPU.Margin = new Padding(0); panelGPU.Name = "panelGPU"; panelGPU.Padding = new Padding(20, 20, 20, 0); panelGPU.Size = new Size(827, 432); panelGPU.TabIndex = 1; panelGPU.TabStop = true; // // labelTipGPU // labelTipGPU.Dock = DockStyle.Top; labelTipGPU.ForeColor = SystemColors.GrayText; labelTipGPU.Location = new Point(20, 396); labelTipGPU.Margin = new Padding(4, 0, 4, 0); labelTipGPU.Name = "labelTipGPU"; labelTipGPU.Size = new Size(787, 36); labelTipGPU.TabIndex = 20; // // tableAMD // tableAMD.AutoSize = true; tableAMD.AutoSizeMode = AutoSizeMode.GrowAndShrink; tableAMD.ColumnCount = 3; tableAMD.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 33F)); tableAMD.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 33F)); tableAMD.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 33F)); tableAMD.Controls.Add(buttonAutoTDP, 0, 0); tableAMD.Controls.Add(buttonOverlay, 0, 0); tableAMD.Controls.Add(buttonFPS, 0, 0); tableAMD.Dock = DockStyle.Top; tableAMD.Location = new Point(20, 316); tableAMD.Margin = new Padding(8, 4, 8, 4); tableAMD.Name = "tableAMD"; tableAMD.RowCount = 1; tableAMD.RowStyles.Add(new RowStyle(SizeType.Absolute, 80F)); tableAMD.Size = new Size(787, 80); tableAMD.TabIndex = 24; tableAMD.Visible = false; // // buttonAutoTDP // buttonAutoTDP.Activated = false; buttonAutoTDP.BackColor = SystemColors.ControlLightLight; buttonAutoTDP.BorderColor = Color.Transparent; buttonAutoTDP.BorderRadius = 5; buttonAutoTDP.Dock = DockStyle.Fill; buttonAutoTDP.FlatAppearance.BorderSize = 0; buttonAutoTDP.FlatStyle = FlatStyle.Flat; buttonAutoTDP.ForeColor = SystemColors.ControlText; buttonAutoTDP.Image = Properties.Resources.icons8_gauge_32; buttonAutoTDP.ImageAlign = ContentAlignment.MiddleRight; buttonAutoTDP.Location = new Point(528, 4); buttonAutoTDP.Margin = new Padding(4); buttonAutoTDP.Name = "buttonAutoTDP"; buttonAutoTDP.Secondary = false; buttonAutoTDP.Size = new Size(255, 72); buttonAutoTDP.TabIndex = 13; buttonAutoTDP.Text = "AutoTDP"; buttonAutoTDP.TextImageRelation = TextImageRelation.ImageBeforeText; buttonAutoTDP.UseVisualStyleBackColor = false; // // buttonOverlay // buttonOverlay.Activated = false; buttonOverlay.BackColor = SystemColors.ControlLightLight; buttonOverlay.BorderColor = Color.Transparent; buttonOverlay.BorderRadius = 5; buttonOverlay.Dock = DockStyle.Fill; buttonOverlay.FlatAppearance.BorderSize = 0; buttonOverlay.FlatStyle = FlatStyle.Flat; buttonOverlay.ForeColor = SystemColors.ControlText; buttonOverlay.Image = Properties.Resources.icons8_heartbeat_32; buttonOverlay.ImageAlign = ContentAlignment.MiddleRight; buttonOverlay.Location = new Point(266, 4); buttonOverlay.Margin = new Padding(4); buttonOverlay.Name = "buttonOverlay"; buttonOverlay.Secondary = false; buttonOverlay.Size = new Size(254, 72); buttonOverlay.TabIndex = 12; buttonOverlay.Text = "AMD Overlay"; buttonOverlay.TextImageRelation = TextImageRelation.ImageBeforeText; buttonOverlay.UseVisualStyleBackColor = false; // // buttonFPS // buttonFPS.Activated = false; buttonFPS.BackColor = SystemColors.ControlLightLight; buttonFPS.BorderColor = Color.Transparent; buttonFPS.BorderRadius = 5; buttonFPS.Dock = DockStyle.Fill; buttonFPS.FlatAppearance.BorderSize = 0; buttonFPS.FlatStyle = FlatStyle.Flat; buttonFPS.ForeColor = SystemColors.ControlText; buttonFPS.Image = Properties.Resources.icons8_animation_32; buttonFPS.ImageAlign = ContentAlignment.MiddleRight; buttonFPS.Location = new Point(4, 4); buttonFPS.Margin = new Padding(4); buttonFPS.Name = "buttonFPS"; buttonFPS.Secondary = false; buttonFPS.Size = new Size(254, 72); buttonFPS.TabIndex = 11; buttonFPS.Text = "FPS Limit OFF"; buttonFPS.TextImageRelation = TextImageRelation.ImageBeforeText; buttonFPS.UseVisualStyleBackColor = false; // // tableGPU // tableGPU.AutoSize = true; tableGPU.AutoSizeMode = AutoSizeMode.GrowAndShrink; tableGPU.ColumnCount = 4; tableGPU.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F)); tableGPU.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F)); tableGPU.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F)); tableGPU.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F)); tableGPU.Controls.Add(buttonStopGPU, 0, 0); tableGPU.Controls.Add(buttonEco, 0, 0); tableGPU.Controls.Add(buttonStandard, 1, 0); tableGPU.Controls.Add(buttonXGM, 2, 0); tableGPU.Controls.Add(buttonOptimized, 2, 0); tableGPU.Controls.Add(buttonUltimate, 2, 0); tableGPU.Dock = DockStyle.Top; tableGPU.Location = new Point(20, 60); tableGPU.Margin = new Padding(8, 4, 8, 4); tableGPU.Name = "tableGPU"; tableGPU.RowCount = 1; tableGPU.RowStyles.Add(new RowStyle(SizeType.Absolute, 128F)); tableGPU.RowStyles.Add(new RowStyle(SizeType.Absolute, 128F)); tableGPU.Size = new Size(787, 256); tableGPU.TabIndex = 16; // // buttonStopGPU // buttonStopGPU.Activated = false; buttonStopGPU.BackColor = SystemColors.ControlLightLight; buttonStopGPU.BorderColor = Color.Transparent; buttonStopGPU.BorderRadius = 5; buttonStopGPU.CausesValidation = false; buttonStopGPU.Dock = DockStyle.Top; buttonStopGPU.FlatAppearance.BorderSize = 0; buttonStopGPU.FlatStyle = FlatStyle.Flat; buttonStopGPU.ForeColor = SystemColors.ControlText; buttonStopGPU.Image = Properties.Resources.icons8_leaf_48; buttonStopGPU.ImageAlign = ContentAlignment.BottomCenter; buttonStopGPU.Location = new Point(200, 4); buttonStopGPU.Margin = new Padding(4); buttonStopGPU.Name = "buttonStopGPU"; buttonStopGPU.Secondary = false; buttonStopGPU.Size = new Size(188, 120); buttonStopGPU.TabIndex = 4; buttonStopGPU.Text = "Stop GPU applications"; buttonStopGPU.TextImageRelation = TextImageRelation.ImageAboveText; buttonStopGPU.UseVisualStyleBackColor = false; buttonStopGPU.Visible = false; // // buttonEco // buttonEco.Activated = false; buttonEco.BackColor = SystemColors.ControlLightLight; buttonEco.BorderColor = Color.Transparent; buttonEco.BorderRadius = 5; buttonEco.CausesValidation = false; buttonEco.Dock = DockStyle.Top; buttonEco.FlatAppearance.BorderSize = 0; buttonEco.FlatStyle = FlatStyle.Flat; buttonEco.ForeColor = SystemColors.ControlText; buttonEco.Image = Properties.Resources.icons8_leaf_48; buttonEco.ImageAlign = ContentAlignment.BottomCenter; buttonEco.Location = new Point(4, 4); buttonEco.Margin = new Padding(4); buttonEco.Name = "buttonEco"; buttonEco.Secondary = false; buttonEco.Size = new Size(188, 120); buttonEco.TabIndex = 4; buttonEco.Text = Properties.Strings.EcoMode; buttonEco.TextImageRelation = TextImageRelation.ImageAboveText; buttonEco.UseVisualStyleBackColor = false; // // buttonStandard // buttonStandard.Activated = false; buttonStandard.BackColor = SystemColors.ControlLightLight; buttonStandard.BorderColor = Color.Transparent; buttonStandard.BorderRadius = 5; buttonStandard.Dock = DockStyle.Top; buttonStandard.FlatAppearance.BorderSize = 0; buttonStandard.FlatStyle = FlatStyle.Flat; buttonStandard.ForeColor = SystemColors.ControlText; buttonStandard.Image = Properties.Resources.icons8_spa_flower_48; buttonStandard.ImageAlign = ContentAlignment.BottomCenter; buttonStandard.Location = new Point(396, 4); buttonStandard.Margin = new Padding(4); buttonStandard.Name = "buttonStandard"; buttonStandard.Secondary = false; buttonStandard.Size = new Size(188, 120); buttonStandard.TabIndex = 5; buttonStandard.Text = Properties.Strings.StandardMode; buttonStandard.TextImageRelation = TextImageRelation.ImageAboveText; buttonStandard.UseVisualStyleBackColor = false; // // buttonXGM // buttonXGM.Activated = false; buttonXGM.BackColor = SystemColors.ControlLightLight; buttonXGM.BorderColor = Color.Transparent; buttonXGM.BorderRadius = 5; buttonXGM.Dock = DockStyle.Top; buttonXGM.FlatAppearance.BorderSize = 0; buttonXGM.FlatStyle = FlatStyle.Flat; buttonXGM.ForeColor = SystemColors.ControlText; buttonXGM.Image = Properties.Resources.icons8_video_48; buttonXGM.ImageAlign = ContentAlignment.BottomCenter; buttonXGM.Location = new Point(200, 132); buttonXGM.Margin = new Padding(4); buttonXGM.Name = "buttonXGM"; buttonXGM.Secondary = false; buttonXGM.Size = new Size(188, 120); buttonXGM.TabIndex = 8; buttonXGM.Text = "XG Mobile"; buttonXGM.TextImageRelation = TextImageRelation.ImageAboveText; buttonXGM.UseVisualStyleBackColor = false; buttonXGM.Visible = false; // // buttonOptimized // buttonOptimized.Activated = false; buttonOptimized.BackColor = SystemColors.ControlLightLight; buttonOptimized.BorderColor = Color.Transparent; buttonOptimized.BorderRadius = 5; buttonOptimized.Dock = DockStyle.Top; buttonOptimized.FlatAppearance.BorderSize = 0; buttonOptimized.FlatStyle = FlatStyle.Flat; buttonOptimized.ForeColor = SystemColors.ControlText; buttonOptimized.Image = Properties.Resources.icons8_project_management_48__1_; buttonOptimized.ImageAlign = ContentAlignment.BottomCenter; buttonOptimized.Location = new Point(4, 132); buttonOptimized.Margin = new Padding(4); buttonOptimized.Name = "buttonOptimized"; buttonOptimized.Secondary = false; buttonOptimized.Size = new Size(188, 120); buttonOptimized.TabIndex = 7; buttonOptimized.Text = Properties.Strings.Optimized; buttonOptimized.TextImageRelation = TextImageRelation.ImageAboveText; buttonOptimized.UseVisualStyleBackColor = false; // // buttonUltimate // buttonUltimate.Activated = false; buttonUltimate.BackColor = SystemColors.ControlLightLight; buttonUltimate.BorderColor = Color.Transparent; buttonUltimate.BorderRadius = 5; buttonUltimate.Dock = DockStyle.Top; buttonUltimate.FlatAppearance.BorderSize = 0; buttonUltimate.FlatStyle = FlatStyle.Flat; buttonUltimate.ForeColor = SystemColors.ControlText; buttonUltimate.Image = Properties.Resources.icons8_game_controller_48; buttonUltimate.ImageAlign = ContentAlignment.BottomCenter; buttonUltimate.Location = new Point(592, 4); buttonUltimate.Margin = new Padding(4); buttonUltimate.Name = "buttonUltimate"; buttonUltimate.Secondary = false; buttonUltimate.Size = new Size(191, 120); buttonUltimate.TabIndex = 6; buttonUltimate.Text = Properties.Strings.UltimateMode; buttonUltimate.TextImageRelation = TextImageRelation.ImageAboveText; buttonUltimate.UseVisualStyleBackColor = false; // // panelGPUTitle // panelGPUTitle.Controls.Add(pictureGPU); panelGPUTitle.Controls.Add(labelGPU); panelGPUTitle.Controls.Add(labelGPUFan); panelGPUTitle.Dock = DockStyle.Top; panelGPUTitle.Location = new Point(20, 20); panelGPUTitle.Margin = new Padding(4); panelGPUTitle.Name = "panelGPUTitle"; panelGPUTitle.Size = new Size(787, 40); panelGPUTitle.TabIndex = 21; // // pictureGPU // pictureGPU.BackgroundImage = Properties.Resources.icons8_video_card_32; pictureGPU.BackgroundImageLayout = ImageLayout.Zoom; pictureGPU.Location = new Point(8, 0); pictureGPU.Margin = new Padding(4); pictureGPU.Name = "pictureGPU"; pictureGPU.Size = new Size(32, 32); pictureGPU.TabIndex = 22; pictureGPU.TabStop = false; // // labelGPU // labelGPU.AutoSize = true; labelGPU.Font = new Font("Segoe UI", 9F, FontStyle.Bold); labelGPU.Location = new Point(40, 0); labelGPU.Margin = new Padding(8, 0, 8, 0); labelGPU.Name = "labelGPU"; labelGPU.Size = new Size(136, 32); labelGPU.TabIndex = 21; labelGPU.Text = "GPU Mode"; // // labelGPUFan // labelGPUFan.Anchor = AnchorStyles.Top | AnchorStyles.Right; labelGPUFan.Location = new Point(387, 0); labelGPUFan.Margin = new Padding(8, 0, 8, 0); labelGPUFan.Name = "labelGPUFan"; labelGPUFan.Size = new Size(400, 35); labelGPUFan.TabIndex = 20; labelGPUFan.Text = " "; labelGPUFan.TextAlign = ContentAlignment.TopRight; // // panelScreen // panelScreen.AccessibleRole = AccessibleRole.Grouping; panelScreen.AutoSize = true; panelScreen.AutoSizeMode = AutoSizeMode.GrowAndShrink; panelScreen.Controls.Add(labelTipScreen); panelScreen.Controls.Add(tableScreen); panelScreen.Controls.Add(panelScreenTitle); panelScreen.Dock = DockStyle.Top; panelScreen.Location = new Point(11, 651); panelScreen.Margin = new Padding(0); panelScreen.Name = "panelScreen"; panelScreen.Padding = new Padding(20, 11, 20, 0); panelScreen.Size = new Size(827, 187); panelScreen.TabIndex = 2; panelScreen.TabStop = true; // // labelTipScreen // labelTipScreen.Dock = DockStyle.Top; labelTipScreen.ForeColor = SystemColors.GrayText; labelTipScreen.Location = new Point(20, 151); labelTipScreen.Margin = new Padding(4, 0, 4, 0); labelTipScreen.Name = "labelTipScreen"; labelTipScreen.Size = new Size(787, 36); labelTipScreen.TabIndex = 24; // // tableScreen // tableScreen.AutoSize = true; tableScreen.AutoSizeMode = AutoSizeMode.GrowAndShrink; tableScreen.ColumnCount = 4; tableScreen.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F)); tableScreen.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F)); tableScreen.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F)); tableScreen.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F)); tableScreen.Controls.Add(buttonScreenAuto, 0, 0); tableScreen.Controls.Add(button60Hz, 1, 0); tableScreen.Controls.Add(button120Hz, 2, 0); tableScreen.Controls.Add(buttonMiniled, 3, 0); tableScreen.Controls.Add(buttonFHD, 3, 0); tableScreen.Controls.Add(buttonHDRControl, 3, 0); tableScreen.Dock = DockStyle.Top; tableScreen.Location = new Point(20, 51); tableScreen.Margin = new Padding(8, 4, 8, 4); tableScreen.Name = "tableScreen"; tableScreen.RowCount = 1; tableScreen.RowStyles.Add(new RowStyle(SizeType.Absolute, 80F)); tableScreen.RowStyles.Add(new RowStyle(SizeType.Absolute, 20F)); tableScreen.Size = new Size(787, 100); tableScreen.TabIndex = 23; // // buttonScreenAuto // buttonScreenAuto.Activated = false; buttonScreenAuto.BackColor = SystemColors.ControlLightLight; buttonScreenAuto.BorderColor = Color.Transparent; buttonScreenAuto.BorderRadius = 5; buttonScreenAuto.Dock = DockStyle.Fill; buttonScreenAuto.FlatAppearance.BorderSize = 0; buttonScreenAuto.FlatStyle = FlatStyle.Flat; buttonScreenAuto.ForeColor = SystemColors.ControlText; buttonScreenAuto.Location = new Point(4, 4); buttonScreenAuto.Margin = new Padding(4); buttonScreenAuto.Name = "buttonScreenAuto"; buttonScreenAuto.Secondary = false; buttonScreenAuto.Size = new Size(188, 72); buttonScreenAuto.TabIndex = 9; buttonScreenAuto.Text = Properties.Strings.AutoMode; buttonScreenAuto.UseVisualStyleBackColor = false; // // button60Hz // button60Hz.Activated = false; button60Hz.BackColor = SystemColors.ControlLightLight; button60Hz.BorderColor = Color.Transparent; button60Hz.BorderRadius = 5; button60Hz.CausesValidation = false; button60Hz.Dock = DockStyle.Fill; button60Hz.FlatAppearance.BorderSize = 0; button60Hz.FlatStyle = FlatStyle.Flat; button60Hz.ForeColor = SystemColors.ControlText; button60Hz.Location = new Point(200, 4); button60Hz.Margin = new Padding(4); button60Hz.Name = "button60Hz"; button60Hz.Secondary = false; button60Hz.Size = new Size(188, 72); button60Hz.TabIndex = 10; button60Hz.Text = "60Hz"; button60Hz.UseVisualStyleBackColor = false; // // button120Hz // button120Hz.Activated = false; button120Hz.BackColor = SystemColors.ControlLightLight; button120Hz.BorderColor = Color.Transparent; button120Hz.BorderRadius = 5; button120Hz.Dock = DockStyle.Fill; button120Hz.FlatAppearance.BorderSize = 0; button120Hz.FlatStyle = FlatStyle.Flat; button120Hz.ForeColor = SystemColors.ControlText; button120Hz.Location = new Point(396, 4); button120Hz.Margin = new Padding(4); button120Hz.Name = "button120Hz"; button120Hz.Secondary = false; button120Hz.Size = new Size(188, 72); button120Hz.TabIndex = 11; button120Hz.Text = "120Hz + OD"; button120Hz.UseVisualStyleBackColor = false; // // buttonMiniled // buttonMiniled.Activated = false; buttonMiniled.BackColor = SystemColors.ControlLightLight; buttonMiniled.BorderColor = Color.Transparent; buttonMiniled.BorderRadius = 5; buttonMiniled.CausesValidation = false; buttonMiniled.Dock = DockStyle.Fill; buttonMiniled.FlatAppearance.BorderSize = 0; buttonMiniled.FlatStyle = FlatStyle.Flat; buttonMiniled.ForeColor = SystemColors.ControlText; buttonMiniled.Location = new Point(592, 4); buttonMiniled.Margin = new Padding(4); buttonMiniled.Name = "buttonMiniled"; buttonMiniled.Secondary = false; buttonMiniled.Size = new Size(191, 72); buttonMiniled.TabIndex = 12; buttonMiniled.Text = Properties.Strings.Multizone; buttonMiniled.UseVisualStyleBackColor = false; // // buttonFHD // buttonFHD.Activated = false; buttonFHD.BackColor = SystemColors.ControlLightLight; buttonFHD.BorderColor = Color.Transparent; buttonFHD.BorderRadius = 5; buttonFHD.CausesValidation = false; buttonFHD.Dock = DockStyle.Fill; buttonFHD.FlatAppearance.BorderSize = 0; buttonFHD.FlatStyle = FlatStyle.Flat; buttonFHD.ForeColor = SystemColors.ControlText; buttonFHD.Location = new Point(4, 84); buttonFHD.Margin = new Padding(4); buttonFHD.Name = "buttonFHD"; buttonFHD.Secondary = false; buttonFHD.Size = new Size(188, 12); buttonFHD.TabIndex = 13; buttonFHD.Text = "FHD"; buttonFHD.UseVisualStyleBackColor = false; buttonFHD.Visible = false; // // panelScreenTitle // panelScreenTitle.Controls.Add(labelMidFan); panelScreenTitle.Controls.Add(pictureScreen); panelScreenTitle.Controls.Add(labelSreen); panelScreenTitle.Dock = DockStyle.Top; panelScreenTitle.Location = new Point(20, 11); panelScreenTitle.Margin = new Padding(4); panelScreenTitle.Name = "panelScreenTitle"; panelScreenTitle.Size = new Size(787, 40); panelScreenTitle.TabIndex = 25; // // labelMidFan // labelMidFan.Anchor = AnchorStyles.Top | AnchorStyles.Right; labelMidFan.Location = new Point(500, 0); labelMidFan.Margin = new Padding(8, 0, 8, 0); labelMidFan.Name = "labelMidFan"; labelMidFan.Size = new Size(285, 35); labelMidFan.TabIndex = 28; labelMidFan.Text = " "; labelMidFan.TextAlign = ContentAlignment.TopRight; // // pictureScreen // pictureScreen.BackgroundImage = Properties.Resources.icons8_laptop_32; pictureScreen.BackgroundImageLayout = ImageLayout.Zoom; pictureScreen.Location = new Point(8, 3); pictureScreen.Margin = new Padding(4); pictureScreen.Name = "pictureScreen"; pictureScreen.Size = new Size(32, 32); pictureScreen.TabIndex = 27; pictureScreen.TabStop = false; // // labelSreen // labelSreen.AutoSize = true; labelSreen.Font = new Font("Segoe UI", 9F, FontStyle.Bold); labelSreen.Location = new Point(40, 0); labelSreen.Margin = new Padding(4, 0, 4, 0); labelSreen.Name = "labelSreen"; labelSreen.Size = new Size(176, 32); labelSreen.TabIndex = 26; labelSreen.Text = "Laptop Screen"; // // panelKeyboard // panelKeyboard.AccessibleRole = AccessibleRole.Grouping; panelKeyboard.AutoSize = true; panelKeyboard.AutoSizeMode = AutoSizeMode.GrowAndShrink; panelKeyboard.Controls.Add(labelBacklight); panelKeyboard.Controls.Add(tableLayoutKeyboard); panelKeyboard.Controls.Add(panelKeyboardTitle); panelKeyboard.Dock = DockStyle.Top; panelKeyboard.Location = new Point(11, 1394); panelKeyboard.Margin = new Padding(0); panelKeyboard.Name = "panelKeyboard"; panelKeyboard.Padding = new Padding(20, 20, 20, 0); panelKeyboard.Size = new Size(827, 146); panelKeyboard.TabIndex = 4; panelKeyboard.TabStop = true; // // labelBacklight // labelBacklight.Cursor = Cursors.Hand; labelBacklight.Dock = DockStyle.Top; labelBacklight.Font = new Font("Segoe UI", 9F); labelBacklight.ForeColor = SystemColors.GrayText; labelBacklight.Location = new Point(20, 112); labelBacklight.Margin = new Padding(4, 0, 4, 0); labelBacklight.Name = "labelBacklight"; labelBacklight.Padding = new Padding(4, 0, 4, 0); labelBacklight.Size = new Size(787, 34); labelBacklight.TabIndex = 43; // // tableLayoutKeyboard // tableLayoutKeyboard.AutoSize = true; tableLayoutKeyboard.AutoSizeMode = AutoSizeMode.GrowAndShrink; tableLayoutKeyboard.ColumnCount = 3; tableLayoutKeyboard.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 33F)); tableLayoutKeyboard.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 33F)); tableLayoutKeyboard.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 33F)); tableLayoutKeyboard.Controls.Add(buttonKeyboard, 0, 0); tableLayoutKeyboard.Controls.Add(panelColor, 0, 0); tableLayoutKeyboard.Controls.Add(comboKeyboard, 0, 0); tableLayoutKeyboard.Dock = DockStyle.Top; tableLayoutKeyboard.Location = new Point(20, 60); tableLayoutKeyboard.Margin = new Padding(8, 4, 8, 4); tableLayoutKeyboard.Name = "tableLayoutKeyboard"; tableLayoutKeyboard.RowCount = 1; tableLayoutKeyboard.RowStyles.Add(new RowStyle(SizeType.Percent, 100F)); tableLayoutKeyboard.Size = new Size(787, 52); tableLayoutKeyboard.TabIndex = 39; // // buttonKeyboard // buttonKeyboard.Activated = false; buttonKeyboard.AutoSize = true; buttonKeyboard.AutoSizeMode = AutoSizeMode.GrowAndShrink; buttonKeyboard.BackColor = SystemColors.ControlLight; buttonKeyboard.BorderColor = Color.Transparent; buttonKeyboard.BorderRadius = 2; buttonKeyboard.Dock = DockStyle.Top; buttonKeyboard.FlatAppearance.BorderSize = 0; buttonKeyboard.FlatStyle = FlatStyle.Flat; buttonKeyboard.Image = Properties.Resources.icons8_settings_32; buttonKeyboard.ImageAlign = ContentAlignment.MiddleRight; buttonKeyboard.Location = new Point(528, 4); buttonKeyboard.Margin = new Padding(4); buttonKeyboard.MaximumSize = new Size(0, 48); buttonKeyboard.MinimumSize = new Size(0, 44); buttonKeyboard.Name = "buttonKeyboard"; buttonKeyboard.Secondary = true; buttonKeyboard.Size = new Size(255, 44); buttonKeyboard.TabIndex = 37; buttonKeyboard.Text = "&Extra"; buttonKeyboard.TextImageRelation = TextImageRelation.ImageBeforeText; buttonKeyboard.UseVisualStyleBackColor = false; // // panelColor // panelColor.AutoSize = true; panelColor.Controls.Add(pictureColor2); panelColor.Controls.Add(pictureColor); panelColor.Controls.Add(buttonKeyboardColor); panelColor.Dock = DockStyle.Fill; panelColor.Location = new Point(266, 4); panelColor.Margin = new Padding(4); panelColor.Name = "panelColor"; panelColor.Size = new Size(254, 44); panelColor.TabIndex = 36; // // pictureColor2 // pictureColor2.Anchor = AnchorStyles.Top | AnchorStyles.Right; pictureColor2.Location = new Point(187, 13); pictureColor2.Margin = new Padding(8); pictureColor2.Name = "pictureColor2"; pictureColor2.Size = new Size(20, 20); pictureColor2.TabIndex = 41; pictureColor2.TabStop = false; // // pictureColor // pictureColor.Anchor = AnchorStyles.Top | AnchorStyles.Right; pictureColor.Location = new Point(218, 13); pictureColor.Margin = new Padding(8); pictureColor.Name = "pictureColor"; pictureColor.Size = new Size(20, 20); pictureColor.TabIndex = 40; pictureColor.TabStop = false; // // buttonKeyboardColor // buttonKeyboardColor.Activated = false; buttonKeyboardColor.AutoSize = true; buttonKeyboardColor.AutoSizeMode = AutoSizeMode.GrowAndShrink; buttonKeyboardColor.BackColor = SystemColors.ButtonHighlight; buttonKeyboardColor.BorderColor = Color.Transparent; buttonKeyboardColor.BorderRadius = 2; buttonKeyboardColor.Dock = DockStyle.Top; buttonKeyboardColor.FlatStyle = FlatStyle.Flat; buttonKeyboardColor.ForeColor = SystemColors.ControlText; buttonKeyboardColor.Location = new Point(0, 0); buttonKeyboardColor.Margin = new Padding(4); buttonKeyboardColor.MaximumSize = new Size(0, 48); buttonKeyboardColor.MinimumSize = new Size(0, 44); buttonKeyboardColor.Name = "buttonKeyboardColor"; buttonKeyboardColor.Secondary = false; buttonKeyboardColor.Size = new Size(254, 44); buttonKeyboardColor.TabIndex = 14; buttonKeyboardColor.Text = Properties.Strings.Color; buttonKeyboardColor.UseVisualStyleBackColor = false; // // comboKeyboard // comboKeyboard.BorderColor = Color.White; comboKeyboard.ButtonColor = Color.FromArgb(255, 255, 255); comboKeyboard.Dock = DockStyle.Top; comboKeyboard.FlatStyle = FlatStyle.Flat; comboKeyboard.Font = new Font("Segoe UI", 9F); comboKeyboard.FormattingEnabled = true; comboKeyboard.ItemHeight = 32; comboKeyboard.Items.AddRange(new object[] { "Static", "Breathe", "Rainbow", "Strobe" }); comboKeyboard.Location = new Point(7, 7); comboKeyboard.Margin = new Padding(7, 7, 7, 4); comboKeyboard.Name = "comboKeyboard"; comboKeyboard.Size = new Size(248, 40); comboKeyboard.TabIndex = 13; // // panelKeyboardTitle // panelKeyboardTitle.Controls.Add(buttonFnLock); panelKeyboardTitle.Controls.Add(pictureKeyboard); panelKeyboardTitle.Controls.Add(labelKeyboard); panelKeyboardTitle.Dock = DockStyle.Top; panelKeyboardTitle.Location = new Point(20, 20); panelKeyboardTitle.Margin = new Padding(0); panelKeyboardTitle.Name = "panelKeyboardTitle"; panelKeyboardTitle.Padding = new Padding(0, 0, 5, 0); panelKeyboardTitle.Size = new Size(787, 40); panelKeyboardTitle.TabIndex = 40; // // buttonFnLock // buttonFnLock.Activated = false; buttonFnLock.BackColor = SystemColors.ControlLight; buttonFnLock.BorderColor = Color.Transparent; buttonFnLock.BorderRadius = 2; buttonFnLock.Dock = DockStyle.Right; buttonFnLock.FlatAppearance.BorderSize = 0; buttonFnLock.FlatStyle = FlatStyle.Flat; buttonFnLock.Font = new Font("Segoe UI", 7.125F, FontStyle.Bold); buttonFnLock.ForeColor = SystemColors.ControlDark; buttonFnLock.Location = new Point(675, 0); buttonFnLock.Margin = new Padding(0); buttonFnLock.Name = "buttonFnLock"; buttonFnLock.Secondary = true; buttonFnLock.Size = new Size(107, 40); buttonFnLock.TabIndex = 4; buttonFnLock.Text = "FN-Lock"; buttonFnLock.UseVisualStyleBackColor = false; // // pictureKeyboard // pictureKeyboard.BackgroundImage = Properties.Resources.icons8_keyboard_32__1_; pictureKeyboard.BackgroundImageLayout = ImageLayout.Zoom; pictureKeyboard.Location = new Point(8, 0); pictureKeyboard.Margin = new Padding(4); pictureKeyboard.Name = "pictureKeyboard"; pictureKeyboard.Size = new Size(32, 32); pictureKeyboard.TabIndex = 35; pictureKeyboard.TabStop = false; // // labelKeyboard // labelKeyboard.AutoSize = true; labelKeyboard.Font = new Font("Segoe UI", 9F, FontStyle.Bold); labelKeyboard.Location = new Point(43, 0); labelKeyboard.Margin = new Padding(4, 0, 4, 0); labelKeyboard.Name = "labelKeyboard"; labelKeyboard.Size = new Size(210, 32); labelKeyboard.TabIndex = 34; labelKeyboard.Text = "Laptop Keyboard"; // // panelStartup // panelStartup.Controls.Add(labelCharge); panelStartup.Controls.Add(checkStartup); panelStartup.Dock = DockStyle.Top; panelStartup.Location = new Point(11, 1787); panelStartup.Margin = new Padding(0); panelStartup.Name = "panelStartup"; panelStartup.Padding = new Padding(20, 0, 20, 0); panelStartup.Size = new Size(827, 50); panelStartup.TabIndex = 6; // // labelCharge // labelCharge.Cursor = Cursors.Hand; labelCharge.Dock = DockStyle.Right; labelCharge.ForeColor = SystemColors.ControlDark; labelCharge.Location = new Point(442, 0); labelCharge.Margin = new Padding(0); labelCharge.Name = "labelCharge"; labelCharge.Size = new Size(365, 50); labelCharge.TabIndex = 40; labelCharge.TextAlign = ContentAlignment.MiddleRight; // // panelPeripherals // panelPeripherals.AutoSize = true; panelPeripherals.AutoSizeMode = AutoSizeMode.GrowAndShrink; panelPeripherals.Controls.Add(tableLayoutPeripherals); panelPeripherals.Dock = DockStyle.Top; panelPeripherals.Location = new Point(11, 1540); panelPeripherals.Margin = new Padding(0); panelPeripherals.Name = "panelPeripherals"; panelPeripherals.Padding = new Padding(20, 5, 20, 10); panelPeripherals.Size = new Size(827, 143); panelPeripherals.TabIndex = 4; panelPeripherals.Visible = false; // // tableLayoutPeripherals // tableLayoutPeripherals.AutoSize = true; tableLayoutPeripherals.AutoSizeMode = AutoSizeMode.GrowAndShrink; tableLayoutPeripherals.ColumnCount = 3; tableLayoutPeripherals.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F)); tableLayoutPeripherals.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F)); tableLayoutPeripherals.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F)); tableLayoutPeripherals.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F)); tableLayoutPeripherals.Controls.Add(buttonPeripheral3, 0, 0); tableLayoutPeripherals.Controls.Add(buttonPeripheral2, 0, 0); tableLayoutPeripherals.Controls.Add(buttonPeripheral1, 0, 0); tableLayoutPeripherals.Dock = DockStyle.Top; tableLayoutPeripherals.Location = new Point(20, 5); tableLayoutPeripherals.Margin = new Padding(8, 4, 8, 4); tableLayoutPeripherals.Name = "tableLayoutPeripherals"; tableLayoutPeripherals.RowCount = 1; tableLayoutPeripherals.RowStyles.Add(new RowStyle(SizeType.Percent, 100F)); tableLayoutPeripherals.Size = new Size(787, 128); tableLayoutPeripherals.TabIndex = 43; // // buttonPeripheral3 // buttonPeripheral3.Activated = false; buttonPeripheral3.BackColor = SystemColors.ControlLightLight; buttonPeripheral3.BorderColor = Color.Transparent; buttonPeripheral3.BorderRadius = 5; buttonPeripheral3.CausesValidation = false; buttonPeripheral3.Dock = DockStyle.Top; buttonPeripheral3.FlatAppearance.BorderSize = 0; buttonPeripheral3.FlatStyle = FlatStyle.Flat; buttonPeripheral3.Font = new Font("Segoe UI", 8F); buttonPeripheral3.ForeColor = SystemColors.ControlText; buttonPeripheral3.Image = Properties.Resources.icons8_maus_48; buttonPeripheral3.ImageAlign = ContentAlignment.MiddleLeft; buttonPeripheral3.Location = new Point(528, 4); buttonPeripheral3.Margin = new Padding(4); buttonPeripheral3.Name = "buttonPeripheral3"; buttonPeripheral3.Secondary = false; buttonPeripheral3.Size = new Size(255, 120); buttonPeripheral3.TabIndex = 22; buttonPeripheral3.Text = "Mouse 3"; buttonPeripheral3.TextImageRelation = TextImageRelation.ImageBeforeText; buttonPeripheral3.UseVisualStyleBackColor = false; // // buttonPeripheral2 // buttonPeripheral2.Activated = false; buttonPeripheral2.BackColor = SystemColors.ControlLightLight; buttonPeripheral2.BorderColor = Color.Transparent; buttonPeripheral2.BorderRadius = 5; buttonPeripheral2.CausesValidation = false; buttonPeripheral2.Dock = DockStyle.Top; buttonPeripheral2.FlatAppearance.BorderSize = 0; buttonPeripheral2.FlatStyle = FlatStyle.Flat; buttonPeripheral2.Font = new Font("Segoe UI", 8F); buttonPeripheral2.ForeColor = SystemColors.ControlText; buttonPeripheral2.Image = Properties.Resources.icons8_maus_48; buttonPeripheral2.ImageAlign = ContentAlignment.MiddleLeft; buttonPeripheral2.Location = new Point(266, 4); buttonPeripheral2.Margin = new Padding(4); buttonPeripheral2.Name = "buttonPeripheral2"; buttonPeripheral2.Secondary = false; buttonPeripheral2.Size = new Size(254, 120); buttonPeripheral2.TabIndex = 19; buttonPeripheral2.Text = "Mouse 2"; buttonPeripheral2.TextImageRelation = TextImageRelation.ImageBeforeText; buttonPeripheral2.UseVisualStyleBackColor = false; // // buttonPeripheral1 // buttonPeripheral1.Activated = false; buttonPeripheral1.BackColor = SystemColors.ControlLightLight; buttonPeripheral1.BorderColor = Color.Transparent; buttonPeripheral1.BorderRadius = 5; buttonPeripheral1.CausesValidation = false; buttonPeripheral1.Dock = DockStyle.Top; buttonPeripheral1.FlatAppearance.BorderSize = 0; buttonPeripheral1.FlatStyle = FlatStyle.Flat; buttonPeripheral1.Font = new Font("Segoe UI", 8F); buttonPeripheral1.ForeColor = SystemColors.ControlText; buttonPeripheral1.Image = Properties.Resources.icons8_maus_48; buttonPeripheral1.ImageAlign = ContentAlignment.MiddleLeft; buttonPeripheral1.Location = new Point(4, 4); buttonPeripheral1.Margin = new Padding(4); buttonPeripheral1.Name = "buttonPeripheral1"; buttonPeripheral1.Secondary = false; buttonPeripheral1.Size = new Size(254, 120); buttonPeripheral1.TabIndex = 20; buttonPeripheral1.Text = "Mouse 1"; buttonPeripheral1.TextImageRelation = TextImageRelation.ImageBeforeText; buttonPeripheral1.UseVisualStyleBackColor = false; // // panelAlly // panelAlly.AccessibleRole = AccessibleRole.Grouping; panelAlly.AutoSize = true; panelAlly.AutoSizeMode = AutoSizeMode.GrowAndShrink; panelAlly.Controls.Add(tableLayoutAlly); panelAlly.Controls.Add(panelAllyTitle); panelAlly.Dock = DockStyle.Top; panelAlly.Location = new Point(11, 1254); panelAlly.Margin = new Padding(0); panelAlly.Name = "panelAlly"; panelAlly.Padding = new Padding(20, 20, 20, 0); panelAlly.Size = new Size(827, 140); panelAlly.TabIndex = 8; panelAlly.TabStop = true; panelAlly.Visible = false; // // tableLayoutAlly // tableLayoutAlly.AutoSize = true; tableLayoutAlly.AutoSizeMode = AutoSizeMode.GrowAndShrink; tableLayoutAlly.ColumnCount = 3; tableLayoutAlly.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 33F)); tableLayoutAlly.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 33F)); tableLayoutAlly.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 33F)); tableLayoutAlly.Controls.Add(buttonController, 0, 0); tableLayoutAlly.Controls.Add(buttonBacklight, 0, 0); tableLayoutAlly.Controls.Add(buttonControllerMode, 0, 0); tableLayoutAlly.Dock = DockStyle.Top; tableLayoutAlly.Location = new Point(20, 60); tableLayoutAlly.Margin = new Padding(8, 4, 8, 4); tableLayoutAlly.Name = "tableLayoutAlly"; tableLayoutAlly.RowCount = 1; tableLayoutAlly.RowStyles.Add(new RowStyle(SizeType.Absolute, 80F)); tableLayoutAlly.Size = new Size(787, 80); tableLayoutAlly.TabIndex = 23; // // buttonController // buttonController.Activated = false; buttonController.BackColor = SystemColors.ControlLight; buttonController.BorderColor = Color.Transparent; buttonController.BorderRadius = 5; buttonController.Dock = DockStyle.Fill; buttonController.FlatAppearance.BorderSize = 0; buttonController.FlatStyle = FlatStyle.Flat; buttonController.ForeColor = SystemColors.ControlText; buttonController.Image = Properties.Resources.icons8_controls_32; buttonController.ImageAlign = ContentAlignment.MiddleRight; buttonController.Location = new Point(528, 4); buttonController.Margin = new Padding(4); buttonController.Name = "buttonController"; buttonController.Secondary = true; buttonController.Size = new Size(255, 72); buttonController.TabIndex = 11; buttonController.Text = "Controller"; buttonController.TextImageRelation = TextImageRelation.ImageBeforeText; buttonController.UseVisualStyleBackColor = false; // // buttonBacklight // buttonBacklight.Activated = false; buttonBacklight.BackColor = SystemColors.ControlLightLight; buttonBacklight.BorderColor = Color.Transparent; buttonBacklight.BorderRadius = 5; buttonBacklight.Dock = DockStyle.Fill; buttonBacklight.FlatAppearance.BorderSize = 0; buttonBacklight.FlatStyle = FlatStyle.Flat; buttonBacklight.ForeColor = SystemColors.ControlText; buttonBacklight.Image = Properties.Resources.backlight; buttonBacklight.ImageAlign = ContentAlignment.MiddleRight; buttonBacklight.Location = new Point(266, 4); buttonBacklight.Margin = new Padding(4); buttonBacklight.Name = "buttonBacklight"; buttonBacklight.Secondary = false; buttonBacklight.Size = new Size(254, 72); buttonBacklight.TabIndex = 10; buttonBacklight.Text = "100%"; buttonBacklight.TextImageRelation = TextImageRelation.ImageBeforeText; buttonBacklight.UseVisualStyleBackColor = false; // // buttonControllerMode // buttonControllerMode.Activated = false; buttonControllerMode.BackColor = SystemColors.ControlLightLight; buttonControllerMode.BorderColor = Color.Transparent; buttonControllerMode.BorderRadius = 5; buttonControllerMode.Dock = DockStyle.Fill; buttonControllerMode.FlatAppearance.BorderSize = 0; buttonControllerMode.FlatStyle = FlatStyle.Flat; buttonControllerMode.ForeColor = SystemColors.ControlText; buttonControllerMode.Image = Properties.Resources.icons8_game_controller_48; buttonControllerMode.ImageAlign = ContentAlignment.MiddleRight; buttonControllerMode.Location = new Point(4, 4); buttonControllerMode.Margin = new Padding(4); buttonControllerMode.Name = "buttonControllerMode"; buttonControllerMode.Secondary = false; buttonControllerMode.Size = new Size(254, 72); buttonControllerMode.TabIndex = 9; buttonControllerMode.Text = Properties.Strings.AutoMode; buttonControllerMode.TextImageRelation = TextImageRelation.ImageBeforeText; buttonControllerMode.UseVisualStyleBackColor = false; // // panelAllyTitle // panelAllyTitle.Controls.Add(pictureAlly); panelAllyTitle.Controls.Add(labelAlly); panelAllyTitle.Dock = DockStyle.Top; panelAllyTitle.Location = new Point(20, 20); panelAllyTitle.Margin = new Padding(4); panelAllyTitle.Name = "panelAllyTitle"; panelAllyTitle.Size = new Size(787, 40); panelAllyTitle.TabIndex = 25; // // pictureAlly // pictureAlly.BackgroundImage = Properties.Resources.icons8_controller_32; pictureAlly.BackgroundImageLayout = ImageLayout.Zoom; pictureAlly.Location = new Point(8, 0); pictureAlly.Margin = new Padding(4); pictureAlly.Name = "pictureAlly"; pictureAlly.Size = new Size(32, 32); pictureAlly.TabIndex = 27; pictureAlly.TabStop = false; // // labelAlly // labelAlly.AutoSize = true; labelAlly.Font = new Font("Segoe UI", 9F, FontStyle.Bold); labelAlly.Location = new Point(43, 0); labelAlly.Margin = new Padding(4, 0, 4, 0); labelAlly.Name = "labelAlly"; labelAlly.Size = new Size(181, 32); labelAlly.TabIndex = 26; labelAlly.Text = "Ally Controller"; // // panelGamma // panelGamma.AutoSize = true; panelGamma.AutoSizeMode = AutoSizeMode.GrowAndShrink; panelGamma.Controls.Add(labelVisual); panelGamma.Controls.Add(tableVisual); panelGamma.Controls.Add(sliderGamma); panelGamma.Controls.Add(panelGammaTitle); panelGamma.Dock = DockStyle.Top; panelGamma.Location = new Point(11, 838); panelGamma.Margin = new Padding(0); panelGamma.Name = "panelGamma"; panelGamma.Padding = new Padding(20, 11, 20, 11); panelGamma.Size = new Size(827, 233); panelGamma.TabIndex = 9; panelGamma.Visible = false; // // labelVisual // labelVisual.Cursor = Cursors.Hand; labelVisual.ForeColor = SystemColors.GrayText; labelVisual.Location = new Point(20, 170); labelVisual.Margin = new Padding(4, 0, 4, 0); labelVisual.Name = "labelVisual"; labelVisual.Padding = new Padding(4); labelVisual.Size = new Size(800, 52); labelVisual.TabIndex = 42; labelVisual.Text = "Visual Modes are not available when HDR is active"; labelVisual.Visible = false; // // tableVisual // tableVisual.AutoSize = true; tableVisual.AutoSizeMode = AutoSizeMode.GrowAndShrink; tableVisual.ColumnCount = 3; tableVisual.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 33.3333321F)); tableVisual.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 33.3333321F)); tableVisual.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 33.3333321F)); tableVisual.Controls.Add(buttonInstallColor, 0, 0); tableVisual.Controls.Add(comboVisual, 0, 0); tableVisual.Controls.Add(comboColorTemp, 1, 0); tableVisual.Controls.Add(comboGamut, 2, 0); tableVisual.Dock = DockStyle.Top; tableVisual.Location = new Point(20, 91); tableVisual.Margin = new Padding(8, 4, 8, 4); tableVisual.Name = "tableVisual"; tableVisual.Padding = new Padding(3, 0, 3, 0); tableVisual.RowCount = 1; tableVisual.RowStyles.Add(new RowStyle(SizeType.Percent, 100F)); tableVisual.RowStyles.Add(new RowStyle(SizeType.Absolute, 20F)); tableVisual.Size = new Size(787, 79); tableVisual.TabIndex = 41; tableVisual.Visible = false; // // buttonInstallColor // buttonInstallColor.Activated = false; buttonInstallColor.BackColor = SystemColors.ControlLight; buttonInstallColor.BorderColor = Color.Transparent; buttonInstallColor.BorderRadius = 2; buttonInstallColor.Dock = DockStyle.Top; buttonInstallColor.FlatAppearance.BorderSize = 0; buttonInstallColor.FlatStyle = FlatStyle.Flat; buttonInstallColor.Image = Properties.Resources.icons8_color_32; buttonInstallColor.ImageAlign = ContentAlignment.MiddleRight; buttonInstallColor.Location = new Point(267, 4); buttonInstallColor.Margin = new Padding(4); buttonInstallColor.Name = "buttonInstallColor"; buttonInstallColor.Secondary = true; buttonInstallColor.Size = new Size(252, 51); buttonInstallColor.TabIndex = 38; buttonInstallColor.Text = "Install Colors"; buttonInstallColor.TextImageRelation = TextImageRelation.ImageBeforeText; buttonInstallColor.UseVisualStyleBackColor = false; buttonInstallColor.Visible = false; // // comboVisual // comboVisual.BorderColor = Color.White; comboVisual.ButtonColor = Color.FromArgb(255, 255, 255); comboVisual.Dock = DockStyle.Top; comboVisual.FlatStyle = FlatStyle.Flat; comboVisual.Font = new Font("Segoe UI", 9F); comboVisual.FormattingEnabled = true; comboVisual.ItemHeight = 32; comboVisual.Location = new Point(10, 8); comboVisual.Margin = new Padding(7, 8, 7, 4); comboVisual.Name = "comboVisual"; comboVisual.Size = new Size(246, 40); comboVisual.TabIndex = 14; comboVisual.Visible = false; // // comboColorTemp // comboColorTemp.BorderColor = Color.White; comboColorTemp.ButtonColor = Color.FromArgb(255, 255, 255); comboColorTemp.Dock = DockStyle.Top; comboColorTemp.FlatStyle = FlatStyle.Flat; comboColorTemp.Font = new Font("Segoe UI", 9F); comboColorTemp.FormattingEnabled = true; comboColorTemp.ItemHeight = 32; comboColorTemp.Location = new Point(530, 8); comboColorTemp.Margin = new Padding(7, 8, 7, 4); comboColorTemp.Name = "comboColorTemp"; comboColorTemp.Size = new Size(247, 40); comboColorTemp.TabIndex = 15; comboColorTemp.Visible = false; // // comboGamut // comboGamut.BorderColor = Color.White; comboGamut.ButtonColor = Color.FromArgb(255, 255, 255); comboGamut.Dock = DockStyle.Top; comboGamut.FlatStyle = FlatStyle.Flat; comboGamut.Font = new Font("Segoe UI", 9F); comboGamut.FormattingEnabled = true; comboGamut.ItemHeight = 32; comboGamut.Location = new Point(10, 67); comboGamut.Margin = new Padding(7, 8, 7, 4); comboGamut.Name = "comboGamut"; comboGamut.Size = new Size(246, 40); comboGamut.TabIndex = 13; comboGamut.Visible = false; // // sliderGamma // sliderGamma.Dock = DockStyle.Top; sliderGamma.Location = new Point(20, 51); sliderGamma.Margin = new Padding(4); sliderGamma.Max = 100; sliderGamma.Min = 0; sliderGamma.Name = "sliderGamma"; sliderGamma.Size = new Size(787, 40); sliderGamma.Step = 5; sliderGamma.TabIndex = 20; sliderGamma.Text = "sliderGamma"; sliderGamma.Value = 100; sliderGamma.Visible = false; // // panelGammaTitle // panelGammaTitle.Controls.Add(labelGamma); panelGammaTitle.Controls.Add(pictureGamma); panelGammaTitle.Controls.Add(labelGammaTitle); panelGammaTitle.Dock = DockStyle.Top; panelGammaTitle.Location = new Point(20, 11); panelGammaTitle.Margin = new Padding(4); panelGammaTitle.Name = "panelGammaTitle"; panelGammaTitle.Size = new Size(787, 40); panelGammaTitle.TabIndex = 40; // // labelGamma // labelGamma.Anchor = AnchorStyles.Top | AnchorStyles.Right; labelGamma.Location = new Point(675, 0); labelGamma.Margin = new Padding(4, 0, 4, 0); labelGamma.Name = "labelGamma"; labelGamma.Size = new Size(107, 32); labelGamma.TabIndex = 39; labelGamma.Text = " "; labelGamma.TextAlign = ContentAlignment.TopRight; // // pictureGamma // pictureGamma.BackgroundImage = Properties.Resources.icons8_brightness_32; pictureGamma.BackgroundImageLayout = ImageLayout.Zoom; pictureGamma.Location = new Point(8, 3); pictureGamma.Margin = new Padding(4); pictureGamma.Name = "pictureGamma"; pictureGamma.Size = new Size(32, 32); pictureGamma.TabIndex = 38; pictureGamma.TabStop = false; // // labelGammaTitle // labelGammaTitle.Font = new Font("Segoe UI", 9F, FontStyle.Bold); labelGammaTitle.Location = new Point(43, 0); labelGammaTitle.Margin = new Padding(4, 0, 4, 0); labelGammaTitle.Name = "labelGammaTitle"; labelGammaTitle.Size = new Size(540, 32); labelGammaTitle.TabIndex = 37; labelGammaTitle.Text = "Flicker-free Dimming"; // // panelVersion // panelVersion.AutoSize = true; panelVersion.AutoSizeMode = AutoSizeMode.GrowAndShrink; panelVersion.Controls.Add(buttonEnergySaver); panelVersion.Controls.Add(buttonAmdOled); panelVersion.Controls.Add(buttonArmoury); panelVersion.Controls.Add(labelVersion); panelVersion.Dock = DockStyle.Top; panelVersion.Location = new Point(11, 1837); panelVersion.MinimumSize = new Size(0, 50); panelVersion.Name = "panelVersion"; panelVersion.Padding = new Padding(20, 5, 24, 5); panelVersion.Size = new Size(827, 50); panelVersion.TabIndex = 10; // // buttonEnergySaver // buttonEnergySaver.Activated = false; buttonEnergySaver.BackColor = SystemColors.ControlLight; buttonEnergySaver.BorderColor = Color.Transparent; buttonEnergySaver.BorderRadius = 2; buttonEnergySaver.Dock = DockStyle.Right; buttonEnergySaver.FlatAppearance.BorderSize = 0; buttonEnergySaver.FlatStyle = FlatStyle.Flat; buttonEnergySaver.Font = new Font("Segoe UI", 7.125F, FontStyle.Bold); buttonEnergySaver.ForeColor = SystemColors.ControlDark; buttonEnergySaver.ImageAlign = ContentAlignment.MiddleLeft; buttonEnergySaver.Location = new Point(640, 5); buttonEnergySaver.Margin = new Padding(0); buttonEnergySaver.Name = "buttonEnergySaver"; buttonEnergySaver.Secondary = true; buttonEnergySaver.Size = new Size(163, 40); buttonEnergySaver.TabIndex = 39; buttonEnergySaver.Text = "Energy Saver"; buttonEnergySaver.UseVisualStyleBackColor = false; // // buttonAmdOled // buttonAmdOled.Activated = false; buttonAmdOled.BackColor = SystemColors.ControlLight; buttonAmdOled.BorderColor = Color.Transparent; buttonAmdOled.BorderRadius = 2; buttonAmdOled.Dock = DockStyle.Right; buttonAmdOled.FlatAppearance.BorderSize = 0; buttonAmdOled.FlatStyle = FlatStyle.Flat; buttonAmdOled.Font = new Font("Segoe UI", 7.125F, FontStyle.Bold); buttonAmdOled.ForeColor = SystemColors.ControlDark; buttonAmdOled.ImageAlign = ContentAlignment.MiddleLeft; buttonAmdOled.Location = new Point(640, 5); buttonAmdOled.Margin = new Padding(0); buttonAmdOled.Name = "buttonAmdOled"; buttonAmdOled.Secondary = true; buttonAmdOled.Size = new Size(180, 40); buttonAmdOled.TabIndex = 39; buttonAmdOled.Text = "AMD OledSaver"; buttonAmdOled.UseVisualStyleBackColor = false; buttonAmdOled.Visible = false; // // buttonArmoury // buttonArmoury.Activated = false; buttonArmoury.BackColor = SystemColors.ControlLight; buttonArmoury.BorderColor = Color.Transparent; buttonArmoury.BorderRadius = 2; buttonArmoury.Dock = DockStyle.Right; buttonArmoury.FlatAppearance.BorderSize = 0; buttonArmoury.FlatStyle = FlatStyle.Flat; buttonArmoury.Font = new Font("Segoe UI", 7.125F, FontStyle.Bold); buttonArmoury.ForeColor = SystemColors.ControlDark; buttonArmoury.ImageAlign = ContentAlignment.MiddleLeft; buttonArmoury.Location = new Point(640, 5); buttonArmoury.Margin = new Padding(0); buttonArmoury.Name = "buttonArmoury"; buttonArmoury.Secondary = true; buttonArmoury.Size = new Size(180, 40); buttonArmoury.TabIndex = 40; buttonArmoury.Text = "ArmouryCrate"; buttonArmoury.UseVisualStyleBackColor = false; buttonArmoury.Visible = false; // // labelVersion // labelVersion.Cursor = Cursors.Hand; labelVersion.Dock = DockStyle.Left; labelVersion.Font = new Font("Segoe UI", 9F, FontStyle.Underline); labelVersion.ForeColor = SystemColors.ControlDark; labelVersion.Location = new Point(20, 5); labelVersion.Margin = new Padding(0); labelVersion.Name = "labelVersion"; labelVersion.Padding = new Padding(5, 0, 5, 0); labelVersion.Size = new Size(399, 40); labelVersion.TabIndex = 38; labelVersion.Text = "v.0"; labelVersion.TextAlign = ContentAlignment.MiddleLeft; // // buttonHDRControl // buttonHDRControl.Activated = false; buttonHDRControl.BackColor = SystemColors.ControlLightLight; buttonHDRControl.BorderColor = Color.Transparent; buttonHDRControl.BorderRadius = 5; buttonHDRControl.CausesValidation = false; buttonHDRControl.Dock = DockStyle.Fill; buttonHDRControl.FlatAppearance.BorderSize = 0; buttonHDRControl.FlatStyle = FlatStyle.Flat; buttonHDRControl.ForeColor = SystemColors.ControlText; buttonHDRControl.Location = new Point(200, 84); buttonHDRControl.Margin = new Padding(4); buttonHDRControl.Name = "buttonHDRControl"; buttonHDRControl.Secondary = false; buttonHDRControl.Size = new Size(188, 12); buttonHDRControl.TabIndex = 14; buttonHDRControl.Text = "HDR Color Control"; buttonHDRControl.UseVisualStyleBackColor = false; buttonHDRControl.Visible = false; // // SettingsForm // AutoScaleDimensions = new SizeF(192F, 192F); AutoScaleMode = AutoScaleMode.Dpi; AutoSize = true; AutoSizeMode = AutoSizeMode.GrowAndShrink; ClientSize = new Size(849, 2075); Controls.Add(panelFooter); Controls.Add(panelVersion); Controls.Add(panelStartup); Controls.Add(panelBattery); Controls.Add(panelPeripherals); Controls.Add(panelKeyboard); Controls.Add(panelAlly); Controls.Add(panelMatrix); Controls.Add(panelGamma); Controls.Add(panelScreen); Controls.Add(panelGPU); Controls.Add(panelPerformance); Margin = new Padding(8, 4, 8, 4); MaximizeBox = false; MdiChildrenMinimizedAnchorBottom = false; MinimizeBox = false; MinimumSize = new Size(821, 71); Name = "SettingsForm"; Padding = new Padding(11); ShowIcon = false; StartPosition = FormStartPosition.CenterScreen; Text = "G-Helper"; panelMatrix.ResumeLayout(false); panelMatrix.PerformLayout(); panelMatrixAuto.ResumeLayout(false); panelMatrixAuto.PerformLayout(); tableLayoutMatrix.ResumeLayout(false); tableLayoutMatrix.PerformLayout(); panelMatrixTitle.ResumeLayout(false); panelMatrixTitle.PerformLayout(); ((System.ComponentModel.ISupportInitialize)pictureMatrix).EndInit(); panelBattery.ResumeLayout(false); panelBatteryTitle.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)pictureBattery).EndInit(); panelFooter.ResumeLayout(false); panelFooter.PerformLayout(); tableButtons.ResumeLayout(false); panelPerformance.ResumeLayout(false); panelPerformance.PerformLayout(); tablePerf.ResumeLayout(false); panelCPUTitle.ResumeLayout(false); panelCPUTitle.PerformLayout(); ((System.ComponentModel.ISupportInitialize)picturePerf).EndInit(); panelGPU.ResumeLayout(false); panelGPU.PerformLayout(); tableAMD.ResumeLayout(false); tableGPU.ResumeLayout(false); panelGPUTitle.ResumeLayout(false); panelGPUTitle.PerformLayout(); ((System.ComponentModel.ISupportInitialize)pictureGPU).EndInit(); panelScreen.ResumeLayout(false); panelScreen.PerformLayout(); tableScreen.ResumeLayout(false); panelScreenTitle.ResumeLayout(false); panelScreenTitle.PerformLayout(); ((System.ComponentModel.ISupportInitialize)pictureScreen).EndInit(); panelKeyboard.ResumeLayout(false); panelKeyboard.PerformLayout(); tableLayoutKeyboard.ResumeLayout(false); tableLayoutKeyboard.PerformLayout(); panelColor.ResumeLayout(false); panelColor.PerformLayout(); ((System.ComponentModel.ISupportInitialize)pictureColor2).EndInit(); ((System.ComponentModel.ISupportInitialize)pictureColor).EndInit(); panelKeyboardTitle.ResumeLayout(false); panelKeyboardTitle.PerformLayout(); ((System.ComponentModel.ISupportInitialize)pictureKeyboard).EndInit(); panelStartup.ResumeLayout(false); panelStartup.PerformLayout(); panelPeripherals.ResumeLayout(false); panelPeripherals.PerformLayout(); tableLayoutPeripherals.ResumeLayout(false); panelAlly.ResumeLayout(false); panelAlly.PerformLayout(); tableLayoutAlly.ResumeLayout(false); panelAllyTitle.ResumeLayout(false); panelAllyTitle.PerformLayout(); ((System.ComponentModel.ISupportInitialize)pictureAlly).EndInit(); panelGamma.ResumeLayout(false); panelGamma.PerformLayout(); tableVisual.ResumeLayout(false); panelGammaTitle.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)pictureGamma).EndInit(); panelVersion.ResumeLayout(false); ResumeLayout(false); PerformLayout(); } #endregion private Panel panelMatrix; private Panel panelBattery; private Panel panelFooter; private RButton buttonQuit; private CheckBox checkStartup; private Panel panelPerformance; private TableLayoutPanel tablePerf; private RButton buttonTurbo; private RButton buttonBalanced; private RButton buttonSilent; private Panel panelGPU; private TableLayoutPanel tableGPU; private RButton buttonXGM; private RButton buttonUltimate; private RButton buttonStandard; private RButton buttonEco; private Panel panelScreen; private TableLayoutPanel tableScreen; private RButton buttonScreenAuto; private RButton button60Hz; private Panel panelKeyboard; private TableLayoutPanel tableLayoutMatrix; private RComboBox comboMatrixRunning; private RComboBox comboMatrix; private TableLayoutPanel tableLayoutKeyboard; private RComboBox comboKeyboard; private Panel panelColor; private PictureBox pictureColor2; private PictureBox pictureColor; private CheckBox checkMatrix; private RButton button120Hz; private RButton buttonOptimized; private Label labelTipGPU; private Label labelTipScreen; private RButton buttonMiniled; private RButton buttonMatrix; private RButton buttonKeyboardColor; private RButton buttonFans; private Slider sliderBattery; private Panel panelGPUTitle; private PictureBox pictureGPU; private Label labelGPU; private Label labelGPUFan; private Panel panelCPUTitle; private PictureBox picturePerf; private Label labelPerf; private Label labelCPUFan; private Panel panelScreenTitle; private Label labelMidFan; private PictureBox pictureScreen; private Label labelSreen; private Panel panelKeyboardTitle; private PictureBox pictureKeyboard; private Label labelKeyboard; private Panel panelMatrixTitle; private PictureBox pictureMatrix; private Label labelMatrix; private Panel panelBatteryTitle; private Label labelBattery; private PictureBox pictureBattery; private Label labelBatteryTitle; private Panel panelStartup; private RButton buttonStopGPU; private TableLayoutPanel tableButtons; private Panel panelPeripherals; private TableLayoutPanel tableLayoutPeripherals; private RButton buttonPeripheral2; private RButton buttonPeripheral3; private RButton buttonPeripheral1; private RButton buttonKeyboard; private RButton buttonUpdates; private Label labelCharge; private RButton buttonFnLock; private RButton buttonBatteryFull; private Panel panelAlly; private TableLayoutPanel tableLayoutAlly; private RButton buttonControllerMode; private Panel panelAllyTitle; private Label labelAlly; private PictureBox pictureAlly; private RButton buttonBacklight; private TableLayoutPanel tableAMD; private RButton buttonFPS; private RButton buttonController; private RButton buttonOverlay; private RComboBox comboInterval; private Panel panelGamma; private Slider sliderGamma; private Panel panelGammaTitle; private Label labelGamma; private PictureBox pictureGamma; private Label labelGammaTitle; private CheckBox checkMatrixLid; private Panel panelMatrixAuto; private TableLayoutPanel tableVisual; private RComboBox comboVisual; private RComboBox comboGamut; private RComboBox comboColorTemp; private RButton buttonInstallColor; private Label labelVisual; private RButton buttonFHD; private RButton buttonAutoTDP; private Label labelBacklight; private Panel panelVersion; private Label labelVersion; private RBadgeButton buttonDonate; private RButton buttonEnergySaver; private RButton buttonAmdOled; private RButton buttonArmoury; private RButton buttonHDRControl; } } ================================================ FILE: app/Settings.cs ================================================ using GHelper.Ally; using GHelper.AnimeMatrix; using GHelper.AutoUpdate; using GHelper.Battery; using GHelper.Display; using GHelper.Fan; using GHelper.Gpu; using GHelper.Helpers; using GHelper.Input; using GHelper.Mode; using GHelper.Peripherals; using GHelper.Peripherals.Mouse; using GHelper.Properties; using GHelper.UI; using GHelper.USB; using System.Diagnostics; using System.Timers; namespace GHelper { public partial class SettingsForm : RForm { ContextMenuStrip contextMenuStrip = new CustomContextMenu(); ToolStripMenuItem menuEco, menuStandard, menuUltimate, menuOptimized; public GPUModeControl gpuControl; public AllyControl allyControl; AutoUpdateControl updateControl; AsusMouseSettings? mouseSettings; public AniMatrixControl matrixControl; public static System.Timers.Timer sensorTimer = default!; public Matrix? matrixForm; public Fans? fansForm; public Extra? extraForm; public Updates? updatesForm; public Handheld? handheldForm; static long lastRefresh; static long lastBatteryRefresh; static long lastLostFocus; bool isGpuSection = true; bool batteryMouseOver = false; bool batteryFullMouseOver = false; bool sliderGammaIgnore = false; bool activateCheck = false; public SettingsForm() { InitializeComponent(); InitTheme(true); gpuControl = new GPUModeControl(this); updateControl = new AutoUpdateControl(this); matrixControl = new AniMatrixControl(this); allyControl = new AllyControl(this); buttonSilent.Text = Properties.Strings.Silent; buttonBalanced.Text = Properties.Strings.Balanced; buttonTurbo.Text = Properties.Strings.Turbo; buttonFans.Text = Properties.Strings.FansPower; buttonEco.Text = Properties.Strings.EcoMode; buttonUltimate.Text = Properties.Strings.UltimateMode; buttonStandard.Text = Properties.Strings.StandardMode; buttonOptimized.Text = Properties.Strings.Optimized; buttonStopGPU.Text = Properties.Strings.StopGPUApps; buttonScreenAuto.Text = Properties.Strings.AutoMode; buttonMiniled.Text = Properties.Strings.Multizone; buttonKeyboardColor.Text = Properties.Strings.Color; buttonKeyboard.Text = Properties.Strings.Extra; labelPerf.Text = Properties.Strings.PerformanceMode; labelGPU.Text = Properties.Strings.GPUMode; labelSreen.Text = Properties.Strings.LaptopScreen; labelKeyboard.Text = Properties.Strings.LaptopKeyboard; labelMatrix.Text = Properties.Strings.AnimeMatrix; labelBatteryTitle.Text = Properties.Strings.BatteryChargeLimit; checkMatrix.Text = Properties.Strings.TurnOffOnBattery; checkMatrixLid.Text = Properties.Strings.DisableOnLidClose; checkStartup.Text = Properties.Strings.RunOnStartup; buttonMatrix.Text = Properties.Strings.PictureGif; buttonQuit.Text = Properties.Strings.Quit; buttonUpdates.Text = Properties.Strings.Updates; buttonDonate.Text = Properties.Strings.Donate; buttonController.Text = Properties.Strings.Controller; labelAlly.Text = Properties.Strings.AllyController; // Accessible Labels panelMatrix.AccessibleName = Properties.Strings.AnimeMatrix; sliderBattery.AccessibleName = Properties.Strings.BatteryChargeLimit; buttonQuit.AccessibleName = Properties.Strings.Quit; buttonUpdates.AccessibleName = Properties.Strings.BiosAndDriverUpdates; panelPerformance.AccessibleName = Properties.Strings.PerformanceMode; buttonSilent.AccessibleName = Properties.Strings.Silent; buttonBalanced.AccessibleName = Properties.Strings.Balanced; buttonTurbo.AccessibleName = Properties.Strings.Turbo; buttonFans.AccessibleName = Properties.Strings.FansAndPower; panelGPU.AccessibleName = Properties.Strings.GPUMode; buttonEco.AccessibleName = Properties.Strings.EcoMode; buttonStandard.AccessibleName = Properties.Strings.StandardMode; buttonOptimized.AccessibleName = Properties.Strings.Optimized; buttonUltimate.AccessibleName = Properties.Strings.UltimateMode; panelScreen.AccessibleName = Properties.Strings.LaptopScreen; buttonScreenAuto.AccessibleName = Properties.Strings.AutoMode; //button60Hz.AccessibleName = "60Hz Refresh Rate"; //button120Hz.AccessibleName = "Maximum Refresh Rate"; panelKeyboard.AccessibleName = Properties.Strings.LaptopKeyboard; buttonKeyboard.AccessibleName = Properties.Strings.ExtraSettings; buttonKeyboardColor.AccessibleName = Properties.Strings.LaptopKeyboard + " " + Properties.Strings.Color; comboKeyboard.AccessibleName = Properties.Strings.LaptopBacklight; FormClosing += SettingsForm_FormClosing; Deactivate += SettingsForm_LostFocus; Activated += SettingsForm_Focused; buttonSilent.BorderColor = colorEco; buttonBalanced.BorderColor = colorStandard; buttonTurbo.BorderColor = colorTurbo; buttonFans.BorderColor = colorCustom; buttonEco.BorderColor = colorEco; buttonStandard.BorderColor = colorStandard; buttonUltimate.BorderColor = colorTurbo; buttonOptimized.BorderColor = colorEco; buttonXGM.BorderColor = colorTurbo; button60Hz.BorderColor = colorGray; button120Hz.BorderColor = colorGray; buttonScreenAuto.BorderColor = colorGray; buttonMiniled.BorderColor = colorTurbo; buttonEnergySaver.BackColor = colorEco; buttonEnergySaver.ForeColor = SystemColors.ControlLightLight; buttonEnergySaver.Click += ButtonEnergySaver_Click; buttonAmdOled.BackColor = colorTurbo; buttonAmdOled.ForeColor = SystemColors.ControlLightLight; buttonAmdOled.Click += ButtonAmdOled_Click; buttonArmoury.BackColor = colorTurbo; buttonArmoury.ForeColor = SystemColors.ControlLightLight; buttonArmoury.Click += ButtonArmoury_Click; buttonSilent.Click += ButtonSilent_Click; buttonBalanced.Click += ButtonBalanced_Click; buttonTurbo.Click += ButtonTurbo_Click; buttonEco.Click += ButtonEco_Click; buttonStandard.Click += ButtonStandard_Click; buttonUltimate.Click += ButtonUltimate_Click; buttonOptimized.Click += ButtonOptimized_Click; buttonStopGPU.Click += ButtonStopGPU_Click; VisibleChanged += SettingsForm_VisibleChanged; button60Hz.Click += Button60Hz_Click; button120Hz.Click += Button120Hz_Click; buttonScreenAuto.Click += ButtonScreenAuto_Click; buttonMiniled.Click += ButtonMiniled_Click; buttonFHD.Click += ButtonFHD_Click; buttonHDRControl.Click += ButtonHDRControl_Click; buttonQuit.Click += ButtonQuit_Click; buttonKeyboardColor.Click += ButtonKeyboardColor_Click; buttonFans.Click += ButtonFans_Click; buttonKeyboard.Click += ButtonKeyboard_Click; buttonController.Click += ButtonHandheld_Click; pictureColor.Click += PictureColor_Click; pictureColor2.Click += PictureColor2_Click; labelCPUFan.Click += LabelCPUFan_Click; labelGPUFan.Click += LabelCPUFan_Click; comboMatrix.DropDownStyle = ComboBoxStyle.DropDownList; comboMatrixRunning.DropDownStyle = ComboBoxStyle.DropDownList; comboInterval.DropDownStyle = ComboBoxStyle.DropDownList; comboMatrix.DropDownClosed += ComboMatrix_SelectedValueChanged; comboMatrixRunning.DropDownClosed += ComboMatrixRunning_SelectedValueChanged; comboInterval.DropDownClosed += ComboInterval_DropDownClosed; buttonMatrix.Click += ButtonMatrix_Click; checkStartup.Checked = Startup.IsScheduled(); checkStartup.CheckedChanged += CheckStartup_CheckedChanged; labelVersion.Click += LabelVersion_Click; labelVersion.ForeColor = Color.FromArgb(128, Color.Gray); buttonOptimized.MouseMove += ButtonOptimized_MouseHover; buttonOptimized.MouseLeave += ButtonGPU_MouseLeave; buttonEco.MouseMove += ButtonEco_MouseHover; buttonEco.MouseLeave += ButtonGPU_MouseLeave; buttonStandard.MouseMove += ButtonStandard_MouseHover; buttonStandard.MouseLeave += ButtonGPU_MouseLeave; buttonUltimate.MouseMove += ButtonUltimate_MouseHover; buttonUltimate.MouseLeave += ButtonGPU_MouseLeave; tableGPU.MouseMove += ButtonXGM_MouseMove; tableGPU.MouseLeave += ButtonGPU_MouseLeave; buttonXGM.Click += ButtonXGM_Click; buttonScreenAuto.MouseMove += ButtonScreenAuto_MouseHover; buttonScreenAuto.MouseLeave += ButtonScreen_MouseLeave; button60Hz.MouseMove += Button60Hz_MouseHover; button60Hz.MouseLeave += ButtonScreen_MouseLeave; button120Hz.MouseMove += Button120Hz_MouseHover; button120Hz.MouseLeave += ButtonScreen_MouseLeave; buttonFHD.MouseMove += ButtonFHD_MouseHover; buttonFHD.MouseLeave += ButtonScreen_MouseLeave; buttonUpdates.Click += ButtonUpdates_Click; sliderBattery.MouseUp += SliderBattery_MouseUp; sliderBattery.KeyUp += SliderBattery_KeyUp; sliderBattery.ValueChanged += SliderBattery_ValueChanged; sensorTimer = new System.Timers.Timer(AppConfig.Get("sensor_timer", 1000)); sensorTimer.Elapsed += OnTimedEvent; sensorTimer.Enabled = true; labelCharge.MouseEnter += PanelBattery_MouseEnter; labelCharge.MouseLeave += PanelBattery_MouseLeave; labelBattery.Click += LabelBattery_Click; buttonPeripheral1.Click += ButtonPeripheral_Click; buttonPeripheral2.Click += ButtonPeripheral_Click; buttonPeripheral3.Click += ButtonPeripheral_Click; buttonPeripheral1.MouseEnter += ButtonPeripheral_MouseEnter; buttonPeripheral2.MouseEnter += ButtonPeripheral_MouseEnter; buttonPeripheral3.MouseEnter += ButtonPeripheral_MouseEnter; buttonBatteryFull.MouseEnter += ButtonBatteryFull_MouseEnter; buttonBatteryFull.MouseLeave += ButtonBatteryFull_MouseLeave; buttonBatteryFull.Click += ButtonBatteryFull_Click; buttonControllerMode.Click += ButtonControllerMode_Click; buttonBacklight.Click += ButtonBacklight_Click; buttonFPS.Click += ButtonFPS_Click; buttonOverlay.Click += ButtonOverlay_Click; buttonAutoTDP.Click += ButtonAutoTDP_Click; buttonAutoTDP.BorderColor = colorTurbo; Text = "G-Helper " + (ProcessHelper.IsUserAdministrator() ? "—" : "-") + " " + AppConfig.GetModelShort(); TopMost = AppConfig.Is("topmost"); //This will auto position the window again when it resizes. Might mess with position if people drag the window somewhere else. this.Resize += SettingsForm_Resize; VisualiseFnLock(); buttonFnLock.Click += ButtonFnLock_Click; labelVisual.Click += LabelVisual_Click; labelCharge.Click += LabelCharge_Click; buttonDonate.Click += ButtonDonate_Click; int click = AppConfig.Get("donate_click"); int startCount = AppConfig.Get("start_count"); if (startCount >= ((click < 10) ? 10 : click + 50)) { buttonDonate.BorderColor = colorTurbo; buttonDonate.Badge = Math.Clamp((startCount - click) / 50, 1, 9); } labelBacklight.ForeColor = colorStandard; labelBacklight.Click += LabelBacklight_Click; panelPerformance.Focus(); InitVisual(); } private void ButtonArmoury_Click(object? sender, EventArgs e) { var dialogResult = MessageBox.Show(this, "Armoury Crate is active, download official uninstaller app?", "Armoury Crate", MessageBoxButtons.YesNo); if (dialogResult == DialogResult.Yes) AsusService.RunArmouryUninstaller(); } private void ButtonAmdOled_Click(object? sender, EventArgs e) { AmdDisplay.RunAdrenaline(); activateCheck = true; } private void LabelBattery_Click(object? sender, EventArgs e) { HardwareControl.chargeWatt = !HardwareControl.chargeWatt; RefreshSensors(true); } private void ButtonEnergySaver_Click(object? sender, EventArgs e) { KeyboardHook.KeyKeyPress(Keys.LWin, Keys.A); activateCheck = true; } private void ButtonDonate_Click(object? sender, EventArgs e) { AppConfig.Set("donate_click", AppConfig.Get("start_count")); buttonDonate.Badge = 0; Process.Start(new ProcessStartInfo("https://g-helper.com/support") { UseShellExecute = true }); } private void LabelBacklight_Click(object? sender, EventArgs e) { if (AppConfig.IsDynamicLighting() && DynamicLightingHelper.IsEnabled()) DynamicLightingHelper.OpenSettings(); } private void ButtonFHD_Click(object? sender, EventArgs e) { ScreenControl.ToogleFHD(); } private void ButtonHDRControl_Click(object? sender, EventArgs e) { ScreenControl.ToogleHDRControl(); } private void SliderBattery_ValueChanged(object? sender, EventArgs e) { VisualiseBatteryTitle(sliderBattery.Value); } private void SliderBattery_KeyUp(object? sender, KeyEventArgs e) { BatteryControl.SetBatteryChargeLimit(sliderBattery.Value); } private void SliderBattery_MouseUp(object? sender, MouseEventArgs e) { BatteryControl.SetBatteryChargeLimit(sliderBattery.Value); } private void ButtonAutoTDP_Click(object? sender, EventArgs e) { allyControl.ToggleAutoTDP(); } private void LabelCharge_Click(object? sender, EventArgs e) { BatteryControl.BatteryReport(); } private void LabelVisual_Click(object? sender, EventArgs e) { labelVisual.Visible = false; VisualControl.forceVisual = true; } public void InitVisual() { if (AppConfig.Is("hide_visual")) return; if (AppConfig.IsOLED()) { panelGamma.Visible = true; sliderGamma.Visible = true; labelGammaTitle.Text = Properties.Strings.FlickerFreeDimming + " / " + Properties.Strings.VisualMode; VisualiseBrightness(); sliderGamma.ValueChanged += SliderGamma_ValueChanged; sliderGamma.MouseUp += SliderGamma_ValueChanged; } else { labelGammaTitle.Text = Properties.Strings.VisualMode; } var gamuts = VisualControl.GetGamutModes(); // Color profiles exist if (gamuts.Count > 0) { tableVisual.ColumnCount = 3; buttonInstallColor.Visible = false; } else { // If it's possible to retrieve color profiles if (ColorProfileHelper.ProfileExists()) { tableVisual.ColumnCount = 2; buttonInstallColor.Text = Properties.Strings.DownloadColorProfiles; buttonInstallColor.Visible = true; buttonInstallColor.Click += ButtonInstallColorProfile_Click; panelGamma.Visible = true; tableVisual.Visible = true; } return; } panelGamma.Visible = true; tableVisual.Visible = true; var visualValue = (SplendidCommand)AppConfig.Get("visual", (int)VisualControl.GetDefaultVisualMode()); var colorTempValue = AppConfig.Get("color_temp", VisualControl.DefaultColorTemp); comboVisual.DropDownStyle = ComboBoxStyle.DropDownList; comboVisual.DataSource = new BindingSource(VisualControl.GetVisualModes(), null); comboVisual.DisplayMember = "Value"; comboVisual.ValueMember = "Key"; comboVisual.SelectedValue = visualValue; comboColorTemp.DropDownStyle = ComboBoxStyle.DropDownList; comboColorTemp.DataSource = new BindingSource(VisualControl.GetTemperatures(), null); comboColorTemp.DisplayMember = "Value"; comboColorTemp.ValueMember = "Key"; comboColorTemp.SelectedValue = colorTempValue; VisualControl.SetVisual(visualValue, colorTempValue, true); comboVisual.SelectedValueChanged += ComboVisual_SelectedValueChanged; comboVisual.Visible = true; VisualiseDisabled(); comboColorTemp.SelectedValueChanged += ComboVisual_SelectedValueChanged; comboColorTemp.Visible = true; if (gamuts.Count <= 1) return; comboGamut.DropDownStyle = ComboBoxStyle.DropDownList; comboGamut.DataSource = new BindingSource(gamuts, null); comboGamut.DisplayMember = "Value"; comboGamut.ValueMember = "Key"; comboGamut.SelectedValue = (SplendidGamut)AppConfig.Get("gamut", (int)VisualControl.GetDefaultGamut()); comboGamut.SelectedValueChanged += ComboGamut_SelectedValueChanged; comboGamut.Visible = true; } public void CycleVisualMode(int delta) { if (comboVisual.Items.Count < 1) return; if (delta > 0) { if (comboVisual.SelectedIndex < comboVisual.Items.Count - 1) comboVisual.SelectedIndex += 1; else comboVisual.SelectedIndex = 0; } else { if (comboVisual.SelectedIndex > 0) comboVisual.SelectedIndex -= 1; else comboVisual.SelectedIndex = comboVisual.Items.Count - 1; } Program.toast.RunToast(comboVisual.GetItemText(comboVisual.SelectedItem), ToastIcon.BrightnessUp); } private async void ButtonInstallColorProfile_Click(object? sender, EventArgs e) { await ColorProfileHelper.InstallProfile(); InitVisual(); } private void ComboGamut_SelectedValueChanged(object? sender, EventArgs e) { VisualControl.SetGamut((int)comboGamut.SelectedValue); } private void ComboVisual_SelectedValueChanged(object? sender, EventArgs e) { VisualControl.SetVisual((SplendidCommand)comboVisual.SelectedValue, (int)comboColorTemp.SelectedValue); VisualiseDisabled(); } public void VisualiseBrightness() { Invoke(delegate { sliderGammaIgnore = true; sliderGamma.Value = VisualControl.GetBrightness(); labelGamma.Text = sliderGamma.Value + "%"; sliderGammaIgnore = false; }); } public void VisualiseAmdOled(bool status = false) { Invoke(delegate { buttonAmdOled.Visible = status; }); } public void VisualiseArmoury(bool status = false) { Invoke(delegate { buttonArmoury.Visible = status; }); } public void VisualiseDisabled() { comboGamut.Enabled = comboColorTemp.Enabled = (SplendidCommand)AppConfig.Get("visual") != SplendidCommand.Disabled; } public void VisualiseGamut() { Invoke(delegate { if (comboGamut.Items.Count > 0) comboGamut.SelectedIndex = 0; }); } private void SliderGamma_ValueChanged(object? sender, EventArgs e) { if (sliderGammaIgnore) return; VisualControl.SetBrightness(sliderGamma.Value); } private void ButtonOverlay_Click(object? sender, EventArgs e) { KeyboardHook.KeyKeyKeyPress(Keys.LControlKey, Keys.LShiftKey, Keys.O); } private void ButtonHandheld_Click(object? sender, EventArgs e) { if (handheldForm == null || handheldForm.Text == "") { handheldForm = new Handheld(); AddOwnedForm(handheldForm); } if (handheldForm.Visible) { handheldForm.Close(); } else { //handheldForm.FormPosition(); handheldForm.Show(); } } private void ButtonFPS_Click(object? sender, EventArgs e) { allyControl.ToggleFPSLimit(); } private void ButtonBacklight_Click(object? sender, EventArgs e) { allyControl.ToggleBacklight(); } private void ButtonControllerMode_Click(object? sender, EventArgs e) { allyControl.ToggleMode(); } public void VisualiseAlly(bool visible = false) { if (!visible) return; panelAlly.Visible = true; panelKeyboardTitle.Visible = false; panelKeyboard.Padding = new Padding(panelKeyboard.Padding.Left, 0, panelKeyboard.Padding.Right, panelKeyboard.Padding.Bottom); tableAMD.Visible = true; } public void VisualiseController(ControllerMode mode) { switch (mode) { case ControllerMode.Gamepad: buttonControllerMode.Text = "Gamepad"; break; case ControllerMode.Mouse: buttonControllerMode.Text = "Mouse"; break; case ControllerMode.Skip: buttonControllerMode.Text = "Skip"; break; default: buttonControllerMode.Text = "Auto"; break; } } public void VisualiseBacklight(int backlight) { buttonBacklight.Text = Math.Round((double)backlight * 33.33).ToString() + "%"; } public void VisualiseFPSLimit(int limit) { buttonFPS.Text = "FPS Limit " + ((limit > 0 && limit <= 120) ? limit : "OFF"); } public void VisualiseAutoTDP(bool status) { Logger.WriteLine($"Auto TDP: {status}"); buttonAutoTDP.Activated = status; } private void SettingsForm_Focused(object? sender, EventArgs e) { if (activateCheck) { buttonEnergySaver.Visible = PowerNative.GetBatterySaverStatus(); buttonAmdOled.Visible = AmdDisplay.IsOledPowerOptimization(); activateCheck = false; } } private void SettingsForm_LostFocus(object? sender, EventArgs e) { lastLostFocus = DateTimeOffset.Now.ToUnixTimeMilliseconds(); } private void ButtonBatteryFull_Click(object? sender, EventArgs e) { BatteryControl.ToggleBatteryLimitFull(); } private void ButtonBatteryFull_MouseLeave(object? sender, EventArgs e) { batteryFullMouseOver = false; RefreshSensors(true); } private void ButtonBatteryFull_MouseEnter(object? sender, EventArgs e) { batteryFullMouseOver = true; labelCharge.Text = Properties.Strings.BatteryLimitFull; } private void SettingsForm_Resize(object? sender, EventArgs e) { Left = Screen.FromControl(this).WorkingArea.Width - 10 - Width; Top = Screen.FromControl(this).WorkingArea.Height - 10 - Height; } private void PanelBattery_MouseEnter(object? sender, EventArgs e) { batteryMouseOver = true; ShowBatteryWear(); } private void PanelBattery_MouseLeave(object? sender, EventArgs e) { batteryMouseOver = false; RefreshSensors(true); } private void ShowBatteryWear() { //Refresh again only after 15 Minutes since the last refresh if (lastBatteryRefresh == 0 || Math.Abs(DateTimeOffset.Now.ToUnixTimeMilliseconds() - lastBatteryRefresh) > 15 * 60_000) { lastBatteryRefresh = DateTimeOffset.Now.ToUnixTimeMilliseconds(); HardwareControl.RefreshBatteryHealth(); } if (HardwareControl.batteryHealth != -1) { labelCharge.Text = Properties.Strings.BatteryHealth + ": " + Math.Round(HardwareControl.batteryHealth, 1) + "%"; } } private void SettingsForm_VisibleChanged(object? sender, EventArgs e) { sensorTimer.Enabled = this.Visible; if (this.Visible) { ScreenControl.InitScreen(); VisualizeXGM(); buttonEnergySaver.Visible = PowerNative.GetBatterySaverStatus(); Task.Run((Action)RefreshPeripheralsBattery); updateControl.CheckForUpdates(); } } private void RefreshPeripheralsBattery() { PeripheralsProvider.RefreshBatteryForAllDevices(true); } private void ButtonUpdates_Click(object? sender, EventArgs e) { if (updatesForm == null || updatesForm.Text == "") { updatesForm = new Updates(); AddOwnedForm(updatesForm); } if (updatesForm.Visible) { updatesForm.Close(); } else { updatesForm.Show(); } } public void VisualiseMatrixPicture(string image) { if (matrixForm == null || matrixForm.Text == "") return; matrixForm.VisualiseMatrix(image); } protected override void WndProc(ref Message m) { if (m.Msg == NativeMethods.WM_POWERBROADCAST && m.WParam == (IntPtr)NativeMethods.PBT_POWERSETTINGCHANGE) { var settings = (NativeMethods.POWERBROADCAST_SETTING)m.GetLParam(typeof(NativeMethods.POWERBROADCAST_SETTING)); if (settings.PowerSetting == NativeMethods.PowerSettingGuid.LIDSWITCH_STATE_CHANGE) { switch (settings.Data) { case 0: Logger.WriteLine("Lid Closed"); InputDispatcher.lidClose = AniMatrixControl.lidClose = true; Aura.ApplyBrightness(0, "Lid"); matrixControl.SetLidMode(); break; case 1: Logger.WriteLine("Lid Open"); InputDispatcher.InitFNLock(); InputDispatcher.lidClose = AniMatrixControl.lidClose = false; Aura.ApplyBrightness(InputDispatcher.GetBacklight(), "Lid"); matrixControl.SetLidMode(); break; } } else { switch (settings.Data) { case 0: Logger.WriteLine("Monitor Power Off"); Aura.SleepBrightness(); break; case 1: Logger.WriteLine("Monitor Power On"); if (!Program.SetAutoModes(wakeup: true)) BatteryControl.AutoBattery(); break; case 2: Logger.WriteLine("Monitor Dimmed"); break; } } m.Result = (IntPtr)1; } if (m.Msg == Program.WM_TASKBARCREATED) { Logger.WriteLine("Taskbar created, re-creating tray icon"); if (Program.trayIcon is not null) Program.trayIcon.Visible = true; } try { base.WndProc(ref m); } catch (Exception ex) { Debug.WriteLine(ex.ToString()); } } public void SetContextMenu() { var currentMode = Modes.GetCurrent(); foreach (ToolStripItem item in contextMenuStrip.Items.Cast().ToList()) { if (item is ToolStripMenuItem menuItem) menuItem.Dispose(); } contextMenuStrip.Items.Clear(); contextMenuStrip.ShowCheckMargin = true; contextMenuStrip.ImageScalingSize = new Size(16, 16); contextMenuStrip.ShowImageMargin = false; Padding padding = new Padding(15, 5, 5, 5); var title = new ToolStripMenuItem(Properties.Strings.PerformanceMode); title.Margin = padding; title.Enabled = false; contextMenuStrip.Items.Add(title); foreach (var mode in Modes.GetDictonary()) { var menuMode = new ToolStripMenuItem(mode.Value); menuMode.Tag = mode.Key; menuMode.Click += (sender, args) => { Program.modeControl.SetPerformanceMode(mode.Key); }; menuMode.Margin = padding; menuMode.Checked = (mode.Key == currentMode); contextMenuStrip.Items.Add(menuMode); } contextMenuStrip.Items.Add("-"); if (isGpuSection) { var titleGPU = new ToolStripMenuItem(Properties.Strings.GPUMode); titleGPU.Margin = padding; titleGPU.Enabled = false; contextMenuStrip.Items.Add(titleGPU); menuEco = new ToolStripMenuItem(Properties.Strings.EcoMode); menuEco.Click += ButtonEco_Click; menuEco.Margin = padding; contextMenuStrip.Items.Add(menuEco); menuStandard = new ToolStripMenuItem(Properties.Strings.StandardMode); menuStandard.Click += ButtonStandard_Click; menuStandard.Margin = padding; contextMenuStrip.Items.Add(menuStandard); menuUltimate = new ToolStripMenuItem(Properties.Strings.UltimateMode); menuUltimate.Click += ButtonUltimate_Click; menuUltimate.Margin = padding; contextMenuStrip.Items.Add(menuUltimate); menuOptimized = new ToolStripMenuItem(Properties.Strings.Optimized); menuOptimized.Click += ButtonOptimized_Click; menuOptimized.Margin = padding; contextMenuStrip.Items.Add(menuOptimized); contextMenuStrip.Items.Add("-"); } var quit = new ToolStripMenuItem(Properties.Strings.Quit); quit.Click += ButtonQuit_Click; quit.Margin = padding; contextMenuStrip.Items.Add(quit); //contextMenuStrip.ShowCheckMargin = true; contextMenuStrip.RenderMode = ToolStripRenderMode.System; InitContextMenuTheme(); if (Program.trayIcon is not null) Program.trayIcon.ContextMenuStrip = contextMenuStrip; } public void InitContextMenuTheme() { if (contextMenuStrip is not null) { contextMenuStrip.BackColor = this.BackColor; contextMenuStrip.ForeColor = this.ForeColor; } } private void ButtonXGM_Click(object? sender, EventArgs e) { gpuControl.ToggleXGM(); } public void SetVersionLabel(string label, bool update = false) { if (InvokeRequired) Invoke(delegate { labelVersion.Text = label; if (update) labelVersion.ForeColor = colorTurbo; }); else { labelVersion.Text = label; if (update) labelVersion.ForeColor = colorTurbo; } } private void LabelVersion_Click(object? sender, EventArgs e) { updateControl.Update(); } private static void OnTimedEvent(Object? source, ElapsedEventArgs? e) { Program.settingsForm.RefreshSensors(); } private void ButtonFHD_MouseHover(object? sender, EventArgs e) { labelTipScreen.Text = "Switch to " + ((buttonFHD.Text == "FHD") ? "UHD" : "FHD") + " Mode"; } private void Button120Hz_MouseHover(object? sender, EventArgs e) { labelTipScreen.Text = Properties.Strings.MaxRefreshTooltip; } private void Button60Hz_MouseHover(object? sender, EventArgs e) { labelTipScreen.Text = Properties.Strings.MinRefreshTooltip.Replace("60", ScreenControl.MIN_RATE.ToString()); } private void ButtonScreen_MouseLeave(object? sender, EventArgs e) { labelTipScreen.Text = ""; } private void ButtonScreenAuto_MouseHover(object? sender, EventArgs e) { labelTipScreen.Text = Properties.Strings.AutoRefreshTooltip.Replace("60", ScreenControl.MIN_RATE.ToString()); } private void ButtonUltimate_MouseHover(object? sender, EventArgs e) { labelTipGPU.Text = Properties.Strings.UltimateGPUTooltip; } private void ButtonStandard_MouseHover(object? sender, EventArgs e) { labelTipGPU.Text = Properties.Strings.StandardGPUTooltip; } private void ButtonEco_MouseHover(object? sender, EventArgs e) { labelTipGPU.Text = Properties.Strings.EcoGPUTooltip; } private void ButtonOptimized_MouseHover(object? sender, EventArgs e) { labelTipGPU.Text = Properties.Strings.OptimizedGPUTooltip; } private void ButtonGPU_MouseLeave(object? sender, EventArgs e) { labelTipGPU.Text = ""; } private void ButtonXGM_MouseMove(object? sender, MouseEventArgs e) { if (sender is null) return; TableLayoutPanel table = (TableLayoutPanel)sender; if (!buttonXGM.Visible) return; labelTipGPU.Text = buttonXGM.Bounds.Contains(table.PointToClient(Cursor.Position)) ? "XGMobile toggle works only in Standard mode" : ""; } private void ButtonScreenAuto_Click(object? sender, EventArgs e) { AppConfig.Set("screen_auto", 1); ScreenControl.AutoScreen(); } private void CheckStartup_CheckedChanged(object? sender, EventArgs e) { if (sender is null) return; CheckBox chk = (CheckBox)sender; if (chk.Checked) Startup.Schedule(); else Startup.UnSchedule(); } private void CheckMatrix_CheckedChanged(object? sender, EventArgs e) { AppConfig.Set("matrix_auto", checkMatrix.Checked ? 1 : 0); matrixControl.SetBatteryAuto(); } private void CheckMatrixLid_CheckedChanged(object? sender, EventArgs e) { AppConfig.Set("matrix_lid", checkMatrixLid.Checked ? 1 : 0); matrixControl.SetLidMode(true); } private void ButtonMatrix_Click(object? sender, EventArgs e) { if (matrixForm == null || matrixForm.Text == "") { matrixForm = new Matrix(); AddOwnedForm(matrixForm); } if (matrixForm.Visible) { matrixForm.Close(); } else { matrixForm.FormPosition(); matrixForm.Show(); } } public void VisualiseMatrixRunning(int mode) { Invoke(delegate { comboMatrixRunning.SelectedIndex = mode; if (comboMatrix.SelectedIndex == 0) comboMatrix.SelectedIndex = 3; }); } private void ComboInterval_DropDownClosed(object? sender, EventArgs e) { AppConfig.Set("matrix_interval", comboInterval.SelectedIndex); matrixControl.SetDevice(); } private void ComboMatrixRunning_SelectedValueChanged(object? sender, EventArgs e) { AppConfig.Set("matrix_running", comboMatrixRunning.SelectedIndex); matrixControl.SetDevice(); } private void ComboMatrix_SelectedValueChanged(object? sender, EventArgs e) { AppConfig.Set("matrix_brightness", comboMatrix.SelectedIndex); matrixControl.SetDevice(); } private void LabelCPUFan_Click(object? sender, EventArgs e) { FanSensorControl.fanRpm = !FanSensorControl.fanRpm; RefreshSensors(true); } private void PictureColor2_Click(object? sender, EventArgs e) { SetColorPicker("aura_color2"); } private void PictureColor_Click(object? sender, EventArgs e) { buttonKeyboardColor.PerformClick(); } private void ButtonKeyboard_Click(object? sender, EventArgs e) { if (extraForm == null || extraForm.Text == "") { extraForm = new Extra(); AddOwnedForm(extraForm); } if (extraForm.Visible) { extraForm.Close(); } else { extraForm.Show(); } } public void FansInit() { if (fansForm == null || fansForm.Text == "") return; Invoke(fansForm.InitAll); } public void GPUInit() { if (fansForm == null || fansForm.Text == "") return; Invoke(fansForm.InitGPU); } public void FansToggle(int index = 0) { if (fansForm == null || fansForm.Text == "") { fansForm = new Fans(); AddOwnedForm(fansForm); } if (fansForm.Visible) { fansForm.Close(); } else { fansForm.FormPosition(); fansForm.Show(); fansForm.ToggleNavigation(index); } } private void ButtonFans_Click(object? sender, EventArgs e) { FansToggle(); } private void SetColorPicker(string colorField = "aura_color") { ColorDialog colorDlg = new ColorDialog(); colorDlg.AllowFullOpen = true; colorDlg.Color = pictureColor.BackColor; try { colorDlg.CustomColors = AppConfig.GetString("aura_color_custom", "").Split('-').Select(int.Parse).ToArray(); } catch (Exception ex) { } if (colorDlg.ShowDialog() == DialogResult.OK) { AppConfig.Set("aura_color_custom", string.Join("-", colorDlg.CustomColors)); AppConfig.Set(colorField, colorDlg.Color.ToArgb()); SetAura(); } } private void ButtonKeyboardColor_Click(object? sender, EventArgs e) { SetColorPicker("aura_color"); } public void InitAura() { Aura.Mode = (AuraMode)AppConfig.Get("aura_mode"); Aura.Speed = (AuraSpeed)AppConfig.Get("aura_speed"); Aura.SetColor(AppConfig.Get("aura_color")); Aura.SetColor2(AppConfig.Get("aura_color2")); comboKeyboard.DropDownStyle = ComboBoxStyle.DropDownList; comboKeyboard.DataSource = new BindingSource(Aura.GetModes(), null); comboKeyboard.DisplayMember = "Value"; comboKeyboard.ValueMember = "Key"; comboKeyboard.SelectedValue = Aura.Mode; comboKeyboard.SelectedValueChanged += ComboKeyboard_SelectedValueChanged; if (AppConfig.IsSingleColor()) { panelColor.Visible = false; } if (AppConfig.NoAura()) { comboKeyboard.Visible = false; } VisualiseAura(); } public void SetAura() { Task.Run(() => { Aura.ApplyAura(); VisualiseAura(); }); } private void _VisualiseAura() { pictureColor.BackColor = Aura.Color1; pictureColor2.BackColor = Aura.Color2; pictureColor2.Visible = Aura.HasSecondColor(); bool dynamic = AppConfig.IsDynamicLighting() && DynamicLightingHelper.IsEnabled() && !AppConfig.IsDynamicLightingOnly(); if (dynamic) { labelBacklight.Cursor = Cursors.Hand; labelBacklight.Text = Strings.DisableDynamicLighting; } else if (Aura.Mode == AuraMode.AMBIENT) { labelBacklight.Cursor = Cursors.Default; labelBacklight.Text = Strings.AmbientModeResources; } else { labelBacklight.Cursor = Cursors.Default; labelBacklight.Text = ""; } } public void VisualiseAura() { if (InvokeRequired) Invoke(_VisualiseAura); else _VisualiseAura(); } public void InitMatrix() { if (!matrixControl.IsValid) { panelMatrix.Visible = false; return; } if (matrixControl.IsSlash) { labelMatrix.Text = "Slash Lighting"; comboMatrixRunning.Items.Clear(); foreach (var item in SlashDevice.Modes) { comboMatrixRunning.Items.Add(item.Value); } comboInterval.Visible = true; comboInterval.Items.Add(Properties.Strings.IntervalOff); for (int i = 1; i <= 5; i++) comboInterval.Items.Add(string.Format(Properties.Strings.IntervalSeconds, i)); buttonMatrix.Visible = false; } comboMatrix.SelectedIndex = Math.Max(0, Math.Min(AppConfig.Get("matrix_brightness", 0), comboMatrix.Items.Count - 1)); comboMatrixRunning.SelectedIndex = Math.Min(AppConfig.Get("matrix_running", 0), comboMatrixRunning.Items.Count - 1); comboInterval.SelectedIndex = Math.Min(AppConfig.Get("matrix_interval", 0), comboInterval.Items.Count - 1); checkMatrix.Checked = AppConfig.Is("matrix_auto"); checkMatrix.CheckedChanged += CheckMatrix_CheckedChanged; checkMatrixLid.Checked = AppConfig.Is("matrix_lid"); checkMatrixLid.CheckedChanged += CheckMatrixLid_CheckedChanged; } public void CycleMatrix(int delta) { comboMatrix.SelectedIndex = Math.Min(Math.Max(0, comboMatrix.SelectedIndex + delta), comboMatrix.Items.Count - 1); AppConfig.Set("matrix_brightness", comboMatrix.SelectedIndex); matrixControl.SetDevice(); Program.toast.RunToast(comboMatrix.GetItemText(comboMatrix.SelectedItem), delta > 0 ? ToastIcon.BacklightUp : ToastIcon.BacklightDown); } public void CycleAuraMode(int delta) { if (delta > 0) { if (comboKeyboard.SelectedIndex < comboKeyboard.Items.Count - 1) comboKeyboard.SelectedIndex += 1; else comboKeyboard.SelectedIndex = 0; } else { if (comboKeyboard.SelectedIndex > 0) comboKeyboard.SelectedIndex -= 1; else comboKeyboard.SelectedIndex = comboKeyboard.Items.Count - 1; } Program.toast.RunToast(comboKeyboard.GetItemText(comboKeyboard.SelectedItem), ToastIcon.BacklightUp); } private void ComboKeyboard_SelectedValueChanged(object? sender, EventArgs e) { AppConfig.Set("aura_mode", (int)comboKeyboard.SelectedValue); SetAura(); } private void Button120Hz_Click(object? sender, EventArgs e) { AppConfig.Set("screen_auto", 0); ScreenControl.SetScreen(ScreenControl.MAX_REFRESH, 1); } private void Button60Hz_Click(object? sender, EventArgs e) { AppConfig.Set("screen_auto", 0); ScreenControl.SetScreen(ScreenControl.MIN_RATE, 0); } private void ButtonMiniled_Click(object? sender, EventArgs e) { ScreenControl.ToogleMiniled(); } public void VisualiseScreen(bool screenEnabled, bool screenAuto, int frequency, int maxFrequency, int overdrive, bool overdriveSetting, int miniled1, int miniled2, bool hdr, int fhd, int hdrControl) { ButtonEnabled(button60Hz, screenEnabled); ButtonEnabled(button120Hz, screenEnabled); ButtonEnabled(buttonScreenAuto, screenEnabled); ButtonEnabled(buttonMiniled, screenEnabled); labelSreen.Text = screenEnabled ? Properties.Strings.LaptopScreen + ": " + frequency + "Hz" + ((overdrive == 1) ? " + " + Properties.Strings.Overdrive : "") : Properties.Strings.LaptopScreen + ": " + Properties.Strings.TurnedOff; button60Hz.Activated = false; button120Hz.Activated = false; buttonScreenAuto.Activated = false; if (screenAuto) { buttonScreenAuto.Activated = true; } else if (frequency == ScreenControl.MIN_RATE) { button60Hz.Activated = true; } else if (frequency > ScreenControl.MIN_RATE) { button120Hz.Activated = true; } button60Hz.Text = ScreenControl.MIN_RATE + "Hz"; if (maxFrequency > ScreenControl.MIN_RATE) { button120Hz.Text = maxFrequency.ToString() + "Hz" + (overdriveSetting ? " + OD" : ""); panelScreen.Visible = true; } else if (maxFrequency > 0) { panelScreen.Visible = false; } if (fhd >= 0) { buttonFHD.Visible = true; buttonFHD.Text = fhd > 0 ? "FHD" : "UHD"; } bool hdrControlVisible = (hdr && hdrControl >= 0); if (miniled1 >= 0) { buttonMiniled.Visible = !hdrControlVisible; buttonMiniled.Enabled = !hdr; buttonMiniled.Activated = miniled1 == 1 || hdr; } else if (miniled2 >= 0) { buttonMiniled.Visible = !hdrControlVisible; buttonMiniled.Enabled = !hdr; if (hdr) miniled2 = 1; // Show HDR as Multizone Strong switch (miniled2) { // Multizone On case 0: buttonMiniled.Text = Properties.Strings.Multizone; buttonMiniled.BorderColor = colorStandard; buttonMiniled.Activated = true; break; // Multizone Strong case 1: buttonMiniled.Text = Properties.Strings.MultizoneStrong; buttonMiniled.BorderColor = colorTurbo; buttonMiniled.Activated = true; break; // Multizone Off case 2: buttonMiniled.Text = Properties.Strings.OneZone; buttonMiniled.BorderColor = colorStandard; buttonMiniled.Activated = false; break; } } else { buttonMiniled.Visible = false; } if (hdrControlVisible) { buttonHDRControl.Visible = true; buttonHDRControl.Activated = hdrControl > 0; buttonHDRControl.BorderColor = colorTurbo; } else { buttonHDRControl.Visible = false; } if (hdr) labelVisual.Text = Properties.Strings.VisualModesHDR; if (!screenEnabled) labelVisual.Text = Properties.Strings.VisualModesScreen; if (!screenEnabled || hdr) { labelVisual.Location = tableVisual.Location; labelVisual.Width = tableVisual.Width; labelVisual.Height = tableVisual.Height; labelVisual.Visible = true; } else { labelVisual.Visible = false; } } private void ButtonQuit_Click(object? sender, EventArgs e) { matrixControl.Dispose(); Close(); Program.trayIcon.Visible = false; Application.Exit(); } /// /// Closes all forms except the settings. Hides the settings /// public void HideAll() { this.Hide(); if (fansForm != null && fansForm.Text != "") fansForm.Close(); if (extraForm != null && extraForm.Text != "") extraForm.Close(); if (updatesForm != null && updatesForm.Text != "") updatesForm.Close(); if (matrixForm != null && matrixForm.Text != "") matrixForm.Close(); if (handheldForm != null && handheldForm.Text != "") handheldForm.Close(); if (mouseSettings != null && mouseSettings.Text != "") mouseSettings.Close(); } /// /// Brings all visible windows to the top, with settings being the focus /// public void ShowAll() { this.Activate(); this.TopMost = true; this.TopMost = AppConfig.Is("topmost"); } /// /// Check if any of fans, keyboard, update, or itself has focus /// /// Focus state public bool HasAnyFocus(bool lostFocusCheck = false) { return (fansForm != null && fansForm.ContainsFocus) || (extraForm != null && extraForm.ContainsFocus) || (updatesForm != null && updatesForm.ContainsFocus) || (matrixForm != null && matrixForm.ContainsFocus) || (handheldForm != null && handheldForm.ContainsFocus) || this.ContainsFocus || (lostFocusCheck && Math.Abs(DateTimeOffset.Now.ToUnixTimeMilliseconds() - lastLostFocus) < 300); } private void SettingsForm_FormClosing(object? sender, FormClosingEventArgs e) { if (e.CloseReason == CloseReason.UserClosing) { e.Cancel = true; HideAll(); } } private void ButtonUltimate_Click(object? sender, EventArgs e) { gpuControl.SetGPUMode(AsusACPI.GPUModeUltimate); } private void ButtonStandard_Click(object? sender, EventArgs e) { gpuControl.SetGPUMode(AsusACPI.GPUModeStandard); } private void ButtonEco_Click(object? sender, EventArgs e) { gpuControl.SetGPUMode(AsusACPI.GPUModeEco); } private void ButtonOptimized_Click(object? sender, EventArgs e) { AppConfig.Set("gpu_auto", (AppConfig.Get("gpu_auto") == 1) ? 0 : 1); VisualiseGPUMode(); gpuControl.AutoGPUMode(true); } private void ButtonStopGPU_Click(object? sender, EventArgs e) { gpuControl.KillGPUApps(); } public async void RefreshSensors(bool force = false) { if (!force && Math.Abs(DateTimeOffset.Now.ToUnixTimeMilliseconds() - lastRefresh) < 2000) return; lastRefresh = DateTimeOffset.Now.ToUnixTimeMilliseconds(); string cpuTemp = ""; string gpuTemp = ""; string battery = ""; string charge = ""; HardwareControl.ReadSensors(); Task.Run((Action)PeripheralsProvider.RefreshBatteryForAllDevices); if (HardwareControl.cpuTemp > 0) cpuTemp = ": " + Math.Round((decimal)HardwareControl.cpuTemp).ToString() + "°C"; if (HardwareControl.batteryCapacity > 0) { charge = Properties.Strings.BatteryCharge + ": " + HardwareControl.batteryCharge; } if (HardwareControl.batteryRate < 0) battery = Properties.Strings.Discharging + ": " + Math.Round(-(decimal)HardwareControl.batteryRate, 1).ToString() + "W"; else if (HardwareControl.batteryRate > 0) battery = Properties.Strings.Charging + ": " + Math.Round((decimal)HardwareControl.batteryRate, 1).ToString() + "W"; if (HardwareControl.gpuTemp > 0) { gpuTemp = $": {HardwareControl.gpuTemp}°C"; } string trayTip = "CPU" + cpuTemp + " " + HardwareControl.cpuFan; if (gpuTemp.Length > 0) trayTip += "\nGPU" + gpuTemp + " " + HardwareControl.gpuFan; if (battery.Length > 0) trayTip += "\n" + battery; if (Program.settingsForm.IsHandleCreated) Program.settingsForm.BeginInvoke(delegate { labelCPUFan.Text = "CPU" + cpuTemp + " " + HardwareControl.cpuFan; labelGPUFan.Text = "GPU" + gpuTemp + " " + HardwareControl.gpuFan; if (HardwareControl.gpuFan is not null && AppConfig.NoGpu()) { labelMidFan.Text = "GPU" + gpuTemp + " " + HardwareControl.gpuFan; } if (HardwareControl.midFan is not null) labelMidFan.Text = "Mid " + HardwareControl.midFan; labelBattery.Text = battery; if (!batteryMouseOver && !batteryFullMouseOver) labelCharge.Text = charge; //panelPerformance.AccessibleName = labelPerf.Text + " " + trayTip; }); if (Program.trayIcon is not null) Program.trayIcon.Text = trayTip; } public void LabelFansResult(string text) { if (fansForm != null && fansForm.Text != "") fansForm.LabelFansResult(text); } public void ShowMode(int mode) { if (InvokeRequired) Invoke(delegate { VisualiseMode(mode); }); else VisualiseMode(mode); } protected void VisualiseMode(int mode) { buttonSilent.Activated = false; buttonBalanced.Activated = false; buttonTurbo.Activated = false; buttonFans.Activated = false; switch (mode) { case AsusACPI.PerformanceSilent: buttonSilent.Activated = true; break; case AsusACPI.PerformanceTurbo: buttonTurbo.Activated = true; break; case AsusACPI.PerformanceBalanced: buttonBalanced.Activated = true; break; default: buttonFans.Activated = true; buttonFans.BorderColor = Modes.GetBase(mode) switch { AsusACPI.PerformanceSilent => colorEco, AsusACPI.PerformanceTurbo => colorTurbo, _ => colorStandard, }; break; } foreach (var item in contextMenuStrip.Items) { if (item is ToolStripMenuItem menuItem && menuItem.Tag is not null) { menuItem.Checked = ((int)menuItem.Tag == mode); } } } public void SetModeLabel(string modeText) { if (InvokeRequired) { Invoke(delegate { labelPerf.Text = modeText; panelPerformance.AccessibleName = labelPerf.Text; }); } else { labelPerf.Text = modeText; panelPerformance.AccessibleName = labelPerf.Text; } } public void VisualizeXGM(int GPUMode = -1) { bool connected = Program.acpi.IsXGConnected(); buttonXGM.Enabled = buttonXGM.Visible = connected; if (!connected) return; if (GPUMode != -1) ButtonEnabled(buttonXGM, AppConfig.IsAMDiGPU() || GPUMode != AsusACPI.GPUModeEco); int activated = Program.acpi.DeviceGet(AsusACPI.GPUXG); Logger.WriteLine("XGM Activated flag: " + activated); buttonXGM.Activated = activated == 1; if (activated == 1) { ButtonEnabled(buttonOptimized, false); ButtonEnabled(buttonEco, false); ButtonEnabled(buttonStandard, false); ButtonEnabled(buttonUltimate, false); } else { ButtonEnabled(buttonOptimized, true); ButtonEnabled(buttonEco, true); ButtonEnabled(buttonStandard, true); ButtonEnabled(buttonUltimate, true); } } public void VisualiseGPUButtons(bool eco = true, bool ultimate = true) { if (!eco) { menuEco.Visible = buttonEco.Visible = false; menuOptimized.Visible = buttonOptimized.Visible = false; buttonStopGPU.Visible = true; tableGPU.ColumnCount = 3; tableScreen.ColumnCount = 3; } else { buttonStopGPU.Visible = false; } if (!ultimate) { menuUltimate.Visible = buttonUltimate.Visible = false; tableGPU.ColumnCount = 3; tableScreen.ColumnCount = 3; } } public void HideGPUModes(bool gpuExists) { isGpuSection = false; buttonEco.Visible = false; buttonStandard.Visible = false; buttonUltimate.Visible = false; buttonOptimized.Visible = false; buttonStopGPU.Visible = true; tableGPU.ColumnCount = 0; SetContextMenu(); panelGPU.Visible = gpuExists; } public void LockGPUModes(string text = null) { Invoke(delegate { if (text is null) text = Properties.Strings.GPUMode + ": " + Properties.Strings.GPUChanging + " ..."; ButtonEnabled(buttonOptimized, false); ButtonEnabled(buttonEco, false); ButtonEnabled(buttonStandard, false); ButtonEnabled(buttonUltimate, false); ButtonEnabled(buttonXGM, false); labelGPU.Text = text; }); } public void VisualiseGPUMode(int GPUMode = -1) { if (AppConfig.IsAlly()) { tableGPU.Visible = false; labelGPU.Text = "GPU"; if (Program.acpi.IsXGConnected()) { tableAMD.Controls.Add(buttonXGM, 1, 0); VisualizeXGM(); } VisualiseIcon(); return; } ButtonEnabled(buttonOptimized, true); ButtonEnabled(buttonEco, true); ButtonEnabled(buttonStandard, true); ButtonEnabled(buttonUltimate, true); if (GPUMode == -1) GPUMode = AppConfig.Get("gpu_mode"); bool GPUAuto = AppConfig.Is("gpu_auto"); buttonEco.Activated = false; buttonStandard.Activated = false; buttonUltimate.Activated = false; buttonOptimized.Activated = false; switch (GPUMode) { case AsusACPI.GPUModeEco: buttonOptimized.BorderColor = colorEco; buttonEco.Activated = !GPUAuto; buttonOptimized.Activated = GPUAuto; labelGPU.Text = Properties.Strings.GPUMode + ": " + Properties.Strings.GPUModeEco; panelGPU.AccessibleName = Properties.Strings.GPUMode + " - " + (GPUAuto ? Properties.Strings.Optimized : Properties.Strings.EcoMode); break; case AsusACPI.GPUModeUltimate: buttonUltimate.Activated = true; labelGPU.Text = Properties.Strings.GPUMode + ": " + Properties.Strings.GPUModeUltimate; panelGPU.AccessibleName = Properties.Strings.GPUMode + " - " + Properties.Strings.UltimateMode; break; default: buttonOptimized.BorderColor = colorStandard; buttonStandard.Activated = !GPUAuto; buttonOptimized.Activated = GPUAuto; labelGPU.Text = Properties.Strings.GPUMode + ": " + (AppConfig.IsAlwaysUltimate() ? Properties.Strings.GPUModeUltimate : Properties.Strings.GPUModeStandard); panelGPU.AccessibleName = Properties.Strings.GPUMode + " - " + (GPUAuto ? Properties.Strings.Optimized : Properties.Strings.StandardMode); break; } VisualiseIcon(); VisualizeXGM(GPUMode); if (isGpuSection) { menuEco.Checked = buttonEco.Activated; menuStandard.Checked = buttonStandard.Activated; menuUltimate.Checked = buttonUltimate.Activated; menuOptimized.Checked = buttonOptimized.Activated; } // UI Fix for small screeens if (Top < 0) { labelTipGPU.Visible = false; labelTipScreen.Visible = false; Top = 5; } } public void VisualiseIcon() { if (Program.trayIcon is null) return; int GPUMode = AppConfig.Get("gpu_mode"); bool isDark = CheckSystemDarkModeStatus(); switch (GPUMode) { case AsusACPI.GPUModeEco: Program.trayIcon.Icon = AppConfig.IsBWIcon() ? (!isDark ? Properties.Resources.dark_eco : Properties.Resources.light_eco) : Properties.Resources.eco; break; case AsusACPI.GPUModeUltimate: Program.trayIcon.Icon = AppConfig.IsBWIcon() ? (!isDark ? Properties.Resources.dark_standard : Properties.Resources.light_standard) : Properties.Resources.ultimate; break; default: Program.trayIcon.Icon = AppConfig.IsBWIcon() ? (!isDark ? Properties.Resources.dark_standard : Properties.Resources.light_standard) : Properties.Resources.standard; break; } } private void ButtonSilent_Click(object? sender, EventArgs e) { Program.modeControl.SetPerformanceMode(AsusACPI.PerformanceSilent); } private void ButtonBalanced_Click(object? sender, EventArgs e) { Program.modeControl.SetPerformanceMode(AsusACPI.PerformanceBalanced); } private void ButtonTurbo_Click(object? sender, EventArgs e) { Program.modeControl.SetPerformanceMode(AsusACPI.PerformanceTurbo); } public void ButtonEnabled(RButton but, bool enabled) { but.Enabled = enabled; but.BackColor = but.Enabled ? Color.FromArgb(255, but.BackColor) : Color.FromArgb(100, but.BackColor); } public void VisualiseBatteryTitle(int limit) { labelBatteryTitle.Text = Properties.Strings.BatteryChargeLimit + ": " + limit.ToString() + "%"; } public void VisualiseBattery(int limit) { VisualiseBatteryTitle(limit); sliderBattery.Value = limit; sliderBattery.AccessibleName = Properties.Strings.BatteryChargeLimit + ": " + limit.ToString() + "%"; //sliderBattery.AccessibilityObject.Select(AccessibleSelection.TakeFocus); VisualiseBatteryFull(); } public void VisualiseBatteryFull() { if (BatteryControl.chargeFull) { buttonBatteryFull.BackColor = colorStandard; buttonBatteryFull.ForeColor = SystemColors.ControlLightLight; buttonBatteryFull.AccessibleName = Properties.Strings.BatteryChargeLimit + "100% on"; } else { buttonBatteryFull.BackColor = buttonSecond; buttonBatteryFull.ForeColor = SystemColors.ControlDark; buttonBatteryFull.AccessibleName = Properties.Strings.BatteryChargeLimit + "100% off"; } } public void VisualizePeripherals() { if (!PeripheralsProvider.IsAnyPeripheralConnect()) { panelPeripherals.Visible = false; return; } Button[] buttons = new Button[] { buttonPeripheral1, buttonPeripheral2, buttonPeripheral3 }; //we only support 4 devces for now. Who has more than 4 mice connected to the same PC anyways.... List lp = PeripheralsProvider.AllPeripherals(); for (int i = 0; i < lp.Count && i < buttons.Length; ++i) { IPeripheral m = lp.ElementAt(i); Button b = buttons[i]; if (m.IsDeviceReady) { if (m.HasBattery()) { b.Text = m.GetDisplayName() + "\n" + m.Battery + "%" + (m.Charging ? "(" + Properties.Strings.Charging + ")" : ""); } else { b.Text = m.GetDisplayName(); } } else { //Mouse is either not connected or in standby b.Text = m.GetDisplayName() + "\n(" + Properties.Strings.NotConnected + ")"; } switch (m.DeviceType()) { case PeripheralType.Mouse: b.Image = ControlHelper.ResizeImage(ControlHelper.TintImage(Properties.Resources.icons8_maus_48, b.ForeColor), ControlHelper.Scale); break; case PeripheralType.Keyboard: b.Image = ControlHelper.ResizeImage(ControlHelper.TintImage(Properties.Resources.icons8_keyboard_32, b.ForeColor), ControlHelper.Scale); break; } b.Visible = true; } for (int i = lp.Count; i < buttons.Length; ++i) { buttons[i].Visible = false; } panelPeripherals.Visible = true; } private void ButtonPeripheral_MouseEnter(object? sender, EventArgs e) { int index = 0; if (sender == buttonPeripheral2) index = 1; if (sender == buttonPeripheral3) index = 2; IPeripheral iph = PeripheralsProvider.AllPeripherals().ElementAt(index); if (iph is null) { return; } if (!iph.IsDeviceReady) { //Refresh battery on hover if the device is marked as "Not Ready" iph.ReadBattery(); } } private void ButtonPeripheral_Click(object? sender, EventArgs e) { if (mouseSettings is not null) { mouseSettings.Close(); return; } int index = 0; if (sender == buttonPeripheral2) index = 1; if (sender == buttonPeripheral3) index = 2; IPeripheral iph = PeripheralsProvider.AllPeripherals().ElementAt(index); if (iph is null) { //Can only happen when the user hits the button in the exact moment a device is disconnected. return; } if (iph.DeviceType() == PeripheralType.Mouse) { AsusMouse? am = iph as AsusMouse; if (am is null || !am.IsDeviceReady) { //Should not happen if all device classes are implemented correctly. But better safe than sorry. return; } mouseSettings = new AsusMouseSettings(am); mouseSettings.TopMost = AppConfig.Is("topmost"); mouseSettings.FormClosed += MouseSettings_FormClosed; mouseSettings.Disposed += MouseSettings_Disposed; if (!mouseSettings.IsDisposed) { mouseSettings.Show(); } else { mouseSettings = null; } } } private void MouseSettings_Disposed(object? sender, EventArgs e) { mouseSettings = null; } private void MouseSettings_FormClosed(object? sender, FormClosedEventArgs e) { mouseSettings = null; } public void VisualiseAudio(double level) { int filledSquares = (int)Math.Round(level/2); string squares = new string('|', filledSquares); Invoke(delegate { labelMatrix.Text = $"Slash Lighting: {squares}"; }); } public void VisualiseFnLock() { if (AppConfig.Is("fn_lock")) { buttonFnLock.BackColor = colorStandard; buttonFnLock.ForeColor = SystemColors.ControlLightLight; buttonFnLock.AccessibleName = "Fn-Lock on"; } else { buttonFnLock.BackColor = buttonSecond; buttonFnLock.ForeColor = SystemColors.ControlDark; buttonFnLock.AccessibleName = "Fn-Lock off"; } } private void ButtonFnLock_Click(object? sender, EventArgs e) { InputDispatcher.ToggleFnLock(); } } } ================================================ FILE: app/Settings.resx ================================================  text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 ================================================ FILE: app/UI/ControlHelper.cs ================================================ using GHelper.UI; using System.Drawing.Drawing2D; using System.Windows.Forms.DataVisualization.Charting; public static class ControlHelper { static bool _invert = false; static float _scale = 1; public static float Scale => _scale; public static void Adjust(RForm container, bool invert = false) { container.BackColor = RForm.formBack; container.ForeColor = RForm.foreMain; _invert = invert; AdjustControls(container.Controls); _invert = false; } public static void Resize(RForm container, float baseScale = 2) { _scale = GetDpiScale(container).Value / baseScale; if (Math.Abs(_scale - 1) > 0.2) ResizeControls(container.Controls); } private static void ResizeControls(Control.ControlCollection controls) { foreach (Control control in controls) { var button = control as RButton; if (button != null && button.Image is not null) button.Image = ResizeImage(button.Image); /* var pictureBox = control as PictureBox; if (pictureBox != null && pictureBox.BackgroundImage is not null) pictureBox.BackgroundImage = ResizeImage(pictureBox.BackgroundImage); */ ResizeControls(control.Controls); } } private static void AdjustControls(Control.ControlCollection controls) { foreach (Control control in controls) { AdjustControls(control.Controls); var button = control as RButton; if (button != null) { button.BackColor = button.Secondary ? RForm.buttonSecond : RForm.buttonMain; button.ForeColor = RForm.foreMain; button.FlatStyle = FlatStyle.Flat; button.FlatAppearance.BorderColor = RForm.borderMain; if (button.Image is not null) button.Image = AdjustImage(button.Image); } var pictureBox = control as PictureBox; if (pictureBox != null && pictureBox.BackgroundImage is not null) pictureBox.BackgroundImage = AdjustImage(pictureBox.BackgroundImage); var combo = control as RComboBox; if (combo != null) { combo.BackColor = RForm.buttonMain; combo.ForeColor = RForm.foreMain; combo.BorderColor = RForm.buttonMain; combo.ButtonColor = RForm.buttonMain; combo.ArrowColor = RForm.foreMain; } var numbericUpDown = control as NumericUpDown; if(numbericUpDown is not null) { numbericUpDown.ForeColor = RForm.foreMain; numbericUpDown.BackColor = RForm.buttonMain; } var gb = control as GroupBox; if (gb != null) { gb.ForeColor = RForm.foreMain; } var pn = control as Panel; if (pn != null && pn.Name.Contains("Header")) { pn.BackColor = RForm.buttonSecond; } var sl = control as Slider; if (sl != null) { sl.borderColor = RForm.buttonMain; } var chk = control as CheckBox; if (chk != null && chk.BackColor != RForm.formBack) { chk.BackColor = RForm.buttonSecond; } var chart = control as Chart; if (chart != null) { chart.BackColor = RForm.chartMain; chart.ChartAreas[0].BackColor = RForm.chartMain; chart.ChartAreas[0].AxisX.TitleForeColor = RForm.foreMain; chart.ChartAreas[0].AxisY.TitleForeColor = RForm.foreMain; chart.ChartAreas[0].AxisX.LabelStyle.ForeColor = RForm.foreMain; chart.ChartAreas[0].AxisY.LabelStyle.ForeColor = RForm.foreMain; chart.ChartAreas[0].AxisX.MajorTickMark.LineColor = RForm.foreMain; chart.ChartAreas[0].AxisY.MajorTickMark.LineColor = RForm.foreMain; chart.ChartAreas[0].AxisX.MajorGrid.LineColor = RForm.chartGrid; chart.ChartAreas[0].AxisY.MajorGrid.LineColor = RForm.chartGrid; chart.ChartAreas[0].AxisX.LineColor = RForm.chartGrid; chart.ChartAreas[0].AxisY.LineColor = RForm.chartGrid; chart.Titles[0].ForeColor = RForm.foreMain; } } } public static Lazy GetDpiScale(Control control) { return new Lazy(() => { using (var graphics = control.CreateGraphics()) return graphics.DpiX / 96.0f; }); } private static Image ResizeImage(Image image) { return ResizeImage(image, _scale); } public static Image ResizeImage(Image image, float scale) { if (Math.Abs(scale - 1) < 0.1) return image; var newSize = new Size((int)(image.Width * scale), (int)(image.Height * scale)); var pic = new Bitmap(newSize.Width, newSize.Height); using (var g = Graphics.FromImage(pic)) { g.InterpolationMode = InterpolationMode.HighQualityBicubic; g.DrawImage(image, new Rectangle(new Point(), newSize)); } return pic; } private static Image AdjustImage(Image image) { var pic = new Bitmap(image); if (_invert) { for (int y = 0; (y <= (pic.Height - 1)); y++) { for (int x = 0; (x <= (pic.Width - 1)); x++) { Color col = pic.GetPixel(x, y); pic.SetPixel(x, y, Color.FromArgb(col.A, (255 - col.R), (255 - col.G), (255 - col.B))); } } } return pic; } public static Image TintImage(Image image, Color tintColor) { var pic = new Bitmap(image); for (int y = 0; (y <= (pic.Height - 1)); y++) { for (int x = 0; (x <= (pic.Width - 1)); x++) { Color col = pic.GetPixel(x, y); pic.SetPixel(x, y, Color.FromArgb(col.A, tintColor.R, tintColor.G, tintColor.B)); } } return pic; } } ================================================ FILE: app/UI/CustomContextMenu.cs ================================================ using System.Runtime.InteropServices; namespace GHelper.UI { class CustomContextMenu : ContextMenuStrip { [DllImport("dwmapi.dll", CharSet = CharSet.Unicode, SetLastError = true)] private static extern long DwmSetWindowAttribute(nint hwnd, DWMWINDOWATTRIBUTE attribute, ref DWM_WINDOW_CORNER_PREFERENCE pvAttribute, uint cbAttribute); public CustomContextMenu() { var preference = DWM_WINDOW_CORNER_PREFERENCE.DWMWCP_ROUNDSMALL; //change as you want DwmSetWindowAttribute(Handle, DWMWINDOWATTRIBUTE.DWMWA_WINDOW_CORNER_PREFERENCE, ref preference, sizeof(uint)); } public enum DWMWINDOWATTRIBUTE { DWMWA_WINDOW_CORNER_PREFERENCE = 33 } public enum DWM_WINDOW_CORNER_PREFERENCE { DWMWA_DEFAULT = 0, DWMWCP_DONOTROUND = 1, DWMWCP_ROUND = 2, DWMWCP_ROUNDSMALL = 3, } } } ================================================ FILE: app/UI/IconHelper.cs ================================================ using System.Diagnostics; using System.Runtime.InteropServices; namespace GHelper.UI { public class IconHelper { [DllImport("user32.dll", CharSet = CharSet.Auto)] private static extern IntPtr SendMessage(IntPtr hWnd, uint Msg, IntPtr wParam, IntPtr lParam); private const uint WM_SETICON = 0x80u; private const int ICON_SMALL = 0; private const int ICON_BIG = 1; public static void SetIcon(Form form, Bitmap icon) { try { SendMessage(form.Handle, WM_SETICON, ICON_BIG, Icon.ExtractAssociatedIcon(Application.ExecutablePath)!.Handle); SendMessage(form.Handle, WM_SETICON, ICON_SMALL, icon.GetHicon()); } catch (Exception ex) { Debug.WriteLine($"Error setting icon {ex.Message}"); } } } } ================================================ FILE: app/UI/NumericUpDownWithUnit.cs ================================================ using System.Globalization; using System.Text.RegularExpressions; public class NumericUpDownWithUnit : NumericUpDown { #region| Fields | private string unit = null; private bool unitFirst = false; #endregion #region| Properties | public string Unit { get => unit; set { unit = value; UpdateEditText(); } } public bool UnitFirst { get => unitFirst; set { unitFirst = value; UpdateEditText(); } } #endregion #region| Methods | /// /// Method called when updating the numeric updown text. /// protected override void UpdateEditText() { // If there is a unit we handle it ourselfs, if there is not we leave it to the base class. if (Unit != null && Unit != string.Empty) { if (UnitFirst) { Text = $"({Unit}) {Value}"; } else { Text = $"{Value} ({Unit})"; } } else { base.UpdateEditText(); } } /// /// Validate method called before actually updating the text. /// This is exactly the same as the base class but it will use the new ParseEditText from this class instead. /// protected override void ValidateEditText() { // See if the edit text parses to a valid decimal considering the label unit ParseEditText(); UpdateEditText(); } /// /// Converts the text displayed in the up-down control to a numeric value and evaluates it. /// protected new void ParseEditText() { try { // The only difference of this methods to the base one is that text is replaced directly // with the property Text instead of using the regex. // We now that the only characters that may be on the textbox are from the unit we provide. // because the NumericUpDown handles invalid input from user for us. // This is where the magic happens. This regex will match all characters from the unit // (so your unit cannot have numbers). You can change this regex to fill your needs var regex = new Regex($@"[^(?!{Unit} )]+"); var match = regex.Match(Text); if (match.Success) { var text = match.Value; // VSWhidbey 173332: Verify that the user is not starting the string with a "-" // before attempting to set the Value property since a "-" is a valid character with // which to start a string representing a negative number. if (!string.IsNullOrEmpty(text) && !(text.Length == 1 && text == "-")) { if (Hexadecimal) { Value = Constrain(Convert.ToDecimal(Convert.ToInt32(Text, 16))); } else { Value = Constrain(Decimal.Parse(text, CultureInfo.CurrentCulture)); } } } } catch { // Leave value as it is } finally { UserEdit = false; } } /// /// Returns the provided value constrained to be within the min and max. /// This is exactly the same as the one in base class (which is private so we can't directly use it). /// private decimal Constrain(decimal value) { if (value < Minimum) { value = Minimum; } if (value > Maximum) { value = Maximum; } return value; } #endregion } ================================================ FILE: app/UI/RBadgeButton.cs ================================================ using System.Drawing.Drawing2D; namespace GHelper.UI { public class RBadgeButton : RButton { private int badge = 0; public int Badge { get => badge; set { if (badge != value) { badge = value; Invalidate(); } } } protected override void OnPaint(PaintEventArgs pevent) { base.OnPaint(pevent); if (badge <= 0) return; float ratio = pevent.Graphics.DpiX / 192.0f; var rectSurface = ClientRectangle; using (Brush brush = new SolidBrush(BorderColor)) { var radius = ratio * 14; var badgeRect = new RectangleF( rectSurface.Width - rectSurface.Height / 2f - radius, rectSurface.Height / 2f - radius, radius + radius, radius + radius ); pevent.Graphics.SmoothingMode = SmoothingMode.AntiAlias; pevent.Graphics.FillEllipse(brush, badgeRect); using (Font badgeFont = new Font("Arial", (float)(0.8 * Font.Size), FontStyle.Bold)) using (StringFormat sf = new StringFormat { Alignment = StringAlignment.Center, LineAlignment = StringAlignment.Center }) { badgeRect.Width = (float)Math.Ceiling(badgeRect.Width*ratio)/ratio; badgeRect.Height = (float)Math.Ceiling(badgeRect.Height*ratio)/ratio; pevent.Graphics.DrawString(badge.ToString(), badgeFont, Brushes.White, badgeRect, sf); } } } } } ================================================ FILE: app/UI/RButton.cs ================================================ using System.Drawing.Drawing2D; namespace GHelper.UI { public class RButton : Button { //Fields private int borderSize = 5; private int borderRadius = 5; public int BorderRadius { get { return borderRadius; } set { borderRadius = value; } } private Color borderColor = Color.Transparent; public Color BorderColor { get { return borderColor; } set { borderColor = value; } } private bool activated = false; public bool Activated { get { return activated; } set { if (activated != value) Invalidate(); activated = value; } } private bool secondary = false; public bool Secondary { get { return secondary; } set { secondary = value; } } public RButton() { DoubleBuffered = true; FlatStyle = FlatStyle.Flat; FlatAppearance.BorderSize = 0; } private GraphicsPath GetFigurePath(Rectangle rect, int radius) { GraphicsPath path = new GraphicsPath(); float curveSize = radius * 2F; path.StartFigure(); path.AddArc(rect.X, rect.Y, curveSize, curveSize, 180, 90); path.AddArc(rect.Right - curveSize, rect.Y, curveSize, curveSize, 270, 90); path.AddArc(rect.Right - curveSize, rect.Bottom - curveSize, curveSize, curveSize, 0, 90); path.AddArc(rect.X, rect.Bottom - curveSize, curveSize, curveSize, 90, 90); path.CloseFigure(); return path; } protected override void OnPaint(PaintEventArgs pevent) { base.OnPaint(pevent); float ratio = pevent.Graphics.DpiX / 192.0f; int border = (int)(ratio * borderSize); Rectangle rectSurface = ClientRectangle; Rectangle rectBorder = Rectangle.Inflate(rectSurface, -border, -border); Color borderDrawColor = activated ? borderColor : Color.Transparent; using (GraphicsPath pathSurface = GetFigurePath(rectSurface, borderRadius + border)) using (GraphicsPath pathBorder = GetFigurePath(rectBorder, borderRadius)) using (Pen penSurface = new Pen(Parent.BackColor, border)) using (Pen penBorder = new Pen(borderDrawColor, border)) { penBorder.Alignment = PenAlignment.Outset; pevent.Graphics.SmoothingMode = SmoothingMode.AntiAlias; Region = new Region(pathSurface); pevent.Graphics.DrawPath(penSurface, pathSurface); pevent.Graphics.DrawPath(penBorder, pathBorder); } if (!Enabled && ForeColor != SystemColors.ControlText) { var rect = pevent.ClipRectangle; if (Image is not null) { rect.Y += Image.Height; rect.Height -= Image.Height; } TextFormatFlags flags = TextFormatFlags.HorizontalCenter | TextFormatFlags.VerticalCenter | TextFormatFlags.WordBreak; TextRenderer.DrawText(pevent.Graphics, Text, Font, rect, Color.Gray, flags); } } } } ================================================ FILE: app/UI/RCheckBox.cs ================================================ namespace GHelper.UI { public class RCheckBox : CheckBox { } } ================================================ FILE: app/UI/RComboBox.cs ================================================ using System.ComponentModel; using System.Drawing.Drawing2D; using System.Runtime.InteropServices; namespace GHelper.UI { public class RComboBox : ComboBox { private Color borderColor = Color.Gray; [DefaultValue(typeof(Color), "Gray")] public Color BorderColor { get { return borderColor; } set { if (borderColor != value) { borderColor = value; Invalidate(); } } } private Color buttonColor = Color.FromArgb(255, 255, 255, 255); [DefaultValue(typeof(Color), "255, 255, 255")] public Color ButtonColor { get { return buttonColor; } set { if (buttonColor != value) { buttonColor = value; Invalidate(); } } } private Color arrowColor = Color.Black; [DefaultValue(typeof(Color), "Black")] public Color ArrowColor { get { return arrowColor; } set { if (arrowColor != value) { arrowColor = value; Invalidate(); } } } public static GraphicsPath RoundedRect(Rectangle bounds, int radiusL, int radiusR) { int diameterL = radiusL * 2; int diameterR = radiusR * 2; Size sizeL = new Size(diameterL, diameterL); Size sizeR = new Size(diameterR, diameterR); Rectangle arcL = new Rectangle(bounds.Location, sizeL); Rectangle arcR = new Rectangle(bounds.Location, sizeR); GraphicsPath path = new GraphicsPath(); // top left arc path.AddArc(arcL, 180, 90); // top right arc arcR.X = bounds.Right - diameterR; arcR.Y = bounds.Top; path.AddArc(arcR, 270, 90); // bottom right arc arcR.Y = bounds.Bottom - diameterR; arcR.X = bounds.Right - diameterR; path.AddArc(arcR, 0, 90); // bottom left arc arcL.X = bounds.Left; arcL.Y = bounds.Bottom - diameterL; path.AddArc(arcL, 90, 90); path.CloseFigure(); return path; } public static void DrawRoundedRectangle(Graphics graphics, Pen pen, Rectangle bounds, int cornerRadiusL = 5, int cornerRadiusR = 5) { if (graphics == null) throw new ArgumentNullException(nameof(graphics)); if (pen == null) throw new ArgumentNullException(nameof(pen)); using (GraphicsPath path = RoundedRect(bounds, cornerRadiusL, cornerRadiusR)) { graphics.DrawPath(pen, path); } } public static void FillRoundedRectangle(Graphics graphics, Brush brush, Rectangle bounds, int cornerRadiusL = 5, int cornerRadiusR = 5) { if (graphics == null) throw new ArgumentNullException(nameof(graphics)); if (brush == null) throw new ArgumentNullException(nameof(brush)); using (GraphicsPath path = RoundedRect(bounds, cornerRadiusL, cornerRadiusR)) { graphics.FillPath(brush, path); } } protected override void WndProc(ref Message m) { if (m.Msg == WM_PAINT && DropDownStyle != ComboBoxStyle.Simple) { var clientRect = ClientRectangle; var dropDownButtonWidth = SystemInformation.HorizontalScrollBarArrowWidth; var outerBorder = new Rectangle(clientRect.Location, new Size(clientRect.Width - 1, clientRect.Height - 1)); var innerBorder = new Rectangle(outerBorder.X + 1, outerBorder.Y + 1, outerBorder.Width - dropDownButtonWidth - 2, outerBorder.Height - 2); var innerInnerBorder = new Rectangle(innerBorder.X + 1, innerBorder.Y + 1, innerBorder.Width - 2, innerBorder.Height - 2); var dropDownRect = new Rectangle(innerBorder.Right + 1, innerBorder.Y, dropDownButtonWidth, innerBorder.Height + 1); if (RightToLeft == RightToLeft.Yes) { innerBorder.X = clientRect.Width - innerBorder.Right; innerInnerBorder.X = clientRect.Width - innerInnerBorder.Right; dropDownRect.X = clientRect.Width - dropDownRect.Right; dropDownRect.Width += 1; } var innerBorderColor = BackColor; var outerBorderColor = BorderColor; var buttonColor = ButtonColor; var middle = new Point(dropDownRect.Left + dropDownRect.Width / 2, dropDownRect.Top + dropDownRect.Height / 2); var arrow = new Point[] { new Point(middle.X - 3, middle.Y - 2), new Point(middle.X + 4, middle.Y - 2), new Point(middle.X, middle.Y + 2) }; var ps = new PAINTSTRUCT(); bool shoulEndPaint = false; nint dc; if (m.WParam == nint.Zero) { dc = BeginPaint(Handle, ref ps); m.WParam = dc; shoulEndPaint = true; } else { dc = m.WParam; } var rgn = CreateRectRgn(innerInnerBorder.Left, innerInnerBorder.Top, innerInnerBorder.Right, innerInnerBorder.Bottom); SelectClipRgn(dc, rgn); DefWndProc(ref m); DeleteObject(rgn); rgn = CreateRectRgn(clientRect.Left, clientRect.Top, clientRect.Right, clientRect.Bottom); SelectClipRgn(dc, rgn); using (var g = Graphics.FromHdc(dc)) { using (var b = new SolidBrush(buttonColor)) { //FillRoundedRectangle(g, b, dropDownRect, 1, 3); g.FillRectangle(b, dropDownRect); } using (var b = new SolidBrush(arrowColor)) { g.FillPolygon(b, arrow); } using (var p = new Pen(innerBorderColor, 2)) { DrawRoundedRectangle(g, p, innerBorder, 3, 1); //DrawRoundedRectangle(g, p, innerInnerBorder, 3, 1); //g.DrawRectangle(p, innerBorder); //g.DrawRectangle(p, innerInnerBorder); } using (var p = new Pen(outerBorderColor)) { DrawRoundedRectangle(g, p, outerBorder, 4, 4); //g.DrawRectangle(p, outerBorder); } } if (shoulEndPaint) EndPaint(Handle, ref ps); DeleteObject(rgn); } else base.WndProc(ref m); } private const int WM_PAINT = 0xF; [StructLayout(LayoutKind.Sequential)] public struct RECT { public int L, T, R, B; } [StructLayout(LayoutKind.Sequential)] public struct PAINTSTRUCT { public nint hdc; public bool fErase; public int rcPaint_left; public int rcPaint_top; public int rcPaint_right; public int rcPaint_bottom; public bool fRestore; public bool fIncUpdate; public int reserved1; public int reserved2; public int reserved3; public int reserved4; public int reserved5; public int reserved6; public int reserved7; public int reserved8; } [DllImport("user32.dll")] private static extern nint BeginPaint(nint hWnd, [In, Out] ref PAINTSTRUCT lpPaint); [DllImport("user32.dll")] private static extern bool EndPaint(nint hWnd, ref PAINTSTRUCT lpPaint); [DllImport("gdi32.dll")] public static extern int SelectClipRgn(nint hDC, nint hRgn); [DllImport("user32.dll")] public static extern int GetUpdateRgn(nint hwnd, nint hrgn, bool fErase); public enum RegionFlags { ERROR = 0, NULLREGION = 1, SIMPLEREGION = 2, COMPLEXREGION = 3, } [DllImport("gdi32.dll")] internal static extern bool DeleteObject(nint hObject); [DllImport("gdi32.dll")] private static extern nint CreateRectRgn(int x1, int y1, int x2, int y2); } } ================================================ FILE: app/UI/RForm.cs ================================================ using Microsoft.Win32; using System.Runtime.InteropServices; namespace GHelper.UI { public class RForm : Form { public static Color colorEco = Color.FromArgb(255, 6, 180, 138); public static Color colorStandard = Color.FromArgb(255, 58, 174, 239); public static Color colorTurbo = Color.FromArgb(255, 255, 32, 32); public static Color colorCustom = Color.FromArgb(255, 255, 128, 0); public static Color colorGray = Color.FromArgb(255, 168, 168, 168); public static Color buttonMain; public static Color buttonSecond; public static Color formBack; public static Color foreMain; public static Color borderMain; public static Color chartMain; public static Color chartGrid; [DllImport("UXTheme.dll", SetLastError = true, EntryPoint = "#138")] public static extern bool CheckSystemDarkModeStatus(); [DllImport("DwmApi")] //System.Runtime.InteropServices private static extern int DwmSetWindowAttribute(nint hwnd, int attr, int[] attrValue, int attrSize); public bool darkTheme = false; protected override CreateParams CreateParams { get { var parms = base.CreateParams; parms.Style &= ~0x02000000; // Turn off WS_CLIPCHILDREN parms.ClassStyle &= ~0x00020000; return parms; } } public static void InitColors(bool darkTheme) { if (darkTheme) { buttonMain = Color.FromArgb(255, 55, 55, 55); buttonSecond = Color.FromArgb(255, 38, 38, 38); formBack = Color.FromArgb(255, 28, 28, 28); foreMain = Color.FromArgb(255, 240, 240, 240); borderMain = Color.FromArgb(255, 50, 50, 50); chartMain = Color.FromArgb(255, 35, 35, 35); chartGrid = Color.FromArgb(255, 70, 70, 70); } else { buttonMain = SystemColors.ControlLightLight; buttonSecond = SystemColors.ControlLight; formBack = SystemColors.Control; foreMain = SystemColors.ControlText; borderMain = Color.LightGray; chartMain = SystemColors.ControlLightLight; chartGrid = Color.LightGray; } } private static bool IsDarkTheme() { string? uiMode = AppConfig.GetString("ui_mode"); if (uiMode is not null && uiMode.ToLower() == "dark") { return true; } if (uiMode is not null && uiMode.ToLower() == "light") { return false; } if (uiMode is not null && uiMode.ToLower() == "windows") { return CheckSystemDarkModeStatus(); } using var key = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Themes\Personalize"); var registryValueObject = key?.GetValue("AppsUseLightTheme"); if (registryValueObject == null) return false; return (int)registryValueObject <= 0; } public bool InitTheme(bool setDPI = false) { bool newDarkTheme = IsDarkTheme(); bool changed = darkTheme != newDarkTheme; darkTheme = newDarkTheme; InitColors(darkTheme); if (setDPI) ControlHelper.Resize(this); if (changed) { DwmSetWindowAttribute(Handle, 20, new[] { darkTheme ? 1 : 0 }, 4); ControlHelper.Adjust(this, changed); this.Invalidate(); } return changed; } } } ================================================ FILE: app/UI/RForm.resx ================================================  text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 ================================================ FILE: app/UI/Slider.cs ================================================ using System.Drawing.Drawing2D; namespace GHelper.UI { public static class GraphicsExtensions { public static void DrawCircle(this Graphics g, Pen pen, float centerX, float centerY, float radius) { g.DrawEllipse(pen, centerX - radius, centerY - radius, radius + radius, radius + radius); } public static void FillCircle(this Graphics g, Brush brush, float centerX, float centerY, float radius) { g.FillEllipse(brush, centerX - radius, centerY - radius, radius + radius, radius + radius); } } public class Slider : Control { private float _radius; private PointF _thumbPos; private SizeF _barSize; private PointF _barPos; public Color accentColor = Color.FromArgb(255, 58, 174, 239); public Color borderColor = Color.White; public event EventHandler ValueChanged; public Slider() { // This reduces flicker DoubleBuffered = true; TabStop = true; } private int _min = 0; public int Min { get => _min; set { _min = value; RecalculateParameters(); } } private int _max = 100; public int Max { get => _max; set { _max = value; RecalculateParameters(); } } private int _step = 1; public int Step { get => _step; set { _step = value; } } private int _value = 50; public int Value { get => _value; set { value = (int)Math.Round(value / (float)_step) * _step; if (_value != value) { _value = value; ValueChanged?.Invoke(this, EventArgs.Empty); RecalculateParameters(); } } } protected override bool IsInputKey(Keys keyData) { switch (keyData) { case Keys.Right: case Keys.Left: case Keys.Up: case Keys.Down: return true; } return base.IsInputKey(keyData); } protected override void OnKeyDown(KeyEventArgs e) { switch (e.KeyCode) { case Keys.Right: case Keys.Up: Value = Math.Min(Max, Value + Step); break; case Keys.Left: case Keys.Down: Value = Math.Max(Min, Value - Step); break; } AccessibilityNotifyClients(AccessibleEvents.Focus, 0); base.OnKeyDown(e); } protected override void OnPaint(PaintEventArgs e) { base.OnPaint(e); Brush brushAccent = new SolidBrush(accentColor); Brush brushEmpty = new SolidBrush(Color.Gray); Brush brushBorder = new SolidBrush(borderColor); e.Graphics.SmoothingMode = SmoothingMode.AntiAlias; e.Graphics.FillRectangle(brushEmpty, _barPos.X, _barPos.Y, _barSize.Width, _barSize.Height); e.Graphics.FillRectangle(brushAccent, _barPos.X, _barPos.Y, _thumbPos.X - _barPos.X, _barSize.Height); e.Graphics.FillCircle(brushBorder, _thumbPos.X, _thumbPos.Y, _radius); e.Graphics.FillCircle(brushAccent, _thumbPos.X, _thumbPos.Y, 0.7f * _radius); } protected override void OnResize(EventArgs e) { base.OnResize(e); RecalculateParameters(); } private void RecalculateParameters() { _radius = 0.4F * ClientSize.Height; _barSize = new SizeF(ClientSize.Width - 2 * _radius, ClientSize.Height * 0.15F); _barPos = new PointF(_radius, (ClientSize.Height - _barSize.Height) / 2); _thumbPos = new PointF( _barSize.Width / (Max - Min) * (Value - Min) + _barPos.X, _barPos.Y + 0.5f * _barSize.Height); Invalidate(); } bool _moving = false; SizeF _delta; protected override void OnMouseDown(MouseEventArgs e) { base.OnMouseDown(e); Focus(); // Difference between tumb and mouse position. _delta = new SizeF(e.Location.X - _thumbPos.X, e.Location.Y - _thumbPos.Y); if (_delta.Width * _delta.Width + _delta.Height * _delta.Height <= _radius * _radius) { // Clicking inside thumb. _moving = true; } _calculateValue(e); } private void _calculateValue(MouseEventArgs e) { float thumbX = e.Location.X; // - _delta.Width; if (thumbX < _barPos.X) { thumbX = _barPos.X; } else if (thumbX > _barPos.X + _barSize.Width) { thumbX = _barPos.X + _barSize.Width; } Value = (int)Math.Round(Min + (thumbX - _barPos.X) * (Max - Min) / _barSize.Width); } protected override void OnMouseMove(MouseEventArgs e) { base.OnMouseMove(e); if (_moving) { _calculateValue(e); } } protected override void OnMouseUp(MouseEventArgs e) { base.OnMouseUp(e); _moving = false; } } } ================================================ FILE: app/USB/AsusHid.cs ================================================ using HidSharp; using HidSharp.Reports; namespace GHelper.USB; public static class AsusHid { public const int ASUS_ID = 0x0b05; public const byte INPUT_ID = 0x5a; public const byte AURA_ID = 0x5d; static int[] deviceIds = { 0x1a30, 0x1854, 0x1869, 0x1866, 0x19b6, 0x1822, 0x1837, 0x1854, 0x184a, 0x183d, 0x8502, 0x1807, 0x17e0, 0x18c6, 0x1abe, 0x1b4c, 0x1b6e, 0x1b2c, 0x8854 }; static HidStream? auraStream; public static IEnumerable? FindDevices(byte reportId) { IEnumerable deviceList; try { var allDevices = DeviceList.Local.GetHidDevices(ASUS_ID); var filteredDevices = new List(); foreach (var device in allDevices) { try { if (deviceIds.Contains(device.ProductID) && device.CanOpen && device.GetMaxFeatureReportLength() > 0) { filteredDevices.Add(device); } } catch (Exception ex) { Logger.WriteLine($"Error checking HID device {device.ProductID:X}: {ex.Message}"); } } deviceList = filteredDevices; } catch (Exception ex) { Logger.WriteLine($"Error enumerating HID devices: {ex.Message}"); yield break; } foreach (var device in deviceList) { bool isValid = false; try { isValid = device.GetReportDescriptor().TryGetReport(ReportType.Feature, reportId, out _); } catch (Exception ex) { //Logger.WriteLine($"Error getting report descriptor for device {device.ProductID.ToString("X")}: {ex.Message}"); } if (isValid) yield return device; } } public static HidStream? FindHidStream(byte reportId) { try { var devices = FindDevices(reportId); if (devices is null) return null; if (AppConfig.IsZ13()) { var z13 = devices.Where(device => device.ProductID == 0x1a30).FirstOrDefault(); if (z13 is not null) return z13.Open(); } if (AppConfig.IsS17()) { var s17 = devices.Where(device => device.ProductID == 0x18c6).FirstOrDefault(); if (s17 is not null) return s17.Open(); } foreach (var device in devices) Logger.WriteLine($"Input available: {device.DevicePath} {device.ProductID.ToString("X")} {device.GetMaxFeatureReportLength()}"); return devices.FirstOrDefault()?.Open(); } catch (Exception ex) { Logger.WriteLine($"Error accessing HID device: {ex.Message}"); } return null; } public static void WriteInput(byte[] data, string? log = "USB") { foreach (var device in FindDevices(INPUT_ID)) { try { using (var stream = device.Open()) { var payload = new byte[device.GetMaxFeatureReportLength()]; Array.Copy(data, payload, data.Length); stream.SetFeature(payload); if (log is not null) Logger.WriteLine($"{log} {device.ProductID.ToString("X")}|{device.GetMaxFeatureReportLength()}: {BitConverter.ToString(data)}"); } } catch (Exception ex) { Logger.WriteLine($"Error setting feature {device.GetMaxFeatureReportLength()} {device.DevicePath}: {BitConverter.ToString(data)} {ex.Message}"); } } } public static void Write(byte[] data, string log = "USB") { Write(new List { data }, log); } public static void Write(List dataList, string log = "USB") { var devices = FindDevices(AURA_ID); if (devices is null) return; foreach (var device in devices) try { using (var stream = device.Open()) foreach (var data in dataList) try { stream.Write(data); if (log is not null) Logger.WriteLine($"{log} {device.ProductID.ToString("X")}: {BitConverter.ToString(data)}"); } catch (Exception ex) { if (log is not null) Logger.WriteLine($"Error writing {log} {device.ProductID.ToString("X")}: {ex.Message} {BitConverter.ToString(data)} "); } } catch (Exception ex) { if (log is not null) Logger.WriteLine($"Error opening {log} {device.ProductID.ToString("X")}: {ex.Message}"); } } public static void WriteAura(byte[] data, bool retry = true) { if (auraStream == null) auraStream = FindHidStream(AURA_ID); if (auraStream == null) { Logger.WriteLine("Aura stream not found"); return; } try { auraStream.Write(data); } catch (Exception ex) { Logger.WriteLine($"Error writing data to HID device: {ex.Message} {BitConverter.ToString(data)}"); auraStream.Dispose(); auraStream = null; if (retry) WriteAura(data, false); } } } ================================================ FILE: app/USB/Aura.cs ================================================ using GHelper.Gpu; using GHelper.Helpers; using GHelper.Input; using System.Drawing.Drawing2D; using System.Drawing.Imaging; using System.Runtime.InteropServices; using System.Text; using static GHelper.Helpers.DynamicLightingHelper; namespace GHelper.USB { public class AuraPower { public bool BootLogo; public bool BootKeyb; public bool AwakeLogo; public bool AwakeKeyb; public bool SleepLogo; public bool SleepKeyb; public bool ShutdownLogo; public bool ShutdownKeyb; public bool BootBar; public bool AwakeBar; public bool SleepBar; public bool ShutdownBar; public bool BootLid; public bool AwakeLid; public bool SleepLid; public bool ShutdownLid; public bool BootRear; public bool AwakeRear; public bool SleepRear; public bool ShutdownRear; } public enum AuraMode : int { AuraStatic = 0, AuraBreathe = 1, AuraColorCycle = 2, AuraRainbow = 3, Star = 4, Rain = 5, Highlight = 6, Laser = 7, Ripple = 8, AuraStrobe = 10, Comet = 11, Flash = 12, HEATMAP = 20, GPUMODE = 21, AMBIENT = 22, BATTERY = 23, } public enum AuraSpeed : int { Slow = 0, Normal = 1, Fast = 2, } public static class Aura { static byte[] MESSAGE_APPLY = { AsusHid.AURA_ID, 0xb4 }; static byte[] MESSAGE_SET = { AsusHid.AURA_ID, 0xb5, 0, 0, 0 }; static readonly int AURA_ZONES = 8; private static AuraMode mode = AuraMode.AuraStatic; private static AuraSpeed speed = AuraSpeed.Normal; private static bool backlight = false; private static bool initDirect = false; public static bool sessionLock = false; public static Color Color1 = Color.White; public static Color Color2 = Color.Black; static bool isACPI = AppConfig.IsTUF() || AppConfig.IsVivoZenPro(); static bool isStrix = AppConfig.IsAdvancedRGB() && !AppConfig.IsNoDirectRGB(); static bool isStrix4Zone = AppConfig.Is4ZoneRGB(); static bool isStrixNumpad = AppConfig.IsStrixNumpad(); static public bool isSingleColor = false; static System.Timers.Timer timer = new System.Timers.Timer(1000); private static Dictionary _modesSingleColor = new Dictionary { { AuraMode.AuraStatic, Properties.Strings.AuraStatic }, { AuraMode.AuraBreathe, Properties.Strings.AuraBreathe }, { AuraMode.AuraStrobe, Properties.Strings.AuraStrobe }, }; private static Dictionary _modes = new Dictionary { { AuraMode.AuraStatic, Properties.Strings.AuraStatic }, { AuraMode.AuraBreathe, Properties.Strings.AuraBreathe }, { AuraMode.AuraColorCycle, Properties.Strings.AuraColorCycle }, { AuraMode.AuraRainbow, Properties.Strings.AuraRainbow }, { AuraMode.AuraStrobe, Properties.Strings.AuraStrobe }, { AuraMode.HEATMAP, "Heatmap"}, { AuraMode.GPUMODE, "GPU Mode" }, { AuraMode.AMBIENT, "Ambient"}, { AuraMode.BATTERY, "Battery"}, }; private static Dictionary _modesDynamicLighting = new Dictionary { { AuraMode.AuraStatic, Properties.Strings.AuraStatic }, { AuraMode.AuraBreathe, Properties.Strings.AuraColorCycle }, { AuraMode.AuraRainbow, Properties.Strings.AuraRainbow }, { AuraMode.AuraStrobe, Properties.Strings.AuraStrobe }, }; private static Dictionary _modesAlly = new Dictionary { { AuraMode.AuraStatic, Properties.Strings.AuraStatic }, { AuraMode.AuraBreathe, Properties.Strings.AuraBreathe }, { AuraMode.AuraColorCycle, Properties.Strings.AuraColorCycle }, { AuraMode.AuraRainbow, Properties.Strings.AuraRainbow }, { AuraMode.AuraStrobe, Properties.Strings.AuraStrobe }, { AuraMode.BATTERY, "Battery"}, }; private static Dictionary _modesStrix = new Dictionary { { AuraMode.AuraStatic, Properties.Strings.AuraStatic }, { AuraMode.AuraBreathe, Properties.Strings.AuraBreathe }, { AuraMode.AuraColorCycle, Properties.Strings.AuraColorCycle }, { AuraMode.AuraRainbow, Properties.Strings.AuraRainbow }, { AuraMode.Star, "Star" }, { AuraMode.Rain, "Rain" }, { AuraMode.Highlight, "Highlight" }, { AuraMode.Laser, "Laser" }, { AuraMode.Ripple, "Ripple" }, { AuraMode.AuraStrobe, Properties.Strings.AuraStrobe}, { AuraMode.Comet, "Comet" }, { AuraMode.Flash, "Flash" }, { AuraMode.HEATMAP, "Heatmap"}, { AuraMode.AMBIENT, "Ambient"}, { AuraMode.BATTERY, "Battery"}, }; static Aura() { timer.Elapsed += Timer_Elapsed; isSingleColor = AppConfig.IsSingleColor(); // Mono Color if (AppConfig.ContainsModel("GA402X") || AppConfig.ContainsModel("GA402N")) { var device = AsusHid.FindDevices(AsusHid.AURA_ID).FirstOrDefault(); if (device is null) return; Logger.WriteLine($"USB Version: {device.ReleaseNumberBcd} {device.ReleaseNumber}"); if (device.ReleaseNumberBcd >= 22 && device.ReleaseNumberBcd <= 25) isSingleColor = true; } } public static Dictionary GetSpeeds() { return new Dictionary { { AuraSpeed.Slow, Properties.Strings.AuraSlow }, { AuraSpeed.Normal, Properties.Strings.AuraNormal }, { AuraSpeed.Fast, Properties.Strings.AuraFast } }; } public static Dictionary GetModes() { if (isACPI) { _modes.Remove(AuraMode.AuraRainbow); } if (isSingleColor) { return _modesSingleColor; } if (AppConfig.IsDynamicLightingOnly()) { return _modesDynamicLighting; } if (AppConfig.IsAlly()) { return _modesAlly; } if (AppConfig.IsAdvantageEdition()) { return _modes; } if (AppConfig.IsAdvancedRGB() && !AppConfig.Is4ZoneRGB()) { return _modesStrix; } return _modes; } public static AuraMode Mode { get { return mode; } set { mode = GetModes().ContainsKey(value) ? value : AuraMode.AuraStatic; } } public static AuraSpeed Speed { get { return speed; } set { speed = GetSpeeds().ContainsKey(value) ? value : AuraSpeed.Normal; } } public static void SetColor(int colorCode) { Color1 = Color.FromArgb(colorCode); } public static void SetColor2(int colorCode) { Color2 = Color.FromArgb(colorCode); } public static bool HasSecondColor() { return mode == AuraMode.AuraBreathe && !isACPI; } private static void Timer_Elapsed(object? sender, System.Timers.ElapsedEventArgs e) { if (!InputDispatcher.backlightActivity) return; if (Mode == AuraMode.HEATMAP) { CustomRGB.ApplyHeatmap(); } else if (Mode == AuraMode.BATTERY) { CustomRGB.ApplyBattery(); } else if (Mode == AuraMode.AMBIENT) { CustomRGB.ApplyAmbient(); } } public static byte[] AuraMessage(AuraMode mode, Color color, Color color2, int speed, bool mono = false) { byte[] msg = new byte[17]; msg[0] = AsusHid.AURA_ID; msg[1] = 0xB3; msg[2] = 0x00; // Zone msg[3] = (byte)mode; // Aura Mode msg[4] = color.R; // R msg[5] = mono ? (byte)0 : color.G; // G msg[6] = mono ? (byte)0 : color.B; // B msg[7] = (byte)speed; // aura.speed as u8; msg[8] = 0x00; // aura.direction as u8; msg[9] = (color.R == 0 && color.G == 0 && color.B == 0) ? (byte)0xFF : (mode == AuraMode.AuraBreathe ? (byte)0x01 : (byte)0x00); // random color flag msg[10] = color2.R; // R msg[11] = mono ? (byte)0 : color2.G; // G msg[12] = mono ? (byte)0 : color2.B; // B return msg; } public static void Init() { AsusHid.Write(new List { new byte[] { AsusHid.AURA_ID, 0xB9 }, Encoding.ASCII.GetBytes("]ASUS Tech.Inc."), new byte[] { AsusHid.AURA_ID, 0x05, 0x20, 0x31, 0, 0x1A }, }, "Init"); if (AppConfig.IsZ13()) AsusHid.Write([AsusHid.AURA_ID, 0xC0, 0x03, 0x01], "Dynamic Lighting Init"); if (AppConfig.IsProArt()) { AsusHid.WriteInput([AsusHid.INPUT_ID, 0x05, 0x20, 0x31, 0x00, 0x08], "ProArt Init"); //AsusHid.WriteInput([AsusHid.INPUT_ID, 0xD0, 0x4E], "ProArt Init"); AsusHid.WriteInput([AsusHid.INPUT_ID, 0xBA, 0xC5, 0xC4], "ProArt Init"); AsusHid.WriteInput([AsusHid.INPUT_ID, 0xD0, 0x8F, 0x01], "ProArt Init"); AsusHid.WriteInput([AsusHid.INPUT_ID, 0xD0, 0x85, 0xFF], "ProArt Init"); //AsusHid.WriteInput([AsusHid.INPUT_ID, 0xD0, 0x4E], "ProArt Init"); } InputDispatcher.InitFNLock(); } public static void SleepBrightness() { if (!AppConfig.IsSleepBacklight() || !AppConfig.Is("keyboard_sleep")) ApplyBrightness(0, "Sleep"); } public static void ApplyBrightness(int brightness, string log = "Backlight", bool delay = false) { if (brightness == 0) backlight = false; Task.Run(async () => { if (delay) await Task.Delay(TimeSpan.FromSeconds(1)); DirectBrightness(brightness, log); if (AppConfig.IsAlly()) ApplyAura(); if (brightness > 0) { if (!backlight) initDirect = true; backlight = true; } }); } public static void DirectBrightness(int brightness, string log) { if (isACPI) Program.acpi.TUFKeyboardBrightness(brightness, log); if (AppConfig.IsInputBacklight()) AsusHid.WriteInput([AsusHid.INPUT_ID, 0xBA, 0xC5, 0xC4, (byte)brightness], log); else AsusHid.Write([AsusHid.AURA_ID, 0xBA, 0xC5, 0xC4, (byte)brightness], log); } static byte[] AuraPowerMessage(AuraPower flags) { byte keyb = 0, bar = 0, lid = 0, rear = 0; if (flags.BootLogo) keyb |= 1 << 0; if (flags.BootKeyb) keyb |= 1 << 1; if (flags.AwakeLogo) keyb |= 1 << 2; if (flags.AwakeKeyb) keyb |= 1 << 3; if (flags.SleepLogo) keyb |= 1 << 4; if (flags.SleepKeyb) keyb |= 1 << 5; if (flags.ShutdownLogo) keyb |= 1 << 6; if (flags.ShutdownKeyb) keyb |= 1 << 7; if (flags.AwakeBar) bar |= 1 << 0; if (flags.BootBar) bar |= 1 << 1; if (flags.AwakeBar) bar |= 1 << 2; if (flags.SleepBar) bar |= 1 << 3; if (flags.ShutdownBar) bar |= 1 << 4; if (flags.BootLid) lid |= 1 << 0; if (flags.AwakeLid) lid |= 1 << 1; if (flags.SleepLid) lid |= 1 << 2; if (flags.ShutdownLid) lid |= 1 << 3; if (flags.BootLid) lid |= 1 << 4; if (flags.AwakeLid) lid |= 1 << 5; if (flags.SleepLid) lid |= 1 << 6; if (flags.ShutdownLid) lid |= 1 << 7; if (flags.BootRear) rear |= 1 << 0; if (flags.AwakeRear) rear |= 1 << 1; if (flags.SleepRear) rear |= 1 << 2; if (flags.ShutdownRear) rear |= 1 << 3; if (flags.BootRear) rear |= 1 << 4; if (flags.AwakeRear) rear |= 1 << 5; if (flags.SleepRear) rear |= 1 << 6; if (flags.ShutdownRear) rear |= 1 << 7; return new byte[] { AsusHid.AURA_ID, 0xBD, 0x01, keyb, bar, lid, rear, 0xFF }; } private static void ApplyAllyPower(AuraPower flags) { byte power = 0x00; if (flags.BootKeyb) power |= 0x01; if (flags.AwakeKeyb) power |= 0x02; if (flags.SleepKeyb) power |= 0x04; if (flags.ShutdownKeyb) power |= 0x08; AsusHid.WriteInput(new byte[] { AsusHid.INPUT_ID, 0xD1, 0x09, 0x01, power }, "Aura"); } public static void ApplyPowerOff() { AsusHid.Write(AuraPowerMessage(new AuraPower())); } public static void ApplyPower() { bool backlightBattery = AppConfig.IsBacklightZones() && (SystemInformation.PowerStatus.PowerLineStatus != PowerLineStatus.Online); AuraPower flags = new(); // Keyboard flags.AwakeKeyb = backlightBattery ? AppConfig.IsOnBattery("keyboard_awake") : AppConfig.IsNotFalse("keyboard_awake"); flags.BootKeyb = AppConfig.IsNotFalse("keyboard_boot"); flags.SleepKeyb = AppConfig.IsNotFalse("keyboard_sleep"); flags.ShutdownKeyb = AppConfig.IsNotFalse("keyboard_shutdown"); // Logo flags.AwakeLogo = backlightBattery ? AppConfig.IsOnBattery("keyboard_awake_logo") : AppConfig.IsNotFalse("keyboard_awake_logo"); flags.BootLogo = AppConfig.IsNotFalse("keyboard_boot_logo"); flags.SleepLogo = AppConfig.IsNotFalse("keyboard_sleep_logo"); flags.ShutdownLogo = AppConfig.IsNotFalse("keyboard_shutdown_logo"); // Lightbar flags.AwakeBar = backlightBattery ? AppConfig.IsOnBattery("keyboard_awake_bar") : AppConfig.IsNotFalse("keyboard_awake_bar"); flags.BootBar = AppConfig.IsNotFalse("keyboard_boot_bar"); flags.SleepBar = AppConfig.IsNotFalse("keyboard_sleep_bar"); flags.ShutdownBar = AppConfig.IsNotFalse("keyboard_shutdown_bar"); // Lid flags.AwakeLid = backlightBattery ? AppConfig.IsOnBattery("keyboard_awake_lid") : AppConfig.IsNotFalse("keyboard_awake_lid"); flags.BootLid = AppConfig.IsNotFalse("keyboard_boot_lid"); flags.SleepLid = AppConfig.IsNotFalse("keyboard_sleep_lid"); flags.ShutdownLid = AppConfig.IsNotFalse("keyboard_shutdown_lid"); // Rear Bar flags.AwakeRear = backlightBattery ? AppConfig.IsOnBattery("keyboard_awake_lid") : AppConfig.IsNotFalse("keyboard_awake_lid"); flags.BootRear = AppConfig.IsNotFalse("keyboard_boot_lid"); flags.SleepRear = AppConfig.IsNotFalse("keyboard_sleep_lid"); flags.ShutdownRear = AppConfig.IsNotFalse("keyboard_shutdown_lid"); // On Z13 back panel light is controlled by mix of different flags, so merging them together if (AppConfig.IsZ13()) { flags.AwakeBar = flags.AwakeLid = flags.AwakeLogo; flags.BootBar = flags.BootLid = flags.BootLogo; flags.SleepBar = flags.SleepLid = flags.SleepLogo; flags.ShutdownBar = flags.ShutdownLid = flags.ShutdownLogo; } if (AppConfig.IsAlly()) { ApplyAllyPower(flags); return; } AsusHid.Write(AuraPowerMessage(flags)); if (isACPI) Program.acpi.TUFKeyboardPower( flags.AwakeKeyb, flags.BootKeyb, flags.SleepKeyb, flags.ShutdownKeyb); } static byte[] packetMap = new byte[] { /* VDN VUP MICM HPFN ARMC */ 2, 3, 4, 5, 6, /* ESC F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 DEL15 DEL17 PAUS PRT HOME */ 21, 23, 24, 25, 26, 28, 29, 30, 31, 33, 34, 35, 36, 37, 38, 39, 40, 41, /* BKTK 1 2 3 4 5 6 7 8 9 0 - = BSPC BSPC BSPC PLY15 NMLK NMDV NMTM NMMI */ 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, /* TAB Q W E R T Y U I O P [ ] \ STP15 NM7 NM8 NM9 NMPL */ 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 79, 80, 81, 82, 83, /* CPLK A S D F G H J K L ; " # ENTR ENTR ENTR PRV15 NM4 NM5 NM6 NMPL */ 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, /* LSFT ISO\ Z X C V B N M , . / RSFT RSFT RSFT ARWU NXT15 NM1 NM2 NM3 NMER */ 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 139, 121, 122, 123, 124, 125, /* LCTL LFNC LWIN LALT SPC RALT RFNC RCTL ARWL ARWD ARWR PRT15 NM0 NMPD NMER */ 126, 127, 128, 129, 131, 135, 136, 137, 159, 160, 161, 142, 144, 145, 146, /* LB1 LB2 LB3 ARW? ARWL? ARWD? ARWR? LB4 LB5 LB6 */ 174, 173, 172, 120, 140, 141, 143, 171, 170, 169, /* KSTN LOGO LIDL LIDR */ 0, 167, 176, 177, }; static byte[] packetZone = new byte[] { /* VDN VUP MICM HPFN ARMC */ 0, 0, 1, 1, 1, /* ESC F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 DEL15 DEL17 PAUS PRT HOM */ 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, /* BKTK 1 2 3 4 5 6 7 8 9 0 - = BSPC BSPC BSPC PLY15 NMLK NMDV NMTM NMMI */ 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, /* TAB Q W E R T Y U I O P [ ] \ STP15 NM7 NM8 NM9 NMPL */ 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, /* CPLK A S D F G H J K L ; " # ENTR ENTR ENTR PRV15 NM4 NM5 NM6 NMPL */ 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, /* LSFT ISO\ Z X C V B N M , . / RSFT RSFT RSFT ARWU NXT15 NM1 NM2 NM3 NMER */ 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, /* LCTL LFNC LWIN LALT SPC RALT RFNC RCTL ARWL ARWD ARWR PRT15 NM0 NMPD NMER */ 0, 0, 0, 0, 1, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, /* LB1 LB1 LB3 ARW? ARW? ARW? ARW? LB4 LB5 LB6 */ 5, 5, 4, 3, 3, 3, 3, 6, 7, 7, /* KSTN LOGO LIDL LIDR */ 3, 0, 0, 3, }; static byte[] packetZoneNumpad = new byte[] { /* VDN VUP MICM HPFN ARMC */ 0, 0, 0, 1, 1, /* ESC F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 DEL15 DEL17 PAUS PRT HOM */ 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, /* BKTK 1 2 3 4 5 6 7 8 9 0 - = BSPC BSPC BSPC PLY15 NMLK NMDV NMTM NMMI */ 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, /* TAB Q W E R T Y U I O P [ ] \ STP15 NM7 NM8 NM9 NMPL */ 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, /* CPLK A S D F G H J K L ; " # ENTR ENTR ENTR PRV15 NM4 NM5 NM6 NMPL */ 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, /* LSFT ISO\ Z X C V B N M , . / RSFT RSFT RSFT ARWU NXT15 NM1 NM2 NM3 NMER */ 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, /* LCTL LFNC LWIN LALT SPC RALT RFNC RCTL ARWL ARWD ARWR PRT15 NM0 NMPD NMER */ 0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, /* LB1 LB1 LB3 ARW? ARW? ARW? ARW? LB4 LB5 LB6 */ 5, 5, 4, 2, 2, 2, 3, 6, 7, 7, /* KSTN LOGO LIDL LIDR */ 3, 0, 0, 3, }; static byte[] packet4Zone = new byte[] { /*01 Z1 Z2 Z3 Z4 NA NA KeyZone */ 0, 1, 2, 3, 0, 0, /*02 RR R RM LM L LL LighBar */ 7, 7, 6, 5, 4, 4, }; public static void ApplyDirect(Color[] color, bool init = false) { if (!backlight) return; const byte keySet = 167; const byte ledCount = 178; const ushort mapSize = 3 * ledCount; const byte ledsPerPacket = 16; byte[] buffer = new byte[64]; byte[] keyBuf = new byte[mapSize]; buffer[0] = AsusHid.AURA_ID; buffer[1] = 0xBC; buffer[2] = 0; buffer[3] = 1; buffer[4] = 1; buffer[5] = 1; buffer[6] = 0; buffer[7] = 0x10; if (init || initDirect) { initDirect = false; AsusHid.WriteAura(new byte[] { AsusHid.AURA_ID, 0xBC }); } Array.Clear(keyBuf, 0, keyBuf.Length); if (!isStrix4Zone) // per key { for (int ledIndex = 0; ledIndex < packetMap.Count(); ledIndex++) { ushort offset = (ushort)(3 * packetMap[ledIndex]); byte zone = isStrixNumpad ? packetZoneNumpad[ledIndex] : packetZone[ledIndex]; keyBuf[offset] = color[zone].R; keyBuf[offset + 1] = color[zone].G; keyBuf[offset + 2] = color[zone].B; } for (int i = 0; i < keySet; i += ledsPerPacket) { byte ledsRemaining = (byte)(keySet - i); if (ledsRemaining < ledsPerPacket) { buffer[7] = ledsRemaining; } buffer[6] = (byte)i; Buffer.BlockCopy(keyBuf, 3 * i, buffer, 9, 3 * buffer[7]); AsusHid.WriteAura(buffer); } } buffer[4] = 0x04; buffer[5] = 0x00; buffer[6] = 0x00; buffer[7] = 0x00; if (isStrix4Zone) { // per zone var leds_4_zone = packet4Zone.Count(); for (int ledIndex = 0; ledIndex < leds_4_zone; ledIndex++) { byte zone = packet4Zone[ledIndex]; keyBuf[ledIndex * 3] = color[zone].R; keyBuf[ledIndex * 3 + 1] = color[zone].G; keyBuf[ledIndex * 3 + 2] = color[zone].B; } Buffer.BlockCopy(keyBuf, 0, buffer, 9, 3 * leds_4_zone); AsusHid.WriteAura(buffer); return; } Buffer.BlockCopy(keyBuf, 3 * keySet, buffer, 9, 3 * (ledCount - keySet)); AsusHid.WriteAura(buffer); } public static void ApplyDirect(Color color, bool init = false) { if (!backlight) return; if (isACPI) { Program.acpi.TUFKeyboardRGB(0, color, 0, null); return; } if (AppConfig.IsNoDirectRGB()) { AsusHid.Write(new List { AuraMessage(AuraMode.AuraStatic, color, color, 0xeb, isSingleColor), MESSAGE_SET }, null); return; } if (isStrix) { ApplyDirect(Enumerable.Repeat(color, AURA_ZONES).ToArray(), init); return; } if (init || initDirect) { initDirect = false; Init(); AsusHid.WriteAura(new byte[] { AsusHid.AURA_ID, 0xbc, 1 }); } byte[] buffer = new byte[12]; buffer[0] = AsusHid.AURA_ID; buffer[1] = 0xbc; buffer[2] = 1; buffer[3] = 1; buffer[9] = color.R; buffer[10] = color.G; buffer[11] = color.B; AsusHid.WriteAura(buffer); } public static Color ColorDim(Color Color, double colorDim = 1) { switch (InputDispatcher.GetBacklight()) { case 1: colorDim = 0.1; break; case 2: colorDim = 0.3; break; } return Color.FromArgb((int)(Color.R * colorDim), (int)(Color.G * colorDim), (int)(Color.B * colorDim)); } public static void ApplyAura() { Mode = (AuraMode)AppConfig.Get("aura_mode"); Speed = (AuraSpeed)AppConfig.Get("aura_speed"); SetColor(AppConfig.Get("aura_color")); SetColor2(AppConfig.Get("aura_color2")); Color _Color1 = Color1; Color _Color2 = Color2; // Ally lower brightness fix if (AppConfig.IsAlly()) { _Color1 = ColorDim(_Color1); _Color2 = ColorDim(_Color2); } timer.Stop(); Logger.WriteLine($"AuraMode: {Mode}"); if (Mode == AuraMode.HEATMAP) { CustomRGB.ApplyHeatmap(true); timer.Interval = 2000; timer.Start(); return; } if (Mode == AuraMode.BATTERY) { CustomRGB.ApplyBattery(); timer.Interval = 30000; timer.Start(); return; } if (Mode == AuraMode.AMBIENT) { CustomRGB.ApplyAmbient(true); timer.Interval = AppConfig.Get("aura_refresh", AppConfig.IsStrix() ? 100 : 300); timer.Start(); return; } if (Mode == AuraMode.GPUMODE) { CustomRGB.ApplyGPUColor(); return; } if (AppConfig.IsDynamicLightingOnly()) { switch (mode) { case AuraMode.AuraBreathe: DynamicLightingHelper.SetEffect( DynamicLightingEffect.Wave, color: _Color1, color2: _Color2, speed: (int)Speed * 5 ); break; case AuraMode.AuraColorCycle: case AuraMode.AuraRainbow: DynamicLightingHelper.SetEffect( DynamicLightingEffect.Rainbow, speed: (int)Speed * 5 ); break; case AuraMode.AuraStrobe: DynamicLightingHelper.SetEffect( DynamicLightingEffect.Breathing, color: _Color1, speed: 10 ); break; default: DynamicLightingHelper.SetEffect( DynamicLightingEffect.Solid, color: _Color1 ); break; } return; } int _speed = (Speed == AuraSpeed.Normal) ? 0xeb : (Speed == AuraSpeed.Fast) ? 0xf5 : 0xe1; AsusHid.Write(new List { AuraMessage(Mode, _Color1, _Color2, _speed, isSingleColor), MESSAGE_SET, MESSAGE_APPLY }); XGM.LightMode(Mode, _Color1, _Color2, _speed); if (isACPI) Program.acpi.TUFKeyboardRGB(Mode, Color1, _speed); } public static class CustomRGB { static int tempFreeze = AppConfig.Get("temp_freeze", 20); static int tempCold = AppConfig.Get("temp_cold", 40); static int tempWarm = AppConfig.Get("temp_warm", 65); static int tempHot = AppConfig.Get("temp_hot", 90); static Color colorFreeze = ColorTranslator.FromHtml(AppConfig.GetString("color_freeze", "#0000FF")); static Color colorCold = ColorTranslator.FromHtml(AppConfig.GetString("color_cold", "#008000")); static Color colorWarm = ColorTranslator.FromHtml(AppConfig.GetString("color_warm", "#FFFF00")); static Color colorHot = ColorTranslator.FromHtml(AppConfig.GetString("color_hot", "#FF0000")); static float battLow = 20f; static float battMid = 60f; static float battHigh = 100f; static Color colorLow = Color.Red; static Color colorMid = Color.Yellow; static Color colorHigh = Color.Lime; static Color colorUltimate = ColorTranslator.FromHtml(AppConfig.GetString("color_ultimate", "#FF0000")); static Color colorStandard = ColorTranslator.FromHtml(AppConfig.GetString("color_standard", "#FFFF00")); static Color colorEco = ColorTranslator.FromHtml(AppConfig.GetString("color_eco", "#008000")); public static void ApplyGPUColor(int gpuMode = -1) { if ((AuraMode)AppConfig.Get("aura_mode") != AuraMode.GPUMODE) return; Color color; if (gpuMode < 0) gpuMode = GPUModeControl.gpuMode; switch (gpuMode) { case AsusACPI.GPUModeUltimate: color = colorUltimate; break; case AsusACPI.GPUModeEco: color = colorEco; break; default: color = colorStandard; break; } if (isACPI) Program.acpi.TUFKeyboardRGB(AuraMode.AuraStatic, color, 0xeb, $"TUF RGB GPU {gpuMode}"); AsusHid.Write(new List { AuraMessage(AuraMode.AuraStatic, color, color, 0xeb, isSingleColor), MESSAGE_APPLY, MESSAGE_SET }); } public static void ApplyHeatmap(bool init = false) { float cpuTemp = (float)HardwareControl.GetCPUTemp(); Color color = colorFreeze; if (cpuTemp < tempCold) color = ColorUtils.GetWeightedAverage(colorFreeze, colorCold, ((float)cpuTemp - tempFreeze) / (tempCold - tempFreeze)); else if (cpuTemp < tempWarm) color = ColorUtils.GetWeightedAverage(colorCold, colorWarm, ((float)cpuTemp - tempCold) / (tempWarm - tempCold)); else if (cpuTemp < tempHot) color = ColorUtils.GetWeightedAverage(colorWarm, colorHot, ((float)cpuTemp - tempWarm) / (tempHot - tempWarm)); else color = colorHot; ApplyDirect(color, init); } public static void ApplyBattery() { float battery = (float)HardwareControl.GetBatteryChargePercentage(); Color color = colorLow; if (battery < battLow) { color = colorLow; } else if (battery < battMid) { // Low → Mid float t = (battery - battLow) / (battMid - battLow); color = ColorUtils.GetWeightedAverage(colorLow, colorMid, t); } else if (battery < battHigh) { // Mid → High float t = (battery - battMid) / (battHigh - battMid); color = ColorUtils.GetWeightedAverage(colorMid, colorHigh, t); } else { color = colorHigh; } if (AppConfig.IsAlly()) color = ColorDim(color); AsusHid.Write(new List { AuraMessage(AuraMode.AuraStatic, color, color, 0xeb, isSingleColor), MESSAGE_APPLY, MESSAGE_SET }); if (isACPI) Program.acpi.TUFKeyboardRGB(AuraMode.AuraStatic, color, 0xeb); } public static void ApplyAmbient(bool init = false) { if (!backlight || sessionLock) return; var bound = Screen.GetBounds(Point.Empty); bound.Y += bound.Height / 3; bound.Height -= (int)Math.Round(bound.Height * (0.33f + 0.022f)); // cut 1/3 of the top screen + windows panel Bitmap screen_low = AmbientData.CamptureScreen(bound, 512, 288); //quality decreases greatly if it is less 512 ; Bitmap screeb_pxl = AmbientData.ResizeImage(screen_low, 4, 2); // 4x2 zone. top for keyboard and bot for lightbar; int zones = AURA_ZONES; if (isStrix) // laptop with lightbar { var mid_left = ColorUtils.GetMidColor(screeb_pxl.GetPixel(0, 1), screeb_pxl.GetPixel(1, 1)); var mid_right = ColorUtils.GetMidColor(screeb_pxl.GetPixel(2, 1), screeb_pxl.GetPixel(3, 1)); AmbientData.Colors[4].RGB = ColorUtils.HSV.UpSaturation(screeb_pxl.GetPixel(1, 1)); // left bck AmbientData.Colors[5].RGB = ColorUtils.HSV.UpSaturation(mid_left); // center left AmbientData.Colors[6].RGB = ColorUtils.HSV.UpSaturation(mid_right); // center right AmbientData.Colors[7].RGB = ColorUtils.HSV.UpSaturation(screeb_pxl.GetPixel(3, 1)); // right bck for (int i = 0; i < 4; i++) // keyboard AmbientData.Colors[i].RGB = ColorUtils.HSV.UpSaturation(screeb_pxl.GetPixel(i, 0)); } else { zones = 1; AmbientData.Colors[0].RGB = ColorUtils.HSV.UpSaturation(ColorUtils.GetDominantColor(screeb_pxl), (float)0.3); } //screen_low.Save("big.jpg", ImageFormat.Jpeg); //screeb_pxl.Save("small.jpg", ImageFormat.Jpeg); screen_low.Dispose(); screeb_pxl.Dispose(); bool is_fresh = init; for (int i = 0; i < zones; i++) { if (AmbientData.result[i].ToArgb() != AmbientData.Colors[i].RGB.ToArgb()) is_fresh = true; AmbientData.result[i] = AmbientData.Colors[i].RGB; } if (is_fresh) { if (isStrix) ApplyDirect(AmbientData.result, init); else ApplyDirect(AmbientData.result[0], init); } } static class AmbientData { public enum StretchMode { STRETCH_ANDSCANS = 1, STRETCH_ORSCANS = 2, STRETCH_DELETESCANS = 3, STRETCH_HALFTONE = 4, } [DllImport("user32.dll")] private static extern IntPtr GetDesktopWindow(); [DllImport("user32.dll")] private static extern IntPtr GetWindowDC(IntPtr hWnd); [DllImport("gdi32.dll")] private static extern IntPtr CreateCompatibleDC(IntPtr hDC); [DllImport("gdi32.dll")] private static extern IntPtr CreateCompatibleBitmap(IntPtr hDC, int nWidth, int nHeight); [DllImport("gdi32.dll")] private static extern IntPtr SelectObject(IntPtr hDC, IntPtr hObject); [DllImport("user32.dll")] private static extern bool ReleaseDC(IntPtr hWnd, IntPtr hDC); [DllImport("gdi32.dll")] private static extern bool DeleteDC(IntPtr hdc); [DllImport("gdi32.dll")] private static extern bool DeleteObject(IntPtr hObject); [DllImport("gdi32.dll")] private static extern bool StretchBlt(IntPtr hdcDest, int nXOriginDest, int nYOriginDest, int nWidthDest, int nHeightDest, IntPtr hdcSrc, int nXOriginSrc, int nYOriginSrc, int nWidthSrc, int nHeightSrc, Int32 dwRop); [DllImport("gdi32.dll")] static extern bool SetStretchBltMode(IntPtr hdc, StretchMode iStretchMode); /// /// Captures a screenshot. /// public static Bitmap CamptureScreen(Rectangle rec, int out_w, int out_h) { IntPtr desktop = GetDesktopWindow(); IntPtr hdc = GetWindowDC(desktop); IntPtr hdcMem = CreateCompatibleDC(hdc); IntPtr hBitmap = CreateCompatibleBitmap(hdc, out_w, out_h); IntPtr hOld = SelectObject(hdcMem, hBitmap); SetStretchBltMode(hdcMem, StretchMode.STRETCH_DELETESCANS); StretchBlt(hdcMem, 0, 0, out_w, out_h, hdc, rec.X, rec.Y, rec.Width, rec.Height, 0x00CC0020); SelectObject(hdcMem, hOld); DeleteDC(hdcMem); ReleaseDC(desktop, hdc); var result = Image.FromHbitmap(hBitmap, IntPtr.Zero); DeleteObject(hBitmap); return result; } public static Bitmap ResizeImage(Image image, int width, int height) { var destRect = new Rectangle(0, 0, width, height); var destImage = new Bitmap(width, height); destImage.SetResolution(image.HorizontalResolution, image.VerticalResolution); using (var graphics = Graphics.FromImage(destImage)) { graphics.CompositingMode = CompositingMode.SourceCopy; graphics.CompositingQuality = CompositingQuality.HighQuality; graphics.InterpolationMode = InterpolationMode.Bicubic; graphics.SmoothingMode = SmoothingMode.None; graphics.PixelOffsetMode = PixelOffsetMode.None; using (var wrapMode = new ImageAttributes()) { wrapMode.SetWrapMode(WrapMode.TileFlipXY); graphics.DrawImage(image, destRect, 0, 0, image.Width, image.Height, GraphicsUnit.Pixel, wrapMode); } } return destImage; } static public Color[] result = new Color[AURA_ZONES]; static public ColorUtils.SmoothColor[] Colors = Enumerable.Repeat(0, AURA_ZONES). Select(h => new ColorUtils.SmoothColor()).ToArray(); public static Color GetMostUsedColor(Bitmap bitMap) { var colorIncidence = new Dictionary(); for (var x = 0; x < bitMap.Size.Width; x++) for (var y = 0; y < bitMap.Size.Height; y++) { var pixelColor = bitMap.GetPixel(x, y).ToArgb(); if (colorIncidence.Keys.Contains(pixelColor)) colorIncidence[pixelColor]++; else colorIncidence.Add(pixelColor, 1); } return Color.FromArgb(colorIncidence.OrderByDescending(x => x.Value).ToDictionary(x => x.Key, x => x.Value).First().Key); } } } } } ================================================ FILE: app/USB/XGM.cs ================================================ // Reference : thanks to https://github.com/RomanYazvinsky/ for initial discovery of XGM payloads using GHelper.Helpers; using HidSharp; using System.Text; namespace GHelper.USB { public static class XGM { const byte XGM_REPORT_ID = 0x5e; const int ASUS_ID = 0x0b05; static readonly int[] deviceIds = { 0x1970, 0x1a9a, 0x1C29 }; public static HidDevice? GetDevice() { try { /* var devices = DeviceList.Local.GetHidDevices(ASUS_ID).Where(device => deviceIds.Contains(device.ProductID) && device.CanOpen && device.GetMaxFeatureReportLength() >= 300); foreach (var device in devices) { var report = device.GetReportDescriptor().TryGetReport(ReportType.Feature, XGM_REPORT_ID, out _); Logger.WriteLine($"Found XGM Device: PID={device.ProductID}, MaxFeatureReportLength={device.GetMaxFeatureReportLength()}, Report={report}"); } */ return DeviceList.Local.GetHidDevices(ASUS_ID).FirstOrDefault(device => deviceIds.Contains(device.ProductID) && device.CanOpen && device.GetMaxFeatureReportLength() >= 300); } catch (Exception ex) { Logger.WriteLine($"Error getting XGM device: {ex}"); return null; } } public static bool IsConnected() { return GetDevice() is not null; } public static void Write(byte[] data) { try { HidDevice? device = GetDevice(); if (device is null) { Logger.WriteLine("XGM SUB device not found"); return; } using (HidStream hidStream = device.Open()) { byte[] payload = new byte[300]; data.CopyTo(payload, 0); hidStream.SetFeature(payload); Logger.WriteLine($"XGM-{device.ProductID}|{device.GetMaxFeatureReportLength()}:{BitConverter.ToString(data)}"); } } catch (Exception ex) { Logger.WriteLine($"Error accessing XGM device: {ex}"); } } public static void Init() { Task.Run(() => { if (IsConnected()) { Write(Encoding.ASCII.GetBytes("^ASUS Tech.Inc.")); Light(AppConfig.Is("xmg_light")); } }); } public static void Light(bool status) { Write([XGM_REPORT_ID, 0xc5, status ? (byte)0x50 : (byte)0]); Write([XGM_REPORT_ID, 0xbd, 0x00, status ? (byte)0x01 : (byte)0x00]); } public static void LightMode(AuraMode mode, Color color, Color color2, int speed) { Task.Run(() => { if (IsConnected()) { var msg = Aura.AuraMessage(mode, color, color2, speed); msg[0] = XGM_REPORT_ID; Write(msg); Write([XGM_REPORT_ID, 0xb4]); Write([XGM_REPORT_ID, 0xb5]); } }); } public static void InitLight() { Task.Run(() => { if (IsConnected()) Light(AppConfig.Is("xmg_light")); }); } public static void Reset() { Task.Run(() => { if (IsConnected()) Write([XGM_REPORT_ID, 0xd1, 0x02]); }); } public static void SetFan(byte[] curve) { Task.Run(() => { if (AsusACPI.IsInvalidCurve(curve)) return; if (IsConnected()) Write([XGM_REPORT_ID, 0xd1, 0x01, .. curve]); }); } } } ================================================ FILE: app/Updates.Designer.cs ================================================ using GHelper.UI; namespace GHelper { partial class Updates { /// /// Required designer variable. /// private System.ComponentModel.IContainer components = null; /// /// Clean up any resources being used. /// /// true if managed resources should be disposed; otherwise, false. protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } #region Windows Form Designer generated code /// /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// private void InitializeComponent() { components = new System.ComponentModel.Container(); tableBios = new TableLayoutPanel(); labelBIOS = new Label(); pictureBios = new PictureBox(); panelBiosTitle = new Panel(); labelUpdates = new Label(); buttonRefresh = new RButton(); panelBios = new Panel(); panelDrivers = new Panel(); tableDrivers = new TableLayoutPanel(); panelDriversTitle = new Panel(); labelDrivers = new Label(); pictureDrivers = new PictureBox(); tableLayoutLegend = new TableLayoutPanel(); labelSerialTitle = new Label(); labelLegendGreen = new Label(); labelLegendGray = new Label(); labelLegendRed = new Label(); labelLegend = new Label(); toolTip = new ToolTip(components); textSerial = new TextBox(); ((System.ComponentModel.ISupportInitialize)pictureBios).BeginInit(); panelBiosTitle.SuspendLayout(); panelBios.SuspendLayout(); panelDrivers.SuspendLayout(); panelDriversTitle.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)pictureDrivers).BeginInit(); tableLayoutLegend.SuspendLayout(); SuspendLayout(); // // tableBios // tableBios.AutoSize = true; tableBios.AutoSizeMode = AutoSizeMode.GrowAndShrink; tableBios.ColumnCount = 4; tableBios.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 23F)); tableBios.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 40F)); tableBios.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 15F)); tableBios.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 22F)); tableBios.Dock = DockStyle.Top; tableBios.Location = new Point(20, 20); tableBios.Margin = new Padding(4); tableBios.MinimumSize = new Size(1300, 0); tableBios.Name = "tableBios"; tableBios.Size = new Size(1300, 0); tableBios.TabIndex = 0; // // labelBIOS // labelBIOS.AutoSize = true; labelBIOS.Font = new Font("Segoe UI", 9F, FontStyle.Bold); labelBIOS.Location = new Point(68, 23); labelBIOS.Margin = new Padding(4, 0, 4, 0); labelBIOS.Name = "labelBIOS"; labelBIOS.Size = new Size(68, 32); labelBIOS.TabIndex = 1; labelBIOS.Text = "BIOS"; // // pictureBios // pictureBios.BackgroundImage = Properties.Resources.icons8_processor_32; pictureBios.BackgroundImageLayout = ImageLayout.Zoom; pictureBios.Location = new Point(28, 23); pictureBios.Margin = new Padding(4); pictureBios.Name = "pictureBios"; pictureBios.Size = new Size(32, 32); pictureBios.TabIndex = 2; pictureBios.TabStop = false; // // panelBiosTitle // panelBiosTitle.Controls.Add(labelUpdates); panelBiosTitle.Controls.Add(buttonRefresh); panelBiosTitle.Controls.Add(labelBIOS); panelBiosTitle.Controls.Add(pictureBios); panelBiosTitle.Dock = DockStyle.Top; panelBiosTitle.Location = new Point(0, 0); panelBiosTitle.Margin = new Padding(4); panelBiosTitle.Name = "panelBiosTitle"; panelBiosTitle.Size = new Size(1236, 60); panelBiosTitle.TabIndex = 3; // // labelUpdates // labelUpdates.Anchor = AnchorStyles.Top | AnchorStyles.Right; labelUpdates.Font = new Font("Segoe UI", 9F, FontStyle.Bold); labelUpdates.Location = new Point(864, 19); labelUpdates.Name = "labelUpdates"; labelUpdates.Size = new Size(302, 32); labelUpdates.TabIndex = 4; labelUpdates.Text = "Updates Available"; // // buttonRefresh // buttonRefresh.Activated = false; buttonRefresh.Anchor = AnchorStyles.Top | AnchorStyles.Right; buttonRefresh.BackColor = SystemColors.ControlLight; buttonRefresh.BorderColor = Color.Transparent; buttonRefresh.BorderRadius = 5; buttonRefresh.FlatAppearance.BorderSize = 0; buttonRefresh.FlatStyle = FlatStyle.Flat; buttonRefresh.Image = Properties.Resources.icons8_refresh_32; buttonRefresh.Location = new Point(1172, 11); buttonRefresh.Name = "buttonRefresh"; buttonRefresh.Secondary = true; buttonRefresh.Size = new Size(52, 46); buttonRefresh.TabIndex = 1; buttonRefresh.UseVisualStyleBackColor = false; // // panelBios // panelBios.AutoSize = true; panelBios.Controls.Add(tableBios); panelBios.Dock = DockStyle.Top; panelBios.Location = new Point(0, 60); panelBios.Margin = new Padding(4); panelBios.Name = "panelBios"; panelBios.Padding = new Padding(20); panelBios.Size = new Size(1236, 40); panelBios.TabIndex = 4; // // panelDrivers // panelDrivers.AutoSize = true; panelDrivers.Controls.Add(tableDrivers); panelDrivers.Dock = DockStyle.Top; panelDrivers.Location = new Point(0, 144); panelDrivers.Margin = new Padding(4); panelDrivers.Name = "panelDrivers"; panelDrivers.Padding = new Padding(20); panelDrivers.Size = new Size(1236, 40); panelDrivers.TabIndex = 6; // // tableDrivers // tableDrivers.AutoSize = true; tableDrivers.AutoSizeMode = AutoSizeMode.GrowAndShrink; tableDrivers.ColumnCount = 4; tableDrivers.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 23F)); tableDrivers.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 40F)); tableDrivers.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 15F)); tableDrivers.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 22F)); tableDrivers.Dock = DockStyle.Top; tableDrivers.Location = new Point(20, 20); tableDrivers.Margin = new Padding(4); tableDrivers.MinimumSize = new Size(1300, 0); tableDrivers.Name = "tableDrivers"; tableDrivers.Size = new Size(1300, 0); tableDrivers.TabIndex = 0; // // panelDriversTitle // panelDriversTitle.Controls.Add(labelDrivers); panelDriversTitle.Controls.Add(pictureDrivers); panelDriversTitle.Dock = DockStyle.Top; panelDriversTitle.Location = new Point(0, 100); panelDriversTitle.Margin = new Padding(4); panelDriversTitle.Name = "panelDriversTitle"; panelDriversTitle.Size = new Size(1236, 44); panelDriversTitle.TabIndex = 5; // // labelDrivers // labelDrivers.AutoSize = true; labelDrivers.Font = new Font("Segoe UI", 9F, FontStyle.Bold); labelDrivers.Location = new Point(68, 6); labelDrivers.Margin = new Padding(4, 0, 4, 0); labelDrivers.Name = "labelDrivers"; labelDrivers.Size = new Size(254, 32); labelDrivers.TabIndex = 1; labelDrivers.Text = "Drivers and Software"; // // pictureDrivers // pictureDrivers.BackgroundImage = Properties.Resources.icons8_software_32; pictureDrivers.BackgroundImageLayout = ImageLayout.Zoom; pictureDrivers.Location = new Point(28, 6); pictureDrivers.Margin = new Padding(4); pictureDrivers.Name = "pictureDrivers"; pictureDrivers.Size = new Size(32, 32); pictureDrivers.TabIndex = 2; pictureDrivers.TabStop = false; // // tableLayoutLegend // tableLayoutLegend.AutoSize = true; tableLayoutLegend.AutoSizeMode = AutoSizeMode.GrowAndShrink; tableLayoutLegend.ColumnCount = 4; tableLayoutLegend.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 15.151515F)); tableLayoutLegend.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 28.2828274F)); tableLayoutLegend.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 28.2828274F)); tableLayoutLegend.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 28.2828274F)); tableLayoutLegend.Controls.Add(labelSerialTitle, 0, 0); tableLayoutLegend.Controls.Add(textSerial, 1, 0); tableLayoutLegend.Controls.Add(labelLegend, 0, 1); tableLayoutLegend.Controls.Add(labelLegendGray, 1, 1); tableLayoutLegend.Controls.Add(labelLegendGreen, 2, 1); tableLayoutLegend.Controls.Add(labelLegendRed, 3, 1); tableLayoutLegend.Dock = DockStyle.Bottom; tableLayoutLegend.Location = new Point(0, 570); tableLayoutLegend.Margin = new Padding(0); tableLayoutLegend.Name = "tableLayoutLegend"; tableLayoutLegend.Padding = new Padding(10, 0, 10, 20); tableLayoutLegend.RowCount = 2; tableLayoutLegend.RowStyles.Add(new RowStyle(SizeType.Absolute, 60F)); tableLayoutLegend.RowStyles.Add(new RowStyle(SizeType.Absolute, 60F)); tableLayoutLegend.Size = new Size(1236, 120); tableLayoutLegend.TabIndex = 7; // // labelSerialTitle // labelSerialTitle.AutoSize = true; labelSerialTitle.Dock = DockStyle.Top; labelSerialTitle.Font = new Font("Segoe UI", 9F, FontStyle.Bold); labelSerialTitle.Location = new Point(20, 68); labelSerialTitle.Margin = new Padding(10, 8, 10, 8); labelSerialTitle.Name = "labelSerialTitle"; labelSerialTitle.Padding = new Padding(5); labelSerialTitle.Size = new Size(164, 42); labelSerialTitle.TabIndex = 5; labelSerialTitle.Text = "Serial"; // // labelLegendGreen // labelLegendGreen.AutoSize = true; labelLegendGreen.BackColor = Color.Green; labelLegendGreen.Dock = DockStyle.Top; labelLegendGreen.ForeColor = Color.White; labelLegendGreen.Location = new Point(204, 8); labelLegendGreen.Margin = new Padding(10, 8, 10, 8); labelLegendGreen.Name = "labelLegendGreen"; labelLegendGreen.Padding = new Padding(5); labelLegendGreen.Size = new Size(323, 42); labelLegendGreen.TabIndex = 4; labelLegendGreen.Text = "Updated"; // // labelLegendGray // labelLegendGray.AutoSize = true; labelLegendGray.BackColor = Color.Gray; labelLegendGray.Dock = DockStyle.Top; labelLegendGray.ForeColor = Color.White; labelLegendGray.Location = new Point(547, 8); labelLegendGray.Margin = new Padding(10, 8, 10, 8); labelLegendGray.Name = "labelLegendGray"; labelLegendGray.Padding = new Padding(5); labelLegendGray.Size = new Size(323, 42); labelLegendGray.TabIndex = 3; labelLegendGray.Text = "Can't check local version"; // // labelLegendRed // labelLegendRed.AutoSize = true; labelLegendRed.BackColor = Color.Red; labelLegendRed.Dock = DockStyle.Top; labelLegendRed.ForeColor = Color.White; labelLegendRed.Location = new Point(890, 8); labelLegendRed.Margin = new Padding(10, 8, 10, 8); labelLegendRed.Name = "labelLegendRed"; labelLegendRed.Padding = new Padding(5); labelLegendRed.Size = new Size(326, 42); labelLegendRed.TabIndex = 1; labelLegendRed.Text = "Update Available"; // // labelLegend // labelLegend.AutoSize = true; labelLegend.Dock = DockStyle.Top; labelLegend.Font = new Font("Segoe UI", 9F, FontStyle.Bold); labelLegend.Location = new Point(20, 8); labelLegend.Margin = new Padding(10, 8, 10, 8); labelLegend.Name = "labelLegend"; labelLegend.Padding = new Padding(5); labelLegend.Size = new Size(164, 42); labelLegend.TabIndex = 0; labelLegend.Text = "Legend"; // // textSerial // textSerial.BackColor = SystemColors.ButtonFace; textSerial.BorderStyle = BorderStyle.FixedSingle; textSerial.Dock = DockStyle.Top; textSerial.Location = new Point(204, 68); textSerial.Margin = new Padding(10, 8, 10, 8); textSerial.Name = "textSerial"; textSerial.Size = new Size(323, 39); textSerial.TabIndex = 6; // // Updates // AutoScaleDimensions = new SizeF(192F, 192F); AutoScaleMode = AutoScaleMode.Dpi; AutoScroll = true; ClientSize = new Size(1236, 690); Controls.Add(tableLayoutLegend); Controls.Add(panelDrivers); Controls.Add(panelDriversTitle); Controls.Add(panelBios); Controls.Add(panelBiosTitle); Margin = new Padding(4); MinimizeBox = false; Name = "Updates"; ShowIcon = false; ShowInTaskbar = false; Text = "BIOS and Driver Updates"; ((System.ComponentModel.ISupportInitialize)pictureBios).EndInit(); panelBiosTitle.ResumeLayout(false); panelBiosTitle.PerformLayout(); panelBios.ResumeLayout(false); panelBios.PerformLayout(); panelDrivers.ResumeLayout(false); panelDrivers.PerformLayout(); panelDriversTitle.ResumeLayout(false); panelDriversTitle.PerformLayout(); ((System.ComponentModel.ISupportInitialize)pictureDrivers).EndInit(); tableLayoutLegend.ResumeLayout(false); tableLayoutLegend.PerformLayout(); ResumeLayout(false); PerformLayout(); } #endregion private TableLayoutPanel tableBios; private Label labelBIOS; private PictureBox pictureBios; private Panel panelBiosTitle; private Panel panelBios; private Panel panelDrivers; private TableLayoutPanel tableDrivers; private Panel panelDriversTitle; private Label labelDrivers; private PictureBox pictureDrivers; private RButton buttonRefresh; private Label labelUpdates; private TableLayoutPanel tableLayoutLegend; private Label labelLegend; private Label labelLegendRed; private Label labelLegendGray; private Label labelLegendGreen; private ToolTip toolTip; private Label labelSerialTitle; private TextBox textSerial; } } ================================================ FILE: app/Updates.cs ================================================ using GHelper.Helpers; using GHelper.UI; using NvAPIWrapper.Native.Display.Structures; using System.Diagnostics; using System.Diagnostics.Metrics; using System.Management; using System.Net; using System.Text.Json; namespace GHelper { public partial class Updates : RForm { const int DRIVER_NOT_FOUND = 2; const int DRIVER_NEWER = 1; //static int rowCount = 0; static string bios; static string model; static int updatesCount = 0; private static long lastUpdate; private readonly Font _boldUnderlineFont; private readonly Font _font; public struct DriverDownload { public string categoryName; public string title; public string version; public string downloadUrl; public string date; public JsonElement hardwares; } private void LoadUpdates(bool force = false) { if (!force && (Math.Abs(DateTimeOffset.Now.ToUnixTimeMilliseconds() - lastUpdate) < 5000)) return; lastUpdate = DateTimeOffset.Now.ToUnixTimeMilliseconds(); (bios, model) = AppConfig.GetBiosAndModel(); buttonRefresh.TabStop = false; updatesCount = 0; labelUpdates.ForeColor = colorEco; labelUpdates.Text = Properties.Strings.NoNewUpdates; panelBios.AccessibleRole = AccessibleRole.Grouping; panelBios.AccessibleName = Properties.Strings.NoNewUpdates; panelBios.TabStop = true; Text = Properties.Strings.BiosAndDriverUpdates + ": " + model + " " + bios; labelBIOS.Text = "BIOS"; labelDrivers.Text = Properties.Strings.DriverAndSoftware; labelLegend.Text = Properties.Strings.Legend; labelLegendGray.Text = Properties.Strings.LegendGray; labelLegendRed.Text = Properties.Strings.LegendRed; labelLegendGreen.Text = Properties.Strings.LegendGreen; SuspendLayout(); tableBios.Visible = false; tableDrivers.Visible = false; labelLegendGreen.BackColor = colorEco; labelLegendRed.BackColor = colorTurbo; ClearTable(tableBios); ClearTable(tableDrivers); string rogParam = AppConfig.IsROG() ? "&systemCode=rog" : ""; Task.Run(async () => { DriversAsync($"https://rog.asus.com/support/webapi/product/GetPDBIOS?website=global&model={model}&cpu={model}{rogParam}", 1, tableBios); }); Task.Run(async () => { DriversAsync($"https://rog.asus.com/support/webapi/product/GetPDDrivers?website=global&model={model}&cpu={model}&osid=52{rogParam}", 0, tableDrivers); }); Task.Run(async () => { LaptopSerialNumber(); }); textSerial.BackColor = panelBios.BackColor; textSerial.ForeColor = panelBios.ForeColor; } private void ClearTable(TableLayoutPanel tableLayoutPanel) { while (tableLayoutPanel.Controls.Count > 0) { tableLayoutPanel.Controls[0].Dispose(); } tableLayoutPanel.RowCount = 0; } public Updates() { InitializeComponent(); InitTheme(true); _boldUnderlineFont = new Font(Font, FontStyle.Bold | FontStyle.Underline); _font = new Font(Font, FontStyle.Underline); //buttonRefresh.Visible = false; buttonRefresh.Click += ButtonRefresh_Click; Shown += Updates_Shown; FormClosed += (s, e) => { // Dispose fonts when form closes _boldUnderlineFont.Dispose(); _font.Dispose(); }; } private void ButtonRefresh_Click(object? sender, EventArgs e) { LoadUpdates(); } private void Updates_Shown(object? sender, EventArgs e) { Height = Program.settingsForm.Height; Top = Program.settingsForm.Top; Left = Program.settingsForm.Left - Width - 5; LoadUpdates(true); } public void LaptopSerialNumber() { try { var output = ProcessHelper.RunCMD("powershell", "-NoProfile -Command \"(Get-WmiObject Win32_BIOS).SerialNumber\""); Invoke(delegate { textSerial.Text = output; }); } catch (Exception ex) { Logger.WriteLine(ex.ToString()); } } private Dictionary GetDeviceVersions() { using (ManagementObjectSearcher objSearcher = new ManagementObjectSearcher("Select * from Win32_PnPSignedDriver")) { using (ManagementObjectCollection objCollection = objSearcher.Get()) { Dictionary list = new(); foreach (ManagementObject obj in objCollection) if (obj["DriverVersion"] is not null) { if (obj["DeviceID"] is not null) { list[obj["DeviceID"].ToString()] = obj["DriverVersion"].ToString(); } if (obj["DeviceName"] is not null) { var deviceName = obj["DeviceName"].ToString(); if (deviceName.Contains("DolbyAPO SWC")) list["Dolby"] = obj["DriverVersion"].ToString(); if (deviceName.Contains("Fortemedia Audio")) list["Fortemedia"] = obj["DriverVersion"].ToString(); } } return list; } } } private void _VisualiseDriver(DriverDownload driver, TableLayoutPanel table) { string versionText = driver.version.Replace("latest version at the ", ""); LinkLabel versionLabel = new LinkLabel { Text = versionText, Anchor = AnchorStyles.Left, AutoSize = true }; versionLabel.AccessibleName = driver.title; versionLabel.TabStop = true; versionLabel.TabIndex = table.RowCount + 1; versionLabel.Cursor = Cursors.Hand; versionLabel.Font = _font; versionLabel.LinkColor = colorEco; versionLabel.Padding = new Padding(5, 5, 5, 5); versionLabel.LinkClicked += delegate { Process.Start(new ProcessStartInfo(driver.downloadUrl) { UseShellExecute = true }); }; table.RowStyles.Add(new RowStyle(SizeType.AutoSize)); table.Controls.Add(new Label { Text = driver.categoryName, Anchor = AnchorStyles.Left, Dock = DockStyle.Fill, Padding = new Padding(5, 5, 5, 5) }, 0, table.RowCount); table.Controls.Add(new Label { Text = driver.title, Anchor = AnchorStyles.Left, Dock = DockStyle.Fill, Padding = new Padding(5, 5, 5, 5) }, 1, table.RowCount); table.Controls.Add(new Label { Text = driver.date, Anchor = AnchorStyles.Left, Dock = DockStyle.Fill, Padding = new Padding(5, 5, 5, 5) }, 2, table.RowCount); table.Controls.Add(versionLabel, 3, table.RowCount); table.RowCount++; } public void VisualiseDriver(DriverDownload driver, TableLayoutPanel table) { if (InvokeRequired) { Invoke(delegate { _VisualiseDriver(driver, table); }); } else { _VisualiseDriver(driver, table); } } public void ShowTable(TableLayoutPanel table) { Invoke(delegate { table.Visible = true; ResumeLayout(false); PerformLayout(); }); } private void _VisualiseNewDriver(int position, int newer, string tip, TableLayoutPanel table) { var label = table.GetControlFromPosition(3, position) as LinkLabel; if (label != null) { toolTip.SetToolTip(label, tip); if (newer == DRIVER_NEWER) { label.AccessibleName = label.AccessibleName + Properties.Strings.NewUpdates; label.Font = _boldUnderlineFont; label.LinkColor = colorTurbo; } if (newer == DRIVER_NOT_FOUND) label.LinkColor = Color.Gray; } } public void VisualiseNewDriver(int position, int newer, string tip, TableLayoutPanel table) { if (InvokeRequired) { Invoke(delegate { _VisualiseNewDriver(position, newer, tip, table); }); } else { _VisualiseNewDriver(position, newer, tip, table); } } public void VisualiseNewCount(int updatesCount, TableLayoutPanel table) { if (InvokeRequired) { Invoke(delegate { _VisualiseNewCount(updatesCount, table); }); } else { _VisualiseNewCount(updatesCount, table); } } public void _VisualiseNewCount(int updatesCount, TableLayoutPanel table) { labelUpdates.Text = $"{Properties.Strings.NewUpdates}: {updatesCount}"; labelUpdates.ForeColor = colorTurbo; labelUpdates.Font = _boldUnderlineFont; panelBios.AccessibleName = labelUpdates.Text; } static string CleanupDeviceId(string input) { int index = input.IndexOf("&REV_"); if (index != -1) { return input.Substring(0, index); } return input; } public async void DriversAsync(string url, int type, TableLayoutPanel table) { try { using (var httpClient = new HttpClient(new HttpClientHandler { AutomaticDecompression = DecompressionMethods.All })) { Logger.WriteLine(url); httpClient.DefaultRequestHeaders.AcceptEncoding.ParseAdd("gzip, deflate, br"); httpClient.DefaultRequestHeaders.Add("User-Agent", "C# App"); var json = await httpClient.GetStringAsync(url); var data = JsonSerializer.Deserialize(json); var result = data.GetProperty("Result"); // fallback for bugged API if (result.ToString() == "" || result.GetProperty("Obj").GetArrayLength() == 0) { var urlFallback = url + "&tag=" + new Random().Next(10, 99); Logger.WriteLine(urlFallback); json = await httpClient.GetStringAsync(urlFallback); data = JsonSerializer.Deserialize(json); } var groups = data.GetProperty("Result").GetProperty("Obj"); List skipList = new() { "Armoury Crate & Aura Creator Installer", "MyASUS", "ASUS Smart Display Control", "Aura Wallpaper", "Virtual Pet", "Virtual Pet- Ultimate Edition", "ROG Font V1.5", "Armoury Crate Control Interface" }; List drivers = new(); for (int i = 0; i < groups.GetArrayLength(); i++) { var categoryName = groups[i].GetProperty("Name").ToString(); var files = groups[i].GetProperty("Files"); var oldTitle = ""; for (int j = 0; j < files.GetArrayLength(); j++) { var file = files[j]; var title = file.GetProperty("Title").ToString(); if (oldTitle != title && !skipList.Contains(title)) { var driver = new DriverDownload(); driver.categoryName = categoryName; driver.title = title; driver.version = file.GetProperty("Version").ToString().Replace("V", ""); driver.downloadUrl = file.GetProperty("DownloadUrl").GetProperty("Global").ToString(); driver.hardwares = file.GetProperty("HardwareInfoList"); driver.date = file.GetProperty("ReleaseDate").ToString(); drivers.Add(driver); VisualiseDriver(driver, table); } oldTitle = title; } } ShowTable(table); Dictionary devices = new(); if (type == 0) devices = GetDeviceVersions(); //Debug.WriteLine(biosVersion); int count = 0; foreach (var driver in drivers) { int newer = DRIVER_NOT_FOUND; string tip = driver.version; if (type == 0 && driver.hardwares.ToString().Length > 0) for (int k = 0; k < driver.hardwares.GetArrayLength(); k++) { var deviceID = driver.hardwares[k].GetProperty("hardwareid").ToString(); deviceID = CleanupDeviceId(deviceID); var localVersions = devices.Where(p => p.Key.Contains(deviceID, StringComparison.CurrentCultureIgnoreCase)).Select(p => p.Value); foreach (var localVersion in localVersions) { newer = Math.Min(newer, new Version(driver.version).CompareTo(new Version(localVersion))); Logger.WriteLine(driver.title + " " + deviceID + " " + driver.version + " vs " + localVersion + " = " + newer); tip = "Download: " + driver.version + "\n" + "Installed: " + localVersion; } } if (type == 1 && !driver.title.Contains("Firmware")) { newer = Int32.Parse(driver.version) > Int32.Parse(bios) ? 1 : -1; tip = "Download: " + driver.version + "\n" + "Installed: " + bios; } VisualiseNewDriver(count, newer, tip, table); if (newer == DRIVER_NEWER) { updatesCount++; VisualiseNewCount(updatesCount, table); } count++; } GC.Collect(); GC.WaitForPendingFinalizers(); } } catch (Exception ex) { Logger.WriteLine(ex.ToString()); } } } } ================================================ FILE: app/Updates.resx ================================================  text/microsoft-resx 2.0 System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 17, 17 ================================================ FILE: app/app.manifest ================================================  System true ================================================ FILE: app/global.json ================================================ { } ================================================ FILE: crowdin.yml ================================================ files: - source: /app/Properties/Strings.resx translation: /app/Properties/Strings.%two_letters_code%.resx ================================================ FILE: docs/README.ja-JP.md ================================================ # G-Helper - Asusノートパソコン用の軽量コントロールツール [![United24](https://raw.githubusercontent.com/seerge/g-helper/main/docs/ua.png)](https://u24.gov.ua/) [![GitHub release](https://img.shields.io/github/release/seerge/g-helper)](https://GitHub.com/seerge/g-helper/releases/) [![Github all releases](https://img.shields.io/github/downloads/seerge/g-helper/total)](https://GitHub.com/seerge/g-helper/releases/) [![GitHub stars](https://img.shields.io/github/stars/seerge/g-helper.svg?style=social)](https://GitHub.com/seerge/g-helper/stargazers/) [中文版点这里](https://github.com/seerge/g-helper/blob/main/docs/README.zh-CN.md) Asusノートパソコン用の軽量なArmoury Crate代替ツールで、余分な負荷や不要なサービスなしでほぼ同じ機能を提供します。 ROG Zephyrus G14、G15、G16、M16、Flow X13、Flow X16、Flow Z13、TUFシリーズ、StrixまたはScarシリーズ、ProArt、Vivobook、Zenbook、ROG Ally / Ally Xなど、すべての人気モデルで動作します! # [:floppy_disk:ダウンロード](https://github.com/seerge/g-helper/releases/latest/download/GHelper.zip) **⭐ アプリが気に入ったら、ぜひオンラインで広めてください**
プロジェクトをサポート PayPal EUR  PayPal USD  Stripe  Alipay
- [FAQ](https://github.com/seerge/g-helper/wiki/FAQ) - [セットアップと要件](https://github.com/seerge/g-helper/wiki/Requirements) - [トラブルシューティング](https://github.com/seerge/g-helper/wiki/Troubleshooting) - [パワーユーザー設定](https://github.com/seerge/g-helper/wiki/Power-user-settings) [![G-Helper Download](https://github.com/seerge/g-helper/assets/5920850/4d98465a-63a5-4498-ae14-afb3e67e7e82)](https://github.com/seerge/g-helper/releases/latest/download/GHelper.zip) ## :loudspeaker: YouTubeレビューとガイド | [![Youtube review Josh Cravey](https://i.ytimg.com/vi/hqe-PjuE-K8/hqdefault.jpg)](https://www.youtube.com/watch?v=hqe-PjuE-K8) | [![Youtube review cbutters Tech](https://i.ytimg.com/vi/6aVdwJKZSSc/hqdefault.jpg)](https://www.youtube.com/watch?v=6aVdwJKZSSc) | | ----------------- | ---------------- | | [Josh Cravey](https://www.youtube.com/watch?v=hqe-PjuE-K8) | [cbutters Tech](https://www.youtube.com/watch?v=6aVdwJKZSSc) | ## 📰 記事 1. https://www.digitaltrends.com/computing/g-helper-armoury-crate-alternative/ 2. https://binaryfork.com/ghelper-armoury-crate-alternative-10216/ ## :gift: 利点 1. シームレスで自動的なGPU切り替え 2. すべてのパフォーマンスモードを電力制限とファンカーブで完全にカスタマイズ可能 3. 軽量。システムに何もインストールしません。実行するための単一のexeファイルのみ 4. シンプルでクリーンなネイティブUIで、すべての設定に簡単にアクセス 5. FNロックとカスタムホットキー ![Screenshot 2024-03-11 104354](https://github.com/seerge/g-helper/assets/5920850/626a5a6e-fdae-431c-843e-92886c8420ee) ### :zap: 機能 1. パフォーマンスモード: サイレント - バランス - ターボ (内蔵、デフォルトのファンカーブ付き) 2. GPUモード: エコ - スタンダード - アルティメット - オプティマイズド 3. ディスプレイのリフレッシュレート制御とディスプレイオーバードライブ (OD) 4. カスタムファンカーブエディタ、電力制限、ターボブースト選択 5. アニメマトリックスまたはスラッシュライティングの制御、アニメーションGIF、時計、オーディオビジュアライザー 6. バックライトのアニメーションモードとカラー 7. ホットキーの処理 8. CPUとGPUの温度、ファン速度、バッテリーステータスの監視 9. バッテリーの充電制限 10. NVidia GPUのオーバークロックとアンダーボルティング 11. XG Mobileの制御 12. AMD CPUのアンダーボルティング 13. BIOSとドライバの更新 14. Asusマウスの設定 15. ミニLEDのマルチゾーンスイッチ 16. フリッカーフリーディミングとビジュアルモード ### :gear: 自動化 - バッテリー使用時または電源接続時のパフォーマンスモードの切り替え - オプティマイズドGPUモード - バッテリー使用時にdGPUを無効化し、電源接続時に有効化 - 自動ディスプレイリフレッシュレート (バッテリー使用時に60Hz、電源接続時に最大Hz) - バッテリー使用時または電源接続時のキーボードバックライトのタイムアウト ### :rocket: パフォーマンスモード すべてのモードはBIOSに組み込まれており、デフォルトのファンカーブと電力制限が設定されています。これらはArmoury Crateと同じです。 各BIOSモードは対応するWindowsパワーモードとペアになっています。これを「ファン + 電源」設定で調整できます。 1. BIOSの「サイレント」 + Windowsの「最高の電力効率」パワーモード 2. BIOSの「バランス」 (AC時のパフォーマンス) + Windowsの「バランス」パワーモード 3. BIOSの「ターボ」 + Windowsの「最高のパフォーマンス」パワーモード ### :video_game: GPUモード 1. エコ: 低電力の統合GPUのみが有効、iGPUが内蔵ディスプレイを駆動 2. スタンダード (MS Hybrid): iGPUとdGPUが有効、iGPUが内蔵ディスプレイを駆動 3. アルティメット: iGPUとdGPUが有効、dGPUが内蔵ディスプレイを駆動 (2022年以降のモデルでサポート) 4. オプティマイズド: バッテリー使用時にdGPUを無効化 (エコ)し、電源接続時に有効化 (スタンダード) ![Screenshot 2024-03-11 111818](https://github.com/seerge/g-helper/assets/5920850/fd69a81e-978d-4d5c-a0a8-26da51f90a5b) ![GPU Modes](https://github.com/seerge/g-helper/assets/5920850/65c6bdd5-728c-4965-b544-fcf5a85ed6a2) ### :mouse: Asusマウスとその他の周辺機器のサポート [現在サポートされているモデル](https://github.com/seerge/g-helper/discussions/900) - ROG Chakram X - ROG Chakram Core - ROG Gladius II and Gladius II Origin - ROG Gladius II Wireless - ROG Gladius III - ROG Gladius III Wireless - ROG Harpe Ace Extreme - ROG Harpe Ace Aim Lab Edition - ROG Harpe Ace Mini - ROG Harpe II Ace - ROG Keris Wireless - ROG Keris II Ace - ROG Keris Wireless Aimpoint - ROG Strix Carry - ROG Strix III Gladius III Aimpoint Wireless - ROG Strix Impact III - ROG Strix Impact III Wireless - ROG Spatha X - ROG Strix Impact II Wireless - ROG Pugio - ROG Pugio II - TUF Gaming M4 Wireless - TUF Gaming M3 - TUF Gaming M3 Gen II - TUF Gaming M4 AIR - TUF Gaming M5 - TX Gaming Mini [@IceStormNG](https://github.com/IceStormNG) 👑 の貢献と研究に大いに感謝します。 ### ⌨️ キーバインディング - ``Fn + F5 / Fn + Shift + F5`` - パフォーマンスモードを前方/後方に切り替え - ``Ctrl + Shift + F5 / Ctrl + Shift + Alt + F5`` - パフォーマンスモードを前方/後方に切り替え - ``Ctrl + Shift + F12`` - G-Helperウィンドウを開く - ``Ctrl + M1 / M2`` - ディスプレイの明るさを下げる/上げる - ``Shift + M1 / M2`` - バックライトの明るさを下げる/上げる - ``Fn + C`` - Fnロック - ``Fn + Ctrl + F7 / F8`` - フリッカーフリーディミングを下げる/上げる - ``Fn + Shift + F7 / F8`` - マトリックス/スラッシュライティングの明るさを下げる/上げる - ``Fn + Shift + F7 / F8`` - スクリーンパッドの明るさを下げる/上げる - ``Ctrl + Shift + F20`` - マイクをミュート - ``Ctrl + Shift + Alt + F13`` - ディスプレイのリフレッシュレートを切り替え - ``Ctrl + Shift + Alt + F14`` - エコGPUモード - ``Ctrl + Shift + Alt + F15`` - スタンダードGPUモード - ``Ctrl + Shift + Alt + F16`` - サイレント - ``Ctrl + Shift + Alt + F17`` - バランス - ``Ctrl + Shift + Alt + F18`` - ターボ - ``Ctrl + Shift + Alt + F19`` - カスタム1 (存在する場合) - ``Ctrl + Shift + Alt + F20`` - カスタム2 (存在する場合) - [カスタムキーバインディング/ホットキー](https://github.com/seerge/g-helper/wiki/Power-user-settings#custom-hotkey-actions) ### 🎮ROG Allyバインディング - ``M + DPad Left / Right`` - ディスプレイの明るさ - ``M + DPad Up`` - タッチキーボード - ``M + DPad Down`` - デスクトップを表示 - ``M + Y`` - AMDオーバーレイを切り替え - ``M + X`` - スクリーンショット - ``M + Right Stick Click`` - コントローラーモード ------------------ ### 🔖 重要な注意事項 G-Helperはオペレーティングシステム、ファームウェア、またはドライバではありません。ハードウェアをリアルタイムで「実行」することはありません。 これは、製造元が作成し、BIOSに保存されている事前定義された操作モードの1つを選択し、オプションでいくつかの設定を行うアプリケーションです。Armoury Crateと同じように機能します。Asus System Control Interface「ドライバ」を使用してすべての機能を実現します。 Armoury Crateと同じモード/設定を使用する場合、デバイスのパフォーマンスや動作に違いはありません。 G-Helperの役割は、リモコンがテレビに対して果たす役割に似ています。 ### 使用ライブラリとプロジェクト - [Linux Kernel](https://github.com/torvalds/linux/blob/master/include/linux/platform_data/x86/asus-wmi.h) - ASUS ACPI/WMIインターフェースの基本エンドポイント - [NvAPIWrapper](https://github.com/falahati/NvAPIWrapper) - Nvidia APIへのアクセス - [Starlight](https://github.com/vddCore/Starlight) - アニメマトリックス通信プロトコル - [UXTU](https://github.com/JamesCJ60/Universal-x86-Tuning-Utility) - Ryzen System Management Unitを使用したアンダーボルティング - [AsusCtl](https://gitlab.com/asus-linux/asusctl) - インスピレーションと逆アセンブル ### 免責事項 "Asus"、"ROG"、"TUF"、および"Armoury Crate"は、AsusTek Computer, Inc.の商標であり、AsusTek Computerに属する資産に対して一切の権利を主張しません。これらの資産は純粋に情報提供の目的で使用されています。 ソフトウェアは「現状のまま」提供され、明示または黙示のいかなる保証もなく、商品性、特定の目的への適合性、および非侵害の保証を含みますが、これに限定されません。このソフトウェアの誤用は、システムの不安定性や誤動作を引き起こす可能性があります。 ================================================ FILE: docs/README.md ================================================ # G-Helper - Lightweight control tool for Asus laptops [![United24](https://raw.githubusercontent.com/seerge/g-helper/main/docs/ua.png)](https://u24.gov.ua/) [![GitHub release](https://img.shields.io/github/release/seerge/g-helper)](https://GitHub.com/seerge/g-helper/releases/) [![Github all releases](https://img.shields.io/github/downloads/seerge/g-helper/total)](https://GitHub.com/seerge/g-helper/releases/) [![SLSA3](https://img.shields.io/badge/SLSA-level%203-green?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAMAAAAolt3jAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAABMlBMVEXvMQDvMADwMQDwMADwMADvMADvMADwMADwMQDvMQDvMQDwMADwMADvMADwMADwMADwMQDvMQDvMQDwMQDvMQDwMQDwMADwMADwMQDwMADwMADvMADvMQDvMQDwMADwMQDwMADvMQDwMADwMQDwMADwMADwMADwMADwMADwMADvMQDvMQDwMADwMQDwMADvMQDvMQDwMADvMQDvMQDwMADwMQDwMQDwMQDvMQDwMADvMADwMADwMQDvMQDwMADwMQDwMQDwMQDwMQDvMQDvMQDvMADwMADvMADvMADvMADwMQDwMQDvMADvMQDvMQDvMADvMADvMQDwMQDvMQDvMADvMADvMADvMQDwMQDvMQDvMQDvMADvMADwMADvMQDvMQDvMQDvMADwMADwMQDwMAAAAAA/HoSwAAAAY3RSTlMpsvneQlQrU/LQSWzvM5DzmzeF9Pi+N6vvrk9HuP3asTaPgkVFmO3rUrMjqvL6d0LLTVjI/PuMQNSGOWa/6YU8zNuDLihJ0e6aMGzl8s2IT7b6lIFkRj1mtvQ0eJW95rG0+Sid59x/AAAAAWJLR0Rltd2InwAAAAlwSFlzAAAOwwAADsMBx2+oZAAAAAd0SU1FB+YHGg0tGLrTaD4AAACqSURBVAjXY2BgZEqGAGYWVjYGdg4oj5OLm4eRgZcvBcThFxAUEk4WYRAVE09OlpCUkpaRTU6WY0iWV1BUUlZRVQMqUddgSE7W1NLS1gFp0NXTB3KTDQyNjE2Sk03NzC1A3GR1SytrG1s7e4dkBogtjk7OLq5uyTCuu4enl3cyhOvj66fvHxAIEmYICg4JDQuPiAQrEmGIio6JjZOFOjSegSHBBMpOToxPAgCJfDZC/m2KHgAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMi0wNy0yNlQxMzo0NToyNCswMDowMC8AywoAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjItMDctMjZUMTM6NDU6MjQrMDA6MDBeXXO2AAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAABJRU5ErkJggg==)](https://github.com/seerge/g-helper/attestations) [![GitHub stars](https://img.shields.io/github/stars/seerge/g-helper.svg?style=social)](https://GitHub.com/seerge/g-helper/stargazers/) [中文版点这里](https://github.com/seerge/g-helper/blob/main/docs/README.zh-CN.md) [日本語はこちら](https://github.com/seerge/g-helper/blob/main/docs/README.ja-JP.md) Small and lightweight Armoury Crate alternative for Asus laptops offering almost same functionality with a much smaller footprint. Works with all popular models, such as ROG Zephyrus G14, G15, G16, M16, Flow X13, Flow X16, Flow Z13, DUO, TUF Series, Strix or Scar Series, ProArt, Vivobook, Zenbook, Expertbook, ROG Ally or Ally X and many more! # [:floppy_disk: Download](https://github.com/seerge/g-helper/releases/latest/download/GHelper.zip) **⭐ If you like the app - please spread the word about it online**
Support Project PayPal EUR  PayPal USD  Stripe  Alipay
- [FAQ](https://github.com/seerge/g-helper/wiki/FAQ) - [Setup and Requirements](https://github.com/seerge/g-helper/wiki/Requirements) - [Troubleshooting](https://github.com/seerge/g-helper/wiki/Troubleshooting) - [Power User Settings](https://github.com/seerge/g-helper/wiki/Power-user-settings) [![G-Helper Download](https://github.com/seerge/g-helper/assets/5920850/4d98465a-63a5-4498-ae14-afb3e67e7e82)](https://github.com/seerge/g-helper/releases/latest/download/GHelper.zip) ## :loudspeaker: YouTube Reviews and Guides | [![Youtube review Josh Cravey](https://i.ytimg.com/vi/hqe-PjuE-K8/hqdefault.jpg)](https://www.youtube.com/watch?v=hqe-PjuE-K8) | [![Youtube review Crimson Tech](https://i.ytimg.com/vi/5XUIMUzgHU0/hqdefault.jpg)](https://www.youtube.com/watch?v=5XUIMUzgHU0) | [![Youtube review cbutters Tech](https://i.ytimg.com/vi/6aVdwJKZSSc/hqdefault.jpg)](https://www.youtube.com/watch?v=6aVdwJKZSSc) | | ----------------- | ---------------- | ---------------- | | [Josh Cravey](https://www.youtube.com/watch?v=hqe-PjuE-K8) | [Crimson Tech](https://www.youtube.com/watch?v=5XUIMUzgHU0) | [cbutters Tech](https://www.youtube.com/watch?v=6aVdwJKZSSc) | ## 📰 Articles 1. https://www.digitaltrends.com/computing/g-helper-armoury-crate-alternative/ 2. https://binaryfork.com/ghelper-armoury-crate-alternative-10216/ 3. https://www.ultrabookreview.com/71392-optimized-quiet-gaming-5080-5090/ 4. https://www.notebookcheck.net/Unbloated-G-Helper-The-best-open-source-alternative-to-Asus-Armoury-Crate-Part-2.1213486.0.html 5. https://www.lesnumeriques.com/appli-logiciel/marre-des-lenteurs-d-armoury-crate-sur-votre-pc-portable-asus-decouvrez-g-helper-l-alternative-ultra-legere-n240111.html ## :gift: Advantages 1. Seamless and automatic GPU switching 2. All performance modes can be fully customized with power limits and fan curves 3. Lightweight. Just a single exe to run. Doesn't install anything in your system. 4. Simple and clean native UI with easy access to all settings 5. FN-Lock and custom hotkeys ![Screenshot 2024-03-11 104354](https://github.com/seerge/g-helper/assets/5920850/626a5a6e-fdae-431c-843e-92886c8420ee) ### :zap: Features 1. Performance modes: Silent - Balanced - Turbo (built-in, with default fan curves) 2. GPU modes: Eco - Standard - Ultimate - Optimized 3. Screen refresh rate control with display overdrive (OD) 4. Custom fan curve editor, power limits and turbo boost selection for every performance mode 5. Anime Matrix or Slash Lighting control including animated GIFs, clock and Audio visualizer 6. Backlight animation modes and colors 7. Hotkey handling 8. Monitor CPU and GPU temperature, fan speeds and battery status 9. Battery charge limit to preserve battery health 10. NVidia GPU overclocking and undervolting 11. XG Mobile Control 12. AMD CPU Undervolting 13. BIOS and Driver Updates 14. Asus Mice settings 15. Mini-led multi-zone switch 16. Flicker-free dimming and Visual Modes ### :gear: Automation - Performance Mode switching when on battery or plugged in - Optimized GPU mode - disables dGPU on battery and enables when plugged in - Auto Screen refresh rate (60Hz on battery and max Hz when plugged) - Keyboard backlight timeout on battery or when plugged in ### :rocket: Performance Modes All Modes are **baked in BIOS** along with default fan curves and power limits and they are the **same** as in the Armoury Crate. Each BIOS mode is paired with matching Windows Power Mode. You can adjust this setting under ``Fans + Power`` 1. **Silent** in BIOS + **Best power efficiency** power mode 2. **Balanced** (Performance in AC) in BIOS + **Balanced** power mode 3. **Turbo** in BIOS + **Best performance** power mode ### :video_game: GPU Modes 1. **Eco** : only low power integrated GPU enabled, iGPU drives built in display 2. **Standard** (MS Hybrid) : iGPU and dGPU enabled, iGPU drives built in display 3. **Ultimate**: iGPU and dGPU enabled, but dGPU drives built in display (supported on 2022+ models) 4. **Optimized**: disables dGPU on battery (Eco) and enables when plugged in (Standard) ![Screenshot 2024-03-11 111818](https://github.com/seerge/g-helper/assets/5920850/fd69a81e-978d-4d5c-a0a8-26da51f90a5b) ![GPU Modes](https://github.com/seerge/g-helper/assets/5920850/65c6bdd5-728c-4965-b544-fcf5a85ed6a2) ### :mouse: Asus Mouse and other peripherals support [Currently supported models](https://github.com/seerge/g-helper/discussions/900) - ROG Chakram X - ROG Chakram Core - ROG Gladius II and Gladius II Origin - ROG Gladius II Wireless - ROG Gladius III - ROG Gladius III Wireless - ROG Harpe Ace Extreme - ROG Harpe Ace Aim Lab Edition - ROG Harpe Ace Mini - ROG Harpe II Ace - ROG Keris Wireless - ROG Keris II Ace - ROG Keris Wireless Aimpoint - ROG Strix Carry - ROG Strix III Gladius III Aimpoint Wireless - ROG Strix Impact III - ROG Strix Impact III Wireless - ROG Spatha X - ROG Strix Impact II Wireless - ROG Pugio - ROG Pugio II - TUF Gaming M4 Wireless - TUF Gaming M3 - TUF Gaming M3 Gen II - TUF Gaming M4 AIR - TUF Gaming M5 - TX Gaming Mini Huge thanks to [@IceStormNG](https://github.com/IceStormNG) 👑 for contribution and research (!). ### ⌨️ Keybindings - ``Fn + F5 / Fn + Shift + F5`` - Toggle Performance Modes forwards / backwards - ``Ctrl + Shift + F5 / Ctrl + Shift + Alt + F5`` - Toggle Performance Modes forwards / backwards - ``Ctrl + Shift + F12`` - Open G-Helper window - ``Ctrl + M1 / M2`` - Screen brightness Down / Up - ``Shift + M1 / M2`` - Backlight brightness Down / Up - ``Fn + C`` - Fn-Lock - ``Fn + Ctrl + F7 / F8`` / ``Ctrl + Shift + Alt + F7 / F8`` - Flicker-free dimming Down / Up - ``Fn + Shift + F7 / F8`` - Matrix / Slash Lighting brightness Down / Up - ``Fn + Shift + F7 / F8`` / ``Ctrl + Shift + Alt + F7 / F8`` - Screenpad brightness Down / Up - ``Ctrl + Shift + F20`` - Mute Microphone - ``Ctrl + Shift + Alt + F13`` - Toggle Display Refresh Rate - ``Ctrl + Shift + Alt + F14`` - Eco GPU Mode - ``Ctrl + Shift + Alt + F15`` - Standard GPU Mode - ``Ctrl + Shift + Alt + F16`` - Silent - ``Ctrl + Shift + Alt + F17`` - Balanced - ``Ctrl + Shift + Alt + F18`` - Turbo - ``Ctrl + Shift + Alt + F19`` - Custom 1 (if exists) - ``Ctrl + Shift + Alt + F20`` - Custom 2 (if exists) - [Custom keybindings / hotkeys](https://github.com/seerge/g-helper/wiki/Power-user-settings#custom-hotkey-actions) ### 🎮ROG Ally Bindings - ``M + DPad Left / Right`` - Display Brightness - ``M + DPad Up`` - Touch keyboard - ``M + DPad Down`` - Show desktop - ``M + Y`` - Toggle AMD overay - ``M + X`` - Screenshot - ``M + Right Stick Click`` - Controller Mode ------------------ > [!NOTE] > ### 🔖 Important Notice > G-Helper is **NOT** an operating system, firmware, or driver. It **DOES NOT** "run" your hardware in real-time anyhow. > > It's an app that lets you select one of the predefined operating modes created by manufacturer (and stored in BIOS) and optionally(!) set some settings that already exist on your device same as Armoury Crate can. It does it by using the Asus System Control Interface "driver" that Armoury uses for it. > > If you use equivalent mode/settings as in Armoury Crate - the performance or the behavior of your device won't be different. > > The role of G-Helper for your laptop is similar to the role of a remote control for your TV. ### Libraries and projects used - [Linux Kernel](https://github.com/torvalds/linux/blob/master/include/linux/platform_data/x86/asus-wmi.h) for some basic endpoints in ASUS ACPI/WMI interface - [NvAPIWrapper](https://github.com/falahati/NvAPIWrapper) for accessing Nvidia API - [Starlight](https://github.com/vddCore/Starlight) for anime matrix communication protocol - [UXTU](https://github.com/JamesCJ60/Universal-x86-Tuning-Utility) for undervolting using Ryzen System Management Unit - [AsusCtl](https://gitlab.com/asus-linux/asusctl) for inspiration and some reverse engineering ### Code Signing Policy Free code signing provided by [SignPath.io](https://about.signpath.io/), certificate by [SignPath Foundation](https://signpath.org/) ### Privacy Policy This program will not transfer any information to other networked systems ### Disclaimers "Asus", "ROG", "TUF", and "Armoury Crate" are trademarked by and belong to AsusTek Computer, Inc. I make no claims to these or any assets belonging to AsusTek Computer and use them purely for informational purposes only. THE SOFTWARE IS PROVIDED “AS IS” AND WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. MISUSE OF THIS SOFTWARE COULD CAUSE SYSTEM INSTABILITY OR MALFUNCTION. ================================================ FILE: docs/README.zh-CN.md ================================================ # G-Helper——轻量级的华硕笔记本控制中心 [![United24](https://raw.githubusercontent.com/seerge/g-helper/main/docs/ua.png)](https://u24.gov.ua/) [![GitHub release](https://img.shields.io/github/release/seerge/g-helper)](https://GitHub.com/seerge/g-helper/releases/) [![Github all releases](https://img.shields.io/github/downloads/seerge/g-helper/total)](https://GitHub.com/seerge/g-helper/releases/) [![GitHub stars](https://img.shields.io/github/stars/seerge/g-helper.svg?style=social)](https://GitHub.com/seerge/g-helper/stargazers/) 语言: [English](https://github.com/seerge/g-helper#readme) | 中文 | [日本語](https://github.com/seerge/g-helper/blob/main/docs/README.ja-JP.md) 适用于华硕(Asus)笔记本电脑的轻量级 Armoury Crate (奥创控制中心)替代品,在功能几乎相同的同时减少不必要的服务以减轻负载。 G-helper兼容所有主流型号,例如 ROG 幻14、幻15、幻16、幻13、幻X、天选(飞行堡垒)系列、枪神/魔霸系列、创系列、灵耀系列、无畏系列、ROG Ally 等! # [:floppy_disk:下载应用](https://github.com/seerge/g-helper/releases/latest/download/GHelper.zip)
支持此项目 PayPal EUR  PayPal USD  Stripe  Alipay
如果你喜欢这个应用,请[给这个项目⭐️](https://github.com/seerge/g-helper) 或者向别人推荐它! [常见问题解答(FAQ)](#常见问题解答) [安装指南](#安装指南) [高级用户设置](#高级用户设置) [![G-Helper Download](https://github.com/pasical/g-helper/assets/112304778/03f442b9-29e8-4e99-a095-8eaa533c995b)](https://github.com/seerge/g-helper/releases/latest/download/GHelper.zip) _如果你在别的地方提到这个软件-请记得加上这个项目的网址。十分感谢。_ ## 🎁 主要优点 1. 自动且无缝的独立显卡模式切换(不需要关闭所有应用或执行其他操作) 2. 可以手动调整所有的性能模式(包括自定义风扇曲线以及PPTs(Platform Power Threshold,即CPU总功耗,下文简称PPTs--译注)) 3. 极致的轻量化,几乎不消耗任何资源,也不需要安装系统服务。只需要下载一个exe文件就可以运行。 4. 简洁的界面设计,可以轻松调整所有设置。 5. FN 锁定和自定义热键 ![image](https://github.com/pasical/g-helper/assets/112304778/ee221865-cf36-4246-95f0-47313e647230) ### ⚡️ 主要功能 1. **性能模式**: 静音模式 - 平衡模式 - 增强模式 (笔电bios内置的性能模式,附带默认的风扇曲线) 2. **显卡模式**: 集显模式 - 标准模式 - 独显直连 - 自动切换 3. 笔记本屏幕刷新率 60hz 或 120hz 自动调节(或者 144hz 等刷新率),包括屏幕Overdrive(OD,即ROG系列的屏幕快速响应/快显功能--译注)功能 4. 可调节的风扇曲线、电源功耗设置(PPTs)(_注:请谨慎调节!_)和CPU超频选项 5. ROG Anime matrix 光显矩阵屏控制, 感谢项目 [Starlight](https://github.com/vddCore/Starlight) + 应用侧的一些调整,包括动画GIF图片 6. 键盘灯光效果和颜色设置 (包括睡眠模式下的灯光效果和对飞行堡垒/天选系列的键盘支持) 7. 对M按键的自定义设置和 FN+X 快捷键的自定义 8. CPU/GPU温度、风扇转速和电池充放电功率显示 9. 电池充电上限设置,保护电池健康度 10. Nvidia GPU 超频和降压 11. XG Mobile 控制 12. AMD CPU 的降压 13. BIOS和驱动的升级 14. 华硕鼠标的配置修改 15. Mini-LED 屏幕的多区调光 16. 低亮度防闪烁功能和显示风格的修改 ### ⚙️ 当使用电池供电或插上电源时,自动切换: - 性能模式 (软件会记住上一次使用电池或插上电源时的电源模式) - 自动切换独立显卡模式 - 使用电池时停用独显,并在插上电源时重新启用 - 自动切换屏幕刷新率 (使用电池时切换为 60hz,插入电源后切换为 120+ hz) - 使用电池时键盘背光可自动关闭 为了保证自动切换功能和按键绑定功能的正常工作,软件需要在后台运行并显示一个托盘图标。这并不会消耗其他资源。 ### 🚀 性能模式 性能模式与 Armoury Crate(奥创控制中心)中的 **保持一致**,因为这些设置与其对应的风扇曲线都被保存在bios中 1. 静音 (风扇转速最小或完全停转, 70W 总PPT, 其中 CPU 最高 45W PPT) + windows电源模式设置为最长续航/省电模式 2. 平衡/性能 (平衡模式的风扇曲线设置, 100W 总PPT, 其中 CPU 最高 45W PPT) + windows电源模式设置为平衡 3. 增强 (激进的风扇曲线设置, 125W 总PPT, 其中 CPU 最高 80W PPT) + windows电源模式设置为高性能/最佳性能 _PPTs 默认在 幻14 2022版上显示, 对于其他型号 PPTs 的显示将会有所变化,因为它们在bios中的设置不同。_ ![Screenshot 2023-04-06 142234](https://user-images.githubusercontent.com/5920850/230377635-7032a480-3a94-4e35-9468-d8911e3e55ec.png) ### 🎮 显卡模式 1. 集显模式 : 只启用低功耗的内置显卡, 核显连接笔电内置屏幕 2. 标准模式 (MS Hybrid) : 同时启用核显与独显, 核显连接笔电内置屏幕 3. 独显直连: 同时启用核显与独显, 但独显直连笔电屏幕 (仅在幻14 2022版等机型上支持) 4. 自动切换: 使用电池时关闭独显(集显模式),并在插上电源后重新启用独显(混合输出) ![Screenshot 2024-03-11 111818](https://github.com/seerge/g-helper/assets/5920850/fd69a81e-978d-4d5c-a0a8-26da51f90a5b) ![GPU Modes](https://github.com/seerge/g-helper/assets/5920850/65c6bdd5-728c-4965-b544-fcf5a85ed6a2) ### :mouse: 华硕鼠标和其他外设的支持 [目前支持的型号](https://github.com/seerge/g-helper/discussions/900) *对于中国大陆发行的版本请自行参考 - ROG Chakram X - ROG Chakram Core - ROG Gladius II and Gladius II Origin - ROG Gladius II Wireless - ROG Gladius III - ROG Gladius III Wireless - ROG Harpe Ace Extreme - ROG Harpe Ace Aim Lab Edition - ROG Harpe Ace Mini - ROG Harpe II Ace - ROG Keris Wireless - ROG Keris II Ace - ROG Keris Wireless Aimpoint - ROG Strix Carry - ROG Strix III Gladius III Aimpoint Wireless - ROG Strix Impact III - ROG Strix Impact III Wireless - ROG Spatha X - ROG Strix Impact II Wireless - ROG Pugio - ROG Pugio II - TUF Gaming M4 Wireless - TUF Gaming M3 - TUF Gaming M3 Gen II - TUF Gaming M4 AIR - TUF Gaming M5 - TX Gaming Mini 特别感谢 [@IceStormNG](https://github.com/IceStormNG) 👑 的贡献和研究! ### ⌨️ 按键绑定 - ``Fn + F5 / Fn + Shift + F5`` - 向前/向后切换性能模式 - ``Ctrl + Shift + F5 / Ctrl + Shift + Alt + F5`` - 向前/向后切换性能模式 - ``Ctrl + Shift + F12`` - 打开G-Helper窗口 - ``Ctrl + M1 / M2`` - 屏幕亮度调低/调高 - ``Shift + M1 / M2`` - 键盘背光亮度调低/调高 - ``Fn + C`` - Fn锁定 - ``Fn + Shift + F7 / F8`` - 光显矩阵/光线矩阵亮度调低/调高 - ``Fn + Shift + F7 / F8`` - 屏幕亮度调低/调高 - ``Ctrl + Shift + F20`` - 麦克风静音 - ``Ctrl + Shift + Alt + F14`` - 集显模式 - ``Ctrl + Shift + Alt + F15`` - 标准模式 - ``Ctrl + Shift + Alt + F16`` - 静音模式 - ``Ctrl + Shift + Alt + F17`` - 平衡模式 - ``Ctrl + Shift + Alt + F18`` - 增强模式 - ``Ctrl + Shift + Alt + F19`` - 自定义 1(如果存在) - ``Ctrl + Shift + Alt + F20`` - 自定义 2(如果存在) - [自定义键绑定/热键](https://github.com/seerge/g-helper/wiki/Power-user-settings#custom-hotkey-actions) ### 🎮ROG Ally 按键 - ``M + DPad Left / Right`` - 显示亮度 - ``M + DPad Up`` - 屏幕键盘 - ``M + DPad Down`` - 显示桌面 - ``M + Y`` - 切换 AMD 覆盖 - ``M + X`` - 截屏 - ``M + Right Stick Click`` - 控制器模式 ------------------ #### 如果您喜欢本项目,可以扫描以下二维码捐赠 | [Paypal in EUR](https://www.paypal.com/donate/?hosted_button_id=4HMSHS4EBQWTA) | [Paypal in USD](https://www.paypal.com/donate/?hosted_button_id=SRM6QUX6ACXDY) | | ------------------------------------------ | ----------------------------------------------- | | [![QR Code](https://user-images.githubusercontent.com/5920850/233658717-0441494d-fede-4a2c-b4f2-4b16a184a69a.png)](https://www.paypal.com/donate/?hosted_button_id=4HMSHS4EBQWTA) | [![QR Code](https://github-production-user-asset-6210df.s3.amazonaws.com/5920850/239492811-b487e89a-3df6-42ea-bdb8-24c455ab2310.png)](https://www.paypal.com/donate/?hosted_button_id=SRM6QUX6ACXDY) | ------------------ # 常见问题解答 #### 当我按下 M4 / Rog键的时候总是弹出安装Armoury Crate的弹窗提示,我该如何关闭它? 删除下列文件或者把它移动(注:剪切+粘贴)到别的目录 ``C:\Windows\System32\ASUSACCI\ArmouryCrateKeyControl.exe``. 如果还是出现弹窗 - 进入 BIOS (开机时按住 F2), 按照屏幕下方的快捷键提示进入 Advanced Settings,然后关闭 "Armoury Crate Control Interface" (注:把它设置为disabled)。 #### 电池充电限制不起作用 这有可能是因为ASUS服务在你设置后又覆写了对应的设置。你可以通过在G-helper中点击"更多",然后在"正在运行的Asus服务项"右侧点击"停止"来停止ASUS服务。 #### 我没看到显卡模式 在一些旧型号中(比如幻14 2020)从硬件层上不支持禁用显卡,在这些机型中并不需要显卡模式,因此没有显示。 #### 为什么我的电脑上没有独显直连 独显直连(在硬件层面上)只对2022年之后的机型中生效。 #### 我是否应该自行调整功耗设置(PPTs)和风扇曲线? 你可以不那么做,这些操作是可选的。按照经验(bios)内置的性能模式工作的很好。请只在遇到问题的时候限制功耗或者手动设置风扇模式。当你在风扇与功率设置中按下“应用”时,bios将会认为风扇配置文件为“自定义”! (无论你是否真的修改了风扇曲线) #### G-helper是如何控制我的风扇转速的? 软件并不会修改风扇转速。这个设置实际上由bios控制(与Armoury Crate的情况相同)。G-helper 所能做的 - 就是将一个自定义的风扇配置(可选地)应用到正在使用的性能模式,其中包括8组温度+风扇速度的百分比数值%。软件通过与Armoury Crate看起来相同的WMI endpoint来应用这一设置, #### 我如何把风扇转速显示从百分比%切换到RPM(每分钟转速)? 点击一下百分比即可切换。 #### 当我修改自定义风扇曲线时,我得到了"BIOS拒绝修改风扇曲线"("BIOS rejected fan curve")提示 2021之后的TUF机型不支持自定义风扇曲线。很可能在Armory Crate中也没有这个选项。 #### 我没有在G-helper中看到独显温度 很可能要么你正在使用核显模式/自动切换模式,这种情况下独显只是关闭了;或者你的windows系统为独显设置了睡眠模式(为了省电)。这种情况下,G-helper无法识别到独显,也不能获得温度读数。 #### 打开应用后没有看到应用启动/弹窗提示"G-Helper已经在运行" 请在系统托盘里找到 (G) 图标。windows会默认隐藏所有图标,所以你可能需要点击 ^ 来看见它们。建议任务栏右键进入任务栏设置 -> 其他系统图标 -> 将 G-Helper 设置为始终在任务栏上显示。 #### 应用不能启动或者崩溃了,我该怎么做? 从开始菜单里打开“事件管理器”, 进入 Windows日志 -> 应用,然后在最近的错误日志里寻找包含G-helper的日志。如果你找到一个 - 请提出一个 [新的 issue](https://github.com/seerge/g-helper/issues) ,其中包含来自这次错误的所有的详细信息。 #### 我可以在用G-Helper的时候同时用myASUS吗? 当然可以! 唯一的问题是myASUS可能会重置你之前在g-helper里设置的电池充电上限。在这种情况下,建议你在这两个应用(myASUS和g-helper)里设置相同的充电上限(60%/80%/100%)以避免冲突。 #### 我如何将M3键设置为将麦克风静音? 这个功能由 Asus Optimization Service 管理(所以 G-helper 没有这项设置,也不管理这个功能)。请确认这个系统服务是否正常运行 #### 我如何设置不同的视觉风格(即 Armoury Crate 内的gamevisual功能)? 因为这个功能让颜色显示不正确,我个人(注:作者 :) )并不喜欢这些。但是如果你需要这个功能 - 你可以使用 Nvidia 控制面板/GefoeceExperirence滤镜或者AMD控制面板(Radeon Software/AMD Software: Adrenalin Edition)来修改显示颜色(因显示器和配置而异)。如果你真的非常需要这个功能,你也可以使用 [微软商店中ASUS自己的工具](https://apps.microsoft.com/store/detail/gamevisual/9P4K1LFTXSH8?hl=nl-nl&gl=nl&rtc=1) #### 我能超频 Nvidia GPU 核心或显存吗? 首先确保你的独立显卡是启用的,之后打开"风扇 + 电源"选项,在这里即可调整核心和显存频率。这个和Armoury Crate中的设置一样。注意,使用这项功能需要管理员权限,应用也会弹出需要管理员权限的提示。(*) #### Windows Defender将该应用标记为恶意软件/病毒 这是Windows Defender的误报(其他使用机器学习来检测病毒的杀毒软件可能也出现同样的结果),这可能是因为本应用没有数字签名和证书。如果你不放心的话,你可以自己编译安装本项目,本项目是完全开源的。 #### 我该在哪找到应用的配置文件和日志文件 你可以在 `%AppData%\GHelper` 文件夹找到他们,当你在issue中提交bug的时候,请务必附上应用日志。 #### 应用无法在开机时启动或者启动的时候在任务栏没有提示 打开应用,取消再重新勾选"开机自启"项目。如果还是不行的话,你可以手动在Windows 任务计划程序(Task Scheduler)中为G-helper应用增加几秒延迟后再启动。 #### 我该如何卸载G-helper? G-helper是一个单文件的exe文件, 而且它不会向系统中安装任何东西。如果要“卸载”它 - 你可以直接删除exe文件 :) 如果你已经设置了自定义的风扇配置或者功耗设置(PPTs) - 在删除软件之前建议你选择你最喜欢的配置模式(比如"平衡"),然后在“风扇与电源设置”里点击“恢复默认设置”。 #### 我如何给我的CPU降压? 目前你只能给AMD CPU降压。如果你的机型支持这个功能 - 你会在“风扇 + 电源”项中看到对应的设置。如果你看不到该项设置,说明你的CPU不支持降压。所有支持的型号可以[点此查询](https://github.com/seerge/g-helper/discussions/736)。 #### 我的机型是幻14 2023并且我无法关闭/开启我的独立显卡 这应该是旧版本的BIOS的问题。根据[用户反馈](https://github.com/seerge/g-helper/issues/680),更新最近的BIOS 312版本即可解决问题(可以通过MyASUS或者G-helper "更新" 项进行安装)。 #### 我的机型是幻15 2022并且我无法关闭/开启我的独立显卡或者风扇出问题 幻15 2022款在BIOS 313以上版本会有很多小问题。许多用户反馈可以通过[将BIOS版本降级到311版本来解决](https://rog.asus.com/nl/laptops/rog-zephyrus/rog-zephyrus-g15-2022-series/helpdesk_bios/)。 #### 我删除了Armoury之后我的GPU性能降低了 检查你的 Nvidia Experience 设置,确保Whisper Mode项是关闭的。你还可以尝试重置所有设置。`Nvidia 控制面板 -> 管理 3D 设置 -> 恢复` #### 我如何从硬件层面重启我的笔记本? 所有的华硕笔记本都支持方便的硬重启。它不会影响你的数据,但是会重置所有硬件相关的东西(例如启动独立显卡,唤醒wifi/蓝牙模块等) 关闭你的电脑,长按“电源”按钮30-40秒。之后正常启动你的电脑(会比正常情况下花更长时间启动)。 #### G-helper 是什么? 这是一个轻量化的Armoury Crate(奥创控制中心)替代工具,而且不需要任何多余的功能或安装不必要的系统服务的。在ROG G14, G15, G16, M16, X13, Z13, X16, TUF, Scar, Vivobook, ProArt等热门笔记本中都适用。 --- ### 如何开始 1.下载[**最新版本**](https://github.com/seerge/g-helper/releases/latest/download/GHelper.zip) 2. 解压到您选择的文件夹_(不要直接从zip运行exe,因为Windows会将其放入临时文件夹并在之后删除)_ 3.运行**GHelper.exe** - 如果您在启动时收到来自 Windows Defender 的警告(Windows 保护了您的电脑)。 单击“更多信息”->“仍然运行”。 - 如果出现“在商店中搜索应用程序”对话框,则这是 Windows Defender 的一个错误。 右键单击 GHelper.exe -> 选择“属性” -> 选择“取消阻止复选框” ### 要求(强制) - [Microsoft .NET 7](https://download.visualstudio.microsoft.com/download/pr/8091a826-e1c4-424a-b17b-5c10776cd3de/8957f21a279322d8fac9b542c6aba12e/dotnet-sdk-7.0.408-win-x64.exe) - [华硕系统控制界面](https://dlcdnets.asus.com/pub/ASUS/nb/Image/CustomComponent/ASUSSystemControlInterfaceV3/ASUSSystemControlInterfaceV3.exe) ### 建议(可选) - **不建议**将该应用程序与 Armoury Crate 服务结合使用,因为它们调整相同的设置。 您可以[使用AC自带的卸载工具卸载](https://dlcdnets.asus.com/pub/ASUS/mb/14Utilities/Armoury_Crate_Uninstall_Tool.zip?model=armoury%20crate)。 以防万一,您可以稍后再安装它。 - **不建议**运行“ASUS Smart Display Control”应用程序,因为它会尝试更改刷新率并与 g-helper 争夺相同的功能。 您可以安全地卸载它。 - 如果您不打算使用 MyASUS,您可以停止/禁用不必要的服务:转到应用程序中的 **Extra**,然后按 Asus 服务部分中的“停止”。 要重新启动/启用服务 - 单击“开始”。 --- 精简你的windows可以帮助延长电池的使用时间,同时让笔电的温度更低一些 ![Helps to save your battery](https://raw.githubusercontent.com/seerge/g-helper/main/docs/screenshots/screen-5w.png) --- # 高级用户设置 ### 为每一个模式自定义用户计划 在 config.json (位于 `%appdata%/GHelper`) 中你可以手动添加自定义电源设置的GUID (它既可以是"真正的"可被选择的电源计划,也可以是"覆盖式(overlay)"的电源计划,就像g-helper默认设置的那样) 格式如下 : "scheme_``" : "GUID" Where ``mode = 0 (balanced), 1 (turbo), 2 (silent)`` ``` "scheme_0": "2ac1d0e0-17a7-44ed-8091-d88ef75a4eb0", "scheme_1": "381b4222-f694-41f0-9685-ff5bb260df2e" ``` 确保修改时保证json文件的结构不被打乱 (例如不要增减或缺失逗号、括号等操作) - 否则应用会读取失败,并将重新创建一个新的配置文件来替代它。 ### 自定义热键行为 软件支持热键自定义配置。如要设置,在按键旁的选项框中选择"自定义设置",然后执行下面的操作(任选其一): 1. 要想运行任意应用 - 向 "action" 文本框中粘贴应用文件exe的完整路径,例如: ``C:\Program Files\EA Games\Battlefield 2042\BF2042.exe`` 2. 要想模拟任意windows按键 - 向"action"文本框中粘贴相对应的 keycode,例如 ``0x2C`` 为屏幕截图键。 Keycodes的完整列表: https://learn.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes ![image](https://github.com/pasical/g-helper/assets/112304778/1280b7c9-f0c1-4b91-b502-2b9dd79b12d8) --- ### 使用的库和项目 - [Linux Kernel](https://github.com/torvalds/linux/blob/master/drivers/platform/x86/asus-wmi.c)华硕 ACPI/WMI 接口中一些基本端点的 Linux 内核 - [NvAPIWrapper](https://github.com/falahati/NvAPIWrapper) 用于访问 Nvidia API - [Starlight](https://github.com/vddCore/Starlight) 光显矩阵通信协议 - [UXTU](https://github.com/JamesCJ60/Universal-x86-Tuning-Utility) 使用 Ryzen 系统管理单元进行降压 - [AsusCtl](https://gitlab.com/asus-linux/asusctl) 提供灵感和一些逆向工程 ### 🔖 注意事项 G-Helper 不是操作系统、固件或驱动程序。它无论如何都不会实时“运行”您的硬件。 这只是一个应用程序,允许您选择制造商创建的预定义操作模式之一(并存储在 BIOS 中),并可选地(!)设置一些已经存在于您的设备上的设置,与 Armoury Crate 的原理相同。它通过使用 Armoury Crate 所使用的 Asus System Control Interface “驱动程序”来实现所有功能。 如果您使用的模式/设置与 Armoury Crate 中的相同 - 您设备的性能或行为不会有差异。 G-Helper 对您笔记本电脑的作用,类似于遥控器对您电视的作用。 ### 免责声明 "ROG"、"TUF" 和 "Armoury Crate" 是 AsusTek Computer, Inc. 的注册商标。我对这些或任何属于 AsusTek Computer 的资产不提出任何主张,仅出于信息传递目的而使用它们。 软件按“现状”提供,不提供任何形式的明示或暗示保证,包括但不限于对适销性、特定用途的适用性和非侵权的保证。滥用此软件可能导致系统不稳定或故障。 _注:请务必参考下方 **免责声明** 原文,以避免或减小错误或不恰当之翻译引起的负面影响。翻译仅为便于阅读之目的,并非专业翻译,可能存在错误,可能与最新版本有所差异。本文不具有法律效力,亦不作为发生争端时处理之依据。_ **Disclaimers** "ROG", "TUF", and "Armoury Crate" are trademarked by and belong to AsusTek Computer, Inc. I make no claims to these or any assets belonging to AsusTek Computer and use them purely for informational purposes only. THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. MISUSE OF THIS SOFTWARE COULD CAUSE SYSTEM INSTABILITY OR MALFUNCTION. ================================================ FILE: docs/_config.yml ================================================ title: G-Helper description: Open source Armory Crate alternative for Asus ROG Zephyrus G14, G15, Flow X13, Flow X16, and other models plugins: - jemoji ================================================ FILE: docs/_layouts/default.html ================================================ {% seo %} {% include head-custom.html %}
{{ content }} {% if site.github.private != true and site.github.license %} {% endif %}
================================================ FILE: docs/bloat.bat ================================================ sc config AsusAppService start= auto sc config ASUSLinkNear start= auto sc config ASUSLinkRemote start= auto sc config ASUSSoftwareManager start= auto sc config ASUSSwitch start= auto sc config ASUSSystemAnalysis start= auto sc config ASUSSystemDiagnosis start= auto sc config ArmouryCrateControlInterface start= auto sc config AsusCertService start= auto sc config ASUSOptimization start= auto sc START AsusAppService sc START ASUSLinkNear sc START ASUSLinkRemote sc START ASUSSoftwareManager sc START ASUSSwitch sc START ASUSSystemAnalysis sc START ASUSSystemDiagnosis sc START ArmouryCrateControlInterface sc START AsusCertService sc START ASUSOptimization set /p asd="Hit enter to finish" ================================================ FILE: docs/debloat.bat ================================================ sc STOP AsusAppService sc STOP ASUSLinkNear sc STOP ASUSLinkRemote sc STOP ASUSSoftwareManager sc STOP ASUSSwitch sc STOP ASUSSystemAnalysis sc STOP ASUSSystemDiagnosis sc STOP ArmouryCrateControlInterface sc STOP AsusCertService sc STOP ASUSOptimization sc config AsusAppService start= disabled sc config ASUSLinkNear start= disabled sc config ASUSLinkRemote start= disabled sc config ASUSSoftwareManager start= disabled sc config ASUSSwitch start= disabled sc config ASUSSystemAnalysis start= disabled sc config ASUSSystemDiagnosis start= disabled sc config ArmouryCrateControlInterface start= disabled sc config AsusCertService start= disabled sc config ASUSOptimization start= disabled set /p asd="Hit enter to finish"