Ejemplo n.º 1
0
        public bool Remove(string identifier)
        {
            _debugger.Trace();

            // ...
            for (var n = _settings.Instructions.List.Count - 1; n >= 0; n--)
            {
                // ...
                if (_settings.Instructions.List[n].Identifier != identifier)
                {
                    continue;
                }

                // ...
                _settings.Instructions.List[n].PropertyChanged -= OnInstructionPropertyChanged;
                _settings.Instructions.List.RemoveAt(n);
                InstructionRemoved?.Invoke(this, new InstructionRemovedEventArgs(identifier));
                return(true);
            }

            // ...
            return(false);
        }
    public void Removed()
    {
        InstructionManager.Instance.Remove(_instruction.Name);

        InstructionRemoved?.Invoke(this, new InstructionSelectionEventArgs(_instruction));
    }