internal Group(int id, GroupTypes type, Sudoku sudoku) { Id = id; GroupType = type; Sudoku = sudoku; _Squares = new List<Square>(Sudoku.Size); }
public double[] OpponentGain; // scale factor for faction gained by opponent groups for killing this group public Group(GroupTypes type) { this.GroupType = type; }
public GroupStatus(GroupTypes type) { this.GroupType = type; }
public GroupStatus(GroupTypes type) { GroupType = type; }
/// <summary> /// Returns the selected group types. /// </summary> /// <param name="currentSchedule">The current schedule.</param> /// <returns></returns> public List <CheckInGroupType> SelectedGroupTypes(CheckInSchedule currentSchedule) { return((currentSchedule != null && currentSchedule.Schedule != null) ? GroupTypes.Where(t => t.SelectedForSchedule.Contains(currentSchedule.Schedule.Id)).ToList() : GroupTypes.Where(t => t.Selected).ToList()); }
public double [] OpponentGain; // scale factor for faction gained by opponent groups for killing this group public Group(GroupTypes type) { GroupType = type; }
public int GetFactionLevel(GroupTypes grouptype) { if(FactionList == null ) return 0; foreach(GroupStatus g in FactionList) { if(g.GroupType == grouptype) return g.FactionLevel; } return 0; }
/// <remarks/> public System.IAsyncResult BeginGroupGetListParent(bool isUser, string id, GroupTypes groupTypes, string workspaceId, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("GroupGetListParent", new object[] { isUser, id, groupTypes, workspaceId}, callback, asyncState); }
public Group[] GroupGetList(string workspaceId, GroupTypes groupType) { object[] results = this.Invoke("GroupGetList", new object[] { workspaceId, groupType}); return ((Group[])(results[0])); }
public async Task <IActionResult> Index([FromQuery] GroupTypes groupType = GroupTypes.Active) { return(await HandleRequestAsync(async() => await _groupService.GetGroupsAsync((int)groupType))); }
/// <remarks/> public System.IAsyncResult BeginGroupGetListAsDataSet(string workspaceId, GroupTypes groupType, System.AsyncCallback callback, object asyncState) { return this.BeginInvoke("GroupGetListAsDataSet", new object[] { workspaceId, groupType}, callback, asyncState); }
private IEnumerable<GroupContainer> GetSquareGroup(int id, GroupTypes type) { var container = ValidateAndGetSudokuContainer(id); return container.GetSquareGroup(type); }
// GET: Group public async Task <ActionResult> Index(GroupTypes groupType = GroupTypes.Active) { var groups = await _groupService.GetGroupsAsync((int)groupType); return(View(groups)); }
public IEnumerable<GroupContainer> GetSquareGroup(GroupTypes type) { List<GroupContainer> containers = new List<GroupContainer>(); switch (type) { case GroupTypes.Horizontal: { foreach (var group in Sudoku.AllHorizontalTypeGroups) { var container = new GroupContainer() { Id = group.Id, Type = (int)group.GroupType }; foreach (var s in group.Squares) container.Squares.Add(new SquareContainer(s) { SquareId = s.Id, Number = s.Number.Value }); containers.Add(container); } break; } case GroupTypes.Vertical: { foreach (var group in Sudoku.AllVerticalTypeGroups) { var container = new GroupContainer() { Id = group.Id, Type = (int)group.GroupType }; foreach (var s in group.Squares) container.Squares.Add(new SquareContainer(s) { SquareId = s.Id, Number = s.Number.Value }); containers.Add(container); } break; } case GroupTypes.Square: { foreach (var group in Sudoku.AllSquareTypeGroups) { var container = new GroupContainer() { Id = group.Id, Type = (int)group.GroupType }; foreach (var s in group.Squares) container.Squares.Add(new SquareContainer(s) { SquareId = s.Id, Number = s.Number.Value }); containers.Add(container); } break; } } return containers; }
public Group() { this.GroupType = GroupTypes.End_Unused; }
public System.Data.DataSet GroupGetListAsDataSet(string workspaceId, GroupTypes groupType) { object[] results = this.Invoke("GroupGetListAsDataSet", new object[] { workspaceId, groupType}); return ((System.Data.DataSet)(results[0])); }
public static int GetFactionLevel(Mobile m, GroupTypes grouptype) { if(m == null || grouptype == GroupTypes.End_Unused) return 0; ArrayList list = XmlAttach.FindAttachments(XmlAttach.MobileAttachments, m, typeof(XmlMobFactions), "Standard"); if(list != null && list.Count > 0) { XmlMobFactions x = list[0] as XmlMobFactions; if(x.FactionList == null ) return 0; foreach(GroupStatus g in x.FactionList) { if(g.GroupType == grouptype) return g.FactionLevel; } } return 0; }
/// <remarks/> public void GroupGetListAsync(string workspaceId, GroupTypes groupType) { this.GroupGetListAsync(workspaceId, groupType, null); }
/// <remarks/> public void GroupGetListAsync(string workspaceId, GroupTypes groupType, object userState) { if ((this.GroupGetListOperationCompleted == null)) { this.GroupGetListOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGroupGetListOperationCompleted); } this.InvokeAsync("GroupGetList", new object[] { workspaceId, groupType}, this.GroupGetListOperationCompleted, userState); }
public void Seed() { //Seed Group Types to database GroupTypes.Add(new GroupType { Name = "Tiger" }); GroupTypes.Add(new GroupType { Name = "Wolf" }); GroupTypes.Add(new GroupType { Name = "Bear" }); GroupTypes.Add(new GroupType { Name = "Webelos" }); //Seed test event to database Events.Add(new Event { Name = "Dev Event", Start = new DateTime(2012, 3, 5), End = new DateTime(2012, 3, 9) }); SaveChanges(); //See test TimeSlots to database Event primaryEvent = Events.First(); TimeSlots.Add(new TimeSlot { Event = primaryEvent, Name = "Mon: 9:00AM-10:00AM", Start = new DateTime(2012, 3, 5, 9, 0, 0), End = new DateTime(2012, 3, 5, 10, 00, 0) }); TimeSlots.Add(new TimeSlot { Event = primaryEvent, Name = "Mon: 10:15AM-11:15PM", Start = new DateTime(2012, 3, 5, 10, 15, 0), End = new DateTime(2012, 3, 5, 11, 15, 0) }); TimeSlots.Add(new TimeSlot { Event = primaryEvent, Name = "Mon: 11:30PM-12:30PM", Start = new DateTime(2012, 3, 5, 11, 30, 0), End = new DateTime(2012, 3, 5, 12, 30, 0) }); TimeSlots.Add(new TimeSlot { Event = primaryEvent, Name = "Mon: 1:30PM-2:30PM", Start = new DateTime(2012, 3, 5, 13, 30, 0), End = new DateTime(2012, 3, 5, 14, 30, 0) }); TimeSlots.Add(new TimeSlot { Event = primaryEvent, Name = "Mon: 2:45PM-3:45PM", Start = new DateTime(2012, 3, 5, 14, 45, 0), End = new DateTime(2012, 3, 5, 15, 45, 0) }); TimeSlots.Add(new TimeSlot { Event = primaryEvent, Name = "Tues: 9:00AM-10:00AM", Start = new DateTime(2012, 3, 6, 9, 0, 0), End = new DateTime(2012, 3, 6, 10, 00, 0) }); TimeSlots.Add(new TimeSlot { Event = primaryEvent, Name = "Tues: 10:15AM-11:15PM", Start = new DateTime(2012, 3, 6, 10, 15, 0), End = new DateTime(2012, 3, 6, 11, 15, 0) }); TimeSlots.Add(new TimeSlot { Event = primaryEvent, Name = "Tues: 11:30PM-12:30PM", Start = new DateTime(2012, 3, 6, 11, 30, 0), End = new DateTime(2012, 3, 6, 12, 30, 0) }); TimeSlots.Add(new TimeSlot { Event = primaryEvent, Name = "Tues: 1:30PM-2:30PM", Start = new DateTime(2012, 3, 6, 13, 30, 0), End = new DateTime(2012, 3, 6, 14, 30, 0) }); TimeSlots.Add(new TimeSlot { Event = primaryEvent, Name = "Tues: 2:45PM-3:45PM", Start = new DateTime(2012, 3, 6, 14, 45, 0), End = new DateTime(2012, 3, 6, 15, 45, 0) }); TimeSlots.Add(new TimeSlot { Event = primaryEvent, Name = "Wed: 9:00AM-10:00AM", Start = new DateTime(2012, 3, 7, 9, 0, 0), End = new DateTime(2012, 3, 7, 10, 00, 0) }); TimeSlots.Add(new TimeSlot { Event = primaryEvent, Name = "Wed: 10:15AM-11:15PM", Start = new DateTime(2012, 3, 7, 10, 15, 0), End = new DateTime(2012, 3, 7, 11, 15, 0) }); TimeSlots.Add(new TimeSlot { Event = primaryEvent, Name = "Wed: 11:30PM-12:30PM", Start = new DateTime(2012, 3, 7, 11, 30, 0), End = new DateTime(2012, 3, 7, 12, 30, 0) }); TimeSlots.Add(new TimeSlot { Event = primaryEvent, Name = "Wed: 1:30PM-2:30PM", Start = new DateTime(2012, 3, 7, 13, 30, 0), End = new DateTime(2012, 3, 7, 14, 30, 0) }); TimeSlots.Add(new TimeSlot { Event = primaryEvent, Name = "Wed: 2:45PM-3:45PM", Start = new DateTime(2012, 3, 7, 14, 45, 0), End = new DateTime(2012, 3, 7, 15, 45, 0) }); TimeSlots.Add(new TimeSlot { Event = primaryEvent, Name = "Thurs: 9:00AM-10:00AM", Start = new DateTime(2012, 3, 8, 9, 0, 0), End = new DateTime(2012, 3, 8, 10, 00, 0) }); TimeSlots.Add(new TimeSlot { Event = primaryEvent, Name = "Thurs: 10:15AM-11:15PM", Start = new DateTime(2012, 3, 8, 10, 15, 0), End = new DateTime(2012, 3, 8, 11, 15, 0) }); TimeSlots.Add(new TimeSlot { Event = primaryEvent, Name = "Thurs: 11:30PM-12:30PM", Start = new DateTime(2012, 3, 8, 11, 30, 0), End = new DateTime(2012, 3, 8, 12, 30, 0) }); TimeSlots.Add(new TimeSlot { Event = primaryEvent, Name = "Thurs: 1:30PM-2:30PM", Start = new DateTime(2012, 3, 8, 13, 30, 0), End = new DateTime(2012, 3, 8, 14, 30, 0) }); TimeSlots.Add(new TimeSlot { Event = primaryEvent, Name = "Thurs: 2:45PM-3:45PM", Start = new DateTime(2012, 3, 8, 14, 45, 0), End = new DateTime(2012, 3, 8, 15, 45, 0) }); TimeSlots.Add(new TimeSlot { Event = primaryEvent, Name = "Fri: 9:00AM-10:00AM", Start = new DateTime(2012, 3, 9, 9, 0, 0), End = new DateTime(2012, 3, 9, 10, 00, 0) }); TimeSlots.Add(new TimeSlot { Event = primaryEvent, Name = "Fri: 10:15AM-11:15PM", Start = new DateTime(2012, 3, 9, 10, 15, 0), End = new DateTime(2012, 3, 9, 11, 15, 0) }); TimeSlots.Add(new TimeSlot { Event = primaryEvent, Name = "Fri: 11:30PM-12:30PM", Start = new DateTime(2012, 3, 9, 11, 30, 0), End = new DateTime(2012, 3, 9, 12, 30, 0) }); TimeSlots.Add(new TimeSlot { Event = primaryEvent, Name = "Fri: 1:30PM-2:30PM", Start = new DateTime(2012, 3, 9, 13, 30, 0), End = new DateTime(2012, 3, 9, 14, 30, 0) }); TimeSlots.Add(new TimeSlot { Event = primaryEvent, Name = "Fri: 2:45PM-3:45PM", Start = new DateTime(2012, 3, 9, 14, 45, 0), End = new DateTime(2012, 3, 9, 15, 45, 0) }); SaveChanges(); //create ICollection for time slots for each station ICollection <TimeSlot> timeslots = TimeSlots.ToList(); TimeSlots.Add(new TimeSlot { Event = primaryEvent, Name = "Mon Lunch", Start = new DateTime(2012, 3, 5, 12, 30, 0), End = new DateTime(2012, 3, 5, 13, 30, 0), isGeneral = true }); TimeSlots.Add(new TimeSlot { Event = primaryEvent, Name = "Tues Lunch", Start = new DateTime(2012, 3, 6, 12, 30, 0), End = new DateTime(2012, 3, 6, 13, 30, 0), isGeneral = true }); TimeSlots.Add(new TimeSlot { Event = primaryEvent, Name = "Wed Lunch", Start = new DateTime(2012, 3, 7, 12, 30, 0), End = new DateTime(2012, 3, 7, 13, 30, 0), isGeneral = true }); TimeSlots.Add(new TimeSlot { Event = primaryEvent, Name = "Thurs Lunch", Start = new DateTime(2012, 3, 8, 12, 30, 0), End = new DateTime(2012, 3, 8, 13, 30, 0), isGeneral = true }); TimeSlots.Add(new TimeSlot { Event = primaryEvent, Name = "Fri Lunch", Start = new DateTime(2012, 3, 9, 12, 30, 0), End = new DateTime(2012, 3, 9, 13, 30, 0), isGeneral = true }); SaveChanges(); //Seed testing stations to database Stations.Add(new Station { Event = primaryEvent, Name = "Fishing", Description = "", Location = "", Capacity = 1, AvailableTimeSlots = timeslots }); Stations.Add(new Station { Event = primaryEvent, Name = "Knots", Description = "", Location = "", Capacity = 1, AvailableTimeSlots = timeslots }); Stations.Add(new Station { Event = primaryEvent, Name = "Songs & Skits", Description = "", Location = "", Capacity = 1, AvailableTimeSlots = timeslots }); Stations.Add(new Station { Event = primaryEvent, Name = "Wood Projects", Description = "", Location = "", Capacity = 1, AvailableTimeSlots = timeslots }); Stations.Add(new Station { Event = primaryEvent, Name = "Outdoor Cooking", Description = "", Location = "", Capacity = 1, AvailableTimeSlots = timeslots }); Stations.Add(new Station { Event = primaryEvent, Name = "Arts & Crafts", Description = "", Location = "", Capacity = 1, AvailableTimeSlots = timeslots }); Stations.Add(new Station { Event = primaryEvent, Name = "Creeking", Description = "", Location = "", Capacity = 1, AvailableTimeSlots = timeslots }); Stations.Add(new Station { Event = primaryEvent, Name = "Chess", Description = "", Location = "", Capacity = 1, AvailableTimeSlots = timeslots }); Stations.Add(new Station { Event = primaryEvent, Name = "Knight Training", Description = "", Location = "", Capacity = 1, AvailableTimeSlots = timeslots }); Stations.Add(new Station { Event = primaryEvent, Name = "Volleyball", Description = "", Location = "", Capacity = 1, AvailableTimeSlots = timeslots }); Stations.Add(new Station { Event = primaryEvent, Name = "Flag Football", Description = "", Location = "", Capacity = 1, AvailableTimeSlots = timeslots }); Stations.Add(new Station { Event = primaryEvent, Name = "Trading Post", Description = "", Location = "", Capacity = 1, AvailableTimeSlots = timeslots }); Stations.Add(new Station { Event = primaryEvent, Name = "Craftsman Activity Pin", Description = "", Location = "", Capacity = 1, isActivityPin = true, AvailableTimeSlots = timeslots }); Stations.Add(new Station { Event = primaryEvent, Name = "Forester Activity Pin", Description = "", Location = "", Capacity = 1, isActivityPin = true, AvailableTimeSlots = timeslots }); Stations.Add(new Station { Event = primaryEvent, Name = "Naturalist Activity Pin", Description = "", Location = "", Capacity = 1, isActivityPin = true, AvailableTimeSlots = timeslots }); Stations.Add(new Station { Event = primaryEvent, Name = "Artist Activity Pin", Description = "", Location = "", Capacity = 1, isActivityPin = true, AvailableTimeSlots = timeslots }); Stations.Add(new Station { Event = primaryEvent, Name = "Aquanaut Activity Pin", Description = "", Location = "", Capacity = 1, isActivityPin = true, AvailableTimeSlots = timeslots }); Stations.Add(new Station { Event = primaryEvent, Name = "BB", Description = "", Location = "", Capacity = 1, Category = "Shooting", AvailableTimeSlots = timeslots }); Stations.Add(new Station { Event = primaryEvent, Name = "Archery", Description = "", Location = "", Capacity = 1, Category = "Shooting", AvailableTimeSlots = timeslots }); Stations.Add(new Station { Event = primaryEvent, Name = "Swimming", Description = "", Location = "", Capacity = 1, AvailableTimeSlots = timeslots }); Stations.Add(new Station { Event = primaryEvent, Name = "Kickball", Description = "", Location = "", Capacity = 1, AvailableTimeSlots = timeslots }); Stations.Add(new Station { Event = primaryEvent, Name = "Leaf Rubbing", Description = "", Location = "", Capacity = 1, AvailableTimeSlots = timeslots }); SaveChanges(); ////Seed groups Groups.Add(new Group { Event = primaryEvent, Name = "Sir Tegyr", Type = GroupTypes.Where(t => t.ID == 1).Single(), Preference1 = null, Preference2 = null, Preference3 = null }); Groups.Add(new Group { Event = primaryEvent, Name = "Sir Galahad", Type = GroupTypes.Where(t => t.ID == 2).Single(), Preference1 = null, Preference2 = null, Preference3 = null }); Groups.Add(new Group { Event = primaryEvent, Name = "Sir Gawain", Type = GroupTypes.Where(t => t.ID == 2).Single(), Preference1 = null, Preference2 = null, Preference3 = null }); Groups.Add(new Group { Event = primaryEvent, Name = "Sir Gareth", Type = GroupTypes.Where(t => t.ID == 2).Single(), Preference1 = null, Preference2 = null, Preference3 = null }); Groups.Add(new Group { Event = primaryEvent, Name = "Sir Bors de Ganis", Type = GroupTypes.Where(t => t.ID == 2).Single(), Preference1 = null, Preference2 = null, Preference3 = null }); Groups.Add(new Group { Event = primaryEvent, Name = "Sir Kay", Type = GroupTypes.Where(t => t.ID == 3).Single(), Preference1 = null, Preference2 = null, Preference3 = null }); Groups.Add(new Group { Event = primaryEvent, Name = "Sir Gaheris", Type = GroupTypes.Where(t => t.ID == 3).Single(), Preference1 = null, Preference2 = null, Preference3 = null }); Groups.Add(new Group { Event = primaryEvent, Name = "Sir Percivale", Type = GroupTypes.Where(t => t.ID == 3).Single(), Preference1 = null, Preference2 = null, Preference3 = null }); Groups.Add(new Group { Event = primaryEvent, Name = "Sir Lionel", Type = GroupTypes.Where(t => t.ID == 3).Single(), Preference1 = null, Preference2 = null, Preference3 = null }); Groups.Add(new Group { Event = primaryEvent, Name = "Sir Tristan", Type = GroupTypes.Where(t => t.ID == 4).Single(), Preference1 = null, Preference2 = null, Preference3 = null }); Groups.Add(new Group { Event = primaryEvent, Name = "Sir Bedivere", Type = GroupTypes.Where(t => t.ID == 4).Single(), Preference1 = null, Preference2 = null, Preference3 = null }); Groups.Add(new Group { Event = primaryEvent, Name = "Sir Dagonet", Type = GroupTypes.Where(t => t.ID == 4).Single(), Preference1 = null, Preference2 = null, Preference3 = null }); Groups.Add(new Group { Event = primaryEvent, Name = "Sir Geriant", Type = GroupTypes.Where(t => t.ID == 4).Single(), Preference1 = null, Preference2 = null, Preference3 = null }); Groups.Add(new Group { Event = primaryEvent, Name = "Sir Lamorak", Type = GroupTypes.Where(t => t.ID == 4).Single(), Preference1 = null, Preference2 = null, Preference3 = null }); Groups.Add(new Group { Event = primaryEvent, Name = "Sir Lancelot", Type = GroupTypes.Where(t => t.ID == 4).Single(), Preference1 = null, Preference2 = null, Preference3 = null }); SaveChanges(); // Seed Constraints SchedulingConstraints.Add(new SchedulingConstraint { Event = primaryEvent, GroupType = GroupTypes.Where(t => t.ID == 1).Single(), Group = null, Station = Stations.Where(s => s.ID == 1).Single(), }); SchedulingConstraints.Add(new SchedulingConstraint { Event = primaryEvent, GroupType = null, Group = Groups.Where(g => g.ID == 2).Single(), Station = Stations.Where(s => s.ID == 2).Single(), }); SaveChanges(); }
public Group[] GroupGetListParent(bool isUser, string id, GroupTypes groupTypes, string workspaceId) { object[] results = this.Invoke("GroupGetListParent", new object[] { isUser, id, groupTypes, workspaceId}); return ((Group[])(results[0])); }
private void GroupComboBoxLoaded(object sender, RoutedEventArgs e) { ComboBox box = sender as ComboBox; box.ItemsSource = GroupTypes.ToList(); }
/// <remarks/> public void GroupGetListParentAsync(bool isUser, string id, GroupTypes groupTypes, string workspaceId) { this.GroupGetListParentAsync(isUser, id, groupTypes, workspaceId, null); }
public override void Deserialize(GenericReader reader) { base.Deserialize(reader); int version = reader.ReadInt(); switch (version) { case 1: this.m_Credits = reader.ReadInt(); goto case 0; case 0: // version 0 this.verboseMobFactions = reader.ReadBool(); int count = reader.ReadInt(); int newcount = (int)GroupTypes.End_Unused; // prepare the new faction status list this.FactionList = new GroupStatus[newcount]; // initialize the faction status list with the default grouptypes for (int j = 0; j < newcount; j++) { this.FactionList[j] = new GroupStatus((GroupTypes)j); } // now read in the serialized FactionList entries and cross reference to the current GroupTypes for (int i = 0; i < count; i++) { string gname = reader.ReadString(); int gfac = reader.ReadInt(); // look up the enum by name GroupTypes gtype = GroupTypes.End_Unused; try { gtype = (GroupTypes)Enum.Parse(typeof(GroupTypes), gname); } catch { } // try to find the matching entry in the recently constructed faction status list if (gtype != GroupTypes.End_Unused) { for (int j = 0; j < newcount; j++) { GroupStatus g = this.FactionList[j]; if (g.GroupType == gtype) { g.FactionLevel = gfac; break; } } } } this.Refractory = reader.ReadTimeSpan(); TimeSpan remaining = reader.ReadTimeSpan(); this.m_EndTime = DateTime.UtcNow + remaining; break; } }
/// <remarks/> public void GroupGetListParentAsync(bool isUser, string id, GroupTypes groupTypes, string workspaceId, object userState) { if ((this.GroupGetListParentOperationCompleted == null)) { this.GroupGetListParentOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGroupGetListParentOperationCompleted); } this.InvokeAsync("GroupGetListParent", new object[] { isUser, id, groupTypes, workspaceId}, this.GroupGetListParentOperationCompleted, userState); }
public SettingsViewModel(Window window, Settings settings, ImageService imageService, PathInfo pathInfo, ReportsController controller, List <string> groupNames, string clientId) { _window = window; _settings = settings; _pathInfo = pathInfo; _imageService = imageService; _controller = controller; _clientId = clientId; _groupNames = groupNames; WindowTitle = "Settings"; DisplayDateSuffixWithReportName = settings.DisplayDateSuffixWithReportName; GroupType = GroupTypes.FirstOrDefault(a => a.Type == settings.GroupByType) ?? GroupTypes.First(); var reportTemplates = new List <ReportTemplate>(); foreach (var reportTemplate in _controller.GetCustomReportTemplates()) { if (!string.IsNullOrEmpty(reportTemplate.Path) && File.Exists(reportTemplate.Path)) { reportTemplate.IsAvailable = true; } reportTemplates.Add(reportTemplate); } _reportTemplates = new ObservableCollection <ReportTemplate>(reportTemplates); }
public GroupStatus() { this.GroupType = GroupTypes.End_Unused; }
public HandCard(GroupTypes groupType, List <Card> cards, CardTypes cardType) { GroupType = groupType; Cards = cards; CardType = cardType; }
public double[] OpponentGain;// scale factor for faction gained by opponent groups for killing this group public Group(GroupTypes type) { this.GroupType = type; }
public void RefreshView(Settings settings, List <Report> reports) { ClearVisibleReports(); Settings = settings; _groupType = GroupTypes.FirstOrDefault(a => a.Type == settings.GroupByType) ?? GroupTypes.First(); OnPropertyChanged(nameof(GroupType)); _reports = reports; Task.Run(() => ApplyFilter(true)); }
public ReportsNavigationViewModel(List <Report> reports, Settings settings, PathInfo pathInfo) { _reports = reports; _filteredReports = _reports; Settings = settings; _pathInfo = pathInfo; _filterString = string.Empty; _groupType = GroupTypes.FirstOrDefault(a => a.Type == settings.GroupByType) ?? GroupTypes.First(); Task.Run(() => ApplyFilter(true)); }
public static Group FindGroup(GroupTypes gtype) { foreach(Group g in KillGroups) { if(g.GroupType == gtype) { return g; } } return null; }
public static int GetFactionLevel(Mobile m, GroupTypes grouptype) { if(m == null || grouptype == GroupTypes.End_Unused) return 0; XmlMobFactions x = XmlAttach.FindAttachment(m, typeof(XmlMobFactions), "Standard") as XmlMobFactions; if(x != null) { if(x.FactionList == null ) return 0; foreach(GroupStatus g in x.FactionList) { if(g.GroupType == grouptype) return g.FactionLevel; } } return 0; }
public Group() { GroupType = GroupTypes.End_Unused; }
public GroupStatus() { GroupType = GroupTypes.End_Unused; }
public void SetFactionLevel(GroupTypes grouptype, int value) { if(FactionList == null ) return; foreach(GroupStatus g in FactionList) { if(g.GroupType == grouptype) { g.FactionLevel = value; return; } } }
public FileTypeGroup(string parHeaderName, bool parShowInExplorer, GroupTypes parGroupType) { _HeaderName = parHeaderName; _ShowInExplorer = parShowInExplorer; _GroupType = parGroupType; }