Files
Oogynize/Platform/Satellite/GUI.cs

64 lines
1.9 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Resources;
using System.Reflection;
namespace Foo.Platform.Satellite
{
/// <summary>
/// Quick N' Easy access to the Satellite GUI Assembly Resource
/// </summary>
public static class GUIResx
{
private static ResourceManager _ResourceManager = null;
private static Assembly _Assembly = null;
/// <summary>
/// Construction
/// </summary>
static GUIResx()
{
try
{
if (_ResourceManager == null && _Assembly == null)
{
_Assembly = Assembly.LoadFile(InstallationSpec.InstallPath + "\\" + "Satellite.dll");
_ResourceManager = new ResourceManager("Foo.Satellite.GUI", _Assembly);
// * For Debugging *
//string[] resourceNames = _Assembly.GetManifestResourceNames();
//foreach (string resourceName in resourceNames)
//{
// string Doris = resourceName;
//}
}
}
catch (Exception e)
{
string message = e.Message;
}
}
/// <summary>
/// Returns a Resource value as a string
/// </summary>
/// <param name="strName">name of resource to get</param>
/// <returns>the value of the resource</returns>
public static string GetString(string strName)
{
string retVal = string.Empty;
try
{
retVal = _ResourceManager.GetString(strName);
}
catch (Exception e)
{
string message = e.Message;
}
return retVal;
}
}
}