Пример #1
0
        private void SessionOnSelectedSignatureChanged(object sender, SelectedSignatureChangedEventArgs e)
        {
            var selectedItemIndex = _session.Signatures.IndexOf(e.NewSelectedSignature);

            _session.Properties.RemoveProperty(_selectedItemIndexKey);
            _session.Properties.AddProperty(_selectedItemIndexKey, selectedItemIndex);
        }
Пример #2
0
            private void OnSelectedSignatureChanged(
                object sender,
                SelectedSignatureChangedEventArgs eventArgs
                )
            {
                AssertIsForeground();

                if (_ignoreSelectionStatusChangedEvent)
                {
                    return;
                }

                Contract.ThrowIfFalse(
                    _signatureMap.TryGetKey(
                        (Signature)eventArgs.NewSelectedSignature,
                        out var helpItem
                        )
                    );

                var helpItemSelected = this.ItemSelected;

                if (helpItemSelected != null && helpItem != null)
                {
                    helpItemSelected(this, new SignatureHelpItemEventArgs(helpItem));
                }
            }
        private void SessionOnSelectedSignatureChanged(object sender, SelectedSignatureChangedEventArgs e)
        {
            var selectedItemIndex = _session.Signatures.IndexOf(e.NewSelectedSignature);

            _session.Properties.RemoveProperty(_selectedItemIndexKey);
            _session.Properties.AddProperty(_selectedItemIndexKey, selectedItemIndex);
        }
Пример #4
0
        private void OnSession_SelectedSignatureChanged(object sender, SelectedSignatureChangedEventArgs e)
        {
            // Stop listening to CurrentParameterChanged on the old selected signature, and start listening on the new selected
            // signature.
            if (e.PreviousSelectedSignature != null)
            {
                e.PreviousSelectedSignature.CurrentParameterChanged -= this.OnSelectedSignature_CurrentParameterChanged;
            }
            if (e.NewSelectedSignature != null)
            {
                e.NewSelectedSignature.CurrentParameterChanged += this.OnSelectedSignature_CurrentParameterChanged;
            }

            // Since the selected signature changed, we need to update the signature info being displayed.
            this.UpdateSignatureInfo();
        }
Пример #5
0
        private void OnSession_SelectedSignatureChanged(object sender, SelectedSignatureChangedEventArgs e)
        {
            // If the selected signature changed, we should subscribe to current parameter change notification on this new
            // selected signature.

            if (e.PreviousSelectedSignature != null)
            {
                e.PreviousSelectedSignature.CurrentParameterChanged -= this.OnSelectedSignature_CurrentParameterChanged;
            }

            if (e.NewSelectedSignature != null)
            {
                e.NewSelectedSignature.CurrentParameterChanged += this.OnSelectedSignature_CurrentParameterChanged;
            }

            this.FireClassificationChanged
                (new SnapshotSpan(_textBuffer.CurrentSnapshot, 0, _textBuffer.CurrentSnapshot.Length));
        }
            private void OnSelectedSignatureChanged(object sender, SelectedSignatureChangedEventArgs eventArgs)
            {
                AssertIsForeground();

                if (_ignoreSelectionStatusChangedEvent)
                {
                    return;
                }

                Contract.ThrowIfFalse(_signatureMap.TryGetKey((Signature)eventArgs.NewSelectedSignature, out var helpItem));

                var helpItemSelected = this.ItemSelected;
                if (helpItemSelected != null && helpItem != null)
                {
                    helpItemSelected(this, new SignatureHelpItemEventArgs(helpItem));
                }
            }
Пример #7
0
		void Session_SelectedSignatureChanged(object sender, SelectedSignatureChangedEventArgs e) => UpdateSelectedSignature();