示例#1
0
 /// <summary>
 /// Handles the Expanded event of the leftNavXPPanel control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="T:System.EventArgs"/> instance containing the event data.</param>
 private void LeftNavXPPanel_Expanded(object sender, EventArgs e)
 {
     xpPanelGroup3.Enabled = true;
     TerraScan.XPPanel.TerraScanXPPanel selectedXPPanel = (TerraScanXPPanel)sender;
     selectedXPPanel.Focus();
     //// Collapse the  other panles
     foreach (TerraScanXPPanel tempXPPanel in this.xpPanelGroup3.Controls)
     {
         if (selectedXPPanel.Name != tempXPPanel.Name)
         {
             tempXPPanel.PanelState = XPPanelState.Collapsed;
         }
     }
 }
示例#2
0
        /// <summary>
        /// Handles the Expanding event of the leftNavXPPanel control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="T:System.EventArgs"/> instance containing the event data.</param>
        private void LeftNavXPPanel_Expanding(object sender, EventArgs e)
        {
            xpPanelGroup3.Enabled = false;
            this.SetPanelState();
            TerraScan.XPPanel.TerraScanXPPanel selectedXPPanel = (TerraScanXPPanel)sender;

            if (selectedXPPanel.IsExpanding)
            {
                selectedXPPanel.TextColors = new ColorPair(Color.FromArgb(168, 176, 19));
            }
            else
            {
                selectedXPPanel.TextColors = new ColorPair(Color.White);
            }
        }
示例#3
0
 /// <summary>
 /// Handles the Expanded event of the leftNavXPPanel control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="T:System.EventArgs"/> instance containing the event data.</param>
 private void LeftNavXPPanel_Collapsed(object sender, EventArgs e)
 {
     TerraScan.XPPanel.TerraScanXPPanel selectedXPPanel = (TerraScanXPPanel)sender;
     selectedXPPanel.Focus();
 }
