mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-06-05 02:54:59 +00:00
feature<Achive>: add git archive
to commit's context menu
This commit is contained in:
parent
93835b48bc
commit
3f55d66e01
7 changed files with 182 additions and 2 deletions
12
src/Views/Validations/ArchiveFile.cs
Normal file
12
src/Views/Validations/ArchiveFile.cs
Normal file
|
@ -0,0 +1,12 @@
|
|||
using System.Globalization;
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace SourceGit.Views.Validations {
|
||||
public class ArchiveFile : ValidationRule {
|
||||
public override ValidationResult Validate(object value, CultureInfo cultureInfo) {
|
||||
var path = value as string;
|
||||
if (string.IsNullOrEmpty(path) || !path.EndsWith(".zip")) return new ValidationResult(false, App.Text("BadArchiveFile"));
|
||||
return ValidationResult.ValidResult;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue