Skip to content

Commit

Permalink
recovered from covid :D
Browse files Browse the repository at this point in the history
  • Loading branch information
BigSpice committed Nov 17, 2023
1 parent cc39858 commit 1ea1791
Show file tree
Hide file tree
Showing 19 changed files with 42 additions and 64 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.
64 changes: 1 addition & 63 deletions VTOL_2.0.0/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,75 +7,13 @@ namespace VTOL
/// </summary>
public partial class App : Application
{
const string UriScheme = "ror2mm";
const string FriendlyName = " Thunderstore Mod Manager Protocol";
public static void RegisterUriScheme()
{


using (var key = Registry.CurrentUser.CreateSubKey("SOFTWARE\\Classes\\" + UriScheme))
{
// Replace typeof(App) by the class that contains the Main method or any class located in the project that produces the exe.
// or replace typeof(App).Assembly.Location by anything that gives the full path to the exe
string applicationLocation = System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName;
key.SetValue("", "URL:" + FriendlyName);
key.SetValue("URL Protocol", "");

using (var defaultIcon = key.CreateSubKey(@"DefaultIcon\"))
{
defaultIcon.SetValue("", applicationLocation + @"\Resources\Icons\Main_UI\Northstar-512.ico" + ",1");
}
using (var Fire = key.CreateSubKey(@"shell\open"))
{
Fire.SetValue("FriendlyAppName", "VTOL");

}
using (var commandKey = key.CreateSubKey(@"shell\open\command"))
{
commandKey.SetValue("", "\"" + applicationLocation + "\" \"%1\"");
}
}
}

private async void Application_Startup(object sender, StartupEventArgs e)
{




//SplashScreen splashScreen = new SplashScreen(@"\Pages\Splash.jpg");

//splashScreen.Show(true, true);

// Auto-close: NO, On top: YES
// var splashScreen = new Splash_();
// splashScreen.Show();

// // Async load the main window
// // var mainWindow = new MainWindow();
// await Task.Delay(3000); // Simulate loading time
// // mainWindow.Show();

// // Fade out the splash screen
// // var animation = new DoubleAnimation(1, 0, new Duration(TimeSpan.FromSeconds(1)));
// // splashScreen.BeginAnimation(OpacityProperty, animation);
// // animation.Completed += (s, a) => splashScreen.Close();
// //RegisterUriScheme();
// splashScreen.Close();
//if (args.Length > 0)
//{
// if (Uri.TryCreate(args[0], UriKind.Absolute, out var uri) &&
// string.Equals(uri.Scheme, UriScheme, StringComparison.OrdinalIgnoreCase))
// {
// Console.WriteLine(args.ToString());
// }
//}
//for (int i = 0; i != e.Args.Length; ++i)
//{

// Console.WriteLine("Ahh i cant see the args " + e.Args);

//}

}
}
}
12 changes: 12 additions & 0 deletions VTOL_2.0.0/Pages/SplashWindow.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<Window x:Class="VTOL.Pages.SplashWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:VTOL.Pages"
mc:Ignorable="d"
Title="SplashWindow" Height="450" Width="800">
<Grid>

</Grid>
</Window>
27 changes: 27 additions & 0 deletions VTOL_2.0.0/Pages/SplashWindow.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace VTOL.Pages
{
/// <summary>
/// Interaction logic for SplashWindow.xaml
/// </summary>
public partial class SplashWindow : Window
{
public SplashWindow()
{
InitializeComponent();
}
}
}
3 changes: 2 additions & 1 deletion VTOL_2.0.0/VTOL.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0-windows10.0.17763.0</TargetFramework>
<Nullable>enable</Nullable>
<UseWPF>true</UseWPF>
Expand Down Expand Up @@ -278,6 +278,7 @@
<None Remove="Resources\Backgrounds\jack.jpg" />
<None Remove="Resources\Backgrounds\profiles_bg.png" />
<None Remove="Resources\Backgrounds\Skin_How_To_BG.png" />
<None Remove="Resources\Backgrounds\Splash.jpg" />
<None Remove="Resources\Backgrounds\star_shower.png" />
<None Remove="Resources\Backgrounds\TF2_Achievement_BT_Prime.png" />
<None Remove="Resources\Backgrounds\TF2_TheFoldWeapon_Loadscreen_1.png" />
Expand Down

0 comments on commit 1ea1791

Please sign in to comment.