Example #1
0
        public void Load(string url)
        {
            if (url.StartsWith("/"))
            {
                url = "file://" + url;
            }

            try
            {
                Navigate(new Uri(url));
            }
            catch (UriFormatException)
            {
                var block = new iBlock
                {
                    Items =
                    {
                        new iFactr.Core.Controls.Label {
                            Text = Device.Resources.GetString("FailedNavigation"),
                        },
                    }
                };
                LoadFromString(block.Text);
            }
        }
Example #2
0
 protected void OutputBlock(iBlock block)
 {
     System.Console.WriteLine(block.Header);
     System.Console.WriteLine(StripHtml(block.Text));
 }
Example #3
0
 /// <summary>
 /// Generates an <see cref="iFactr.UI.ICell"/> instance from the specified <see cref="iBlock"/>.
 /// </summary>
 /// <param name="block">The block from which to generate the cell.</param>
 /// <param name="style">The <see cref="iFactr.Core.Styles.Style"/> instance that describes the block style,
 /// or <c>null</c> if the block will use the default style.</param>
 /// <param name="view">The view that the cell will reside in.</param>
 /// <param name="recycledCell">An <see cref="iFactr.UI.ICell"/> instance to use in place of a new one, or <c>null</c> if a new one is needed.</param>
 /// <returns>The generated cell for the specified block.</returns>
 public static ICell Convert(this iBlock block, Style style, IListView view, ICell recycledCell)
 {
     return(iApp.Factory.Converter.ConvertToCell(block, style, view, recycledCell));
 }