void AddPageButton(IConfigurationInfo info)
        {
            var bt = new ListButton();

            bt.Text = info.Title;

            if (info.Image != null)
            {
                bt.Image = new BitmapImage(info.Image);
            }
            else
            {
                bt.Image = new BitmapImage(new Uri("pack://application:,,,/TrakHound_Dashboard.Pages.DeviceManager;component/Resources/Plug_01.png"));
            }

            bt.Selected  += Page_Selected;
            bt.DataObject = info;

            if (info.Title == "Description")
            {
                Page_Selected(bt);
            }

            PageList.Add(bt);
            PageList.Sort();
        }
        private static IConfigurationPage CreatePage(IConfigurationInfo info)
        {
            object o    = Activator.CreateInstance(info.ConfigurationPageType);
            var    page = (IConfigurationPage)o;

            return(page);
        }
 public TemplateController(IEntryServices entryServices, ICommentServices commentServices, IConfigurationInfo config, ITagServices tagServices, ILinkServices linkServices) : base(entryServices, commentServices, config) 
 {
     _tagServices = tagServices;
     _linkServices = linkServices;
 }
 public CommentController(IEntryServices entryServices, ICommentServices commentServices, IConfigurationInfo config) : base(entryServices, commentServices, config) { }
Пример #5
0
 /// <summary>
 /// Adds the given database statistics for a database with the given key.
 /// </summary>
 /// <param name="configurationId">The configuration key.</param>
 /// <param name="configurationInfo">The configuration associated with the key.</param>
 public void Add(string configurationId, IConfigurationInfo configurationInfo)
 {
     this.configs.Add(configurationId, configurationInfo);
 }
 public BaseController(IEntryServices entryServices, ICommentServices commentServices, IConfigurationInfo config)
 {
     _entryServices = entryServices;
     _commentServices = commentServices;
     _config = config;
 }
 public RedirectController(IEntryServices entryServices, ICommentServices commentServices, IConfigurationInfo config, IRedirectServices redirectServices) : base(entryServices, commentServices, config) 
 {
     _redirectServices = redirectServices;
 }
 public LinkController(IEntryServices entryServices, ICommentServices commentServices, IConfigurationInfo config, ILinkServices linkServices) : base(entryServices, commentServices, config) 
 {
     _linkServices = linkServices;
 }
 public AuthController(IEntryServices entryServices, ICommentServices commentServices, IConfigurationInfo config, IFormsAuthenticationProvider auth)
     : base(entryServices, commentServices, config) 
 {
     _auth = auth;
 }
 public EntryController(IEntryServices entryServices, ICommentServices commentServices, ITagServices tagServices, IConfigurationInfo config, IModelCache cache) : base(entryServices, commentServices, config) 
 {
     _tagServices = tagServices;
     _cache = cache;
 }
Пример #11
0
        void AddPageButton(IConfigurationInfo info)
        {
            var bt = new ListButton();
            bt.Text = info.Title;

            if (info.Image != null) bt.Image = new BitmapImage(info.Image);
            else bt.Image = new BitmapImage(new Uri("pack://application:,,,/TrakHound_Dashboard.Pages.DeviceManager;component/Resources/Plug_01.png"));

            bt.Selected += Page_Selected;
            bt.DataObject = info;

            if (info.Title == "Description") Page_Selected(bt);

            PageList.Add(bt);
            PageList.Sort();
        }
Пример #12
0
 private void AddPage(IConfigurationInfo info)
 {
     AddPageButton(info);
 }
Пример #13
0
 private static IConfigurationPage CreatePage(IConfigurationInfo info)
 {
     object o = Activator.CreateInstance(info.ConfigurationPageType);
     var page = (IConfigurationPage)o;
     return page;
 }
 private void AddPage(IConfigurationInfo info)
 {
     AddPageButton(info);
 }