Beispiel #1
0
        private void MetroLink_Click(object sender, EventArgs e)
        {
            ExpandAnimation animation = new ExpandAnimation();

            animation.AnimationCompleted += Animation_AnimationCompleted;
            switch (collapseDirection)
            {
            case CollapseDirectionStyle.Width:
                if (MaximumSize.Width > Width)
                {
                    animation.Start(this, MaximumSize, TransitionType.Linear, 20);
                }
                else
                {
                    animation.Start(this, MinimumSize, TransitionType.Linear, 20);
                }
                break;

            case CollapseDirectionStyle.Height:
                if (Height > MinimumSize.Height)
                {
                    animation.Start(this, MinimumSize, TransitionType.Linear, 20);
                }
                else
                {
                    animation.Start(this, MaximumSize, TransitionType.Linear, 20);
                }
                break;
            }
        }
 private void SumAvg_checkedChanged(object sender, EventArgs e)
 {
     if (sum_avg != null && sum_avg.Count > 0)
     {
         ExpandAnimation ea  = new ExpandAnimation();
         ExpandAnimation ea2 = new ExpandAnimation();
         //Afficher ou chacher les listesBox
         sum_list.Visible = sum_cb.Checked;
         avg_list.Visible = avg_cb.Checked;
         //Reglage de l'animation
         if (!sum_cb.Checked && !avg_cb.Checked)
         {//Reduire
             ea.Start(footer_panel, new Size(832, 53), TransitionType.EaseInExpo, 15);
             ea2.Start(this, new Size(835, 520), TransitionType.EaseInExpo, 10);
         }
         else
         {
             ea.Start(footer_panel, new Size(832, 126), TransitionType.EaseInExpo, 15);
             ea2.Start(this, new Size(835, 592), TransitionType.EaseInExpo, 10);
         }
     }
     else
     {
         //Unsubscribe Event
         sum_cb.CheckedChanged -= SumAvg_checkedChanged;
         avg_cb.CheckedChanged -= SumAvg_checkedChanged;
         //uncheck controls
         sum_cb.Checked = avg_cb.Checked = false;
         //Subscribe Event
         sum_cb.CheckedChanged += SumAvg_checkedChanged;
         avg_cb.CheckedChanged += SumAvg_checkedChanged;
         MessageBox.Show("Aucun Champs Numeric Dans Votre Resultat pour effectuer cette tache !");
     }
 }
Beispiel #3
0
        private void ModuleBtn_Click(object sender, EventArgs e)
        {
            var ex = new ExpandAnimation();

            if (Height == _panelHeight)
            {
                ex.Start(this, new Size(Width, 24), TransitionType.Linear, 7);
            }
            else
            {
                ex.Start(this, new Size(Width, _panelHeight), TransitionType.Linear, 7);
            }
        }
        private void removeMemberLable_Click(object sender, EventArgs e)
        {
            searchPanel.Location = new Point(448, 287);
            ExpandAnimation en = new ExpandAnimation();

            en.Start(searchPanel, new Size(239, 72), TransitionType.Linear, 20);
        }
        private void getMemberListLable_Click(object sender, EventArgs e)
        {
            memberListPanel.Location = new Point(490, 75);
            ExpandAnimation en = new ExpandAnimation();

            en.Start(memberListPanel, new Size(580, 303), TransitionType.Linear, 20);
        }
Beispiel #6
0
        public void ChangeStatus(int width)
        {
            ExpandAnimation animation = new ExpandAnimation();

            animation.AnimationCompleted += Animation_AnimationCompleted;
            switch (Status)
            {
            case MetroAddonPanelStatus.Open:
                if (Pinned)
                {
                    break;
                }
                animation.Start(this, new Size(0, Height), TransitionType.Linear, 20);
                break;

            case MetroAddonPanelStatus.Close:
                BringToFront();
                Visible = true;
                animation.Start(this, new Size(width, Height), TransitionType.Linear, 20);
                break;
            }
        }
        private void reset()
        {
            if (searchPanel.Size.Width > 0)
            {
                ExpandAnimation en = new ExpandAnimation();
                en.Start(searchPanel, new Size(0, 72), TransitionType.EaseOutQuad, 20);
            }
            else if (searchPanel.Size.Width == 0)
            {
                if (activePanel != null)
                {
                    ExpandAnimation en = new ExpandAnimation();
                    en.Start(activePanel, new Size(0, 0), TransitionType.EaseOutQuad, 20);
                }
            }



            activePanel  = null;
            activeLable  = null;
            activePicBox = null;
        }
        private void refreeBtn_Click(object sender, EventArgs e)
        {
            ExpandAnimation en = new ExpandAnimation();

            en.Start(tableLayoutPanel1, new Size(200, 500), TransitionType.Linear, 20);
        }
        private void ListcloseBtn_Click(object sender, EventArgs e)
        {
            ExpandAnimation en = new ExpandAnimation();

            en.Start(memberListPanel, new Size(580, 0), TransitionType.EaseInExpo, 20);
        }
        private void animatePanel(int width, int height)
        {
            ExpandAnimation en = new ExpandAnimation();

            en.Start(activePanel, new Size(width, height), TransitionType.Linear, 20);
        }