Skip to content

Commit

Permalink
bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
BigSpice committed Jan 23, 2024
1 parent 18f98bb commit 9d75006
Show file tree
Hide file tree
Showing 20 changed files with 52 additions and 46 deletions.
Binary file modified VTOL_2.0.0/.vs/ProjectEvaluation/vtol.metadata.v7.bin
Binary file not shown.
Binary file modified VTOL_2.0.0/.vs/ProjectEvaluation/vtol.projects.v7.bin
Binary file not shown.
Binary file modified VTOL_2.0.0/.vs/VTOL/DesignTimeBuild/.dtbcache.v2
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified VTOL_2.0.0/.vs/VTOL/v17/.futdcache.v2
Binary file not shown.
Binary file modified VTOL_2.0.0/.vs/VTOL/v17/fileList.bin
Binary file not shown.
2 changes: 1 addition & 1 deletion VTOL_2.0.0/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public partial class MainWindow : Window
public bool Is_Focused = true;
// public List<string> Current_Installed_Mods = new List<string>();
public HashSet<GENERAL_MOD> Current_Installed_Mods = new HashSet<GENERAL_MOD>();

public bool Page_reset_ = false;
bool failed_folder = false;
public bool minimize_to_tray = false;
public DownloadQueue _downloadQueue;
Expand Down
3 changes: 2 additions & 1 deletion VTOL_2.0.0/Pages/Page_Mods.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,6 @@ public async Task Call_Mods_From_Folder()
ver = parts[2];
}
Main.loaded_mods = true;
Main.Current_Installed_Mods.Add(new GENERAL_MOD { Name = name, Version = ver, Author = author });
});
}
Expand All @@ -581,6 +580,8 @@ public async Task Call_Mods_From_Folder()

}
}
Main.loaded_mods = true;


}

Expand Down
16 changes: 13 additions & 3 deletions VTOL_2.0.0/Pages/Page_Settings.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using Serilog;

using Json.Net;
using Serilog;
using System;
using System.ComponentModel;
using System.Diagnostics;
Expand Down Expand Up @@ -74,9 +76,16 @@ public class PropertyGridDemoModel

public string Master_Server_Url { get; set; }

[Category("Themes")]

public Theme Theme { get; set; }


}
public enum Theme
{
Home_Green,
Final_Grey,
Redstone_Red
}
public Page_Settings()
{
Expand Down Expand Up @@ -141,7 +150,8 @@ public Page_Settings()
Enable_EA_APP_Usage = Properties.Settings.Default.EA_APP_SUPPORT,
Author = User_Settings_Vars.Author,
Auto_Update_Northstar = User_Settings_Vars.Auto_Update_Northstar,
Minimize_To_Tray = Properties.Settings.Default.Minimize_to_Tray
Minimize_To_Tray = Properties.Settings.Default.Minimize_to_Tray,

};
Settings.SelectedObject = Settings_;
}
Expand Down
7 changes: 3 additions & 4 deletions VTOL_2.0.0/Pages/Page_Thunderstore.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,10 @@
<ui:Button x:Name="padd" Content="" VerticalAlignment="Top" Height="35" Padding="0,0,0,0" Icon="ArrowSortDownLines20" BorderBrush="{x:Null}" Width="40" HorizontalAlignment="Right" Margin="0,135,278.3,0" Click="padd_Click" Background="#07FFFFFF" ToolTip="{x:Static properties:Language.Page_Mods_ReverseFilterOrder}" MouseOverBackground="#4CFFFFFF"/>

