本文整理汇总了C#中GroupType类的典型用法代码示例。如果您正苦于以下问题:C# GroupType类的具体用法?C# GroupType怎么用?C# GroupType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
GroupType类属于命名空间,在下文中一共展示了GroupType类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: Delete
/// <summary>
/// Verifies if the specified <see cref="Rock.Model.GroupType"/> can be deleted, and if so deletes it.
/// </summary>
/// <param name="item">The <see cref="Rock.Model.GroupType"/> to delete.</param>
/// <param name="personId">A <see cref="System.Int32"/> representing the Id of the <see cref="Rock.Model.Person"/> who is attempting to delete the
/// <see cref="Rock.Model.GroupType"/>.</param>
/// <returns>A <see cref="System.Boolean"/> value that is <c>true</c> if the <see cref="Rock.Model.GroupType"/> was able to be successfully deleted, otherwise <c>false</c>.</returns>
public override bool Delete( GroupType item, int? personId )
{
string message;
if ( !CanDelete( item, out message ) )
{
return false;
}
item.ChildGroupTypes.Clear();
this.Save( item, personId );
return base.Delete( item, personId );
}
开发者ID:pkdevbox,项目名称:Rock,代码行数:20,代码来源:GroupTypeService.Partial.cs
示例17: Group
public Group(ID<IUserOrGroup, Guid> id,
string name,
bool builtIn,
bool automatic,
GroupType type,
FileHandlerFactoryLocator fileHandlerFactoryLocator,
string displayName)
: base(id, name, builtIn, fileHandlerFactoryLocator, displayName)
{
_Id = id;
_Name = name;
_Automatic = automatic;
_Type = type;
}
开发者ID:GWBasic,项目名称:ObjectCloud,代码行数:14,代码来源:Group.cs
示例18: Group
/// <summary>
/// Constructor
/// </summary>
/// <param name="type">The type of group this is</param>
/// <param name="mediaType">Media type of the new group</param>
/// <param name="timeline">Timeline to use for the group</param>
/// <param name="fps">Fps for the group</param>
public Group(ITimeline timeline, GroupType type, AMMediaType mediaType, string name, double fps)
: base(timeline, name, -1)
{
if (timeline == null) throw new ArgumentNullException("timeline");
if (mediaType == null) throw new ArgumentNullException("mediaType");
if (fps <= 0) throw new SplicerException(Resources.ErrorFramesPerSecondMustBeGreaterThenZero);
_timeline = timeline;
_type = type;
_fps = fps;
_group = TimelineBuilder.InsertGroup(_timeline.DesTimeline, mediaType, name);
TimelineComposition = (IAMTimelineComp) _group;
}
开发者ID:pusp,项目名称:o2platform,代码行数:21,代码来源:Group.cs
示例19: Search
public static Task<Search> Search(string access_token, string q, string fields = "members_count", int country_id = 0, int city_id = 0, byte sort = 0, short count = 1000, short offset = 0, GroupType type = GroupType.all, int future = 0)
{
return Task.Run<Search>(() =>
{
try
{
//Собираем параметры
StringBuilder data = new StringBuilder();
data.Append("&sort=" + (sort == 6 ? 0 : sort));
data.Append("&offset=" + offset);
data.Append("&count=" + count);
data.Append("&future=" + future);
if (type != GroupType.all)
data.Append("&type=" + type.ToString());
if (country_id != 0)
data.Append("&country_id=" + country_id);
if (city_id != 0 && country_id != 0)
data.Append("&city_id=" + city_id);
if (q != null)
data.Append("&q=" + q);
if (fields != null)
data.Append("&fields=" + fields);
if (access_token != null)
data.Append("&access_token=" + access_token);
else if (VKdata.token != null)
data.Append("&access_token=" + VKdata.token);
//Получаем json данные
string json = Regex.Replace(result.get("groups.search", data.ToString(), true), "^{\"response\":\\[[0-9]+,{\"", "{\"response\":[{\"");
//Чистим ресурсы и возвращаем результаты
access_token = null; q = null; fields = null; data = null;
return JsonConvert.DeserializeObject<Search>(json);
}
catch (Newtonsoft.Json.JsonReaderException) { }
catch { }
//Ошибка
access_token = null; q = null; fields = null;
return new Search();
});
}
开发者ID:korner-brazers,项目名称:VK-HashTag,代码行数:49,代码来源:groups.cs
示例20: SqlAzManApplicationGroup
internal SqlAzManApplicationGroup(NetSqlAzManStorageDataContext db, IAzManApplication application, int applicationGroupId, IAzManSid sid, string name, string description, string lDapQuery, GroupType groupType, SqlAzManENS ens)
{
this.db = db;
this.application = application;
this.applicationGroupId = applicationGroupId;
this.sid = sid;
this.name = name;
this.description = description;
this.lDapQuery = String.IsNullOrEmpty(lDapQuery) ? String.Empty : lDapQuery;
this.groupType = groupType;
this.ens = ens;
if (groupType != GroupType.Basic)
{
this.members = new Dictionary<IAzManSid, IAzManApplicationGroupMember>();
}
}
开发者ID:JamesTryand,项目名称:NetSqlAzMan,代码行数:16,代码来源:SqlAzManApplicationGroup.cs
注:本文中的GroupType类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论