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


C# GroupType类代码示例

本文整理汇总了C#中GroupType的典型用法代码示例。如果您正苦于以下问题:C# GroupType类的具体用法?C# GroupType怎么用?C# GroupType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


GroupType类属于命名空间,在下文中一共展示了GroupType类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Group

 public Group(Group parent)
 {
     Parent = parent;
     Members = new ArrayList();
     this.GroupType = GroupType.None;
     Occurrence = Occurrence.Required;
 }
开发者ID:NoobSkie,项目名称:taobao-shop-helper,代码行数:7,代码来源:Group.cs

示例2: AddConnector

 public void AddConnector(char c)
 {
     if (!Mixed && Members.Count == 0)
     {
         throw new Exception(
             String.Format("Missing token before connector '{0}'.", c)
             );
     }
     GroupType gt = GroupType.None;
     switch (c)
     {
         case ',':
             gt = GroupType.Sequence;
             break;
         case '|':
             gt = GroupType.Or;
             break;
         case '&':
             gt = GroupType.And;
             break;
     }
     if (GroupType != GroupType.None && GroupType != gt)
     {
         throw new Exception(
             String.Format("Connector '{0}' is inconsistent with {1} group.", c, GroupType.ToString())
             );
     }
     GroupType = gt;
 }
开发者ID:NoobSkie,项目名称:taobao-shop-helper,代码行数:29,代码来源:Group.cs

示例3: Group

 /// <summary>
 /// Initializes a new Content Model Group.
 /// </summary>
 /// <param name="parent">The parent model group.</param>
 public Group(Group parent)
 {
     _parent = parent;
     _members = new ArrayList();
     _type = GroupType.None;
     _occurrence = Occurrence.Required;
 }
开发者ID:radischevo,项目名称:Radischevo.Wahha,代码行数:11,代码来源:Group.cs

示例4: Group

 /// <summary>
 ///   Initialises a new Content Model Group.
 /// </summary>
 /// <param name = "parent">The parent model group.</param>
 public Group(Group parent)
 {
     m_parent = parent;
     Members = new ArrayList();
     m_groupType = GroupType.None;
     m_occurrence = Occurrence.Required;
 }
开发者ID:virmitio,项目名称:devtools,代码行数:11,代码来源:Group.cs

示例5: Group

 public Group(GroupType grpType,string grpName)
 {
     id = 0;
     type = grpType;
     name = grpName;
     rights = "";
 }
开发者ID:foresightbrand,项目名称:kebibi,代码行数:7,代码来源:Group.cs

示例6: Group

        public Group(int Id, string Name, string Description, string Badge, int RoomId, int Owner, int Time, int Type, int Colour1, int Colour2, int AdminOnlyDeco)
        {
            this.Id = Id;
            this.Name = Name;
            this.Description = Description;
            this.RoomId = RoomId;
            this.Badge = Badge;
            this.CreateTime = Time;
            this.CreatorId = Owner;
            this.Colour1 = (Colour1 == 0) ? 1 : Colour1;
            this.Colour2 = (Colour2 == 0) ? 1 : Colour2;

            switch (Type)
            {
                case 0:
                    this.GroupType = GroupType.OPEN;
                    break;
                case 1:
                    this.GroupType = GroupType.LOCKED;
                    break;
                case 2:
                    this.GroupType = GroupType.PRIVATE;
                    break;
            }

            this.AdminOnlyDeco = AdminOnlyDeco;
            this.ForumEnabled = ForumEnabled;

            this._members = new List<int>();
            this._requests = new List<int>();
            this._administrators = new List<int>();

            InitMembers();
        }
开发者ID:BjkGkh,项目名称:Boon,代码行数:34,代码来源:Group.cs

示例7: ShowDetail

        /// <summary>
        /// Shows the detail.
        /// </summary>
        /// <param name="groupTypeId">The groupType identifier.</param>
        public void ShowDetail( int groupTypeId )
        {
            pnlDetails.Visible = false;

            bool editAllowed = true;

            GroupType groupType = null;

            if ( !groupTypeId.Equals( 0 ) )
            {
                groupType = new GroupTypeService( new RockContext() ).Get( groupTypeId );
                pdAuditDetails.SetEntity( groupType, ResolveRockUrl( "~" ) );
            }

            if ( groupType == null )
            {
                groupType = new GroupType { Id = 0 };
                // hide the panel drawer that show created and last modified dates
                pdAuditDetails.Visible = false;
            }

            if ( groupType != null )
            {
                editAllowed = groupType.IsAuthorized( Authorization.EDIT, CurrentPerson );

                pnlDetails.Visible = true;
                hfGroupTypeId.Value = groupType.Id.ToString();

                // render UI based on Authorized and IsSystem
                bool readOnly = false;

                nbEditModeMessage.Text = string.Empty;
                if ( !editAllowed || !IsUserAuthorized( Authorization.EDIT ) )
                {
                    readOnly = true;
                    nbEditModeMessage.Text = EditModeMessage.ReadOnlyEditActionNotAllowed( GroupType.FriendlyTypeName );
                }

                if ( readOnly )
                {
                    btnEdit.Visible = false;
                    btnDelete.Visible = false;
                    ShowReadonlyDetails( groupType );
                }
                else
                {
                    btnEdit.Visible = true;
                    btnDelete.Visible = true;

                    if ( groupType.Id > 0 )
                    {
                        ShowReadonlyDetails( groupType );
                    }
                    else
                    {
                        ShowEditDetails( groupType );
                    }
                }
            }
        }
