예제 #1
0
        private void btnSelectItems_Click(object sender, EventArgs e)
        {
            FrmSelectItems frm = new FrmSelectItems();

            if (frm.ShowDialog() == DialogResult.OK)
            {
                foreach (SampleListItem item in frm.SelectedIidList)
                {
                    CtrlSelectedItem ctrl = new CtrlSelectedItem();
                    ctrl.LoadItem(item.Id, item.Title, item.Price, item.PicPath, item.Location);
                    ctrl.OnRemoveItem = OnRemoveItemItem;
                    fpnlItemList.Controls.Add(ctrl);
                }
            }
        }
 private void btnSelectItems_Click(object sender, EventArgs e)
 {
     FrmSelectItems frm = new FrmSelectItems();
     if (frm.ShowDialog() == DialogResult.OK)
     {
         foreach (SampleListItem item in frm.SelectedIidList)
         {
             CtrlSelectedItem ctrl = new CtrlSelectedItem();
             ctrl.LoadItem(item.Id, item.Title, item.Price, item.PicPath, item.Location);
             ctrl.OnRemoveItem = OnRemoveItemItem;
             fpnlItemList.Controls.Add(ctrl);
         }
     }
 }