Beispiel #1
0
        /// <summary>
        /// Update all the Slide-able elements
        /// </summary>
        public static void AutoSlideNext()
        {
            // Trigger change in the AutoSlideMessenger dummy variable
            // This will notify all bound objects (AutoSlideListener) to
            // go to the next slide.
            var val = (bool)AutoSlideMessenger.Content;

            AutoSlideMessenger.Content = !val;

            LimeLib.LifeCheck();
        }
Beispiel #2
0
        /// <summary>
        /// React on Binding change
        /// </summary>
        /// <param name="d"></param>
        /// <param name="e"></param>
        private static void OnBoundDataContextChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            var wxThis = d as InfoPanel;

            if (e.OldValue is LimeItem old)
            {
                old.PropertyChangedWeak -= wxThis.Item_PropertyChanged;
            }

            if (e.NewValue is LimeItem item)
            {
                LimeMsg.Debug("InfoPanel: BoundDataContext: {0}", item.Name);
                LimeLib.LifeCheck();

                item.PropertyChangedWeak += wxThis.Item_PropertyChanged;

                wxThis.Item_PropertyChanged(item, null);
            }
        }
Beispiel #3
0
        /// <summary>
        /// React on Binding change
        /// </summary>
        /// <param name="d"></param>
        /// <param name="e"></param>
        private static void OnBoundDataContextChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            var wxThis = d as InfoEditPanel;

            if (e.NewValue is LimeItem item)
            {
                LimeMsg.Debug("InfoEditPanel: BoundDataContext: {0}", item.Name);
                LimeLib.LifeCheck();

                var meta = item.Metadata;
                if (meta != null && meta.Search == null)
                {
                    if (meta.Type == MediaType.Video)
                    {
                        var path = meta["Path"].Value;
                        var repl = Global.User.PathToSearchMovie.Replace(path);
                        meta.Search = new LimeProperty("Search", repl);
                    }
                }
            }
#if TRACE
            wxThis.StopWatch.Restart();
#endif
        }