Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
XIU2 committed Sep 15, 2020
1 parent 7bd4ab4 commit f5fd5c5
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
5 changes: 1 addition & 4 deletions File.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public static string Get_Shortcut_TargetPath_Array(string[] Shortcut_Path, strin
{
foreach (string Temp_Shortcut_Path in Shortcut_Path)
{
Debug.Print(Temp_Shortcut_Path);
if (Get_Shortcut_TargetPath(Temp_Shortcut_Path) == Path)
{
return Temp_Shortcut_Path;
Expand Down Expand Up @@ -70,10 +71,6 @@ public class File
/// <returns>返回 找到的文件数组(完整路径)</returns>
public static string[] File_Enumeration(string Path, string FileName, bool Traversal)
{
if (Path.Substring(Path.Length - 1, 1) != @"\")
{
Path += @"\";
}
if (Traversal == true)
{
return System.IO.Directory.GetFiles(Path, FileName, System.IO.SearchOption.AllDirectories);
Expand Down
6 changes: 4 additions & 2 deletions Form.cs
Original file line number Diff line number Diff line change
Expand Up @@ -664,14 +664,16 @@ private void TextBox_程序路径_TextChanged(object sender, EventArgs e) // 输
TextBox_程序路径_Leave_2();
if (TextBox_程序路径.Text != "")
{
string Temp_Shortcut_Path;
string Temp_Shortcut_Name; // 临时快捷方式文件名
Button_添加磁贴.Enabled = Button_查看.Enabled = Button_初始化.Enabled = true; // 程序路径不等于空时,允许添加磁贴等按钮
string Temp_Shortcut_Path = File_cs.Shortcut.Get_Shortcut_TargetPath_Array(File_cs.File.File_Enumeration(System.Environment.GetFolderPath(System.Environment.SpecialFolder.Programs), "*.lnk", true), TextBox_程序路径.Text);
Temp_Shortcut_Path = File_cs.Shortcut.Get_Shortcut_TargetPath_Array(File_cs.File.File_Enumeration(System.Environment.GetFolderPath(System.Environment.SpecialFolder.Programs), "*.lnk", true), TextBox_程序路径.Text);
// 如果没找到磁贴快捷方式,那就去所有用户的程序目录找下
if(Temp_Shortcut_Path == "")
if (Temp_Shortcut_Path == null)
{
Temp_Shortcut_Path = File_cs.Shortcut.Get_Shortcut_TargetPath_Array(File_cs.File.File_Enumeration(System.Environment.GetFolderPath(System.Environment.SpecialFolder.CommonPrograms), "*.lnk", true), TextBox_程序路径.Text);
}
//Debug.Print("Temp_Shortcut_Path " + Temp_Shortcut_Path);
// 如果找到了磁贴快捷方式,就设置全局变量 快捷方式文件名、快捷方式路径
if (Temp_Shortcut_Path != null)
{
Expand Down
4 changes: 2 additions & 2 deletions Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("4.0.3.0")]
[assembly: AssemblyFileVersion("4.0.3.0")]
[assembly: AssemblyVersion("4.0.4.0")]
[assembly: AssemblyFileVersion("4.0.4.0")]
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

最近体验了下 Win10 2004 的新版磁贴(开启方法见网盘),统一背景颜色为主题色、磁贴半透明了,感觉还不错。于是我闲的没事用 C# 重写并开源了(虽然也没人看)~
详细介绍、使用说明请看:https://zhuanlan.zhihu.com/p/79630122
磁贴辅助小工具开源:https://github.com/XIU2/TileAssistTool

****

Expand Down

0 comments on commit f5fd5c5

Please sign in to comment.