PeerCastStation.WPF.NotifyIconManager.NotifyNewVersions C# (CSharp) Method

NotifyNewVersions() public method

public NotifyNewVersions ( IEnumerable new_versions ) : void
new_versions IEnumerable
return void
    public void NotifyNewVersions(IEnumerable<VersionDescription> new_versions)
    {
      newVersionInfo = new_versions;
      notifyIcon.ShowBalloonTip(
        60000,
        "新しいバージョンがあります",
        newVersionInfo.First().Title,
        ToolTipIcon.Info);
    }

Usage Example

Ejemplo n.º 1
0
        override protected void OnStart()
        {
            appViewModel     = new PeerCastAppViewModel(Application);
            versionChecker   = new PeerCastStation.UI.Updater();
            notifyIconThread = new Thread(() => {
                notifyIconManager = new NotifyIconManager(appViewModel, this);
                versionChecker.NewVersionFound += (sender, e) => {
                    notifyIconManager.NotifyNewVersions(e.VersionDescriptions);
                };
                notifyIconManager.Run();
            });
            notifyIconThread.SetApartmentState(ApartmentState.STA);
            notifyIconThread.Start();
            versionCheckTimer = new Timer(OnVersionCheckTimer, null, 1000, 1000 * 3600 * 24);

            mainThread = new Thread(() => {
                var app      = new Application();
                var settings = Application.Settings.Get <WPFSettings>();
                mainWindow   = new MainWindow(appViewModel);
                if (settings.ShowWindowOnStartup)
                {
                    mainWindow.Show();
                }
                app.Run();
            });
            mainThread.Name = "WPF UI Thread";
            mainThread.SetApartmentState(ApartmentState.STA);
            mainThread.Start();
            Application.MessageNotified += OnMessageNotified;
        }
All Usage Examples Of PeerCastStation.WPF.NotifyIconManager::NotifyNewVersions