如何在sharpshell中指定工作文件夹 [英] How to specify the working folder in sharpshell

查看:82
本文介绍了如何在sharpshell中指定工作文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

iam使用sharpshell,但我很困惑,我怎么能为图标叠加的文件指定路径





.NET Shell扩展 - Shell图标叠加处理程序 [ ^ ]



我尝试过:



protected override bool CanShowOverlay(字符串路径,SharpShell.Interop。 FILE_ATTRIBUTE属性)

{

试试

{



File.WriteAllLines( @C:\Abc.txt,new string [] {path});

//获取文件属性。

var fileAttributes = new FileInfo(path );



//如果文件是只读的,则返回true,me我们将显示叠加层。

返回fileAttributes.IsReadOnly;

}

catch(例外)

{

返回false;

}

}

iam using sharpshell but iam confused that how can i specify the path
for files for icon overlay

.NET Shell Extensions - Shell Icon Overlay Handlers[^]

What I have tried:

protected override bool CanShowOverlay(string path, SharpShell.Interop.FILE_ATTRIBUTE attributes)
{
try
{

File.WriteAllLines(@"C:\Abc.txt",new string[]{path});
// Get the file attributes.
var fileAttributes = new FileInfo(path);

// Return true if the file is read only, meaning we'll show the overlay.
return fileAttributes.IsReadOnly;
}
catch (Exception)
{
return false;
}
}

推荐答案

我是建议在与所引用文章相关的论坛上提出这个问题: .NET Shell扩展 - Shell图标叠加处理程序 [ ^ ](直至文章)
I'd suggest to ask this question on the forum related to the referenced article: .NET Shell Extensions - Shell Icon Overlay Handlers[^] (down to the article)


这篇关于如何在sharpshell中指定工作文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