Beispiel #1
0
 private void SetRequestorListBox(DisplayPathHelper selectedGiver)
 {
     _friendRequestor.Clear();
     foreach (var giver in _friendGiver)
     {
         if (giver.Path == selectedGiver.Path)
         {
             continue;
         }
         _friendRequestor.Add(giver);
     }
     ClearRequestorSelections();
     RaisePropertyChanged(() => FriendRequestor);
     _okCommand.RaiseCanExecuteChanged();
 }
Beispiel #2
0
        public MakeFriendAssemblyViewModel(ICanClose view, IEnumerable <string> projects)
        {
            _okCommand     = new RelayCommand(OnOk, IsOKEnabled);
            _cancelCommand = new RelayCommand(OnCancel);
            _view          = view;
            Messenger.Default.Register <ItemSelected>(this, OnItemSelected);
            var list = new List <DisplayPathHelper>();

            foreach (var file in projects)
            {
                var display = new DisplayPathHelper();
                display.Path        = file;
                display.DisplayPath = Path.GetFileNameWithoutExtension(file);
                list.Add(display);
            }
            _friendGiver     = new ObservableCollection <DisplayPathHelper>(list);
            _friendRequestor = new ObservableCollection <DisplayPathHelper>();
        }