Exemple #1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void Add(object sender, RoutedEventArgs e)
 {
     m_fieldDialog = new FieldDialog(m_productList);
     m_fieldDialog.CloseRequested  += myDialog_CloseRequested;
     m_fieldDialog.UpdateRequested += myDialog_UpdateRequested;
     m_fieldDialog.Activated       += FieldsPopup_Opened;
     m_fieldDialog.Background       = new SolidColorBrush(Colors.Red);
     RootGrid.Opacity      = 0.1;
     m_fieldDialog.Opacity = 1;
     m_fieldDialog.WindowStartupLocation = WindowStartupLocation.CenterScreen;
     m_fieldDialog.ShowDialog();
     RootGrid.Opacity = 1;
 }
Exemple #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_fieldDialog = new FieldDialog(invoiceItem, "Edit Item", m_productList, selectedProductIndex);
            m_fieldDialog.UpdateRequested += EditDialog_UpdateRequested;
            m_fieldDialog.CloseRequested  += EditDialog_CloseRequested;
            m_fieldDialog.lblTitle.Content = "Edit Items";
            RootGrid.Opacity      = 0.2;
            m_fieldDialog.Opacity = 1;
            m_fieldDialog.WindowStartupLocation = WindowStartupLocation.CenterScreen;
            m_fieldDialog.ShowDialog();
            RootGrid.Opacity = 1;
        }