本文整理汇总了C#中Group.Create方法的典型用法代码示例。如果您正苦于以下问题:C# Group.Create方法的具体用法?C# Group.Create怎么用?C# Group.Create使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Group
的用法示例。
在下文中一共展示了Group.Create方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Submit_Click
protected void Submit_Click(object sender, EventArgs e)
{
if (Utility.NoSpaceNotEmpty(txtGroupName.Text))
{
if (Utility.NoSpaceNotEmpty(ddlGroupKernel.Text))
{
if (Utility.NoSpaceNotEmpty(ddlGroupBootImage.Text))
{
List<int> members = new List<int>();
Group group = new Group();
foreach (GridViewRow row in gvHosts.Rows)
{
CheckBox cb = (CheckBox)row.FindControl("chkSelector");
if (cb != null && cb.Checked)
members.Add(Convert.ToInt32(gvHosts.DataKeys[row.RowIndex].Value));
}
group.Name = txtGroupName.Text;
group.Description = txtGroupDesc.Text;
group.Image = ddlGroupImage.Text;
group.Kernel = ddlGroupKernel.Text;
group.BootImage = ddlGroupBootImage.Text;
group.Args = txtGroupArguments.Text;
group.SenderArgs = txtGroupSenderArgs.Text;
foreach (ListItem item in lbScripts.Items)
if (item.Selected == true)
group.Scripts += item.Value + ",";
group.Create(group, members);
if (Utility.Message.Contains("Successfully"))
Response.Redirect("~/views/groups/view.aspx?page=edit&groupid=" + group.GetGroupID(group.Name));
Master.Msgbox(Utility.Message);
}
else
Master.Msgbox("Boot Image Cannot Be Empty");
}
else
Master.Msgbox("Kernel Cannot Be Empty");
}
else
Master.Msgbox("Name Cannot Be Empty Or Contain Spaces");
}
示例2: CreateMs
public TablixMembersType CreateMs(TablixMembersType parent, bool isStart, bool isRow)
{
if (isStart)
{
_level = 0;
}
var limit = isRow ? this.Columns.Count : this.Rows.Count;
var tablixMember = new TablixMember();
if ((!isRow && _level == limit - 1) || (isRow && _level==0))
{
tablixMember.Visibility = new Visibility() {Hidden = "true"}.Create();
var group = new Group { GroupExpressions = new GroupExpressionsType() {GroupExpression=new string[]{""} } };
tablixMember.Group = group.Create(isRow?"RowGroup":"ColumnGroup");
}
var heaer = new TablixHeader();
var contents = new CellContents() { Textbox = CreateTextbox("",true) }.Create();
heaer.CellContents = new CellContentsType[] { contents };
string size = isRow ? this.Columns[_level].Width : this.Rows[_level].Height;
heaer.Size = new string[] { size };
tablixMember.TablixHeader = heaer.Create();
_level++;
if (_level < limit)
{
tablixMember.TablixMembers = CreateMs(new TablixMembersType(), false, isRow);
}
parent.TablixMember = new TablixMemberType[] { tablixMember.Create() };
return parent;
}