예제 #1
0
        //public BaseWebView(IBaseWindow window)
        //    : base("about:blank") {
        //    parentWindow = window;
        //    implementer = new BaseWebViewImplementer(this);
        //}

        public BaseWebView(IBaseWindow window, BaseWebPage defaultPage)
            : base(defaultPage.Url.ToString())
        {
            Page         = defaultPage;
            parentWindow = window;
            implementer  = new BaseWebViewImplementer(this);
        }
예제 #2
0
 public BaseWebView(IBaseWindow window, BaseWebPage defaultPage, bool bouncingEnabled = false)
     : base()//window.Frame)
 {
     Page               = defaultPage;
     parentWindow       = window;
     implementer        = new BaseWebViewImplementer(this);
     ScrollView.Bounces = bouncingEnabled;
 }
예제 #3
0
        public BaseWebView(IBaseWindow window, BaseWebPage defaultPage = null)
            : base((Context)window)
        {
            parentWindow = window;
            Page         = defaultPage;
            implementer  = new BaseWebViewImplementer(this);


            scriptInterface = new SynchronousFrontendScriptInterface();
            AddJavascriptInterface((Java.Lang.Object)scriptInterface, scriptInterface.Name);
        }
        public void TestGetAncestorsWebsite()
        {
            var umbracoHelperService = new Mock<IUmbracoHelperService>();
            var currentContent = new BaseWebPage { Id = 1052 };
            var testRepository = new XmlUmbracoConfigRepository(Constants.DefaultDataFile);

            umbracoHelperService.Setup(x => x.TypedContent(currentContent.Id))
                .Returns(testRepository.GetNode(currentContent.Id));

            INodeService nodeService = SetupRepositoryNodeService(testRepository, umbracoHelperService.Object);

            IEnumerable<Website> websites = nodeService.GetAncestors<Website>(currentContent);

            Assert.AreEqual(1051, websites.First().Id);
        }
예제 #5
0
 public MainWebView(IBaseWindow window, BaseWebPage defaultPage)
     : base(window, defaultPage)
 {
 }
예제 #6
0
 public void LoadMarkup(BaseWebPage page)
 {
     Page = page;
     LoadMarkup(page.Url);
 }
 private static object MapBaseWebPage(IUmbracoMapper mapper, IPublishedContent contentToMapFrom, string propertyName, bool recursive)
 {
     var obj = new BaseWebPage();
     mapper.Map(UmbracoHelperService.TypedContent(contentToMapFrom.GetPropertyValue<int>(propertyName)), obj);
     return obj;
 }