本文整理汇总了C#中TableRow类的典型用法代码示例。如果您正苦于以下问题:C# TableRow类的具体用法?C# TableRow怎么用?C# TableRow使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TableRow类属于命名空间,在下文中一共展示了TableRow类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: btnGonder_Click
protected void btnGonder_Click(object sender, EventArgs e)
{
int i;
pnlPanel.Height = Unit.Percentage(75);
pnlPanel.Width = Unit.Pixel(200);
lblAd.BorderStyle = BorderStyle.Dotted;
lblAd.BackColor = Color.LawnGreen;
lblAd.BorderColor = Color.FromArgb(255, 255, 0, 0);
txtAD.ForeColor = ColorTranslator.FromHtml("#00ff00");
ListItem Li=new ListItem("nolsun","denemeeee");
chklCheckDeneme.Items.Add( Li);
///*****************************************************
///
tbl.Controls.Clear();
tbl.BorderStyle = BorderStyle.Double;
tbl.BorderWidth = Unit.Pixel(1);
int rows = 3, cols = 4;
TableCell tc;
for (int sat = 0; sat < rows; sat++)
{
TableRow tr = new TableRow();
tbl.Controls.Add(tr);
for (int sut = 0; sut < cols; sut++)
{
tc = new TableCell();
tc.BorderStyle = BorderStyle.Double;
tc.BorderWidth = Unit.Pixel(1);
tc.Text = sat.ToString() + " " + sut.ToString();
tr.Controls.Add(tc);
}
}
}
示例2: SetTableHeader
private void SetTableHeader()
{
var tableRow = new TableRow();
if (ServerModel.User.Current.Islector())
{
var inputCell = new TableCell { Text = "Input" };
var expectedOutputCell = new TableCell { Text = "Expected Output" };
tableRow.Cells.AddRange(new[] { inputCell, expectedOutputCell });
}
var userOutputCell = new TableCell { Text = "User Output" };
var timeUsedCell = new TableCell { Text = "Time Used" };
var memoryUsedCell = new TableCell { Text = "Memory Used" };
var statusCell = new TableCell { Text = "Status" };
tableRow.Cells.AddRange(new[] { userOutputCell, timeUsedCell, memoryUsedCell, statusCell });
_compiledAnswerTable.Rows.Add(tableRow);
}
示例3: AddNewFileTransfer
public static FileTransfer AddNewFileTransfer(this FlowDocument doc, Tox tox, int friendnumber, int filenumber, string filename, ulong filesize, bool is_sender)
{
FileTransferControl fileTransferControl = new FileTransferControl(tox.GetName(friendnumber), friendnumber, filenumber, filename, filesize);
FileTransfer transfer = new FileTransfer() { FriendNumber = friendnumber, FileNumber = filenumber, FileName = filename, FileSize = filesize, IsSender = is_sender, Control = fileTransferControl };
Section usernameParagraph = new Section();
TableRow newTableRow = new TableRow();
BlockUIContainer fileTransferContainer = new BlockUIContainer();
fileTransferControl.HorizontalAlignment = HorizontalAlignment.Stretch;
fileTransferControl.HorizontalContentAlignment = HorizontalAlignment.Stretch;
fileTransferContainer.Child = fileTransferControl;
usernameParagraph.Blocks.Add(fileTransferContainer);
usernameParagraph.Padding = new Thickness(0);
TableCell fileTableCell = new TableCell();
fileTableCell.ColumnSpan = 2;
fileTableCell.Blocks.Add(usernameParagraph);
newTableRow.Cells.Add(fileTableCell);
fileTableCell.Padding = new Thickness(0, 10, 0, 10);
TableRowGroup MessageRows = (TableRowGroup)doc.FindName("MessageRows");
MessageRows.Rows.Add(newTableRow);
return transfer;
}
示例4: OnCreate
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
ScrollView scrollView = new ScrollView(this);
TableLayout tableLayout = new TableLayout(this);
TableRow tablerow = new TableRow(this);
// make columns span the whole width
tableLayout.SetColumnStretchable(0, true);
tableLayout.SetColumnStretchable(1, true);
TextView DepartCollumn = new TextView(this);
DepartCollumn.Text = "Depart";
tablerow.AddView(DepartCollumn);
TimetableList.TimeColumns.Add(DepartCollumn);
TextView ArriveCollumn = new TextView(this);
ArriveCollumn.Text = "Arrive";
tablerow.AddView(ArriveCollumn);
TimetableList.TimeColumns.Add(ArriveCollumn);
tableLayout.AddView(tablerow);
// tableLayout.SetScrollContainer(true);
scrollView.AddView(tableLayout);
SetContentView(scrollView);
}
示例5: MergeToTable
private void MergeToTable(PropertyInfo[] properties)
{
var mergeTableRows = new TableRow[data.TransitStateDetails.Count];
// Find both the first row in the multiple producers table and the table itself.
var firstMergeFieldInTable = FindFirstMergeFieldInAnnexTable();
var table = FindAnnexTable(firstMergeFieldInTable);
// Get the table row containing the merge fields.
mergeTableRows[0] = firstMergeFieldInTable.Run.Ancestors<TableRow>().First();
// Create a row containing merge fields for each of the producers.
for (var i = 1; i < data.TransitStateDetails.Count; i++)
{
mergeTableRows[i] = (TableRow)mergeTableRows[0].CloneNode(true);
table.AppendChild(mergeTableRows[i]);
}
// Merge the producers into the table rows.
for (var i = 0; i < mergeTableRows.Length; i++)
{
foreach (var field in MergeFieldLocator.GetMergeRuns(mergeTableRows[i]))
{
MergeFieldDataMapper.BindCorrespondingField(
MergeFieldLocator.ConvertAnnexMergeFieldToRegularMergeField(field), data.TransitStateDetails[i], properties);
}
}
}
示例6: AddRow
public static TableRow AddRow(int countColumns)
{
var TR = new TableRow();
for (int i = 0; i < countColumns; i++)
TR.Append(OXMLTableCellWrap.AddCell(new OXMLParagraphWrap()));
return TR;
}
示例7: DocxDocumentTableSchemeBuilder
internal DocxDocumentTableSchemeBuilder(WordprocessingDocument document, TableProperties contextTableProperties)
: base(document)
{
table = new Table();
if (contextTableProperties == null)
{
var borderType = new EnumValue<BorderValues>(BorderValues.Thick);
var tblProp = new TableProperties(
new TableBorders(
new TopBorder {Val = borderType, Size = 1},
new BottomBorder {Val = borderType, Size = 1},
new LeftBorder {Val = borderType, Size = 1},
new RightBorder {Val = borderType, Size = 1},
new InsideHorizontalBorder {Val = borderType, Size = 1},
new InsideVerticalBorder {Val = borderType, Size = 1}
)
);
table.AppendChild(tblProp);
}
else
table.AppendChild(contextTableProperties);
headerRow = new TableRow();
table.AppendChild(headerRow);
Aggregation.Add(table);
}
示例8: VisitPrint
public VisitPrint(Visit visit)
{
InitializeComponent();
TableCell r1 = new TableCell(new Paragraph(new Run(visit.Patient.AccountantCode)));
header.Rows[0].Cells.Add(r1);
TableCell r2 = new TableCell(new Paragraph(new Run(visit.Patient.ToString())));
header.Rows[0].Cells.Add(r2);
TableCell r3 = new TableCell(new Paragraph(new Run(visit.Doctor.ToString())));
header.Rows[0].Cells.Add(r3);
TableCell r4 = new TableCell(new Paragraph(new Run(new PersianDate(visit.FromTime).ToString())));
header.Rows[0].Cells.Add(r4);
foreach (VisitService s in visit.VisitServices)
{
TableRow r = new TableRow();
TableCell c1 = new TableCell(new Paragraph(new Run(s.Service.Title)));
r.Cells.Add(c1);
TableCell c2 = new TableCell(new Paragraph(new Run(new PatientHistory(s).Insurance)));
r.Cells.Add(c2);
TableCell c3 = new TableCell(new Paragraph(new Run(s.ToothDescription)));
r.Cells.Add(c3);
TableCell c4 = new TableCell(new Paragraph(new Run(s.FinalCost.ToString("n0"))));
r.Cells.Add(c4);
tblServices.Rows.Add(r);
}
comment.Inlines.Add(new Run(visit.Comment));
Fee.Inlines.Add(new Run(" "+visit.FinalSumCost.ToString("n0")+" ریال"));
}
示例9: BindPager
public void BindPager(int totalRecords, int pageSize, int currentPage)
{
int pageCount = (totalRecords % pageSize > 0) ? ((totalRecords / pageSize) + 1) : totalRecords / pageSize;
Table pagerTable;
TableRow pagerRow;
TableCell pagerCell;
if (pageCount > 1)
{
pagerTable = new Table();
pagerRow = new TableRow();
for (int index = 1; index <= pageCount; index++)
{
pagerCell = new TableCell();
if (index == currentPage)
pagerCell.Text = "<a class=selected href=index.aspx?currentPage=" + index + ">" + index + "</a>";
else
pagerCell.Text = "<a href=index.aspx?currentPage=" + index + ">" + index + "</a>";
pagerRow.Cells.Add(pagerCell);
}
pagerTable.Rows.Add(pagerRow);
pagerHolder.Controls.Add(pagerTable);
}
}
示例10: CreateModuleTable
public Table CreateModuleTable(string ModuleName, string ParentImage)
{
Table tbl = new Table();
//tbl.Attributes.Add("class", "Menu");
tbl.Attributes.Add("cellspacing", "0");
tbl.Attributes.Add("cellpadding", "0");
tbl.Attributes.Add("style", "width: 100%; height: 28px; padding:2 5 3 2; cursor:hand; color:#000000;background-image:url(../images/leftmenu/button.jpg)");
//tbl.Attributes.Add("style", "width: 100%; height: 28px; padding:2 5 3 2; border-right: buttonshadow 1px solid; border-top: #f5f5f5 1px solid; border-left: #f5f5f5 1px solid; border-bottom: buttonshadow 1px solid; background-color:Transparent; cursor:hand; color:#000000;");
TableRow tr = new TableRow();
TableCell tdImg = new TableCell();
TableCell td = new TableCell();
//Image img = new Image();
//img.Attributes.Add("style", "vertical-align: middle; border:0;hspace:3;");//width:20px;height:20px;
//if (ParentImage == "")
//{
// img.ImageUrl = "../images/leftmenu/exit.gif";
//}
//else
//{
// img.ImageUrl = "../images/leftmenu/" + ParentImage;
//}
//tdImg.Attributes.Add("style", "width:5%; text-align:right;");//FILTER:progid:DXImageTransform.Microsoft.Gradient(GradientType=1, StartColorStr=#ffffff, EndColorStr=buttonface);
//tdImg.Controls.Add(img);
td.Text = " " + ModuleName;
// td.Attributes.Add("style", "text-align:left; FILTER:progid:DXImageTransform.Microsoft.Gradient(GradientType=1, StartColorStr=buttonface, EndColorStr=white);"); //#91D6FA
tr.Controls.Add(tdImg);
tr.Controls.Add(td);
tbl.Controls.Add(tr);
return tbl;
}
示例11: Page_Load
protected void Page_Load (object sender, EventArgs e)
{
if (!IsPostBack) {
string action = Request ["action"];
int lane_id;
if (!string.IsNullOrEmpty (action)) {
switch (action) {
case "clone":
if (!int.TryParse (Request ["lane_id"], out lane_id))
break;
if (string.IsNullOrEmpty (Request ["lane"]))
break;
try {
int tmp;
tmp = Utils.LocalWebService.CloneLane (Master.WebServiceLogin, lane_id, Request ["lane"], false);
Response.Redirect ("EditLane.aspx?lane_id=" + tmp.ToString (), false);
return;
} catch (Exception ex) {
lblMessage.Text = Utils.FormatException (ex);
}
break;
case "remove":
if (!int.TryParse (Request ["lane_id"], out lane_id))
break;
Response.Redirect ("Delete.aspx?action=delete-lane&lane_id=" + lane_id.ToString (), false);
return;
case "add":
try {
Utils.LocalWebService.AddLane (Master.WebServiceLogin, Request ["lane"]);
Response.Redirect ("EditLanes.aspx", false);
return;
} catch (Exception ex) {
lblMessage.Text = Utils.FormatException (ex);
}
break;
default:
// do nothing
break;
}
}
} else if (!string.IsNullOrEmpty (Request ["txtLane"])) {
Utils.LocalWebService.AddLane (Master.WebServiceLogin, Request ["txtlane"]);
Response.Redirect ("EditLanes.aspx", false);
return;
}
GetLanesResponse response = Utils.LocalWebService.GetLanes (Master.WebServiceLogin);
TableRow row;
foreach (DBLane lane in response.Lanes) {
row = new TableRow ();
row.CssClass = lane.enabled ? "lane-enabled" : "lane-disabled";
row.Cells.Add (Utils.CreateTableCell (string.Format ("<a href='EditLane.aspx?lane_id={0}'>{1}</a>", lane.id, lane.lane)));
row.Cells.Add (Utils.CreateTableCell (
string.Format ("<a href='EditLanes.aspx?lane_id={0}&action=remove'>Delete</a> ", lane.id) +
string.Format ("<a href='javascript:cloneLane ({0}, \"{1}\");'>Clone</a>", lane.id, lane.lane)));
tblLanes.Rows.Add (row);
}
}
示例12: DeleteTemplate
/// <summary>
/// Delete a marketing acknowledgement template.
/// </summary>
/// <param name="template">Mapping of the column captions to a single row's values.</param>
public static void DeleteTemplate(TableRow template)
{
SelectTab("Templates");
SelectSectionDatalistRow(template, "Acknowledgement templates");
WaitClick(getXSelectedDatalistRowButton("Delete"));
Dialog.Yes();
}
示例13: boradmaker_Click
protected void boradmaker_Click(object sender, EventArgs e)
{
TableCell boardcells;
TableRow boardrows;
Table chessboard = new Table();
chessboard.Attributes.Add("align", "center");
string rowqueen = "25160374";
rowqueen = resultlist.SelectedItem.ToString();
char[] queenarray = rowqueen.ToCharArray();
for (int i = 0; i < 8; i++)
{
boardrows = new TableRow();
for (int j = 0; j < 8; j++)
{
boardcells = new TableCell();
if ((i + j) % 2 == 1)
{
boardcells.CssClass = "black_td";
}
else
{
boardcells.CssClass = "white_td";
}
if (j.ToString() == queenarray[i].ToString())
{
boardcells.CssClass += " queen";
}
boardrows.Cells.Add(boardcells);
}
chessboard.Rows.Add(boardrows);
}
PlaceHolder1.Controls.Add(chessboard);
}
示例14: AddReceipt
/// <summary>
/// Add a receipt process.
/// </summary>
/// <param name="receipt">Mapping of the field captions to their desired values.</param>
public static void AddReceipt(TableRow receipt)
{
SelectTab("Receipts");
ClickSectionAddButton("Receipt processes");
foreach (string caption in receipt.Keys)
{
if (receipt[caption] == null) continue;
string value = receipt[caption];
switch (caption)
{
case "Name":
SetTextField(Dialog.getXInput("ReceiptingProcessAddForm3", "_NAME_value"), value);
break;
case "Output format":
Dialog.SetDropDown(Dialog.getXInput("ReceiptingProcessAddForm3", "_BUSINESSPROCESSVIEWID_value"), value);
break;
case "Mark revenue 'Receipted' when process completes":
SetCheckbox(Dialog.getXInput("ReceiptingProcessAddForm3", "_MARKRECEIPTED_value"), value);
break;
default:
throw new NotImplementedException(String.Format("Field '{0}' is not implemented for a receipt process dialog.", caption));
}
}
Dialog.Save();
}
示例15: CursorSection
public CursorSection()
{
var layout = new TableLayout();
layout.Spacing = new Size(20, 20);
TableRow row;
layout.Rows.Add(row = new TableRow());
foreach (var type in Enum.GetValues(typeof(CursorType)).OfType<CursorType?>())
{
var label = new Label
{
Size = new Size(100, 50),
Text = type.ToString(),
VerticalAlignment = VerticalAlignment.Center,
TextAlignment = TextAlignment.Center,
BackgroundColor = Colors.Silver
};
if (type == null)
label.Cursor = null;
else
label.Cursor = new Cursor(type.Value);
row.Cells.Add(label);
if (row.Cells.Count > 3)
layout.Rows.Add(row = new TableRow());
}
Content = TableLayout.AutoSized(layout, centered: true);
}