コード例 #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);
 }
コード例 #2
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.textBoxWEPImie = ((lab1b.TextBoxWithErrorProvider)(target));
                return;

            case 2:
                this.textBoxWEPNazwisko = ((lab1b.TextBoxWithErrorProvider)(target));
                return;

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

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

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

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

            #line default
            #line hidden
                return;

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

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

            #line default
            #line hidden
                return;

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

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

            #line default
            #line hidden
                return;

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

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

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