public static async void ShowPopMessageDialog(string identify, string text, PopMessageType msgType, Action<bool> callBack)
        {
            PopMessageDialog dialog = new PopMessageDialog
            {
                Text = text,

            };
            if (msgType == PopMessageType.Confirm)
            {
                dialog.MessageBoxButton = MessageBoxButton.OKCancel;
            }
            else if (msgType == PopMessageType.ConfirmYesNoCancel)
            {
                dialog.MessageBoxButton = MessageBoxButton.YesNoCancel;
            }
            else if (msgType == PopMessageType.ConfirmYesNo)
            {
                dialog.MessageBoxButton = MessageBoxButton.YesNo;
            }
            else
            {
                dialog.MessageBoxButton = MessageBoxButton.OK;
            }
            var flag = await DialogHost.Show(dialog, identify);
            if (callBack != null)
            {
                callBack((MessageBoxResult)flag == MessageBoxResult.OK);
            }
        }
예제 #2
0
        public void AddEmitTip(string text, PopMessageType type)
        {
            EmitTip item = m_EmitTipPool.Alloc(NewEmitTip);

            item.Init(type);

            m_EmitTipItems.Add(item);

            this.FUIComponent.GObject.asCom.AddChild(item.m_comp);

            GRichTextField textContent = item.m_comp.GetChild("n7").asRichTextField;

            textContent.text = text;

            SetTextContent(item.m_comp);

            Transition anim = item.GetAnim();

            if (anim != null)
            {
                anim.Play();
            }
        }
예제 #3
0
            public void Init(PopMessageType type)
            {
                this.m_comp.touchable = false;

                this.m_type = type;
            }