32 lines
781 B
C#
32 lines
781 B
C#
using Avalonia.Controls;
|
|
using Renci.SshNet.Common;
|
|
|
|
namespace kawwa;
|
|
|
|
public partial class MainWindow : Window
|
|
{
|
|
public MainWindow()
|
|
{
|
|
InitializeComponent();
|
|
SshConnection.InitializeCredentials();
|
|
var user = ConfigManager.GetValue("user");
|
|
if (user != null)
|
|
{
|
|
try
|
|
{
|
|
SshConnection.User = user;
|
|
SshConnection.InitializeConnection();
|
|
Bink.Initialize();
|
|
this.Content = new BinkControl();
|
|
}
|
|
catch (SshAuthenticationException)
|
|
{
|
|
this.Content = new SshSetup();
|
|
}
|
|
}
|
|
else
|
|
{
|
|
this.Content = new SshSetup();
|
|
}
|
|
}
|
|
} |