Removed outdated xml loading stuff

This commit is contained in:
Florian Küpper committed 2017-09-02 18:00:06 +02:00
1 parent f48e6862b1
commit c5bfd46865
24 files changed
-1215

No files matched your search

-48
View File
@@ -15,11 +15,9 @@
// along with Vocaluxe. If not, see <http://www.gnu.org/licenses/>.
#endregion
using System;
using System.Diagnostics;
using System.Xml.Serialization;
using VocaluxeLib.Draw;
using VocaluxeLib.Xml;
namespace VocaluxeLib.Menu
{
@@ -113,52 +111,6 @@ namespace VocaluxeLib.Menu
ThemeLoaded = true;
}
public bool LoadTheme(string xmlPath, string elementName, CXmlReader xmlReader)
{
string item = xmlPath + "/" + elementName;
ThemeLoaded = true;
ThemeLoaded &= xmlReader.GetValue(item + "/Skin", out _Theme.Skin, String.Empty);
ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/X", ref _Theme.Rect.X);
ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/Y", ref _Theme.Rect.Y);
ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/Z", ref _Theme.Rect.Z);
ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/W", ref _Theme.Rect.W);
ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/H", ref _Theme.Rect.H);
if (xmlReader.GetValue(item + "/Color", out _Theme.Color.Name, String.Empty))
ThemeLoaded &= _Theme.Color.Get(_PartyModeID, out Color);
else
{
ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/R", ref Color.R);
ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/G", ref Color.G);
ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/B", ref Color.B);
ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/A", ref Color.A);
}
_Theme.Color.Color = Color;
if (xmlReader.ItemExists(item + "/Reflection"))
{
Reflection = true;
ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/Reflection/Space", ref ReflectionSpace);
ThemeLoaded &= xmlReader.TryGetFloatValue(item + "/Reflection/Height", ref ReflectionHeight);
_Theme.Reflection = new SReflection(ReflectionHeight, ReflectionSpace);
}
else
{
Reflection = false;
_Theme.Reflection = null;
}
if (ThemeLoaded)
{
_Theme.Name = elementName;
LoadSkin();
}
return ThemeLoaded;
}
public void Draw()
{
Draw(Aspect);