开发者ID:NewSpring,项目名称:Rock,代码行数:64,代码来源:CheckinTypeDetail.ascx.cs

示例8: GetGroup

        // -------------------------------------------------------------------- Get

        public GroupEntity GetGroup(string userName, string groupSlug, GroupType groupType)
        {
            using (var db = new CollectionDbContext())
            {
                // return all contacts across all groups since groupSlug is empty
                if (groupSlug.IsNullOrEmpty())
                {
                    // TODO paging
                    // get all items across all groups
                    var itemEnts = (from g in db.GroupEntities
                                from i in g.ItemEntities
                                where g.UserName.Equals(userName, StringComparison.InvariantCultureIgnoreCase) &&
                                      g.Id == i.GroupId &&
                                      g.GroupType == groupType
                                select i ).ToList();
                    if (itemEnts == null) return null;

                    var groupEnt = new GroupEntity();
                    foreach (var item in itemEnts)
                    {
                        if (!groupEnt.ItemEntities.Any(i=>i.ItemId == item.ItemId)) // filter out existing for "all" group
                            groupEnt.ItemEntities.Add(item);
                    }
                    groupEnt.UserName = userName;
                    return groupEnt;
                }

                // return contacts for a specific group
                return db.GroupEntities.Include(g => g.ItemEntities)
                                    .FirstOrDefault(g => g.UserName.Equals(userName, StringComparison.InvariantCultureIgnoreCase)
                                        && g.Slug.Equals(groupSlug, StringComparison.InvariantCultureIgnoreCase)
                                        && g.GroupType == groupType);
            }
        }
开发者ID:FanrayMedia,项目名称:Chef.me,代码行数:36,代码来源:SqlCollectionRepository.cs

示例9: GroupMatcher

 public GroupMatcher(Person pers, GroupType gt, List<DayOfWeek> days)
 {
     person = pers;
     personLocation = pers.GetHomeLocation();
     daysOfWeek = days;
     groupType = gt;
 }
开发者ID:Kronos11,项目名称:rock_lib_GroupMatching,代码行数:7,代码来源:GroupMatcher.cs

示例10: DeleteGroupType

 public void DeleteGroupType(GroupType groupType)
 {
     using (SPKTDataContext dc = conn.GetContext())
     {
         dc.GroupTypes.DeleteOnSubmit(groupType);
         dc.SubmitChanges();
     }
 }
开发者ID:ngocpq,项目名称:MHX2,代码行数:8,代码来源:GroupTypeRepository.cs

示例11: GroupTypeToIconTag

 internal static string GroupTypeToIconTag(GroupType type)
 {
     return type == GroupType.Equal ? ".#picture"
         : type == GroupType.Offsetted ? ".#pictures"
         : type == GroupType.Different ? ".#images"
         : type == GroupType.Unverified ? ".#images_question"
         : ".#puzzle";
 }
开发者ID:androidhacker,项目名称:DotNetProjs,代码行数:8,代码来源:FileSystemTreeNodeLocalDBCollision.cs

示例12: Group

        /// <summary>
        /// Constructs a Group.
        /// <param name="type">The group construction.</param>
        /// <param name="q">The value q.</param>
        /// <param name="groupName">The group name.</param>
        /// </summary>
        protected Group(GroupType type, byte[] q, string groupName)
        {
            if (q== null) throw new ArgumentNullException("q");

            Type = type;
            Q = q;
            GroupName = groupName;
        }
开发者ID:Fiware,项目名称:security.P2abcengine,代码行数:14,代码来源:Group.cs

示例13: GroupTypeToDescription

 internal static string GroupTypeToDescription(GroupType type)
 {
     return type == GroupType.Equal ? "Identical clones"
         : type == GroupType.Offsetted ? "Offsetted clones"
         : type == GroupType.Different ? "Mismatching clones"
         : type == GroupType.Unverified ? "Not yet verified clones"
         : "Unique";
 }
开发者ID:androidhacker,项目名称:DotNetProjs,代码行数:8,代码来源:FileSystemTreeNodeLocalDBCollision.cs

示例14: GetGroupList

        public List<GroupEntity> GetGroupList(string userName, GroupType groupType)
        {
            using (var db = new CollectionDbContext())
            {
                var groupEnts = db.GroupEntities.Include(g => g.ItemEntities)
                    .Where(g => g.UserName.Equals(userName, StringComparison.InvariantCultureIgnoreCase) 
                        && g.GroupType == groupType);

                return (groupEnts == null) ? null : groupEnts.ToList();
            }
        }
开发者ID:FanrayMedia,项目名称:Chef.me,代码行数:11,代码来源:SqlCollectionRepository.cs

示例15: GroupTypeToString

 public static string GroupTypeToString(GroupType type)
 {
     string result;
     if (type == GroupType.Private)
     {
         result = "Частна";
     }
     else
     {
         result = "Публична";
     }
     return result;
 }
开发者ID:hrraydov,项目名称:StudyIt,代码行数:13,代码来源:GroupTypeHelper.cs


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