Ejemplo n.º 1
0
        /// <summary>
        /// 自动截图
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void AutomaticToolStripMenuItem_Click(object sender, EventArgs e)
        {
            bool scan = VideoData.ScanFolder(focusedfolder);

            if (!scan)
            {
                return;
            }
            List <int> ids   = VideoData.GetAllVideoPlay(focusedfolder.Name).Select(t => t.Id).ToList();
            bool       iswin = VideoData.AddAutomaticScreenshot(ids);

            if (!iswin)
            {
                MessageBox.Show("添加失败");
                Program.log.Error($"添加批次{focusedfolder.Name}到自动截图失败");
                return;
            }
            MessageBox.Show("添加成功");
            Program.log.Info($"添加批次{focusedfolder.Name}到自动截图成功");
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 添加自动截图
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void AutomaticToolStripMenuItem_Click(object sender, EventArgs e)
        {
            List <int> ids = GetCheckList().Select(t => t.Id).ToList();

            if (ids.Count == 0)
            {
                return;
            }
            bool win = VideoData.AddAutomaticScreenshot(ids);

            if (win)
            {
                MessageBox.Show("添加成功");
                Program.log.Info($"添加自动截图,视频ID{string.Join(",",ids)}");
                bindingSource1.DataSource = null;
                PostVideos();
                return;
            }
            MessageBox.Show("添加失败");
            Program.log.Error($"添加自动截图,视频ID{string.Join(",", ids)}--失败");
        }