コード例 #1
0
        private View DC2Audio(EbMobileDataColumn dc, object value)
        {
            EbPlayButton audioButton = new EbPlayButton(dc)
            {
                Style     = (Style)HelperFunctions.GetResourceValue("ListViewAudioButton"),
                IsEnabled = !(value == null)
            };

            audioButton.SetDimensions(dc);

            if (value != null)
            {
                audioButton.SetValue(value);

                audioButton.Clicked += (sender, e) =>
                {
                    Page current = App.Navigation.GetCurrentPage();
                    if (current is IListRenderer ls)
                    {
                        ls.ShowAudioFiles((EbPlayButton)sender);
                    }
                };
            }

            return(audioButton);
        }
コード例 #2
0
        public override void ShowAudioFiles(EbPlayButton playButton)
        {
            if (playButton.AudioFiles == null)
            {
                return;
            }

            AudioPopup.Children.Clear();

            foreach (var file in playButton.AudioFiles)
            {
                EbAudioTemplate template = new EbAudioTemplate(file.Bytea)
                {
                    AllowDelete = false
                };
                Frame view = (Frame)template.CreateView();
                view.HasShadow = false;
                AudioPopup.Children.Add(view);
            }
            AudioPopupView.Show();
        }
コード例 #3
0
 public virtual void ShowAudioFiles(EbPlayButton playButton)
 {
 }