Ejemplo n.º 1
0
 /// <summary>
 /// Eventhandler for the Version Information is Available
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void onVersionInformationChanged(object sender, UpdateInformationAvailableEventArgs e)
 {
     /*
      * this.Dispatcher.Invoke(DispatcherPriority.Normal, new System.Windows.Threading.DispatcherOperationCallback(delegate
      * {
      *
      *  // Update the Labels wit the version Informations
      *  // lbCurrentVersion.Content = e.localCurrentVersion;
      *  // lbOnlineDebugVersion.Content = e.onlineDebugVersion;
      *  // lbOnlineReleaseVersion.Content = e.onlineReleaseVersion;
      *
      *  int _versionDifferent = e.localCurrentVersion.CompareTo(e.onlineReleaseVersion) ;
      *  if (_versionDifferent < 0)
      *  {
      *      lbNewStateRelease.Visibility = Visibility.Visible;
      *  }
      *  else
      *  {
      *      lbNewStateRelease.Visibility = Visibility.Hidden;
      *  }
      *
      *  _versionDifferent = e.localCurrentVersion.CompareTo(e.onlineDebugVersion);
      *  if (_versionDifferent < 0)
      *  {
      *      lbNewStateDebug.Visibility = Visibility.Visible;
      *  }
      *  else
      *  {
      *      lbNewStateDebug.Visibility = Visibility.Hidden;
      *  }
      *
      *  return null;
      * }), null);*/
 }
Ejemplo n.º 2
0
        /// <summary>
        /// The Working Thread to get the Online and Local Verion Number
        /// </summary>
        private void getVersions()
        {
            ReadStateDebugVersion   = Visibility.Visible;
            ReadStateReleaseVersion = Visibility.Visible;


            // Set the Event to notify with the Version Information
            UpdateInformationAvailableEventArgs _argument = new UpdateInformationAvailableEventArgs();

            // Load the Current Version
            getCurrentVerison();
            //_argument.localCurrentVersion = localCurrentVersion;
            //versionInformationChanged(_argument);


            if (CheckForInternetConnection())
            {
                // Load the Online Version
                getOnlineVersions();
            }


            if (LocalCurrentVersion < OnlineReleaseVersion)
            {
                NewStateReleaseVersion = Visibility.Visible;
            }
            else
            {
                NewStateReleaseVersion = Visibility.Collapsed;
            }


            if (LocalCurrentVersion < OnlineDebugVersion)
            {
                NewStateDebugVersion = Visibility.Visible;
            }
            else
            {
                NewStateDebugVersion = Visibility.Collapsed;
            }

            ReadStateDebugVersion   = Visibility.Collapsed;
            ReadStateReleaseVersion = Visibility.Collapsed;
        }