Beispiel #1
0
 //Test sprawdzający czy pole nie jest puste
 //jeśli tak to przy okazji zgłasza błąd w obrębie kontrolki
 private bool IsNotEmpty(TextBoxWithErrorProvider tb)
 {
     if (tb.Text.Trim() == "")
     {
         tb.SetError("Pole nie może być puste!");
         return(false);
     }
     tb.SetError("");
     return(true);
 }
Beispiel #2
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 8 "..\..\MainWindow.xaml"
                ((ListaPilkarze.MainWindow)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded);

            #line default
            #line hidden

            #line 8 "..\..\MainWindow.xaml"
                ((ListaPilkarze.MainWindow)(target)).Closing += new System.ComponentModel.CancelEventHandler(this.Window_Closing);

            #line default
            #line hidden
                return;

            case 2:
                this.textBoxWEPImie = ((ListaPilkarze.TextBoxWithErrorProvider)(target));
                return;

            case 3:
                this.textBoxWEPNazwisko = ((ListaPilkarze.TextBoxWithErrorProvider)(target));
                return;

            case 4:
                this.sliderWiek = ((System.Windows.Controls.Slider)(target));
                return;

            case 5:
                this.sliderWaga = ((System.Windows.Controls.Slider)(target));
                return;

            case 6:
                this.buttonDodaj = ((System.Windows.Controls.Button)(target));

            #line 60 "..\..\MainWindow.xaml"
                this.buttonDodaj.Click += new System.Windows.RoutedEventHandler(this.buttonDodaj_Click);

            #line default
            #line hidden
                return;

            case 7:
                this.buttonEdytuj = ((System.Windows.Controls.Button)(target));

            #line 61 "..\..\MainWindow.xaml"
                this.buttonEdytuj.Click += new System.Windows.RoutedEventHandler(this.buttonEdytuj_Click);

            #line default
            #line hidden
                return;

            case 8:
                this.buttonUsun = ((System.Windows.Controls.Button)(target));

            #line 62 "..\..\MainWindow.xaml"
                this.buttonUsun.Click += new System.Windows.RoutedEventHandler(this.buttonUsun_Click);

            #line default
            #line hidden
                return;

            case 9:
                this.listBoxPilkarze = ((System.Windows.Controls.ListBox)(target));

            #line 68 "..\..\MainWindow.xaml"
                this.listBoxPilkarze.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.listBoxPilkarze_SelectionChanged);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }