Skip to content

Commit

Permalink
AHHHHHHHHHHHHHH
Browse files Browse the repository at this point in the history
  • Loading branch information
BigSpice committed Jul 2, 2023
1 parent d514c1e commit 8e16e72
Show file tree
Hide file tree
Showing 22 changed files with 1,426 additions and 741 deletions.
Binary file not shown.
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.
Empty file.
Binary file modified VTOL_2.0.0/.vs/VTOL/v17/.futdcache.v1
Binary file not shown.
Binary file added 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.
5 changes: 3 additions & 2 deletions VTOL_2.0.0/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,10 @@
<Grid>
<Border
x:Name="mask"
Background="#FF171717"
Background="{ui:ThemeResource}"
CornerRadius="8"
/>
<!--="#FF171717"-->

<!--<ui:Breadcrumb
Margin="10,10,0,0"
Expand Down Expand Up @@ -281,7 +282,7 @@
Grid.Column="0"
Margin="6,40,6,0"
Frame="{Binding ElementName=RootFrame}"
SelectedPageIndex="0" Navigated="RootNavigation_Navigated" Precache="False" TransitionDuration="420" Orientation="Vertical" LostFocus="RootNavigation_LostFocus" AllowDrop="False" TransitionType="FadeIn" PreviewMouseDown="RootNavigation_PreviewMouseDown" TargetUpdated="RootNavigation_TargetUpdated" SourceUpdated="RootNavigation_SourceUpdated"
SelectedPageIndex="0" Navigated="RootNavigation_Navigated" Precache="False" TransitionDuration="420" Orientation="Vertical" LostFocus="RootNavigation_LostFocus" AllowDrop="False" TransitionType="FadeIn" PreviewMouseDown="RootNavigation_PreviewMouseDown" TargetUpdated="RootNavigation_TargetUpdated" SourceUpdated="RootNavigation_SourceUpdated" Foreground="#FFF10000"
>
<ui:NavigationCompact.Items>
<ui:NavigationItem x:Name="Home"
Expand Down
12 changes: 11 additions & 1 deletion VTOL_2.0.0/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,22 @@ public string ProductVersion

}
}
private void UserInterfaceCustomScale(double customScale)
{
// Change scale of window content

ScaleTransform dpiTransform = new ScaleTransform(1.5,1.5);

this.LayoutTransform = dpiTransform;

}
public MainWindow()
{
InitializeComponent();

try
{

NotificationManager = new NotificationManager();
minimize_to_tray = Properties.Settings.Default.Minimize_to_Tray;
Profile_TAG.Content = Properties.Settings.Default.Profile_Name;
Expand Down Expand Up @@ -299,7 +308,8 @@ public MainWindow()
Admin_Label.Visibility = Visibility.Hidden;

}

//double dpiFactor = System.Windows.PresentationSource.FromVisual(this).CompositionTarget.TransformToDevice.M11;
UserInterfaceCustomScale(1.5);

}

Expand Down
74 changes: 71 additions & 3 deletions VTOL_2.0.0/Pages/Page_Mods.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
<Setter Property="RenderOptions.BitmapScalingMode" Value="HighQuality" />
</Style>



<ControlTemplate x:Key="ButtonControlTemplate1" TargetType="{x:Type Button}">
<Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True" CornerRadius="20">
<ContentPresenter x:Name="contentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
Expand Down Expand Up @@ -190,19 +192,82 @@


</ListBox>


<ui:Snackbar x:Name="Snack" Grid.ColumnSpan="3" Margin="24,0,24,24"/>

<Label Content="{x:Static properties:Language.Page_Mods_ListedHereAreTheModsThatAreCurrentlyInstalled}" Margin="65,0,0,573" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" UseLayoutRounding="True" Padding="0,0,0,0" Height="16" VerticalAlignment="Bottom" HorizontalAlignment="Left" Width="281" Grid.ColumnSpan="2"/>
<Label Content="{x:Static properties:Language.Page_Mods_MODS}" Margin="65,0,342,594" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" UseLayoutRounding="True" Padding="0,0,0,0" Background="{x:Null}" Foreground="White" FontSize="22" FontWeight="Bold" Height="28" VerticalAlignment="Bottom"/>
<Label x:Name="Filter_Label" Content="{x:Static properties:Language.Page_Mods_Filter}" Margin="146,99,0,0" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" UseLayoutRounding="False" Padding="0,0,0,0" Grid.Column="1" FontSize="14" MinHeight="19" SnapsToDevicePixels="False" VerticalAlignment="Top" HorizontalAlignment="Left" Width="47"/>
<Label x:Name="Mod_Count_Label" Content ="Mod Count: 0" Margin="65,605,0,0" Height="16" VerticalAlignment="Top" HorizontalAlignment="Left" Width="495" Padding="0,0,0,0" Foreground="#52FFFFFF" HorizontalContentAlignment="Left" VerticalContentAlignment="Center"/>
<Label Content ="{x:Static properties:Language.Page_Mods_RightClickForContextMenu}" Margin="0,605,5,0" Height="16" VerticalAlignment="Top" HorizontalAlignment="Right" Width="368" Padding="0,0,0,0" Grid.Column="1" HorizontalContentAlignment="Right" Foreground="#52FFFFFF" VerticalContentAlignment="Center"/>

<Border x:Name="Options_Panel_Mod" Background="#B2292929" Visibility="Collapsed" Grid.ColumnSpan="3">
<Grid>
<Border x:Name="MOD_INFO_PANEL" Visibility="Visible" Background="#FF191919" CornerRadius="7,7,7,7" HorizontalAlignment="Center" Width="560" Height="510" VerticalAlignment="Center">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="279*"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<ui:Button x:Name="Exit_BTN_ADD_Prfl" Icon="Dismiss24" Height="26" Margin="523,10,0,0" VerticalAlignment="Top" BorderBrush="{x:Null}" Padding="0,0,0,0" ToolTip="Exit" Background="#FF7B0000" ClickMode="Press" Width="25" Click="EXIT" RenderTransformOrigin="0.5,0.5" >
<ui:Button.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX="1.2" ScaleY="1.2"/>
<SkewTransform/>
<RotateTransform/>
<TranslateTransform/>
</TransformGroup>
</ui:Button.RenderTransform>
</ui:Button>
<Border Margin="48,159,45,211" CornerRadius="3" Background="#FF252525">
<TextBlock
TextWrapping="Wrap" x:Name="Description_Box" Foreground="White" Padding="5,5,5,0" FontSize="13" IsManipulationEnabled="True"/>


</Border>


<TreeView x:Name="Dependency_Tree" Margin="48,336,45,65" Background="#FF252525" FontSize="13" Padding="-2,0,0,0">

</TreeView>
<Label Content="{x:Static properties:Language.MODINFO}" Margin="0,13,0,0" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" UseLayoutRounding="True" Padding="0,0,0,0" Background="{x:Null}" Foreground="White" FontSize="16" FontWeight="Bold" Height="23" VerticalAlignment="Top" HorizontalAlignment="Center" Width="240"/>

<Label x:Name="INFO_VERSION_SET" Content="v1.1.2" Margin="284,0,0,404" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Right" UseLayoutRounding="True" Padding="0,0,0,0" Height="23" VerticalAlignment="Bottom" HorizontalAlignment="Left" Width="229" FontSize="14"/>
<Label x:Name="INFO_VERSION_MOD_SET" Content="84" Margin="284,0,0,382" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Right" UseLayoutRounding="True" Padding="0,0,0,0" Height="22" VerticalAlignment="Bottom" HorizontalAlignment="Left" Width="229" FontSize="14"/>
<Label x:Name="INFO_MOD_SIZE_SET" Content="5GB" Margin="284,0,0,362" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Right" UseLayoutRounding="True" Padding="0,0,0,0" Height="20" VerticalAlignment="Bottom" HorizontalAlignment="Left" Width="229" FontSize="14"/>
<Label Content="{x:Static properties:Language.PATH}" Margin="48,0,0,404" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" UseLayoutRounding="True" Padding="0,0,0,0" Height="23" VerticalAlignment="Bottom" HorizontalAlignment="Left" Width="231" FontSize="14"/>
<Label Content="{x:Static properties:Language.VERSION}" Margin="48,0,0,382" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" UseLayoutRounding="True" Padding="0,0,0,0" Height="22" VerticalAlignment="Bottom" HorizontalAlignment="Left" Width="231" FontSize="14"/>
<Label x:Name="INFO_MODSIZE_SET" Content="{x:Static properties:Language.MODSIZEONDISK}" Margin="48,0,0,362" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" UseLayoutRounding="True" Padding="0,0,0,0" Height="20" VerticalAlignment="Bottom" HorizontalAlignment="Left" Width="231" FontSize="14"/>
<Separator HorizontalAlignment="Center" VerticalAlignment="Top" Height="118" Background="#4CFFFFFF" BorderBrush="#4CFFFFFF" Margin="0,30,0,0" Foreground="{x:Null}" MinHeight="45" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Padding="0,0,1,0" RenderTransformOrigin="0.5,0.5" Width="4">
<Separator.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX="-0.55"/>
<SkewTransform/>
<RotateTransform/>
<TranslateTransform/>
</TransformGroup>
</Separator.RenderTransform>
</Separator>
<Label x:Name="INFO_NAME_SET" Content="NAME" Margin="48,0,0,427" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" UseLayoutRounding="True" Padding="0,0,0,0" Height="23" VerticalAlignment="Bottom" HorizontalAlignment="Left" Width="237" FontSize="14"/>
<Label x:Name="NAME" Content="MODNAME" Margin="284,0,0,427" VerticalContentAlignment="Stretch" UseLayoutRounding="True" Padding="0,0,0,0" Height="23" VerticalAlignment="Bottom" HorizontalAlignment="Left" Width="229" HorizontalContentAlignment="Right" FontSize="14"/>


<Label Content="DESCRIPTION" Margin="48,0,0,194" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" UseLayoutRounding="True" Padding="0,0,0,0" Height="16" VerticalAlignment="Bottom" HorizontalAlignment="Left" Width="231"/>
<Label Content="DEPENDENCY TREE" Margin="48,0,0,47" VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" UseLayoutRounding="True" Padding="0,0,0,0" Height="16" VerticalAlignment="Bottom" HorizontalAlignment="Left" Width="231"/>

</Grid>
</Border>
</Grid>
</Border>
<ui:Dialog x:Name="DialogF" Grid.ColumnSpan="3" Grid.RowSpan="3" DialogHeight="250" Foreground="White" FontStretch="SemiCondensed" FontFamily="Segoe UI Semibold" ButtonRightClick="DialogF_ButtonRightClick" ButtonLeftClick="DialogF_ButtonLeftClick" Drop="Mod_List_Box_Drop" PreviewDragEnter="Mod_List_Box_PreviewDragEnter" PreviewDragLeave="Mod_List_Box_PreviewDragLeave" AllowDrop="True" Visibility="Visible"/>

<ui:Dialog x:Name="Dialog" Grid.ColumnSpan="3" Grid.RowSpan="3" DialogHeight="250" Foreground="White" FontStretch="SemiCondensed" FontFamily="Segoe UI Semibold" ButtonRightClick="Dialog_ButtonRightClick" Visibility="Visible">
</ui:Dialog>







<Border x:Name="Drag_Drop_Overlay_Mods" Grid.ColumnSpan="3" Background="#99000000" Visibility="Hidden" HorizontalAlignment="Right" Width="1148" Drop="Mod_List_Box_Drop" PreviewDragOver="Drag_Drop_Overlay_Mods_PreviewDragOver" AllowDrop="True">
<ui:SymbolIcon Height="18" Width="16" Symbol="ArrowDownload48" RenderTransformOrigin="0.5,0.5" >
<ui:SymbolIcon.RenderTransform>
Expand All @@ -216,5 +281,8 @@
</ui:SymbolIcon>

</Border>

<ui:Snackbar x:Name="Snack" Grid.ColumnSpan="3" Margin="24,0,24,24"/>

