Beispiel #1
0
 public MainWindow()
 {
     InitializeComponent();
     checker.CheckComponents(path);
     InfoHandler.readDatas();
     PartnerHandler.RefreshPartners();
 }
 public PartnersWindow()
 {
     InitializeComponent();
     PartnerHandler.RefreshPartners();
     PartnersList.ItemsSource = null;
     PartnersList.ItemsSource = PartnerHandler.partners;
 }
        private void EditPartnerBtn_Click(object sender, RoutedEventArgs e)
        {
            if (PartnersList.SelectedItem == null)
            {
                MessageBox.Show("Nincs kiválasztott partner!", "Hiba", MessageBoxButton.OK, MessageBoxImage.Error);
                return;
            }
            string            name            = (PartnersList.SelectedItem as Partner).Name;
            Partner           selectedPartner = PartnerHandler.partners.Where(x => x.Name == name).First();;
            EditPartnerWindow win             = new EditPartnerWindow(selectedPartner);

            win.ShowDialog();
            PartnerHandler.RefreshPartners();
            PartnersList.ItemsSource = null;
            PartnersList.ItemsSource = PartnerHandler.partners;
        }
 private void RefreshBtn_Click(object sender, RoutedEventArgs e)
 {
     PartnerHandler.RefreshPartners();
     PartnersList.ItemsSource = null;
     PartnersList.ItemsSource = PartnerHandler.partners;
 }