43 lines
1.3 KiB
C#
43 lines
1.3 KiB
C#
using Microsoft.UI.Xaml;
|
|
using Microsoft.UI.Xaml.Controls;
|
|
|
|
// To learn more about WinUI, the WinUI project structure,
|
|
// and more about our project templates, see: http://aka.ms/winui-project-info.
|
|
|
|
namespace wakka
|
|
{
|
|
/// <summary>
|
|
/// An empty window that can be used on its own or navigated to within a Frame.
|
|
/// </summary>
|
|
///
|
|
|
|
public sealed partial class MainWindow : Window
|
|
{
|
|
public Frame RootFrame;
|
|
public MainWindow()
|
|
{
|
|
this.InitializeComponent();
|
|
RootFrame = rootFrame;
|
|
//Ssh.DeleteSshKey();
|
|
if (SshConnection.KeyExists() & (string)App.LocalSettingsData.Values["username"] != null)
|
|
{
|
|
try
|
|
{
|
|
SshConnection.InitializeConnection((string)App.LocalSettingsData.Values["username"]);
|
|
Bink.Initialize();
|
|
Feels.Initialize();
|
|
RootFrame.Content = new NavigationPage();
|
|
}
|
|
catch (Renci.SshNet.Common.SshAuthenticationException)
|
|
{
|
|
RootFrame.Content = new StartupSshPage();
|
|
}
|
|
}
|
|
else
|
|
{
|
|
RootFrame.Content = new StartupSshPage();
|
|
}
|
|
}
|
|
}
|
|
}
|