예제 #1
0
        private void checkForNewVersionThreadMethod()
        {
            List <PackageItem> result = getPackageItems(true);
            PackageItem        pi     = (from p in result where p.packagetype.ToLower() == "core" select p).FirstOrDefault();

            if (pi != null)
            {
#if DEBUG
                if (pi.version > System.Reflection.Assembly.GetEntryAssembly().GetName().Version)
#else
                if (pi.version > System.Reflection.Assembly.GetEntryAssembly().GetName().Version)
#endif
                {
                    _context.Post(new SendOrPostCallback(delegate(object state)
                    {
                        NewCoreVersionAvailableNotification n = new NewCoreVersionAvailableNotification();
                        n.DownloadLink = pi.link;
                        (OwnerPlugin as PackageManager).OnNotification(n);
                        n.DownloadAndInstall += new EventHandler <EventArgs>(n_DownloadAndInstall);
                    }), null);
                }
            }
        }
예제 #2
0
        private void checkForNewVersionThreadMethod()
        {
            List<PackageItem> result = getPackageItems(true);
            PackageItem pi = (from p in result where p.packagetype.ToLower() == "core" select p).FirstOrDefault();
            if (pi != null)
            {
#if DEBUG
                if (pi.version > System.Reflection.Assembly.GetEntryAssembly().GetName().Version)
#else
                if (pi.version > System.Reflection.Assembly.GetEntryAssembly().GetName().Version)
#endif
                {
                    _context.Post(new SendOrPostCallback(delegate(object state)
                    {
                        NewCoreVersionAvailableNotification n = new NewCoreVersionAvailableNotification();
                        n.DownloadLink = pi.link;
                        (OwnerPlugin as PackageManager).OnNotification(n);
                        n.DownloadAndInstall += new EventHandler<EventArgs>(n_DownloadAndInstall);
                    }), null);
                }
            }
        }