0
나는 내가 InitializeComponent에서 호출하고있는 오버라이드 메소드를 가지고있다.InitializeComponent가 폼 디자이너 코드를 변경하는 것을 멈추는 방법?
는 는public class ComponentResourceManager2 : System.ComponentModel.ComponentResourceManager
내 문제는 방법은 시스템 하나
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager();
예를 사용하도록 내가 DesignerForm에서 메소드의 InitializeComponent 변화 뭔가를 변경할 때마다입니다 :이
private void InitializeComponent()
{
ComponentResourceManager2 resources = new ComponentResourceManager2(typeof(Form1));
this.directDrawViewer1 = new MyOwn.Imaging.Components.DirectDrawViewer();
this.speedButton1 = new MyOwn.Components.SpeedButton();
...
필요
하지만 내가 뭔가를 바꿀 때마다 다시 다음과 같이 진행됩니다.
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
this.directDrawViewer1 = new MyOwn.Imaging.Components.DirectDrawViewer();
this.speedButton1 = new MyOwn.Components.SpeedButton();
무언가가 변경 될 때마다 초기화하지 않고 InitializeComponent에서 내 메서드를 사용하도록 만들 수 있습니까?
디자이너는 initializecomponent 본문을 쓸 것으로 예상됩니다. 다른 곳에서 개체를 만들려고 할 수 있습니다. initializecomponent 호출 직후 형태의 ctor. 작동합니까? –
사실, 내 재정의 메서드는 CultureInfo 리소스를 선택하는 방법을 변경합니다 .ApplyResourcers() 있도록 내 레이블, 단추 정보를 추출하려면 오른쪽 resx 파일을 ... 그래서 InitializeComponent 내부에이 필요합니다. 또는 InitializeComponent 외부에서 다른 방법을 사용할 수 있습니까? – Rafael