コード例 #1
0
 public void UpdateSoftware(Action <float> updateMessage, Action <string> complete)
 {
     SCPTerminal.Shared.InstallUpdate(_softwareUpdate, new ReaderSoftwareUpdate(updateMessage), (ex) =>
     {
         _softwareUpdate = null;
         complete(ex?.LocalizedDescription);
     });
 }
コード例 #2
0
        public void CheckForSoftwareUpdate(Action <string, string> hasUpdate)
        {
            SCPTerminal.Shared.CheckForUpdate((readerUpdate, ex) =>
            {
                if (readerUpdate != null)
                {
                    _softwareUpdate = readerUpdate;
                    hasUpdate(readerUpdate?.EstimatedUpdateTime.ToString(), null);
                }
                else if (ex != null)
                {
                    hasUpdate(null, ex?.LocalizedDescription);
                }

                hasUpdate(null, null);
            });
        }