TA的每日心情 | 奋斗 2016-2-26 13:48 |
---|
签到天数: 508 天 [LV.9]以坛为家II
|
发表于 2021-3-18 14:26:21
|
显示全部楼层
- private void dropTarget1_DragDrop(object sender, DragEventArgs e)
- {
- Grid g = e.Data.GetData(typeof(Grid)) as Grid;
- if (g == null) return;
- INameInfoFactory nameFact;
- nameFact = CoreSystem.GetService<INameInfoFactory>(g);
- NameInfo nameInfo = nameFact.GetNameInfo(g);
- gridPresentationBox.Text = nameInfo.Name;
- IImageInfoFactory imageFact;
- imageFact = CoreSystem.GetService<IImageInfoFactory>(g);
- ImageInfo imageInfo = imageFact.GetImageInfo(g);
- gridPresentationBox.Image = imageInfo.TypeImage;
- // use Tag later to get object from PresentationBox
- gridPresentationBox.Tag = g;
- }
- private void btnApply_Click(object sender, EventArgs e)
- {
- args.Grid = gridPresentationBox.Tag as Grid;
- // rest of implementation ...
- }
复制代码
|
|