MusicBeePlugin.Plugin.ReceiveNotification C# (CSharp) Méthode

ReceiveNotification() public méthode

public ReceiveNotification ( String source, NotificationType type ) : void
source String
type NotificationType
Résultat void
        public void ReceiveNotification(String source, NotificationType type)
        {
            //MessageBox.Show("ReceiveNotification(" + source + ", " + type + ")");
            lyricsReloaded.getLogger().debug("Received a notification of type {0}", type);
            switch (type)
            {
                case NotificationType.PluginStartup:
                    String proxySetting = musicBee.Setting_GetWebProxy();
                    if (!string.IsNullOrEmpty(proxySetting))
                    {
                        lyricsReloaded.getLogger().debug("Proxy setting found");
                        string[] raw = proxySetting.Split(Convert.ToChar(0));
                        WebProxy proxy = new WebProxy(raw[0]);
                        if (raw.Length >= 3)
                        {
                            lyricsReloaded.getLogger().debug("Proxy credentials found");
                            proxy.Credentials = new NetworkCredential(raw[1], raw[2]);
                        }
                        lyricsReloaded.setProxy(proxy);
                    }

                    lyricsReloaded.checkForNewVersion(newAvailable => {
                        if (newAvailable)
                        {
                            MessageBox.Show("A new version is available!", "LyricsReloaded!");
                        }
                    });

                    break;
            }
        }