Ejemplo n.º 1
0
 private void label5_Click(object sender, EventArgs e)
 {
     if (panel2.Width == 300)
     {
         panel2.Visible = false;
         panel2.Width   = 0;
         PanelTransition.ShowSync(panel2);
     }
     else
     {
         panel2.Visible = false;
         panel2.Width   = 300;
         PanelTransition.ShowSync(panel2);
     }
 }
Ejemplo n.º 2
0
 public static void showAnimation(Control cs, BunifuAnimatorNS.BunifuTransition bunifuTransition1)
 {
     bunifuTransition1.HideSync(cs, true);
     //bunifuTransition1.HideSync(cs, false, BunifuAnimatorNS.Animation.HorizBlind);
     //Thread.Sleep(2000);
     bunifuTransition1.ShowSync(cs, true);
 }
Ejemplo n.º 3
0
        private void ShowStartMenu()
        {
            var Animation = new BunifuAnimatorNS.BunifuTransition
            {
                AnimationType = BunifuAnimatorNS.AnimationType.HorizSlide,
                Interval      = 6
            };

            Animation.ShowSync(startMenu);
        }
Ejemplo n.º 4
0
 /// <summary>
 /// Shows the given control. If its part of SlidedControls other controls will hide.
 /// </summary>
 /// <param name="control">UI Control Object</param>
 public static void ShowSync(Control control)
 {
     if (SlidedControls.Contains(control))
     {
         HideAll();
     }
     if (!control.Visible)
     {
         Animator.ShowSync(control);
     }
 }
Ejemplo n.º 5
0
        public static void makeTransition(int type, int x, int y)
        {
            panelMain.Invoke((MethodInvoker) delegate()
            {
                panelMain.Enabled = false;
            });

            Plateau.plateauCases[y][x].pb.Invoke((MethodInvoker) delegate()
            {
                Plateau.plateauCases[y][x].pb.Visible = false;
            });

            BunifuAnimatorNS.BunifuTransition transition = new BunifuAnimatorNS.BunifuTransition();
            transition.AnimationCompleted += (transitionAnimationCompleted);
            transition.AnimationType       = (BunifuAnimatorNS.AnimationType)type;
            transition.Interval            = 10;
            transition.ShowSync(Plateau.plateauCases[y][x].pb);

            Plateau.plateauCases[y][x].pb.Invoke((MethodInvoker) delegate()
            {
                Plateau.plateauCases[y][x].pb.Visible = true;
            });
        }
Ejemplo n.º 6
0
        private void btnLogin_Click(object sender, EventArgs e)
        {
            //Authenticate user
            //perform login
            //verification
            if (String.IsNullOrEmpty(tbFullName.Text))
            {
                alert.Show("Required info \n Input Username", alert.AlertType.warnig);
                return;
            }
            if (String.IsNullOrEmpty(tbPassword.Text))
            {
                alert.Show("Required info \n Input Password", alert.AlertType.warnig);
                return;
            }
            if (!tbFullName.Text.Equals(tbPassword.Text))
            {
                alert.Show("Wrong \n Password or Username ", alert.AlertType.error);
                return;
            }
            try
            {
                using (BunifuAnimatorNS.BunifuTransition ss = new BunifuAnimatorNS.BunifuTransition())
                {
                    ss.AnimationType = BunifuAnimatorNS.AnimationType.Rotate;
                    //this.bunifuTransitionUIs
                    this.Visible = false;
                    ss.ShowSync(this);
                    this.Visible = false;
                }
            }
            catch (InvalidOperationException)
            {
                //this exception occurs when the transition is not complete ;(
            }
            catch (System.Reflection.TargetInvocationException exp)
            {
                MessageBox.Show(exp.Message + " \n" + exp.InnerException.Message);
            }
            catch (Exception exx)
            {
                MessageBox.Show(exx.Message, "Try again");
            }

            //Home animation
            Home hh = new Home();

            try
            {
                using (BunifuAnimatorNS.BunifuTransition ss = new BunifuAnimatorNS.BunifuTransition())
                {
                    ss.AnimationType = BunifuAnimatorNS.AnimationType.ScaleAndRotate;
                    //this.bunifuTransitionUIs
                    ss.ShowSync(hh);
                }
            }
            catch (InvalidOperationException)
            {
                //this exception occurs when the transition is not complete ;(
            }
            catch (System.Reflection.TargetInvocationException exp)
            {
                MessageBox.Show(exp.Message + " \n" + exp.InnerException.Message);
            }
            catch (Exception exx)
            {
                MessageBox.Show(exx.Message, "Try again");
            }
        }
