Skip to content

Commit

Permalink
restructure
Browse files Browse the repository at this point in the history
  • Loading branch information
project-sbc committed Jul 20, 2022
1 parent cb44848 commit f2e35ad
Show file tree
Hide file tree
Showing 11 changed files with 444 additions and 951 deletions.
40 changes: 8 additions & 32 deletions PowerControlPanel/Classes/RoutineUpdate/RoutineUpdate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace Power_Control_Panel.PowerControlPanel.Classes.RoutineUpdate
public class RoutineUpdate
{
private Thread routineThread;

private int counter = 0;


Expand All @@ -25,43 +25,19 @@ private void handleRoutineChecks()
while (GlobalVariables.useRoutineThread)
{







Classes.TaskScheduler.TaskScheduler.runTask(() => GlobalVariables.tdp.readTDP());
Task.Delay(8000);
CallTDPEvent();

ChangeBrightness.WindowsSettingsBrightnessController.getBrightness();
ChangeVolume.AudioManager.GetMasterVolume();
if (counter > 10) { Classes.TaskScheduler.TaskScheduler.runTask(() => GlobalVariables.tdp.readTDP()); counter = -1; }

Thread.Sleep(1000);

counter ++;
}

}



public void CallBrightnessEvent()
{
updatedBrightness?.Invoke(typeof(RoutineUpdate), EventArgs.Empty);
}
public event EventHandler updatedBrightness;

public void CallVolumeEvent()
{
updatedVolume?.Invoke(typeof(RoutineUpdate), EventArgs.Empty);
}
public event EventHandler updatedVolume;

public void CallTDPEvent()
{
updatedTDP?.Invoke(typeof(RoutineUpdate), EventArgs.Empty);
}
public event EventHandler updatedTDP;




public void startThread()
{
routineThread = new Thread(handleRoutineChecks);
Expand Down
69 changes: 0 additions & 69 deletions PowerControlPanel/PageComponents/HomeCPU.xaml

This file was deleted.

81 changes: 0 additions & 81 deletions PowerControlPanel/PageComponents/HomeCPU.xaml.cs

This file was deleted.

76 changes: 0 additions & 76 deletions PowerControlPanel/PageComponents/HomePowerBalance.xaml

This file was deleted.

Loading

0 comments on commit f2e35ad

Please sign in to comment.