Exemple #1
0
        public void DownloadUpdate()
        {
            string downloadDir = Path.Combine(Config.ElpisAppData, "Updates");

            if (!Directory.Exists(downloadDir))
            {
                try
                {
                    Directory.CreateDirectory(downloadDir);
                }
                catch (Exception ex)
                {
                    Log.O("Trouble creating update directory! " + ex);
                    return;
                }
            }

            string downloadFile = Path.Combine(downloadDir, "ElpisUpdate.exe");

            if (File.Exists(downloadFile))
            {
                File.Delete(downloadFile);
            }

            _update.DownloadUpdateAsync(downloadFile);
        }