Exemplo n.º 1
0
        public AutoUpdate(IHelper aHelper, string aUpdateFeedLocation, int aUpdateInterval, EUpdateType aUpdateTypes, uint aUpdateVersion)
        {
            AutoUpdate.EUpdateType currentBuildType = AutoUpdate.EUpdateType.Stable;
            if (aHelper.Product.Contains("(NightlyBuild)"))
            {
                currentBuildType = AutoUpdate.EUpdateType.Nightly;
            }
            else if (aHelper.Product.Contains("(Beta)"))
            {
                currentBuildType = AutoUpdate.EUpdateType.Beta;
            }
            else if (aHelper.Product.Contains("(Development)"))
            {
                currentBuildType = AutoUpdate.EUpdateType.Development;
            }

            string applicationTarget = string.Empty;

            switch (SystemInfo.Platform)
            {
            case PlatformId.Win32NT:
            case PlatformId.Win32S:
            case PlatformId.Win32Windows:
                applicationTarget = kTargetWindows;
                break;

            case PlatformId.MacOSX:
                applicationTarget = kTargetMacOsX;
                break;

            case PlatformId.IOS:
                applicationTarget = kTargetIos;
                break;

            case PlatformId.WinCE:
                applicationTarget = kTargetWindowsCe;
                break;

            default:
                Assert.Check(false);
                break;
            }

            Initialise(aHelper, aUpdateFeedLocation, aUpdateInterval, aUpdateTypes, aHelper.Title, applicationTarget, aUpdateVersion, currentBuildType);
        }
Exemplo n.º 2
0
 private void SetUpdateTypes()
 {
     iAutoUpdateType = AutoUpdate.EUpdateType.Stable;
     if (iOptionPageUpdates.BetaVersions)
     {
         iAutoUpdateType |= AutoUpdate.EUpdateType.Beta;
     }
     if (iOptionPageUpdates.DevelopmentVersions)
     {
         iAutoUpdateType |= AutoUpdate.EUpdateType.Development;
     }
     if (iOptionPageUpdates.NightlyBuilds)
     {
         iAutoUpdateType |= AutoUpdate.EUpdateType.Nightly;
     }
     if (iAutoUpdate != null)
     {
         iAutoUpdate.UpdateTypes = iAutoUpdateType;
     }
 }