コード例 #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 });
     }
 }
コード例 #2
0
        public CefMissingTab(string cefPath, object pluginLoader, TinyIoCContainer container)
        {
            InitializeComponent();

            _cefPath       = cefPath;
            _pluginLoader  = pluginLoader;
            lnkManual.Text = CefInstaller.GetUrl();
        }
コード例 #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);
            });
        }
コード例 #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 });
            }
        }