</Grid>
</Page>
87 changes: 77 additions & 10 deletions VTOL_2.0.0/Pages/Page_Mods.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
using Wpf.Ui.Common.Interfaces;
using Path = System.IO.Path;
using VTOL;
using System.Xml.Linq;
using ABI.Windows.UI;
using HandyControl.Tools.Extension;

namespace VTOL.Pages
{
Expand Down Expand Up @@ -1944,9 +1947,14 @@ void Open_Mod_Info(string Mod_name)

if (Directory.Exists(FolderDir))
{
Dependency_Tree.Items.Clear();

List<string> Dependencies = new List<string> { };
string Dependencies_String = "";


string mod_Json = FindFirstFile(FolderDir, "mod.json");
string manifest_json = FindFirstFile(FolderDir, "manifest.json");


if (mod_Json != null && File.Exists(mod_Json))
Expand All @@ -1958,19 +1966,62 @@ void Open_Mod_Info(string Mod_name)
string Description = "Description: " + myJObject.Description;
long size = GetDirectorySize(FolderDir);
string size_str = "Mod Size on Disk: " + SizeSuffix(size);
string Content = Description + Environment.NewLine + version + Environment.NewLine + size_str.Replace(",", ".");
NAME.Content = myJObject.Name;
INFO_MOD_SIZE_SET.Content = SizeSuffix(size);
string cleaned = FolderDir.ToString().Substring(FolderDir.ToString().LastIndexOf("Titanfall2"));
cleaned = cleaned.ToString().Substring(0, cleaned.ToString().LastIndexOf("mods") + 4);
INFO_VERSION_MOD_SET.Content = cleaned;
INFO_VERSION_SET.Content = myJObject.Version;
Description_Box.Text = myJObject.Description;
if (manifest_json != null && File.Exists(manifest_json))
{
var mymanifestString = File.ReadAllText(manifest_json);
dynamic myMObject = JObject.Parse(mymanifestString);

for (var x = 0; x < myMObject.dependencies.Count; x++)
{
if (myMObject.dependencies[x].ToString().Contains("northstar-Northstar") || myMObject.dependencies[x].ToString().Contains("ebkr-r2modman-"))
{

continue;
}
else
{

Dependency_Tree.Items.Add(VTOL.Resources.Languages.Language.Requires + myMObject.dependencies[x].ToString());

}

}




}
else
{

Snackbar.Title = "WARNING";
Snackbar.Message = "The manifest File Cannot Be accessed or Found!";
Snackbar.Appearance = Wpf.Ui.Common.ControlAppearance.Info;
Snackbar.Show();
}


string Content = Description + Environment.NewLine + version + Environment.NewLine + size_str.Replace(",",".");
DialogF.ButtonLeftName = "Ok";
DialogF.ButtonLeftAppearance = Wpf.Ui.Common.ControlAppearance.Success;
DialogF.ButtonRightName = VTOL.Resources.Languages.Language.Page_Mods_Open_Mod_Info_OpenFolder;

DialogF.ButtonRightAppearance = Wpf.Ui.Common.ControlAppearance.Secondary;
DialogF.Title = name;
DialogF.Message = Content;
DialogF.Tag = FolderDir;
Options_Panel_Mod.Visibility = Visibility.Visible;

DialogF.Show();



}
else
{

Snackbar.Title = "ERROR";
Snackbar.Appearance = Wpf.Ui.Common.ControlAppearance.Danger;
Snackbar.Message = "The Mod Information File Cannot Be accessed or Found!";
Snackbar.Show();
}


Expand Down Expand Up @@ -2719,5 +2770,21 @@ private void CloseButton_Click(object sender, RoutedEventArgs e)
{

}

private void Exit_BTN_ADD_Prfl_Click_1(object sender, RoutedEventArgs e)
{

}

private void EXIT(object sender, RoutedEventArgs e)
{
Options_Panel_Mod.Visibility = Visibility.Collapsed;
}

private void Options_Panel_Mod_MouseDown(object sender, MouseButtonEventArgs e)
{
Options_Panel_Mod.Visibility = Visibility.Collapsed;

}
}
}
Loading

0 comments on commit 8e16e72

Please sign in to comment.