Skip to content

Commit

Permalink
code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Valkirie committed Aug 4, 2022
1 parent f477bea commit 9a8cc1d
Show file tree
Hide file tree
Showing 10 changed files with 9 additions and 28 deletions.
2 changes: 1 addition & 1 deletion ControllerCommon/Managers/ServiceManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ public async Task StartServiceAsync()
try
{
controller.Refresh();
switch(controller.Status)
switch (controller.Status)
{
case System.ServiceProcess.ServiceControllerStatus.Running:
case System.ServiceProcess.ServiceControllerStatus.StartPending:
Expand Down
1 change: 0 additions & 1 deletion ControllerCommon/Processor/Intel/KX.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using System;
using System.Diagnostics;
using System.IO;
using System.Text;

namespace ControllerCommon.Processor.Intel
{
Expand Down
2 changes: 1 addition & 1 deletion ControllerCommon/Utils/CommonUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public static string Between(string STR, string FirstString, string LastString =
string FinalString;
int Pos1 = STR.IndexOf(FirstString) + FirstString.Length;
int Pos2 = STR.Length;

if (LastString != null)
Pos2 = STR.IndexOf(LastString, Pos1);

Expand Down
2 changes: 1 addition & 1 deletion ControllerCommon/Utils/InputUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public enum Input
AutoRollYawSwap = 2,
JoystickSteering = 3,
}

public enum UMC_Motion_Default
{
Off = 0,
Expand Down
7 changes: 1 addition & 6 deletions HandheldCompanion/Extensions/SliderTools.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;

Expand Down
6 changes: 3 additions & 3 deletions HandheldCompanion/Views/Pages/ProfilesPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ private void b_ApplyProfile_Click(object sender, RoutedEventArgs e)
currentProfile.TDP_value[1] = (int)TDPBoostSlider.Value;

currentProfile.umc_trigger = 0;

foreach (GamepadButtonFlagsExt button in (GamepadButtonFlagsExt[])Enum.GetValues(typeof(GamepadButtonFlagsExt)))
if ((bool)activators[button].IsChecked)
currentProfile.umc_trigger |= button;
Expand Down Expand Up @@ -558,13 +558,13 @@ private void cB_Input_SelectionChanged(object sender, SelectionChangedEventArgs

Text_InputHint.Text = Profile.InputDescription[input];
}

private void cB_UMC_MotionDefaultOffOn_SelectionChanged(object sender, RoutedEventArgs e)
{
if (cB_Input.SelectedIndex == -1)
return;
}

private void TDPSustainedSlider_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
{
// do something
Expand Down
12 changes: 0 additions & 12 deletions HandheldCompanion/Views/QuickPages/QuickSuspenderPage.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,18 +1,6 @@
using HandheldCompanion.Managers;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace HandheldCompanion.Views.QuickPages
{
Expand Down
2 changes: 1 addition & 1 deletion HandheldCompanion/Views/Windows/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ public MainWindow(StartupEventArgs arguments)
// handle settingsPage events
settingsPage.SettingValueChanged += (name, value) =>
{
switch(name)
switch (name)
{
case "toast_notification":
toastManager.Enabled = (bool)value;
Expand Down
1 change: 0 additions & 1 deletion HandheldCompanion/Views/Windows/QuickTools.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using HandheldCompanion.Extensions;
using HandheldCompanion.Views.QuickPages;
using ModernWpf.Controls;
using ModernWpf.Controls.Primitives;
using System;
using System.Collections.Generic;
using System.Linq;
Expand Down
2 changes: 1 addition & 1 deletion HandheldCompanion/models/ModelMachenikeHG510.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public ModelMachenikeHG510() : base("MachenikeHG510")
model3DGroup.Children.Add(FN);
model3DGroup.Children.Add(Turbo);
model3DGroup.Children.Add(Home);
model3DGroup.Children.Add(Machenike);
model3DGroup.Children.Add(Machenike);
model3DGroup.Children.Add(JoystickBaseRingLeft);
model3DGroup.Children.Add(JoystickBaseRingRight);
model3DGroup.Children.Add(LED1);
Expand Down

0 comments on commit 9a8cc1d

Please sign in to comment.