mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-17 22:11:48 +08:00
24 lines
775 B
C#
24 lines
775 B
C#
using mRemoteNG.Connection;
|
|
using mRemoteNG.Tools;
|
|
using System.IO;
|
|
|
|
namespace mRemoteNG.App.Initialization
|
|
{
|
|
public class CredsAndConsSetup
|
|
{
|
|
private readonly IConnectionsService _connectionsService;
|
|
|
|
public CredsAndConsSetup(IConnectionsService connectionsService)
|
|
{
|
|
_connectionsService = connectionsService.ThrowIfNull(nameof(connectionsService));
|
|
}
|
|
|
|
public void LoadCredsAndCons()
|
|
{
|
|
if (Settings.Default.FirstStart && !Settings.Default.LoadConsFromCustomLocation && !File.Exists(_connectionsService.GetStartupConnectionFileName()))
|
|
_connectionsService.NewConnectionsFile(_connectionsService.GetStartupConnectionFileName());
|
|
|
|
_connectionsService.LoadConnections();
|
|
}
|
|
}
|
|
} |