Initial Commit

main v1.0.0
Nichole Mattera 6 years ago
commit 743ecdeac2
  1. 278
      .gitignore
  2. 1
      README.md
  3. 22
      SystemUITuner.sln
  4. 6
      SystemUITuner/App.config
  5. BIN
      SystemUITuner/Icon1.ico
  6. 469
      SystemUITuner/Main.Designer.cs
  7. 519
      SystemUITuner/Main.cs
  8. 1889
      SystemUITuner/Main.resx
  9. 22
      SystemUITuner/Program.cs
  10. 36
      SystemUITuner/Properties/AssemblyInfo.cs
  11. 63
      SystemUITuner/Properties/Resources.Designer.cs
  12. 117
      SystemUITuner/Properties/Resources.resx
  13. 26
      SystemUITuner/Properties/Settings.Designer.cs
  14. 7
      SystemUITuner/Properties/Settings.settings
  15. 128
      SystemUITuner/SystemUITuner.csproj

278
.gitignore vendored

@ -0,0 +1,278 @@
## 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
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
# Visual Studio 2015 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUNIT
*.VisualState.xml
TestResult.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/
**/Properties/launchSettings.json
*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.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
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# JustCode is a .NET coding add-in
.JustCode
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# 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
# TODO: 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
# The packages folder can be ignored because of Package Restore
**/packages/*
# except build/, which is used as an MSBuild target.
!**/packages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/packages/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
# 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
# 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
# SQL Server files
*.mdf
*.ldf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
# Typescript v1 declaration files
typings/
# 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/
# JetBrains Rider
.idea/
*.sln.iml
# CodeRush
.cr/
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config

@ -0,0 +1 @@
"# System UI Tuner"

@ -0,0 +1,22 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SystemUITuner", "SystemUITuner\SystemUITuner.csproj", "{0A7136DD-798C-4E3F-B677-9EF658E68AEB}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{0A7136DD-798C-4E3F-B677-9EF658E68AEB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0A7136DD-798C-4E3F-B677-9EF658E68AEB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0A7136DD-798C-4E3F-B677-9EF658E68AEB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0A7136DD-798C-4E3F-B677-9EF658E68AEB}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
</startup>
</configuration>

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

