Пример #1
0
        void PersonsView_Loaded(object sender, RoutedEventArgs e)
        {
            PersonsView personsView = (PersonsView)sender;

            manager.Bars["mainBar"].UnMerge();
            manager.Bars["mainBar"].Merge(personsView.ChildBar);
        }
        public void Execute()
        {
            PersonsView personsView = new PersonsView
            {
                Persons = addressBook
            };

            personsView.Display();
        }
Пример #3
0
 private void RemoveParticipant(object sender, RoutedEventArgs e)
 {
     if (participantlb.SelectedItems.Count > 0)
     {
         viewModel.RemoveParticipant(participantlb.SelectedItems);
         participantlb.SelectedItems.Clear();
         PersonsView.Refresh();
     }
 }
Пример #4
0
        private void AddParticipant(object sender, RoutedEventArgs e)
        {
            if (personlb.SelectedItems.Count > 0)
            {
                viewModel.AddParticipants(personlb.SelectedItems);

                personlb.SelectedItems.Clear();
                PersonsView.Refresh();
            }
        }
Пример #5
0
 /// <summary>
 /// Event handler for property changes on elements of <see cref="Persons"/>.
 /// </summary>
 /// <param name="sender">The person model.</param>
 /// <param name="e">The event arguments.</param>
 private void PersonsOnPropertyChanged(object sender, PropertyChangedEventArgs e)
 {
     if (e.PropertyName == nameof(PersonModel.HasErrors) || e.PropertyName == nameof(PersonModel.IsOk))
     {
         return;
     }
     if (PersonsView.IsEditingItem || PersonsView.IsAddingNew)
     {
         return;
     }
     PersonsView.Refresh();
 }
Пример #6
0
        public App()
        {
            InitializeComponent();

            MainPage = new PersonsView();
        }
Пример #7
0
        private void OpenPersonsWindow(object sender, RoutedEventArgs e)
        {
            var view = new PersonsView(_uow);

            view.ShowDialog();
        }