示例#1
0
        private void toolStripMenuItemClearCache_Click(object sender, EventArgs e)
        {
            try
            {
                DialogResult dialogResult = MessageBox.Show(this,
                                                            "This will delete any of the cached data about files listed in " +
                                                            DriveService.Settings.Product +
                                                            ".\r\n\r\nAre you sure you want to delete cached file data?",
                                                            DriveService.Settings.Product,
                                                            MessageBoxButtons.YesNo,
                                                            MessageBoxIcon.Question);

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

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