本文介绍了变更控制类型工具的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

美好的一天!

您能指导我从哪里开始对此问题进行搜索.我们使用一些自定义DropDown控件(例如,UltraDropDown)拥有大量WinForms代码.通常是在InitializeComponent方法中.我需要更改该控件的类型以让我们说DevDropDown.这两种类型在其基础上都是DropDown控件,但是具有绝对不同的属性,因此仅删除旧的UltraDropDown并将DevDropDown重命名为UltraDropDown将无济于事,因为我不想将所有无用的属性包装到我的新控件中.我想要的是一些代码生成工具,该工具将搜索旧的UltraDropDown并在InitializeComponent方法中清除其代码(位置和大小除外),然后粘贴新的DevDropDown代码.

Good day!

Could you guide me where should I start searches on such issue. We have a huge amount of WinForms code using some Custom DropDown control(let''s say UltraDropDown). Mostly its in InitializeComponent method. I need to change type of that control to let''s say DevDropDown. That two types are both DropDown controls in its base, but have absolutely different properties, so just deleting old UltraDropDown and renaming DevDropDown to UltraDropDown won''t help, cause i don''t want to wrap all that useless properties to my new control. What I want is some codegeneration tool that would search old UltraDropDown and clear its code in InitializeComponent method except Location and Sizes, and paste new DevDropDown code. May be there are some patterns for creating such tool?

推荐答案

public class myDropDown : DevDropDown
{
   public string PropertyOfUltraDropDownWhichIsUsed {get;set;}
} 


这篇关于变更控制类型工具的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-08 12:27