示例#4
0
        /// <summary>
        /// Creates the panel.
        /// </summary>
        /// <param name="nodeName">Name of the node.</param>
        /// <param name="panelCount">The panel count.</param>
        private void CreatePanel(string nodeName, int panelCount) //// Creating Panel Control and Adding LinkLabels to Panel
        {
            this.leftNavXPPanel = new TerraScan.XPPanel.TerraScanXPPanel();

            //// Setting properties of LeftNavXPPanel Control
            this.leftNavXPPanel.AnimationRate     = 0;
            this.leftNavXPPanel.Anchor            = (System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right);
            this.leftNavXPPanel.Dock              = DockStyle.Top;
            this.leftNavXPPanel.AutoScrollMargin  = new System.Drawing.Size(0, 10);
            this.leftNavXPPanel.AutoSizeMode      = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
            this.leftNavXPPanel.BackColor         = System.Drawing.Color.Transparent;
            this.leftNavXPPanel.Caption           = nodeName;
            this.leftNavXPPanel.CaptionCornerType = (TerraScan.XPPanel.CornerType)(TerraScan.XPPanel.CornerType.TopLeft | TerraScan.XPPanel.CornerType.TopRight);

            ////this.leftNavXPPanel.CaptionGradient.End = System.Drawing.Color.FromArgb(((int)(((byte)(28)))), ((int)(((byte)(80)))), ((int)(((byte)(129)))));

            this.leftNavXPPanel.CaptionGradient.End = System.Drawing.Color.FromArgb((int)(byte)28, (int)(byte)80, (int)(byte)129);

            ////this.leftNavXPPanel.CaptionGradient.Start = System.Drawing.Color.FromArgb(((int)(((byte)(28)))), ((int)(((byte)(80)))), ((int)(((byte)(129)))));

            this.leftNavXPPanel.CaptionGradient.Start = System.Drawing.Color.FromArgb((int)(byte)28, (int)(byte)80, (int)(byte)129);
            this.leftNavXPPanel.CaptionGradientMode   = System.Drawing.Drawing2D.LinearGradientMode.Horizontal;

            ////this.leftNavXPPanel.CaptionUnderline = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));

            this.leftNavXPPanel.CaptionUnderline          = System.Drawing.Color.FromArgb((int)(byte)255, (int)(byte)255, (int)(byte)255);
            this.leftNavXPPanel.CollapsedGlyphs.Highlight = 3;
            this.leftNavXPPanel.CollapsedGlyphs.ImageSet  = this.purpleGlyphsImageSet;
            this.leftNavXPPanel.CollapsedGlyphs.Normal    = 2;
            this.leftNavXPPanel.CollapsedGlyphs.Pressed   = 3;
            this.leftNavXPPanel.ExpandedGlyphs.Highlight  = 1;
            this.leftNavXPPanel.ExpandedGlyphs.ImageSet   = this.purpleGlyphsImageSet;
            this.leftNavXPPanel.ExpandedGlyphs.Normal     = 0;
            this.leftNavXPPanel.ExpandedGlyphs.Pressed    = 1;
            this.leftNavXPPanel.Font                 = new System.Drawing.Font("Arial", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, (byte)0);
            this.leftNavXPPanel.ForeColor            = System.Drawing.SystemColors.WindowText;
            this.leftNavXPPanel.HorzAlignment        = System.Drawing.StringAlignment.Near;
            this.leftNavXPPanel.ImageItems.Highlight = 3;
            this.leftNavXPPanel.ImageItems.ImageSet  = null;
            this.leftNavXPPanel.ImageItems.Normal    = 4;
            this.leftNavXPPanel.ImageItems.Pressed   = 3;
            this.leftNavXPPanel.Name                 = nodeName;
            this.leftNavXPPanel.PanelGradient.End    = System.Drawing.Color.White;
            this.leftNavXPPanel.PanelGradient.Start  = System.Drawing.Color.White;
            this.leftNavXPPanel.PanelGradientMode    = System.Drawing.Drawing2D.LinearGradientMode.Vertical;
            this.leftNavXPPanel.PanelState           = TerraScan.XPPanel.XPPanelState.Expanded;
            if (panelCount > 0)
            {
                panelCount = (panelCount * 16) + 44;
            }
            else
            {
                panelCount = (panelCount * 16) + 33;
            }

            this.leftNavXPPanel.Size       = new System.Drawing.Size(this.leftNavXPPanel.Width, panelCount);
            this.leftNavXPPanel.PanelState = TerraScan.XPPanel.XPPanelState.Collapsed;

            ////this.leftNavXPPanel.TextColors.Background = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(0)))));

            this.leftNavXPPanel.TextColors.Background          = System.Drawing.Color.FromArgb((int)(byte)192, (int)(byte)192, (int)(byte)0);
            this.leftNavXPPanel.TextColors.Foreground          = System.Drawing.Color.White;
            this.leftNavXPPanel.TextHighlightColors.Background = System.Drawing.Color.Transparent;

            ////this.leftNavXPPanel.TextHighlightColors.Foreground = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(0)))));

            this.leftNavXPPanel.TextHighlightColors.Foreground = System.Drawing.Color.FromArgb((int)(byte)192, (int)(byte)192, (int)(byte)0);
            this.leftNavXPPanel.VertAlignment = System.Drawing.StringAlignment.Center;
            this.leftNavXPPanel.XPPanelStyle  = TerraScan.XPPanel.XPPanelStyle.Custom;
            ////this.leftNavXPPanel.Click += new EventHandler(this.LeftNavXPPanel_Click);
            this.leftNavXPPanel.Expanded  += new EventHandler(this.LeftNavXPPanel_Expanded);
            this.leftNavXPPanel.Expanding += new EventHandler(this.LeftNavXPPanel_Expanding);
            this.leftNavXPPanel.Collapsed += new EventHandler(this.LeftNavXPPanel_Collapsed);
            this.leftNavXPPanel.TabStop    = false;
            this.leftNavXPPanel.Width      = this.xpPanelGroup3.Width;
            ////Added by Jayanthi to set the location of first (Receipts) link panel when scroll has come
            if (this.xpPanelGroup3.Controls.Count == 0)
            {
                this.leftNavXPPanel.Location = new Point(0, 0);
                this.xpPanelGroup3.Controls.Add(this.leftNavXPPanel);
            }
            // Till here
            else
            {
                this.xpPanelGroup3.Controls.Add(this.leftNavXPPanel);
            }
        }