Esempio n. 1
0
        public Host(SciterWindow window)
            : base(window : window)
        {
            this.RegisterBehaviorHandler(typeof(ImgDrawBehavior))
            .AttachEventHandler(new HostEventHandler());

#if DEBUG
            string location = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);

            location += "\\..\\..\\..\\..\\..";

            string path = Path.Combine(location, "res", "index.html");

            Uri uri = new Uri(path, UriKind.Absolute);

            Debug.Assert(uri.IsFile);

            Debug.Assert(File.Exists(uri.AbsolutePath));
#else
            Uri uri = new Uri("file:///Users/midiway/Documents/SciterSharp/Tests/SciterTest.Mac/res/index.html", UriKind.Absolute);
#endif

            window.LoadPage(uri: uri);
            window.CenterWindow()
            .Show();
        }