Beispiel #1
0
        private void toolStripMenuItemCleanupFiles_Click(object sender, EventArgs e)
        {
            try
            {
                DialogResult dialogResult = MessageBox.Show(this,
                                                            "This will remove any of the files on disk that were downloaded from " +
                                                            DriveService.Settings.Product +
                                                            ".\r\n\r\nAre you sure you want to remove any downloaded files?",
                                                            DriveService.Settings.Product,
                                                            MessageBoxButtons.YesNo,
                                                            MessageBoxIcon.Question);

                if (dialogResult != System.Windows.Forms.DialogResult.Yes)
                {
                    return;
                }

                DriveService.CleanupFiles();
            }
            catch (Exception exception)
            {
                Log.Error(exception, false);
            }
        }