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; }
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; }