public override void OnActivate()
        {
            if (OnQueueProcessed == null)
            {
                OnQueueProcessed = () => Main.menuMode = 0;
            }

            UpdateDisplayText();

            _loadProgress.SetProgress(0f);

            if (!UIModBrowser.PlatformSupportsTls12)
            {
                // Needed for downloads from Github
                Interface.errorMessage.Show("TLS 1.2 not supported on this computer.", 0);                 // github releases
                return;
            }

            _cts?.Dispose();
            _cts = new CancellationTokenSource();
            ProcessQueue();
        }
示例#2
0
        public override void OnActivate()
        {
            if (OnQueueProcessed == null)
            {
                OnQueueProcessed = () => Main.menuMode = 0;
            }

            UpdateDisplayText();

            _loadProgress.SetProgress(0f);

            // This doesn't actually work here, apparently you can't switch UIs OnActivate anyway

            /*if (!UIModBrowser.PlatformSupportsTls12) {
             *      // Needed for downloads from Github
             *      Interface.errorMessage.Show("TLS 1.2 not supported on this computer.", 0); // github releases
             *      return;
             * }*/

            _cts?.Dispose();
            _cts = new CancellationTokenSource();
            ProcessQueue();
        }
示例#3
0
 internal void SetProgress(double percent)
 {
     _loadProgress?.SetProgress((float)percent);
 }