using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using Tanshu.Accounts.Entities; using Tanshu.Accounts.Contracts; using Tanshu.Accounts.SqlDAO; using Tanshu.Accounts.Helpers; namespace Tanshu.Accounts.PointOfSale { public partial class ModifierForm : Form { private IList selection; private IList source; private IList list; public ModifierForm(IList source, IList selection) { InitializeComponent(); this.selection = selection; this.source = source; list = new List(); } private void button_Click(object sender, EventArgs e) { CheckBox button = sender as CheckBox; if (button == null) return; if (button.CheckState == CheckState.Checked) selection.Add((Modifier)button.Tag); else selection.Remove((Modifier)button.Tag); } public IList Selection { get { return selection; } } private void btnClose_Click(object sender, EventArgs e) { this.Close(); } private void ModifierForm_Load(object sender, EventArgs e) { ControlFactory.GenerateModifiers(ref flpModifier, ref list, selection, new Point(75, 75), 30, source, new ButtonClickDelegate(button_Click)); } } }