Esempio n. 1
0
        public override void FinishInit()
        {
            base.FinishInit();

            string paramType = XmlUtils.GetOptionalAttributeValue(m_configurationNode.ParentNode, "paramType");

            if (paramType == "LiteralString")
            {
                // Instead of the parameter being a layout name, it is literal text which will be
                // the whole contents of the slice, with standard properties.
                string text = XmlUtils.GetManditoryAttributeValue(m_callerNode, "label");
                if (m_stringTable != null)
                {
                    text = m_stringTable.LocalizeAttributeValue(text);
                }
                m_view = new LiteralLabelView(text, this);
            }
            else
            {
                m_layout = XmlUtils.GetOptionalAttributeValue(m_callerNode, "param")
                           ?? XmlUtils.GetManditoryAttributeValue(m_configurationNode, "layout");
                m_collapsedLayout = XmlUtils.GetOptionalAttributeValue(m_callerNode, "collapsedLayout")
                                    ?? XmlUtils.GetOptionalAttributeValue(m_configurationNode, "collapsedLayout");
                m_view          = new SummaryXmlView(m_obj.Hvo, m_layout, m_stringTable, this);
                m_view.Mediator = Mediator;
            }

            var panel = new Panel {
                Dock = DockStyle.Fill
            };

            Control = panel;

            m_view.Dock = DockStyle.Left;
            m_view.LayoutSizeChanged += m_view_LayoutSizeChanged;
            panel.Controls.Add(m_view);

            m_button = new ExpandCollapseButton {
                Dock = DockStyle.Left
            };
            m_button.Click += m_button_Click;
            panel.Controls.Add(m_button);
            panel.MouseDown += OnMouseDownInPanel;

            m_commandControl = new SummaryCommandControl(this)
            {
                Dock    = DockStyle.Fill,
                Visible = XmlUtils.GetOptionalBooleanAttributeValue(m_callerNode, "commandVisible", false)
            };
            panel.Controls.Add(m_commandControl);
        }
Esempio n. 2
0
		public override void FinishInit()
		{
			base.FinishInit();

			string paramType = XmlUtils.GetOptionalAttributeValue(m_configurationNode.ParentNode, "paramType");
			if (paramType == "LiteralString")
			{
				// Instead of the parameter being a layout name, it is literal text which will be
				// the whole contents of the slice, with standard properties.
				string text = XmlUtils.GetManditoryAttributeValue(m_callerNode, "label");
				if (m_stringTable != null)
					text = m_stringTable.LocalizeAttributeValue(text);
				m_view = new LiteralLabelView(text, this);
			}
			else
			{
				m_layout = XmlUtils.GetOptionalAttributeValue(m_callerNode, "param")
					?? XmlUtils.GetManditoryAttributeValue(m_configurationNode, "layout");
				m_collapsedLayout = XmlUtils.GetOptionalAttributeValue(m_callerNode, "collapsedLayout")
					?? XmlUtils.GetOptionalAttributeValue(m_configurationNode, "collapsedLayout");
				m_view = new SummaryXmlView(m_obj.Hvo, m_layout, m_stringTable, this);
				m_view.Mediator = Mediator;
			}

			var panel = new Panel { Dock = DockStyle.Fill };
			Control = panel;

			m_view.Dock = DockStyle.Left;
			m_view.LayoutSizeChanged += m_view_LayoutSizeChanged;
			panel.Controls.Add(m_view);

			m_button = new ExpandCollapseButton { Dock = DockStyle.Left };
			m_button.Click += m_button_Click;
			panel.Controls.Add(m_button);
			panel.MouseDown += OnMouseDownInPanel;

			m_commandControl = new SummaryCommandControl(this)
			{
				Dock = DockStyle.Fill,
				Visible = XmlUtils.GetOptionalBooleanAttributeValue(m_callerNode, "commandVisible", false)
			};
			panel.Controls.Add(m_commandControl);
		}