コード例 #1
0
 public static int CheckForMacUpdate(string domainID, string currentVersion, out string serverVersion)
 {
     int retval = -1;
                 string ServerVersion = null;
                 ClientUpgrade cu = new ClientUpgrade(domainID);
                 StatusCodes stat = cu.CheckForMacUpdate(currentVersion, out ServerVersion);
                 switch( stat)
                 {
                         case StatusCodes.Success:
                                         retval = (int)UpgradeResult.Latest;
                                         break;
                         case StatusCodes.UpgradeNeeded:
                                         retval = (int)UpgradeResult.UpgradeNeeded;
                                         break;
                         case StatusCodes.ServerOld:
                                         retval = (int)UpgradeResult.ServerOld;
                    Version ver = new Version(ServerVersion);
                    if (ver.Major == 3 && ver.Minor >= 6)
                        retval = (int)UpgradeResult.Latest;
                                         break;
                         case StatusCodes.OlderVersion:
                                         retval = (int)UpgradeResult.UpgradeAvailable;
                                         break;
                         case StatusCodes.Unknown:
                                         retval = (int)UpgradeResult.Unknown;
                                         break;
                         default:
                                         break;
                 }
                 serverVersion = ServerVersion;
                 return retval;
 }
コード例 #2
0
ファイル: ClientUpgrade.cs プロジェクト: lulzzz/ifolder
        /// <summary>
        /// Mac: Checks to see if there is a newer client application on the domain server and
        /// prompts the user to upgrade.
        /// </summary>
        /// <param name="domainID">The ID of the domain to check for updates against</param>
        /// <param name="currentVersion">Current version of Mac client</param>
        /// <returns>The version of the update if available. Otherwise null is returned.</returns>
        public static int CheckForMacUpdate(string domainID, string currentVersion, out string serverVersion)
        {
            int retval = -1;

            string        ServerVersion = null;
            ClientUpgrade cu            = new ClientUpgrade(domainID);
            StatusCodes   stat          = cu.CheckForMacUpdate(currentVersion, out ServerVersion);

            switch (stat)
            {
            case StatusCodes.Success:
                retval = (int)UpgradeResult.Latest;
                break;

            case StatusCodes.UpgradeNeeded:
                retval = (int)UpgradeResult.UpgradeNeeded;
                break;

            case StatusCodes.ServerOld:
                retval = (int)UpgradeResult.ServerOld;
                Version ver = new Version(ServerVersion);
                if (ver.Major == 3 && ver.Minor >= 6)
                {
                    retval = (int)UpgradeResult.Latest;
                }
                break;

            case StatusCodes.OlderVersion:
                retval = (int)UpgradeResult.UpgradeAvailable;
                break;

            case StatusCodes.Unknown:
                retval = (int)UpgradeResult.Unknown;
                break;

            default:
                break;
            }

            serverVersion = ServerVersion;
            return(retval);
        }
コード例 #3
0
ファイル: ClientUpgrade.cs プロジェクト: lulzzz/ifolder
        /// <summary>
        /// Gets the updated client application and runs the installation program.
        /// Note: This call will return before the application is updated.
        /// </summary>
        /// <param name="domainID">The ID of the domain to check for updates against.</param>
        /// <returns>True if the installation program is successfully started. Otherwise false is returned.</returns>
        public static bool RunUpdate(string domainID, string path)
        {
            ClientUpgrade cu = new ClientUpgrade(domainID);

            return(cu.RunUpdate(path));
        }
コード例 #4
0
ファイル: ClientUpgrade.cs プロジェクト: lulzzz/ifolder
        public static string CheckForUpdateAvailable(string domainID)
        {
            ClientUpgrade cu = new ClientUpgrade(domainID);

            return(cu.CheckForUpdateAvailable());
        }
コード例 #5
0
ファイル: ClientUpgrade.cs プロジェクト: lulzzz/ifolder
        /// <summary>
        /// Checks for Server Update
        /// </summary>
        /// <param name="domainID"></param>
        public static bool CheckForServerUpdate(string domainID)
        {
            ClientUpgrade cu = new ClientUpgrade(domainID);

            return(cu.CheckForServerUpdate());
        }
コード例 #6
0
 public static bool CheckForServerUpdate(string domainID)
 {
     ClientUpgrade cu = new ClientUpgrade(domainID);
        return cu.CheckForServerUpdate();
 }
コード例 #7
0
 public static bool RunUpdate(string domainID, string path)
 {
     ClientUpgrade cu = new ClientUpgrade(domainID);
        return cu.RunUpdate(path);
 }
コード例 #8
0
 public static string CheckForUpdateAvailable(string domainID)
 {
     ClientUpgrade cu = new ClientUpgrade(domainID);
        return cu.CheckForUpdateAvailable();
 }