Пример #1
0
        public void RollUp()        // start the roll up
        {
            timer.Stop();

            if (mode == Mode.UpAwaitRollDecision)     // cancel the decision
            {
                mode = Mode.Up;
            }
            else if (mode != Mode.Up)
            {
                //System.Diagnostics.Debug.WriteLine(Environment.TickCount + " roll up, start animating , child size " + this.FindMaxSubControlArea(0, 0));
                mode = Mode.RollingUp;
                targetrolltickstart = Environment.TickCount;
                timer.Interval      = rolltimerinterval;
                RetractStarting?.Invoke(this, EventArgs.Empty);
                timer.Start();

                foreach (Control c in Controls)     // panels attached must not be autosized
                {
                    if (c is Panel)
                    {
                        (c as Panel).AutoSize = false;
                    }
                }

                wasautosized  = this.AutoSize;
                this.AutoSize = false;          // and we must not be..
            }
        }
Пример #2
0
        public void RollUp()        // start the roll up
        {
            timer.Stop();

            if (mode == Mode.UpAwaitRollDecision)     // cancel the decision
            {
                mode = Mode.Up;
            }
            else if (mode != Mode.Up)
            {
                //System.Diagnostics.Debug.WriteLine(Environment.TickCount + " roll up, start animating , child size " + this.FindMaxSubControlArea(0, 0));
                mode = Mode.RollingUp;
                targetrolltickstart = Environment.TickCount;
                timer.Interval      = rolltimerinterval;
                RetractStarting?.Invoke(this, EventArgs.Empty);
                AutoHeightWidthDisable = true;  // disable Auto width/height controls on PanelAutoHeightWidth
                timer.Start();

                autosizedpanels.Clear();
                foreach (Control c in Controls)     // panels attached must not be autosized
                {
                    Panel p = c as Panel;

                    if (p != null && p.AutoSize == true)    // if autosize panel, disable it.
                    {
                        autosizedpanels.Add(p);
                        p.AutoSize = false;
                    }
                }

                wasautosized  = this.AutoSize;
                this.AutoSize = false;          // and we must not be..
            }
        }
Пример #3
0
        public void RollUp()
        {
            timer.Stop();

            if (Height > RolledUpHeight)
            {
                //System.Diagnostics.Debug.WriteLine(Environment.TickCount + " roll up, start animating");
                mode           = Mode.RollUp;
                timer.Interval = 25;
                RetractStarting?.Invoke(this, EventArgs.Empty);
                timer.Start();
            }
            else
            {
                mode = Mode.None;
                //System.Diagnostics.Debug.WriteLine(Environment.TickCount + " ignore roll up at min h");
            }
        }