Exemplo n.º 1
0
 public InterestingEntries(IInterstingEntriesAlgorithm interestingEntriesCore)
 {
     InterestingEntriesCore = interestingEntriesCore;
     Algororithm            = WeBlog.Components.InterestingEntriesCore.GetAlgororithmFromString(Mode);
     if (Algororithm != InterestingEntriesAlgorithm.Custom || InterestingEntriesCore == null)
     {
         InterestingEntriesCore = new InterestingEntriesCore(ManagerFactory.EntryManagerInstance, Algororithm);
     }
 }
Exemplo n.º 2
0
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);

            var algororithm = WeBlog.Components.InterestingEntriesCore.GetAlgororithmFromString(Mode);

            if (algororithm != InterestingEntriesAlgorithm.Custom || InterestingEntriesCore == null)
            {
                InterestingEntriesCore = new InterestingEntriesCore(ManagerFactory.EntryManagerInstance, algororithm);
            }
        }
Exemplo n.º 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            var dataSource = InterestingEntriesCore.GetEntries(CurrentBlog, MaximumCount);

            if (dataSource.Any())
            {
                ItemList.DataSource = dataSource;
                ItemList.DataBind();
                PanelInteresingEntries.Visible = true;
            }
            else
            {
                PanelInteresingEntries.Visible = false;
            }
        }
Exemplo n.º 4
0
 public override void Initialize(Rendering rendering)
 {
     base.Initialize(rendering);
     Entries = InterestingEntriesCore.GetEntries(CurrentBlog, MaximumCount);
 }