135 lines
4.2 KiB
C#
135 lines
4.2 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Xml.Serialization;
|
|
using System.Xml;
|
|
|
|
namespace ITFInstaller
|
|
{
|
|
public class PlatformSettings
|
|
{
|
|
protected string m_CopyFileCommand = "";
|
|
protected string m_MakeDirectory = "";
|
|
protected string m_DirectoryCommand = "";
|
|
protected string m_DeleteCommand = "";
|
|
protected string m_RebootLauncher = "";
|
|
protected string m_Plateform = "";
|
|
protected string m_PlateformExtension = "";
|
|
protected string m_CookDirectory = "";
|
|
protected string m_DriveKit = "";
|
|
|
|
protected string[] m_FiltersStandard = null;
|
|
protected string[] m_FiltersCook = null;
|
|
protected string[] m_FiltersCookForce = null;
|
|
|
|
public string CopyFileCommand
|
|
{
|
|
set { m_CopyFileCommand = value; }
|
|
get { return m_CopyFileCommand; }
|
|
}
|
|
|
|
public string MakeDirectoryCommand
|
|
{
|
|
set { m_MakeDirectory = value; }
|
|
get { return m_MakeDirectory; }
|
|
}
|
|
|
|
public string DeleteCommand
|
|
{
|
|
set { m_DeleteCommand = value; }
|
|
get { return m_DeleteCommand; }
|
|
}
|
|
|
|
public string RebootCommand
|
|
{
|
|
set { m_RebootLauncher = value; }
|
|
get { return m_RebootLauncher; }
|
|
}
|
|
|
|
public string DirectoryCommand
|
|
{
|
|
set { m_DirectoryCommand = value; }
|
|
get { return m_DirectoryCommand; }
|
|
}
|
|
|
|
|
|
public string Plateform
|
|
{
|
|
set { m_Plateform = value; }
|
|
get { return m_Plateform; }
|
|
}
|
|
|
|
|
|
public string[] FiltersCook
|
|
{
|
|
set { m_FiltersCook = value; }
|
|
get { return m_FiltersCook; }
|
|
}
|
|
|
|
public string[] FiltersCookForce
|
|
{
|
|
set { m_FiltersCookForce = value; }
|
|
get { return m_FiltersCookForce; }
|
|
}
|
|
|
|
public string[] FiltersStandard
|
|
{
|
|
set { m_FiltersStandard = value; }
|
|
get { return m_FiltersStandard; }
|
|
}
|
|
|
|
public string PlateformExtension
|
|
{
|
|
set { m_PlateformExtension = value; }
|
|
get { return m_PlateformExtension; }
|
|
}
|
|
|
|
public string CookDirectory
|
|
{
|
|
set { m_CookDirectory = value; }
|
|
get { return m_CookDirectory; }
|
|
}
|
|
|
|
public string DriveKit
|
|
{
|
|
set { m_DriveKit = value; }
|
|
get { return m_DriveKit; }
|
|
}
|
|
|
|
|
|
public void load(string userSettingsFile)
|
|
{
|
|
XmlTextReader filexml = new XmlTextReader(userSettingsFile);
|
|
filexml.WhitespaceHandling = WhitespaceHandling.None;
|
|
|
|
while (filexml.Read())
|
|
{
|
|
if (filexml.LocalName == "UserSettings")
|
|
{
|
|
|
|
CopyFileCommand = filexml.GetAttribute("CopyFileCommand");
|
|
MakeDirectoryCommand = filexml.GetAttribute("MakeDirectoryCommand");
|
|
RebootCommand = filexml.GetAttribute("RebootLauncher");
|
|
Plateform = filexml.GetAttribute("Plateform");
|
|
PlateformExtension = filexml.GetAttribute("PlateformExtension");
|
|
DriveKit = filexml.GetAttribute("DriveKit");
|
|
DirectoryCommand = filexml.GetAttribute("DirectoryCommand");
|
|
DeleteCommand = filexml.GetAttribute("DeleteCommand");
|
|
CookDirectory = filexml.GetAttribute("CookDirectory");
|
|
string filters = filexml.GetAttribute("Filters");
|
|
FiltersStandard = filters.Split(';');
|
|
|
|
filters = filexml.GetAttribute("FiltersCook");
|
|
FiltersCook = filters.Split(';');
|
|
|
|
filters = filexml.GetAttribute("FiltersCookForce");
|
|
FiltersCookForce = filters.Split(';');
|
|
}
|
|
}
|
|
|
|
filexml.Close();
|
|
}
|
|
|
|
}
|
|
}
|