/// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="ATestYAMLNode"></param>
        /// <param name="AEnumStyle"></param>
        public CollapsiblePanelHosterTest(XmlNode ATestYAMLNode, TVisualStylesEnum AEnumStyle) : this()
        {
            FTestYAMLNode = ATestYAMLNode;
            FEnumStyle = AEnumStyle;


            FCollPanelHoster = new TPnlCollapsibleHoster(FTestYAMLNode, FEnumStyle);
            FCollPanelHoster.Dock = DockStyle.Fill;
            pnlCollapsiblePanelHostTest.Controls.Add(FCollPanelHoster);

            FCollPanelHoster.RealiseCollapsiblePanelsNow();

            HookupItemActivationEvent();
        }
Пример #2
0
        public void TestSetter_CollapsiblePanelHosterInstance()
        {
            FPnl = new TPnlCollapsible(THostedControlKind.hckCollapsiblePanelHoster, TTestTaskList.GetTestXmlNode());
            FPnl.RealiseCollapsiblePanelHoster();

            TPnlCollapsibleHoster CpH1 = FPnl.CollapsiblePanelHosterInstance;

            TPnlCollapsibleHoster CpH2 = new TPnlCollapsibleHoster(TTestTaskList.GetTestXmlNode2(), TVisualStylesEnum.vsTaskPanel);

            FPnl.CollapsiblePanelHosterInstance = CpH2;

            Assert.AreNotEqual(CpH1, FPnl.CollapsiblePanelHosterInstance);

            assertIsStable2(FPnl);
        }
Пример #3
0
 private void HookupItemActivationEvent_CollPanelHoster(TPnlCollapsibleHoster ACollPanelHoster)
 {
     ACollPanelHoster.ItemActivation += new TTaskList.TaskLinkClicked(ItemActivationHandler);
 }
Пример #4
0
        /// <summary></summary>
        private TPnlCollapsibleHoster InstantiateCollapsiblePanelHoster()
        {
            TVisualStylesEnum PnlCollapsibleVisualStyleEnum;

            if (FTaskListNode == null)
            {
                if ((this.Site == null)
                    || (!this.Site.DesignMode))
                {
                    throw new ENoTaskListNodeSpecifiedException();
                }
                else
                {
                    // Show some hard-coded Tasks in WinForm Designer
                    FTaskListNode = GetHardCodedXmlNodes_ForDesignerOnly();
                }
            }

            if (FVisualStyleEnum == TVisualStylesEnum.vsHorizontalCollapse)
            {
                PnlCollapsibleVisualStyleEnum = TVisualStylesEnum.vsAccordionPanel;
            }
            else
            {
                PnlCollapsibleVisualStyleEnum = FVisualStyleEnum;
            }

            FPnlCollapsibleHoster = new Ict.Common.Controls.TPnlCollapsibleHoster(FTaskListNode, PnlCollapsibleVisualStyleEnum);

            UpdateCollapsiblePanelHoster();

            FPnlCollapsibleHoster.ItemActivation += delegate(TTaskList ATaskList, XmlNode ATaskListNode, LinkLabel AItemClicked, object AOtherData)
            {
                OnItemActivation(ATaskList, ATaskListNode, AItemClicked, AOtherData);
            };

            return FPnlCollapsibleHoster;
        }