Ejemplo n.º 1
0
 /// <summary>
 /// 清除扫描信息
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void DELToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         if (focusedfolder == null || focusedfolder.Uri == null)
         {
             return;
         }
         DialogResult dr = MessageBox.Show("删除扫描信息将会清除所有已经保存的视频信息,确认是否删除?", "是否删除扫描信息",
                                           MessageBoxButtons.OKCancel);
         if (dr != DialogResult.OK)
         {
             return;
         }
         bool win = VideoData.DeleteScanFolder(focusedfolder.Id);
         if (!win)
         {
             MessageBox.Show("清除扫描信息失败");
             Program.log.Error("清除扫描信息", new Exception("清除扫描信息失败"));
         }
         Program.log.Error($"{focusedfolder.Id}清除扫描信息", new Exception($"清除扫描信息"));
     }
     catch (Exception ex)
     {
         Program.log.Error($"清除扫描信息", ex);
         throw;
     }
 }