Ejemplo n.º 1
0
        /// <summary>
        /// Set the Editable property on the launcher, which is created before installation, and
        /// then finish installing this slice.
        /// </summary>
        /// <param name="parent"></param>
        public override void Install(DataTree parent)
        {
            ReferenceLauncher launcher = Control as ReferenceLauncher;

            if (launcher != null)
            {
                launcher.Editable = XmlUtils.GetOptionalBooleanAttributeValue(m_configurationNode, "editable", true);
            }
            base.Install(parent);
        }
Ejemplo n.º 2
0
        protected override void OnSizeChanged(EventArgs e)
        {
            base.OnSizeChanged(e);
            if (this.Width == m_dxLastWidth)
            {
                return;
            }
            m_dxLastWidth = Width;             // BEFORE doing anything, actions below may trigger recursive call.
            ReferenceLauncher rl = (ReferenceLauncher)this.Control;
            RootSite          rs = (RootSite)rl.MainControl;

            rs.PerformLayout();
            if (rs.RootBox != null)
            {
                // Allow it to be the height it wants + fluff to get rid of scroll bar.
                // Adjust our own height to suit.
                // Note that this may produce a recursive call!
                this.Height = rs.RootBox.Height + 8;
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// This code exactly matches code in ReferenceVectorSlice; could we refactor somehow?
        /// </summary>
        /// <param name="e"></param>
        protected override void OnSizeChanged(EventArgs e)
        {
            base.OnSizeChanged(e);
            if (this.Width == m_dxLastWidth)
            {
                return;
            }
            m_dxLastWidth = Width;             // BEFORE doing anything, actions below may trigger recursive call.
            ReferenceLauncher rl   = (ReferenceLauncher)this.Control;
            SimpleRootSite    view = (SimpleRootSite)rl.MainControl;

            view.PerformLayout();
            int h1   = view.RootBox.Height;
            int hNew = Math.Max(h1, ContainingDataTree.GetMinFieldHeight()) + 3;

            if (hNew != this.Height)
            {
                this.Height = hNew;
            }
        }