Exemplo n.º 1
0
        private void ComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            ComboBox comboBox = sender as ComboBox;

            if (comboBox.SelectedIndex != -1)
            {
                switch (comboBox.SelectedIndex)
                {
                case 0:
                    Ex1 ex1 = new Ex1();
                    ex1.ShowDialog();
                    break;

                case 1:
                    Ex2 ex2 = new Ex2();
                    ex2.ShowDialog();
                    break;

                case 2:
                    Ex3 ex3 = new Ex3();
                    ex3.ShowDialog();
                    break;
                }
            }
        }
Exemplo n.º 2
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.mainWindow = ((WpfLaba.Ex3)(target));
                return;

            case 2:
                this.btnPrev = ((System.Windows.Controls.Button)(target));

            #line 32 "..\..\Ex3.xaml"
                this.btnPrev.Click += new System.Windows.RoutedEventHandler(this.BtnPrev_Click);

            #line default
            #line hidden
                return;

            case 3:
                this.btnNext = ((System.Windows.Controls.Button)(target));

            #line 33 "..\..\Ex3.xaml"
                this.btnNext.Click += new System.Windows.RoutedEventHandler(this.BtnNext_Click);

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