当前位置: 首页>>代码示例>>C#>>正文


C# Group.Create方法代码示例

本文整理汇总了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");
    }
开发者ID:cocoon,项目名称:crucibleWDS,代码行数:44,代码来源:create.aspx.cs

示例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;
        }
开发者ID:carlosgilf,项目名称:prettyjs,代码行数:31,代码来源:TableBase.cs


注:本文中的Group.Create方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。