void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.modelButton = ((FinaleProject.model)(target));
                return;

            case 3:
                this.SELECT = ((System.Windows.Controls.Button)(target));
                return;
            }
            this._contentLoaded = true;
        }
        private void Window_Activated(object sender, EventArgs e)
        {
            A.Children.Clear();

            connection.Open();
            string       qry = "SELECT SNID FROM sreda_app_a";
            MySqlCommand cmd = new MySqlCommand(qry, connection);

            cmd.ExecuteNonQuery();
            MySqlDataReader mdr;

            mdr = cmd.ExecuteReader();
            while (mdr.Read())
            {
                string ID     = mdr.GetString("SNID");
                model  bmodel = new model();
                A.Children.Add(bmodel);
                bmodel.SNID = ID;
            }
            connection.Close();

            /////////////////////////////////////////////


            B.Children.Clear();

            connection.Open();
            string       qryB = "SELECT SNID FROM sreda_app_b";
            MySqlCommand cmdB = new MySqlCommand(qryB, connection);

            cmdB.ExecuteNonQuery();
            MySqlDataReader mdrB;

            mdrB = cmdB.ExecuteReader();
            while (mdrB.Read())
            {
                string ID = mdrB.GetString("SNID");

                model2 bmodel = new model2();
                B.Children.Add(bmodel);
                bmodel.SNID = ID;
            }
            connection.Close();
        }