Пример #1
0
        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// Prepares the view to accept information for a new person.
        /// </summary>
        /// ------------------------------------------------------------------------------------
        private object lpPeople_NewButtonClicked(object sender)
        {
            if (_currPerson != null)
            {
                SavePersonFromView(_currPerson);
            }

            if (tabPeople.SelectedTab != tpgAbout)
            {
                tabPeople.SelectedTab = tpgAbout;
            }

            _currPerson = Person.CreateFromName(_currProj, string.Empty);
            _currProj.AddPerson(_currPerson);
            ClearView();
            lblNoPeopleMsg.Visible = false;
            lpPeople.AddItem(_currPerson, true, false);

            UpdateDisplay();

            _fullName.SelectAll();
            _fullName.Focus();

            return(null);
        }