12345678910111213141516171819202122232425262728 |
- using System.Collections.Generic;
- namespace Bowin.Web.Controls.Mvc
- {
- public class AlignStyleHelper
- {
- protected static Dictionary<AlignStyle, string> DictAlignStyle = new Dictionary<AlignStyle, string>();
- protected static string DefaultAlignStyle = "left";
- static AlignStyleHelper()
- {
- DictAlignStyle.Add(AlignStyle.Left, "left");
- DictAlignStyle.Add(AlignStyle.Right, "right");
- DictAlignStyle.Add(AlignStyle.Center, "center");
- }
- public static string GetAlignStyleHtml(AlignStyle alignStyle)
- {
- if (DictAlignStyle.ContainsKey(alignStyle))
- {
- return DictAlignStyle[alignStyle];
- }
- else
- {
- return DefaultAlignStyle;
- }
- }
- }
- }
|