|
using System;
using System.Collections;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Windows.Forms;
using System.Configuration;
namespace WinCSS
{
/// <summary>
/// Summary description for Helper.
/// </summary>
public class Helper
{
public Helper()
{
//
// TODO: Add constructor logic here
//
}
public static FontStyle getFontStyle(string FS)
{
FontStyle o = FontStyle.Regular;
switch(FS)
{
case "Bold":
o = FontStyle.Bold;
break;
case "Italic":
o = FontStyle.Italic;
break;
case "Regular":
o = FontStyle.Regular;
break;
case "Strikeout":
o = FontStyle.Strikeout;
break;
case "Underline":
o = FontStyle.Underline;
break;
}
return o ;
}
public static System.Drawing.GraphicsUnit getGraphicUnit(string GU)
{
System.Drawing.GraphicsUnit o = System.Drawing.GraphicsUnit.Point;
switch(GU)
{
case "Display":
o = System.Drawing.GraphicsUnit.Display;
break;
case "Document":
o = System.Drawing.GraphicsUnit.Document;
break;
case "Inch":
o = System.Drawing.GraphicsUnit.Inch;
break;
case "Millimeter":
o = System.Drawing.GraphicsUnit.Millimeter;
break;
case "Pixel":
o = System.Drawing.GraphicsUnit.Pixel;
break;
case "Point":
o = System.Drawing.GraphicsUnit.Point;
break;
case "World":
o = System.Drawing.GraphicsUnit.World;
break;
}
return o ;
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.
A list of licenses authors might use can be found here
I worked for the software industry as a software architect, system analyst, senior software engineer and MIS (management information system) consultant for last 10 years.