private void DesiredSkills_Load(object sender, EventArgs e) { this.Dock = DockStyle.Fill; // 3,4+n*33 // 3,37 // 3,70 int cbNum = 1; var classtags = _itemTagDao.GetValidClassItemTags(); foreach (var tag in classtags) { // Filter out 4 digit classes (combos) var cleanTag = Regex.Replace(tag.Tag, @"[^\d]", ""); if (cleanTag.Length > 3) { continue; } var cb = new FirefoxCheckBox { Size = new Size { Height = 27, Width = 121 }, Tag = $"iatag_ui_{tag.Name.ToLower()}", Text = tag.Name, Location = new Point { X = 3, Y = 3 + cbNum * 33 } }; _classes[tag.Tag] = cb; classesPanelBox.Controls.Add(cb); cbNum++; } classesPanelBox.Size = new Size { Height = 10 + cbNum * 33, Width = 163 }; initControlsRecursive(this.Controls); }
private void DesiredSkills_Load(object sender, EventArgs e) { Dock = DockStyle.Fill; // 3,4+n*33 // 3,37 // 3,70 var cbNum = 1; var classTags = _itemTagDao.GetValidClassItemTags() .Where(entry => Regex.Replace(entry.Tag, @"[^\d]", "").Length <= 3) // Filter out 4 digit classes (combo classes) .ToList(); foreach (var tag in classTags) { var cb = new FirefoxCheckBox { Size = new Size { Height = 27, Width = 121 }, Tag = $"iatag_ui_{tag.Name.ToLowerInvariant()}", Text = tag.Name, Location = new Point { X = 3, Y = 3 + cbNum * 33 } }; _classes[tag.Tag] = cb; classesPanelBox.Controls.Add(cb); cbNum++; } classesPanelBox.Size = new Size { Height = 10 + cbNum * 33, Width = classesPanelBox.Size.Width }; InitControlsRecursive(Controls); }
public DesiredSkills(IItemTagDao itemTagDao) { InitializeComponent(); var damageFilterControl = _damageFilter.Controls[0]; damageFilterControl.Location = new Point(12, 9); Controls.Add(damageFilterControl); var dotFilterControl = _dotFilter.Controls[0]; dotFilterControl.Location = new Point(12, 451); Controls.Add(dotFilterControl); var miscFilterControl = _miscFilter.Controls[0]; miscFilterControl.Location = new Point(12, 723); Controls.Add(miscFilterControl); var resistanceFilterControl = _resistanceFilters.Controls[0]; resistanceFilterControl.Location = new Point(12, 1275); Controls.Add(resistanceFilterControl); // Classes var classTags = itemTagDao.GetValidClassItemTags() .Where(entry => Regex.Replace(entry.Tag, @"[^\d]", "").Length <= 3) // Filter out 4 digit classes (combo classes) .ToList(); _classesFilters = new Filters.Classes(classTags); var classesFilterControl = _classesFilters.Controls[0]; classesFilterControl.Location = new Point(12, 1693); Controls.Add(classesFilterControl); }