mirror of
https://github.com/immense/Remotely.git
synced 2025-10-26 11:27:15 +00:00
* Add Azure Pipelines yml. * Remove Server Installer. * Update Release Build.yml for Azure Pipelines * Update Release Build.yml * Update Release Build.yml for Azure Pipelines * Update Release Build.yml for Azure Pipelines * Update Release Build.yml for Azure Pipelines * Update Release Build.yml for Azure Pipelines * Update signtool.exe * Update Release Build.yml * Update Publish.ps1 * Update pipeline and Dockerfile. * Move docker files. * Update Dockerfile * Update Dockerfile * Update Dockerfile * Update Dockerfile * Move files. * Update Dockerfile * Update Dockerfile * Create RewritableStream. * Finish implementation of rewritable stream and embedded data searcher. * Remove RelayCode. * Get branding from default org if orgId is missing. * Update README.md * Remove AppConstants.ServerUrl. Fix main module file path. * Update submodule. * Extract embedded data in Program.cs. * Add logging. Update submodule. * Remove size block. BinaryWriter prefixes size. * Remove unused async * Update Immense.RemoteControl * Update Release Build.yml for Azure Pipelines * Update Release Build.yml for Azure Pipelines * Use UpgradeService for determining out of date clients.
39 lines
955 B
C#
39 lines
955 B
C#
using System;
|
|
using System.Windows.Input;
|
|
|
|
namespace Remotely.Agent.Installer.Win.Services
|
|
{
|
|
public class RelayCommand : ICommand
|
|
{
|
|
private readonly Action<object> _action;
|
|
|
|
private readonly Predicate<object> _canExecute;
|
|
|
|
public RelayCommand(Action<object> action, Predicate<object> canExecute = null)
|
|
{
|
|
_action = action;
|
|
_canExecute = canExecute;
|
|
}
|
|
|
|
public event EventHandler CanExecuteChanged
|
|
{
|
|
add { CommandManager.RequerySuggested += value; }
|
|
remove { CommandManager.RequerySuggested -= value; }
|
|
}
|
|
|
|
public bool CanExecute(object parameter)
|
|
{
|
|
if (_canExecute is null)
|
|
{
|
|
return true;
|
|
}
|
|
return _canExecute.Invoke(parameter);
|
|
}
|
|
|
|
public void Execute(object parameter)
|
|
{
|
|
_action?.Invoke(parameter);
|
|
}
|
|
}
|
|
}
|