Exemplo n.º 1
0
        public void SetCallback(CmpButtonCallback callback)
        {
            Image img = (Image)this.GetTemplateChild("ButtonAnimImage");

            m_bIgnoreAnimEnd = true;

            m_Callback = callback;

            m_nState = (int)CmpButtonState.CBS_DEFAULT;
            img.BeginAnimation(Image.OpacityProperty, null);
            img.Opacity = 0.0;
            UpdateButton();
        }
Exemplo n.º 2
0
        public CmpButton()
        {
            m_nState   = (int)CmpButtonState.CBS_DEFAULT;
            m_Callback = null;

            this.SizeChanged += OnSizeChanged;

            if (m_WrongImage == null)
            {
                m_WrongImage = ResourceController.GetResourceBitmap("/Image/CmpGM/cmp_wrong.png");
            }

            if (m_RightImage == null)
            {
                m_RightImage = ResourceController.GetResourceBitmap("/Image/CmpGM/cmp_right.png");
            }
        }