@ -0,0 +1,469 @@
namespace SystemUITuner
{
partial class Main
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Main));
this.label2 = new System.Windows.Forms.Label();
this.devicesCombo = new System.Windows.Forms.ComboBox();
this.refreshButton = new System.Windows.Forms.Button();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.alarmCheck = new System.Windows.Forms.CheckBox();
this.label3 = new System.Windows.Forms.Label();
this.clockCombo = new System.Windows.Forms.ComboBox();
this.batteryCombo = new System.Windows.Forms.ComboBox();
this.label1 = new System.Windows.Forms.Label();
this.airplaneCheck = new System.Windows.Forms.CheckBox();
this.mobileCheck = new System.Windows.Forms.CheckBox();
this.ethernetCheck = new System.Windows.Forms.CheckBox();
this.wifiCheck = new System.Windows.Forms.CheckBox();
this.volumeCheck = new System.Windows.Forms.CheckBox();
this.zenCheck = new System.Windows.Forms.CheckBox();
this.bluetoothCheck = new System.Windows.Forms.CheckBox();
this.hotspotCheck = new System.Windows.Forms.CheckBox();
this.castCheck = new System.Windows.Forms.CheckBox();
this.managedCheck = new System.Windows.Forms.CheckBox();
this.headsetCheck = new System.Windows.Forms.CheckBox();
this.rotateCheck = new System.Windows.Forms.CheckBox();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.volumeSilentCheck = new System.Windows.Forms.CheckBox();
this.showZenCheck = new System.Windows.Forms.CheckBox();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.importanceCheck = new System.Windows.Forms.CheckBox();
this.label4 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox3.SuspendLayout();
this.SuspendLayout();
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(13, 13);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(46, 13);
this.label2.TabIndex = 0;
this.label2.Text = "Devices";
//
// devicesCombo
//
this.devicesCombo.Enabled = false;
this.devicesCombo.FormattingEnabled = true;
this.devicesCombo.Location = new System.Drawing.Point(16, 31);
this.devicesCombo.Name = "devicesCombo";
this.devicesCombo.Size = new System.Drawing.Size(338, 21);
this.devicesCombo.TabIndex = 1;
this.devicesCombo.SelectedIndexChanged += new System.EventHandler(this.devicesCombo_SelectedIndexChanged);
//
// refreshButton
//
this.refreshButton.Location = new System.Drawing.Point(360, 30);
this.refreshButton.Name = "refreshButton";
this.refreshButton.Size = new System.Drawing.Size(75, 23);
this.refreshButton.TabIndex = 2;
this.refreshButton.Text = "Refresh";
this.refreshButton.UseVisualStyleBackColor = true;
this.refreshButton.Click += new System.EventHandler(this.refreshButton_Click);
//
// groupBox1
//
this.groupBox1.Controls.Add(this.alarmCheck);
this.groupBox1.Controls.Add(this.label3);
this.groupBox1.Controls.Add(this.clockCombo);
this.groupBox1.Controls.Add(this.batteryCombo);
this.groupBox1.Controls.Add(this.label1);
this.groupBox1.Controls.Add(this.airplaneCheck);
this.groupBox1.Controls.Add(this.mobileCheck);
this.groupBox1.Controls.Add(this.ethernetCheck);
this.groupBox1.Controls.Add(this.wifiCheck);
this.groupBox1.Controls.Add(this.volumeCheck);
this.groupBox1.Controls.Add(this.zenCheck);
this.groupBox1.Controls.Add(this.bluetoothCheck);
this.groupBox1.Controls.Add(this.hotspotCheck);
this.groupBox1.Controls.Add(this.castCheck);
this.groupBox1.Controls.Add(this.managedCheck);
this.groupBox1.Controls.Add(this.headsetCheck);
this.groupBox1.Controls.Add(this.rotateCheck);
this.groupBox1.Location = new System.Drawing.Point(16, 58);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(206, 413);
this.groupBox1.TabIndex = 3;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Status Bar";
//
// alarmCheck
//
this.alarmCheck.AutoSize = true;
this.alarmCheck.Enabled = false;
this.alarmCheck.Location = new System.Drawing.Point(7, 346);
this.alarmCheck.Name = "alarmCheck";
this.alarmCheck.Size = new System.Drawing.Size(52, 17);
this.alarmCheck.TabIndex = 16;
this.alarmCheck.Text = "Alarm";
this.alarmCheck.UseVisualStyleBackColor = true;
this.alarmCheck.CheckedChanged += new System.EventHandler(this.statusBarCheck_CheckedChanged);
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(3, 366);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(30, 13);
this.label3.TabIndex = 15;
this.label3.Text = "Time";
//
// clockCombo
//
this.clockCombo.Enabled = false;
this.clockCombo.FormattingEnabled = true;
this.clockCombo.Items.AddRange(new object[] {
"Show hours, minutes, and seconds",
"Show hours and minutes (default)",
"Don\'t show this icon"});
this.clockCombo.Location = new System.Drawing.Point(6, 382);
this.clockCombo.Name = "clockCombo";
this.clockCombo.Size = new System.Drawing.Size(194, 21);
this.clockCombo.TabIndex = 14;
this.clockCombo.SelectedIndexChanged += new System.EventHandler(this.clockCombo_SelectedIndexChanged);
//
// batteryCombo
//
this.batteryCombo.Enabled = false;
this.batteryCombo.FormattingEnabled = true;
this.batteryCombo.Items.AddRange(new object[] {
"Always show percentage",
"Show percentage when charging (default)",
"Don\'t show this icon"});
this.batteryCombo.Location = new System.Drawing.Point(7, 319);
this.batteryCombo.Name = "batteryCombo";
this.batteryCombo.Size = new System.Drawing.Size(193, 21);
this.batteryCombo.TabIndex = 13;
this.batteryCombo.SelectedIndexChanged += new System.EventHandler(this.batteryCombo_SelectedIndexChanged);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(3, 303);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(40, 13);
this.label1.TabIndex = 12;
this.label1.Text = "Battery";
//
// airplaneCheck
//
this.airplaneCheck.AutoSize = true;
this.airplaneCheck.Enabled = false;
this.airplaneCheck.Location = new System.Drawing.Point(7, 283);
this.airplaneCheck.Name = "airplaneCheck";
this.airplaneCheck.Size = new System.Drawing.Size(93, 17);
this.airplaneCheck.TabIndex = 11;
this.airplaneCheck.Text = "Airplane mode";
this.airplaneCheck.UseVisualStyleBackColor = true;
this.airplaneCheck.CheckedChanged += new System.EventHandler(this.statusBarCheck_CheckedChanged);
//
// mobileCheck
//
this.mobileCheck.AutoSize = true;
this.mobileCheck.Enabled = false;
this.mobileCheck.Location = new System.Drawing.Point(7, 259);
this.mobileCheck.Name = "mobileCheck";
this.mobileCheck.Size = new System.Drawing.Size(86, 17);
this.mobileCheck.TabIndex = 10;
this.mobileCheck.Text = "Cellular Data";
this.mobileCheck.UseVisualStyleBackColor = true;
this.mobileCheck.CheckedChanged += new System.EventHandler(this.statusBarCheck_CheckedChanged);
//
// ethernetCheck
//
this.ethernetCheck.AutoSize = true;
this.ethernetCheck.Enabled = false;
this.ethernetCheck.Location = new System.Drawing.Point(7, 235);
this.ethernetCheck.Name = "ethernetCheck";
this.ethernetCheck.Size = new System.Drawing.Size(66, 17);
this.ethernetCheck.TabIndex = 9;
this.ethernetCheck.Text = "Ethernet";
this.ethernetCheck.UseVisualStyleBackColor = true;
this.ethernetCheck.CheckedChanged += new System.EventHandler(this.statusBarCheck_CheckedChanged);
//
// wifiCheck
//
this.wifiCheck.AutoSize = true;
this.wifiCheck.Enabled = false;
this.wifiCheck.Location = new System.Drawing.Point(7, 211);
this.wifiCheck.Name = "wifiCheck";
this.wifiCheck.Size = new System.Drawing.Size(50, 17);
this.wifiCheck.TabIndex = 8;
this.wifiCheck.Text = "Wi-Fi";
this.wifiCheck.UseVisualStyleBackColor = true;
this.wifiCheck.CheckedChanged += new System.EventHandler(this.statusBarCheck_CheckedChanged);
//
// volumeCheck
//
this.volumeCheck.AutoSize = true;
this.volumeCheck.Enabled = false;
this.volumeCheck.Location = new System.Drawing.Point(7, 187);
this.volumeCheck.Name = "volumeCheck";
this.volumeCheck.Size = new System.Drawing.Size(61, 17);
this.volumeCheck.TabIndex = 7;
this.volumeCheck.Text = "Volume";
this.volumeCheck.UseVisualStyleBackColor = true;
this.volumeCheck.CheckedChanged += new System.EventHandler(this.statusBarCheck_CheckedChanged);
//
// zenCheck
//
this.zenCheck.AutoSize = true;
this.zenCheck.Enabled = false;
this.zenCheck.Location = new System.Drawing.Point(7, 163);
this.zenCheck.Name = "zenCheck";
this.zenCheck.Size = new System.Drawing.Size(92, 17);
this.zenCheck.TabIndex = 6;
this.zenCheck.Text = "Do not disturb";
this.zenCheck.UseVisualStyleBackColor = true;
this.zenCheck.CheckedChanged += new System.EventHandler(this.statusBarCheck_CheckedChanged);
//
// bluetoothCheck
//
this.bluetoothCheck.AutoSize = true;
this.bluetoothCheck.Enabled = false;
this.bluetoothCheck.Location = new System.Drawing.Point(7, 139);
this.bluetoothCheck.Name = "bluetoothCheck";
this.bluetoothCheck.Size = new System.Drawing.Size(71, 17);
this.bluetoothCheck.TabIndex = 5;
this.bluetoothCheck.Text = "Bluetooth";
this.bluetoothCheck.UseVisualStyleBackColor = true;
this.bluetoothCheck.CheckedChanged += new System.EventHandler(this.statusBarCheck_CheckedChanged);
//
// hotspotCheck
//
this.hotspotCheck.AutoSize = true;
this.hotspotCheck.Enabled = false;
this.hotspotCheck.Location = new System.Drawing.Point(7, 115);
this.hotspotCheck.Name = "hotspotCheck";
this.hotspotCheck.Size = new System.Drawing.Size(63, 17);
this.hotspotCheck.TabIndex = 4;
this.hotspotCheck.Text = "Hotspot";
this.hotspotCheck.UseVisualStyleBackColor = true;
this.hotspotCheck.CheckedChanged += new System.EventHandler(this.statusBarCheck_CheckedChanged);
//
// castCheck
//
this.castCheck.AutoSize = true;
this.castCheck.Enabled = false;
this.castCheck.Location = new System.Drawing.Point(7, 91);
this.castCheck.Name = "castCheck";
this.castCheck.Size = new System.Drawing.Size(47, 17);
this.castCheck.TabIndex = 3;
this.castCheck.Text = "Cast";
this.castCheck.UseVisualStyleBackColor = true;
this.castCheck.CheckedChanged += new System.EventHandler(this.statusBarCheck_CheckedChanged);
//
// managedCheck
//
this.managedCheck.AutoSize = true;
this.managedCheck.Enabled = false;
this.managedCheck.Location = new System.Drawing.Point(7, 67);
this.managedCheck.Name = "managedCheck";
this.managedCheck.Size = new System.Drawing.Size(83, 17);
this.managedCheck.TabIndex = 2;
this.managedCheck.Text = "Work profile";
this.managedCheck.UseVisualStyleBackColor = true;
this.managedCheck.CheckedChanged += new System.EventHandler(this.statusBarCheck_CheckedChanged);
//
// headsetCheck
//
this.headsetCheck.AutoSize = true;
this.headsetCheck.Enabled = false;
this.headsetCheck.Location = new System.Drawing.Point(7, 43);
this.headsetCheck.Name = "headsetCheck";
this.headsetCheck.Size = new System.Drawing.Size(66, 17);
this.headsetCheck.TabIndex = 1;
this.headsetCheck.Text = "Headset";
this.headsetCheck.UseVisualStyleBackColor = true;
this.headsetCheck.CheckedChanged += new System.EventHandler(this.statusBarCheck_CheckedChanged);
//
// rotateCheck
//
this.rotateCheck.AutoSize = true;
this.rotateCheck.Enabled = false;
this.rotateCheck.Location = new System.Drawing.Point(7, 20);
this.rotateCheck.Name = "rotateCheck";
this.rotateCheck.Size = new System.Drawing.Size(113, 17);
this.rotateCheck.TabIndex = 0;
this.rotateCheck.Text = "Auto-rotate screen";
this.rotateCheck.UseVisualStyleBackColor = true;
this.rotateCheck.CheckedChanged += new System.EventHandler(this.statusBarCheck_CheckedChanged);
//
// groupBox2
//
this.groupBox2.Controls.Add(this.volumeSilentCheck);
this.groupBox2.Controls.Add(this.showZenCheck);
this.groupBox2.Location = new System.Drawing.Point(229, 58);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(206, 66);
this.groupBox2.TabIndex = 4;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "Do not disturb";
//
// volumeSilentCheck
//
this.volumeSilentCheck.AutoSize = true;
this.volumeSilentCheck.Enabled = false;
this.volumeSilentCheck.Location = new System.Drawing.Point(7, 43);
this.volumeSilentCheck.Name = "volumeSilentCheck";
this.volumeSilentCheck.Size = new System.Drawing.Size(140, 17);
this.volumeSilentCheck.TabIndex = 1;
this.volumeSilentCheck.Text = "Volume buttons shortcut";
this.volumeSilentCheck.UseVisualStyleBackColor = true;
this.volumeSilentCheck.CheckedChanged += new System.EventHandler(this.volumeSilentCheck_CheckedChanged);
//
// showZenCheck
//
this.showZenCheck.AutoSize = true;
this.showZenCheck.Enabled = false;
this.showZenCheck.Location = new System.Drawing.Point(7, 20);
this.showZenCheck.Name = "showZenCheck";
this.showZenCheck.Size = new System.Drawing.Size(147, 17);
this.showZenCheck.TabIndex = 0;
this.showZenCheck.Text = "Show with volume control";
this.showZenCheck.UseVisualStyleBackColor = true;
this.showZenCheck.CheckedChanged += new System.EventHandler(this.showZenCheck_CheckedChanged);
//
// groupBox3
//
this.groupBox3.Controls.Add(this.importanceCheck);
this.groupBox3.Location = new System.Drawing.Point(229, 130);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(206, 45);
this.groupBox3.TabIndex = 5;
this.groupBox3.TabStop = false;
this.groupBox3.Text = "Other";
//
// importanceCheck
//
this.importanceCheck.AutoSize = true;
this.importanceCheck.Enabled = false;
this.importanceCheck.Location = new System.Drawing.Point(7, 20);
this.importanceCheck.Name = "importanceCheck";
this.importanceCheck.Size = new System.Drawing.Size(150, 17);
this.importanceCheck.TabIndex = 0;
this.importanceCheck.Text = "Power notification controls";
this.importanceCheck.UseVisualStyleBackColor = true;
this.importanceCheck.CheckedChanged += new System.EventHandler(this.importanceCheck_CheckedChanged);
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(306, 444);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(134, 13);
this.label4.TabIndex = 6;
this.label4.Text = "Created by Steven Mattera";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(380, 430);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(60, 13);
this.label5.TabIndex = 7;
this.label5.Text = "Version 1.0";
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(281, 458);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(159, 13);
this.label6.TabIndex = 8;
this.label6.Text = "Using AndroidLib by Dan Wager";
//
// Main
//
this.ClientSize = new System.Drawing.Size(452, 485);
this.Controls.Add(this.label6);
this.Controls.Add(this.label5);
this.Controls.Add(this.label4);
this.Controls.Add(this.groupBox3);
this.Controls.Add(this.groupBox2);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.refreshButton);
this.Controls.Add(this.devicesCombo);
this.Controls.Add(this.label2);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "Main";
this.Text = "System UI Tuner";
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.Main_FormClosed);
this.Load += new System.EventHandler(this.Main_Load);
this.Shown += new System.EventHandler(this.Main_Shown);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
this.groupBox3.ResumeLayout(false);
this.groupBox3.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label label2;
private System.Windows.Forms.ComboBox devicesCombo;
private System.Windows.Forms.Button refreshButton;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.CheckBox alarmCheck;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.ComboBox clockCombo;
private System.Windows.Forms.ComboBox batteryCombo;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.CheckBox airplaneCheck;
private System.Windows.Forms.CheckBox mobileCheck;
private System.Windows.Forms.CheckBox ethernetCheck;
private System.Windows.Forms.CheckBox wifiCheck;
private System.Windows.Forms.CheckBox volumeCheck;
private System.Windows.Forms.CheckBox zenCheck;
private System.Windows.Forms.CheckBox bluetoothCheck;
private System.Windows.Forms.CheckBox hotspotCheck;
private System.Windows.Forms.CheckBox castCheck;
private System.Windows.Forms.CheckBox managedCheck;
private System.Windows.Forms.CheckBox headsetCheck;
private System.Windows.Forms.CheckBox rotateCheck;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.CheckBox volumeSilentCheck;
private System.Windows.Forms.CheckBox showZenCheck;
private System.Windows.Forms.GroupBox groupBox3;
private System.Windows.Forms.CheckBox importanceCheck;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label6;
}
}

