public AddControlStateImage(string screen, string user, string controlName = "")
{
InitializeComponent();
currentScreen = screen;
currentUser = user;
LoadObjects();
//Check if controlName was passed in, if so, goto edit mode
if (controlName != "")
{
//Let's validate the controlName and then call a Pre-Load of its properties
//DataSet dsScreenControl = OSAESql.RunSQL("SELECT COUNT(object_name) FROM osae_v_object where object_name = '" + controlName + "'");
bool found = OSAEObjectManager.ObjectExists(controlName);
if (found)
{
// We have a hit, this is an Update call, se call the preload
sMode = "Update";
sOriginalName = controlName;
txtControlName.Text = controlName;
LoadCurrentScreenObject(controlName);
}
}
Enable_Buttons();
}