Ejemplo n.º 1
0
        public void ShowLightbox(QWidget widget)
        {
            if (m_LightboxChild != null)
            {
                throw new InvalidOperationException("Lightbox is already visible");
            }

            var layout = (QBoxLayout)m_LightboxWidget.Layout();

            m_LightboxChild = widget;
            widget.SetParent(m_LightboxWidget);
            layout.AddWidget(widget);
            widget.Show();

            base.Widget(1).Enabled = false;

            m_LightboxWidget.Show();
            base.CurrentIndex = 0;
        }
Ejemplo n.º 2
0
        public void HideLightbox()
        {
            if (m_LightboxChild == null)
            {
                throw new InvalidOperationException("Lightbox is already hidden");
            }

            var layout = (QBoxLayout)m_LightboxWidget.Layout();

            layout.RemoveWidget(m_LightboxChild);

            m_LightboxChild.SetParent(null);
            m_LightboxChild.Dispose();
            m_LightboxChild = null;

            base.Widget(1).Enabled = true;

            m_LightboxWidget.Hide();
            base.CurrentIndex = 1;
        }