<hc:CheckComboBox x:Name="Search_Filters" ItemsSource="{Binding Final_List}" Height="28" VerticalAlignment="Top" SelectedIndex="-1" ShowClearButton="True" Cursor="Hand" Padding="7,0,7,5" BorderThickness="0,0,0,1" BorderBrush="#FF999999" Background="#00000000" SelectionChanged="Search_Filters_SelectionChanged" hc:InfoElement.Placeholder="Filters" ToolTip="Filter Thunderstore List" ScrollViewer.CanContentScroll="False" Margin="0,138,35,0" HorizontalAlignment="Right" Width="243" VerticalContentAlignment="Bottom" HorizontalContentAlignment="Center" />
<hc:Badge x:Name="Mod_Updates_Available" Content="Mod Updates Available" Margin="0,632,37,0" VerticalAlignment="Top" BadgeMargin="0,0,0,0" Height="19" Background="#FF45EC57" BorderBrush="#FF45EC57" Status="Processing" HorizontalContentAlignment="Right" VerticalContentAlignment="Center" Foreground="#FF8A8A8A" FontFamily="Nirmala UI" HorizontalAlignment="Right" Width="139"/>
<Label x:Name="Store_Mod_Label" Content="Store Mod Count:" Foreground="#FF8A8A8A" FontFamily="Nirmala UI" HorizontalAlignment="Right" Width="139" Margin="0,632,944,0" Padding="0,0,0,0" MinHeight="19" Height="19" VerticalAlignment="Top"/>
<Label x:Name="Couunter_Mods" Content="########" Foreground="#FF8A8A8A" FontFamily="Nirmala UI" HorizontalAlignment="Right" Width="116" Margin="0,632,870,0" Padding="0,0,0,0" MinHeight="19" Height="19" VerticalAlignment="Top"/>
<hc:Badge x:Name="Mod_Updates_Available" Content="Mod Updates Available" Margin="0,632,37,0" VerticalAlignment="Top" BadgeMargin="0,0,0,0" Height="19" Background="#FF45EC57" BorderBrush="#FF45EC57" Status="Processing" HorizontalContentAlignment="Right" VerticalContentAlignment="Center" Foreground="#FF8A8A8A" FontFamily="Nirmala UI" HorizontalAlignment="Right" Width="139" Visibility="Hidden"/>
<Label x:Name="Store_Mod_Label" Content="Store Mod Count:" Foreground="#FF8A8A8A" FontFamily="Nirmala UI" HorizontalAlignment="Right" Width="139" Margin="0,632,975,0" Padding="0,0,0,0" MinHeight="19" Height="19" VerticalAlignment="Top" VerticalContentAlignment="Center"/>
<Label x:Name="Couunter_Mods" Content="########" Foreground="#FF8A8A8A" FontFamily="Nirmala UI" HorizontalAlignment="Right" Width="116" Margin="0,632,903,0" Padding="0,0,0,0" MinHeight="19" Height="19" VerticalAlignment="Top" VerticalContentAlignment="Center"/>

(TODO) fix placement
<Label x:Name="Category_Label" Margin="0,142,193,0" Background="{x:Null}" Foreground="#34FFFFFF" Content="{x:Static properties:Language.Page_Thunderstore_Category}" VerticalContentAlignment="Center" VerticalAlignment="Top" FontSize="14" IsHitTestVisible="False" Height="20" Padding="0,0,0,0" IsEnabled="False" HorizontalAlignment="Right" Width="75" HorizontalContentAlignment="Left"/>
<Label x:Name="Sort_Label" Margin="0,144,460,0" Background="{x:Null}" Foreground="#34FFFFFF" Content="{x:Static properties:Language.Page_Thunderstore_Sort}" VerticalContentAlignment="Center" VerticalAlignment="Top" FontSize="14" IsHitTestVisible="False" Height="20" Padding="0,0,0,0" IsEnabled="False" HorizontalAlignment="Right" Width="75" HorizontalContentAlignment="Left"/>

Expand Down
70 changes: 33 additions & 37 deletions VTOL_2.0.0/Pages/Page_Thunderstore.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,6 @@ public partial class Page_Thunderstore : Page
public HashSet<string> Fave_Mods = new HashSet<string>();
private int Mod_Update_Counter = 0;
private List<Action_Card> Action_Center = new List<Action_Card>();
private ObservableCollection<Grid_> thunderstoreItems = new ObservableCollection<Grid_>();

public Page_Thunderstore()
{
Expand Down Expand Up @@ -687,15 +686,17 @@ public Page_Thunderstore()
{
DispatchIfNecessary(async () =>
{
if(_updater != null)
{
Couunter_Mods.Content = _updater.Thunderstore.Count().ToString();
Couunter_Mods.Content = _updater.Thunderstore.Count().ToString();
}
//(TODO)fix placement
Loading_Ring.Visibility = Visibility.Hidden;
});
page_loaded = true;
Main.Page_reset_ = true;
};
worker.RunWorkerAsync();

Expand Down Expand Up @@ -1136,15 +1137,7 @@ private void Search_Bar_Suggest_Mods_LostFocus(object sender, RoutedEventArgs e)
});
}
string old_text="";
async Task clear_box()
{

DispatchIfNecessary(async () =>
{
Search_Bar_Suggest_Mods.Text = "";
});
}

