Beispiel #1
0
        private async void OnCardsGridItemDropped(object sender, DataGridCardItemEventArgs e)
        {
            m_currentItem = e.Item;

            if (m_currentItem.Count > 1)
            {
                m_cardCountDialog = new CardCountDialog(e.Item.Name, e.Item.Count);
                m_cardCountDialog.AcceptButton.Click += OnAcceptClick;
                m_cardCountDialog.CancelButton.Click += OnCancelClick;

                m_dialog = new CustomDialog(this)
                {
                    Content = m_cardCountDialog
                };

                await this.ShowMetroDialogAsync(m_dialog, m_dialogSettings);
            }
            else if (m_currentItem.Count == 1)
            {
                AddItem(m_currentItem);
            }
            else
            {
            }
        }
Beispiel #2
0
 private void OnRowDeleted(object sender, DataGridCardItemEventArgs e)
 {
     if (e.RowIndex > -1)
     {
         HistoryManager.RemoveItemAt(m_account, e.RowIndex);
     }
     else
     {
     }
 }
Beispiel #3
0
 private void OnCardsGridRowDeleted(object sender, DataGridCardItemEventArgs e)
 {
     RemoveItem(e.Item);
 }