37 lines
1.2 KiB
Plaintext
37 lines
1.2 KiB
Plaintext
using System.Collections.Generic;
|
|
using DTS.Common.Interface.Groups;
|
|
using GroupImport.Resources;
|
|
|
|
namespace GroupImport
|
|
{
|
|
/// <summary>
|
|
/// Interaction logic for GroupImportOptionsView.xaml
|
|
/// </summary>
|
|
public partial class GroupImportOptionsView : IGroupImportOptionsView
|
|
{
|
|
public GroupImportOptionsView()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
/// <summary>
|
|
/// controls whether it is possible to continue to preview or not
|
|
/// it is not possible to continue to preview if no files are selected
|
|
/// and you automatically advance to preview if you select a file
|
|
/// </summary>
|
|
/// <param name="errors"></param>
|
|
/// <param name="warnings"></param>
|
|
/// <returns></returns>
|
|
public bool Validate(out List<string> errors, out List<string> warnings)
|
|
{
|
|
errors = new List<string>();
|
|
warnings = new List<string>();
|
|
|
|
var vm = (GroupImportViewModel)DataContext;
|
|
if (null != vm.SourceFiles && vm.SourceFiles.Length >= 1) return true;
|
|
errors.Add(StringResources.Preview_NoFilesSelected);
|
|
return false;
|
|
}
|
|
}
|
|
}
|