Example #1
0
        private void Window_KeyDown(object sender, KeyEventArgs e)
        {
            //if (e.Key == Key.F5)
            //{
            //    MessageBox.Show("delete pressed");
            //    e.Handled = true;
            //}


            if (e.Key == Key.F6)
            {
                m_fieldsPopup = new CompraDialog();
                //m_fieldsPopup = new CompraDialog(m_productList);
                m_fieldsPopup.CloseRequested  += myDialog_CloseRequested;
                m_fieldsPopup.UpdateRequested += myDialog_UpdateRequested;
                m_fieldsPopup.Activated       += fieldsPopup_Opened;
                m_fieldsPopup.Background       = new SolidColorBrush(Colors.Red);
                RootGrid.Opacity      = 0.1;
                m_fieldsPopup.Opacity = 1;
                m_fieldsPopup.ShowDialog();
                RootGrid.Opacity = 1;
            }


            if (e.Key == Key.F3)
            {
                m_fieldsCliente = new CompraProveedor();


                m_fieldsCliente.CloseRequestedc  += myDialog_CloseRequestedC;
                m_fieldsCliente.UpdateRequestedc += myDialog_UpdateRequestedc;
                m_fieldsCliente.Activated        += fieldsPopup_Openedc;
                m_fieldsCliente.Background        = new SolidColorBrush(Colors.Red);
                RootGrid.Opacity        = 0.1;
                m_fieldsCliente.Opacity = 1;
                m_fieldsCliente.ShowDialog();
                RootGrid.Opacity = 1;
            }


            if (e.Key == Key.F7)
            {
                tabla.Rows[m_selectedIndex].Delete();
                if (m_selectedIndex == -1)
                {
                    return;
                }

                RemoveItem(m_selectedIndex);
                this.DeleteButton.IsEnabled = false;
            }
        }
Example #2
0
 private void Add(object sender, RoutedEventArgs e)
 {
     m_fieldsPopup = new CompraDialog();
     //m_fieldsPopup = new CompraDialog(m_productList);
     m_fieldsPopup.CloseRequested  += myDialog_CloseRequested;
     m_fieldsPopup.UpdateRequested += myDialog_UpdateRequested;
     m_fieldsPopup.Activated       += fieldsPopup_Opened;
     m_fieldsPopup.Background       = new SolidColorBrush(Colors.Red);
     RootGrid.Opacity      = 0.1;
     m_fieldsPopup.Opacity = 1;
     m_fieldsPopup.ShowDialog();
     RootGrid.Opacity = 1;
     // lblGas.
     //chk
 }
Example #3
0
        private void InvoiceGrid_DoubleTapped(object sender, System.Windows.Input.MouseButtonEventArgs e)
        {
            FrameworkElement element = null;

            if ((element = e.OriginalSource as FrameworkElement) != null)
            {
                m_selectedIndex = Grid.GetRow(element);
            }
            CompraItem invoiceItem = m_items[m_selectedIndex];

            //esta no estaba comentada int selectedProductIndex = m_productList.IndexOf(m_productList[invoiceItem.Descripcion]);
            m_fieldsPopup = new CompraDialog(invoiceItem, "Edit the Fields");
            m_fieldsPopup.UpdateRequested += EditDialog_UpdateRequested;
            m_fieldsPopup.CloseRequested  += EditDialog_CloseRequested;
            m_fieldsPopup.lblTitle.Content = "Editar Articulos";
            RootGrid.Opacity      = 0.2;
            m_fieldsPopup.Opacity = 1;
            m_fieldsPopup.ShowDialog();
            RootGrid.Opacity = 1;
        }