private void OnSenderEditClick(object Sender, RoutedEventArgs E)
        {
            var sender = SendersList.SelectedItem as Sender;

            if (sender is null)
            {
                return;
            }

            var dialog = new SenderEditor(sender, this);

            if (dialog.ShowDialog() != true)
            {
                return;
            }

            sender.Name    = dialog.NameValue;
            sender.Address = dialog.AddressValue;
        }
Beispiel #2
0
        /// <summary>
        /// Клик Редактировать отправителя
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnEditClick(object sender, RoutedEventArgs e)
        {
            //получаем данные отправителя
            var senders = SendersList.SelectedItem as Sender;

            if (senders is null)
            {
                return;
            }

            var dialog = new SenderEditor(senders);

            if (dialog.ShowDialog() != true)
            {
                return;
            }

            senders.Name           = dialog.Name;
            senders.AddressToEmail = dialog.AdresValue;
        }