public SellRule(string name, int itemType, int minIlvl, SellRuleCriteria[] criterias) { Name = name; ItemType = itemType; MinIlvl = minIlvl; Criterias = criterias; }
private SellRuleCriteria[] GetCriterias() { SellRuleCriteria[] criterias = new SellRuleCriteria[_lineCount]; for (int i = 1; i <= _lineCount; i++) { ComboBox selectedStatCbo = (ComboBox)pnlRuleDef.Controls.Find(STAT_CBO_NAME + i, true)[0]; NumericUpDown minAmountNud = (NumericUpDown)pnlRuleDef.Controls.Find(STAT_NUD_NAME + i, true)[0]; criterias[i - 1] = new SellRuleCriteria(((ComboBoxItem)selectedStatCbo.SelectedItem).Value, minAmountNud.Value); } return(criterias); }
private SellRuleCriteria[] GetCriterias() { SellRuleCriteria[] criterias = new SellRuleCriteria[_lineCount]; for (int i = 1; i <= _lineCount; i++) { ComboBox selectedStatCbo = (ComboBox)pnlRuleDef.Controls.Find(STAT_CBO_NAME + i, true)[0]; NumericUpDown minAmountNud = (NumericUpDown)pnlRuleDef.Controls.Find(STAT_NUD_NAME + i, true)[0]; criterias[i-1] = new SellRuleCriteria(((ComboBoxItem)selectedStatCbo.SelectedItem).Value, minAmountNud.Value); } return criterias; }