我有一个名为EmployeeForm
的表单,在该表单中,我包含了一些用户控件,当我编辑EmployeeForm
时,表单内的每个用户控件都会丢失。
此图片显示了TFS(左)和本地(右)文件之间的差异,在修改组合框的名称后。
这是this.ucEmployeeKeyOne
的示例:
public partial class Employee_EmployeeKeyOneRelationUC
: Employee_EmployeeKeyOneRelation_GenericUC
{ [other Code Here] }
public class Employee_EmployeeKeyOneRelation_GenericUC
: RelationUC<MyObject>
{ }
关于RelationUC的定义是:
public partial class RelationUC<T>
: DataUserControlBase
{ [other Code Here] }
public partial class DataUserControlBase
: UserControlBase
{ [other Code Here] }
public partial class UserControlBase
: System.Windows.Forms.UserControl, MyInterfaceHere
{ [other Code Here] }
我失去的所有UserControl
都继承自RelationUC<T>
。泛型类型RelationUC
会导致问题吗?
RelationUC<T>
在设计器中显示正确。 - poudigneDataUserControlBase
怎么样?还有Employee_EmployeeKeyOneRelation_GenericUC
? - Paul Sasik