From 0a99506270d6e5da5a73f68d28aff0aef5d64b60 Mon Sep 17 00:00:00 2001 From: iAmAsval Date: Fri, 7 Aug 2020 12:17:22 +0200 Subject: [PATCH] added check for updates + checking when closing --- FModel/FModel.csproj | 2 +- FModel/MainWindow.xaml | 6 +++++ FModel/MainWindow.xaml.cs | 6 ++++- .../PakReader/Parsers/Objects/EPakVersion.cs | 1 + FModel/Properties/Resources.Designer.cs | 27 +++++++------------ FModel/Properties/Resources.ar.resx | 6 ----- FModel/Properties/Resources.de-DE.resx | 6 ----- FModel/Properties/Resources.es.resx | 6 ----- FModel/Properties/Resources.fr-FR.resx | 9 +++---- FModel/Properties/Resources.it-IT.resx | 6 ----- FModel/Properties/Resources.ja-JP.resx | 6 ----- FModel/Properties/Resources.resx | 9 +++---- FModel/Properties/Resources.ru-RU.resx | 6 ----- FModel/Properties/Resources.zh-CN.resx | 8 +----- FModel/Utils/Paks.cs | 2 +- 15 files changed, 30 insertions(+), 76 deletions(-) diff --git a/FModel/FModel.csproj b/FModel/FModel.csproj index cfc6322e..f2f0483b 100644 --- a/FModel/FModel.csproj +++ b/FModel/FModel.csproj @@ -1,4 +1,4 @@ - + WinExe diff --git a/FModel/MainWindow.xaml b/FModel/MainWindow.xaml index 0b5f7e10..c91d3aab 100644 --- a/FModel/MainWindow.xaml +++ b/FModel/MainWindow.xaml @@ -179,11 +179,17 @@ + + + + + + diff --git a/FModel/MainWindow.xaml.cs b/FModel/MainWindow.xaml.cs index 6a38ab04..405e2a4d 100644 --- a/FModel/MainWindow.xaml.cs +++ b/FModel/MainWindow.xaml.cs @@ -47,6 +47,7 @@ namespace FModel private async void OnClosing(object sender, CancelEventArgs e) { + Updater.CheckForUpdate(); Globals.gNotifier.Dispose(); Tasks.TokenSource?.Dispose(); DiscordIntegration.Dispose(); @@ -68,7 +69,6 @@ namespace FModel FModel_MI_Assets_GoTo.ItemsSource = MenuItems.customGoTos; FModel_AssetsPathTree.ItemsSource = SortedTreeviewVm.gameFilesPath.ChildrensView; - Updater.CheckForUpdate(); DebugHelper.WriteUserSettings(); Folders.CheckWatermarks(); @@ -266,6 +266,10 @@ namespace FModel } else { FWindows.GetOpenedWindow(Properties.Resources.AboutF).Focus(); } } + private void FModel_MI_Help_Updates_Click(object sender, RoutedEventArgs e) + { + Updater.CheckForUpdate(); + } #endregion #region TREEVIEW diff --git a/FModel/PakReader/Parsers/Objects/EPakVersion.cs b/FModel/PakReader/Parsers/Objects/EPakVersion.cs index 4dd339de..90fced84 100644 --- a/FModel/PakReader/Parsers/Objects/EPakVersion.cs +++ b/FModel/PakReader/Parsers/Objects/EPakVersion.cs @@ -14,6 +14,7 @@ namespace PakReader.Parsers.Objects FNAME_BASED_COMPRESSION_METHOD = 8, // UE4.22+ - use string instead of enum for compression method FROZEN_INDEX = 9, PATH_HASH_INDEX = 10, + FNV64BUGFIX = 11, LAST, diff --git a/FModel/Properties/Resources.Designer.cs b/FModel/Properties/Resources.Designer.cs index 70fe094b..142a975d 100644 --- a/FModel/Properties/Resources.Designer.cs +++ b/FModel/Properties/Resources.Designer.cs @@ -462,6 +462,15 @@ namespace FModel.Properties { } } + /// + /// Recherche une chaîne localisée semblable à Check For Updates. + /// + public static string CheckForUpdates { + get { + return ResourceManager.GetString("CheckForUpdates", resourceCulture); + } + } + /// /// Recherche une chaîne localisée semblable à Chinese (Simplified). /// @@ -1834,15 +1843,6 @@ namespace FModel.Properties { } } - /// - /// Recherche une chaîne localisée semblable à Open. - /// - public static string Open { - get { - return ResourceManager.GetString("Open", resourceCulture); - } - } - /// /// Recherche une chaîne localisée semblable à Open Image. /// @@ -2662,15 +2662,6 @@ namespace FModel.Properties { } } - /// - /// Recherche une chaîne localisée semblable à Use FModel in English. - /// - public static string UseFEnglish { - get { - return ResourceManager.GetString("UseFEnglish", resourceCulture); - } - } - /// /// Recherche une chaîne localisée semblable à Use game colors. /// diff --git a/FModel/Properties/Resources.ar.resx b/FModel/Properties/Resources.ar.resx index a963c1c8..11186ae6 100644 --- a/FModel/Properties/Resources.ar.resx +++ b/FModel/Properties/Resources.ar.resx @@ -541,9 +541,6 @@ It's now the most used free software to leak on Fortnite. التعتيم - - افتح - افتح الصورة @@ -769,9 +766,6 @@ It's now the most used free software to leak on Fortnite. انسخ الصورة - - استخدم Fmodel باللغة الإنجليزية - أي خلفية diff --git a/FModel/Properties/Resources.de-DE.resx b/FModel/Properties/Resources.de-DE.resx index 37844e0e..cb84b986 100644 --- a/FModel/Properties/Resources.de-DE.resx +++ b/FModel/Properties/Resources.de-DE.resx @@ -505,9 +505,6 @@ Jetzt ist es die am häufigsten genutzte freie Software um mit Fortnite zu leake Deckkraft - - Öffnen - Bild öffnen @@ -806,9 +803,6 @@ Jetzt ist es die am häufigsten genutzte freie Software um mit Fortnite zu leake Bild kopieren - - FModel in Englisch benutzen - Kein Hintergrund diff --git a/FModel/Properties/Resources.es.resx b/FModel/Properties/Resources.es.resx index 930df384..cf5de831 100644 --- a/FModel/Properties/Resources.es.resx +++ b/FModel/Properties/Resources.es.resx @@ -688,9 +688,6 @@ Ahora es el software gratuito más utilizado para filtrar en Fortnite. Opacidad - - Abrir - Abrir imagen @@ -1022,9 +1019,6 @@ Ahora es el software gratuito más utilizado para filtrar en Fortnite. Actualmente no hay imagen para copiar - - Usar FModel en Inglés - Sin fondo diff --git a/FModel/Properties/Resources.fr-FR.resx b/FModel/Properties/Resources.fr-FR.resx index d3731cbf..1d44991a 100644 --- a/FModel/Properties/Resources.fr-FR.resx +++ b/FModel/Properties/Resources.fr-FR.resx @@ -564,9 +564,6 @@ C'est maintenant le logiciel gratuit le plus utilisé pour leak sur Fortnite. Opacité - - Ouvrir - Ouvrir l'Image @@ -813,9 +810,6 @@ C'est maintenant le logiciel gratuit le plus utilisé pour leak sur Fortnite. Il n'y a actuellement aucune image à copier - - Utiliser FModel en Anglais - Pas de fond @@ -828,4 +822,7 @@ C'est maintenant le logiciel gratuit le plus utilisé pour leak sur Fortnite. Un fichier .PAK chiffré a été trouvé. Afin de le déchiffrer, veuillez spécifier une clé de chiffrement AES fonctionnelle + + Vérifier les Mises à Jour + \ No newline at end of file diff --git a/FModel/Properties/Resources.it-IT.resx b/FModel/Properties/Resources.it-IT.resx index 7740220a..6d49150d 100644 --- a/FModel/Properties/Resources.it-IT.resx +++ b/FModel/Properties/Resources.it-IT.resx @@ -538,9 +538,6 @@ Col tempo sono state aggiunte nuove funzioni e molti altri utenti hanno comincia Opacità - - Apri - Apri Immagine @@ -769,9 +766,6 @@ Col tempo sono state aggiunte nuove funzioni e molti altri utenti hanno comincia Copia Immagine - - Usa FModel in inglese - Al momento non ci sono immagini da copiare diff --git a/FModel/Properties/Resources.ja-JP.resx b/FModel/Properties/Resources.ja-JP.resx index 78532b19..ff998907 100644 --- a/FModel/Properties/Resources.ja-JP.resx +++ b/FModel/Properties/Resources.ja-JP.resx @@ -739,9 +739,6 @@ 名前 - - 開く - ヘルプ @@ -772,9 +769,6 @@ 現在、コピーする画像はありません - - FModelを英語で使用する - Discord RPCを使用する diff --git a/FModel/Properties/Resources.resx b/FModel/Properties/Resources.resx index 8cc9b8cc..3835957c 100644 --- a/FModel/Properties/Resources.resx +++ b/FModel/Properties/Resources.resx @@ -703,9 +703,6 @@ It's now the most used free software to leak on Fortnite. Opacity - - Open - Open Image @@ -1048,9 +1045,6 @@ It's now the most used free software to leak on Fortnite. There is currently no image to copy - - Use FModel in English - No Background @@ -1081,4 +1075,7 @@ It's now the most used free software to leak on Fortnite. An encrypted .PAK file has been found. In order to decrypt it, please specify a working AES encryption key + + Check For Updates + \ No newline at end of file diff --git a/FModel/Properties/Resources.ru-RU.resx b/FModel/Properties/Resources.ru-RU.resx index a5464a0a..0cb41cb8 100644 --- a/FModel/Properties/Resources.ru-RU.resx +++ b/FModel/Properties/Resources.ru-RU.resx @@ -438,9 +438,6 @@ Прозрачность - - Открыть - Открыть изображение @@ -744,9 +741,6 @@ Скопировать изображение - - Использовать FModel на Английском - Путь файлу без расширения diff --git a/FModel/Properties/Resources.zh-CN.resx b/FModel/Properties/Resources.zh-CN.resx index 194d995e..1022aeb5 100644 --- a/FModel/Properties/Resources.zh-CN.resx +++ b/FModel/Properties/Resources.zh-CN.resx @@ -550,9 +550,6 @@ 不透明度 - - 开放 - 开启图片 @@ -742,9 +739,6 @@ 使用Discord RPC - - 英文使用FModel - 使用游戏颜色 @@ -790,4 +784,4 @@ 找到一个加密的.PAK文件。要解密文件,请设置正确的AES加密密钥。 - + \ No newline at end of file diff --git a/FModel/Utils/Paks.cs b/FModel/Utils/Paks.cs index 62123944..aa5d1344 100644 --- a/FModel/Utils/Paks.cs +++ b/FModel/Utils/Paks.cs @@ -90,7 +90,7 @@ namespace FModel.Utils { DebugHelper.WriteLine("{0} {1} {2}", "[FModel]", "[RiotClientInstalls.json]", installs); InstallsJson installsJson = JsonConvert.DeserializeObject(File.ReadAllText(installs)); - if (installsJson?.AssociatedClient.Count > 0) + if (installsJson != null && installsJson.AssociatedClient.Count > 0) { foreach (var KvP in installsJson.AssociatedClient) if (KvP.Key.Contains("VALORANT/live/"))