public NeutroniumWindow(string path, string engine)
        {
            _View = new HTMLViewControl
            {
                IsDebug             = false,
                VerticalAlignment   = VerticalAlignment.Stretch,
                HorizontalAlignment = HorizontalAlignment.Stretch,
                Uri = new Uri(path),
                JavascriptUIEngine = engine,
                Name = "wcBrowser"
            };
            _View.OnFirstLoad += _View_OnFirstLoad;

            InitializeComponent();
            Main.Children.Add(_View);
        }
        internal void Test(Action<HTMLViewControl, WindowTest> Test, bool iDebug = false)
        {
            AssemblyHelper.SetEntryAssembly();
            HTMLViewControl wc1 = null;
            Func<HTMLViewControl> iWebControlFac = () =>
            {
                wc1 = new HTMLViewControl();
                wc1.IsDebug = iDebug;
                return wc1;
            };

            using (var wcontext = BuildWindow(iWebControlFac))
            {
                Test(wc1, wcontext);
            }
        }
Exemple #3
0
        internal void Test(Action <HTMLViewControl, WindowTest> Test, bool iDebug = false)
        {
            AssemblyHelper.SetEntryAssembly();
            HTMLViewControl        wc1            = null;
            Func <HTMLViewControl> iWebControlFac = () =>
            {
                wc1                    = new HTMLViewControl();
                wc1.IsDebug            = iDebug;
                wc1.EnableBrowserDebug = iDebug;
                return(wc1);
            };

            using (var wcontext = BuildWindow(iWebControlFac))
            {
                Test(wc1, wcontext);
            }
        }
        internal void Test(Action <HTMLViewControl, WindowTest> Test, bool iDebug = false, bool Cef = true)
        {
            if (Cef)
            {
                HTMLEngineFactory.Engine.Register(new CefGlueWPFWebWindowFactory());
            }

            AssemblyHelper.SetEntryAssembly();
            HTMLViewControl        wc1            = null;
            Func <HTMLViewControl> iWebControlFac = () =>
            {
                wc1         = new HTMLViewControl();
                wc1.IsDebug = iDebug;
                return(wc1);
            };

            using (var wcontext = BuildWindow(iWebControlFac))
            {
                Test(wc1, wcontext);
            }
        }
 public void Dispose()
 {
     _View?.Dispose();
     _View = null;
 }