Esempio n. 1
0
        async void OnOnItemAdded(RendererItem rendererItem)
        {
            LogHelper.Log("Found new rendererItem " + rendererItem.name() +
                          " can render audio " + rendererItem.canRenderAudio() +
                          " can render video " + rendererItem.canRenderVideo());

            RendererItems.Add(rendererItem);
            await DispatchHelper.InvokeInUIThread(CoreDispatcherPriority.Normal, () => OnPropertyChanged(nameof(HasRenderer)));
        }
Esempio n. 2
0
        async void OnOnRendererItemDeleted(RendererItem rendererItem)
        {
            var match = RendererItems.FirstOrDefault(item => item.name().Equals(rendererItem.name()));

            if (match != null)
            {
                RendererItems.Remove(match);
            }

            if (IsRendererSet && !RendererItems.Any())
            {
                DisconnectRenderer();
            }

            await DispatchHelper.InvokeInUIThread(CoreDispatcherPriority.Normal, () => OnPropertyChanged(nameof(HasRenderer)));
        }