开发者

Can i open directory from jump list

开发者 https://www.devze.com 2023-03-16 02:59 出处:网络
Im writing WPF application and want to add ability to call jump list and open program configuration, app.config or log directory from it. Is it possible(cant find the way to do that..just JumpTasks wi

Im writing WPF application and want to add ability to call jump list and open program configuration, app.config or log directory from it. Is it possible(cant find the way to do that..just JumpTasks with application path and JumpPath with path to开发者_如何学C file, and not just path to be opened via explorer)?


Found answer here. Seems that JumpList wasnt designed for opening anything but files or applications, associated with current program. So that when we see directories in explorer tasklist -it actually means: use explorer with parameters. By the way ill try to use it.
Update
made it with such code:

          string explorerPath = @"%windir%\explorer.exe";

            JumpTask path = new JumpTask
          {
              CustomCategory = "Paths",
              Title = "Open program directory",
              IconResourcePath = explorerPath,
              ApplicationPath = explorerPath,
              Arguments = @"/root," + AppDomain.CurrentDomain.BaseDirectory,
              Description = AppDomain.CurrentDomain.BaseDirectory
          };

Im leaving this answer here, because someone can have similar incomprehension.

0

精彩评论

暂无评论...
验证码 换一张
取 消