Esempio n. 1
0
        public void Initialize( )
        {
            //Initialize
            InitializeComponent( );

            //Initalize Images
            rightInnerImage.Source   = StdApi.ConvertImage(Properties.Resources.Right);
            leftInnerImage.Source    = StdApi.ConvertImage(Properties.Resources.Left);
            refreshInnerImage.Source = StdApi.ConvertIcon(Properties.Resources.RefreshIcon);
            newInnerImage.Source     = StdApi.ConvertImage(Properties.Resources.New);

            //ChromiumWebBrowsers
            var settings = new CefSettings();

            settings.CefCommandLineArgs.Add("enable-media-stream", "1");
            settings.CefCommandLineArgs.Add("no-proxy-server", "1");
            settings.Locale             = "zh-CN";
            settings.AcceptLanguageList = "zh-CN";
            settings.CefCommandLineArgs["enable-system-flash"] = "1";
            settings.CefCommandLineArgs["log_severity"]        = "disabled";
            settings.CefCommandLineArgs.Add("remote-debugging-port", "9922");
            settings.CefCommandLineArgs.Add("ppapi-flash-path", "pepflashplayer.dll");
            settings.CefCommandLineArgs.Add("ppapi-flash-version", "99.0.0.999");
            Cef.Initialize(settings);
            cwb = new ExtChromiumBrowser();
            CWBGrid.Children.Add(cwb);
            cwb.Margin             = new Thickness(0, 0, 0, 0);
            cwb.AddressChanged    += Running;
            cwb.FrameLoadEnd      += Check;
            cwb.TitleChanged      += Cwb_TitleChanged;
            MenuHandler.mainWindow = this;
            //cwb.MenuHandler = new MenuHandler( );
            cwb.DownloadHandler = new DownloadHandler();
            cwb.LoadError      += Cwb_LoadError;
        }
 private void ViewSource_Click(object sender, RoutedEventArgs e)
 {
     StdApi.ViewPageSource( );
 }