Пример #1
0
        public void Show(object[] inData, PopupClosed callback, UnityAction actionCallBack = null)
        {
            this.callback = callback;

            if (isShowing)
            {
                return;
            }

            isShowing = true;

            // Show the popup object
            gameObject.SetActive(true);

            switch (animType)
            {
            case AnimType.Fade:
                DoFadeAnim();
                break;

            case AnimType.Zoom:
                DoZoomAnim();
                break;
            }

            OnShowing(inData);
            OnShowing(actionCallBack);
        }
Пример #2
0
        public override void OnApplyTemplate()
        {
            base.OnApplyTemplate();
            try
            {
                // Code to get the Template parts as instance member
                mainPopup        = GetTemplateChild("PART_Popup") as Popup;
                canvas           = GetTemplateChild("PART_Canvas") as Canvas;
                path             = GetTemplateChild("PART_Path") as Path;
                contentPresenter = GetTemplateChild("PART_ContentPresenter") as ContentPresenter;

                mainPopup.Closed += (sender, e) => { PopupClosed?.Invoke(sender, e); };
                mainPopup.IsOpen  = IsOpen;
                canvas.Width      = PanelWidth;
                canvas.Height     = PanelHeight;
                RefreshPath();
                mainPopup.PlacementTarget = PlacementTarget;
                mainPopup.Placement       = Placement;
                path.Fill = Fill;
            }
            catch (Exception ex)
            {
                logger.Error(ex);
            }
        }
Пример #3
0
        protected virtual void OnDestroy()
        {
            PopupClosed?.Invoke(this);
            PopupClosed = null;

            CleanButtons();
        }
Пример #4
0
 public void OnPopupClosed(PopUpWindowArgs e)
 {
     PopupClosed?.Invoke(this, e);
 }
Пример #5
0
 private void OnPopupClosed(object sender, EventArgs e)
 {
     IsOpen           = false;
     IsHitTestVisible = true;
     PopupClosed?.Invoke(this, e);
 }
Пример #6
0
 protected virtual void OnPopupClosed(PopupClosedEventArgs e)
 {
     PopupClosed?.Invoke(this, e);
 }
Пример #7
0
 public void OnPopupClosed(CustomYesNoBoxClosedArgs e)
 {
     PopupClosed?.Invoke(this, e);
 }
Пример #8
0
 public void OnPopupClosed(EntryPopupClosedArgs e)
 {
     PopupClosed?.Invoke(this, e);
 }
Пример #9
0
        //-------------------------------------------------------------------------

        protected virtual void OnPopupClosed()
        {
            PopupClosed?.Invoke(this, EventArgs.Empty);
        }