예제 #1
0
        /// <summary>
        /// Meldet eine neue Sequenz von Eingaben an.
        /// </summary>
        /// <param name="item">Eine neue Eingabe.</param>
        public void RegisterSequence(MappingItem item)
        {
            // Update
            if (item == null)
            {
                m_Sequence.Clear();
            }
            else
            {
                m_Sequence.Add(item);
            }

            // Notify commands
            RefreshButtons(AddNewSequence);

            // Check notify
            var notify = PropertyChanged;

            if (notify == null)
            {
                return;
            }

            // Report
            notify(this, new PropertyChangedEventArgs("SequenceLength"));
        }
        /// <summary>
        /// Bearbeitet eine Eingabe der Fernbedienung.
        /// </summary>
        /// <param name="code">Der Eingabecode.</param>
        private void Process(MappingItem code)
        {
            // Load the storyboard
            var animation = ReceiverFlag.FindResource("Receiver") as Storyboard;

            if (animation != null)
            {
                animation.Begin();
            }

            // Attach to our helper
            var context = DataContext as LearnContext;

            if (context != null)
            {
                context.RegisterSequence(code);
            }
        }
예제 #3
0
        /// <summary>
        /// Meldet eine neue Sequenz von Eingaben an.
        /// </summary>
        /// <param name="item">Eine neue Eingabe.</param>
        public void RegisterSequence( MappingItem item )
        {
            // Update
            if (item == null)
                m_Sequence.Clear();
            else
                m_Sequence.Add( item );

            // Notify commands
            RefreshButtons( AddNewSequence );

            // Check notify
            var notify = PropertyChanged;
            if (notify == null)
                return;

            // Report
            notify( this, new PropertyChangedEventArgs( "SequenceLength" ) );
        }
        /// <summary>
        /// Bearbeitet eine Eingabe der Fernbedienung.
        /// </summary>
        /// <param name="code">Der Eingabecode.</param>
        private void Process( MappingItem code )
        {
            // Load the storyboard
            var animation = ReceiverFlag.FindResource( "Receiver" ) as Storyboard;
            if (animation != null)
                animation.Begin();

            // Attach to our helper
            var context = DataContext as LearnContext;
            if (context != null)
                context.RegisterSequence( code );
        }