Dashboard will not Deploy

This dashboard is converted from 9.05.702A to 10.1.400.15.

From Deploy Dashboard\Test Application:

Error: CS1513 - line 1108 (1107) -} expected

** Compile Failed. **

The problem appears to be in the custom code behind a Tracker (If I remove the Tracker then the Dashboard will deploy). The code compiles in Script Editor. If I delete the custom code from the Tracker the Dashboard will deploy.

private static void txtIndustry_TextChanged(object sender, System.EventArgs args)
{
// ** Place Event Handling Code Here **
string industryCode = “0000”;
industryCode = txtIndustry.Value.ToString();
switch (industryCode)
{
case “AL”:
ShowHideGroups(grpAL);
break;
case “CH”:
break;
case “EL”:
ShowHideGroups(grpEL);
break;
case “FB”:
break;
case “ME”:
break;
case “NP”:
break;
case “PP”:
ShowHideGroups(grpPP);
break;
case “GL”:
ShowHideGroups(grpGL);
break;
case “CL”:
ShowHideGroups(grpCL);
break;
case “C1”:
break;
case “MI”:
ShowHideGroups(grpMI);
break;
default:
ShowHideGroups(null);
break;
}
if(String.Compare(industryCode,“0000”) <= 0)
{
SetControlPlacement(grpAL, 432,8);
SetControlPlacement(grpPP, 16,264);
SetControlPlacement(grpGL, 432,112);
SetControlPlacement(grpCL, 432,72);
SetControlPlacement(grpMI, 432,152);
SetControlPlacement(grpEL, 16,224);
}
}

private static Control[] GetGroups()
{
return new Control[]{grpAL, grpPP, grpGL, grpCL, grpCEFMN, grpEL, grpMI, grpEL};
}
private static void ShowHideGroups(Control ShowGroup)
{
Control[] GroupControls = GetGroups();
foreach(Control c in GroupControls)
{
if(c != null)
{
if(c == ShowGroup)
{
SetControlPlacement(c, 432,8);
} else
{
c.Visible = false;
}
}

    }
}
private static void SetControlPlacement(Control c, int x, int y)
{
    c.Location = new System.Drawing.Point(x,y);
    c.Visible = true;
}

}

Thanks,

Bill Short

Harold Beck & Sons, Inc.

Newtown, PA

Sorry, here is the upper portion of the code in Script Editor:

using System;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Windows.Forms;
using Ice.BO;
using Ice.UI;
using Ice.Lib;
using Ice.Adapters;
using Ice.Lib.Customization;
using Ice.Lib.ExtendedProps;
using Ice.Lib.Framework;
using Ice.Lib.Searches;
using Ice.UI.FormFunctions;

public static class Script
{
// ** Wizard Insert Location - Do Not Remove ‘Begin/End Wizard Added Module Level Variables’ Comments! **
// Begin Wizard Added Module Level Variables **

// End Wizard Added Module Level Variables **

// Add Custom Module Level Variables Here **

public static void InitializeCustomCode()
{
	// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Variable Initialization' lines **
	// Begin Wizard Added Variable Initialization

	// End Wizard Added Variable Initialization

	// Begin Wizard Added Custom Method Calls

	Script.txtIndustry.TextChanged += new System.EventHandler(Script.txtIndustry_TextChanged);
	// End Wizard Added Custom Method Calls
}

public static void DestroyCustomCode()
{
	// ** Wizard Insert Location - Do not delete 'Begin/End Wizard Added Object Disposal' lines **
	// Begin Wizard Added Object Disposal

	Script.txtIndustry.TextChanged -= new System.EventHandler(Script.txtIndustry_TextChanged);
	// End Wizard Added Object Disposal

	// Begin Custom Code Disposal

	// End Custom Code Disposal
}

You’re missing a bracket somewhere.
Edit: Never mind, it looks fine once it’s all together, sorry

public static class Script
{
// ** Wizard Insert Location - Do Not Remove ‘Begin/End Wizard Added Module Level Variables’ Comments! **
// Begin Wizard Added Module Level Variables **

// End Wizard Added Module Level Variables **

// Add Custom Module Level Variables Here **

public static void InitializeCustomCode()
{
// ** Wizard Insert Location - Do not delete ‘Begin/End Wizard Added Variable Initialization’ lines **
// Begin Wizard Added Variable Initialization

  // End Wizard Added Variable Initialization
  // Begin Wizard Added Custom Method Calls
  Script.txtIndustry.TextChanged += new System.EventHandler(Script.txtIndustry_TextChanged);
  // End Wizard Added Custom Method Calls

}

public static void DestroyCustomCode()
{
// ** Wizard Insert Location - Do not delete ‘Begin/End Wizard Added Object Disposal’ lines **
// Begin Wizard Added Object Disposal

  Script.txtIndustry.TextChanged -= new System.EventHandler(Script.txtIndustry_TextChanged);
  // End Wizard Added Object Disposal
  // Begin Custom Code Disposal
  // End Custom Code Disposal

}

private static void txtIndustry_TextChanged(object sender, System.EventArgs args)
{
// ** Place Event Handling Code Here **
string industryCode = “0000”;
industryCode = txtIndustry.Value.ToString();
switch (industryCode)
{
case “AL”:
ShowHideGroups(grpAL);
break;
case “CH”:
break;
case “EL”:
ShowHideGroups(grpEL);
break;
case “FB”:
break;
case “ME”:
break;
case “NP”:
break;
case “PP”:
ShowHideGroups(grpPP);
break;
case “GL”:
ShowHideGroups(grpGL);
break;
case “CL”:
ShowHideGroups(grpCL);
break;
case “C1”:
break;
case “MI”:
ShowHideGroups(grpMI);
break;
default:
ShowHideGroups(null);
break;
}
if(String.Compare(industryCode,“0000”) <= 0)
{
SetControlPlacement(grpAL, 432,8);
SetControlPlacement(grpPP, 16,264);
SetControlPlacement(grpGL, 432,112);
SetControlPlacement(grpCL, 432,72);
SetControlPlacement(grpMI, 432,152);
SetControlPlacement(grpEL, 16,224);
}
}

private static Control GetGroups()
{
return new Control{grpAL, grpPP, grpGL, grpCL, grpCEFMN, grpEL, grpMI, grpEL};
}

private static void ShowHideGroups(Control ShowGroup)
{
Control GroupControls = GetGroups();
foreach(Control c in GroupControls)
{
if(c != null)
{
if(c == ShowGroup)
{
SetControlPlacement(c, 432,8);
}
else
{
c.Visible = false;
}
}
}
}

private static void SetControlPlacement(Control c, int x, int y)
{
c.Location = new System.Drawing.Point(x,y);
c.Visible = true;
}
}

Did you try and use ( instead of { for the array creation?
private static Control GetGroups()
{
return new Control(grpAL, grpPP, grpGL, grpCL, grpCEFMN, grpEL, grpMI, grpEL);
}

nevermind I think it is the custom control though.