Skip to content
This repository was archived by the owner on Jul 21, 2022. It is now read-only.

Commit 09e8b44

Browse files
committed
cleanup
1 parent d94f0fb commit 09e8b44

File tree

9 files changed

+20
-10
lines changed

9 files changed

+20
-10
lines changed

Tools Injector Mod Menu/Form/FrmButton.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,10 @@ private void comboType_SelectedIndexChanged(object sender, EventArgs e)
9595
{
9696
switch (comboType.SelectedIndex)
9797
{
98-
case (int) Enums.Type.Bool:
98+
case (int)Enums.Type.Bool:
9999
txtValue.Hint = "true";
100100
break;
101+
101102
case (int)Enums.Type.Int:
102103
case (int)Enums.Type.Long:
103104
case (int)Enums.Type.Float:

Tools Injector Mod Menu/Form/FrmFunction.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ private void AddListValues()
4646
{
4747
chkField.Checked = hookInfo.Field;
4848
txtOffset.Text = hookInfo.Offset;
49-
comboType.SelectedIndex = (int) hookInfo.Type;
49+
comboType.SelectedIndex = (int)hookInfo.Type;
5050
}
5151
}
5252

@@ -94,16 +94,18 @@ private void btnSave_Click(object sender, EventArgs e)
9494
MyMessage.MsgShowError("Error" + exception.Message);
9595
}
9696
}
97-
private HookInfo HookValue()
97+
98+
private HookInfo HookValue()
9899
{
99100
return new HookInfo
100101
{
101102
Field = chkField.Checked,
102-
Type = (Enums.Type) comboType.SelectedIndex,
103+
Type = (Enums.Type)comboType.SelectedIndex,
103104
Offset = txtOffset.Text,
104105
Method = null
105106
};
106107
}
108+
107109
private void btnClose_Click(object sender, EventArgs e)
108110
{
109111
if (!MyMessage.MsgOkCancel("Do you want to close?\n\n" +

Tools Injector Mod Menu/Form/FrmMain.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1463,11 +1463,11 @@ private static string NewFeatures()
14631463
private string HackThread()
14641464
{
14651465
var result = "";
1466-
var abiType = comboType.SelectedIndex == (int) Enums.TypeAbi.Arm64 ? "A64HookFunction" : "MSHookFunction";
1466+
var abiType = comboType.SelectedIndex == (int)Enums.TypeAbi.Arm64 ? "A64HookFunction" : "MSHookFunction";
14671467
foreach (var list in OffsetPatch.FunctionList)
14681468
{
14691469
var cheatName = list.CheatName.RemoveSuperSpecialCharacters().ReplaceNumCharacters();
1470-
1470+
14711471
switch (list.FunctionType)
14721472
{
14731473
case Enums.FunctionType.Toggle:

Tools Injector Mod Menu/Form/FrmSeekBar.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ namespace Tools_Injector_Mod_Menu
77
public partial class FrmSeekBar : Form
88
{
99
private readonly int _index;
10+
1011
public FrmSeekBar(int index = 0)
1112
{
1213
InitializeComponent();

Tools Injector Mod Menu/Form/FrmToggleHook.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ private void FrmToggleHook_Load(object sender, EventArgs e)
2020
catch
2121
{
2222
}
23-
2423
}
2524

2625
private void btnSave_Click(object sender, EventArgs e)

Tools Injector Mod Menu/Patch Manager/Enums.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ public enum Type
1919
Double,
2020
Empty
2121
}
22+
2223
public enum FunctionType
2324
{
2425
Toggle, //Patch

Tools Injector Mod Menu/Utility/AppSettings.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ public class MySettings : AppSettings<MySettings>
2626

2727
public string txtService = @"<service android:enabled=""true"" android:exported=""false"" android:name=""com.tfive.modmenu.FloatingModMenuService"" android:stopWithTask=""true""/>";
2828
public string txtOnCreate = "invoke-static {p0}, Lcom/tfive/MainActivity;->Start(Landroid/content/Context;)V";
29+
2930
public string txtActionMain = @"<activity android:configChanges=""keyboardHidden|orientation|screenSize"" android:name=""com.tfivel.MainActivity"">
3031
<intent-filter>
3132
<action android:name=""android.intent.action.MAIN""/>
@@ -34,6 +35,7 @@ public class MySettings : AppSettings<MySettings>
3435
</activity>
3536
";
3637
}
38+
3739
public class AppSettings<T> where T : new()
3840
{
3941
private const string DefaultFilename = "settings.json";
@@ -56,4 +58,4 @@ public static T Load(string fileName = DefaultFilename)
5658
return t;
5759
}
5860
}
59-
}
61+
}

Tools Injector Mod Menu/Utility/Utility.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ public static bool IsPathSpecialChar(this string input)
202202
const string specialChar = @"|!#$%&/()=?»«@£§€{};'<>_, ";
203203
return specialChar.Any(input.Contains);
204204
}
205+
205206
public static string RemoveSpecialCharacters(this string str)
206207
{
207208
var sb = new StringBuilder();
@@ -211,6 +212,7 @@ public static string RemoveSpecialCharacters(this string str)
211212
}
212213
return sb.ToString();
213214
}
215+
214216
public static string RemoveMiniSpecialCharacters(this string str)
215217
{
216218
var sb = new StringBuilder();
@@ -220,6 +222,7 @@ public static string RemoveMiniSpecialCharacters(this string str)
220222
}
221223
return sb.ToString();
222224
}
225+
223226
public static string RemoveSuperSpecialCharacters(this string str)
224227
{
225228
var sb = new StringBuilder();
@@ -234,8 +237,9 @@ public static string ReplaceNumCharacters(this string str)
234237
{
235238
return str.Replace("0", "Zero").Replace("1", "One").Replace("2", "Two").Replace("3", "Three")
236239
.Replace("4", "Four").Replace("5", "Five").Replace("6", "Six").Replace("7", "Seven")
237-
.Replace("8", "Eight").Replace("9", "Nine").Replace("-","Dash").Replace(".","Dot").Replace(",","Comma");
240+
.Replace("8", "Eight").Replace("9", "Nine").Replace("-", "Dash").Replace(".", "Dot").Replace(",", "Comma");
238241
}
242+
239243
#endregion Old
240244
}
241245
}

Tools Injector Mod Menu/Utility/Values.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ public static class Values
88
public static string Category, SeekBar, Offset;
99
public static bool Field;
1010
public static Enums.Type Type = Enums.Type.Empty;
11-
public static List<(string,string)> Method;
11+
public static List<(string, string)> Method;
1212
}
1313
}

0 commit comments

Comments
 (0)