Exemple #1
0
 private void UserControl_Loaded1(object sender, RoutedEventArgs e)
 {
     foreach (Button bs in ClassETC_fun.FindVisualChildren <Button>(this))
     {
         bs.Click += Button_Click;
     }
 }
Exemple #2
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            if (((Button)sender).Name == "Save")
            {
                string error = "";

                foreach (TextBox bs in ClassETC_fun.FindVisualChildren <TextBox>(this))
                {
                    if (!Valid(bs))
                    {
                        error += (bs.Name + " incorrect") + Environment.NewLine;
                    }
                }

                if (error.Length == 0)
                {
                    new ClassFunctuon().Click(sender);
                }

                else
                {
                    new ClassFunctuon().showMessageTimeList(error);
                }
            }
            else
            {
                new ClassFunctuon().Click(sender);
            }
        }
Exemple #3
0
 private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     foreach (RadioButton bs in ClassETC_fun.FindVisualChildren <RadioButton>(this.panelA))
     {
         bs.Click += RadioButton_Click;
     }
     foreach (RadioButton bs in ClassETC_fun.FindVisualChildren <RadioButton>(this.panelB))
     {
         bs.Click += RadioButton_Click;
     }
 }
Exemple #4
0
        private void RadioButton_Click(object sender, RoutedEventArgs e)
        {
            RadioButton rb = (RadioButton)sender;

            foreach (RadioButton bs in ClassETC_fun.FindVisualChildren <RadioButton>(this.panelA))
            {
                bs.IsChecked = false;
            }
            foreach (RadioButton bs in ClassETC_fun.FindVisualChildren <RadioButton>(this.panelB))
            {
                bs.IsChecked = false;
            }
            rb.IsChecked = true;
        }
Exemple #5
0
        private void MainWindow_Loaded(object sender, RoutedEventArgs e)
        {
            lnm.Content              = ClassGlobalVar.Name;
            lnt.Content              = ClassGlobalVar.nameTicket;
            lnu.Content              = ClassGlobalVar.user;
            dispatcherTimer          = new System.Windows.Threading.DispatcherTimer();
            dispatcherTimer.Tick    += new EventHandler(dispatcherTimer_Tick);
            dispatcherTimer.Interval = new TimeSpan(0, 0, 0, 1, 0);
            // dispatcherTimer.Start();
            ClassBallance.opn();
            //Windows 8 API to enable touch keyboard to monitor for focus tracking in this WPF application
            try
            {
                InputPanelConfiguration  cp  = new InputPanelConfiguration();
                IInputPanelConfiguration icp = cp as IInputPanelConfiguration;
                if (icp != null)
                {
                    icp.EnableFocusTracking();
                }
            }
            catch
            { }

            foreach (Button bs in ClassETC_fun.FindVisualChildren <Button>(this))
            {
                bs.Click += Button_Click;
            }
            xProduct.Focus();

            ClassCustomerDisplay.hi();

            status_message.Text += Environment.NewLine + "--------------------------------" + Environment.NewLine +
                                   "Caisse : " + ClassGlobalVar.nameTicket + Environment.NewLine +
                                   "Post : " + ClassGlobalVar.numberTicket + Environment.NewLine +
                                   "Nom d'usager : " + ClassGlobalVar.user + Environment.NewLine + Environment.NewLine +
                                   "--------------------------------" + Environment.NewLine +
                                   "La clé d'ouverture générale : " + ClassGlobalVar.TicketWindowG + Environment.NewLine +
                                   "La clé d'ouverture local : " + ClassGlobalVar.TicketWindow + Environment.NewLine;

            foreach (GridSplitter gs in ClassETC_fun.FindVisualChildren <GridSplitter>(this))
            {
                gs.IsEnabled = ClassGlobalVar.gridModif;
            }
        }
Exemple #6
0
 private void xProduct_KeyUp(object sender, KeyEventArgs e)
 {
     countTick = 0;
     if (e.Key == Key.F11)
     {
         foreach (GridSplitter gs in ClassETC_fun.FindVisualChildren <GridSplitter>(this))
         {
             gs.IsEnabled = !gs.IsEnabled;
         }
     }
     if (e.Key == Key.F12)
     {
         Properties.Settings.Default.Reset();
     }
     if (e.Key == Key.Return)
     {
         keyReturn();
     }
 }
Exemple #7
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            gridLoad("m", ClassGridGroup.gridCurrencyPath_get_path(typesPay));
            foreach (Button bs in ClassETC_fun.FindVisualChildren <Button>(this))
            {
                bs.Click += Button_Click;
            }

            if (this.Owner is MainWindow)
            {
                List <ClassBond.count_Currency> cc = ClassBond.transform(new ClassFunctuon().getMoney((this.Owner as MainWindow).qty_label), this.typesPay);

                foreach (var h in cc)
                {
                    new ClassFunctuon().add_Currency(h.currency, h.count, this);
                }



                (this.Owner as MainWindow).qty_label.Text = "__";
            }
        }
        private void ebarcode_KeyUp(object sender, KeyEventArgs e)
        {
            if (e.Key == Key.Return)
            {
                ClassSync.Discount.DiscountCards d = ClassSync.Discount.DiscountCards.OneDiscountCards(ebarcode.Text);

                ClassSync.Discount.InfoClients ic = ClassDiscounts.getInfClt(d.InfoClients_custumerId);
                if (ic != null)
                {
                    lTypeClient.Content    = ic.TypeClient;
                    lName.Content          = ic.Name;
                    lSurname.Content       = ic.Surname;
                    lNameCompany.Content   = ic.NameCompany;
                    lSIRET.Content         = ic.SIRET;
                    lFRTVA.Content         = ic.FRTVA;
                    lOfficeAddress.Content = ic.OfficeAddress;
                    lOfficeZipCode.Content = ic.OfficeZipCode;
                    lOfficeCity.Content    = ic.OfficeCity;
                    lHomeAddress.Content   = ic.HomeAddress;
                    lHomeZipCode.Content   = ic.HomeZipCode;
                    lHomeCity.Content      = ic.HomeCity;
                    lTelephone.Content     = ic.Telephone;
                    lMail.Content          = ic.Mail;
                    lnumberCard.Content    = ic.DiscountCards.First().numberCard;
                    lpoints.Content        = ic.DiscountCards.First().points;
                    lActive.Content        = ic.DiscountCards.First().active;
                }
                else
                {
                    foreach (Label la in ClassETC_fun.FindVisualChildren <Label>(this))
                    {
                        la.Content = "Не найден";
                    }
                }
                ebarcode.Text = "";
            }
        }