Example #1
0
        private void butEdit_Click(object sender, RoutedEventArgs e)
        {
            LvProfileItem lvi = ((LvProfileItem)lvData.SelectedItem);

            if (lvi != null)
            {
                string      profileName = lvi.ProfileName;
                ProfileInfo profile     = (ProfileInfo)infoManager.GetProfileByName(profileName);


                tbFullName.Text           = profile.FullName;
                tbEmail.Text              = profile.Email;
                tbAddress1.Text           = profile.Address1;
                tbAddress2.Text           = profile.Address2;
                tbCity.Text               = profile.City;
                tbPostcode.Text           = profile.Postcode;
                tbCardno.Text             = profile.CardNr;
                tbCVV.Text                = profile.CVV;
                tbProfileName.Text        = profile.name;
                tbTel.Text                = profile.TelNr;
                cbCountry.SelectedValue   = profile.Country;
                cbCardType.SelectedValue  = profile.CardType;
                cbCardMonth.SelectedValue = profile.ExpMonth;
                cbCardYear.SelectedValue  = profile.ExpYear;

                //bot.addClientData(profile);
            }
        }
Example #2
0
        private void butRemove_Click(object sender, RoutedEventArgs e)
        {
            LvProfileItem lvi = ((LvProfileItem)lvData.SelectedItem);

            if (lvi != null)
            {
                infoManager.RemoveProfileByName(lvi.ProfileName);
                infoManager.updateProfilesList();
                infoManager.saveProfilesList();
            }
        }