コード例 #1
0
 protected void initAppUpdater()
 {
     String curVersion= System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
     appUpdater = new AppUpdater.AppUpdater();
     appUpdater.updateCheckDone += appUpdater_updateCheckDoneSink;
     appUpdater.setAppVersionInfoFile(@"http://www.bassmaniacs.com/data/appversion.xml");
     //appUpdater.setAppVersionInfoFile(@"appversion.xml");
     appUpdater.setPollTime(60 * 60);
     appUpdater.checkForUpdate("raumwiese", curVersion);
 }
コード例 #2
0
        protected void initAppUpdater()
        {
            String curVersion = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();

            appUpdater = new AppUpdater.AppUpdater();
            appUpdater.updateCheckDone += appUpdater_updateCheckDoneSink;
            appUpdater.setAppVersionInfoFile(@"http://www.bassmaniacs.com/data/appversion.xml");
            //appUpdater.setAppVersionInfoFile(@"appversion.xml");
            appUpdater.setPollTime(60 * 60);
            appUpdater.checkForUpdate("raumwiese", curVersion);
        }
コード例 #3
0
 protected void appUpdater_updateCheckDoneSink(AppUpdater.AppUpdater.UpdateAvailable _updateAvailable, AppUpdater.AppUpdater.AppVersionInfo _appVersionInfo)
 {
     if (this.VersionUpdateInfo.Dispatcher.CheckAccess())
     {
         if (_updateAvailable == AppUpdater.AppUpdater.UpdateAvailable.Yes && !String.IsNullOrEmpty(_appVersionInfo.version))
         {
             VersionUpdateInfo.Content = String.Format("Neue Version ({0}) verfügbar!", _appVersionInfo.version);
             VersionUpdateInfo.Visibility = System.Windows.Visibility.Visible;
         }
         if (_updateAvailable == AppUpdater.AppUpdater.UpdateAvailable.Unknown)
         {
             VersionUpdateInfo.Content = String.Format("Check auf neue Version fehlgeschlagen!");
             VersionUpdateInfo.Visibility = System.Windows.Visibility.Visible;
         }
         if (_updateAvailable == AppUpdater.AppUpdater.UpdateAvailable.No)
         {
             VersionUpdateInfo.Content = "";
             VersionUpdateInfo.Visibility = System.Windows.Visibility.Collapsed;
         }
     }
     else
         this.VersionUpdateInfo.Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.Normal,
            new invoke_appUpdater_updateCheckDoneSink(this.appUpdater_updateCheckDoneSink), _updateAvailable, _appVersionInfo);
 }