Esempio n. 1
0
        private void SlidingPanelTimer_Tick(object sender, EventArgs e)
        {
            if (isSlidingPanelExpanded)
            {
                //Retract the panel

                TogglePanel.Width -= 20;
                if (TogglePanel.Width <= MinSliderWidth)
                {
                    //Stop retracting
                    isSlidingPanelExpanded = false;
                    SlidingPanelTimer.Stop();
                    retractedPanel();
                    Refresh();
                }
            }
            else
            {
                //Expand the panel
                TogglePanel.Width += 20;
                if (TogglePanel.Width >= MaxSliderWidth)
                {
                    //Stop expanding
                    isSlidingPanelExpanded = true;
                    SlidingPanelTimer.Stop();
                    expandedPanel();
                    Refresh();
                }
            }
        }
Esempio n. 2
0
        private void SlidingPanelTimer_Tick(object sender, EventArgs e)
        {
            if (IsSlidingPanelExpanded)
            {
                //retract panel
                Slidingpanel.Width -= 30;
                if (Slidingpanel.Width <= MinSliderWidth)
                {
                    //stop retract
                    IsSlidingPanelExpanded = false;
                    SlidingPanelTimer.Stop();

                    this.Refresh();
                }
            }
            else
            {
                //expand the panel
                Slidingpanel.Width += 30;
                if (Slidingpanel.Width >= MaxSliderWidth)
                {
                    //stop expanding
                    IsSlidingPanelExpanded = true;
                    SlidingPanelTimer.Stop();
                    expandSlidingPanelGUI();

                    this.Refresh();
                }
            }
        }
Esempio n. 3
0
        private void SlidingPanelTimer_Tick(object sender, EventArgs e)
        {
            BooksUserControl booksUserControl = new BooksUserControl();

            if (isSlidingPanelExtended)
            {
                SlidingPanel.Width -= 10;
                ContentPanel.Width += 10;

                booksUserControl.Width += 10;
                if (SlidingPanel.Width <= MinSlidingPanelWidth || ContentPanel.Width >= MaxContentPanelWidth)
                {
                    SlidingPanelTimer.Stop();
                    isSlidingPanelExtended = false;
                    RetractSlidingPanelGUI();
                    this.Refresh();
                }
            }
            else
            {
                SlidingPanel.Width     += 10;
                ContentPanel.Width     -= 10;
                booksUserControl.Width -= 10;
                if (SlidingPanel.Width >= MaxSlidingPanelWidth || ContentPanel.Width <= MinContentPanelWidth)
                {
                    SlidingPanelTimer.Stop();
                    isSlidingPanelExtended = true;
                    ExpandSlidingPanelGUI();
                    this.Refresh();
                }
            }
        }