public NewsFeedElement(string name, string imageUrl, DateTimeOffset time, IEnumerable<TextBlock> headerBlocks, IEnumerable<TextBlock> bodyBlocks, UIImage littleImage, Action tapped) : base(null) { _name = name; Uri.TryCreate(imageUrl, UriKind.Absolute, out _imageUri); _time = time.ToDaysAgo(); _actionImage = littleImage; _tapped = tapped; var header = CreateAttributedStringFromBlocks(headerBlocks); _attributedHeader = header.Item1; _headerLinks = header.Item2; var body = CreateAttributedStringFromBlocks(bodyBlocks); _attributedBody = body.Item1; _bodyLinks = body.Item2; _bodyBlocks = bodyBlocks.Count(); _headerLinkDelegate = new LinkDelegate(_headerLinks, this); _bodyLinkDelegate = new LinkDelegate(_bodyLinks, this); }
public NewsFeedElement(string name, string imageUrl, DateTimeOffset time, IEnumerable <TextBlock> headerBlocks, IEnumerable <TextBlock> bodyBlocks, UIImage littleImage, Action tapped) : base(null) { _name = name; Uri.TryCreate(imageUrl, UriKind.Absolute, out _imageUri); _time = time.ToDaysAgo(); _actionImage = littleImage; _tapped = tapped; var header = CreateAttributedStringFromBlocks(headerBlocks); _attributedHeader = header.Item1; _headerLinks = header.Item2; var body = CreateAttributedStringFromBlocks(bodyBlocks); _attributedBody = body.Item1; _bodyLinks = body.Item2; _bodyBlocks = bodyBlocks.Count(); _headerLinkDelegate = new LinkDelegate(_headerLinks, this); _bodyLinkDelegate = new LinkDelegate(_bodyLinks, this); }
/// ----------------------------------------------------------------------------------- /// <summary> /// Clean up any resources being used. /// </summary> /// <param name="disposing"><c>true</c> to release both managed and unmanaged /// resources; <c>false</c> to release only unmanaged resources. /// </param> /// ----------------------------------------------------------------------------------- protected override void Dispose(bool disposing) { //Debug.WriteLineIf(!disposing, "****************** " + GetType().Name + " 'disposing' is false. ******************"); // Must not be run more than once. if (IsDisposed) return; FdoCache wndCache = null; if (disposing) { if (m_delegate != null) m_delegate.Dispose(); if (m_viewHelper != null) m_viewHelper.Dispose(); if (FwApp.App != null) { FwApp.App.OkToCloseApp = false; FwApp.App.RemoveWindow(this, out wndCache); } } // NOTE: base.Dispose() may need the FdoCache which RemoveWindow() wants to delete. base.Dispose(disposing); if (disposing) { if (FwApp.App != null) { FwApp.App.OkToCloseApp = true; if (wndCache != null) FwApp.App.RemoveFdoCache(wndCache); } } m_viewHelper = null; m_delegate = null; IncomingLinkHandler = null; }
private void BasicInit() { m_delegate = new MainWindowDelegate(this); IncomingLinkHandler = new LinkDelegate(OnIncomingLink); }
public static UIComponentVerificationProvider <Control <TOwner>, TOwner> WaitTo <TNavigateTo, TOwner>(this LinkDelegate <TNavigateTo, TOwner> clickable) where TNavigateTo : PageObject <TNavigateTo> where TOwner : PageObject <TOwner> { return(clickable.GetControl().WaitTo); }
public static DataProvider <string, TOwner> Content <TNavigateTo, TOwner>(this LinkDelegate <TNavigateTo, TOwner> clickable) where TNavigateTo : PageObject <TNavigateTo> where TOwner : PageObject <TOwner> { return(clickable.GetControl().Content); }
public static bool Missing <TNavigateTo, TOwner>(this LinkDelegate <TNavigateTo, TOwner> clickable, SearchOptions options = null) where TNavigateTo : PageObject <TNavigateTo> where TOwner : PageObject <TOwner> { return(clickable.GetControl().Missing(options)); }
public static TOwner Focus <TOwner>(this LinkDelegate <TOwner> clickable) where TOwner : PageObject <TOwner> { return(clickable.GetControl().Focus()); }
public static TOwner ScrollTo <TNavigateTo, TOwner>(this LinkDelegate <TNavigateTo, TOwner> clickable) where TNavigateTo : PageObject <TNavigateTo> where TOwner : PageObject <TOwner> { return(clickable.GetControl().ScrollTo()); }
public static Link <TNavigateTo, TOwner> GetControl <TNavigateTo, TOwner>(this LinkDelegate <TNavigateTo, TOwner> clickable) where TNavigateTo : PageObject <TNavigateTo> where TOwner : PageObject <TOwner> { return((Link <TNavigateTo, TOwner>)UIComponentResolver.GetControlByDelegate <TOwner>(clickable)); }
public static UIComponentVerificationProvider <Control <TOwner>, TOwner> Should <TOwner>(this LinkDelegate <TOwner> clickable) where TOwner : PageObject <TOwner> { return(clickable.GetControl().Should); }
public static bool Exists <TOwner>(this LinkDelegate <TOwner> clickable, SearchOptions options = null) where TOwner : PageObject <TOwner> { return(clickable.GetControl().Exists(options)); }
public static TOwner RightClick <TOwner>(this LinkDelegate <TOwner> clickable) where TOwner : PageObject <TOwner> { return(clickable.GetControl().RightClick()); }
public void AddLinkEvent(LinkDelegate del) { _linkEvent += del; }
public static bool IsEnabled <TNavigateTo, TOwner>(this LinkDelegate <TNavigateTo, TOwner> clickable) where TNavigateTo : PageObject <TNavigateTo> where TOwner : PageObject <TOwner> { return(clickable.GetControl().IsEnabled.Value); }
public void RemoveLinkEvent(LinkDelegate del) { _linkEvent -= del; }
public static TNavigateTo ClickAndGo <TNavigateTo, TOwner>(this LinkDelegate <TNavigateTo, TOwner> linkDelegate) where TNavigateTo : PageObject <TNavigateTo> where TOwner : PageObject <TOwner> { return(linkDelegate.GetControl().ClickAndGo()); }