Exemple #1
0
        public void UpdateInteractive()
        {
            var latestVersion = CheckForUpdate();

            if (latestVersion is null)
            {
                NoUpdatesFound?.Invoke();
            }
            else
            {
                UpdateInteractive(latestVersion);
            }
        }
 /// <summary>
 /// 引发 <see cref="NoUpdatesFound"/> 事件
 /// </summary>
 protected virtual void OnNoUpdatesFound()
 {
     if (PeekNextServer())
     {
         Trace.TraceWarning("尝试更新时出现服务器错误。正尝试自动切换至其它的服务器节点。已切换至 " + Context.Services[_serverIndex].Address);
         BeginUpdateChecking();
     }
     else
     {
         Trace.TraceWarning("尝试更新时出现服务器错误,且服务器已遍历完成。");
         NoUpdatesFound?.Invoke(this, EventArgs.Empty);
     }
 }