2024-02-05 23:08:37 -08:00
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
2024-03-17 18:37:06 -07:00
|
|
|
|
namespace SourceGit.ViewModels
|
|
|
|
|
{
|
|
|
|
|
public class DeleteRepositoryNode : Popup
|
|
|
|
|
{
|
|
|
|
|
public RepositoryNode Node
|
|
|
|
|
{
|
2024-02-05 23:08:37 -08:00
|
|
|
|
get => _node;
|
|
|
|
|
set => SetProperty(ref _node, value);
|
|
|
|
|
}
|
|
|
|
|
|
2024-03-17 18:37:06 -07:00
|
|
|
|
public DeleteRepositoryNode(RepositoryNode node)
|
|
|
|
|
{
|
2024-02-05 23:08:37 -08:00
|
|
|
|
_node = node;
|
|
|
|
|
View = new Views.DeleteRepositoryNode() { DataContext = this };
|
|
|
|
|
}
|
|
|
|
|
|
2024-03-17 18:37:06 -07:00
|
|
|
|
public override Task<bool> Sure()
|
|
|
|
|
{
|
2024-02-05 23:08:37 -08:00
|
|
|
|
Preference.RemoveNode(_node);
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private RepositoryNode _node = null;
|
|
|
|
|
}
|
2024-03-17 18:37:06 -07:00
|
|
|
|
}
|