Beispiel #1
0
        private void StartDownload(List <DownloadFileInfo> downloadList)
        {
            DownloadProgress dp = new DownloadProgress(downloadList);

            if (dp.ShowDialog() == DialogResult.OK)
            {
                //
                if (DialogResult.Cancel == dp.ShowDialog())
                {
                    return;
                }
                //Update successfully
                config.SaveConfig(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, ConstFile.FILENAME));

                if (bNeedRestart)
                {
                    //Delete the temp folder
                    Directory.Delete(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, ConstFile.TEMPFOLDERNAME), true);

                    if (config.Silence != true)
                    {
                        MessageBox.Show(ConstFile.APPLYTHEUPDATE, ConstFile.MESSAGETITLE, MessageBoxButtons.OK, MessageBoxIcon.Information);
                    }
                    CommonUnitity.RestartApplication();
                }
            }
        }
        private void StartDownload(List <DownloadFileInfo> downloadList)
        {
            DownloadProgressCls dp = new DownloadProgressCls(downloadList, config);

            //if  (true)
            //{
            //    //
            //    if (true)
            //    {
            //        return;
            //    }
            //    //Update successfully
            config.SaveConfig(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, ConstFile.FILENAME));

            //    if (bNeedRestart)
            //    {
            //        //Delete the temp folder
            //        //Directory.Delete(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, ConstFile.TEMPFOLDERNAME), true);

            //       // MessageBox.Show(ConstFile.APPLYTHEUPDATE, ConstFile.MESSAGETITLE, MessageBoxButtons.OK, MessageBoxIcon.Information);
            //        CommonUnitity.RestartApplication();
            //    }
            //}
        }