1234567891011121314151617181920212223242526272829303132333435 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Web;
- namespace Bowin.Web.Controls.Mvc
- {
- public class ButtonIconHelper
- {
- protected static Dictionary<ButtonIcon, string> DictButtonIcon = new Dictionary<ButtonIcon, string>();
- protected static string DefaultButtonIconClass = "icon-app";
- static ButtonIconHelper()
- {
- DictButtonIcon.Add(ButtonIcon.Add, "icon-add");
- DictButtonIcon.Add(ButtonIcon.Edit, "icon-edit");
- DictButtonIcon.Add(ButtonIcon.Delete, "icon-remove");
- DictButtonIcon.Add(ButtonIcon.App, "icon-ok");
- DictButtonIcon.Add(ButtonIcon.Search, "icon-search");
- DictButtonIcon.Add(ButtonIcon.Print, "icon-print");
- DictButtonIcon.Add(ButtonIcon.Save, "icon-save");
- }
- public static string GetButtonIconClass(ButtonIcon buttonIcon)
- {
- if (DictButtonIcon.ContainsKey(buttonIcon))
- {
- return DictButtonIcon[buttonIcon];
- }
- else
- {
- return DefaultButtonIconClass;
- }
- }
- }
- }
|