diff --git a/VTOL_2.0.0/.vs/ProjectEvaluation/vtol.metadata.v7.bin b/VTOL_2.0.0/.vs/ProjectEvaluation/vtol.metadata.v7.bin index 8756b03..4bb9443 100644 Binary files a/VTOL_2.0.0/.vs/ProjectEvaluation/vtol.metadata.v7.bin and b/VTOL_2.0.0/.vs/ProjectEvaluation/vtol.metadata.v7.bin differ diff --git a/VTOL_2.0.0/.vs/ProjectEvaluation/vtol.projects.v7.bin b/VTOL_2.0.0/.vs/ProjectEvaluation/vtol.projects.v7.bin index 51a0337..484b08e 100644 Binary files a/VTOL_2.0.0/.vs/ProjectEvaluation/vtol.projects.v7.bin and b/VTOL_2.0.0/.vs/ProjectEvaluation/vtol.projects.v7.bin differ diff --git a/VTOL_2.0.0/.vs/VTOL/DesignTimeBuild/.dtbcache.v2 b/VTOL_2.0.0/.vs/VTOL/DesignTimeBuild/.dtbcache.v2 index e09fe54..d5fe9be 100644 Binary files a/VTOL_2.0.0/.vs/VTOL/DesignTimeBuild/.dtbcache.v2 and b/VTOL_2.0.0/.vs/VTOL/DesignTimeBuild/.dtbcache.v2 differ diff --git a/VTOL_2.0.0/.vs/VTOL/FileContentIndex/400e6afc-c53e-400d-894f-dfc27a9eaa92.vsidx b/VTOL_2.0.0/.vs/VTOL/FileContentIndex/400e6afc-c53e-400d-894f-dfc27a9eaa92.vsidx deleted file mode 100644 index 7ed2d92..0000000 Binary files a/VTOL_2.0.0/.vs/VTOL/FileContentIndex/400e6afc-c53e-400d-894f-dfc27a9eaa92.vsidx and /dev/null differ diff --git a/VTOL_2.0.0/.vs/VTOL/FileContentIndex/69f524ea-0eb2-426a-ae73-26072249bf67.vsidx b/VTOL_2.0.0/.vs/VTOL/FileContentIndex/69f524ea-0eb2-426a-ae73-26072249bf67.vsidx new file mode 100644 index 0000000..5f1f573 Binary files /dev/null and b/VTOL_2.0.0/.vs/VTOL/FileContentIndex/69f524ea-0eb2-426a-ae73-26072249bf67.vsidx differ diff --git a/VTOL_2.0.0/.vs/VTOL/FileContentIndex/790b2208-1c43-483a-a125-f82e7bf3d14c.vsidx b/VTOL_2.0.0/.vs/VTOL/FileContentIndex/790b2208-1c43-483a-a125-f82e7bf3d14c.vsidx deleted file mode 100644 index 4fb9e3f..0000000 Binary files a/VTOL_2.0.0/.vs/VTOL/FileContentIndex/790b2208-1c43-483a-a125-f82e7bf3d14c.vsidx and /dev/null differ diff --git a/VTOL_2.0.0/.vs/VTOL/FileContentIndex/a878a0eb-9905-43da-a537-58528916875f.vsidx b/VTOL_2.0.0/.vs/VTOL/FileContentIndex/a878a0eb-9905-43da-a537-58528916875f.vsidx new file mode 100644 index 0000000..db0e36d Binary files /dev/null and b/VTOL_2.0.0/.vs/VTOL/FileContentIndex/a878a0eb-9905-43da-a537-58528916875f.vsidx differ diff --git a/VTOL_2.0.0/.vs/VTOL/FileContentIndex/b0dce7a2-643e-45eb-b7ff-31cf4d8067ae.vsidx b/VTOL_2.0.0/.vs/VTOL/FileContentIndex/b0dce7a2-643e-45eb-b7ff-31cf4d8067ae.vsidx deleted file mode 100644 index 46fe59a..0000000 Binary files a/VTOL_2.0.0/.vs/VTOL/FileContentIndex/b0dce7a2-643e-45eb-b7ff-31cf4d8067ae.vsidx and /dev/null differ diff --git a/VTOL_2.0.0/.vs/VTOL/FileContentIndex/be002c9b-e07a-4e9f-8688-15f954635a78.vsidx b/VTOL_2.0.0/.vs/VTOL/FileContentIndex/be002c9b-e07a-4e9f-8688-15f954635a78.vsidx new file mode 100644 index 0000000..4e54a2a Binary files /dev/null and b/VTOL_2.0.0/.vs/VTOL/FileContentIndex/be002c9b-e07a-4e9f-8688-15f954635a78.vsidx differ diff --git a/VTOL_2.0.0/.vs/VTOL/FileContentIndex/cd21910a-5499-4dff-b89f-cc5933981f9e.vsidx b/VTOL_2.0.0/.vs/VTOL/FileContentIndex/cd21910a-5499-4dff-b89f-cc5933981f9e.vsidx new file mode 100644 index 0000000..d6d632a Binary files /dev/null and b/VTOL_2.0.0/.vs/VTOL/FileContentIndex/cd21910a-5499-4dff-b89f-cc5933981f9e.vsidx differ diff --git a/VTOL_2.0.0/.vs/VTOL/FileContentIndex/cfd7942c-e06d-4bee-873e-8c9933104d4e.vsidx b/VTOL_2.0.0/.vs/VTOL/FileContentIndex/cfd7942c-e06d-4bee-873e-8c9933104d4e.vsidx deleted file mode 100644 index 2b1b42f..0000000 Binary files a/VTOL_2.0.0/.vs/VTOL/FileContentIndex/cfd7942c-e06d-4bee-873e-8c9933104d4e.vsidx and /dev/null differ diff --git a/VTOL_2.0.0/.vs/VTOL/FileContentIndex/dae5a6a9-35fa-4c1a-af8b-529b2e94accc.vsidx b/VTOL_2.0.0/.vs/VTOL/FileContentIndex/dae5a6a9-35fa-4c1a-af8b-529b2e94accc.vsidx new file mode 100644 index 0000000..35b4abb Binary files /dev/null and b/VTOL_2.0.0/.vs/VTOL/FileContentIndex/dae5a6a9-35fa-4c1a-af8b-529b2e94accc.vsidx differ diff --git a/VTOL_2.0.0/.vs/VTOL/FileContentIndex/e68aaeb5-7894-4ba9-a2d6-b16dd7234715.vsidx b/VTOL_2.0.0/.vs/VTOL/FileContentIndex/e68aaeb5-7894-4ba9-a2d6-b16dd7234715.vsidx deleted file mode 100644 index 0ca1603..0000000 Binary files a/VTOL_2.0.0/.vs/VTOL/FileContentIndex/e68aaeb5-7894-4ba9-a2d6-b16dd7234715.vsidx and /dev/null differ diff --git a/VTOL_2.0.0/.vs/VTOL/v17/fileList.bin b/VTOL_2.0.0/.vs/VTOL/v17/fileList.bin index efa525b..5490c31 100644 Binary files a/VTOL_2.0.0/.vs/VTOL/v17/fileList.bin and b/VTOL_2.0.0/.vs/VTOL/v17/fileList.bin differ diff --git a/VTOL_2.0.0/Pages/Page_Home.xaml.cs b/VTOL_2.0.0/Pages/Page_Home.xaml.cs index 1dcbd58..f55bbb5 100644 --- a/VTOL_2.0.0/Pages/Page_Home.xaml.cs +++ b/VTOL_2.0.0/Pages/Page_Home.xaml.cs @@ -2436,14 +2436,16 @@ public void Launch_Northstar_() public bool Check_Process_Running(string ProcessName) { Process[] pname = Process.GetProcessesByName(ProcessName); - if (pname.Length == 0) - { - return false; - } - else + if (pname.Length != 0) { + GC.Collect(); return true; } + pname = null; + GC.Collect(); + return false; + + } @@ -4089,39 +4091,39 @@ private void Browse_Titanfall_Install_Click(object sender, RoutedEventArgs e) private void EA_ORGIGIN_Client_Card_Loaded(object sender, RoutedEventArgs e) { - if (Properties.Settings.Default.EA_APP_SUPPORT == true) - { - EA_ORGIGIN_Client_Card.Content = VTOL.Resources.Languages.Language.Page_Home_Page_Home_EAClientRunning; - BitmapImage bitmapx = new BitmapImage(); + //if (Properties.Settings.Default.EA_APP_SUPPORT == true) + //{ + // EA_ORGIGIN_Client_Card.Content = VTOL.Resources.Languages.Language.Page_Home_Page_Home_EAClientRunning; + // BitmapImage bitmapx = new BitmapImage(); - bitmapx.BeginInit(); - bitmapx.UriSource = new Uri(@"pack://application:,,,/Resources/Icons/EA.ico"); - bitmapx.EndInit(); - CLIENT_CARD_IMAGE.Source = bitmapx; + // bitmapx.BeginInit(); + // bitmapx.UriSource = new Uri(@"pack://application:,,,/Resources/Icons/EA.ico"); + // bitmapx.EndInit(); + // CLIENT_CARD_IMAGE.Source = bitmapx; - } - else - { - BitmapImage bitmapy = new BitmapImage(); + //} + //else + //{ + // BitmapImage bitmapy = new BitmapImage(); - bitmapy.BeginInit(); - bitmapy.UriSource = new Uri(@"pack://application:,,,/Resources/Icons/Origin.ico"); - bitmapy.EndInit(); - CLIENT_CARD_IMAGE.Source = bitmapy; + // bitmapy.BeginInit(); + // bitmapy.UriSource = new Uri(@"pack://application:,,,/Resources/Icons/Origin.ico"); + // bitmapy.EndInit(); + // CLIENT_CARD_IMAGE.Source = bitmapy; - EA_ORGIGIN_Client_Card.Content = VTOL.Resources.Languages.Language.Page_Home_OriginClientRunning; + // EA_ORGIGIN_Client_Card.Content = VTOL.Resources.Languages.Language.Page_Home_OriginClientRunning; - } + //} - BackgroundWorker worker_o = new BackgroundWorker(); - worker_o.DoWork += (sender, e) => - { - Check_EA_status(); - }; + //BackgroundWorker worker_o = new BackgroundWorker(); + //worker_o.DoWork += (sender, e) => + //{ + // Check_EA_status(); + //}; - worker_o.RunWorkerAsync(); + //worker_o.RunWorkerAsync(); } private void Exit_BTN_Click(object sender, RoutedEventArgs e) diff --git a/VTOL_2.0.0/Pages/Page_Mods.xaml.cs b/VTOL_2.0.0/Pages/Page_Mods.xaml.cs index 82a5113..b1ab443 100644 --- a/VTOL_2.0.0/Pages/Page_Mods.xaml.cs +++ b/VTOL_2.0.0/Pages/Page_Mods.xaml.cs @@ -13,6 +13,7 @@ using System.Globalization; using System.IO; using System.Linq; +using System.Text.Json; using System.Text.RegularExpressions; using System.Threading; using System.Threading.Tasks; @@ -459,10 +460,11 @@ public async Task Call_Mods_From_Folder() System.IO.DirectoryInfo[] subDirs = null; subDirs = rootDirs.GetDirectories().Concat(NS_Dirs.GetDirectories()).ToArray(); - - - if (subDirs.Count() > 0) + + + + if (subDirs.Count() > 0) { string Json_Path = FindFirstFile(User_Settings_Vars.NorthstarInstallLocation + @"R2Northstar\", "enabledmods.json"); diff --git a/VTOL_2.0.0/Pages/Page_Thunderstore.xaml.cs b/VTOL_2.0.0/Pages/Page_Thunderstore.xaml.cs index a6cd26a..29cdc09 100644 --- a/VTOL_2.0.0/Pages/Page_Thunderstore.xaml.cs +++ b/VTOL_2.0.0/Pages/Page_Thunderstore.xaml.cs @@ -18,6 +18,7 @@ using System.Runtime.ExceptionServices; using System.Security.Policy; using System.Text; +using System.Text.Json; using System.Text.RegularExpressions; using System.Threading; using System.Threading.Tasks; @@ -32,6 +33,7 @@ using System.Windows.Threading; using System.Xml.Linq; using Threading; +using VTOL.Titanfall2_Requisite.WeaponData.Default.AntiTitan; using Windows.Foundation.Collections; using static VTOL.MainWindow; using static VTOL.Pages.Page_Mods; @@ -1244,7 +1246,7 @@ static int versionCompare(string v1, string v2) // part of version int vnum1 = 0, vnum2 = 0; - + if(v1 == null || v2 == null) { return 3; } // loop until both string are // processed @@ -1311,10 +1313,42 @@ private void Compare_Mod_To_List(string modname, string Mod_version_current, Has { - + bool Northstar_flagged = false; foreach (var item in list) { - + if (modname.Equals(@"Northstar") && Northstar_flagged == false) + { + if (String.Equals(item.Name.Split(".")[0], modname, StringComparison.OrdinalIgnoreCase)) + { + string version = item.Version; + int result = versionCompare(version, Mod_version_current); + switch (result) + { + case 1: + res = "Re-Install"; + bg = "#FFAD7F1A"; + break; + case -1: + res = "Update"; + bg = "#FF009817"; + + break; + case 0: + res = "Re-Install"; + bg = "#FFAD7F1A"; + + break; + default: + res = "Install"; + bg = "#FF005D42"; + + break; + } + label = res; + bg_color = bg; + Northstar_flagged = true; + } + } if (String.Equals(item.Name, modname, StringComparison.OrdinalIgnoreCase)) { string version = item.Version; @@ -2944,26 +2978,44 @@ async Task Call_Mods_From_Folder_Lite() System.IO.DirectoryInfo[] subDirs = null; subDirs = rootDirs.GetDirectories().Concat(NS_Dirs.GetDirectories()).ToArray(); - + bool read_NS_version = true; foreach (System.IO.DirectoryInfo dirInfo in subDirs) { string[] parts = dirInfo.Name.Split('-'); string name = dirInfo.Name; string author = null; string ver = null; - if (parts.Length > 1) { author = parts[0]; name = parts[1]; ver = parts[2]; } - - Main.Current_Installed_Mods.Add(new GENERAL_MOD { Name = name, Version = ver, Author= author }); + if (name.Contains("Northstar.") && dirInfo.Parent.Name.Equals(@"mods") && read_NS_version == true) + { + parts = null; + parts = dirInfo.Name.Split('.'); + author = parts[0]; + name = dirInfo.Name; + string json = File.ReadAllText(dirInfo.FullName + @"\mod.json"); + // Parse the JSON + dynamic data = JsonConvert.DeserializeObject(json); + + // Access the value + ver = data["Version"]; + if (ver != null) { read_NS_version = false; } + + } + + + + + Main.Current_Installed_Mods.Add(new GENERAL_MOD { Name = name, Version = ver, Author = author }); + GC.Collect(); + } Main.loaded_mods = true; - }