clean up a bit

This commit is contained in:
Hylke Bons 2012-12-06 19:33:39 +00:00
parent 7c8a9e69a0
commit 9c21474c49
3 changed files with 20 additions and 20 deletions

View file

@ -25,7 +25,7 @@ namespace SparkleLib {
public class SparkleConfig : XmlDocument {
public static SparkleConfig DefaultConfig;
public static bool DebugMode = false;
public static bool DebugMode = true;
public string FullPath;
public string TmpPath;
@ -291,23 +291,6 @@ namespace SparkleLib {
}
private XmlNode GetFolder (string name)
{
return SelectSingleNode (string.Format ("/sparkleshare/folder[name=\"{0}\"]", name));
}
private string GetFolderValue (string name, string key)
{
XmlNode folder = GetFolder(name);
if ((folder != null) && (folder [key] != null))
return folder [key].InnerText;
else
return null;
}
public string GetConfigOption (string name)
{
XmlNode node = SelectSingleNode ("/sparkleshare/" + name);
@ -339,6 +322,23 @@ namespace SparkleLib {
}
private XmlNode GetFolder (string name)
{
return SelectSingleNode (string.Format ("/sparkleshare/folder[name=\"{0}\"]", name));
}
private string GetFolderValue (string name, string key)
{
XmlNode folder = GetFolder(name);
if ((folder != null) && (folder [key] != null))
return folder [key].InnerText;
else
return null;
}
private void Save ()
{
if (!File.Exists (FullPath))

View file

@ -1,8 +1,9 @@
// Originally taken from:
// https://github.com/jesse99/Continuum/blob/master/source/shared/DirectoryWatcher.cs
// Modified to use MonoMac and integrate into SparkleShare
//
// Copyright (C) 2008 Jesse Jones
// Copyright (C) 2012 Hylke Bons
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the

View file

@ -46,7 +46,6 @@
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.Net" />
<Reference Include="Mono.Posix" />