/// <exception cref="System.IO.IOException"></exception> public virtual CodecHandler CreateHandler(PageChannel channel, Encoding charset) { JetFormat format = channel.GetFormat(); switch (format.CODEC_TYPE) { case JetFormat.CodecType.NONE: { // no encoding, all good return(DefaultCodecProvider.DUMMY_HANDLER); } case JetFormat.CodecType.JET: { return(JetCryptCodecHandler.Create(channel)); } case JetFormat.CodecType.MSISAM: { return(MSISAMCryptCodecHandler.Create(GetPassword(), channel, charset)); } default: { throw new RuntimeException("Unknown codec type " + format.CODEC_TYPE); } } }
/// <summary> /// <inheritDoc></inheritDoc> /// <p> /// This implementation returns DUMMY_HANDLER for databases with no encoding /// and UNSUPPORTED_HANDLER for databases with any encoding. /// </summary> /// <exception cref="System.IO.IOException"></exception> public virtual CodecHandler CreateHandler(PageChannel channel, Encoding charset) { JetFormat format = channel.GetFormat(); switch (format.CODEC_TYPE) { case JetFormat.CodecType.NONE: { // no encoding, all good return(DUMMY_HANDLER); } case JetFormat.CodecType.JET: { // check for an encode key. if 0, not encoded ByteBuffer bb = channel.CreatePageBuffer(); channel.ReadPage(bb, 0); int codecKey = bb.GetInt(format.OFFSET_ENCODING_KEY); return((codecKey == 0) ? DUMMY_HANDLER : UNSUPPORTED_HANDLER); } case JetFormat.CodecType.MSISAM: { // always encoded, we don't handle it return(UNSUPPORTED_HANDLER); } default: { throw new RuntimeException("Unknown codec type " + format.CODEC_TYPE); } } }
/// <summary>Reads and returns the header page (page 0) from the given pageChannel.</summary> /// <remarks>Reads and returns the header page (page 0) from the given pageChannel.</remarks> /// <exception cref="System.IO.IOException"></exception> protected internal static ByteBuffer ReadHeaderPage(PageChannel pageChannel) { ByteBuffer buffer = pageChannel.CreatePageBuffer(); pageChannel.ReadPage(buffer, 0); return(buffer); }
/// <summary> /// Allocates a new buffer in the database (with undefined data) and returns /// a new empty buffer. /// </summary> /// <remarks> /// Allocates a new buffer in the database (with undefined data) and returns /// a new empty buffer. /// </remarks> /// <exception cref="System.IO.IOException"></exception> public ByteBuffer SetNewPage(PageChannel pageChannel) { // ditch any current data Clear(); // allocate a new page in the database _pageNumber = pageChannel.AllocateNewPage(); // return a new buffer return(_buffer.GetPageBuffer(pageChannel)); }
internal Page(ConnectionScope scope, string guid, PageInitializer initializer) { _scope = scope; _channel = new PageChannel(guid, scope, this); MainFrame = initializer.MainFrame.Object; MainFrame.Page = this; _frames.Add(MainFrame); _viewportSize = initializer.ViewportSize; }
/// <returns> /// a PropertyMaps instance decoded from the given bytes (always /// returns non- /// <code>null</code> /// result). /// </returns> /// <exception cref="System.IO.IOException"></exception> public PropertyMaps Read(byte[] propBytes, int objectId) { PropertyMaps maps = new PropertyMaps(objectId); if ((propBytes == null) || (propBytes.Length == 0)) { return(maps); } ByteBuffer bb = ByteBuffer.Wrap(propBytes).Order(PageChannel.DEFAULT_BYTE_ORDER); // check for known header bool knownType = false; foreach (byte[] tmpType in JetFormat.PROPERTY_MAP_TYPES) { if (ByteUtil.MatchesRange(bb, bb.Position(), tmpType)) { ByteUtil.Forward(bb, tmpType.Length); knownType = true; break; } } if (!knownType) { throw new IOException("Uknown property map type " + ByteUtil.ToHexString(bb, 4)); } // parse each data "chunk" IList <string> propNames = null; while (bb.HasRemaining()) { int len = bb.GetInt(); short type = bb.GetShort(); int endPos = bb.Position() + len - 6; ByteBuffer bbBlock = PageChannel.NarrowBuffer(bb, bb.Position(), endPos); if (type == PROPERTY_NAME_LIST) { propNames = ReadPropertyNames(bbBlock); } else { if ((type == DEFAULT_PROPERTY_VALUE_LIST) || (type == COLUMN_PROPERTY_VALUE_LIST)) { maps.Put(ReadPropertyValues(bbBlock, propNames, type)); } else { throw new IOException("Unknown property block type " + type); } } bb.Position(endPos); } return(maps); }
/// <exception cref="System.IO.IOException"></exception> public static CodecHandler Create(string password, PageChannel channel, Encoding charset) { ByteBuffer buffer = ReadHeaderPage(channel); if ((buffer.Get(ENCRYPTION_FLAGS_OFFSET) & NEW_ENCRYPTION) != 0) { return(new HealthMarketScience.Jackcess.MSISAMCryptCodecHandler(password, charset , buffer)); } // old MSISAM dbs use jet-style encryption w/ a different key return(new _JetCryptCodecHandler_87(GetOldDecryptionKey(buffer, channel.GetFormat ()))); }
/// <param name="database">database that contains this usage map</param> /// <param name="pageNum">Page number that this usage map is contained in</param> /// <param name="rowNum">Number of the row on the page that contains this usage map</param> /// <returns> /// Either an InlineUsageMap or a ReferenceUsageMap, depending on /// which type of map is found /// </returns> /// <exception cref="System.IO.IOException"></exception> public static HealthMarketScience.Jackcess.UsageMap Read(Database database, int pageNum , int rowNum, bool assumeOutOfRangeBitsOn) { JetFormat format = database.GetFormat(); PageChannel pageChannel = database.GetPageChannel(); ByteBuffer tableBuffer = pageChannel.CreatePageBuffer(); pageChannel.ReadPage(tableBuffer, pageNum); short rowStart = Table.FindRowStart(tableBuffer, rowNum, format); int rowEnd = Table.FindRowEnd(tableBuffer, rowNum, format); tableBuffer.Limit(rowEnd); byte mapType = tableBuffer.Get(rowStart); HealthMarketScience.Jackcess.UsageMap rtn = new HealthMarketScience.Jackcess.UsageMap (database, tableBuffer, pageNum, rowStart); rtn.InitHandler(mapType, assumeOutOfRangeBitsOn); return(rtn); }
/// <exception cref="System.IO.IOException"></exception> public static CodecHandler Create(PageChannel channel) { ByteBuffer buffer = ReadHeaderPage(channel); JetFormat format = channel.GetFormat(); byte[] encodingKey = new byte[ENCODING_KEY_LENGTH]; buffer.Position(format.OFFSET_ENCODING_KEY); buffer.Get(encodingKey); bool clearData = true; foreach (byte byteVal in encodingKey) { if (byteVal != 0) { clearData = false; } } return(clearData ? DefaultCodecProvider.DUMMY_HANDLER : new HealthMarketScience.Jackcess.JetCryptCodecHandler (encodingKey)); }
/// <exception cref="System.IO.IOException"></exception> private ByteBuffer SetPage(PageChannel pageChannel, int pageNumber, bool rewind) { ByteBuffer buffer = _buffer.GetPageBuffer(pageChannel); int modCount = _buffer.GetModCount(); if ((pageNumber != _pageNumber) || (_bufferModCount != modCount)) { _pageNumber = pageNumber; _bufferModCount = modCount; pageChannel.ReadPage(buffer, _pageNumber); } else { if (rewind) { buffer.Rewind(); } } return(buffer); }
/// <summary> /// Returns a ByteBuffer of at least the given size, with the limit set to /// the given size, and the predefined byteOrder. /// </summary> /// <remarks> /// Returns a ByteBuffer of at least the given size, with the limit set to /// the given size, and the predefined byteOrder. Will be rewound iff /// autoRewind is enabled for this buffer. /// </remarks> public ByteBuffer GetBuffer(PageChannel pageChannel, int size) { ByteBuffer buffer = GetExistingBuffer(); if ((buffer == null) || (buffer.Capacity() < size)) { buffer = pageChannel.CreateBuffer(size, _order); ++_modCount; SetNewBuffer(buffer); } else { buffer.Limit(size); } if (_autoRewind) { buffer.Rewind(); } return(buffer); }
public Mouse(PageChannel channel) { _channel = channel; }
public static string GetChannelRowHtml(SiteInfo siteInfo, ChannelInfo nodeInfo, bool enabled, ELoadingType loadingType, NameValueCollection additional, PermissionsImpl permissionsImpl) { var nodeTreeItem = ChannelTreeItem.CreateInstance(siteInfo, nodeInfo, enabled, permissionsImpl); var adminId = permissionsImpl.GetAdminId(siteInfo.Id, nodeInfo.Id); var title = nodeTreeItem.GetItemHtml(loadingType, PageChannel.GetRedirectUrl(siteInfo.Id, nodeInfo.Id), adminId, additional); var rowHtml = string.Empty; if (loadingType == ELoadingType.ContentTree) { rowHtml = $@" <tr treeItemLevel=""{nodeInfo.ParentsCount + 1}""> <td nowrap>{title}</td> </tr> "; } else if (loadingType == ELoadingType.Channel) { var upLink = string.Empty; var downLink = string.Empty; var editUrl = string.Empty; var checkBoxHtml = string.Empty; if (enabled) { if (permissionsImpl.HasChannelPermissions(nodeInfo.SiteId, nodeInfo.Id, ConfigManager.ChannelPermissions.ChannelEdit)) { editUrl = $@"<a href=""{PageChannelEdit.GetRedirectUrl(nodeInfo.SiteId, nodeInfo.Id, PageChannel.GetRedirectUrl(nodeInfo.SiteId, nodeInfo.Id))}"" onclick=""event.stopPropagation()"">编辑</a>"; upLink = $@"<a href=""{PageUtils.GetCmsUrl(nodeInfo.SiteId, nameof(PageChannel), new NameValueCollection { {"Subtract", true.ToString()}, {"channelId", nodeInfo.Id.ToString()} })}"" onclick=""event.stopPropagation()""><img src=""../Pic/icon/up.gif"" border=""0"" alt=""上升"" /></a>"; downLink = $@"<a href=""{PageUtils.GetCmsUrl(nodeInfo.SiteId, nameof(PageChannel), new NameValueCollection { {"Add", true.ToString()}, {"channelId", nodeInfo.Id.ToString()} })}"" onclick=""event.stopPropagation()""><img src=""../Pic/icon/down.gif"" border=""0"" alt=""下降"" /></a>"; } checkBoxHtml = $@"<input type=""checkbox"" name=""ChannelIDCollection"" value=""{nodeInfo.Id}"" onclick=""checkboxClick(this)"" />"; } rowHtml = $@" <tr treeItemLevel=""{nodeInfo.ParentsCount + 1}"" onclick=""activeRow(this);return false;""> <td>{title}</td> <td class=""text-nowrap"">{nodeInfo.GroupNameCollection}</td> <td class=""text-nowrap"">{nodeInfo.IndexName}</td> <td class=""text-center"">{upLink}</td> <td class=""text-center"">{downLink}</td> <td class=""text-center"">{editUrl}</td> <td class=""text-center"">{checkBoxHtml}</td> </tr> "; } else if (loadingType == ELoadingType.SiteAnalysis) { var startDate = TranslateUtils.ToDateTime(additional["StartDate"]); var endDate = TranslateUtils.ToDateTime(additional["EndDate"]); var tableName = ChannelManager.GetTableName(siteInfo, nodeInfo); var num = DataProvider.ContentDao.GetCountOfContentAdd(tableName, siteInfo.Id, nodeInfo.Id, EScopeType.All, startDate, endDate, string.Empty, ETriState.All); var contentAddNum = num == 0 ? "0" : $"<strong>{num}</strong>"; num = DataProvider.ContentDao.GetCountOfContentUpdate(tableName, siteInfo.Id, nodeInfo.Id, EScopeType.All, startDate, endDate, string.Empty); var contentUpdateNum = num == 0 ? "0" : $"<strong>{num}</strong>"; rowHtml = $@" <tr treeItemLevel=""{nodeInfo.ParentsCount + 1}""> <td>{title}</td> <td class=""text-center"">{contentAddNum}</td> <td class=""text-center"">{contentUpdateNum}</td> </tr> "; } else if (loadingType == ELoadingType.TemplateFilePathRule) { var editLink = string.Empty; if (enabled) { var showPopWinString = ModalTemplateFilePathRule.GetOpenWindowString(nodeInfo.SiteId, nodeInfo.Id); editLink = $"<a href=\"javascript:;\" onclick=\"{showPopWinString}\">更改</a>"; } var filePath = PageUtility.GetInputChannelUrl(siteInfo, nodeInfo, false); rowHtml = $@" <tr treeItemLevel=""{nodeInfo.ParentsCount + 1}""> <td>{title}</td> <td>{filePath}</td> <td class=""text-center"">{editLink}</td> </tr> "; } else if (loadingType == ELoadingType.ConfigurationCreateDetails) { var editChannelLink = string.Empty; var nodeNames = string.Empty; if (enabled) { var showPopWinString = ModalConfigurationCreateChannel.GetOpenWindowString(nodeInfo.SiteId, nodeInfo.Id); editChannelLink = $"<a href=\"javascript:;\" onclick=\"{showPopWinString}\">触发栏目</a>"; } var nodeNameBuilder = new StringBuilder(); var channelIdList = TranslateUtils.StringCollectionToIntList(nodeInfo.Additional.CreateChannelIdsIfContentChanged); foreach (var theChannelId in channelIdList) { var theNodeInfo = ChannelManager.GetChannelInfo(siteInfo.Id, theChannelId); if (theNodeInfo != null) { nodeNameBuilder.Append(theNodeInfo.ChannelName).Append(","); } } if (nodeNameBuilder.Length > 0) { nodeNameBuilder.Length--; nodeNames = nodeNameBuilder.ToString(); } rowHtml = $@" <tr treeItemLevel=""{nodeInfo.ParentsCount + 1}""> <td>{title}</td> <td>{nodeNames}</td> <td class=""text-center"">{editChannelLink}</td> </tr> "; } else if (loadingType == ELoadingType.ConfigurationCrossSiteTrans) { var editLink = string.Empty; if (enabled) { var showPopWinString = ModalCrossSiteTransEdit.GetOpenWindowString(nodeInfo.SiteId, nodeInfo.Id); editLink = $"<a href=\"javascript:;\" onclick=\"{showPopWinString}\">更改</a>"; } var contribute = CrossSiteTransUtility.GetDescription(nodeInfo.SiteId, nodeInfo); rowHtml = $@" <tr treeItemLevel=""{nodeInfo.ParentsCount + 1}""> <td>{title}</td> <td>{contribute}</td> <td class=""text-center"">{editLink}</td> </tr> "; } else if (loadingType == ELoadingType.ChannelClickSelect) { rowHtml = $@" <tr treeItemLevel=""{nodeInfo.ParentsCount + 1}""> <td>{title}</td> </tr> "; } return(rowHtml); }
public Accessibility(PageChannel channel) { _channel = channel; }
internal ChromiumCoverage(PageChannel channel) { _channel = channel; }
/// <returns> /// the page for the current page number, reading as necessary, /// position and limit are unchanged /// </returns> /// <exception cref="System.IO.IOException"></exception> public ByteBuffer GetPage(PageChannel pageChannel) { return(SetPage(pageChannel, _pageNumber, false)); }
public Touchscreen(PageChannel channel) { _channel = channel; }
public static string GetChannelRowHtml(PublishmentSystemInfo publishmentSystemInfo, NodeInfo nodeInfo, bool enabled, ELoadingType loadingType, NameValueCollection additional, string administratorName) { var nodeTreeItem = NodeTreeItem.CreateInstance(nodeInfo, enabled, administratorName); var title = nodeTreeItem.GetItemHtml(loadingType, PageChannel.GetRedirectUrl(publishmentSystemInfo.PublishmentSystemId, nodeInfo.NodeId), additional); var rowHtml = string.Empty; if (loadingType == ELoadingType.ContentTree) { rowHtml = $@" <tr treeItemLevel=""{nodeInfo.ParentsCount + 1}""> <td align=""left"" nowrap> {title} </td> </tr> "; } else if (loadingType == ELoadingType.Channel) { var upLink = string.Empty; var downLink = string.Empty; var editUrl = string.Empty; var checkBoxHtml = string.Empty; if (enabled) { if (AdminUtility.HasChannelPermissions(administratorName, nodeInfo.PublishmentSystemId, nodeInfo.NodeId, AppManager.Cms.Permission.Channel.ChannelEdit)) { var urlEdit = PageChannelEdit.GetRedirectUrl(nodeInfo.PublishmentSystemId, nodeInfo.NodeId, PageChannel.GetRedirectUrl(nodeInfo.PublishmentSystemId, nodeInfo.NodeId)); editUrl = $"<a href=\"{urlEdit}\">编辑</a>"; var urlSubtract = PageUtils.GetCmsUrl(nameof(PageChannel), new NameValueCollection { { "PublishmentSystemID", nodeInfo.PublishmentSystemId.ToString() }, { "Subtract", true.ToString() }, { "NodeID", nodeInfo.NodeId.ToString() } }); upLink = $@"<a href=""{urlSubtract}""><img src=""../Pic/icon/up.gif"" border=""0"" alt=""上升"" /></a>"; var urlAdd = PageUtils.GetCmsUrl(nameof(PageChannel), new NameValueCollection { { "PublishmentSystemID", nodeInfo.PublishmentSystemId.ToString() }, { "Add", true.ToString() }, { "NodeID", nodeInfo.NodeId.ToString() } }); downLink = $@"<a href=""{urlAdd}""><img src=""../Pic/icon/down.gif"" border=""0"" alt=""下降"" /></a>"; } checkBoxHtml = $"<input type='checkbox' name='ChannelIDCollection' value='{nodeInfo.NodeId}' />"; } rowHtml = $@" <tr treeItemLevel=""{nodeInfo.ParentsCount + 1}""> <td>{title}</td> <td>{nodeInfo.NodeGroupNameCollection}</td> <td><nobr>{nodeInfo.NodeIndexName}</nobr></td> <td class=""center""> {upLink} </td> <td class=""center""> {downLink} </td> <td class=""center""> {editUrl} </td> <td class=""center""> {checkBoxHtml} </td> </tr> "; } else if (loadingType == ELoadingType.SiteAnalysis) { var contentAddNum = string.Empty; var contentUpdateNum = string.Empty; var startDate = TranslateUtils.ToDateTime(additional["StartDate"]); var endDate = TranslateUtils.ToDateTime(additional["EndDate"]); var tableName = NodeManager.GetTableName(publishmentSystemInfo, nodeInfo); var num = DataProvider.ContentDao.GetCountOfContentAdd(tableName, publishmentSystemInfo.PublishmentSystemId, nodeInfo.NodeId, startDate, endDate, string.Empty); contentAddNum = (num == 0) ? "0" : $"<strong>{num}</strong>"; num = DataProvider.ContentDao.GetCountOfContentUpdate(tableName, publishmentSystemInfo.PublishmentSystemId, nodeInfo.NodeId, startDate, endDate, string.Empty); contentUpdateNum = (num == 0) ? "0" : $"<strong>{num}</strong>"; rowHtml = $@" <tr treeItemLevel=""{nodeInfo.ParentsCount + 1}""> <td> <nobr>{title}</nobr> </td> <td> {contentAddNum} </td> <td> {contentUpdateNum} </td> </tr> "; } else if (loadingType == ELoadingType.TemplateFilePathRule) { var editLink = string.Empty; var filePath = string.Empty; if (enabled) { var showPopWinString = ModalTemplateFilePathRule.GetOpenWindowString(nodeInfo.PublishmentSystemId, nodeInfo.NodeId); editLink = $"<a href=\"javascript:;\" onclick=\"{showPopWinString}\">更改</a>"; } filePath = PageUtility.GetInputChannelUrl(publishmentSystemInfo, nodeInfo); rowHtml = $@" <tr treeItemLevel=""{nodeInfo.ParentsCount + 1}""> <td> <nobr>{title}</nobr> </td> <td> <nobr>{filePath}</nobr> </td> <td class=""center""> {editLink} </td> </tr> "; } else if (loadingType == ELoadingType.ConfigurationCreateDetails) { var editChannelLink = string.Empty; var nodeNames = string.Empty; if (enabled) { var showPopWinString = ModalConfigurationCreateChannel.GetOpenWindowString(nodeInfo.PublishmentSystemId, nodeInfo.NodeId); editChannelLink = $"<a href=\"javascript:;\" onclick=\"{showPopWinString}\">触发栏目</a>"; } if (nodeInfo.Additional.Attributes.Count > 0) { var nodeNameBuilder = new StringBuilder(); var nodeIDArrayList = TranslateUtils.StringCollectionToIntList(nodeInfo.Additional.CreateChannelIDsIfContentChanged); foreach (int theNodeID in nodeIDArrayList) { var theNodeInfo = NodeManager.GetNodeInfo(publishmentSystemInfo.PublishmentSystemId, theNodeID); if (theNodeInfo != null) { nodeNameBuilder.Append(theNodeInfo.NodeName).Append(","); } } if (nodeNameBuilder.Length > 0) { nodeNameBuilder.Length--; nodeNames = nodeNameBuilder.ToString(); } } rowHtml = $@" <tr treeItemLevel=""{nodeInfo.ParentsCount + 1}""> <td> <nobr>{title}</nobr> </td> <td> {nodeNames} </td> <td class=""center""> {editChannelLink} </td> </tr> "; } else if (loadingType == ELoadingType.ConfigurationCrossSiteTrans) { var editLink = string.Empty; var contribute = string.Empty; if (enabled) { var showPopWinString = ModalCrossSiteTransEdit.GetOpenWindowString(nodeInfo.PublishmentSystemId, nodeInfo.NodeId); editLink = $"<a href=\"javascript:;\" onclick=\"{showPopWinString}\">更改</a>"; } contribute = CrossSiteTransUtility.GetDescription(nodeInfo.PublishmentSystemId, nodeInfo); rowHtml = $@" <tr treeItemLevel=""{nodeInfo.ParentsCount + 1}""> <td>{title}</td> <td>{contribute}</td> <td class=""center"" width=""50"">{editLink}</td> </tr> "; } else if (loadingType == ELoadingType.ConfigurationSignin) { var editLink = string.Empty; if (enabled) { var showPopWinString = ModalConfigurationSignin.GetOpenWindowString(nodeInfo.PublishmentSystemId, nodeInfo.NodeId); editLink = $"<a href=\"javascript:;\" onclick=\"{showPopWinString}\">更改</a>"; } //string contribute = CrossSiteTransUtility.GetDescription(nodeInfo.PublishmentSystemID, nodeInfo); var isSign = ""; var SignUser = ""; if (nodeInfo.Additional.IsSignin) { isSign = "是"; } else { isSign = "否"; } //if (!string.IsNullOrEmpty(nodeInfo.Additional.SigninUserGroupCollection)) //{ // ArrayList groupIDlist = TranslateUtils.StringCollectionToIntList(nodeInfo.Additional.SigninUserGroupCollection); // UserGroupInfo userGroupInfo = null; // foreach (int groupID in groupIDlist) // { // userGroupInfo = DataProvider.UserGroupDAO.GetUserGroupMessage(groupID); // SignUser += userGroupInfo.GroupName + ','; // } // SignUser = SignUser.TrimEnd(','); //} //else //{ SignUser = nodeInfo.Additional.SigninUserNameCollection; //} rowHtml = $@" <tr treeItemLevel=""{nodeInfo.ParentsCount + 1}""> <td>{title}</td> <td>{SignUser}</td> <td class=""center"">{isSign}</td> <td class=""center"">{editLink}</td> </tr> "; } else if (loadingType == ELoadingType.ChannelSelect || loadingType == ELoadingType.GovPublicChannelAdd || loadingType == ELoadingType.GovPublicChannelTree) { rowHtml = $@" <tr treeItemLevel=""{nodeInfo.ParentsCount + 1}""> <td nowrap>{title}</td> </tr> "; } else if (loadingType == ELoadingType.GovPublicChannel) { var editUrl = string.Empty; var upLink = string.Empty; var downLink = string.Empty; var checkBoxHtml = string.Empty; if (!EContentModelTypeUtils.Equals(EContentModelType.GovPublic, nodeInfo.ContentModelId)) { enabled = false; } if (enabled) { editUrl = $@"<a href=""javascript:;"" onclick=""{ModalGovPublicChannelAdd .GetOpenWindowStringToEdit(publishmentSystemInfo.PublishmentSystemId, nodeInfo.NodeId, string.Empty)}"">编辑</a>"; var urlUp = PageUtils.GetWcmUrl(nameof(PageGovPublicChannel), new NameValueCollection { { "PublishmentSystemID", nodeInfo.PublishmentSystemId.ToString() }, { "NodeID", nodeInfo.NodeId.ToString() }, { "Subtract", true.ToString() } }); upLink = $@"<a href=""{urlUp}""><img src=""../Pic/icon/up.gif"" border=""0"" alt=""上升"" /></a>"; var urlDown = PageUtils.GetWcmUrl(nameof(PageGovPublicChannel), new NameValueCollection { { "PublishmentSystemID", nodeInfo.PublishmentSystemId.ToString() }, { "NodeID", nodeInfo.NodeId.ToString() }, { "Add", true.ToString() } }); downLink = $@"<a href=""{urlDown}""><img src=""../Pic/icon/down.gif"" border=""0"" alt=""下降"" /></a>"; checkBoxHtml = $"<input type='checkbox' name='ChannelIDCollection' value='{nodeInfo.NodeId}' />"; } var channelCode = DataProvider.GovPublicChannelDao.GetCode(nodeInfo.NodeId); rowHtml = $@" <tr treeItemLevel=""{nodeInfo.ParentsCount + 1}""> <td>{title}</td> <td>{channelCode}</td> <td class=""center"">{upLink}</td> <td class=""center"">{downLink}</td> <td class=""center"">{editUrl}</td> <td class=""center"">{checkBoxHtml}</td> </tr> "; } else if (loadingType == ELoadingType.GovInteractChannel) { var editUrl = string.Empty; var upLink = string.Empty; var downLink = string.Empty; var styleAddUrl = string.Empty; var checkBoxHtml = string.Empty; if (enabled) { var applyStyleId = DataProvider.GovInteractChannelDao.GetApplyStyleId(nodeInfo.PublishmentSystemId, nodeInfo.NodeId); editUrl = $@"<a href=""javascript:;"" onclick=""{ModalGovInteractChannelAdd .GetOpenWindowStringToEdit(publishmentSystemInfo.PublishmentSystemId, nodeInfo.NodeId, string.Empty)}"">编辑</a>"; var urlUp = PageUtils.GetWcmUrl(nameof(PageGovInteractChannel), new NameValueCollection { { "PublishmentSystemID", nodeInfo.PublishmentSystemId.ToString() }, { "NodeID", nodeInfo.NodeId.ToString() }, { "Subtract", true.ToString() } }); upLink = $@"<a href=""{urlUp}""><img src=""../Pic/icon/up.gif"" border=""0"" alt=""上升"" /></a>"; var urlDown = PageUtils.GetWcmUrl(nameof(PageGovInteractChannel), new NameValueCollection { { "PublishmentSystemID", nodeInfo.PublishmentSystemId.ToString() }, { "NodeID", nodeInfo.NodeId.ToString() }, { "Add", true.ToString() } }); downLink = $@"<a href=""{urlDown}""><img src=""../Pic/icon/down.gif"" border=""0"" alt=""下降"" /></a>"; styleAddUrl = $@"<a href=""javascript:;"" onclick=""{ModalTagStyleGovInteractApplyAdd.GetOpenWindowStringToEdit(publishmentSystemInfo.PublishmentSystemId, applyStyleId)}"">提交设置</a>"; checkBoxHtml = $"<input type='checkbox' name='ChannelIDCollection' value='{nodeInfo.NodeId}' />"; } var summary = DataProvider.GovInteractChannelDao.GetSummary(nodeInfo.NodeId); rowHtml = $@" <tr treeItemLevel=""{nodeInfo.ParentsCount + 1}""> <td>{title}</td> <td>{summary}</td> <td class=""center"">{upLink}</td> <td class=""center"">{downLink}</td> <td class=""center"">{styleAddUrl}</td> <td class=""center"">{editUrl}</td> <td class=""center"">{checkBoxHtml}</td> </tr> "; } else if (loadingType == ELoadingType.GovPublicChannelAdd || loadingType == ELoadingType.GovPublicChannelTree) { rowHtml = $@" <tr treeItemLevel=""{nodeInfo.ParentsCount + 1}""> <td nowrap>{title}</td> </tr> "; } return(rowHtml); }
/// <summary>Sets the current page number and returns that page</summary> /// <returns> /// the page for the new page number, reading as necessary, resets /// position /// </returns> /// <exception cref="System.IO.IOException"></exception> public ByteBuffer SetPage(PageChannel pageChannel, int pageNumber) { return(SetPage(pageChannel, pageNumber, true)); }
/// <summary> /// Returns a ByteBuffer of at least the defined page size, with the limit /// set to the page size, and the predefined byteOrder. /// </summary> /// <remarks> /// Returns a ByteBuffer of at least the defined page size, with the limit /// set to the page size, and the predefined byteOrder. Will be rewound iff /// autoRewind is enabled for this buffer. /// </remarks> public ByteBuffer GetPageBuffer(PageChannel pageChannel) { return(GetBuffer(pageChannel, pageChannel.GetFormat().PAGE_SIZE)); }
public Keyboard(PageChannel channel) { _channel = channel; }