/// <summary> /// Constructor. /// </summary> public TLstFolderNavigation() { ResourceDirectory = TAppSettingsManager.GetValue("Resource.Dir"); TVisualStyles VisualStyle = new TVisualStyles(TVisualStylesEnum.vsHorizontalCollapse); InitializeComponent(); #region CATALOGI18N // this code has been inserted by GenerateI18N, all changes in this region will be overwritten by GenerateI18N #endregion sptNavigation.BackColor = VisualStyle.TitleGradientEnd; pnlMoreButtons.GradientColorTop = VisualStyle.TitleGradientStart; pnlMoreButtons.GradientColorBottom = VisualStyle.TitleGradientEnd; pnlMoreButtons.Border = new System.Drawing.Pen(new TOpenPetraMenuColours().MenuBackgroundColour); #if disabled if (System.IO.File.Exists(ResourceDirectory + System.IO.Path.DirectorySeparatorChar + "2leftarrow.png")) { btnCollapseNavigation.Image = new System.Drawing.Bitmap(ResourceDirectory + System.IO.Path.DirectorySeparatorChar + "2leftarrow.png"); } else { MessageBox.Show("cannot find file " + ResourceDirectory + System.IO.Path.DirectorySeparatorChar + "2leftarrow.png"); } #endif }
/// <summary> /// Changes the Visual Style. /// </summary> private void ChangeVisualStyle() { TVisualStyles VisualStyle = new TVisualStyles(FVisualStyle); if (VisualStyle.CollapsiblePanelDistance != -1) { FDistanceBetweenCollapsiblePanels = VisualStyle.CollapsiblePanelDistance; } this.Padding = new Padding(VisualStyle.CollapsiblePanelPadding); }
/// <summary> /// Constructor. /// </summary> /// <param name="ATopPanel">The Panel to which the Breadcrumb Trail should be added to.</param> public TBreadcrumbTrail(Panel ATopPanel) { TVisualStyles VisualStyle = new TVisualStyles(TVisualStylesEnum.vsHorizontalCollapse); FBreadcrumbTrailPanel = new Panel(); FBreadcrumbTrailPanel.Name = "BreadcrumbTrail"; FBreadcrumbTrailPanel.BackColor = Color.Transparent; FBreadcrumbTrailPanel.Dock = DockStyle.Fill; ATopPanel.Controls.Add(FBreadcrumbTrailPanel); Panel BreadcrumbTrailModulePanel = new Panel(); BreadcrumbTrailModulePanel.Name = "BreadcrumbTrailMainPanel"; BreadcrumbTrailModulePanel.BackColor = Color.Transparent; BreadcrumbTrailModulePanel.Dock = DockStyle.Left; BreadcrumbTrailModulePanel.AutoSize = true; BreadcrumbTrailModulePanel.AutoSizeMode = AutoSizeMode.GrowAndShrink; FBreadcrumbTrailPanel.Controls.Add(BreadcrumbTrailModulePanel); FBreadcrumbTrailModuleLabel = new Label(); FBreadcrumbTrailModuleLabel.Name = "BreadcrumbTrailModuleLabel"; FBreadcrumbTrailModuleLabel.Font = VisualStyle.TitleFont; FBreadcrumbTrailModuleLabel.ForeColor = VisualStyle.TitleFontColour; FBreadcrumbTrailModuleLabel.BackColor = Color.Transparent; FBreadcrumbTrailModuleLabel.AutoSize = true; FBreadcrumbTrailModuleLabel.Dock = DockStyle.Left; BreadcrumbTrailModulePanel.Controls.Add(FBreadcrumbTrailModuleLabel); FBreadcrumbTrailDetailLabel = new Label(); FBreadcrumbTrailDetailLabel.Name = "BreadcrumbTrailDetailLabel"; FBreadcrumbTrailDetailLabel.Font = new System.Drawing.Font(VisualStyle.TitleFont.FontFamily, VisualStyle.TitleFont.SizeInPoints - 2, FontStyle.Bold); FBreadcrumbTrailDetailLabel.ForeColor = VisualStyle.TitleFontColour; FBreadcrumbTrailDetailLabel.BackColor = Color.Transparent; FBreadcrumbTrailDetailLabel.AutoEllipsis = true; FBreadcrumbTrailDetailLabel.Dock = DockStyle.Fill; FBreadcrumbTrailDetailLabel.Padding = new Padding(0, 2, 0, 0); FBreadcrumbTrailPanel.Controls.Add(FBreadcrumbTrailDetailLabel); FBreadcrumbTrailDetailLabel.BringToFront(); FBreadcrumbTrailModuleLabel.Text = "Ledger 43"; FBreadcrumbTrailDetailLabel.Text = "-> Gift"; }
private void InitialiseTopPanel() { TVisualStyles VisualStyle = new TVisualStyles(TVisualStylesEnum.vsHorizontalCollapse); TPnlGradient TopPanel = new TPnlGradient(); TopPanel.Name = "Top"; TopPanel.Dock = DockStyle.Fill; TopPanel.Padding = new Padding(0, 1, 0, 0); TopPanel.GradientColorTop = VisualStyle.TitleGradientStart; TopPanel.GradientColorBottom = VisualStyle.TitleGradientEnd; TopPanel.DontDrawBottomLine = false; pnlTop.Controls.Add(TopPanel); // Add Breadcrumb Trail Panel to TopPanel FBreadcrumbTrail = new TBreadcrumbTrail(TopPanel); // in the future: add SearchBox (still to be created) to TopPanel, too... }