Exemple #1
0
        private ExplanationItemTemplate[] CreateStartItems()
        {
            ExplanationItemTemplate item1 = new ExplanationItemTemplate()
            {
                IsCallout  = false,
                IsCaption  = false,
                IsVoice    = true,
                VoiceLabel = "",
                IsShortVersionIndicated = false,
                CaptionText             = ""
            };
            ExplanationItemTemplate item2 = new ExplanationItemTemplate()
            {
                IsCallout  = false,
                IsCaption  = true,
                IsVoice    = false,
                VoiceLabel = PplFeatures.ELearningLab.DefaultVoiceLabel,
                IsShortVersionIndicated = false,
                CaptionText             = ""
            };
            ExplanationItemTemplate item3 = new ExplanationItemTemplate()
            {
                IsCallout  = true,
                IsCaption  = false,
                IsVoice    = false,
                VoiceLabel = "",
                IsShortVersionIndicated = true,
                CaptionText             = "Caption"
            };

            return(new ExplanationItemTemplate[3] {
                item1, item2, item3
            });
        }
 public ExplanationItemTemplate[] GetExplanations()
 {
     return(_pane.ELearningLabMainPanel.Dispatcher.Invoke(() =>
     {
         List <ExplanationItemTemplate> result = new List <ExplanationItemTemplate>();
         foreach (ExplanationItem item in _pane.ELearningLabMainPanel.Items.OfType <ExplanationItem>())
         {
             ExplanationItemTemplate template = new ExplanationItemTemplate();
             template.CopyFormat(item);
             result.Add(template);
         }
         return result.ToArray();
     }));
 }