本文整理汇总了C#中System.Web.UI.WebControls.TableItemStyle类的典型用法代码示例。如果您正苦于以下问题:C# TableItemStyle类的具体用法?C# TableItemStyle怎么用?C# TableItemStyle使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TableItemStyle类属于System.Web.UI.WebControls命名空间,在下文中一共展示了TableItemStyle类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: ExcelFileResult
/// <summary>
/// constructor
/// </summary>
/// <param name="dt">To export DataTable</param>
/// <param name="tableStyle">Styling for entire table</param>
/// <param name="headerStyle">Styling for header</param>
/// <param name="itemStyle">Styling for the individual cells</param>
public ExcelFileResult(DataTable dt, TableStyle tableStyle, TableItemStyle headerStyle, TableItemStyle itemStyle)
: base("application/ms-excel")
{
this.dt = dt;
Title = "Attendance Report ";
Footer = "Powered By: Hasib, IT Department";
TitleExportDate = "Export Date: {0}";
this.tableStyle = tableStyle;
this.headerStyle = headerStyle;
this.itemStyle = itemStyle;
ExcelPackage EXPackage = new ExcelPackage();
// provide defaults
if (this.tableStyle == null)
{
this.tableStyle = new TableStyle();
this.tableStyle.BorderStyle = BorderStyle.Solid;
this.tableStyle.BorderColor = Color.Black;
this.tableStyle.BorderWidth = Unit.Parse("2px");
//this.tableStyle.BackColor = Color.LightGray;
this.tableStyle.BackColor = Color.Azure;
//this.tableStyle.BackImageUrl = Path.GetFullPath("D:/HOP/BOK.jpg");
//exPackage.Workbook.Properties.Author = "Hasib";
//exPackage.Workbook.Properties.Comments = "HopLunIT";
//exPackage.Workbook.Properties.Title = "HopLun (Bangladesh) Ltd. Reports";
}
if (this.headerStyle == null)
{
this.headerStyle = new TableItemStyle();
this.headerStyle.BackColor = Color.LightGray;
}
}
开发者ID:cipher4uall,项目名称:hop-attendance,代码行数:39,代码来源:Excelimport.cs
示例2: ExcelResult
public ExcelResult(
IQueryable rows, string fileName,
string[] headers,
TableStyle tableStyle, TableItemStyle headerStyle, TableItemStyle itemStyle)
{
//_Mapping = mapping;
_Rows = rows;
_FileName = fileName;
_Headers = headers;
_TableStyle = tableStyle;
_HeaderStyle = headerStyle;
_ItemStyle = itemStyle;
// provide defaults
if (_TableStyle == null)
_TableStyle = new TableStyle();
if (_HeaderStyle == null)
_HeaderStyle = new TableItemStyle
{
BackColor = Color.LightGray,
};
if (_ItemStyle == null)
_ItemStyle = new TableItemStyle
{
BorderStyle = BorderStyle.Solid,
BorderWidth = new Unit("1px"),
BorderColor = Color.LightGray
};
}
开发者ID:Logrythmik,项目名称:Logrythmik.Mvc,代码行数:31,代码来源:ExcelResult.cs
示例3: save
private void save(DataTable dt,string filename)
{
DataGrid excel = new DataGrid();
System.Web.UI.WebControls.TableItemStyle AlternatingStyle = new TableItemStyle();
System.Web.UI.WebControls.TableItemStyle headerStyle = new TableItemStyle();
System.Web.UI.WebControls.TableItemStyle itemStyle = new TableItemStyle();
AlternatingStyle.BackColor = System.Drawing.Color.LightGray;
headerStyle.BackColor = System.Drawing.Color.LightGray;
headerStyle.Font.Bold = true;
headerStyle.HorizontalAlign = System.Web.UI.WebControls.HorizontalAlign.Center;
itemStyle.HorizontalAlign = System.Web.UI.WebControls.HorizontalAlign.Center; ;
excel.AlternatingItemStyle.MergeWith(AlternatingStyle);
excel.HeaderStyle.MergeWith(headerStyle);
excel.ItemStyle.MergeWith(itemStyle);
excel.GridLines = GridLines.Both;
excel.HeaderStyle.Font.Bold = true;
DataSet ds = new DataSet();
ds.Tables.Add(dt);
excel.DataSource = ds; //输出DataTable的内容
excel.DataBind();
System.IO.StringWriter oStringWriter = new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter oHtmlTextWriter = new System.Web.UI.HtmlTextWriter(oStringWriter);
excel.RenderControl(oHtmlTextWriter);
Response.AddHeader("Content-Disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode(filename, System.Text.Encoding.UTF8) + ".xls");
Response.ContentType = "application/ms-excel";
Response.ContentEncoding = System.Text.Encoding.GetEncoding("GB2312");
Response.Write(oHtmlTextWriter.InnerWriter.ToString());
Response.End();
}
开发者ID:bsimp6983,项目名称:BackupDashes,代码行数:32,代码来源:ExportXLS.aspx.cs
示例4: Page_Load
private void Page_Load(object sender, System.EventArgs e)
{
//Put user code to initialize the page here
base.GHTTestBegin((HtmlForm)this.FindControl("Form1"));
System.Web.UI.WebControls.TableItemStyle myStyle = new System.Web.UI.WebControls.TableItemStyle();
try
{
base.GHTSubTestBegin("TableItemStyle - Wrap");
base.GHTActiveSubTest.Controls.Add(Table1);
myStyle.Wrap = false;
base.GHTSubTestAddResult(myStyle.Wrap.ToString());
Table1.Rows[0].Cells[0].ApplyStyle(myStyle);
Table1.Rows[0].ApplyStyle(myStyle);
myStyle.Wrap = true;
base.GHTSubTestAddResult(myStyle.Wrap.ToString());
Table1.Rows[0].Cells[1].ApplyStyle(myStyle);
Table1.Rows[1].ApplyStyle(myStyle);
}
catch (Exception ex)
{
base.GHTSubTestUnexpectedExceptionCaught(ex);
}
base.GHTSubTestEnd();
base.GHTTestEnd();
}
开发者ID:nobled,项目名称:mono,代码行数:27,代码来源:TableItemStyle_Wrap.aspx.cs
示例5: New
/// <summary>
/// Creates and returns a new <see cref="System.Web.UI.WebControls.TableItemStyle"/> with
/// the specified CSS Class.
/// </summary>
/// <param name="cssclass">The CSS Class name which is set as the CSS Class of the
/// newly created <see cref="System.Web.UI.WebControls.TableItemStyle"/>.</param>
/// <returns>
/// The newly created <see cref="System.Web.UI.WebControls.TableItemStyle"/>.
/// </returns>
public static TableItemStyle New(string cssclass)
{
TableItemStyle style = new TableItemStyle();
style.CssClass = cssclass;
return style;
}
开发者ID:NLADP,项目名称:ADF,代码行数:17,代码来源:StyleHelper.cs
示例6: Page_Load
private void Page_Load(object sender, System.EventArgs e)
{
//Put user code to initialize the page here
base.GHTTestBegin((HtmlForm)this.FindControl("Form1"));
System.Web.UI.WebControls.TableItemStyle tableStyle = new System.Web.UI.WebControls.TableItemStyle();
tableStyle.CopyFrom(Table2.Rows[0].Cells[0].ControlStyle);
Table1.Rows[0].Cells[0].ApplyStyle(tableStyle);
tableStyle.CopyFrom(Table2.Rows[1].ControlStyle);
Table1.Rows[1].ApplyStyle(tableStyle);
base.GHTTestEnd();
}
开发者ID:nobled,项目名称:mono,代码行数:13,代码来源:TableItemStyle_CopyFrom_S.aspx.cs
示例7: Excel
public static ActionResult Excel(
this Controller controller,
DataContext dataContext,
IQueryable rows,
string fileName,
string[] headers,
TableStyle tableStyle,
TableItemStyle headerStyle,
TableItemStyle itemStyle
)
{
return new ExcelResult(dataContext, rows, fileName, headers, tableStyle, headerStyle, itemStyle);
}
开发者ID:veritasfx,项目名称:MVCDTS,代码行数:13,代码来源:ExcelControllerExtensions.cs
示例8: DoInitialization
static private void DoInitialization()
{
mcStyle = new TableItemStyle();
mcStyle.HorizontalAlign = HorizontalAlign.Center;
mcStyle.BackColor = teColors.eeRowBg;
mcStyle.BorderColor = Color.Black;
mcStyle.BorderStyle = BorderStyle.None;
mcStyle.BorderWidth = 0;
mcStyle.ForeColor = teColors.eeText;
mcStyle.Font.Name = "Arial";
mcStyle.Font.Size = 10;
mcStyle.HorizontalAlign = HorizontalAlign.Left;
}
开发者ID:Aoki2,项目名称:kzmod_web_stats,代码行数:14,代码来源:tcGridViewFactory.cs
示例9: Export
public static string Export(System.Data.DataTable dt, string fileName)
{
System.Web.UI.Page page = System.Web.HttpContext.Current.Handler as System.Web.UI.Page;
StringWriter stringWriter = new StringWriter();
HtmlTextWriter htmlWriter = new HtmlTextWriter(stringWriter);
DataGrid dGrid = new DataGrid();
TableItemStyle alternatingStyle = new TableItemStyle();
TableItemStyle headerStyle = new TableItemStyle();
TableItemStyle itemStyle = new TableItemStyle();
alternatingStyle.BackColor = Color.LightGray;
headerStyle.BackColor = Color.LightGray;
headerStyle.Font.Bold = true;
headerStyle.HorizontalAlign = HorizontalAlign.Center;
itemStyle.HorizontalAlign = HorizontalAlign.Center;
dGrid.GridLines = GridLines.Both;
dGrid.HeaderStyle.MergeWith(headerStyle);
dGrid.HeaderStyle.Font.Bold = true;
dGrid.AlternatingItemStyle.MergeWith(alternatingStyle);
dGrid.ItemStyle.MergeWith(itemStyle);
dGrid.DataSource = dt.DefaultView;
dGrid.DataBind();
dGrid.RenderControl(htmlWriter);
string filePath = Path.Combine(excelFullFolder, fileName + ext);
if (System.IO.File.Exists(filePath))
{
System.IO.File.Delete(filePath);
}
StreamWriter sw = new StreamWriter(filePath, false, System.Text.Encoding.UTF8);
sw.Write(stringWriter.ToString());
sw.Close();
int pos = page.Request.Url.ToString().LastIndexOf(page.Request.Path);
string fileUrl = page.Request.Url.ToString().Substring(0, pos);
fileUrl += page.Request.ApplicationPath + excelFolder.Replace("\\", "/") + fileName + ext;
HttpContext.Current.Response.Redirect(fileUrl);
return fileUrl;
}
开发者ID:piaolingzxh,项目名称:Justin,代码行数:49,代码来源:ExcelHelper.cs
示例10: Page_Load
private void Page_Load(object sender, System.EventArgs e)
{
//Put user code to initialize the page here
base.GHTTestBegin((HtmlForm)this.FindControl("Form1"));
System.Web.UI.WebControls.TableItemStyle myStyle = new System.Web.UI.WebControls.TableItemStyle();
try
{
base.GHTSubTestBegin("TableItemStyle - HorizontalAlign");
base.GHTActiveSubTest.Controls.Add(Table1);
myStyle.HorizontalAlign = HorizontalAlign.Center;
base.GHTSubTestAddResult(myStyle.HorizontalAlign.ToString());
Table1.Rows[0].Cells[0].ApplyStyle(myStyle);
Table1.Rows[0].ApplyStyle(myStyle);
myStyle.HorizontalAlign = HorizontalAlign.Justify;
base.GHTSubTestAddResult(myStyle.HorizontalAlign.ToString());
Table1.Rows[0].Cells[1].ApplyStyle(myStyle);
Table1.Rows[1].ApplyStyle(myStyle);
myStyle.HorizontalAlign = HorizontalAlign.Left;
base.GHTSubTestAddResult(myStyle.HorizontalAlign.ToString());
Table1.Rows[0].Cells[2].ApplyStyle(myStyle);
Table1.Rows[2].ApplyStyle(myStyle);
myStyle.HorizontalAlign = HorizontalAlign.NotSet;
base.GHTSubTestAddResult(myStyle.HorizontalAlign.ToString());
Table1.Rows[0].Cells[3].ApplyStyle(myStyle);
Table1.Rows[3].ApplyStyle(myStyle);
myStyle.HorizontalAlign = HorizontalAlign.Right;
base.GHTSubTestAddResult(myStyle.HorizontalAlign.ToString());
Table1.Rows[0].Cells[4].ApplyStyle(myStyle);
Table1.Rows[4].ApplyStyle(myStyle);
}
catch (Exception ex)
{
base.GHTSubTestUnexpectedExceptionCaught(ex);
}
base.GHTSubTestEnd();
base.GHTTestEnd();
}
开发者ID:nobled,项目名称:mono,代码行数:43,代码来源:TableItemStyle_HorizontalAlign.aspx.cs
示例11: Page_Load
private void Page_Load(object sender, System.EventArgs e)
{
//Put user code to initialize the page here
// System.Web.UI.StateBag
base.GHTTestBegin((HtmlForm)this.FindControl("Form1"));
try
{
base.GHTSubTestBegin("TableItemStyle_ctor_S");
System.Web.UI.WebControls.TableItemStyle myStyle;
myStyle = new System.Web.UI.WebControls.TableItemStyle(new System.Web.UI.StateBag(true));
base.GHTSubTestAddResult("is (object = null)? " + ((myStyle == null) ? "True" : "False"));
}
catch (Exception ex)
{
base.GHTSubTestUnexpectedExceptionCaught(ex);
}
base.GHTSubTestEnd();
base.GHTTestEnd();
}
开发者ID:nobled,项目名称:mono,代码行数:20,代码来源:TableItemStyle_ctor_S.aspx.cs
示例12: ExcelFeedGenerator
public ExcelFeedGenerator()
{
_tableStyle = new TableStyle
{
BorderStyle = BorderStyle.Solid,
BorderColor = Color.Black,
BorderWidth = Unit.Parse("1px"),
};
_headerStyle = new TableItemStyle
{
VerticalAlign = VerticalAlign.Top,
BackColor = Color.DimGray,
};
_itemStyle = new TableItemStyle
{
VerticalAlign = VerticalAlign.Top,
BorderStyle = BorderStyle.Solid,
BorderColor = Color.DimGray,
};
}
开发者ID:kirolosgerges,项目名称:Blog,代码行数:20,代码来源:ExcelFeedGenerator.cs
示例13: ExcelResult
public ExcelResult(IQueryable rows, string fileName, Dictionary<string, string> headers, TableStyle tableStyle, TableItemStyle headerStyle, TableItemStyle itemStyle)
{
_rows = rows;
_fileName = fileName;
_headers = headers;
_tableStyle = tableStyle;
_headerStyle = headerStyle;
_itemStyle = itemStyle;
// provide defaults
if (_tableStyle == null)
{
_tableStyle = new TableStyle();
_tableStyle.BorderStyle = BorderStyle.Solid;
_tableStyle.BorderColor = Color.Black;
_tableStyle.BorderWidth = Unit.Parse("1px");
}
if (_headerStyle == null)
{
_headerStyle = new TableItemStyle();
_headerStyle.BackColor = Color.LightGray;
}
}
开发者ID:jorik041,项目名称:lessons-asp-mvc,代码行数:23,代码来源:ExcelResult.cs
示例14: ExcelFileResult
/// <summary>
/// Konstruktor
/// </summary>
/// <param name="dt">Die zu exportierende DataTable</param>
/// <param name="tableStyle">Styling für gesamgte Tabelle</param>
/// <param name="headerStyle">Styling für Kopfzeile</param>
/// <param name="itemStyle">Styling für die einzelnen Zellen</param>
public ExcelFileResult(DataTable dt, TableStyle tableStyle, TableItemStyle headerStyle, TableItemStyle itemStyle)
: base("application/ms-excel")
{
this.dt = dt;
TitleExportDate = "Exportdatum: {0}";
this.tableStyle = tableStyle;
this.headerStyle = headerStyle;
this.itemStyle = itemStyle;
// provide defaults
if (this.tableStyle == null)
{
this.tableStyle = new TableStyle();
this.tableStyle.BorderStyle = BorderStyle.Solid;
this.tableStyle.BorderColor = Color.Black;
this.tableStyle.BorderWidth = Unit.Parse("2px");
}
if (this.headerStyle == null)
{
this.headerStyle = new TableItemStyle();
this.headerStyle.BackColor = Color.LightGray;
}
}
开发者ID:rodinho,项目名称:DeSCo,代码行数:30,代码来源:ExcelFileResult.cs
示例15: ExcelResult
public ExcelResult(DbContext dataContext, IQueryable rows, string fileName, string[] headers, TableStyle tableStyle, TableItemStyle headerStyle, TableItemStyle itemStyle)
{
_dataContext = dataContext;
_rows = rows;
_fileName = fileName;
_headers = headers;
_tableStyle = tableStyle;
_headerStyle = headerStyle;
_itemStyle = itemStyle;
// provide defaults
if (_tableStyle == null)
{
_tableStyle = new TableStyle();
_tableStyle.BorderStyle = BorderStyle.Solid;
_tableStyle.BorderColor = Color.Black;
_tableStyle.BorderWidth = Unit.Parse("2px");
}
if (_headerStyle == null)
{
_headerStyle = new TableItemStyle();
_headerStyle.BackColor = Color.LightGray;
}
}
开发者ID:rvazquezglez,项目名称:bitacoraip,代码行数:24,代码来源:ExcelResult.cs
示例16: ExcelResult
public ExcelResult(IList rows, string fileName, string[] headers, Type resourceSource, TableStyle tableStyle, TableItemStyle headerStyle, TableItemStyle itemStyle)
{
Rows = rows;
ResourceSource = resourceSource;
_fileName = fileName;
_headers = headers;
_tableStyle = tableStyle;
_headerStyle = headerStyle;
_itemStyle = itemStyle;
// provide defaults
if (_tableStyle == null)
{
_tableStyle = new TableStyle();
_tableStyle.BorderStyle = BorderStyle.Solid;
_tableStyle.BorderColor = Color.Black;
_tableStyle.BorderWidth = Unit.Parse("2px");
}
if (_headerStyle == null)
{
_headerStyle = new TableItemStyle();
_headerStyle.BackColor = Color.LightGray;
}
}
开发者ID:tiagomaximo,项目名称:LiteFx,代码行数:24,代码来源:ExcelResult.cs
示例17: PrepareControlHierarchy
/// <devdoc>
/// </devdoc>
protected internal virtual void PrepareControlHierarchy() {
// The order of rows is autogenerated data rows, declared rows, then autogenerated command rows
if (Controls.Count < 1) {
return;
}
Debug.Assert(Controls[0] is Table);
Table childTable = (Table)Controls[0];
childTable.CopyBaseAttributes(this);
if (ControlStyleCreated && !ControlStyle.IsEmpty) {
childTable.ApplyStyle(ControlStyle);
} else {
// Since we didn't create a ControlStyle yet, the default
// settings for the default style of the control need to be applied
// to the child table control directly
//
childTable.GridLines = GridLines.Both;
childTable.CellSpacing = 0;
}
childTable.Caption = Caption;
childTable.CaptionAlign = CaptionAlign;
// the composite alternating item style, so we need to do just one
// merge style on the actual item
Style altRowStyle = new TableItemStyle();
altRowStyle.CopyFrom(_rowStyle);
if (_alternatingRowStyle != null) {
altRowStyle = new TableItemStyle();
altRowStyle.CopyFrom(_alternatingRowStyle);
}
Style compositeStyle;
TableRowCollection rows = childTable.Rows;
foreach (DetailsViewRow row in rows) {
compositeStyle = new TableItemStyle();
DataControlRowState rowState = row.RowState;
DataControlRowType rowType = row.RowType;
DataControlFieldCell headerFieldCell = row.Cells[0] as DataControlFieldCell;
DataControlField field = null;
if (headerFieldCell != null) {
field = headerFieldCell.ContainingField;
}
switch (rowType) {
case DataControlRowType.Header:
compositeStyle = _headerStyle;
break;
case DataControlRowType.Footer:
compositeStyle = _footerStyle;
break;
case DataControlRowType.DataRow:
compositeStyle.CopyFrom(_rowStyle);
if ((rowState & DataControlRowState.Alternate) != 0) {
compositeStyle.CopyFrom(altRowStyle);
}
if (field is ButtonFieldBase) {
compositeStyle.CopyFrom(_commandRowStyle);
break;
}
if ((rowState & DataControlRowState.Edit) != 0) {
compositeStyle.CopyFrom(_editRowStyle);
}
if ((rowState & DataControlRowState.Insert) != 0) {
if (_insertRowStyle != null) {
compositeStyle.CopyFrom(_insertRowStyle);
}
else {
compositeStyle.CopyFrom(_editRowStyle);
}
}
break;
case DataControlRowType.Pager:
compositeStyle = _pagerStyle;
break;
case DataControlRowType.EmptyDataRow:
compositeStyle = _emptyDataRowStyle;
break;
}
if (compositeStyle != null && row.Visible) {
row.MergeStyle(compositeStyle);
}
if (rowType == DataControlRowType.DataRow && field != null) {
if (!field.Visible ||
(Mode == DetailsViewMode.Insert && !field.InsertVisible)) {
row.Visible = false;
}
//.........这里部分代码省略.........
开发者ID:uQr,项目名称:referencesource,代码行数:101,代码来源:DetailsView.cs
示例18: ComposeCell
protected static HtmlTableCell ComposeCell(TableItemStyle cellstyle, int width, params Control[] controls)
{
HtmlTableCell cell = null;
// Some controls are already HtmlTableCell, in which case they should not be encapsulated.
if (controls.Length == 1)
{
cell = controls[0] as HtmlTableCell;
}
// If the above is not the case, initialise the HtmlTableCell and add the controls.
if (cell == null)
{
cell = new HtmlTableCell();
foreach (Control control in controls)
{
cell.Controls.Add(control);
}
}
if (cellstyle != null)
cell.Attributes["class"] = cellstyle.CssClass;
cell.Width = width + "%";
return cell;
}
开发者ID:NLADP,项目名称:ADF,代码行数:28,代码来源:CompoundPanel.cs
示例19: ComposeRow
/// <summary>
/// Create html table row
/// </summary>
/// <param name="cellstyle"><see cref="TableItemStyle"/></param>
/// <param name="cellwidth">Cell width.</param>
/// <param name="controls">Variable parameters.</param>
/// <returns><see cref="HtmlTableRow"/></returns>
protected HtmlTableRow ComposeRow(TableItemStyle cellstyle, int cellwidth, params Control[] controls)
{
HtmlTableRow row = new HtmlTableRow();
HtmlTableCell cell = ComposeCell(cellstyle, cellwidth, controls);
row.Attributes["class"] = RowStyle.CssClass;
row.Controls.Add(cell);
return row;
}
开发者ID:NLADP,项目名称:ADF,代码行数:17,代码来源:CompoundPanel.cs
示例20: PrepareControlHierarchy
/// <summary>
/// Prepares our composite controls for rendering by setting
/// last-minute (ie: non-viewstate tracked) properties.
/// </summary>
protected virtual void PrepareControlHierarchy()
{
if (Controls.Count > 0)
{
// Setup base table control style
Table table = (Table)Controls[0];
table.CopyBaseAttributes(this);
if (ControlStyleCreated && !ControlStyle.IsEmpty)
{
table.ApplyStyle(ControlStyle);
}
else
{
table.GridLines = GridLines.None;
table.CellPadding = 10;
table.CellSpacing = 0;
}
// Setup label controls.
TableRow labelRowTop = (TableRow)FindControl("labelRowTop");
TableRow labelRowBottom = (TableRow)FindControl("labelRowBottom");
labelRowTop.Visible = false;
labelRowBottom.Visible = false;
if (ShowLabel)
{
// Setup label row style
TableItemStyle style = new TableItemStyle();
style.CopyFrom(LabelRowStyle);
style.HorizontalAlign = LabelHorizontalAlign;
// Setup appropriate row
if (LabelVerticalAlign == VerticalAlign.Top)
{
labelRowTop.MergeStyle(style);
labelRowTop.Visible = true;
TableCell labelCell = (TableCell)FindControl("labelCellTop");
labelCell.Text = Text;
}
else
{
labelRowBottom.MergeStyle(style);
labelRowBottom.Visible = true;
TableCell labelCell = (TableCell)FindControl("labelCellBottom");
labelCell.Text = Text;
}
}
// Setup barcode row style
TableRow barcodeRow = (TableRow)FindControl("barcodeRow");
barcodeRow.MergeStyle(BarcodeRowStyle);
// Setup barcode image url
BarcodeImageUriBuilder builder = new BarcodeImageUriBuilder();
builder.Text = Text;
builder.Scale = Scale;
builder.EncodingScheme = BarcodeEncoding;
builder.BarMinHeight = BarMinHeight;
builder.BarMaxHeight = BarMaxHeight;
builder.BarMinWidth = BarMinWidth;
builder.BarMaxWidth = BarMaxWidth;
Image barcodeImage = (Image)FindControl("barcodeImage");
barcodeImage.ImageUrl = builder.ToString();
}
}
开发者ID:ScoreBig,项目名称:barcoderender,代码行数:70,代码来源:BarcodeLabel.cs
注:本文中的System.Web.UI.WebControls.TableItemStyle类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论