private void Button_Click_1(object sender, RoutedEventArgs e) { Contact = new Contact(); Contact.Value = XContactValue.Text; Contact.Type = XContactName.Text; this.Close(); }
public static void AddContact(int uId, string passwordHash, Contact tContact) { }
public static Company GetCompanyById(int uId, string password, int idForSearch) { Company c = new Company(); c.Name = "Sony"; c.Id = idForSearch; c.Logo = new BitmapImage(new Uri(DataSaver.Path + "camera_a.png")); c.Address = "Набережная 140"; c.Specialization = "телефоны, приставки"; c.Contacts = new List<Contact>(); Contact t = new Contact(); t.Value = "vcs_sony"; t.Type = "skype"; c.Contacts.Add(t); return c; }
void aci_KeyDown(object sender, KeyEventArgs e) { AddContactItem aci=(AddContactItem)sender; if (e.Key == Key.Enter) { Contact t=new Contact(); t.Value=aci.XContactValue.Text; t.Type=aci.XContactName.Text; DataBaseInterface.AddContact(DataSaver.UId, DataSaver.PasswordHash, t); this.XPersonalListBox.Items.Remove(aci); this.XPersonalListBox.Items.Insert(this.XPersonalListBox.Items.Count-1, new PersonalProperyShower( new PersonalProperty(t.Type, t.Value,PropertyType.Contact),this)); } else if (e.Key == Key.Escape) { this.XPersonalListBox.Items.Remove(aci); } }
private void Button_Click_2(object sender, RoutedEventArgs e) { Contact = null; this.Close(); }