Esempio n. 1
0
        private void Button_AjouterEtiquette(object sender, RoutedEventArgs e)
        {
            int num = int.Parse("" + ((Button)sender).Tag);

            switch (num)
            {
            case 0:
                etiquette0 = new Etiquette();
                etiquette0.Setter(tb.Text);
                add0.Visibility = Visibility.Hidden;
                eti0.Content    = etiquette0;
                del0.Visibility = Visibility.Visible;
                break;

            case 1:
                etiquette1 = new Etiquette();
                etiquette1.Setter(tb.Text);
                add1.Visibility = Visibility.Hidden;
                eti1.Content    = etiquette1;
                del1.Visibility = Visibility.Visible;
                break;

            case 2:
                etiquette2 = new Etiquette();
                etiquette2.Setter(tb.Text);
                add2.Visibility = Visibility.Hidden;
                eti2.Content    = etiquette2;
                del2.Visibility = Visibility.Visible;
                break;

            case 3:
                etiquette3 = new Etiquette();
                etiquette3.Setter(tb.Text);
                add3.Visibility = Visibility.Hidden;
                eti3.Content    = etiquette3;
                del3.Visibility = Visibility.Visible; break;

            case 4:
                etiquette4 = new Etiquette();
                etiquette4.Setter(tb.Text);
                add4.Visibility = Visibility.Hidden;
                eti4.Content    = etiquette4;
                del4.Visibility = Visibility.Visible;
                break;

            case 5:
                etiquette5 = new Etiquette();
                etiquette5.Setter(tb.Text);
                add5.Visibility = Visibility.Hidden;
                eti5.Content    = etiquette5;
                del5.Visibility = Visibility.Visible;
                break;
            }
            this.tb.Text       = "";
            this.cp.Visibility = Visibility.Hidden;
        }
Esempio n. 2
0
        private void Button_Annuler(object sender, RoutedEventArgs e)
        {
            int num = int.Parse("" + (((Button)sender).Tag));

            switch (num)
            {
            case 0:
                etiquette0      = null;
                del0.Visibility = Visibility.Hidden;
                eti0.Content    = etiquette0;
                add0.Visibility = Visibility.Visible;
                break;

            case 1:
                etiquette1      = null;
                eti1.Content    = etiquette1;
                del1.Visibility = Visibility.Hidden;
                add1.Visibility = Visibility.Visible;
                break;

            case 2:
                etiquette2      = null;
                eti2.Content    = etiquette2;
                del2.Visibility = Visibility.Hidden;
                add2.Visibility = Visibility.Visible;
                break;

            case 3:
                etiquette3      = null;
                eti3.Content    = etiquette3;
                del3.Visibility = Visibility.Hidden;
                add3.Visibility = Visibility.Visible;
                break;

            case 4:
                etiquette4      = null;
                eti4.Content    = etiquette4;
                del4.Visibility = Visibility.Hidden;
                add4.Visibility = Visibility.Visible;
                break;

            case 5:
                etiquette5      = null;
                eti5.Content    = etiquette5;
                del5.Visibility = Visibility.Hidden;
                add5.Visibility = Visibility.Visible;
                break;
            }
        }
Esempio n. 3
0
 private void Window_Closed(object sender, System.EventArgs e)
 {
     eti1.Content = null;
     eti2.Content = null;
     eti3.Content = null;
     eti4.Content = null;
     eti5.Content = null;
     eti0.Content = null;
     etiquette0   = null;
     etiquette1   = null;
     etiquette2   = null;
     etiquette3   = null;
     etiquette4   = null;
     etiquette5   = null;
 }