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-07-22 00:34:31 -07:00
|
|
|
|
Preference.Instance.RemoveNode(_node);
|
2024-08-22 06:10:23 -07:00
|
|
|
|
Welcome.Instance.Refresh();
|
2024-02-05 23:08:37 -08:00
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private RepositoryNode _node = null;
|
|
|
|
|
}
|
2024-03-31 01:54:29 -07:00
|
|
|
|
}
|