private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     dbCon.connection.Open();
     using (MySqlCommand cmd = new MySqlCommand("select id,name from dom", dbCon.connection))
     {
         using (MySqlDataReader reader = cmd.ExecuteReader())
         {
             if (reader.HasRows)
             {
                 while (reader.Read())
                 {
                     Button button = new Button();
                     button.VerticalAlignment = VerticalAlignment.Top;
                     button.Style             = (Style)this.TryFindResource("menuCom");
                     button.Name   = "Dom" + reader["id"].ToString();
                     button.Click += new RoutedEventHandler(Button_Click);
                     //byte[] array = (byte[])reader["img"];
                     dbCon.For_Kompleks_Window(Panell, button, reader["name"].ToString());
                 }
             }
         }
     }
     dbCon.connection.Close();
     dbCon.connection.Dispose();
 }