public static UIRadioBtn RadioBtn(Form form, string name, string imageKey, float width, float height)
        {
            UIBaseInfoLoader uIBaseInfoLoader = UIBaseFileManager.FindUIImageDictionary(name, imageKey);

            if (uIBaseInfoLoader == null)
            {
                return(null);
            }
            GameObject gameObject = new GameObject(name);
            UIRadioBtn uIRadioBtn = gameObject.AddComponent <UIRadioBtn>();

            uIRadioBtn.SetAnchor(SpriteRoot.ANCHOR_METHOD.UPPER_LEFT);
            uIRadioBtn.gameObject.layer = GUICamera.UILayer;
            uIRadioBtn.SetSpriteTile(uIBaseInfoLoader.Tile, uIBaseInfoLoader.UVs.width / (float)uIBaseInfoLoader.ButtonCount, uIBaseInfoLoader.UVs.height);
            uIRadioBtn.m_bPattern = uIBaseInfoLoader.Pattern;
            Material material = (Material)CResources.Load(uIBaseInfoLoader.Material);

            uIRadioBtn.Setup(width, height, material);
            float pixelToUVsWidth = UIBaseFileManager.GetPixelToUVsWidth(material, uIBaseInfoLoader.UVs.width / (float)uIBaseInfoLoader.ButtonCount);
            Rect  uvs             = new Rect(UIBaseFileManager.GetPixelToUVsWidth(material, uIBaseInfoLoader.UVs.x) - pixelToUVsWidth, 1f - UIBaseFileManager.GetPixelToUVsHeight(material, uIBaseInfoLoader.UVs.y + uIBaseInfoLoader.UVs.height), pixelToUVsWidth, UIBaseFileManager.GetPixelToUVsHeight(material, uIBaseInfoLoader.UVs.height));

            for (int i = 0; i <= (int)(uIBaseInfoLoader.ButtonCount - 1); i++)
            {
                uIRadioBtn.States[i].spriteFrames    = new CSpriteFrame[1];
                uIRadioBtn.States[i].spriteFrames[0] = new CSpriteFrame();
                uvs.x += pixelToUVsWidth;
                uIRadioBtn.States[i].spriteFrames[0].uvs = uvs;
                uIRadioBtn.animations[i].SetAnim(uIRadioBtn.States[i], i);
            }
            uIRadioBtn.autoResize           = false;
            uIRadioBtn.useParentForGrouping = false;
            uIRadioBtn.SetGroup(100 * form.WindowID);
            form.AddDictionaryControl(name, uIRadioBtn);
            form.InteractivePanel.MakeChild(uIRadioBtn.gameObject);
            uIRadioBtn.SetAnchor(SpriteRoot.ANCHOR_METHOD.UPPER_LEFT);
            uIRadioBtn.gameObject.layer = GUICamera.UILayer;
            UIButton uIButton = UICreateControl.Button(name + "OverButton", imageKey + "_over", uIRadioBtn.width, uIRadioBtn.height);

            if (null != uIButton)
            {
                uIButton.Start();
                BoxCollider component = uIButton.gameObject.GetComponent <BoxCollider>();
                if (null != component)
                {
                    UnityEngine.Object.Destroy(component);
                }
                form.InteractivePanel.MakeChild(uIButton.gameObject);
                uIRadioBtn.layers = new SpriteRoot[1];
                for (int j = 0; j < 1; j++)
                {
                    uIRadioBtn.layers[j]             = uIButton;
                    uIButton.transform.localPosition = uIRadioBtn.GetLocation();
                }
            }
            uIRadioBtn.Start();
            return(uIRadioBtn);
        }
    //////////////////////////////////////////////////

    public void SetEZGUI(UIRadioBtn EZGUI)
    {
        EZGUI_RadioButton = EZGUI;
        EZGUI_RadioButton.useParentForGrouping = false;
        EZGUI_RadioButton.SetAnchor(0);
        SetValid(false);
    }
        public static UIRadioBtn RadioBtn(string name, string imageKey, float width, float height)
        {
            UIBaseInfoLoader uIBaseInfoLoader = UIBaseFileManager.FindUIImageDictionary(name, imageKey);

            if (uIBaseInfoLoader == null)
            {
                return(null);
            }
            GameObject gameObject = new GameObject(name);
            UIRadioBtn uIRadioBtn = gameObject.AddComponent <UIRadioBtn>();

            uIRadioBtn.SetAnchor(SpriteRoot.ANCHOR_METHOD.UPPER_LEFT);
            uIRadioBtn.gameObject.layer = GUICamera.UILayer;
            uIRadioBtn.SetSpriteTile(uIBaseInfoLoader.Tile, uIBaseInfoLoader.UVs.width / (float)uIBaseInfoLoader.ButtonCount, uIBaseInfoLoader.UVs.height);
            uIRadioBtn.m_bPattern = uIBaseInfoLoader.Pattern;
            Material material = (Material)CResources.Load(uIBaseInfoLoader.Material);

            uIRadioBtn.Setup(width, height, material);
            float pixelToUVsWidth = UIBaseFileManager.GetPixelToUVsWidth(material, uIBaseInfoLoader.UVs.width / (float)uIBaseInfoLoader.ButtonCount);
            Rect  uvs             = new Rect(UIBaseFileManager.GetPixelToUVsWidth(material, uIBaseInfoLoader.UVs.x) - pixelToUVsWidth, 1f - UIBaseFileManager.GetPixelToUVsHeight(material, uIBaseInfoLoader.UVs.y + uIBaseInfoLoader.UVs.height), pixelToUVsWidth, UIBaseFileManager.GetPixelToUVsHeight(material, uIBaseInfoLoader.UVs.height));

            for (int i = 0; i <= (int)(uIBaseInfoLoader.ButtonCount - 1); i++)
            {
                uIRadioBtn.States[i].spriteFrames    = new CSpriteFrame[1];
                uIRadioBtn.States[i].spriteFrames[0] = new CSpriteFrame();
                uvs.x += pixelToUVsWidth;
                uIRadioBtn.States[i].spriteFrames[0].uvs = uvs;
                uIRadioBtn.animations[i].SetAnim(uIRadioBtn.States[i], i);
            }
            uIRadioBtn.autoResize           = false;
            uIRadioBtn.useParentForGrouping = false;
            uIRadioBtn.SetGroup(0);
            uIRadioBtn.SetAnchor(SpriteRoot.ANCHOR_METHOD.UPPER_LEFT);
            uIRadioBtn.gameObject.layer = GUICamera.UILayer;
            uIRadioBtn.Start();
            return(uIRadioBtn);
        }