/// <summary> The add text clicked. </summary>
        /// <param name="sender"> The sender. </param>
        /// <param name="e"> The event arguments. </param>
        private void AddTextClicked(object sender, RoutedEventArgs e)
        {
            var text = new TimedText();
            var ctrl = new TimedTextControl { TimedText = text };

            ctrl.RowDeleted += this.RowDeleted;

            this.lstItems.Items.Add(ctrl);
            this.ViewModel.Add(text);
        }
Ejemplo n.º 2
0
        /// <summary> Adds a new TimedTextControl to the Announcement list. </summary>
        /// <param name="sender"> The sender. </param>
        /// <param name="e"> The event arguments. </param>
        private void AddAnnouncementClicked(object sender, RoutedEventArgs e)
        {
            var text = new TimedText();
            var ctrl = new TimedTextControl { TimedText = text };

            ctrl.RowDeleted += this.AnnouncementRowDeleted;

            this.viewModel.AnnouncementText.Add(text);
            lbxAnnouncements.Items.Add(ctrl);
        }
Ejemplo n.º 3
0
        private void AddSubbarClicked(object sender, RoutedEventArgs e)
        {
            TimedText text = new TimedText();
            var ctrl = new TimedTextControl { TimedText = text };

            ctrl.RowDeleted += this.ctrl_RowDeleted;

            this.viewModel.SubbarText.Add(text);
            spSubbar.Items.Add(ctrl);
        }
        /// <summary> The add text clicked. </summary>
        /// <param name="sender"> The sender. </param>
        /// <param name="e"> The event arguments. </param>
        private void AddTextClicked(object sender, RoutedEventArgs e)
        {
            var text = new TimedText();
            var ctrl = new TimedTextControl {
                TimedText = text
            };

            ctrl.RowDeleted += this.RowDeleted;

            this.lstItems.Items.Add(ctrl);
            this.ViewModel.Add(text);
        }
        /// <summary> The timed text data context changed. </summary>
        /// <param name="sender"> The sender. </param>
        /// <param name="e"> The event arguments. </param>
        private void TimedTextDataContextChanged(object sender, DependencyPropertyChangedEventArgs e)
        {
            var vm = this.ViewModel;

            if (vm == null)
            {
                return;
            }

            foreach (var v in vm)
            {
                var ctrl = new TimedTextControl {
                    TimedText = v
                };

                ctrl.RowDeleted += this.RowDeleted;

                this.lstItems.Items.Add(ctrl);
            }
        }
        /// <summary> The timed text data context changed. </summary>
        /// <param name="sender"> The sender. </param>
        /// <param name="e"> The event arguments. </param>
        private void TimedTextDataContextChanged(object sender, DependencyPropertyChangedEventArgs e)
        {
            var vm = this.ViewModel;

            if (vm == null)
            {
                return;
            }

            foreach (var v in vm)
            {
                var ctrl = new TimedTextControl { TimedText = v };

                ctrl.RowDeleted += this.RowDeleted;

                this.lstItems.Items.Add(ctrl);
            }
        }