@ -0,0 +1,519 @@
using RegawMOD.Android;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace SystemUITuner
{
public partial class Main : Form
{
BackgroundWorker deviceListWorker = new BackgroundWorker();
AndroidController android;
Device device;
String user;
bool loading = true;
public Main()
{
InitializeComponent();
deviceListWorker.DoWork += new DoWorkEventHandler(updateDeviceList);
deviceListWorker.RunWorkerCompleted += new RunWorkerCompletedEventHandler((object s, RunWorkerCompletedEventArgs args) =>
{
devicesCombo.DataSource = args.Result;
if (devicesCombo.DataSource != null)
{
devicesCombo.Enabled = true;
}
else
{
devicesCombo.Enabled = false;
devicesCombo.SelectedIndex = -1;
}
});
}
private void Main_Load(object sender, EventArgs e)
{
android = AndroidController.Instance;
}
private void Main_Shown(object sender, EventArgs e)
{
deviceListWorker.RunWorkerAsync();
}
private void Main_FormClosed(object sender, FormClosedEventArgs e)
{
android.Dispose();
}
private void refreshButton_Click(object sender, EventArgs e)
{
if (deviceListWorker.IsBusy)
{
return;
}
deviceListWorker.RunWorkerAsync();
}
private void devicesCombo_SelectedIndexChanged(object sender, EventArgs e)
{
selectDevice((String)devicesCombo.SelectedItem);
}
private void statusBarCheck_CheckedChanged(object sender, EventArgs e)
{
applyIconBlacklist();
}
private void batteryCombo_SelectedIndexChanged(object sender, EventArgs e)
{
applyIconBlacklist();
applyBatteryPercentage();
}
private void clockCombo_SelectedIndexChanged(object sender, EventArgs e)
{
applyIconBlacklist();
applyClockSeconds();
}
private void showZenCheck_CheckedChanged(object sender, EventArgs e)
{
applyShowZen();
}
private void volumeSilentCheck_CheckedChanged(object sender, EventArgs e)
{
applyVolumeShortcut();
}
private void importanceCheck_CheckedChanged(object sender, EventArgs e)
{
applyImportance();
}
private void updateDeviceList(object sender, DoWorkEventArgs e)
{
android.UpdateDeviceList();
if (android.HasConnectedDevices)
{
e.Result = android.ConnectedDevices;
}
else
{
e.Result = null;
}
}
private void selectDevice(String serial)
{
device = null;
user = null;
loading = true;
android.UpdateDeviceList();
if (android.HasConnectedDevices)
{
List<String> devices = android.ConnectedDevices;
if (devices.Exists(x => (x == serial)))
{
device = android.GetConnectedDevice(serial);
}
}
if (device == null)
{
MessageBox.Show("The device you selected is no longer available.", "Device Unavailable", MessageBoxButtons.OK, MessageBoxIcon.Error);
rotateCheck.Enabled = false;
headsetCheck.Enabled = false;
managedCheck.Enabled = false;
castCheck.Enabled = false;
hotspotCheck.Enabled = false;
bluetoothCheck.Enabled = false;
zenCheck.Enabled = false;
volumeCheck.Enabled = false;
wifiCheck.Enabled = false;
ethernetCheck.Enabled = false;
mobileCheck.Enabled = false;
airplaneCheck.Enabled = false;
batteryCombo.Enabled = false;
batteryCombo.SelectedIndex = -1;
alarmCheck.Enabled = false;
clockCombo.Enabled = false;
clockCombo.SelectedIndex = -1;
showZenCheck.Enabled = false;
volumeSilentCheck.Enabled = false;
importanceCheck.Enabled = false;
}
else
{
getCurrentSettings();
rotateCheck.Enabled = true;
headsetCheck.Enabled = true;
managedCheck.Enabled = true;
castCheck.Enabled = true;
hotspotCheck.Enabled = true;
bluetoothCheck.Enabled = true;
zenCheck.Enabled = true;
volumeCheck.Enabled = true;
wifiCheck.Enabled = true;
ethernetCheck.Enabled = true;
mobileCheck.Enabled = true;
airplaneCheck.Enabled = true;
batteryCombo.Enabled = true;
alarmCheck.Enabled = true;
clockCombo.Enabled = true;
showZenCheck.Enabled = true;
volumeSilentCheck.Enabled = true;
importanceCheck.Enabled = true;
}
loading = false;
}
private void getCurrentSettings()
{
StringReader reader;
String line = null;
// Get current user
AdbCommand userCommand = Adb.FormAdbShellCommand(device, false, "pm", "list", "users");
String userResults = Adb.ExecuteAdbCommand(userCommand);
line = null;
reader = new StringReader(userResults);
do
{
line = reader.ReadLine();
if (line != null && line.Contains("} running"))
{
int index = line.IndexOf(':');
user = line.Substring(10, index - 10);
break;
}
}
while (line != null);
if (user != null)
{
// Get secure settings
AdbCommand secureCommand = Adb.FormAdbShellCommand(device, false, "settings", "--user", user, "list", "secure");
String secResults = Adb.ExecuteAdbCommand(secureCommand);
line = null;
reader = new StringReader(secResults);
do
{
line = reader.ReadLine();
if (line != null)
{
if (line.Contains("icon_blacklist"))
{
rotateCheck.Checked = !line.Contains("rotate");
headsetCheck.Checked = !line.Contains("headset");
managedCheck.Checked = !line.Contains("managed_profile");
castCheck.Checked = !line.Contains("cast");
hotspotCheck.Checked = !line.Contains("hotspot");
bluetoothCheck.Checked = !line.Contains("bluetooth");
zenCheck.Checked = !line.Contains("zen");
volumeCheck.Checked = !line.Contains("volume");
wifiCheck.Checked = !line.Contains("wifi");
ethernetCheck.Checked = !line.Contains("ethernet");
mobileCheck.Checked = !line.Contains("mobile");
airplaneCheck.Checked = !line.Contains("airplane");
if (line.Contains("battery"))
{
batteryCombo.SelectedIndex = 2;
}
else
{
batteryCombo.SelectedIndex = 1;
}
alarmCheck.Checked = !line.Contains("alarm_clock");
if (line.Contains(",clock") || line.Contains("clock,") || line.Contains(" clock"))
{
clockCombo.SelectedIndex = 2;
}
else
{
clockCombo.SelectedIndex = 1;
}
}
else if (line.Contains("clock_seconds"))
{
if (line.Contains("1"))
{
clockCombo.SelectedIndex = 0;
}
}
else if (line.Contains("sysui_show_full_zen"))
{
showZenCheck.Checked = line.Contains("1");
}
else if (line.Contains("sysui_volume_up_silent") || line.Contains("sysui_volume_down_silent"))
{
volumeSilentCheck.Checked = line.Contains("1");
}
else if (line.Contains("show_importance_slider"))
{
importanceCheck.Checked = line.Contains("1");
}
}
}
while (line != null);
// Get system settings
AdbCommand systemCommand = Adb.FormAdbShellCommand(device, false, "settings", "--user", user, "list", "system");
String sysResults = Adb.ExecuteAdbCommand(systemCommand);
line = null;
reader = new StringReader(sysResults);
do
{
line = reader.ReadLine();
if (line != null)
{
if (line.Contains("status_bar_show_battery_percent"))
{
if (line.Contains("1"))
{
batteryCombo.SelectedIndex = 0;
}
}
}
}
while (line != null);
}
else
{
MessageBox.Show("Unable to get the current logged in user.", "Unknown User", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
private void applyIconBlacklist()
{
if (user == null || loading)
{
return;
}
String value = "";
if (!rotateCheck.Checked)
{
value += "rotate,";
}
if (!headsetCheck.Checked)
{
value += "headset,";
}
if (!managedCheck.Checked)
{
value += "managed_profile,";
}
if (!castCheck.Checked)
{
value += "cast,";
}
if (!hotspotCheck.Checked)
{
value += "hotspot,";
}
if (!bluetoothCheck.Checked)
{
value += "bluetooth,";
}
if (!zenCheck.Checked)
{
value += "zen,";
}
if (!volumeCheck.Checked)
{
value += "volume,";
}
if (!wifiCheck.Checked)
{
value += "wifi,";
}
if (!ethernetCheck.Checked)
{
value += "ethernet,";
}
if (!mobileCheck.Checked)
{
value += "mobile,";
}
if (!airplaneCheck.Checked)
{
value += "airplane,";
}
if (batteryCombo.SelectedIndex == 2)
{
value += "battery,";
}
if (!alarmCheck.Checked)
{
value += "alarm_clock,";
}
if (clockCombo.SelectedIndex == 2)
{
value += "clock,";
}
AdbCommand command;
if (value.Length != 0)
{
value = value.Substring(0, value.Length - 1);
command = Adb.FormAdbShellCommand(device, false, "settings", "--user", user, "put", "secure", "icon_blacklist", value);
}
else
{
command = Adb.FormAdbShellCommand(device, false, "settings", "--user", user, "delete", "secure", "icon_blacklist");
}
Adb.ExecuteAdbCommand(command);
}
private void applyBatteryPercentage()
{
if (user == null || loading)
{
return;
}
AdbCommand command;
if (clockCombo.SelectedIndex == 0)
{
command = Adb.FormAdbShellCommand(device, false, "settings", "--user", user, "put", "system", "status_bar_show_battery_percent", "1");
}
else
{
command = Adb.FormAdbShellCommand(device, false, "settings", "--user", user, "delete", "system", "status_bar_show_battery_percent");
}
Adb.ExecuteAdbCommand(command);
}
private void applyClockSeconds()
{
if (user == null || loading)
{
return;
}
AdbCommand command;
if (clockCombo.SelectedIndex == 0)
{
command = Adb.FormAdbShellCommand(device, false, "settings", "--user", user, "put", "secure", "clock_seconds", "1");
}
else
{
command = Adb.FormAdbShellCommand(device, false, "settings", "--user", user, "delete", "secure", "clock_seconds");
}
Adb.ExecuteAdbCommand(command);
}
private void applyShowZen()
{
if (user == null || loading)
{
return;
}
AdbCommand command;
if (showZenCheck.Checked)
{
command = Adb.FormAdbShellCommand(device, false, "settings", "--user", user, "put", "secure", "sysui_show_full_zen", "1");
}
else
{
command = Adb.FormAdbShellCommand(device, false, "settings", "--user", user, "delete", "secure", "sysui_show_full_zen");
}
Adb.ExecuteAdbCommand(command);
}
private void applyVolumeShortcut()
{
if (user == null || loading)
{
return;
}
AdbCommand command1, command2;
if (showZenCheck.Checked)
{
command1 = Adb.FormAdbShellCommand(device, false, "settings", "--user", user, "put", "secure", "sysui_volume_down_silent", "1");
command2 = Adb.FormAdbShellCommand(device, false, "settings", "--user", user, "put", "secure", "sysui_volume_up_silent", "1");
}
else
{
command1 = Adb.FormAdbShellCommand(device, false, "settings", "--user", user, "delete", "secure", "sysui_volume_down_silent");
command2 = Adb.FormAdbShellCommand(device, false, "settings", "--user", user, "delete", "secure", "sysui_volume_up_silent");
}
Adb.ExecuteAdbCommand(command1);
Adb.ExecuteAdbCommand(command2);
}
private void applyImportance()
{
if (user == null || loading)
{
return;
}
AdbCommand command;
if (importanceCheck.Checked)
{
command = Adb.FormAdbShellCommand(device, false, "settings", "--user", user, "put", "secure", "show_importance_slider", "1");
}
else
{
command = Adb.FormAdbShellCommand(device, false, "settings", "--user", user, "delete", "secure", "show_importance_slider");
}
Adb.ExecuteAdbCommand(command);
}
}
}

File diff suppressed because it is too large Load Diff

@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace SystemUITuner
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Main());
}
}
}

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("System UI Tuner")]
[assembly: AssemblyDescription("Apply System UI Tuner settings on any Android device.")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Steven Mattera")]
[assembly: AssemblyProduct("System UI Tuner")]
[assembly: AssemblyCopyright("Copyright © Steven Mattera 2017")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("0a7136dd-798c-4e3f-b677-9ef658e68aeb")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

@ -0,0 +1,63 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 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.
// </auto-generated>
//------------------------------------------------------------------------------
namespace SystemUITuner.Properties {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// 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", "4.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() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[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("SystemUITuner.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}