Example #1
0
 void UpdateCurrentActivityControls(CurrentActivityDrawInfo data)
 {
     currentActivityCaptionLabel.Text = data.Caption;
     currentActivityDescription.Text  = data.DescriptionText;
     currentActivityDescription.Links.Clear();
     if (data.DescriptionLinks != null)
     {
         foreach (var l in data.DescriptionLinks)
         {
             currentActivityDescription.Links.Add(new LinkLabel.Link()
             {
                 LinkData = l.Item1,
                 Start    = l.Item2,
                 Length   = l.Item3
             });
         }
     }
     currentActivitySourceLinkLabel.Visible = data.SourceText != null;
     if (data.SourceText != null)
     {
         currentActivitySourceLinkLabel.Text = data.SourceText;
         currentActivitySourceLinkLabel.Links.Clear();
         currentActivitySourceLinkLabel.Links.Add(new LinkLabel.Link()
         {
             LinkData = data.SourceLink.Item1,
             Start    = data.SourceLink.Item2,
             Length   = data.SourceLink.Item3
         });
     }
 }
 void UpdateCurrentActivityControls(CurrentActivityDrawInfo data)
 {
     EnsureNibLoadeded();
     activityNameTextField.StringValue = data.Caption;
     activityDetailsLabel.StringValue  = data.DescriptionText;
     if (data.DescriptionLinks != null)
     {
         activityDetailsLabel.Links = data.DescriptionLinks.Select(l => new NSLinkLabel.Link(l.Item2, l.Item3, l.Item1)).ToArray();
     }
     else
     {
         activityDetailsLabel.Links = null;
     }
     activityLogSourceLabel.StringValue = data.SourceText;
     if (data.SourceLink != null)
     {
         activityLogSourceLabel.Links = new [] { new NSLinkLabel.Link(data.SourceLink.Item2, data.SourceLink.Item3, data.SourceLink.Item1) }
     }
     ;
     else
     {
         activityLogSourceLabel.Links = null;
     }
 }