Skip to content

Commit

Permalink
upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
hellzerg committed Aug 26, 2023
1 parent 1b589d3 commit 30785d9
Show file tree
Hide file tree
Showing 15 changed files with 1,690 additions and 1,587 deletions.
1 change: 1 addition & 0 deletions Optimizer/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,6 @@ internal static class Constants
internal static string UKRAINIAN = "українська";
internal static string JAPANESE = "日本語";
internal static string PERSIAN = "فارسی";
internal static string NEPALI = "नेपाली";
}
}
3 changes: 2 additions & 1 deletion Optimizer/Enums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ public enum LanguageCode
NL, // dutch
UA, // ukrainian
JA, // japanese
FA //farsi
FA, //farsi
NE //nepali
}

public enum KnownFolder
Expand Down
254 changes: 144 additions & 110 deletions Optimizer/Forms/FirstRunForm.Designer.cs

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions Optimizer/Forms/FirstRunForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -273,5 +273,17 @@ private void pictureBox18_Click(object sender, EventArgs e)
{
radioFarsi.PerformClick();
}

private void pictureBox19_Click(object sender, EventArgs e)
{
radioNepali.PerformClick();
}

private void radioNepali_CheckedChanged(object sender, EventArgs e)
{
Options.CurrentOptions.LanguageCode = LanguageCode.NE;
Options.SaveSettings();
Options.LoadTranslation();
}
}
}
357 changes: 179 additions & 178 deletions Optimizer/Forms/MainForm.Designer.cs

Large diffs are not rendered by default.

16 changes: 15 additions & 1 deletion Optimizer/Forms/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,6 @@ private void ToggleSwitch33_Click(object sender, EventArgs e)
public MainForm(SplashForm _splashForm, bool disableIndicium = false, bool disableHostsEditor = false, bool disableCommonApps = false, bool disableUWPApps = false, bool disableStartups = false, bool disableCleaner = false, bool disableIntegrator = false, bool disablePinger = false)
{
InitializeComponent();
WindowState = FormWindowState.Maximized;

CultureInfo.DefaultThreadCurrentCulture = new CultureInfo("en-US");
CultureInfo.DefaultThreadCurrentUICulture = new CultureInfo("en-US");
Expand Down Expand Up @@ -1064,6 +1063,8 @@ public MainForm(SplashForm _splashForm, bool disableIndicium = false, bool disab
//InitNetworkMonitoring();
LoadTranslation();
EnableToggleEvents();

WindowState = FormWindowState.Maximized;
}

private void LoadAvailableFonts()
Expand Down Expand Up @@ -1274,6 +1275,10 @@ private void LoadTranslation()
{
boxLang.Text = Constants.PERSIAN;
}
if (Options.CurrentOptions.LanguageCode == LanguageCode.NE)
{
boxLang.Text = Constants.NEPALI;
}
}

private void GetHardwareSpecs()
Expand Down Expand Up @@ -2304,6 +2309,10 @@ private void LoadWindowsXIToggleStates()
private void Main_Load(object sender, EventArgs e)
{
FixTabHeaderWidth();
if (Options.CurrentOptions.AutoStart && Options.CurrentOptions.EnableTray)
{
this.Hide();
}
}

private void GetDesktopItems()
Expand Down Expand Up @@ -4418,6 +4427,11 @@ private void boxLang_SelectedIndexChanged(object sender, EventArgs e)
picFlag.Image = Properties.Resources.iran;
Options.CurrentOptions.LanguageCode = LanguageCode.FA;
}
else if (boxLang.Text == Constants.NEPALI)
{
picFlag.Image = Properties.Resources.nepal;
Options.CurrentOptions.LanguageCode = LanguageCode.NE;
}

Options.SaveSettings();
Options.LoadTranslation();
Expand Down
2 changes: 1 addition & 1 deletion Optimizer/Forms/MainForm.resx
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,7 @@ any application only by typing your desired keyword.</value>
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAC0
GgAAAk1TRnQBSQFMAgEBCQEAAfABDgHwAQ4BIAEAASABAAT/ASEBAAj/AUIBTQE2BwABNgMAASgDAAGA
GgAAAk1TRnQBSQFMAgEBCQEAAfgBDgH4AQ4BIAEAASABAAT/ASEBAAj/AUIBTQE2BwABNgMAASgDAAGA
AwABYAMAAQEBAAEgBgABwP8A/wD/AP8A/wD/AP8A/wAeAANHAYB0//8AiQADRwGAdP//AIkAAyoBQANH
AYADRwGAA0cBgANHAYADRwGAA0cBgANHAYADRwGAA0cBgANHAYADRwGAA0cBgANHAYADRwGAA0cBgANH
AYADRwGAA0cBgANHAYADRwGAA0cBgANHAYADRwGAA0cBgANHAYADRwGAA0cBgANHAYADRwGA/wD/AP8A
Expand Down
2 changes: 2 additions & 0 deletions Optimizer/Optimizer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,7 @@
<None Include="Resources\Scripts\EnableTelemetryTasks.bat" />
<None Include="Resources\Scripts\EnableXboxTasks.bat" />
<None Include="Resources\i18n\EL.json" />
<None Include="Resources\i18n\NE.json" />
<None Include="Resources\i18n\ES.json" />
<None Include="Resources\i18n\FR.json" />
<None Include="Resources\Scripts\GPEditEnablerInHome.bat" />
Expand Down Expand Up @@ -377,6 +378,7 @@
</COMReference>
</ItemGroup>
<ItemGroup>
<None Include="Resources\Flags\nepal.png" />
<None Include="Resources\Flags\iran.png" />
<None Include="Resources\Flags\japan.png" />
<None Include="Resources\Flags\ukraine.png" />
Expand Down
1 change: 1 addition & 0 deletions Optimizer/Options.cs
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,7 @@ internal static void LoadTranslation()
if (CurrentOptions.LanguageCode == LanguageCode.UA) TranslationList = JObject.Parse(Properties.Resources.UA);
if (CurrentOptions.LanguageCode == LanguageCode.JA) TranslationList = JObject.Parse(Properties.Resources.JA);
if (CurrentOptions.LanguageCode == LanguageCode.FA) TranslationList = JObject.Parse(Properties.Resources.FA);
if (CurrentOptions.LanguageCode == LanguageCode.NE) TranslationList = JObject.Parse(Properties.Resources.NE);
}
catch (Exception ex)
{
Expand Down
8 changes: 3 additions & 5 deletions Optimizer/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,10 @@ static class Program
{
/* VERSION PROPERTIES */
/* DO NOT LEAVE THEM EMPTY */

internal readonly static float Major = 15;
internal readonly static float Minor = 7;

internal readonly static bool EXPERIMENTAL_BUILD = false;
internal static bool SILENT_MODE = false;
internal static int DPI_PREFERENCE;
/* END OF VERSION PROPERTIES */

internal static string GetCurrentVersionTostring()
{
Expand All @@ -30,7 +27,8 @@ internal static float GetCurrentVersion()
return float.Parse(GetCurrentVersionTostring());
}

/* END OF VERSION PROPERTIES */
internal static bool SILENT_MODE = false;
internal static int DPI_PREFERENCE;

// Enables the corresponding Windows tab for Windows Server machines
internal static bool UNSAFE_MODE = false;
Expand Down
Loading

0 comments on commit 30785d9

Please sign in to comment.