public BsMap() { StringWriter writer = new StringWriter(); writer.WriteStartTag("nav"); BoardInfoStore.GetBoards((board_id, board_name) => { if (uint.Parse(board_id.Substring(1)) >= 1149) { writer.WriteBoardAnchor(board_id, board_name); } getBoardInfo(board_id).Name = board_name; }); writer.WriteEndTag("nav"); // writer.WriteStartTag("aside"); SelectionInfoStore.GetSelections((selection_id, selection_name, board_list) => { if (uint.Parse(selection_id.Substring(1)) >= 1027) { writer.WriteStartTag("nav"); writer.WriteBoardAnchor(selection_id, selection_name); writer.WriteForCrawler("footer", board_list); writer.WriteEndTag("nav"); } // BsInfo sel_info = getSelectionInfo(selection_id); sel_info.Name = selection_name; SandId.SplitWithCallback2(board_list, ',', board_id => { this.boardInfoDict[board_id].IdList.Add(selection_id); // if the board id does not exist, throw exception. sel_info.IdList.Add(board_id); }); }); writer.WriteEndTag("aside"); this.Output = writer.ToString(); }
public static void InitializeTable() { SiteTable = getTable("sites1"); if (SiteTable != null) { SiteTable.CreateIfNotExists(); } // TemporalTable = getTable("temporal1"); if (TemporalTable != null) { TemporalTable.CreateIfNotExists(); } RevisionTable = getTable("revision1"); if (RevisionTable != null) { RevisionTable.CreateIfNotExists(); } ImagesContainer = getContainer("images1"); SelectionListTable = getTable("selectionlist1"); if (SelectionListTable != null) { SelectionListTable.CreateIfNotExists(); SelectionInfoStore.CreateSkeleton(); } HistoryTable = getTable("history1"); if (HistoryTable != null) { HistoryTable.CreateIfNotExists(); } BoardListTable = getTable("boardlist1"); if (BoardListTable != null) { BoardListTable.CreateIfNotExists(); BoardInfoStore.CreateSkeleton(); } DiscussionListTable = getTable("discussionlist1"); if (DiscussionListTable != null) { DiscussionListTable.CreateIfNotExists(); } KeyStoreTable = getTable("keystore1"); if (KeyStoreTable != null) { KeyStoreTable.CreateIfNotExists(); } ActivityTable = getTable("activity1"); if (ActivityTable != null) { ActivityTable.CreateIfNotExists(); } DiscussionLoadTable = getTable("discussionload1"); if (DiscussionLoadTable != null) { DiscussionLoadTable.CreateIfNotExists(); } VoteBookTable = getTable("votebook1"); if (VoteBookTable != null) { VoteBookTable.CreateIfNotExists(); } }