private void txtLog_DragEnter(object sender, DragEventArgs e)
        {
            if (e.Data.GetDataPresent(DataFormats.FileDrop))
            {
                e.Effect = DragDropEffects.Copy;
            }
            else
            {
                e.Effect = DragDropEffects.None;
            }
        }

        private string MainLog = string.Empty;

        private void txtLog_DragDrop(object sender, DragEventArgs e)
        {
            txtLog.Clear();
            String[] files = e.Data.GetData(DataFormats.FileDrop, false) as String[];
            //Copy file from external application  
            foreach (string srcfile in files)
            {
                var log = File.ReadAllText(srcfile);
                string checkLog = ReadLog(log);
                txtLog.Text += checkLog;
            }

            SetColor();
        }

  

编辑器加载中...

相关文章:

  • 2021-04-09
  • 2022-12-23
  • 2022-12-23
  • 2021-12-02
  • 2021-07-12
  • 2021-12-29
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-08-08
  • 2022-12-23
  • 2021-09-26
  • 2022-12-23
  • 2021-12-22
  • 2021-07-21
  • 2022-12-23
相关资源
相似解决方案