using System.Collections.Generic; namespace Bowin.Web.Controls.Mvc { public class AlignStyleHelper { protected static Dictionary DictAlignStyle = new Dictionary(); 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; } } } }