Moving back to trunk!

git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1602 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
RKrom 2012-01-24 19:24:36 +00:00
commit 8d458998a1
332 changed files with 17647 additions and 9466 deletions

View file

@ -19,10 +19,18 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
using System;
using System.IO;
using System.Windows.Forms;
namespace Greenshot.Helpers {
public class SpecialFolderPatternConverter : log4net.Util.PatternConverter {
protected override void Convert(System.IO.TextWriter writer, object state) {
// Making Greenshot portable
string pafPath = Path.Combine(Application.StartupPath, @"App\Greenshot");
if (Directory.Exists(pafPath)) {
writer.Write(Path.Combine(Application.StartupPath, @"Data"));
return;
}
Environment.SpecialFolder specialFolder = (Environment.SpecialFolder)Enum.Parse(typeof(Environment.SpecialFolder), base.Option, true);
writer.Write(Environment.GetFolderPath(specialFolder));
}