Ejemplo n.º 1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void Add(object sender, RoutedEventArgs e)
 {
     m_fieldsPopup = new InputDetailView(m_productList);
     m_fieldsPopup.CloseRequested  += myDialog_CloseRequested;
     m_fieldsPopup.UpdateRequested += myDialog_UpdateRequested;
     m_fieldsPopup.Activated       += fieldsPopup_Opened;
     m_fieldsPopup.Background       = new SolidColorBrush(Colors.Black);
     RootGrid.Opacity      = 0.1;
     m_fieldsPopup.Opacity = 1;
     m_fieldsPopup.ShowDialog();
     RootGrid.Opacity = 1;
 }
Ejemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        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);
            }
            InvoiceItem invoiceItem          = m_items[m_selectedIndex];
            int         selectedProductIndex = m_productList.IndexOf(m_productList[invoiceItem.ItemName]);

            m_fieldsPopup = new InputDetailView(invoiceItem, "Edit the Fields", m_productList, selectedProductIndex);
            m_fieldsPopup.UpdateRequested += EditDialog_UpdateRequested;
            m_fieldsPopup.CloseRequested  += EditDialog_CloseRequested;
            m_fieldsPopup.lblTitle.Content = "Edit the Fields";
            RootGrid.Opacity      = 0.2;
            m_fieldsPopup.Opacity = 1;
            m_fieldsPopup.ShowDialog();
            RootGrid.Opacity = 1;

            //FrameworkElement element = null;
            //if ((element = e.OriginalSource as FrameworkElement) != null)
            //{
            //    m_selectedIndex = Grid.GetRow(element);
            //}
            //InvoiceItem invoiceItem = m_items[m_selectedIndex];
            //int selectedProductIndex = m_productList.IndexOf(m_productList[invoiceItem.Description]);

            ////m_fieldsPopup = new InputDetailView(invoiceItem, "Edit the Fields", m_productList, selectedProductIndex);


            //m_fieldsPopup.UpdateRequested += EditDialog_UpdateRequested;
            //m_fieldsPopup.CloseRequested += EditDialog_CloseRequested;
            //m_fieldsPopup.lblTitle.Content = "Edit the Fields";
            //RootGrid.Opacity = 0.2;
            //m_fieldsPopup.Opacity = 1;
            //m_fieldsPopup.ShowDialog();
            //RootGrid.Opacity = 1;
        }