没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
private void listBox1_DragEnter(object sender, DragEventArgs e)
{
if (e.Data.GetDataPresent(DataFormats.FileDrop))
{
e.Effect = DragDropEffects.Copy;
}
else
{
e.Effect = DragDropEffects.None;
}
}
private void listBox1_DragDrop(object sender, DragEventArgs e)
{
string[] test = (string[])e.Data.GetData(DataFormats.FileDrop, false);
//MessageBox.Show(test[0].ToString());
Tps1.Clear();
listBox1.Items.Clear();
try
{
if (test[0].ToString().Contains(".txt"))
{
StreamReader sr1 = new StreamReader(test[0].ToString(), Encoding.UTF8);
string line1;
while ((line1 = sr1.ReadLine()) != null)
{
if (line1.Trim() == "")
continue;
Tps1.Add(line1);
{
if (e.Data.GetDataPresent(DataFormats.FileDrop))
{
e.Effect = DragDropEffects.Copy;
}
else
{
e.Effect = DragDropEffects.None;
}
}
private void listBox1_DragDrop(object sender, DragEventArgs e)
{
string[] test = (string[])e.Data.GetData(DataFormats.FileDrop, false);
//MessageBox.Show(test[0].ToString());
Tps1.Clear();
listBox1.Items.Clear();
try
{
if (test[0].ToString().Contains(".txt"))
{
StreamReader sr1 = new StreamReader(test[0].ToString(), Encoding.UTF8);
string line1;
while ((line1 = sr1.ReadLine()) != null)
{
if (line1.Trim() == "")
continue;
Tps1.Add(line1);
资源评论
- acalldelay2019-01-24血亏,就是几行代码
- ccb902013-01-16就一个TEXT文档啊。。不值啊
guang_hui_yang
- 粉丝: 10
- 资源: 54
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功