Пример #1
0
 public Slog GetSlog(string slogID)
 {
     Slog slog = null;
        try
        {
     Collection collection = store.GetCollectionByID(slogID);
     if(collection != null)
     {
      slog = new Slog(this.store, collection);
     }
     return(slog);
        }
        catch
        {
     throw new ApplicationException("Slog not found");
        }
 }
Пример #2
0
 internal EntryEnumerator(Slog s, IEnumerator enumerator)
 {
     this.slog = s;
        this.entryEnum = enumerator;
 }
Пример #3
0
 public Slog CreateSlog(string name)
 {
     Slog slog = new Slog(this.store, name);
        return slog;
 }
Пример #4
0
 public void on_new_slog(object o, EventArgs eventArgs)
 {
     SlogEditor se = new SlogEditor();
        if(se.Run() == -5)
        {
     curSlog = sMan.CreateSlog(se.Name);
     curSlog.Commit();
     SlogTreeStore.AppendValues(curSlog);
        }
 }
Пример #5
0
 public void on_slog_selection_changed(object o, EventArgs args)
 {
     TreeSelection tSelect = SlogTreeView.Selection;
        if(tSelect.CountSelectedRows() == 1)
        {
     TreeModel tModel;
     TreeIter iter;
     tSelect.GetSelected(out tModel, out iter);
     if(tModel != null)
      tModel = null;
     curSlog = (Slog)
      SlogTreeStore.GetValue(iter,0);
     EntryTreeStore.Clear();
     PropButton.Sensitive = true;
     foreach(SlogEntry se in curSlog)
     {
      EntryTreeStore.AppendValues(se);
     }
     DeleteButton.Sensitive = true;
        }
        else
        {
     curSlog = null;
     PropButton.Sensitive = false;
     DeleteButton.Sensitive = false;
        }
 }
Пример #6
0
 public void DeleteSelectedSlogs()
 {
     TreeSelection tSelect = SlogTreeView.Selection;
        if(tSelect.CountSelectedRows() == 1)
        {
     TreeModel tModel;
     TreeIter iter;
     tSelect.GetSelected(out tModel, out iter);
     if(tModel != null)
      tModel = null;
     curSlog = (Slog) SlogTreeStore.GetValue(iter,0);
     curSlog.Commit(curSlog.Delete());
     SlogTreeStore.Remove(ref iter);
     curSlog = null;
     Refresh();
        }
 }
Пример #7
0
 public SlogEntry(Slog slog, Node cNode)
     : base(cNode)
 {
 }
Пример #8
0
 public SlogEntry(Slog slog, ShallowNode sNode)
     : base(slog, sNode)
 {
 }
Пример #9
0
 public SlogEntry(Slog slog, string name)
     : base(name)
 {
     slog.SetType(this, typeof(SlogEntry).Name);
 }
Пример #10
0
 public static void ProcessChannel(HttpContext ctx, Slog slog)
 {
     Console.WriteLine("ProcessChannel entered");
        ctx.Response.Write("<title>");
        ctx.Response.Write(slog.Title);
        ctx.Response.Write("</title>");
        if (slog.Description != "")
        {
     ctx.Response.Write("<description>");
     ctx.Response.Write(slog.Description);
     ctx.Response.Write("</description>");
        }
        if (slog.Link != "")
        {
     ctx.Response.Write("<link>");
     ctx.Response.Write(slog.Link);
     ctx.Response.Write("</link>");
        }
        if (slog.Language != "")
        {
     ctx.Response.Write("<language>");
     ctx.Response.Write(slog.Language);
     ctx.Response.Write("</language>");
        }
        if (slog.Copyright != "")
        {
     ctx.Response.Write("<copyright>");
     ctx.Response.Write(slog.Copyright);
     ctx.Response.Write("</copyright>");
        }
        if (slog.ManagingEditor != "")
        {
     ctx.Response.Write("<managingEditor>");
     ctx.Response.Write(slog.ManagingEditor);
     ctx.Response.Write("</managingEditor>");
        }
        if (slog.Webmaster != "")
        {
     ctx.Response.Write("<webmaster>");
     ctx.Response.Write(slog.Webmaster);
     ctx.Response.Write("</webmaster>");
        }
        if (slog.PublishDate != "")
        {
     ctx.Response.Write("<pubDate>");
     ctx.Response.Write(slog.PublishDate);
     ctx.Response.Write("</pubDate>");
        }
        if (slog.LastBuildDate != "")
        {
     ctx.Response.Write("<lastBuildDate>");
     ctx.Response.Write(slog.LastBuildDate);
     ctx.Response.Write("</lastBuildDate>");
        }
        if (slog.Generator != "")
        {
     ctx.Response.Write("<generator>");
     ctx.Response.Write(slog.Generator);
     ctx.Response.Write("</generator>");
        }
        if (slog.Cloud != "")
        {
     ctx.Response.Write("<cloud>");
     ctx.Response.Write(slog.Cloud);
     ctx.Response.Write("</cloud>");
        }
        if (slog.Ttl != "")
        {
     ctx.Response.Write("<ttl>");
     ctx.Response.Write(slog.Ttl);
     ctx.Response.Write("</ttl>");
        }
        if (slog.Rating != "")
        {
     ctx.Response.Write("<rating>");
     ctx.Response.Write(slog.Rating);
     ctx.Response.Write("</rating>");
        }
      Console.WriteLine("ProcessChannel exit");
 }