Skip to content

Commit

Permalink
Merge pull request #3 from Zalexanninev15/dev
Browse files Browse the repository at this point in the history
New test versions!
  • Loading branch information
Zalexanninev15 authored May 14, 2021
2 parents 445e19f + 5a7d05b commit 94ccf27
Show file tree
Hide file tree
Showing 24 changed files with 650 additions and 568 deletions.
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,16 @@ sources/packages/DarkUI.2.0.2/.signature.p7s
sources/packages/DarkUI.2.0.2/DarkUI.2.0.2.nupkg
sources/packages/DarkUI.2.0.2/icon-64.png
sources/packages/DarkUI.2.0.2/lib/DarkUI.dll
*.exe
*.cache
sources/GUI/obj/Release/JetpackDowngraderGUI.MainForm.resources
sources/GUI/obj/Release/GUI.csproj.FileListAbsolute.txt
*.dll
sources/GUI/obj/Release/.NETFramework,Version=v4.8.AssemblyAttributes.cs
sources/GUI/bin/Release/gui.exe.config
sources/GUI/obj/Release/GUI.csproj.CopyComplete
sources/GUI/obj/Release/JetpackDowngraderGUI.Properties.Resources.resources
sources/Downgrader/obj/Release/JetpackDowngrader.Properties.Resources.resources
sources/Downgrader/obj/Release/Jetpack Downgrader.csproj.FileListAbsolute.txt
sources/Downgrader/obj/Release/.NETFramework,Version=v4.8.AssemblyAttributes.cs
sources/Downgrader/bin/Release/jpd.exe.config
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Jetpack Downgrader | [Latest release](https://github.com/Zalexanninev15/Jetpack-Downgrader/releases/latest) | [Topic](https://gtaforums.com/topic/969056-jetpack-downgrader)

![alt](https://github.com/Zalexanninev15/Jetpack-Downgrader/raw/main/logo.png)
![alt](https://github.com/Zalexanninev15/Jetpack-Downgrader/raw/dev/data/logo.png)

[![](https://img.shields.io/badge/OS-Windows-informational?logo=windows)](https://github.com/Zalexanninev15/Jetpack-Downgrader)
[![](https://img.shields.io/github/v/release/Zalexanninev15/Jetpack-Downgrader)](https://github.com/Zalexanninev15/Jetpack-Downgrader/releases/latest)
Expand All @@ -9,8 +9,12 @@

## Description

App for downgrading the game Grand Theft Auto: San Andreas to version 1.0.
Is required .NET Framework 4.8 and Windows 7/8/8.1/10
App for downgrading the game Grand Theft Auto: San Andreas to version 1.0

## System requirements

* **OS:** Windows 7/8/8.1/10
* **Additional:** .NET Framework 4.8

## Authors

Expand Down
11 changes: 10 additions & 1 deletion languages/EN.txt → data/Languages/EN.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
[Interface]
PathLabel=Path to the game folder:
AppSettings=App Settings
Tab1=Downgrader Settings
Tab2=Modifications
Downgrade=Downgrade
Play=Play && Test
Stage=Select the desired stage
[CheckBox]
Backup=Backup original files before downgrade
Shortcut=Make shortcut on Desktop
Expand All @@ -14,10 +18,15 @@ InstallDirectX=Install DirectX
[Title]
Info=Information
Error=Error
Warning=Warning
FolderSelectDialog=Select the game folder
[InfoMsg]
Succes=Downgrade completed!
Version=Version
Author=Created by
[ErrorMsg]
ReadINI=Error reading settings from the jpd.ini file!
WriteINI=Error writing settings to the jpd.ini file!
[WarningMsg]
PathNotFound=Path to the game is not valid!
BrowserNotFound=Browser to open the link was not found!
File renamed without changes.
File renamed without changes
14 changes: 4 additions & 10 deletions sources/Downgrader/Classes/ProgressBar.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,7 @@ private void TimerHandler(object state)
if (disposed) return;
int progressBlockCount = (int)(currentProgress * blockCount);
int percent = (int)(currentProgress * 100);
string text = string.Format(work + ": [{0}{1}] {2,3}% {3}",
new string('#', progressBlockCount), new string('-', blockCount - progressBlockCount),
percent,
animation[animationIndex++ % animation.Length]);
string text = string.Format(work + ": [{0}{1}] {2,3}% {3}", new string('#', progressBlockCount), new string('-', blockCount - progressBlockCount), percent, animation[animationIndex++ % animation.Length]);
UpdateText(text);
ResetTimer();
}
Expand All @@ -40,8 +37,7 @@ private void UpdateText(string text)
{
int commonPrefixLength = 0;
int commonLength = Math.Min(currentText.Length, text.Length);
while (commonPrefixLength < commonLength && text[commonPrefixLength] == currentText[commonPrefixLength])
commonPrefixLength++;
while (commonPrefixLength < commonLength && text[commonPrefixLength] == currentText[commonPrefixLength]) { commonPrefixLength++; }
StringBuilder outputBuilder = new StringBuilder();
outputBuilder.Append('\b', currentText.Length - commonPrefixLength);
outputBuilder.Append(text.Substring(commonPrefixLength));
Expand All @@ -51,13 +47,11 @@ private void UpdateText(string text)
outputBuilder.Append(' ', overlapCount);
outputBuilder.Append('\b', overlapCount);
}
Console.ForegroundColor = ConsoleColor.Blue;
Console.Write(outputBuilder);
currentText = text;
}
private void ResetTimer()
{
timer.Change(animationInterval, TimeSpan.FromMilliseconds(-1));
}
private void ResetTimer() { timer.Change(animationInterval, TimeSpan.FromMilliseconds(-1)); }
public void Dispose()
{
lock (timer)
Expand Down
12 changes: 12 additions & 0 deletions sources/Downgrader/Jetpack Downgrader.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,16 @@
<Compile Include="Program.cs" />
<Compile Include="Classes\ProgressBar.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="app.manifest" />
<None Include="Resources\jpd.ini" />
</ItemGroup>
<ItemGroup>
<Content Include="app.ico" />
Expand All @@ -77,5 +83,11 @@
<EmbedInteropTypes>True</EmbedInteropTypes>
</COMReference>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
Loading

0 comments on commit 94ccf27

Please sign in to comment.