public void ProcessFiles(string[] files)
        {
            if (files == null || files.Length == 0)
            {
                return;
            }

            ChooseGroupRequest.Raise(new ChooseSyncGroupViewModel(_groups)
            {
                Title = "Choose Group"
            }, vmd =>
            {
                var selectedGroup = vmd.SelectedGroup;
                if (!vmd.Confirmed || selectedGroup == null)
                {
                    return;
                }

                if (!_groups.Contains(selectedGroup))
                {
                    _groups.Add(selectedGroup);
                }
                selectedGroup.AddFiles(files);
                SelectedGroup = selectedGroup;
            });

            RequestManager.WindowRequestProvider.Raise(WindowRequestAction.Show);
            RequestManager.WindowRequestProvider.Raise(WindowRequestAction.Activate);
        }
Exemplo n.º 2
0
        public void CreateNewGroup()
        {
            if (!CanCreateNewGroup)
            {
                return;
            }

            SelectedGroup = new FileSyncGroup(GroupName);
            GroupName     = null;
        }
        public void AddGroup()
        {
            if (!CanAddGroup)
            {
                return;
            }
            var syncGroup = new FileSyncGroup(GroupName);

            _groups.Add(syncGroup);
            SelectedGroup = syncGroup;
            GroupName     = null;
        }
Exemplo n.º 4
0
 public void SelectGroup(FileSyncGroup group)
 => SelectedGroup = group;