mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-25 19:38:37 +08:00
Moved some files to Config.Connections.Multiuser to keep things organized
This commit is contained in:
@@ -12,11 +12,11 @@ namespace mRemoteNG.Config.Connections
|
||||
public double TimerIntervalInMilliseconds => _updateTimer.Interval;
|
||||
|
||||
|
||||
public PeriodicConnectionsUpdateChecker()
|
||||
public PeriodicConnectionsUpdateChecker(IConnectionsUpdateChecker updateChecker)
|
||||
{
|
||||
_updateTimer = new Timer(3000);
|
||||
_updateChecker = new SqlConnectionsUpdateChecker();
|
||||
SqlUpdateTimer.SqlUpdateTimerElapsed += SqlUpdateTimer_SqlUpdateTimerElapsed;
|
||||
_updateChecker = updateChecker;
|
||||
_updateTimer.Elapsed += (sender, args) => _updateChecker.IsUpdateAvailableAsync();
|
||||
_updateChecker.ConnectionsUpdateAvailable += (sender, args) => ConnectionsUpdateAvailable?.Invoke(sender, args);
|
||||
_updateChecker.UpdateCheckFinished += (sender, args) => UpdateCheckFinished?.Invoke(sender, args);
|
||||
}
|
||||
@@ -25,17 +25,9 @@ namespace mRemoteNG.Config.Connections
|
||||
|
||||
public void Disable() => _updateTimer.Stop();
|
||||
|
||||
private void SqlUpdateTimer_SqlUpdateTimerElapsed() => _updateChecker.IsUpdateAvailableAsync();
|
||||
public bool IsUpdateAvailable() => _updateChecker.IsUpdateAvailable();
|
||||
|
||||
public bool IsUpdateAvailable()
|
||||
{
|
||||
return _updateChecker.IsUpdateAvailable();
|
||||
}
|
||||
|
||||
public void IsUpdateAvailableAsync()
|
||||
{
|
||||
_updateChecker.IsUpdateAvailableAsync();
|
||||
}
|
||||
public void IsUpdateAvailableAsync() => _updateChecker.IsUpdateAvailableAsync();
|
||||
|
||||
public event UpdateCheckFinishedEventHandler UpdateCheckFinished;
|
||||
public event ConnectionsUpdateAvailableEventHandler ConnectionsUpdateAvailable;
|
||||
@@ -24,7 +24,6 @@ namespace mRemoteNG.Config.Connections
|
||||
_lastUpdateTime = default(DateTime);
|
||||
}
|
||||
|
||||
|
||||
public bool IsUpdateAvailable()
|
||||
{
|
||||
ConnectToSqlDb();
|
||||
@@ -127,9 +127,9 @@
|
||||
<Compile Include="App\Update\UpdateFile.cs" />
|
||||
<Compile Include="App\Update\UpdateInfo.cs" />
|
||||
<Compile Include="App\Windows.cs" />
|
||||
<Compile Include="Config\Connections\ConnectionsUpdateCheckFinishedEventArgs.cs" />
|
||||
<Compile Include="Config\Connections\IConnectionsUpdateChecker.cs" />
|
||||
<Compile Include="Config\Connections\ConnectionsUpdateAvailableEventArgs.cs" />
|
||||
<Compile Include="Config\Connections\Multiuser\ConnectionsUpdateCheckFinishedEventArgs.cs" />
|
||||
<Compile Include="Config\Connections\Multiuser\IConnectionsUpdateChecker.cs" />
|
||||
<Compile Include="Config\Connections\Multiuser\ConnectionsUpdateAvailableEventArgs.cs" />
|
||||
<Compile Include="Config\Serializers\ActiveDirectoryDeserializer.cs" />
|
||||
<Compile Include="Config\Serializers\CsvConnectionsSerializerMremotengFormat.cs" />
|
||||
<Compile Include="Config\Serializers\CsvConnectionsSerializerRemoteDesktop2008Format.cs" />
|
||||
@@ -152,8 +152,8 @@
|
||||
<Compile Include="Config\DataProviders\FileDataProvider.cs" />
|
||||
<Compile Include="Config\DataProviders\IDataProvider.cs" />
|
||||
<Compile Include="Config\Connections\SqlCommandBuilder.cs" />
|
||||
<Compile Include="Config\Connections\SqlConnectionsUpdateChecker.cs" />
|
||||
<Compile Include="Config\Connections\PeriodicConnectionsUpdateChecker.cs" />
|
||||
<Compile Include="Config\Connections\Multiuser\SqlConnectionsUpdateChecker.cs" />
|
||||
<Compile Include="Config\Connections\Multiuser\PeriodicConnectionsUpdateChecker.cs" />
|
||||
<Compile Include="Config\Connections\SqlUpdateTimer.cs" />
|
||||
<Compile Include="Config\Serializers\XmlConnectionsDeserializer.cs" />
|
||||
<Compile Include="Config\Putty\PuttySessionChangedEventArgs.cs" />
|
||||
|
||||
Reference in New Issue
Block a user