ACR_BuilderPlugin.ToolsetHelper.GetControl C# (CSharp) Method

GetControl() public static method

public static GetControl ( Type type, string name ) : Control
type System.Type
name string
return System.Windows.Forms.Control
        public static Control GetControl(Type type, string name)
        {
            foreach (Control control in NWN2Toolset.NWN2ToolsetMainForm.App.Controls)
            {
                if (control.GetType() == type && control.Name == name)
                    return control;
            }
            throw new Exception(String.Format("Could not find Control of type {0} and name {1}.", type.ToString(), name));
        }