Пример #1
0
        public void UpdatePeakValueBackground()
        {
            if (ChildApps != null)
            {
                foreach (var child in ChildApps.ToArray())
                {
                    child.UpdatePeakValueBackground();
                }
            }

            _session.UpdatePeakValueBackground();
        }
Пример #2
0
        public void UpdatePeakValueBackground()
        {
            if (ChildApps != null)
            {
                foreach (var child in ChildApps.ToArray())
                {
                    child.UpdatePeakValueBackground();
                }
            }

            ((IAudioDeviceSessionInternal)_session).UpdatePeakValueBackground();
        }
Пример #3
0
        private void Children_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
        {
            switch (e.Action)
            {
            case System.Collections.Specialized.NotifyCollectionChangedAction.Add:
                Debug.Assert(e.NewItems.Count == 1);
                ChildApps.Add(new AppItemViewModel((IAudioDeviceSession)e.NewItems[0], isChild: true));
                break;

            case System.Collections.Specialized.NotifyCollectionChangedAction.Remove:
                Debug.Assert(e.OldItems.Count == 1);
                ChildApps.Remove(ChildApps.First(x => x.Id == ((IAudioDeviceSession)e.OldItems[0]).Id));
                break;

            default:
                throw new NotImplementedException();
            }
        }
Пример #4
0
        private void Children_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
        {
            if (_parent.TryGetTarget(out var parent))
            {
                switch (e.Action)
                {
                case NotifyCollectionChangedAction.Add:
                    Debug.Assert(e.NewItems.Count == 1);
                    ChildApps.Add(new AppItemViewModel(parent, (IAudioDeviceSession)e.NewItems[0], true, Icon));
                    break;

                case NotifyCollectionChangedAction.Remove:
                    Debug.Assert(e.OldItems.Count == 1);
                    ChildApps.Remove(ChildApps.First(x => x.Id == ((IAudioDeviceSession)e.OldItems[0]).Id));
                    break;

                default:
                    throw new NotImplementedException();
                }
            }
        }