示例#1
0
        public void OnPropertyChanged(string propertyName, object before, object after)
        {
            if (propertyName == nameof(SelectedIdol))
            {
                SendToSlotCommand.RaiseCanExecuteChanged();
                CopyIidCommand.RaiseCanExecuteChanged();
            }
            else if (propertyName == nameof(UnitName))
            {
                SaveCommand.RaiseCanExecuteChanged();
            }
            else if (propertyName == nameof(SelectedUnit))
            {
                if (SelectedUnit != null)
                {
                    TemporalUnit.CopyFrom(SelectedUnit);
                }
                DeleteCommand.RaiseCanExecuteChanged();
            }

            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }
示例#2
0
        public void OnPropertyChanged(string propertyName, object before, object after)
        {
            if (propertyName == nameof(SelectedIdols))
            {
                AddToOwnedCommand.RaiseCanExecuteChanged();
                CopyIidCommand.RaiseCanExecuteChanged();
            }

            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }