Exemple #1
0
        private void updateMediaBox(MediaBox box)
        {
            if (box != null)
            {
                IMedia media = box.Media;
                if (media != null)
                {
                    control.mediaSettingsButton.Visibility   = Visibility.Visible;
                    control.mediaStatusFileNameLabel.Text    = Path.GetFileName(media.GetFilepath());
                    control.mediaStatusFileNameLabel.ToolTip = media.GetFilepath();
                    control.mediaStatusSampleRateLabel.Text  = media.GetSampleRate().ToString() + " Hz";
                    if (media.HasAudio())
                    {
                        control.mediaVolumeControl.volumeSlider.Value = media.GetVolume();
                        control.mediaVolumeControl.Visibility         = Visibility.Visible;
                    }
                    else
                    {
                        control.mediaVolumeControl.Visibility = Visibility.Collapsed;
                    }
                    control.mediaCloseButton.Visibility = playIsPlaying ? Visibility.Hidden : Visibility.Visible;

                    if (AnnoTierStatic.Selected != null)
                    {
                        control.navigator.askforlabels.Visibility = AnnoTierStatic.Selected.AnnoList.Scheme.Type == AnnoScheme.TYPE.FREE ? Visibility.Visible : Visibility.Collapsed;
                        control.navigator.askforlabels.IsChecked  = AnnoTierStatic.Selected.AnnoList.Scheme.Type == AnnoScheme.TYPE.FREE ? control.navigator.askforlabels.IsChecked : false;
                    }
                }
            }
        }