Ejemplo n.º 1
0
 private async void btnStartAuto_Click(object sender, EventArgs e)
 {
     if (await CefInstaller.EnsureCef(_cefPath))
     {
         Parent.Controls.Remove(this);
         _pluginLoader.GetType().GetMethod("FinishInit").Invoke(_pluginLoader, new object[] { _container });
     }
 }
Ejemplo n.º 2
0
        public CefMissingTab(string cefPath, object pluginLoader, TinyIoCContainer container)
        {
            InitializeComponent();

            _cefPath       = cefPath;
            _pluginLoader  = pluginLoader;
            lnkManual.Text = CefInstaller.GetUrl();
        }
Ejemplo n.º 3
0
        public CefMissingTab(string cefPath, object pluginLoader, TinyIoCContainer container)
        {
            InitializeComponent();

            _cefPath       = cefPath;
            _pluginLoader  = pluginLoader;
            lnkManual.Text = CefInstaller.GetUrl();

            container.Resolve <ILogger>().RegisterListener((entry) =>
            {
                logBox.AppendText($"[{entry.Time}] {entry.Level}: {entry.Message}" + Environment.NewLine);
            });
        }
Ejemplo n.º 4
0
        private async void btnOpenManual_Click(object sender, EventArgs e)
        {
            var dialog = new OpenFileDialog();

            dialog.Filter = "CEF bundle|*.7z";
            var result = dialog.ShowDialog();

            if (result != DialogResult.OK)
            {
                return;
            }

            if (await CefInstaller.InstallCef(_cefPath, dialog.FileName))
            {
                Parent.Controls.Remove(this);
                _pluginLoader.GetType().GetMethod("FinishInit").Invoke(_pluginLoader, new object[] { _container });
            }
        }