Ejemplo n.º 7
0
        private void TabSwitcher(Control UIinstance)
        {
            if (!this.containerUIs.Controls.Contains(UIinstance))
            {
                this.containerUIs.Controls.Add(UIinstance);
                UIinstance.Dock    = DockStyle.Fill;
                UIinstance.Visible = false;
                UIinstance.BringToFront();

                try
                {
                    using (BunifuAnimatorNS.BunifuTransition ss = new BunifuAnimatorNS.BunifuTransition())
                    {
                        ss.AnimationType = BunifuAnimatorNS.AnimationType.Mosaic;
                        //this.bunifuTransitionUIs
                        ss.ShowSync(UIinstance);
                    }
                }
                catch (InvalidOperationException)
                {
                    //this exception occurs when the transition is not complete ;(
                }
                catch (System.Reflection.TargetInvocationException exp)
                {
                    // MessageBox.Show(exp.Message + " \n" + exp.InnerException.Message);
                }
                catch (Exception exx)
                {
                    // MessageBox.Show(exx.Message, "Try again");
                }
            }
            else
            {
                UIinstance.Visible = false;
                UIinstance.BringToFront();
                try
                {
                    using (BunifuAnimatorNS.BunifuTransition ss = new BunifuAnimatorNS.BunifuTransition())
                    {
                        ss.AnimationType = BunifuAnimatorNS.AnimationType.Mosaic;
                        //this.bunifuTransitionUIs
                        ss.ShowSync(UIinstance);
                    }
                }
                catch (InvalidOperationException)
                {
                    //this exception occurs when the transition is not complete ;(
                }
                catch (System.Reflection.TargetInvocationException exp)
                {
                    // MessageBox.Show(exp.Message + " \n" + exp.InnerException.Message);
                }
                catch (Exception exx)
                {
                    // MessageBox.Show(exx.Message, "Try again");
                }
                finally
                {
                    //incase of transition bug
                    UIinstance.Visible = true;
                    UIinstance.BringToFront();
                }
            }

            containerUIs.Refresh();
        }
Ejemplo n.º 8
0
 public void Paneles(Panel Receptor, BunifuAnimatorNS.BunifuTransition Animacion, Label Receptor_lbl)
 {
     if (tabControl1.SelectedIndex == 0)
     {
         Metodos.Llenar_panel(Receptor, new Bienvenida());
         if (Receptor_lbl.Visible == true)
         {
             Animacion.HideSync(Receptor_lbl);
             Receptor_lbl.Text = "Pantalla de bienvenida";
             Animacion.ShowSync(Receptor_lbl);
         }
         else
         {
             Animacion.ShowSync(Receptor_lbl);
         }
     }
     else if (tabControl1.SelectedIndex == 1)
     {
         Metodos.Llenar_panel(Receptor, new Listado_polizas());
         if (Receptor_lbl.Visible == true)
         {
             Animacion.HideSync(Receptor_lbl);
             Receptor_lbl.Text = "Polizas";
             Animacion.ShowSync(Receptor_lbl);
         }
         else
         {
             Animacion.ShowSync(Receptor_lbl);
         }
     }
     else if (tabControl1.SelectedIndex == 2)
     {
         Metodos.Llenar_panel(Receptor, new Listado_tomadores());
         if (Receptor_lbl.Visible == true)
         {
             Animacion.HideSync(Receptor_lbl);
             Receptor_lbl.Text = "Tomadores";
             Animacion.ShowSync(Receptor_lbl);
         }
         else
         {
             Animacion.ShowSync(Receptor_lbl);
         }
     }
     else if (tabControl1.SelectedIndex == 3)
     {
         Metodos.Llenar_panel(Receptor, new Listado_beneficiarios());
         if (Receptor_lbl.Visible == true)
         {
             Animacion.HideSync(Receptor_lbl);
             Receptor_lbl.Text = "Beneficiarios";
             Animacion.ShowSync(Receptor_lbl);
         }
         else
         {
             Animacion.ShowSync(Receptor_lbl);
         }
     }
     else if (tabControl1.SelectedIndex == 4)
     {
         Metodos.Llenar_panel(Receptor, new Listados_vehiculos());
         if (Receptor_lbl.Visible == true)
         {
             Animacion.HideSync(Receptor_lbl);
             Receptor_lbl.Text = "Vehiculos";
             Animacion.ShowSync(Receptor_lbl);
         }
         else
         {
             Animacion.ShowSync(Receptor_lbl);
         }
     }
     else if (tabControl1.SelectedIndex == 5)
     {
         Metodos.Llenar_panel(Receptor, new Listado_vigencias_polizas());
         if (Receptor_lbl.Visible == true)
         {
             Animacion.HideSync(Receptor_lbl);
             Receptor_lbl.Text = "Vigencias polizas";
             Animacion.ShowSync(Receptor_lbl);
         }
         else
         {
             Animacion.ShowSync(Receptor_lbl);
         }
     }
     else if (tabControl1.SelectedIndex == 6)
     {
         Metodos.Llenar_panel(Receptor, new Listado_vigencias_Soat());
         if (Receptor_lbl.Visible == true)
         {
             Animacion.HideSync(Receptor_lbl);
             Receptor_lbl.Text = "Vigencias SOAT";
             Animacion.ShowSync(Receptor_lbl);
         }
         else
         {
             Animacion.ShowSync(Receptor_lbl);
         }
     }
 }