private void Grid_MouseLeave(object sender, MouseEventArgs e)
{
DispatchIfNecessary(async () =>
Expand Down Expand Up @@ -1230,7 +1223,7 @@ public async Task Call_Ts_Mods()


init = true;

GC.Collect();



Expand Down Expand Up @@ -1740,7 +1733,10 @@ public void orderlistitems()
List = List.Where(item => item.is_Favourite_.ToString().Equals("1")).OrderByDescending(ob => ob.Name).ToList();

break;
case "...":
Main.Page_reset_ = true;

break;
default:
List = itemsList;
break;
Expand Down Expand Up @@ -1796,7 +1792,10 @@ public void orderlistitems()
List = List.Where(item => item.is_Favourite_.ToString().Equals("1")).OrderBy(ob => ob.Name).ToList();

break;
case "...":
Main.Page_reset_ = true;

break;
default:
List = itemsList;
break;
Expand Down Expand Up @@ -2617,7 +2616,6 @@ public void DispatchIfNecessary(Action action)
}
void Dependency_Download(string Dependencies_To_Find_And_Download, ProgressBar Progress_Bar = null)
{
Loaded_Async_Handler = true;
try
{

Expand Down Expand Up @@ -2650,16 +2648,7 @@ void Dependency_Download(string Dependencies_To_Find_And_Download, ProgressBar P
{
foreach (var y in Links)
{
//var item = new DownloadQueueItem
//{
// Name = name,
// DownloadUrl = Button.Tag.ToString(),
// DestinationPath = User_Settings_Vars.NorthstarInstallLocation + @"NS_Downloaded_Mods",
// Extract = tags.Contains("DDS"),
// IsNorthstarRelease = Button.Tag.ToString().Contains("Northstar Release Candidate") || Button.Tag.ToString().Contains("NorthstarReleaseCandidate") || (Button.Tag.ToString().Contains("Northstar") && Button.ToolTip.ToString().Count() < 5),
// Progress = Progress_Bar
//};
//_downloadQueue.Enqueue(item);
await Download_Zip_To_Path(y, User_Settings_Vars.NorthstarInstallLocation + @"NS_Downloaded_Mods", Progress_Bar);
Thread.Sleep(2500);
}
Expand All @@ -2678,8 +2667,6 @@ void Dependency_Download(string Dependencies_To_Find_And_Download, ProgressBar P
Dialog.Hide();

}
bool Loaded_Async_Handler = false;
string pack = null;


private void CardAction_Click(object sender, RoutedEventArgs e)
Expand Down Expand Up @@ -2974,8 +2961,8 @@ async Task Call_Mods_From_Folder_Lite()


Main.Current_Installed_Mods.Add(new GENERAL_MOD { Name = name, Version = ver, Author= author });
Main.loaded_mods = true;
}
Main.loaded_mods = true;

}

Expand Down Expand Up @@ -4251,10 +4238,11 @@ private void Search_Bar_Suggest_Mods_TextChanged(object sender, TextChangedEvent
DispatchIfNecessary(async () =>
{
if (init == true)
if (init == true)
{
if (_updater.Thunderstore != null)
if (_updater.Thunderstore != null)
{
if (Search_Bar_Suggest_Mods.Text.Trim() != "" && Search_Bar_Suggest_Mods.Text != null && Search_Bar_Suggest_Mods.Text.Length != 0 && Search_Bar_Suggest_Mods.Text.Trim() != "#")
{
Expand Down Expand Up @@ -4314,6 +4302,7 @@ private void Search_Bar_Suggest_Mods_TextChanged(object sender, TextChangedEvent
private void Grid_Unloaded(object sender, RoutedEventArgs e)
{
TryDeleteDirectory(User_Settings_Vars.NorthstarInstallLocation + @"NS_Downloaded_Mods");

}

private void Dialog_ButtonLeftClick(object sender, RoutedEventArgs e)
Expand Down Expand Up @@ -4377,16 +4366,15 @@ private void Search_Filters_SelectionChanged(object sender, SelectionChangedEven
});
}
}
// Call_Ts_Mods();
};
worker.RunWorkerCompleted += (sender, eventArgs) =>
{
//Thunderstore_List.Refresh();
Thunderstore_List.Refresh();
//Trackchange
};
worker.RunWorkerAsync();

Expand Down Expand Up @@ -4607,7 +4595,14 @@ private void Grid_Loaded(object sender, RoutedEventArgs e)
Call_Mods_From_Folder_Lite();
// Call_Ts_Mods();
if (Main.Page_reset_ == true)
{
// Call_Ts_Mods();
}
Expand All @@ -4616,7 +4611,7 @@ private void Grid_Loaded(object sender, RoutedEventArgs e)
};
worker.RunWorkerCompleted += (sender, eventArgs) =>
{
Main.Page_reset_ = false;
// Thunderstore_List.Items.Refresh();
Expand Down Expand Up @@ -4908,9 +4903,10 @@ private void Page_Unloaded(object sender, RoutedEventArgs e)
Main.Progress_Header.IsHitTestVisible = false;
Main.Action_Center_Panel.IsHitTestVisible = false;
Main.Action_Center_Panel.Visibility = Visibility.Collapsed;
Main.Action_Center_Progress.IsChecked = false;
Main.Action_Center_Progress.IsChecked = false;
}
Thunderstore_List.Refresh();
await SaveHSetAsync();
});
}
Expand Down Expand Up @@ -4980,7 +4976,7 @@ private void Reload_BTTN_Click(object sender, RoutedEventArgs e)

private void Thunderstore_List_LayoutUpdated(object sender, EventArgs e)
{
if(Thunderstore_List.Visibility != Visibility.Visible || _updater.Thunderstore == null || Main.loaded_mods == false || page_loaded == false){
if(Thunderstore_List.Visibility != Visibility.Visible || _updater == null && itemsList.Count() ==0 ){
Reload_BTTN.Visibility = Visibility.Visible;
Loading_Ring.Visibility = Visibility.Visible;

Expand Down

0 comments on commit 9d75006

Please sign in to comment.