Exemple #1
0
        private void EditWorkerProfButton_Click(object sender, RoutedEventArgs e)
        {
            if (WorkerProfessionsListBox.SelectedItem == null)
            {
                return;
            }

            if (AdministrationClass.AllowAnnimations)
            {
                var opacityAnnimation = new DoubleAnimation(0, new Duration(new TimeSpan(0, 0, 0, 0, 150)));
                opacityAnnimation.Completed += (s, args) =>
                {
                    EditProfProcedure();

                    opacityAnnimation = new DoubleAnimation(1, new Duration(new TimeSpan(0, 0, 0, 0, 150)));
                    WorkerProfOpacityGrid.BeginAnimation(Control.OpacityProperty, opacityAnnimation);
                };

                WorkerProfOpacityGrid.BeginAnimation(Control.OpacityProperty, opacityAnnimation);
            }
            else
            {
                EditProfProcedure();
            }

            WorkerProfessionsListBox.IsEnabled = false;
        }
Exemple #2
0
        private void ShowSecondWorkerProfButton_Click(object sender, RoutedEventArgs e)
        {
            if (AdministrationClass.AllowAnnimations)
            {
                var opacityAnnimation = new DoubleAnimation(0, new Duration(new TimeSpan(0, 0, 0, 0, 150)));
                opacityAnnimation.Completed += (s, args) =>
                {
                    AddProfProcedure();

                    opacityAnnimation = new DoubleAnimation(1, new Duration(new TimeSpan(0, 0, 0, 0, 150)));
                    WorkerProfOpacityGrid.BeginAnimation(Control.OpacityProperty, opacityAnnimation);
                };

                WorkerProfOpacityGrid.BeginAnimation(Control.OpacityProperty, opacityAnnimation);
            }
            else
            {
                AddProfProcedure();
            }
        }
Exemple #3
0
        private void HideSecondWorkerProfButton_Click(object sender, RoutedEventArgs e)
        {
            if (AdministrationClass.AllowAnnimations)
            {
                var opacityAnnimation = new DoubleAnimation(0, new Duration(new TimeSpan(0, 0, 0, 0, 150)));
                opacityAnnimation.Completed += (s, args) =>
                {
                    CancelProfProcedure();

                    opacityAnnimation = new DoubleAnimation(1, new Duration(new TimeSpan(0, 0, 0, 0, 150)));
                    WorkerProfOpacityGrid.BeginAnimation(OpacityProperty, opacityAnnimation);
                };

                WorkerProfOpacityGrid.BeginAnimation(OpacityProperty, opacityAnnimation);
            }
            else
            {
                CancelProfProcedure();
            }

            WorkerProfessionsListBox.IsEnabled = true;
        }