using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Text;
|
using System.Configuration;
|
using BatchService.Framework.Utility;
|
using PalGain.Core;
|
|
namespace sbcLabSystem.Service
|
{
|
public static class ConstsExtension
|
{
|
public static int PrintWidth(this Consts a)
|
{
|
if (ConfigurationManager.AppSettings["PrintWidth"] != null)
|
{
|
return int.Parse(ConfigurationManager.AppSettings["PrintWidth"].ToString());
|
}
|
else
|
{
|
return 2000;
|
}
|
}
|
public static int PrintHeight(this Consts a)
|
{
|
if (ConfigurationManager.AppSettings["PrintHeight"] != null)
|
{
|
return int.Parse(ConfigurationManager.AppSettings["PrintHeight"].ToString());
|
}
|
else
|
{
|
return 2000;
|
}
|
}
|
public static int EMFWidth(this Consts a)
|
{
|
if (ConfigurationManager.AppSettings["EMFWidth"] != null)
|
{
|
return int.Parse(ConfigurationManager.AppSettings["EMFWidth"].ToString());
|
}
|
else
|
{
|
return 25;
|
}
|
}
|
public static int EMFHeight(this Consts a)
|
{
|
if (ConfigurationManager.AppSettings["EMFHeight"] != null)
|
{
|
return int.Parse(ConfigurationManager.AppSettings["EMFHeight"].ToString());
|
}
|
else
|
{
|
return 24;
|
}
|
}
|
public static int EMFTop(this Consts a)
|
{
|
if (ConfigurationManager.AppSettings["EMFTop"] != null)
|
{
|
return int.Parse(ConfigurationManager.AppSettings["EMFTop"].ToString());
|
}
|
else
|
{
|
return 0;
|
}
|
}
|
public static int EMFLeft(this Consts a)
|
{
|
if (ConfigurationManager.AppSettings["EMFLeft"] != null)
|
{
|
return int.Parse(ConfigurationManager.AppSettings["EMFLeft"].ToString());
|
}
|
else
|
{
|
return 0;
|
}
|
}
|
public static int EMFBottom(this Consts a)
|
{
|
if (ConfigurationManager.AppSettings["EMFBottom"] != null)
|
{
|
return int.Parse(ConfigurationManager.AppSettings["EMFBottom"].ToString());
|
}
|
else
|
{
|
return 0;
|
}
|
}
|
public static int EMFRight(this Consts a)
|
{
|
if (ConfigurationManager.AppSettings["EMFRight"] != null)
|
{
|
return int.Parse(ConfigurationManager.AppSettings["EMFRight"].ToString());
|
}
|
else
|
{
|
return 0;
|
}
|
}
|
}
|
}
|