Exemple #1
0
        private static bool RefreshSpeakerButton(Element el, TranscriptionParagraph val)
        {
            if (val == null)
                return false;
            var currentvis = el.buttonSpeaker.Visibility;
            var setvis = Visibility.Visible;
            var previous = val.PreviousSibling() as TranscriptionParagraph;
            if (previous != null && val != null)
                if (val.Speaker == previous.Speaker && val.Language == previous.Language)
                    setvis = Visibility.Collapsed;

            if (currentvis != setvis)
            {
                el.buttonSpeaker.Visibility = setvis;
                return true;
            }

            return false;
        }
 /// <summary>
 /// 
 /// </summary>
 /// <param name="e">if param is null, refresh speakers on all rendered elemens </param>
 public void SpeakerChanged(Element e = null)
 {
     foreach (Element ee in listbox.VisualFindChildren<Element>())
     {
         ee.RefreshSpeakerInfos();
     }
 }