I changed the localizable property on a user control and the designer file was set to an unusable state. Now the variables components and statusMessageControl are never initialized. Is there a different solution I should be doing instead of moving the declaration and initialization of these variables to the main code file?
The code went from:
partial class SchedulingWidget
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.statusMessageControl = new Client.UI.Forms.ApplicationMessagePanel();
this.SuspendLayout();
//
// statusMessageControl
//
this.statusMessageControl.BackColor = System.Drawing.SystemColors.Info;
this.statusMessageControl.Dock = System.Windows.Forms.DockStyle.Top;
this.statusMessageControl.DrawGradient = false;
this.statusMessageControl.Font = new System.Drawing.Font("Tahoma", 8.25F);
this.statusMessageControl.Location = new System.Drawing.Point(1, 1);
this.statusMessageControl.Name = "statusMessageControl";
this.statusMessageControl.Size = new System.Drawing.Size(410, 24);
this.statusMessageControl.StatusCountText = "Error(s): 100 - Warning(s): 100";
this.statusMessageControl.StatusIcon = Common.StatusInformationType.Information;
this.statusMessageControl.TabIndex = 46;
//
// SchedulingWidget
//
this.Controls.Add(this.statusMessageControl);
this.Name = "SchedulingWidget";
this.Size = new System.Drawing.Size(412, 408);
this.ResumeLayout(false);
}
#endregion
private Client.UI.Forms.ApplicationMessagePanel statusMessageControl;
}
to:
partial class SchedulingWidget
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SchedulingWidget));
this.statusMessageControl = new Client.UI.Forms.ApplicationMessagePanel();
this.SuspendLayout();
//
// statusMessageControl
//
this.statusMessageControl.BackColor = System.Drawing.SystemColors.Info;
this.statusMessageControl.CustomStatusIcon = null;
resources.ApplyResources(this.statusMessageControl, "statusMessageControl");
this.statusMessageControl.DrawGradient = false;
this.statusMessageControl.Name = "statusMessageControl";
this.statusMessageControl.StatusCountText = "Error(s): 100 - Warning(s): 100";
//
// SchedulingWidget
//
this.Controls.Add(this.statusMessageControl);
this.Name = "SchedulingWidget";
resources.ApplyResources(this, "$this");
this.ResumeLayout(false);
}
#endregion
private Client.UI.Forms.ApplicationMessagePanel statusMessageControl;
}