diff --git a/App.xaml b/App.xaml
new file mode 100644
index 0000000..f96b30b
--- /dev/null
+++ b/App.xaml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/App.xaml.cs b/App.xaml.cs
new file mode 100644
index 0000000..74ad738
--- /dev/null
+++ b/App.xaml.cs
@@ -0,0 +1,35 @@
+using Microsoft.UI.Xaml;
+using Microsoft.UI.Xaml.Controls;
+using System;
+using System.IO;
+using WinUIEx;
+
+// To learn more about WinUI, the WinUI project structure,
+// and more about our project templates, see: http://aka.ms/winui-project-info.
+
+namespace wakka
+{
+ public partial class App : Application
+ {
+ public Window m_window;
+
+ public readonly static Windows.Storage.ApplicationDataContainer LocalSettingsData =
+ Windows.Storage.ApplicationData.Current.LocalSettings;
+
+ public readonly static Windows.Storage.StorageFolder LocalStroageData =
+ Windows.Storage.ApplicationData.Current.LocalFolder;
+
+ public App()
+ {
+ this.InitializeComponent();
+ }
+
+ protected override void OnLaunched(LaunchActivatedEventArgs args)
+ {
+ m_window = new MainWindow();
+ m_window.SetWindowSize(width: 800, height: 600);
+ m_window.CenterOnScreen();
+ m_window.Activate();
+ }
+ }
+}
diff --git a/Assets/LargeTile.scale-100.png b/Assets/LargeTile.scale-100.png
new file mode 100644
index 0000000..97208d0
Binary files /dev/null and b/Assets/LargeTile.scale-100.png differ
diff --git a/Assets/LargeTile.scale-125.png b/Assets/LargeTile.scale-125.png
new file mode 100644
index 0000000..63300e4
Binary files /dev/null and b/Assets/LargeTile.scale-125.png differ
diff --git a/Assets/LargeTile.scale-150.png b/Assets/LargeTile.scale-150.png
new file mode 100644
index 0000000..6372025
Binary files /dev/null and b/Assets/LargeTile.scale-150.png differ
diff --git a/Assets/LargeTile.scale-200.png b/Assets/LargeTile.scale-200.png
new file mode 100644
index 0000000..41796ec
Binary files /dev/null and b/Assets/LargeTile.scale-200.png differ
diff --git a/Assets/LargeTile.scale-400.png b/Assets/LargeTile.scale-400.png
new file mode 100644
index 0000000..a91b118
Binary files /dev/null and b/Assets/LargeTile.scale-400.png differ
diff --git a/Assets/LockScreenLogo.scale-200.png b/Assets/LockScreenLogo.scale-200.png
new file mode 100644
index 0000000..7440f0d
Binary files /dev/null and b/Assets/LockScreenLogo.scale-200.png differ
diff --git a/Assets/SmallTile.scale-100.png b/Assets/SmallTile.scale-100.png
new file mode 100644
index 0000000..af14555
Binary files /dev/null and b/Assets/SmallTile.scale-100.png differ
diff --git a/Assets/SmallTile.scale-125.png b/Assets/SmallTile.scale-125.png
new file mode 100644
index 0000000..794c6d7
Binary files /dev/null and b/Assets/SmallTile.scale-125.png differ
diff --git a/Assets/SmallTile.scale-150.png b/Assets/SmallTile.scale-150.png
new file mode 100644
index 0000000..9631fbe
Binary files /dev/null and b/Assets/SmallTile.scale-150.png differ
diff --git a/Assets/SmallTile.scale-200.png b/Assets/SmallTile.scale-200.png
new file mode 100644
index 0000000..a478516
Binary files /dev/null and b/Assets/SmallTile.scale-200.png differ
diff --git a/Assets/SmallTile.scale-400.png b/Assets/SmallTile.scale-400.png
new file mode 100644
index 0000000..78dc189
Binary files /dev/null and b/Assets/SmallTile.scale-400.png differ
diff --git a/Assets/SplashScreen.scale-100.png b/Assets/SplashScreen.scale-100.png
new file mode 100644
index 0000000..0d9ddfb
Binary files /dev/null and b/Assets/SplashScreen.scale-100.png differ
diff --git a/Assets/SplashScreen.scale-125.png b/Assets/SplashScreen.scale-125.png
new file mode 100644
index 0000000..833ab97
Binary files /dev/null and b/Assets/SplashScreen.scale-125.png differ
diff --git a/Assets/SplashScreen.scale-150.png b/Assets/SplashScreen.scale-150.png
new file mode 100644
index 0000000..4593091
Binary files /dev/null and b/Assets/SplashScreen.scale-150.png differ
diff --git a/Assets/SplashScreen.scale-200.png b/Assets/SplashScreen.scale-200.png
new file mode 100644
index 0000000..216018c
Binary files /dev/null and b/Assets/SplashScreen.scale-200.png differ
diff --git a/Assets/SplashScreen.scale-400.png b/Assets/SplashScreen.scale-400.png
new file mode 100644
index 0000000..f8d5025
Binary files /dev/null and b/Assets/SplashScreen.scale-400.png differ
diff --git a/Assets/Square150x150Logo.scale-100.png b/Assets/Square150x150Logo.scale-100.png
new file mode 100644
index 0000000..9a064ed
Binary files /dev/null and b/Assets/Square150x150Logo.scale-100.png differ
diff --git a/Assets/Square150x150Logo.scale-125.png b/Assets/Square150x150Logo.scale-125.png
new file mode 100644
index 0000000..28f6245
Binary files /dev/null and b/Assets/Square150x150Logo.scale-125.png differ
diff --git a/Assets/Square150x150Logo.scale-150.png b/Assets/Square150x150Logo.scale-150.png
new file mode 100644
index 0000000..ec44d64
Binary files /dev/null and b/Assets/Square150x150Logo.scale-150.png differ
diff --git a/Assets/Square150x150Logo.scale-200.png b/Assets/Square150x150Logo.scale-200.png
new file mode 100644
index 0000000..19ef7f8
Binary files /dev/null and b/Assets/Square150x150Logo.scale-200.png differ
diff --git a/Assets/Square150x150Logo.scale-400.png b/Assets/Square150x150Logo.scale-400.png
new file mode 100644
index 0000000..ffa64ec
Binary files /dev/null and b/Assets/Square150x150Logo.scale-400.png differ
diff --git a/Assets/Square44x44Logo.altform-lightunplated_targetsize-16.png b/Assets/Square44x44Logo.altform-lightunplated_targetsize-16.png
new file mode 100644
index 0000000..7f74489
Binary files /dev/null and b/Assets/Square44x44Logo.altform-lightunplated_targetsize-16.png differ
diff --git a/Assets/Square44x44Logo.altform-lightunplated_targetsize-24.png b/Assets/Square44x44Logo.altform-lightunplated_targetsize-24.png
new file mode 100644
index 0000000..3df7811
Binary files /dev/null and b/Assets/Square44x44Logo.altform-lightunplated_targetsize-24.png differ
diff --git a/Assets/Square44x44Logo.altform-lightunplated_targetsize-256.png b/Assets/Square44x44Logo.altform-lightunplated_targetsize-256.png
new file mode 100644
index 0000000..af12409
Binary files /dev/null and b/Assets/Square44x44Logo.altform-lightunplated_targetsize-256.png differ
diff --git a/Assets/Square44x44Logo.altform-lightunplated_targetsize-32.png b/Assets/Square44x44Logo.altform-lightunplated_targetsize-32.png
new file mode 100644
index 0000000..8cd534b
Binary files /dev/null and b/Assets/Square44x44Logo.altform-lightunplated_targetsize-32.png differ
diff --git a/Assets/Square44x44Logo.altform-lightunplated_targetsize-48.png b/Assets/Square44x44Logo.altform-lightunplated_targetsize-48.png
new file mode 100644
index 0000000..addc7da
Binary files /dev/null and b/Assets/Square44x44Logo.altform-lightunplated_targetsize-48.png differ
diff --git a/Assets/Square44x44Logo.altform-unplated_targetsize-16.png b/Assets/Square44x44Logo.altform-unplated_targetsize-16.png
new file mode 100644
index 0000000..7f74489
Binary files /dev/null and b/Assets/Square44x44Logo.altform-unplated_targetsize-16.png differ
diff --git a/Assets/Square44x44Logo.altform-unplated_targetsize-256.png b/Assets/Square44x44Logo.altform-unplated_targetsize-256.png
new file mode 100644
index 0000000..af12409
Binary files /dev/null and b/Assets/Square44x44Logo.altform-unplated_targetsize-256.png differ
diff --git a/Assets/Square44x44Logo.altform-unplated_targetsize-32.png b/Assets/Square44x44Logo.altform-unplated_targetsize-32.png
new file mode 100644
index 0000000..8cd534b
Binary files /dev/null and b/Assets/Square44x44Logo.altform-unplated_targetsize-32.png differ
diff --git a/Assets/Square44x44Logo.altform-unplated_targetsize-48.png b/Assets/Square44x44Logo.altform-unplated_targetsize-48.png
new file mode 100644
index 0000000..addc7da
Binary files /dev/null and b/Assets/Square44x44Logo.altform-unplated_targetsize-48.png differ
diff --git a/Assets/Square44x44Logo.scale-100.png b/Assets/Square44x44Logo.scale-100.png
new file mode 100644
index 0000000..93a5b44
Binary files /dev/null and b/Assets/Square44x44Logo.scale-100.png differ
diff --git a/Assets/Square44x44Logo.scale-125.png b/Assets/Square44x44Logo.scale-125.png
new file mode 100644
index 0000000..769d53d
Binary files /dev/null and b/Assets/Square44x44Logo.scale-125.png differ
diff --git a/Assets/Square44x44Logo.scale-150.png b/Assets/Square44x44Logo.scale-150.png
new file mode 100644
index 0000000..4b2a419
Binary files /dev/null and b/Assets/Square44x44Logo.scale-150.png differ
diff --git a/Assets/Square44x44Logo.scale-200.png b/Assets/Square44x44Logo.scale-200.png
new file mode 100644
index 0000000..d4229f6
Binary files /dev/null and b/Assets/Square44x44Logo.scale-200.png differ
diff --git a/Assets/Square44x44Logo.scale-400.png b/Assets/Square44x44Logo.scale-400.png
new file mode 100644
index 0000000..16d36c8
Binary files /dev/null and b/Assets/Square44x44Logo.scale-400.png differ
diff --git a/Assets/Square44x44Logo.targetsize-16.png b/Assets/Square44x44Logo.targetsize-16.png
new file mode 100644
index 0000000..8d061e8
Binary files /dev/null and b/Assets/Square44x44Logo.targetsize-16.png differ
diff --git a/Assets/Square44x44Logo.targetsize-24.png b/Assets/Square44x44Logo.targetsize-24.png
new file mode 100644
index 0000000..0e4e729
Binary files /dev/null and b/Assets/Square44x44Logo.targetsize-24.png differ
diff --git a/Assets/Square44x44Logo.targetsize-24_altform-unplated.png b/Assets/Square44x44Logo.targetsize-24_altform-unplated.png
new file mode 100644
index 0000000..3df7811
Binary files /dev/null and b/Assets/Square44x44Logo.targetsize-24_altform-unplated.png differ
diff --git a/Assets/Square44x44Logo.targetsize-256.png b/Assets/Square44x44Logo.targetsize-256.png
new file mode 100644
index 0000000..357b485
Binary files /dev/null and b/Assets/Square44x44Logo.targetsize-256.png differ
diff --git a/Assets/Square44x44Logo.targetsize-32.png b/Assets/Square44x44Logo.targetsize-32.png
new file mode 100644
index 0000000..9b69c6e
Binary files /dev/null and b/Assets/Square44x44Logo.targetsize-32.png differ
diff --git a/Assets/Square44x44Logo.targetsize-48.png b/Assets/Square44x44Logo.targetsize-48.png
new file mode 100644
index 0000000..f5c1ce1
Binary files /dev/null and b/Assets/Square44x44Logo.targetsize-48.png differ
diff --git a/Assets/StoreLogo.backup.png b/Assets/StoreLogo.backup.png
new file mode 100644
index 0000000..a4586f2
Binary files /dev/null and b/Assets/StoreLogo.backup.png differ
diff --git a/Assets/StoreLogo.scale-100.png b/Assets/StoreLogo.scale-100.png
new file mode 100644
index 0000000..9062cff
Binary files /dev/null and b/Assets/StoreLogo.scale-100.png differ
diff --git a/Assets/StoreLogo.scale-125.png b/Assets/StoreLogo.scale-125.png
new file mode 100644
index 0000000..7549b17
Binary files /dev/null and b/Assets/StoreLogo.scale-125.png differ
diff --git a/Assets/StoreLogo.scale-150.png b/Assets/StoreLogo.scale-150.png
new file mode 100644
index 0000000..bdf0481
Binary files /dev/null and b/Assets/StoreLogo.scale-150.png differ
diff --git a/Assets/StoreLogo.scale-200.png b/Assets/StoreLogo.scale-200.png
new file mode 100644
index 0000000..fdb5d9b
Binary files /dev/null and b/Assets/StoreLogo.scale-200.png differ
diff --git a/Assets/StoreLogo.scale-400.png b/Assets/StoreLogo.scale-400.png
new file mode 100644
index 0000000..656977e
Binary files /dev/null and b/Assets/StoreLogo.scale-400.png differ
diff --git a/Assets/Wide310x150Logo.scale-100.png b/Assets/Wide310x150Logo.scale-100.png
new file mode 100644
index 0000000..1ebe38a
Binary files /dev/null and b/Assets/Wide310x150Logo.scale-100.png differ
diff --git a/Assets/Wide310x150Logo.scale-125.png b/Assets/Wide310x150Logo.scale-125.png
new file mode 100644
index 0000000..bcfecdc
Binary files /dev/null and b/Assets/Wide310x150Logo.scale-125.png differ
diff --git a/Assets/Wide310x150Logo.scale-150.png b/Assets/Wide310x150Logo.scale-150.png
new file mode 100644
index 0000000..d06d059
Binary files /dev/null and b/Assets/Wide310x150Logo.scale-150.png differ
diff --git a/Assets/Wide310x150Logo.scale-200.png b/Assets/Wide310x150Logo.scale-200.png
new file mode 100644
index 0000000..0d9ddfb
Binary files /dev/null and b/Assets/Wide310x150Logo.scale-200.png differ
diff --git a/Assets/Wide310x150Logo.scale-400.png b/Assets/Wide310x150Logo.scale-400.png
new file mode 100644
index 0000000..216018c
Binary files /dev/null and b/Assets/Wide310x150Logo.scale-400.png differ
diff --git a/Bink.cs b/Bink.cs
new file mode 100644
index 0000000..27bd611
--- /dev/null
+++ b/Bink.cs
@@ -0,0 +1,44 @@
+using Microsoft.VisualBasic;
+using System;
+using System.Collections.Generic;
+using System.Text.Json;
+using System.Text.Json.Serialization;
+
+namespace wakka
+{
+ public class BinkPost
+ {
+ [JsonPropertyName("user")]
+ public string? User { get; set; }
+ [JsonPropertyName("body")]
+ public string? Body { get; set; }
+ [JsonPropertyName("time")]
+ public long Time { get; set; }
+ public string TimeString { get; set; } = string.Empty;
+ }
+
+ public class Bink
+ {
+ private static SshConnection Ssh { get; set; } = new SshConnection();
+
+ public string RunBinkCommand(string command)
+ {
+ return Ssh.RunCommand($"town bink --{command}");
+ }
+
+ public List? AllBinks()
+ {
+ return JsonSerializer.Deserialize>(RunBinkCommand("dump"));
+ }
+
+ public List? BinksBefore(long TimeStamp)
+ {
+ return JsonSerializer.Deserialize>(RunBinkCommand("dump-before"));
+ }
+
+ public List? BinksAfter(long TimeStamp)
+ {
+ return JsonSerializer.Deserialize>(RunBinkCommand("dump-after"));
+ }
+ }
+}
diff --git a/BinkPage.xaml b/BinkPage.xaml
new file mode 100644
index 0000000..f97a979
--- /dev/null
+++ b/BinkPage.xaml
@@ -0,0 +1,65 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/BinkPage.xaml.cs b/BinkPage.xaml.cs
new file mode 100644
index 0000000..166d9fc
--- /dev/null
+++ b/BinkPage.xaml.cs
@@ -0,0 +1,47 @@
+using Microsoft.UI.Xaml;
+using Microsoft.UI.Xaml.Controls;
+using Microsoft.UI.Xaml.Controls.Primitives;
+using Microsoft.UI.Xaml.Data;
+using Microsoft.UI.Xaml.Input;
+using Microsoft.UI.Xaml.Media;
+using Microsoft.UI.Xaml.Navigation;
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.IO;
+using System.Linq;
+using System.Runtime.InteropServices.WindowsRuntime;
+using Windows.Foundation;
+using Windows.Foundation.Collections;
+
+// To learn more about WinUI, the WinUI project structure,
+// and more about our project templates, see: http://aka.ms/winui-project-info.
+
+namespace wakka
+{
+ ///
+ /// An empty page that can be used on its own or navigated to within a Frame.
+ ///
+ public sealed partial class BinkPage : Page
+ {
+ private readonly ObservableCollection Binks = [];
+ private static SshConnection Ssh { get; set; } = new SshConnection();
+
+ public BinkPage()
+ {
+ this.InitializeComponent();
+ var Bink = new Bink();
+ var BinkList = Bink.AllBinks();
+ if (BinkList != null)
+ {
+ foreach (var bink in BinkList)
+ {
+ var date = DateTimeOffset.FromUnixTimeSeconds(bink.Time / 1000000000).DateTime.ToLocalTime();
+ bink.TimeString = date.ToString("HH:mm (dddd, MMMM dd, yyyy)");
+ Binks.Add(bink);
+ }
+ }
+ binksListView.ItemsSource = Binks;
+ }
+ }
+}
diff --git a/MainWindow.xaml b/MainWindow.xaml
new file mode 100644
index 0000000..c5f952c
--- /dev/null
+++ b/MainWindow.xaml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
diff --git a/MainWindow.xaml.cs b/MainWindow.xaml.cs
new file mode 100644
index 0000000..f61a766
--- /dev/null
+++ b/MainWindow.xaml.cs
@@ -0,0 +1,55 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.IO;
+using System.Linq;
+using System.Runtime.InteropServices.WindowsRuntime;
+using Microsoft.UI.Xaml;
+using Microsoft.UI.Xaml.Controls;
+using Microsoft.UI.Xaml.Controls.Primitives;
+using Microsoft.UI.Xaml.Data;
+using Microsoft.UI.Xaml.Input;
+using Microsoft.UI.Xaml.Media;
+using Microsoft.UI.Xaml.Navigation;
+using Windows.Foundation;
+using Windows.Foundation.Collections;
+
+// To learn more about WinUI, the WinUI project structure,
+// and more about our project templates, see: http://aka.ms/winui-project-info.
+
+namespace wakka
+{
+ ///
+ /// An empty window that can be used on its own or navigated to within a Frame.
+ ///
+ ///
+
+ public sealed partial class MainWindow : Window
+ {
+ private static SshConnection Ssh { get; set; } = new SshConnection();
+ public Frame RootFrame;
+
+ public MainWindow()
+ {
+ this.InitializeComponent();
+ this.AppWindow.MoveAndResize(new Windows.Graphics.RectInt32(100, 100, 854, 480));
+ Ssh.DeleteSshKey();
+ RootFrame = rootFrame;
+ if (Ssh.KeyExists() & (string)App.LocalSettingsData.Values["username"] != null)
+ {
+ Ssh.InitializeConnection((string)App.LocalSettingsData.Values["username"]);
+ RootFrame.Content = new NavigationPage();
+ }
+ else
+ {
+ RootFrame.Content = new StartupSshPage();
+ }
+ }
+
+
+ //private void myButton_Click(object sender, RoutedEventArgs e)
+ //{
+ // myButton.Content = "Clicked";
+ //}
+ }
+}
diff --git a/NavigationPage.xaml b/NavigationPage.xaml
new file mode 100644
index 0000000..f44a08f
--- /dev/null
+++ b/NavigationPage.xaml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/NavigationPage.xaml.cs b/NavigationPage.xaml.cs
new file mode 100644
index 0000000..9c6a964
--- /dev/null
+++ b/NavigationPage.xaml.cs
@@ -0,0 +1,32 @@
+using Microsoft.UI.Xaml;
+using Microsoft.UI.Xaml.Controls;
+using Microsoft.UI.Xaml.Controls.Primitives;
+using Microsoft.UI.Xaml.Data;
+using Microsoft.UI.Xaml.Input;
+using Microsoft.UI.Xaml.Media;
+using Microsoft.UI.Xaml.Navigation;
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Runtime.InteropServices.WindowsRuntime;
+using Windows.Foundation;
+using Windows.Foundation.Collections;
+
+// To learn more about WinUI, the WinUI project structure,
+// and more about our project templates, see: http://aka.ms/winui-project-info.
+
+namespace wakka
+{
+ ///
+ /// An empty page that can be used on its own or navigated to within a Frame.
+ ///
+ public sealed partial class NavigationPage : Page
+ {
+ public NavigationPage()
+ {
+ this.InitializeComponent();
+ navigationFrame.Content = new BinkPage();
+ }
+ }
+}
diff --git a/Package.appxmanifest b/Package.appxmanifest
new file mode 100644
index 0000000..d59f119
--- /dev/null
+++ b/Package.appxmanifest
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+
+
+
+ wakka
+ helix
+ Assets\StoreLogo.png
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Properties/launchSettings.json b/Properties/launchSettings.json
new file mode 100644
index 0000000..fc7d727
--- /dev/null
+++ b/Properties/launchSettings.json
@@ -0,0 +1,10 @@
+{
+ "profiles": {
+ "wakka (Package)": {
+ "commandName": "MsixPackage"
+ },
+ "wakka (Unpackaged)": {
+ "commandName": "Project"
+ }
+ }
+}
\ No newline at end of file
diff --git a/SshConnection.cs b/SshConnection.cs
new file mode 100644
index 0000000..1ff9ade
--- /dev/null
+++ b/SshConnection.cs
@@ -0,0 +1,76 @@
+using Org.BouncyCastle.Crypto;
+using Org.BouncyCastle.Crypto.Generators;
+using Org.BouncyCastle.OpenSsl;
+using Org.BouncyCastle.Security;
+using Renci.SshNet;
+using Renci.SshNet.Common;
+using System;
+using System.IO;
+
+namespace wakka
+{
+ public class SshConnection
+ {
+ public static string User { get; set; } = string.Empty;
+
+ public static SshClient? Client { get; set; } = null;
+
+ public readonly static string SshKeyPath = Path.Combine(App.LocalStroageData.Path, "key");
+
+ public static PrivateKeyFile? Key { get; set; } = null;
+
+ public static string? PublicKey { get; set; } = null;
+
+ public bool KeyExists() => File.Exists(SshKeyPath);
+
+ public void InitializeConnection(string user)
+ {
+ if (!File.Exists(SshKeyPath) || user == string.Empty)
+ {
+ throw new InvalidOperationException("No SSH key or user is empty");
+ }
+ else
+ {
+ User = user;
+ Key = new PrivateKeyFile(SshKeyPath);
+ Client = new SshClient("tilde.town", User, Key);
+ try
+ {
+ Client.Connect();
+ }
+ catch (SshAuthenticationException)
+ {
+ Key = null;
+ throw;
+ }
+ }
+ }
+
+ public string RunCommand(string command)
+ {
+ if (Client == null || !Client.IsConnected)
+ {
+ throw new InvalidOperationException("SSH client is not connected.");
+ }
+ var rc = Client.RunCommand(command);
+ return rc.Result;
+ }
+
+ public string CreateSshKey()
+ {
+ var keygen = new SshKeyGenerator.SshKeyGenerator(2048);
+ var privateKey = keygen.ToPrivateKey();
+ File.WriteAllText(SshKeyPath, privateKey);
+ return keygen.ToRfcPublicKey("wakka");
+ }
+
+ public void DeleteSshKey()
+ {
+ if (File.Exists(SshKeyPath))
+ {
+ File.Delete(SshKeyPath);
+ }
+ }
+ }
+}
+
diff --git a/StartupSshPage.xaml b/StartupSshPage.xaml
new file mode 100644
index 0000000..45e86e5
--- /dev/null
+++ b/StartupSshPage.xaml
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/StartupSshPage.xaml.cs b/StartupSshPage.xaml.cs
new file mode 100644
index 0000000..1807faa
--- /dev/null
+++ b/StartupSshPage.xaml.cs
@@ -0,0 +1,122 @@
+using Microsoft.UI.Xaml;
+using Microsoft.UI.Xaml.Controls;
+using Renci.SshNet.Common;
+using System;
+using System.Threading.Tasks;
+using Windows.ApplicationModel.DataTransfer;
+using Windows.Storage;
+using Windows.Storage.Pickers;
+using WinRT.Interop;
+using static System.Net.Mime.MediaTypeNames;
+// To learn more about WinUI, the WinUI project structure,
+// and more about our project templates, see: http://aka.ms/winui-project-info.
+
+namespace wakka
+{
+ ///
+ /// An empty page that can be used on its own or navigated to within a Frame.
+ ///
+
+ public sealed partial class StartupSshPage : Page
+ {
+ private static SshConnection Ssh { get; set; } = new SshConnection();
+
+ public StartupSshPage()
+ {
+ this.InitializeComponent();
+ string? userName = (string)App.LocalSettingsData.Values["username"];
+ if (userName == null || userName.Trim() == string.Empty)
+ {
+ sshConnectButton.IsEnabled = false;
+ }
+ else
+ {
+ usernameTextBox.Text = (string)App.LocalSettingsData.Values["username"];
+ }
+ if (Ssh.KeyExists())
+ {
+ sshKeySelectButton.Content = "SSH Key Set!";
+ //sshKeySelectButton.Click = Sele
+ }
+ }
+
+ private async void SelectPrivateKey(object sender, RoutedEventArgs e)
+ {
+ var picker = new FileOpenPicker();
+ picker.SuggestedStartLocation = PickerLocationId.ComputerFolder;
+ picker.FileTypeFilter.Add("*");
+ picker.ViewMode = PickerViewMode.List;
+ var currentWindow = (App.Current as App)?.m_window;
+ if (currentWindow != null)
+ {
+ InitializeWithWindow.Initialize(picker, WindowNative.GetWindowHandle(currentWindow));
+ StorageFile file = await picker.PickSingleFileAsync();
+ if (file != null)
+ {
+ var SourcePath = file.Path;
+ var DestinationPath = SshConnection.SshKeyPath;
+ await file.CopyAsync(App.LocalStroageData, "key", NameCollisionOption.ReplaceExisting);
+ sshKeySelectButton.Content = "SSH Key Set!";
+ }
+ }
+ }
+
+ private void CreateSshKey(object sender, RoutedEventArgs e)
+ {
+ var publicKey = Ssh.CreateSshKey();
+ if (publicKey != null)
+ {
+ var dataPackage = new DataPackage();
+ dataPackage.SetText(publicKey);
+ Clipboard.SetContent(dataPackage);
+ sshKeyCreateButton.Content = "Public key copied!";
+ }
+
+ }
+
+ private void OnTextChanged(object sender, TextChangedEventArgs e)
+ {
+ App.LocalSettingsData.Values["username"] = usernameTextBox.Text;
+ if (usernameTextBox.Text.Trim() == string.Empty)
+ {
+ sshConnectButton.IsEnabled = false;
+ }
+ else
+ {
+ sshConnectButton.IsEnabled = true;
+ }
+ }
+
+ private async void DisplayConnectionErrorDialog ()
+ {
+ var dialog = new ContentDialog
+ {
+ Title = "SSH Authentication Error",
+ Content = "Username or SSH key are incorrect.",
+ CloseButtonText = "Close"
+ };
+ dialog.XamlRoot = this.XamlRoot;
+ await dialog.ShowAsync();
+ }
+
+ private void AttemptConnection(object sender, RoutedEventArgs e)
+ {
+ try
+ {
+ Ssh.InitializeConnection((string)App.LocalSettingsData.Values["username"]);
+ var mainWindow = (App.Current as App)?.m_window;
+ if (mainWindow != null)
+ {
+ mainWindow.Content = new NavigationPage();
+ }
+
+ }
+ catch (SshAuthenticationException)
+ {
+ sshKeySelectButton.Content = "Select New SSH Key";
+ DisplayConnectionErrorDialog();
+ }
+ }
+
+ }
+}
diff --git a/Visual Studio 2022/Visualizers/attribcache140.bin b/Visual Studio 2022/Visualizers/attribcache140.bin
new file mode 100644
index 0000000..c65dd8f
Binary files /dev/null and b/Visual Studio 2022/Visualizers/attribcache140.bin differ
diff --git a/app.manifest b/app.manifest
new file mode 100644
index 0000000..d7cbaed
--- /dev/null
+++ b/app.manifest
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PerMonitorV2
+
+
+
\ No newline at end of file
diff --git a/wakka.csproj b/wakka.csproj
new file mode 100644
index 0000000..607ef91
--- /dev/null
+++ b/wakka.csproj
@@ -0,0 +1,80 @@
+
+
+ WinExe
+ net8.0-windows10.0.19041.0
+ 10.0.17763.0
+ wakka
+ app.manifest
+ x86;x64;ARM64
+ win-x86;win-x64;win-arm64
+ win-$(Platform).pubxml
+ true
+ true
+ enable
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ MSBuild:Compile
+
+
+
+
+ MSBuild:Compile
+
+
+
+
+ MSBuild:Compile
+
+
+
+
+
+ true
+
+
+
+
+ False
+ True
+ False
+ True
+
+
\ No newline at end of file
diff --git a/wakka.sln b/wakka.sln
new file mode 100644
index 0000000..52f3b3d
--- /dev/null
+++ b/wakka.sln
@@ -0,0 +1,43 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.13.35931.197 d17.13
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "wakka", "wakka.csproj", "{76B27B27-FF94-4A02-8BC3-56A3AFCE40B5}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|ARM64 = Debug|ARM64
+ Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
+ Release|ARM64 = Release|ARM64
+ Release|x64 = Release|x64
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {76B27B27-FF94-4A02-8BC3-56A3AFCE40B5}.Debug|ARM64.ActiveCfg = Debug|ARM64
+ {76B27B27-FF94-4A02-8BC3-56A3AFCE40B5}.Debug|ARM64.Build.0 = Debug|ARM64
+ {76B27B27-FF94-4A02-8BC3-56A3AFCE40B5}.Debug|ARM64.Deploy.0 = Debug|ARM64
+ {76B27B27-FF94-4A02-8BC3-56A3AFCE40B5}.Debug|x64.ActiveCfg = Debug|x64
+ {76B27B27-FF94-4A02-8BC3-56A3AFCE40B5}.Debug|x64.Build.0 = Debug|x64
+ {76B27B27-FF94-4A02-8BC3-56A3AFCE40B5}.Debug|x64.Deploy.0 = Debug|x64
+ {76B27B27-FF94-4A02-8BC3-56A3AFCE40B5}.Debug|x86.ActiveCfg = Debug|x86
+ {76B27B27-FF94-4A02-8BC3-56A3AFCE40B5}.Debug|x86.Build.0 = Debug|x86
+ {76B27B27-FF94-4A02-8BC3-56A3AFCE40B5}.Debug|x86.Deploy.0 = Debug|x86
+ {76B27B27-FF94-4A02-8BC3-56A3AFCE40B5}.Release|ARM64.ActiveCfg = Release|ARM64
+ {76B27B27-FF94-4A02-8BC3-56A3AFCE40B5}.Release|ARM64.Build.0 = Release|ARM64
+ {76B27B27-FF94-4A02-8BC3-56A3AFCE40B5}.Release|ARM64.Deploy.0 = Release|ARM64
+ {76B27B27-FF94-4A02-8BC3-56A3AFCE40B5}.Release|x64.ActiveCfg = Release|x64
+ {76B27B27-FF94-4A02-8BC3-56A3AFCE40B5}.Release|x64.Build.0 = Release|x64
+ {76B27B27-FF94-4A02-8BC3-56A3AFCE40B5}.Release|x64.Deploy.0 = Release|x64
+ {76B27B27-FF94-4A02-8BC3-56A3AFCE40B5}.Release|x86.ActiveCfg = Release|x86
+ {76B27B27-FF94-4A02-8BC3-56A3AFCE40B5}.Release|x86.Build.0 = Release|x86
+ {76B27B27-FF94-4A02-8BC3-56A3AFCE40B5}.Release|x86.Deploy.0 = Release|x86
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {E3A4A5CF-C10B-44EA-A3FB-E4D7046D0EE3}
+ EndGlobalSection
+EndGlobal