Exemplo n.º 1
0
        private EditControl AddControl(string text)
        {
            EditControl editControl = new EditControl();

            editControl.textLabel.Text = text;
            editPanel.Children.Add(editControl);
            return(editControl);
        }
Exemplo n.º 2
0
        //Fname, Lname, Phone, Addr, Email
        public EditWindow(Window Owner, DataBaseItem dataBaseItem)
        {
            this.Owner = Owner;
            InitializeComponent();

            firstname = AddControl("Имя:");
            phone     = AddControl("Телефон:");
            email     = AddControl("Email:");

            if (dataBaseItem != null)
            {
                this.dataBaseItem       = dataBaseItem;
                firstname.textEdit.Text = dataBaseItem.firstName;
                phone.textEdit.Text     = dataBaseItem.phone;
                email.textEdit.Text     = dataBaseItem.email;
            }
        }