clean up a bit
This commit is contained in:
parent
d59f90d500
commit
6ec11ceb1c
|
@ -25,7 +25,7 @@ namespace SparkleLib {
|
||||||
public class SparkleConfig : XmlDocument {
|
public class SparkleConfig : XmlDocument {
|
||||||
|
|
||||||
public static SparkleConfig DefaultConfig;
|
public static SparkleConfig DefaultConfig;
|
||||||
public static bool DebugMode = false;
|
public static bool DebugMode = true;
|
||||||
|
|
||||||
public string FullPath;
|
public string FullPath;
|
||||||
public string TmpPath;
|
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)
|
public string GetConfigOption (string name)
|
||||||
{
|
{
|
||||||
XmlNode node = SelectSingleNode ("/sparkleshare/" + 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 ()
|
private void Save ()
|
||||||
{
|
{
|
||||||
if (!File.Exists (FullPath))
|
if (!File.Exists (FullPath))
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
// Originally taken from:
|
// Originally taken from:
|
||||||
// https://github.com/jesse99/Continuum/blob/master/source/shared/DirectoryWatcher.cs
|
// https://github.com/jesse99/Continuum/blob/master/source/shared/DirectoryWatcher.cs
|
||||||
// Modified to use MonoMac and integrate into SparkleShare
|
// Modified to use MonoMac and integrate into SparkleShare
|
||||||
|
//
|
||||||
// Copyright (C) 2008 Jesse Jones
|
// Copyright (C) 2008 Jesse Jones
|
||||||
|
// Copyright (C) 2012 Hylke Bons
|
||||||
//
|
//
|
||||||
// Permission is hereby granted, free of charge, to any person obtaining
|
// Permission is hereby granted, free of charge, to any person obtaining
|
||||||
// a copy of this software and associated documentation files (the
|
// a copy of this software and associated documentation files (the
|
||||||
|
|
|
@ -46,7 +46,6 @@
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Xml" />
|
<Reference Include="System.Xml" />
|
||||||
<Reference Include="System.Core" />
|
|
||||||
<Reference Include="System.Drawing" />
|
<Reference Include="System.Drawing" />
|
||||||
<Reference Include="System.Net" />
|
<Reference Include="System.Net" />
|
||||||
<Reference Include="Mono.Posix" />
|
<Reference Include="Mono.Posix" />
|
||||||
|
|
Loading…
Reference in a new issue