private void Button_Edit_Click(object sender, RoutedEventArgs e)
 {
     if (MaterialsDataGrid.SelectedItems.Count > 0)
     {
         Material       material       = (Material)MaterialsDataGrid.SelectedItems[0];
         MaterialWindow materialWindow = new MaterialWindow(material);
         materialWindow.Show();
     }
 }
        private void Button_Add_Click(object sender, RoutedEventArgs e)
        {
            MaterialWindow materialWindow = new MaterialWindow();

            materialWindow.Show();
        }