From c0514a6665aba5a18d1f10bbc0e530e4fca5a813 Mon Sep 17 00:00:00 2001 From: Nemesh Date: Fri, 22 Apr 2022 14:20:17 +0300 Subject: [PATCH] autoupdate, even more languages, old files cleaning, fixed minor bugs This is probably last commit before release, as there are only minor things to be done --- .gitignore | 2 +- FloatTool/App.xaml | 22 ++++- FloatTool/App.xaml.cs | 19 +++- FloatTool/Common/Logger.cs | 2 +- FloatTool/Common/Settings.cs | 43 ++++++-- FloatTool/Common/Utils.cs | 35 ++++++- FloatTool/FloatTool.csproj | 4 + FloatTool/FloatTool.csproj.user | 6 ++ FloatTool/Languages/Lang.cs.xaml | 84 ++++++++++++++++ FloatTool/Languages/Lang.da.xaml | 84 ++++++++++++++++ FloatTool/Languages/Lang.de.xaml | 84 ++++++++++++++++ FloatTool/Languages/Lang.es.xaml | 84 ++++++++++++++++ FloatTool/Languages/Lang.fi.xaml | 84 ++++++++++++++++ FloatTool/Languages/Lang.fr.xaml | 24 +++-- FloatTool/Languages/Lang.ga.xaml | 84 ++++++++++++++++ FloatTool/Languages/Lang.he.xaml | 84 ++++++++++++++++ FloatTool/Languages/Lang.hr.xaml | 84 ++++++++++++++++ FloatTool/Languages/Lang.it.xaml | 84 ++++++++++++++++ FloatTool/Languages/Lang.ja.xaml | 6 +- FloatTool/Languages/Lang.ka.xaml | 84 ++++++++++++++++ FloatTool/Languages/Lang.lt.xaml | 84 ++++++++++++++++ FloatTool/Languages/Lang.lv.xaml | 84 ++++++++++++++++ FloatTool/Languages/Lang.pl.xaml | 49 ++++----- FloatTool/Languages/Lang.pt.xaml | 84 ++++++++++++++++ FloatTool/Languages/Lang.ru.xaml | 9 +- FloatTool/Languages/Lang.tr.xaml | 84 ++++++++++++++++ FloatTool/Languages/Lang.uk.xaml | 9 +- FloatTool/Languages/Lang.xaml | 6 +- FloatTool/Languages/Lang.zh.xaml | 6 +- FloatTool/ViewModels/BenchmarkViewModel.cs | 2 +- FloatTool/ViewModels/SettingsViewModel.cs | 16 +-- FloatTool/Views/MainWindow.xaml.cs | 24 ++++- FloatTool/Views/UpdateWindow.xaml | 89 +++++++++++++++++ FloatTool/Views/UpdateWindow.xaml.cs | 109 +++++++++++++++++++++ doc/program.png | Bin 33916 -> 33916 bytes 35 files changed, 1594 insertions(+), 64 deletions(-) create mode 100644 FloatTool/Languages/Lang.cs.xaml create mode 100644 FloatTool/Languages/Lang.da.xaml create mode 100644 FloatTool/Languages/Lang.de.xaml create mode 100644 FloatTool/Languages/Lang.es.xaml create mode 100644 FloatTool/Languages/Lang.fi.xaml create mode 100644 FloatTool/Languages/Lang.ga.xaml create mode 100644 FloatTool/Languages/Lang.he.xaml create mode 100644 FloatTool/Languages/Lang.hr.xaml create mode 100644 FloatTool/Languages/Lang.it.xaml create mode 100644 FloatTool/Languages/Lang.ka.xaml create mode 100644 FloatTool/Languages/Lang.lt.xaml create mode 100644 FloatTool/Languages/Lang.lv.xaml create mode 100644 FloatTool/Languages/Lang.pt.xaml create mode 100644 FloatTool/Languages/Lang.tr.xaml create mode 100644 FloatTool/Views/UpdateWindow.xaml create mode 100644 FloatTool/Views/UpdateWindow.xaml.cs diff --git a/.gitignore b/.gitignore index 22547da..fba682c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ .vs/ -FloatTool/bin/ +bin/ FloatTool/obj/ diff --git a/FloatTool/App.xaml b/FloatTool/App.xaml index 28df4d8..e00ee29 100644 --- a/FloatTool/App.xaml +++ b/FloatTool/App.xaml @@ -19,7 +19,7 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:FloatTool" - StartupUri="Views/MainWindow.xaml"> + StartupUri="Views/MainWindow.xaml" Startup="AppLoaded"> @@ -41,12 +41,26 @@ + + + + + + + + + + - + + + - - + + + + diff --git a/FloatTool/App.xaml.cs b/FloatTool/App.xaml.cs index 9162d77..3c58117 100644 --- a/FloatTool/App.xaml.cs +++ b/FloatTool/App.xaml.cs @@ -94,7 +94,7 @@ public static void SelectTheme(string themeURI) public App() { var version = Assembly.GetExecutingAssembly().GetName().Version; - VersionCode = $"v.{version.Major}.{version.MajorRevision}.{version.Minor}"; + VersionCode = $"v.{version.Major}.{version.Minor}.{version.Build}"; Logger.Initialize(); Logger.Log.Info($"FloatTool {VersionCode}"); @@ -162,9 +162,24 @@ public App() DiscordClient.Initialize(); } + public static void CleanOldFiles() + { + string folderPath = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location); + foreach (var oldFile in Directory.GetFiles(folderPath, "*.old", SearchOption.TopDirectoryOnly)) + File.Delete(oldFile); + } + + void AppLoaded(object sender, StartupEventArgs e) + { + if (e.Args.Length > 0 && e.Args.Contains("--clean-update")) + { + CleanOldFiles(); + } + } + const int ERROR_SHARING_VIOLATION = 32; const int ERROR_LOCK_VIOLATION = 33; - private static bool IsFileLocked(string file) + public static bool IsFileLocked(string file) { if (File.Exists(file) == true) { diff --git a/FloatTool/Common/Logger.cs b/FloatTool/Common/Logger.cs index d7fe8ee..631078d 100644 --- a/FloatTool/Common/Logger.cs +++ b/FloatTool/Common/Logger.cs @@ -33,7 +33,7 @@ public static void Initialize() { Hierarchy hierarchy = (Hierarchy)LogManager.GetRepository(); - PatternLayout patternLayout = new PatternLayout{ + PatternLayout patternLayout = new() { ConversionPattern = "%date [%thread] %-5level - %message%newline" }; patternLayout.ActivateOptions(); diff --git a/FloatTool/Common/Settings.cs b/FloatTool/Common/Settings.cs index 699e5d3..1f494df 100644 --- a/FloatTool/Common/Settings.cs +++ b/FloatTool/Common/Settings.cs @@ -17,6 +17,8 @@ using Microsoft.Win32; using System; +using System.Collections.Generic; +using System.IO; using System.Threading; namespace FloatTool @@ -70,6 +72,7 @@ public class Settings public bool CheckForUpdates { get; set; } = true; public bool DiscordRPC { get; set; } = true; public int ThreadCount { get; set; } = Environment.ProcessorCount; + public bool Migrated { get; set; } = false; public void TryLoad() { @@ -83,11 +86,10 @@ public void TryLoad() Currency = (Currency)Registry.GetValue(keyName, "currency", Currency.USD); ThemeURI = (string)Registry.GetValue(keyName, "themeURI", "/Theme/Schemes/Dark.xaml"); ThreadCount = (int)Registry.GetValue(keyName, "lastThreads", Environment.ProcessorCount); - - // Using ToString to be compatible with older versions Sound = (string)Registry.GetValue(keyName, "sound", "True") == "True"; CheckForUpdates = (string)Registry.GetValue(keyName, "updateCheck", "True") == "True"; DiscordRPC = (string)Registry.GetValue(keyName, "discordRPC", "True") == "True"; + Migrated = (string)Registry.GetValue(keyName, "migrated", "False") == "True"; } catch (Exception ex) { @@ -106,16 +108,41 @@ public void Save() Registry.SetValue(keyName, "currency", (int)Currency); Registry.SetValue(keyName, "themeURI", ThemeURI); Registry.SetValue(keyName, "lastThreads", ThreadCount); - - // Using ToString to be compatible with older versions - Registry.SetValue(keyName, "sound", Sound.ToString()); - Registry.SetValue(keyName, "updateCheck", CheckForUpdates.ToString()); - Registry.SetValue(keyName, "discordRPC", DiscordRPC.ToString()); + Registry.SetValue(keyName, "sound", Sound); + Registry.SetValue(keyName, "updateCheck", CheckForUpdates); + Registry.SetValue(keyName, "discordRPC", DiscordRPC); + Registry.SetValue(keyName, "migrated", Migrated); } + public void MigrateFromOldVersion() + { + // This method cleans up old settings and data + List oldFiles = new() { + "debug.log", + "FloatCore.dll", + "FloatTool.exe.config", + "FloatTool.pdb", + "itemData.json", + "theme.json", + "Updater.exe" + }; + + foreach(var file in oldFiles) + { + if (File.Exists(file)) + File.Delete(file); + } + + App.CleanOldFiles(); + + // Finally save that we migrated to not do this every time + Migrated = true; + Save(); + } + public override string ToString() { - return $"{{LanguageCode: {LanguageCode}, Currency: {Currency}, ThemeURI: {ThemeURI}, Sound: {Sound}, CheckForUpdates: {CheckForUpdates}, DiscordRPC: {DiscordRPC}, ThreadCount: {ThreadCount}}}"; + return $"{{LanguageCode: {LanguageCode}, Currency: {Currency}, ThemeURI: {ThemeURI}, Sound: {Sound}, CheckForUpdates: {CheckForUpdates}, DiscordRPC: {DiscordRPC}, ThreadCount: {ThreadCount}, HaveUpdated: {Migrated}}}"; } } } diff --git a/FloatTool/Common/Utils.cs b/FloatTool/Common/Utils.cs index 469a51c..df0594c 100644 --- a/FloatTool/Common/Utils.cs +++ b/FloatTool/Common/Utils.cs @@ -38,7 +38,7 @@ public static string FirstCharToUpper(this string input) => public static class Utils { public static string API_URL = "https://prevterapi.000webhostapp.com"; - private static HttpClient Client = new(); + private static readonly HttpClient Client = new(); public static async Task GetWearFromInspectURL(string inspect_url) { @@ -49,6 +49,24 @@ public static async Task GetWearFromInspectURL(string inspect_url) return Convert.ToDecimal(json["iteminfo"]["floatvalue"]); } + public static async Task CheckForUpdates() + { + try + { + HttpClient client = new(); + client.DefaultRequestHeaders.Add("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36"); + var result = await client.GetAsync("https://api.github.com/repos/prevter/floattool/releases/latest"); + result.EnsureSuccessStatusCode(); + string response = await result.Content.ReadAsStringAsync(); + return JsonConvert.DeserializeObject(response); + } + catch(Exception ex) + { + Logger.Log.Error("Failed to get latest version", ex); + return null; + } + } + public static string ShortCpuName(string cpu) { cpu = cpu.Replace("(R)", ""); @@ -77,6 +95,21 @@ public static string ShortCpuName(string cpu) } } + #pragma warning disable IDE1006 // Naming Styles + public class UpdateResult + { + public class Asset + { + public string browser_download_url { get; set; } + } + + public string tag_name { get; set; } + public string name { get; set; } + public List assets { get; set; } + public string body { get; set; } + } + #pragma warning restore IDE1006 // Naming Styles + public class CraftSearchSetup { public decimal SearchTarget { get; set; } diff --git a/FloatTool/FloatTool.csproj b/FloatTool/FloatTool.csproj index 273d469..9ba5b39 100644 --- a/FloatTool/FloatTool.csproj +++ b/FloatTool/FloatTool.csproj @@ -12,6 +12,9 @@ 1.0.0 $(AssemblyVersion) Assets\Icon.ico + embedded + False + $(SolutionDir)bin @@ -29,6 +32,7 @@ + diff --git a/FloatTool/FloatTool.csproj.user b/FloatTool/FloatTool.csproj.user index fb4c8a0..0073950 100644 --- a/FloatTool/FloatTool.csproj.user +++ b/FloatTool/FloatTool.csproj.user @@ -8,6 +8,9 @@ Code + + Code + @@ -46,5 +49,8 @@ Designer + + Designer + \ No newline at end of file diff --git a/FloatTool/Languages/Lang.cs.xaml b/FloatTool/Languages/Lang.cs.xaml new file mode 100644 index 0000000..011c135 --- /dev/null +++ b/FloatTool/Languages/Lang.cs.xaml @@ -0,0 +1,84 @@ + + + + Typ zbraně: + Kůže: + Kvalitní: + výsledky: + Režim vyhledávání: + Požadovaný plovák: + Počet: + Přeskočit: + Start + Stop + Najdi jednu + Seřadit + Klesající + Počet vláken: + Rozsah řemesel: + Aktuální rychlost: + kombinace/sekundu + Kontrolované kombinace: + Chyba! Tato kůže nemůže mít tuto kvalitu. + + + Nastavení + Jazyk: + Měna: + Téma: + Získejte témata + Otevřete složku motivů + Povolit zvuk + Kontrola aktualizací + + + Benchmark + Více vláken + Jedno vlákno + Spustit benchmark + Aktualizace + Vlákna + Vlákno + Zveřejnit výsledek + + + kopírovat + Možný plovák: + Ingredience: + Cena: + + + Nastavení vyhledávání + Benchmarking + Hledání + + + Hledání skinu na trhu + Získávání plavidel z tržiště + Chyba! Nepodařilo se získat plováky z tržiště + Chyba! Z tržiště se nepodařilo získat více než 10 plaváků + Spouštění vyhledávání + Hledání dokončeno + + + Aktualizace k dispozici + Později + Neptej se + \ No newline at end of file diff --git a/FloatTool/Languages/Lang.da.xaml b/FloatTool/Languages/Lang.da.xaml new file mode 100644 index 0000000..f8b38bf --- /dev/null +++ b/FloatTool/Languages/Lang.da.xaml @@ -0,0 +1,84 @@ + + + + Våbentype: + Hud: + Kvalitet: + Resultater: + Søgetilstand: + Ønsket flyder: + Tælle: + Springe: + Start + Hold op + Find en + Sortere + Aftagende + Trådantal: + Håndværkssortiment: + Aktuel hastighed: + kombinationer/sekund + Markerede kombinationer: + Fejl! Denne hud kan ikke have denne kvalitet. + + + Indstillinger + Sprog: + Betalingsmiddel: + Tema: + Hent temaer + Åbn mappen temaer + Aktiver lyd + Søg efter opdateringer + + + Benchmark + Flere tråde + Enkelt tråd + Start benchmark + Opdatering + Tråde + Tråd + Udgiv resultat + + + Kopi + Mulig flyder: + Ingredienser: + Pris: + + + Opsætning af søgning + Benchmarking + Søger + + + Søger hud på markedspladsen + Få flyder fra markedspladsen + Fejl! Kunne ikke hente flydere fra markedspladsen + Fejl! Kunne ikke få mere end 10 flydere fra markedspladsen + Starter søgning + Færdig med at søge + + + Opdatering tilgængelig + Senere + Spørg ikke + \ No newline at end of file diff --git a/FloatTool/Languages/Lang.de.xaml b/FloatTool/Languages/Lang.de.xaml new file mode 100644 index 0000000..bb6a4a0 --- /dev/null +++ b/FloatTool/Languages/Lang.de.xaml @@ -0,0 +1,84 @@ + + + + Waffentyp: + Haut: + Qualität: + Ergebnisse: + Suchmodus: + Gewünschter Schwimmer: + Anzahl: + Überspringen: + Start + Stoppen + Einen finden + Sortieren + Absteigend + Fadenzahl: + Bastelbereich: + Momentane Geschwindigkeit: + Kombinationen/Sekunde + Geprüfte Kombinationen: + Fehler! Diese Haut kann diese Qualität nicht haben. + + + Einstellungen + Sprache: + Währung: + Thema: + Holen Sie sich Themen + Themenordner öffnen + Sound einschalten + Auf Updates prüfen + + + Benchmark + Mehrere Fäden + Einzelner Thread + Benchmark starten + Aktualisieren + Fäden + Gewinde + Ergebnis veröffentlichen + + + Kopieren + Möglicher Schwimmer: + Zutaten: + Preis: + + + Suche einrichten + Benchmarking + Suchen + + + Skin auf dem Marktplatz suchen + Floats vom Marktplatz bekommen + Fehler! Floats konnten nicht vom Marktplatz abgerufen werden + Fehler! Es konnten nicht mehr als 10 Floats vom Marktplatz abgerufen werden + Suche starten + Suche beendet + + + Update verfügbar + Später + Frag nicht + \ No newline at end of file diff --git a/FloatTool/Languages/Lang.es.xaml b/FloatTool/Languages/Lang.es.xaml new file mode 100644 index 0000000..684da37 --- /dev/null +++ b/FloatTool/Languages/Lang.es.xaml @@ -0,0 +1,84 @@ + + + + Tipo de arma: + Piel: + Calidad: + Resultados: + Modo de búsqueda: + Flotador deseado: + Contar: + Saltear: + Comienzo + Detenerse + Encuentra uno + Clasificar + Descendente + Número de hilos: + Gama artesanal: + Velocidad actual: + combinaciones/segundo + Combinaciones marcadas: + ¡Error! Esta piel no puede tener esta cualidad. + + + Ajustes + Idioma: + Divisa: + Temática: + Conseguir temas + Abrir carpeta de temas + Activar sonido + Buscar actualizaciones + + + Punto de referencia + Múltiples hilos + Hilo único + Empezar punto de referencia + Actualizar + Hilos + Hilo + Publicar resultado + + + Dupdo + Posible flotador: + Ingredientes: + Precio: + + + Configuración de la búsqueda + evaluación comparativa + buscando + + + Buscando piel en el mercado + Obtener flotadores del mercado + ¡Error! No se pudieron obtener flotadores del mercado + ¡Error! No se pudieron obtener más de 10 carrozas del mercado + Iniciando búsqueda + búsqueda terminada + + + Actualización disponible + Luego + No preguntes + \ No newline at end of file diff --git a/FloatTool/Languages/Lang.fi.xaml b/FloatTool/Languages/Lang.fi.xaml new file mode 100644 index 0000000..3427151 --- /dev/null +++ b/FloatTool/Languages/Lang.fi.xaml @@ -0,0 +1,84 @@ + + + + Aseen tyyppi: + Iho: + Laatu: + Tulokset: + Hakutila: + Haluttu kelluvuus: + Kreivi: + Ohita: + alkaa + Lopettaa + Löydä yksi + Järjestellä + Laskeva + Lankamäärä: + Askarteluvalikoima: + Nykyinen nopeus: + yhdistelmät/sekunti + Tarkistetut yhdistelmät: + Virhe! Tällä iholla ei voi olla tätä laatua. + + + asetukset + Kieli: + Valuutta: + Teema: + Hanki teemoja + Avaa teemakansio + Äänet päälle + Tarkista päivitykset + + + Vertailuarvo + Useita lankoja + Yksi lanka + Aloita benchmark + Päivittää + Kierteet + Lanka + Julkaise tulos + + + Kopio + Mahdollinen kelluvuus: + Ainekset: + Hinta: + + + Haun määrittäminen + Benchmarking + Etsitään + + + Etsitään ihoa torilta + Kelluvien saaminen torilta + Virhe! Ei saatu kellukkeita torilta + Virhe! Ei voinut saada enempää kuin 10 floatsia torilta + Haun käynnistäminen + Haku on valmis + + + Päivitys saatavilla + Myöhemmin + Älä kysy + \ No newline at end of file diff --git a/FloatTool/Languages/Lang.fr.xaml b/FloatTool/Languages/Lang.fr.xaml index cb42d27..9862121 100644 --- a/FloatTool/Languages/Lang.fr.xaml +++ b/FloatTool/Languages/Lang.fr.xaml @@ -1,4 +1,4 @@ - - Type d'arme : + Type d'arme : La peau: Qualité: - Résultats: - Mode de recherche: - Flotteur souhaité: + Résultats : + Mode de recherche : + Flotteur souhaité : Compter: Sauter: Démarrer @@ -31,11 +31,11 @@ Trouvez-en un Sorte Descendant - Nombre de fils: - Gamme artisanale: + Nombre de fils : + Gamme artisanale : Vitesse actuelle: combinaisons/seconde - Combinaisons cochées: + Combinaisons cochées : Erreur! Cette peau ne peut pas avoir cette qualité. @@ -55,12 +55,12 @@ Commencer le benchmark Mise à jour Fils - Le fil + Fil de discussion Publier le résultat Copie - Flottant éventuel: + Flottant éventuel : Ingrédients: Prix: @@ -77,4 +77,8 @@ Lancement de la recherche Recherche terminée + + Mise à jour disponible + Plus tard + Ne demandez pas \ No newline at end of file diff --git a/FloatTool/Languages/Lang.ga.xaml b/FloatTool/Languages/Lang.ga.xaml new file mode 100644 index 0000000..9284394 --- /dev/null +++ b/FloatTool/Languages/Lang.ga.xaml @@ -0,0 +1,84 @@ + + + + Cineál Airm: + Craiceann: + Cáilíocht: + Torthaí: + Mód Cuardaigh: + Snámhán Inmhianaithe: + Comhair: + Scipeáil: + Tosaigh + Stop + Faigh ceann + Sórtáil + íslitheach + Comhaireamh snáithe: + Raon ceardaíochta: + Luas reatha: + teaglamaí/dara + Comhcheangail sheiceáil: + Earráid! Ní féidir an caighdeán seo a bheith ag an gcraiceann seo. + + + Socruithe + Teanga: + Airgeadra: + Téama: + Faigh téamaí + Oscail fillteán téamaí + Cumasaigh fuaim + Seiceáil do nuashrónaithe + + + Tagarmharc + Snáitheanna iolracha + Snáithe aonair + Tosaigh tagarmharc + Nuashonrú + Snáitheanna + Snáithe + Foilsigh an toradh + + + Cóipeáil + Snámhán féideartha: + Comhábhair: + Praghas: + + + Cuardach a shocrú + Tagarmharcáil + Cuardach + + + Craicne a chuardach ar an margadh + Snámhóga a fháil ón margadh + Earráid! Níorbh fhéidir snámháin a fháil ón margadh + Earráid! Níorbh fhéidir níos mó ná 10 snámhán a fháil ón margadh + Cuardach a thosú + Críochnaíodh an cuardach + + + Nuashonrú ar fáil + Níos déanaí + Ná fiafraigh + \ No newline at end of file diff --git a/FloatTool/Languages/Lang.he.xaml b/FloatTool/Languages/Lang.he.xaml new file mode 100644 index 0000000..f2775e5 --- /dev/null +++ b/FloatTool/Languages/Lang.he.xaml @@ -0,0 +1,84 @@ + + + + סוג נשק: + עור: + איכות: + תוצאות: + מצב חיפוש: + ציפה רצויה: + לספור: + לדלג: + הַתחָלָה + תפסיק + מצא אחד + סוג + יורד + ספירת חוטים: + טווח מלאכה: + מהירות נוכחית: + שילובים/שנייה + שילובים מסומנים: + שְׁגִיאָה! העור הזה לא יכול לקבל את האיכות הזו. + + + הגדרות + שפה: + מַטְבֵּעַ: + נושא: + קבל ערכות נושא + פתח את תיקיית הנושאים + אפשר צליל + בדוק עדכונים + + + Benchmark + חוטים מרובים + חוט בודד + התחל benchmark + עדכון + חוטים + פְּתִיל + פרסם תוצאה + + + עותק + ציפה אפשרית: + רכיבים: + מחיר: + + + הגדרת חיפוש + Benchmarking + מחפש + + + מחפש עור בשוק + קבלת מצופים משוק + שְׁגִיאָה! לא ניתן היה להשיג צפים משוק + שְׁגִיאָה! לא ניתן היה להשיג יותר מ-10 צפים מ-marketplace + מתחילים בחיפוש + סיים לחפש + + + עדכון זמין + יותר מאוחר + אל תשאלו + \ No newline at end of file diff --git a/FloatTool/Languages/Lang.hr.xaml b/FloatTool/Languages/Lang.hr.xaml new file mode 100644 index 0000000..f9d3028 --- /dev/null +++ b/FloatTool/Languages/Lang.hr.xaml @@ -0,0 +1,84 @@ + + + + Vrsta oružja: + Koža: + kvaliteta: + Ishodi: + Način pretraživanja: + Željeni plovak: + Računati: + Preskočiti: + Početak + Stop + Pronađite jednu + Vrsta + Silazni + Broj niti: + Raspon obrta: + Trenutna brzina: + kombinacije/drugi + Provjerene kombinacije: + Greška! Ova koža ne može imati ovu kvalitetu. + + + Postavke + Jezik: + Valuta: + Tema: + Nabavite teme + Otvorite mapu tema + Omogući zvuk + Provjerite ima li ažuriranja + + + Benchmark + Više niti + Jednostruki navoj + Pokreni benchmark + Ažuriraj + Niti + Nit + Objavite rezultat + + + Kopirati + Moguće plutanje: + Sastojci: + Cijena: + + + Postavljanje pretraživanja + Benchmarking + Pretraživanje + + + Pretraživanje kože na tržištu + Dobivanje plutajućih proizvoda s tržišta + Greška! Nisam mogao nabaviti plovke s tržišta + Greška! Nisam mogao dobiti više od 10 plutajućih s tržišta + Pokretanje pretraživanja + Završeno pretraživanje + + + Ažuriranje dostupno + Kasnije + Ne pitajte + \ No newline at end of file diff --git a/FloatTool/Languages/Lang.it.xaml b/FloatTool/Languages/Lang.it.xaml new file mode 100644 index 0000000..0e8c1c7 --- /dev/null +++ b/FloatTool/Languages/Lang.it.xaml @@ -0,0 +1,84 @@ + + + + Tipo di arma: + Pelle: + Qualità: + Risultati: + Modalità di ricerca: + Galleggiante desiderato: + Contare: + Saltare: + Inizio + Fermare + Trova uno + Ordinare + Discendente + Conteggio discussioni: + Gamma artigianale: + Velocità attuale: + combinazioni/secondo + Combinazioni controllate: + Errore! Questa pelle non può avere questa qualità. + + + Impostazioni + Lingua: + Moneta: + Tema: + Ottieni temi + Apri la cartella dei temi + Abilita l'audio + Controlla gli aggiornamenti + + + Segno di riferimento + Più fili + Filo singolo + Avvia benchmark + Aggiornare + Fili + Filo + Pubblica il risultato + + + copia + Possibile galleggiante: + Ingredienti: + Prezzo: + + + Impostazione della ricerca + Analisi comparativa + Ricerca + + + Ricerca skin sul mercato + Ottenere galleggianti dal mercato + Errore! Impossibile ottenere float dal mercato + Errore! Non è stato possibile ottenere più di 10 float dal mercato + Avvio della ricerca + Ricerca finita + + + Aggiornamento disponibile + Dopo + Non chiedere + \ No newline at end of file diff --git a/FloatTool/Languages/Lang.ja.xaml b/FloatTool/Languages/Lang.ja.xaml index e883f1f..31a9a65 100644 --- a/FloatTool/Languages/Lang.ja.xaml +++ b/FloatTool/Languages/Lang.ja.xaml @@ -1,4 +1,4 @@ - + 利用可能なアップデート + 後で + 聞かないで \ No newline at end of file diff --git a/FloatTool/Languages/Lang.ka.xaml b/FloatTool/Languages/Lang.ka.xaml new file mode 100644 index 0000000..03daa6d --- /dev/null +++ b/FloatTool/Languages/Lang.ka.xaml @@ -0,0 +1,84 @@ + + + + იარაღის ტიპი: + Კანი: + ხარისხი: + შედეგები: + ძიების რეჟიმი: + სასურველი ფლოტი: + დათვლა: + გამოტოვება: + დაწყება + გაჩერდი + იპოვე ერთი + დალაგება + Დაღმავალი + თემების რაოდენობა: + ხელნაკეთობების დიაპაზონი: + მიმდინარე სიჩქარე: + კომბინაციები/მეორე + შემოწმებული კომბინაციები: + შეცდომა! ამ კანს არ შეიძლება ჰქონდეს ეს ხარისხი. + + + პარამეტრები + Ენა: + ვალუტა: + თემა: + მიიღეთ თემები + გახსენით თემების საქაღალდე + ხმის ჩართვა + Შეამოწმოთ განახლებები + + + ნიშნული + მრავალი ძაფი + ერთი ძაფი + დაწყება საორიენტაციო + განახლება + ძაფები + ძაფი + შედეგის გამოქვეყნება + + + კოპირება + შესაძლო ცურვა: + ინგრედიენტები: + ფასი: + + + ძიების დაყენება + Benchmarking + ეძებს + + + კანის ძებნა ბაზარზე + ფლოტის მიღება ბაზრიდან + შეცდომა! ბაზრიდან მოძრავი ფურცლების მიღება ვერ მოხერხდა + შეცდომა! ბაზრიდან 10-ზე მეტი ცურვის მიღება ვერ მოხერხდა + ძიების დაწყება + დაასრულა ძებნა + + + Განახლება შესაძლებელია + მოგვიანებით + Არ იკითხო + \ No newline at end of file diff --git a/FloatTool/Languages/Lang.lt.xaml b/FloatTool/Languages/Lang.lt.xaml new file mode 100644 index 0000000..3ecc948 --- /dev/null +++ b/FloatTool/Languages/Lang.lt.xaml @@ -0,0 +1,84 @@ + + + + Ginklo tipas: + Paveikslėlis: + Kokybė: + Rezultatai: + Paieškos režimas: + Norimas susidėvėjimo laipsnis: + Skaičiavimas: + Praleisti: + Pradėti + Sustabdyti + Surasti vieną + Rūšiuoti + Mažėjimo tvarka + Branduolių kiekis: + Krafto diapazonas: + Dabartinis greitis: + Kombinacijos per sekundę + Patikrintos kombinacijos: + Klaida! Šis paveikslėlis negali būti tokios kokybės. + + + Nustatymai + Kalba: + Valiuta: + Tema: + Gauti temų + Atidaryti temų aplanką + Įjungti garsą + Tikrinti, ar yra atnaujinimų + + + Benchmark + Keli srautai + Vienas srautas + Pradėti benchmark + Atnaujinti + Keli srautai + Vienas srautas + Paskelbti rezultatą + + + Kopijuoti + Galimas susidėvėjimo laipsnis: + Komponentai: + Kaina: + + + Paieškos nustatymas + Benchmarking + Ieškoma + + + Paveikslėlio paieška prekyvietėje + Susidėvėjimo laipsnio gavimas prekyvietėje + Klaida! Nepavyko gauti susidėvėjimo laipsnio prekyvietėje + Klaida! Nepavyko gauti daugaiu dešimties susidėvėjimo laipsnių prekyvietėje + Pradėti paiešką + Paieška baigta + + + Galimas atnaujinimas + Vėliau + Neklauskite + \ No newline at end of file diff --git a/FloatTool/Languages/Lang.lv.xaml b/FloatTool/Languages/Lang.lv.xaml new file mode 100644 index 0000000..703f158 --- /dev/null +++ b/FloatTool/Languages/Lang.lv.xaml @@ -0,0 +1,84 @@ + + + + Ieroča veids: + Āda: + Kvalitāte: + Rezultāti: + Meklēšanas režīms: + Vēlamais pludiņš: + Skaits: + Izlaist: + Sākt + Pietura + Atrodi vienu + Kārtot + lejupejoša + Pavedienu skaits: + Amatniecības klāsts: + Pašreizējais ātrums: + kombinācijas/sekundē + Pārbaudītās kombinācijas: + Kļūda! Šai ādai nevar būt šāda kvalitāte. + + + Iestatījumi + Valoda: + Valūta: + Tēma: + Iegūstiet motīvus + Atveriet motīvu mapi + Iespējot skaņu + Meklēt atjauninājumus + + + Etalons + Vairāki pavedieni + Viens pavediens + Sāciet etalonu + Atjaunināt + Pavedieni + Pavediens + Publicēt rezultātu + + + Kopēt + Possible float: + Sastāvdaļas: + Cena: + + + Meklēšanas iestatīšana + Salīdzinošā novērtēšana + Meklēšana + + + Searching skin on marketplace + Pludiņu iegūšana no tirgus + Kļūda! Nevarēja dabūt pludiņus no tirgus + Kļūda! Nevarēja iegūt vairāk par 10 pludiņiem no tirgus + Starting up search + Meklēšana pabeigta + + + Pieejams atjauninājums + Vēlāk + Neprasi + \ No newline at end of file diff --git a/FloatTool/Languages/Lang.pl.xaml b/FloatTool/Languages/Lang.pl.xaml index 357155e..a4c1bbe 100644 --- a/FloatTool/Languages/Lang.pl.xaml +++ b/FloatTool/Languages/Lang.pl.xaml @@ -1,4 +1,4 @@ - Ustawienia Język: Waluta: Temat: - Pobierz tematy + Pobierz motywy Otwórz folder motywów - Włącz dźwięk + Włączyć dźwięk Sprawdź aktualizacje - + Reper - Wielowątkowy - Jednowątkowy - Uruchom test + Wiele wątków + Pojedynczy wątek + Uruchom test porównawczy Aktualizacja - Strumienie - Strumień + Wątki + Wątek Opublikuj wynik @@ -65,15 +65,20 @@ Cena £: - Nietypowe wyszukiwanie + Konfigurowanie wyszukiwania Analiza porównawcza - Szukaj + Badawczy - Szukam skina i parkietu - Dostaję pływaki z parkietu - Błąd! Nie udało się uzyskać pływaków z parkietu - Błąd! Nie udało się uzyskać więcej niż 10 pływaków - Zaczynam poszukiwania + Wyszukiwanie skórki na rynku + Pobieranie pływaków z rynku + Błąd! Nie udało się pobrać pływaków z rynku + Błąd! Nie udało się uzyskać więcej niż 10 pływaków z rynku + Rozpoczęcie wyszukiwania Zakończono wyszukiwanie + + + Dostępna aktualizacja + Później + Nie pytaj \ No newline at end of file diff --git a/FloatTool/Languages/Lang.pt.xaml b/FloatTool/Languages/Lang.pt.xaml new file mode 100644 index 0000000..8cdf03d --- /dev/null +++ b/FloatTool/Languages/Lang.pt.xaml @@ -0,0 +1,84 @@ + + + + Tipo de arma: + Pele: + Qualidade: + Resultados: + Modo de pesquisa: + Flutuador Desejado: + Contar: + Pular: + Começar + Pare + Encontre um + Ordenar + descendente + Contagem de fios: + Gama de artesanato: + Velocidade atual: + combinações/segundo + Combinações verificadas: + Erro! Esta pele não pode ter esta qualidade. + + + Definições + Linguagem: + Moeda: + Tema: + Obter temas + Abra a pasta de temas + Habilitar som + Verifique se há atualizações + + + Referência + Vários tópicos + Linha única + Iniciar referência + Atualizar + Tópicos + Fio + Publicar resultado + + + cópia de + Possível flutuação: + Ingredientes: + Preço: + + + Configurando a pesquisa + avaliação comparativa + Procurando + + + Pesquisando skin no marketplace + Obtendo floats do mercado + Erro! Não foi possível obter carros alegóricos do mercado + Erro! Não foi possível obter mais de 10 carros alegóricos do mercado + Iniciando a pesquisa + Pesquisa concluída + + + Atualização disponível + Mais tarde + Não pergunte + \ No newline at end of file diff --git a/FloatTool/Languages/Lang.ru.xaml b/FloatTool/Languages/Lang.ru.xaml index 19262ed..b55a2d2 100644 --- a/FloatTool/Languages/Lang.ru.xaml +++ b/FloatTool/Languages/Lang.ru.xaml @@ -1,4 +1,4 @@ - Бенчмарк Многопоточный @@ -76,4 +76,9 @@ Ошибка! Не удалось получить больше 10-ти флоатов Начинаю поиск Завершил поиск + + + Доступно обновление + Позже + Не напоминать \ No newline at end of file diff --git a/FloatTool/Languages/Lang.tr.xaml b/FloatTool/Languages/Lang.tr.xaml new file mode 100644 index 0000000..85de1a1 --- /dev/null +++ b/FloatTool/Languages/Lang.tr.xaml @@ -0,0 +1,84 @@ + + + + Silah türü: + Deri: + Kalite: + Sonuçlar: + Arama modu: + İstenilen Şamandıra: + Saymak: + Atlamak: + Başlangıç + Durmak + birini bul + Çeşit + Azalan + Konu sayısı: + zanaat aralığı: + Geçerli hız: + kombinasyonlar/saniye + Kontrol edilen kombinasyonlar: + Hata! Bu cilt bu kaliteye sahip olamaz. + + + Ayarlar + Dilim: + Para birimi: + Tema: + Temalar edinmek + Temalar klasörünü aç + Sesi etkinleştir + Güncellemeleri kontrol et + + + Kalite testi + Birden çok iş parçacığı + Tek iplik + Karşılaştırmayı başlat + Güncelleme + İş Parçacığı + İplik + Sonucu yayınla + + + kopyala + Olası şamandıra: + İçindekiler: + Fiyat: + + + Aramayı ayarlama + kıyaslama + Aranıyor + + + Pazar yerinde cilt aranıyor + Pazar yerinden şamandıra almak + Hata! Pazar yerinden yüzer alamadım + Hata! Pazar yerinden 10'dan fazla şamandıra alınamadı + Aramayı başlatma + Arama tamamlandı + + + Güncelleme uygun + Daha sonra + Sorma + \ No newline at end of file diff --git a/FloatTool/Languages/Lang.uk.xaml b/FloatTool/Languages/Lang.uk.xaml index 47de94f..edab7c9 100644 --- a/FloatTool/Languages/Lang.uk.xaml +++ b/FloatTool/Languages/Lang.uk.xaml @@ -1,4 +1,4 @@ - Бенчмарк Багатопоточний @@ -76,4 +76,9 @@ Помилка! Не вдалося отримати більше 10-ти флоатів Починаю пошук Закінчив пошук + + + Доступне оновлення + Пізніше + Не нагадувати \ No newline at end of file diff --git a/FloatTool/Languages/Lang.xaml b/FloatTool/Languages/Lang.xaml index 61b36b7..b25d828 100644 --- a/FloatTool/Languages/Lang.xaml +++ b/FloatTool/Languages/Lang.xaml @@ -1,4 +1,4 @@ - + Update available + Later + Do not ask \ No newline at end of file diff --git a/FloatTool/Languages/Lang.zh.xaml b/FloatTool/Languages/Lang.zh.xaml index c836f38..91ae426 100644 --- a/FloatTool/Languages/Lang.zh.xaml +++ b/FloatTool/Languages/Lang.zh.xaml @@ -1,4 +1,4 @@ - + 可用更新 + 之后 + 不要问 \ No newline at end of file diff --git a/FloatTool/ViewModels/BenchmarkViewModel.cs b/FloatTool/ViewModels/BenchmarkViewModel.cs index 869f6c6..35109f1 100644 --- a/FloatTool/ViewModels/BenchmarkViewModel.cs +++ b/FloatTool/ViewModels/BenchmarkViewModel.cs @@ -124,7 +124,7 @@ public int SinglethreadedSpeed public static LinearGradientBrush IntelBrush = Application.Current.Resources["IntelBenchmarkFill"] as LinearGradientBrush; public static LinearGradientBrush CurrentBrush = Application.Current.Resources["CurrentBenchmarkFill"] as LinearGradientBrush; - private bool isUpdatingEnabled { get; set; } + private bool isUpdatingEnabled; public bool IsUpdatingEnabled { get { return isUpdatingEnabled; } diff --git a/FloatTool/ViewModels/SettingsViewModel.cs b/FloatTool/ViewModels/SettingsViewModel.cs index b1b6b12..74fadaa 100644 --- a/FloatTool/ViewModels/SettingsViewModel.cs +++ b/FloatTool/ViewModels/SettingsViewModel.cs @@ -151,12 +151,16 @@ public int CurrentLanguage public static List Languages { get; private set; } public static List LanguageCodes = new() { - "en", - "fr", - "ja", - "pl", - "uk", - "ru", + "cs", "da", + "de", "en", + "es", "fi", + "fr", "ga", + "he", "hr", + "it", "ja", + "ka", "lt", + "lv", "pl", + "pt", "uk", + "tr", "ru", "zh", }; diff --git a/FloatTool/Views/MainWindow.xaml.cs b/FloatTool/Views/MainWindow.xaml.cs index 1cad792..97a224f 100644 --- a/FloatTool/Views/MainWindow.xaml.cs +++ b/FloatTool/Views/MainWindow.xaml.cs @@ -39,7 +39,7 @@ public partial class MainWindow : Window public Settings Settings; public static long PassedCombinations; public static List ThreadPool; - public static CancellationTokenSource TokenSource = new CancellationTokenSource(); + public static CancellationTokenSource TokenSource = new(); public CancellationToken CancellationToken; public void UpdateRichPresence() @@ -62,6 +62,10 @@ public MainWindow() { Settings = new Settings(); Settings.TryLoad(); + + if (!Settings.Migrated) + Settings.MigrateFromOldVersion(); + App.SelectCulture(Settings.LanguageCode); App.SelectTheme(Settings.ThemeURI); @@ -75,6 +79,24 @@ public MainWindow() DataContext = ViewModel; Logger.Log.Info("Main window started"); + + if (Settings.CheckForUpdates) + { + Task.Factory.StartNew(() => + { + var update = Utils.CheckForUpdates().Result; + if (update != null && update.tag_name != App.VersionCode) + { + Dispatcher.Invoke(new Action(() => + { + Logger.Log.Info("New version available"); + var updateWindow = new UpdateWindow(update, Settings); + updateWindow.Owner = this; + updateWindow.ShowDialog(); + })); + } + }); + } } protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e) diff --git a/FloatTool/Views/UpdateWindow.xaml b/FloatTool/Views/UpdateWindow.xaml new file mode 100644 index 0000000..df7b8a4 --- /dev/null +++ b/FloatTool/Views/UpdateWindow.xaml @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +