Curtis Posted April 27, 2008 Share Posted April 27, 2008 OK, So I was just wondering, and haven't found anything through searching, where can I get the path of the last folder that Paint.NET has used. The one that Paint.NET uses when it launches a new open file dialog. Thats if plugins are allowed to use it of course. Quote Plugins Link to comment Share on other sites More sharing options...
Simon Brown Posted April 27, 2008 Share Posted April 27, 2008 Why would you need to? Quote Link to comment Share on other sites More sharing options...
Curtis Posted April 27, 2008 Author Share Posted April 27, 2008 So that, in the plugin I'm making, when I launch an open file dialog, the user won't have to navigate all the way back to the last directory they were in to open files, the same way you don't have to navigate around when you open two consecutive files in Paint.NET. Quote Plugins Link to comment Share on other sites More sharing options...
Simon Brown Posted April 27, 2008 Share Posted April 27, 2008 Have you tried looking around intellisense? Quote Link to comment Share on other sites More sharing options...
Curtis Posted April 27, 2008 Author Share Posted April 27, 2008 Yep, and can't find anything, so its either marked as internal or something or I'm not looking hard enough. Either way, still can't hurt to ask. Quote Plugins Link to comment Share on other sites More sharing options...
Simon Brown Posted April 27, 2008 Share Posted April 27, 2008 I have found the registry key: HKEY_CURRENT_USER\Software\Paint.NET\LastFileDialogDirectory. Quote Link to comment Share on other sites More sharing options...
Curtis Posted April 27, 2008 Author Share Posted April 27, 2008 Thats what I am after, I just thought Rick might have made a wrapper method for getting that whenever he needs it, But I guess I could use that if I have to. Quote Plugins Link to comment Share on other sites More sharing options...
Curtis Posted April 27, 2008 Author Share Posted April 27, 2008 OK, so I got it working using the registry key, I would prefer to just use a method already provided by Paint.NET, but I suppose this will work for the time being. What would really be good is if Paint.NET had code for quickly making an open file dialog with all the file type filters and everything pre-set, by working out what file type plugins it has available. Quote Plugins Link to comment Share on other sites More sharing options...
barkbark00 Posted April 27, 2008 Share Posted April 27, 2008 Your not working on the Displacement effect, are you? *crosses fingers* Quote  Take responsibility for your own intelligence. -Rick Brewster Link to comment Share on other sites More sharing options...
Curtis Posted April 27, 2008 Author Share Posted April 27, 2008 No, sorry, its for something else. Quote Plugins Link to comment Share on other sites More sharing options...
Curtis Posted April 28, 2008 Author Share Posted April 28, 2008 Well, after digging through the source code I found what I was after, but parts of it are marked internal or something so I don't think Rick wants us using them. Doesn't matter though I got it working a different way. Quote Plugins Link to comment Share on other sites More sharing options...
Simon Brown Posted April 28, 2008 Share Posted April 28, 2008 I got it working a different way. Please don't tell me your plugin looks directly through the computer's ram and gets the path from there? Quote Link to comment Share on other sites More sharing options...
Mike Ryan Posted April 28, 2008 Share Posted April 28, 2008 OK, so I got it working using the registry key Quote Link to comment Share on other sites More sharing options...
pyrochild Posted April 28, 2008 Share Posted April 28, 2008 Please don't tell me your plugin looks directly through the computer's ram and gets the path from there? How is that even feasible, much less practical? By the way, Curtis, you can use PaintDotNet.SystemLayer.Settings.CurrentUser.GetString("LastFileDialogDirectory"); I'm not sure if that's legal, though. Of course, there's nothing wrong with getting it straight from the registry, either. Quote ambigram signature by Kemaru [i write plugins and stuff] If you like a post, upvote it! Link to comment Share on other sites More sharing options...
Rick Brewster Posted April 28, 2008 Share Posted April 28, 2008 SystemLayer.Settings won't be available in v4.0. It is for Paint.NET internal use only. Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
pyrochild Posted April 28, 2008 Share Posted April 28, 2008 Quote ambigram signature by Kemaru [i write plugins and stuff] If you like a post, upvote it! Link to comment Share on other sites More sharing options...
Curtis Posted April 29, 2008 Author Share Posted April 29, 2008 SystemLayer.Settings won't be available in v4.0. It is for Paint.NET internal use only. Thats what I thought, so I just left that alone. Anyway, new plugin coming soon. Quote Plugins Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.