/// <summary> /// Returns true if GroupItemDTO instances are equal /// </summary> /// <param name="input">Instance of GroupItemDTO to be compared</param> /// <returns>Boolean</returns> public bool Equals(GroupItemDTO input) { if (input == null) { return(false); } return (( Type == input.Type || (Type != null && Type.Equals(input.Type)) ) && ( Name == input.Name || (Name != null && Name.Equals(input.Name)) ) && ( Label == input.Label || (Label != null && Label.Equals(input.Label)) ) && ( Category == input.Category || (Category != null && Category.Equals(input.Category)) ) && ( Tags == input.Tags || Tags != null && Tags.SequenceEqual(input.Tags) ) && ( GroupNames == input.GroupNames || GroupNames != null && GroupNames.SequenceEqual(input.GroupNames) ) && ( GroupType == input.GroupType || (GroupType != null && GroupType.Equals(input.GroupType)) ) && ( Function == input.Function || (Function != null && Function.Equals(input.Function)) )); }
public bool Equals(GroupQuery input) { if (input == null) { return(false); } return (( Name == input.Name || (Name != null && Name.Equals(input.Name)) ) && ( GroupType == input.GroupType || (GroupType != null && GroupType.Equals(input.GroupType)) ) && ( CreationDate == input.CreationDate || (CreationDate != null && CreationDate.Equals(input.CreationDate)) ) && ( SortBy == input.SortBy || (SortBy != null && SortBy.Equals(input.SortBy)) ) && ( GroupMemberCountFilter == input.GroupMemberCountFilter || (GroupMemberCountFilter.Equals(input.GroupMemberCountFilter)) ) && ( LocaleFilter == input.LocaleFilter || (LocaleFilter != null && LocaleFilter.Equals(input.LocaleFilter)) ) && ( TagText == input.TagText || (TagText != null && TagText.Equals(input.TagText)) ) && ( ItemsPerPage == input.ItemsPerPage || (ItemsPerPage.Equals(input.ItemsPerPage)) ) && ( CurrentPage == input.CurrentPage || (CurrentPage.Equals(input.CurrentPage)) ) && ( RequestContinuationToken == input.RequestContinuationToken || (RequestContinuationToken != null && RequestContinuationToken.Equals(input.RequestContinuationToken)) )); }
private void GroupSelector_SelectionChanged(object sender, SelectionChangedEventArgs e) { GroupType selectedValue = (e.AddedItems[0] as GroupTypeItem).Value; SummaryGroup.IsEnabled = selectedValue.Equals(GroupType.None); switch (selectedValue) { case GroupType.None: ganttView.ClearGroup(); break; case GroupType.ConstraintType: ganttView.Group(new ConstraintTypeGroup(true)); break; case GroupType.Duration: ganttView.Group(new DurationGroup(true)); break; case GroupType.Milestones: ganttView.Group(new MilestonesGroup(true)); break; case GroupType.Resource: ganttView.Group(new ResourceGroup(true)); break; case GroupType.Status: DateTime statusDate = DateTime.Today; if (ganttView.ProgressLine.StatusDate.HasValue) { statusDate = ganttView.ProgressLine.StatusDate.Value; } ganttView.Group(new StatusGroup(statusDate, true)); break; case GroupType.TaskComplete: ganttView.Group(new TaskCompleteGroup(true)); break; case GroupType.TaskMode: ganttView.Group(new TaskModeGroup(true)); break; } }
/// <summary> /// Handles drop logic for items from a group. Drop logic depends on both drop target and dragged item /// </summary> /// <param name="gt"></param> /// <param name="targetItemType"></param> /// <param name="draggedItemType"></param> public void HandleDropAndDropBetweenItems(GroupType gt, ItemTypeOrder targetItemType, ItemTypeOrder draggedItemType) { if (!gt.Equals(Group)) //dropping an item from one group to another { ToolboxItem tbi = new ToolboxItem(); RemoveItemTypeOrder(gt, draggedItemType); tbi.ItemType = draggedItemType.Item; HandleToolboxItemDrop(Group, tbi, targetItemType); GroupTypeOrderCollection.Sort(x => x.GroupOrder); //refresh all groups to show the changes } else { int draggedPosition = gt.ItemOrder.IndexOf(draggedItemType); double targetItemTypeNo = targetItemType.ItemOrder; //affected item int targetPosition = gt.ItemOrder.IndexOf(targetItemType); if (targetItemType != draggedItemType) { gt.ItemOrder.Remove(draggedItemType); if (targetItemType.DesignID == null && !draggedItemType.DesignID.Equals("198")) { AdjustItemOrder(gt); draggedItemType.ItemOrder = targetItemType.ItemOrder; gt.ItemOrder.Add(draggedItemType); gt.ItemOrder.Sort(i => i.ItemOrder); GenerateEmptyFields(gt); } else if (targetItemType.DesignID == null && draggedItemType.DesignID.Equals("198")) { draggedItemType.ItemOrder = targetItemType.ItemOrder; gt.ItemOrder.Add(draggedItemType); gt.ItemOrder.Sort(i => i.ItemOrder); GenerateEmptyFields(gt); AdjustItemOrder(gt); } else if (draggedItemType.DesignID.Equals("198")) { if (draggedItemType.ItemOrder > targetItemType.ItemOrder) { gt.ItemOrder.Insert(targetPosition, draggedItemType); draggedItemType.ItemOrder = targetItemTypeNo; gt.ItemOrder.Sort(i => i.ItemOrder); AdjustItemOrder(gt); } else { draggedItemType.ItemOrder = targetItemTypeNo; //gt.ItemOrder.Insert(targetPosition - 1, draggedItemType); gt.ItemOrder.Insert(targetPosition - 1, draggedItemType); gt.ItemOrder.Sort(i => i.ItemOrder); GenerateEmptyFields(gt); AdjustItemOrder(gt); } //GenerateEmptyFields(gt); gt.ItemOrder.Sort(i => i.ItemOrder); } else if (targetItemType.DesignID != null && draggedItemType.DesignID != null /*&& !draggedItemType.DesignID.Equals("198")*/) { if (draggedItemType.ItemOrder > targetItemType.ItemOrder) { gt.ItemOrder.Insert(targetPosition, draggedItemType); draggedItemType.ItemOrder = targetItemTypeNo; } else { if (gt.ItemOrder.Count != targetPosition) { draggedItemType.ItemOrder = targetItemTypeNo; gt.ItemOrder.Insert(targetPosition, draggedItemType); } else { draggedItemType.ItemOrder = targetItemTypeNo; gt.ItemOrder.Add(draggedItemType); } } AdjustItemOrder(gt, targetPosition, draggedPosition); GenerateEmptyFields(gt); gt.ItemOrder.Sort(i => i.ItemOrder); } } } }
public bool IsDefault() { return(GroupType.Equals("SelectAll") || (!HasSiblings() && (GroupType.Equals("SelectAtLeastOne") || GroupType.Equals("SelectExactlyOne")))); }
public bool Equals(GroupV2 input) { if (input == null) { return(false); } return (( GroupId == input.GroupId || (GroupId.Equals(input.GroupId)) ) && ( Name == input.Name || (Name != null && Name.Equals(input.Name)) ) && ( GroupType == input.GroupType || (GroupType != null && GroupType.Equals(input.GroupType)) ) && ( MembershipIdCreated == input.MembershipIdCreated || (MembershipIdCreated.Equals(input.MembershipIdCreated)) ) && ( CreationDate == input.CreationDate || (CreationDate != null && CreationDate.Equals(input.CreationDate)) ) && ( ModificationDate == input.ModificationDate || (ModificationDate != null && ModificationDate.Equals(input.ModificationDate)) ) && ( About == input.About || (About != null && About.Equals(input.About)) ) && ( Tags == input.Tags || (Tags != null && Tags.SequenceEqual(input.Tags)) ) && ( MemberCount == input.MemberCount || (MemberCount.Equals(input.MemberCount)) ) && ( IsPublic == input.IsPublic || (IsPublic != null && IsPublic.Equals(input.IsPublic)) ) && ( IsPublicTopicAdminOnly == input.IsPublicTopicAdminOnly || (IsPublicTopicAdminOnly != null && IsPublicTopicAdminOnly.Equals(input.IsPublicTopicAdminOnly)) ) && ( Motto == input.Motto || (Motto != null && Motto.Equals(input.Motto)) ) && ( AllowChat == input.AllowChat || (AllowChat != null && AllowChat.Equals(input.AllowChat)) ) && ( IsDefaultPostPublic == input.IsDefaultPostPublic || (IsDefaultPostPublic != null && IsDefaultPostPublic.Equals(input.IsDefaultPostPublic)) ) && ( ChatSecurity == input.ChatSecurity || (ChatSecurity != null && ChatSecurity.Equals(input.ChatSecurity)) ) && ( Locale == input.Locale || (Locale != null && Locale.Equals(input.Locale)) ) && ( AvatarImageIndex == input.AvatarImageIndex || (AvatarImageIndex.Equals(input.AvatarImageIndex)) ) && ( Homepage == input.Homepage || (Homepage != null && Homepage.Equals(input.Homepage)) ) && ( MembershipOption == input.MembershipOption || (MembershipOption != null && MembershipOption.Equals(input.MembershipOption)) ) && ( DefaultPublicity == input.DefaultPublicity || (DefaultPublicity != null && DefaultPublicity.Equals(input.DefaultPublicity)) ) && ( Theme == input.Theme || (Theme != null && Theme.Equals(input.Theme)) ) && ( BannerPath == input.BannerPath || (BannerPath != null && BannerPath.Equals(input.BannerPath)) ) && ( AvatarPath == input.AvatarPath || (AvatarPath != null && AvatarPath.Equals(input.AvatarPath)) ) && ( ConversationId == input.ConversationId || (ConversationId.Equals(input.ConversationId)) ) && ( EnableInvitationMessagingForAdmins == input.EnableInvitationMessagingForAdmins || (EnableInvitationMessagingForAdmins != null && EnableInvitationMessagingForAdmins.Equals(input.EnableInvitationMessagingForAdmins)) ) && ( BanExpireDate == input.BanExpireDate || (BanExpireDate != null && BanExpireDate.Equals(input.BanExpireDate)) ) && ( Features == input.Features || (Features != null && Features.Equals(input.Features)) ) && ( ClanInfo == input.ClanInfo || (ClanInfo != null && ClanInfo.Equals(input.ClanInfo)) )); }
public bool Equals(GroupV2Card input) { if (input == null) { return(false); } return (( GroupId == input.GroupId || (GroupId.Equals(input.GroupId)) ) && ( Name == input.Name || (Name != null && Name.Equals(input.Name)) ) && ( GroupType == input.GroupType || (GroupType != null && GroupType.Equals(input.GroupType)) ) && ( CreationDate == input.CreationDate || (CreationDate != null && CreationDate.Equals(input.CreationDate)) ) && ( About == input.About || (About != null && About.Equals(input.About)) ) && ( Motto == input.Motto || (Motto != null && Motto.Equals(input.Motto)) ) && ( MemberCount == input.MemberCount || (MemberCount.Equals(input.MemberCount)) ) && ( Locale == input.Locale || (Locale != null && Locale.Equals(input.Locale)) ) && ( MembershipOption == input.MembershipOption || (MembershipOption != null && MembershipOption.Equals(input.MembershipOption)) ) && ( Capabilities == input.Capabilities || (Capabilities != null && Capabilities.Equals(input.Capabilities)) ) && ( ClanInfo == input.ClanInfo || (ClanInfo != null && ClanInfo.Equals(input.ClanInfo)) ) && ( AvatarPath == input.AvatarPath || (AvatarPath != null && AvatarPath.Equals(input.AvatarPath)) ) && ( Theme == input.Theme || (Theme != null && Theme.Equals(input.Theme)) )); }