Example #1
0
        /// <summary>
        /// Do the bare minimum for use in tests
        /// </summary>
        /// <param name="configuration"></param>
        /// <param name="configurationPath"></param>
        protected override void LoadUIFromXmlDocument(XmlDocument configuration, string configurationPath)
        {
            m_windowConfigurationNode = configuration.SelectSingleNode("window");
            ReplaceControlAssemblies();

            PropertyTable.SetProperty("WindowConfiguration", m_windowConfigurationNode);
            PropertyTable.SetPropertyPersistence("WindowConfiguration", false);

            LoadDefaultProperties(m_windowConfigurationNode.SelectSingleNode("defaultProperties"));

            m_mediator.PropertyTable.SetProperty("window", this);
            m_mediator.PropertyTable.SetPropertyPersistence("window", false);

            CommandSet commandset = new CommandSet(m_mediator);

            commandset.Init(m_windowConfigurationNode);
            m_mediator.Initialize(commandset);

            LoadStringTableIfPresent(configurationPath);

            RestoreWindowSettings(false);
            m_mediator.AddColleague(this);

            m_menusChoiceGroupCollection    = new ChoiceGroupCollection(m_mediator, null, m_windowConfigurationNode);
            m_sidebarChoiceGroupCollection  = new ChoiceGroupCollection(m_mediator, null, m_windowConfigurationNode);
            m_toolbarsChoiceGroupCollection = new ChoiceGroupCollection(m_mediator, null, m_windowConfigurationNode);

            var handle = this.Handle;             // create's a window handle for this form to allow processing broadcasted items.
        }
Example #2
0
        // Note: The Init method is handled by the superclass.

        /// <summary>
        /// Overrides method to create main elements of the sidebar.
        /// </summary>
        /// <param name="groupCollection">Collection of groups for this sidebar.</param>
        public override void CreateUIForChoiceGroupCollection(ChoiceGroupCollection groupCollection)
        {
            foreach (ChoiceGroup group in groupCollection)
            {
                string label = group.Label;
                label = label.Replace("_", "");
                SideBarPanelItem panelItem = new SideBarPanelItem(group.Id, label);
                if (group.HasSubGroups())
                {
                    MakeTree(group, label, ref panelItem);
                }

                panelItem.Tag         = group;
                group.ReferenceWidget = panelItem;
                SideBar sidebar = MySideBar;
                sidebar.Panels.Add(panelItem);
                sidebar.Images = m_smallImages.ImageList;
                panelItem.BackgroundStyle.BackColor1.Alpha = ((System.Byte)(255));
                panelItem.BackgroundStyle.BackColor1.Color = System.Drawing.SystemColors.ControlLightLight;
                //
                // sideBarPanelItem1.BackgroundStyle.BackColor2
                //
                panelItem.BackgroundStyle.BackColor2.Alpha     = ((System.Byte)(255));
                panelItem.BackgroundStyle.BackColor2.Color     = System.Drawing.SystemColors.ControlDark;
                panelItem.BackgroundStyle.BackgroundImageAlpha = ((System.Byte)(255));
                panelItem.BackgroundStyle.Border       = DevComponents.DotNetBar.eBorderType.None;
                panelItem.BackgroundStyle.TextTrimming = System.Drawing.StringTrimming.EllipsisCharacter;
                panelItem.ItemImageSize = DevComponents.DotNetBar.eBarImageSize.Default;
            }

            MySideBar.ExpandedChange += new EventHandler(Sidebar_ExpandedChange);
        }
Example #3
0
        // Note: The Init method is handled by the superclass.

        /// <summary>
        /// Overrides method to create main elements of the sidebar.
        /// </summary>
        /// <param name="groupCollection">Collection of groups for this sidebar.</param>
        public override void CreateUIForChoiceGroupCollection(ChoiceGroupCollection groupCollection)
        {
        }