Exemple #1
0
 public void Init(PluginInitContext context)
 {
     Context = context ?? throw new ArgumentNullException(nameof(context));
     Context.API.ThemeChanged += OnThemeChanged;
     UpdateIconPath(Context.API.GetCurrentTheme());
     BrowserInfo.UpdateIfTimePassed();
 }
Exemple #2
0
        public void ReloadData()
        {
            if (Context is null)
            {
                return;
            }

            BrowserInfo.UpdateIfTimePassed();
        }
Exemple #3
0
        public void ReloadData()
        {
            if (_context is null)
            {
                return;
            }

            UpdateIconPath(_context.API.GetCurrentTheme());
            BrowserInfo.UpdateIfTimePassed();
        }
Exemple #4
0
        public void Init(PluginInitContext context)
        {
            _context = context ?? throw new ArgumentNullException(nameof(context));
            _context.API.ThemeChanged += OnThemeChanged;
            UpdateIconPath(_context.API.GetCurrentTheme());
            BrowserInfo.UpdateIfTimePassed();

            onPluginError = () =>
            {
                string errorMsgString = string.Format(CultureInfo.CurrentCulture, Properties.Resources.plugin_search_failed, BrowserInfo.Name ?? BrowserInfo.MSEdgeName);

                Log.Error(errorMsgString, this.GetType());
                _context.API.ShowMsg(
                    $"Plugin: {Properties.Resources.plugin_name}",
                    errorMsgString);
            };
        }