Ejemplo n.º 1
0
        /*-------------------------------Button---------------------------------------------------*/


        #region 私有 箭头
        private static void JianTuoText(string text, int width,
                                        ref bool isShow, MyEnumColor color, Action showAction, Action action, bool isNeedSpace = true)
        {
            bool tmp = isShow;

            MyCreate.Heng(() =>
            {
                string jianTuo = tmp ? "▼ ".AddSize(10).ToString(): "▶ ".AddSize(10).ToString();
                jianTuo       += text;
                string des     = jianTuo.AddColor(color, false);
                MyCreate.Heng(() =>
                {
                    MyCreate.ButtonLabel(des, width, () =>
                    {
                        tmp = !tmp;
                    });
                    if (null != action)
                    {
                        action();
                        if (isNeedSpace)
                        {
                            MyCreate.AddSpace();
                        }
                    }
                });
            });
            if (tmp && null != showAction)
            {
                showAction();
            }
            isShow = tmp;
        }
Ejemplo n.º 2
0
        public static string TextString(string str1, string inputStr, int jianGe, Action action, bool isNeedRed = false)
        {
            string des = str1;
            string tmp = inputStr;

            if (isNeedRed && string.IsNullOrEmpty(tmp))
            {
                des = des.AddRed();
            }
            MyCreate.Heng(() =>
            {
                MyCreate.ButtonLabel("   " + des, jianGe, action);
                tmp = MyCreate.InputString(tmp);
            });
            return(tmp);
        }
Ejemplo n.º 3
0
        public static void Text3(string str1, string str2, string str3, int jianGe, ref bool isShow, Action showAction, MyEnumColor color)
        {
            bool tmp = isShow;

            MyCreate.Heng(() =>
            {
                string des = (tmp ? "▼ ".AddSize(10) + str1 : "▶ ".AddSize(10) + str1).AddColor(color, false);
                MyCreate.ButtonLabel(des, jianGe, () =>
                {
                    tmp = !tmp;
                });
                MyCreate.Text(str2);
                MyCreate.AddSpace();
                MyCreate.Text(str3);
            });
            if (tmp && null != showAction)
            {
                showAction();
            }
            isShow = tmp;
        }
Ejemplo n.º 4
0
        private static void JianTuoText2(string text, int width,
                                         ref bool isShow, Action showAction, Action action, bool isNeedSpace = true, MyEnumColor color = MyEnumColor.LightBlue)
        {
            bool   tmp = isShow;
            string des = isShow ? "▼".AddColorAndSize(color, 10, false) : "▶".AddColorAndSize(color, 10, false);

            MyCreate.Heng(() =>
            {
                MyCreate.ButtonLabel(text, width, () =>
                {
                    tmp = !tmp;
                });
                MyCreate.AddSpace();
                MyCreate.Heng(() =>
                {
                    MyCreate.ButtonLabel(des, 0, () =>
                    {
                        tmp = !tmp;
                    });
                    MyCreate.Shu(() =>
                    {
                        MyCreate.AddSpace(5);
                        if (null != action)
                        {
                            action();
                            if (isNeedSpace)
                            {
                                MyCreate.AddSpace();
                            }
                        }
                    });
                });
            });
            if (tmp && null != showAction)
            {
                showAction();
            }
            isShow = tmp;
        }
Ejemplo n.º 5
0
        public static void SelectTextText2(string str1, string str2, int jianGe, ref bool isShow, Action showAction, MyEnumColor color)
        {
            bool   tmp = isShow;
            string des = isShow ? "▼ ".AddColorAndSize(color, 10, false) + str2 : "▶ ".AddColorAndSize(color, 10, false) + str2;

            MyCreate.Heng(() =>
            {
                MyCreate.SelectText(str1, jianGe - 13);
                MyCreate.Heng(() =>
                {
                    MyCreate.ButtonLabel(des, 0, () =>
                    {
                        tmp = !tmp;
                    });
                });
            });
            if (tmp && null != showAction)
            {
                showAction();
            }
            isShow = tmp;
        }