/*private void refresh_data(object sender, EventArgs e)
         * {
         *  bool found = false;
         *  if (Software_Info.deleted != null)
         *  {
         *
         *      foreach (Software sw in all)
         *      {
         *          if (sw.Id.Equals(Software_Info.deleted))
         *          {
         *              found = true;
         *              all.Remove(sw);
         *              break;
         *          }
         *      }
         *      if (!found)
         *      {
         *          foreach (Software sw in added)
         *          {
         *              if (sw.Id.Equals(Software_Info.deleted))
         *              {
         *                  added.Remove(sw);
         *                  break;
         *              }
         *          }
         *      }
         *      return;
         *  }
         *  if (Software_Info.updated != null)
         *  {
         *      foreach (Software sw in all)
         *      {
         *          if (sw.Id.Equals(Software_Info.updated))
         *          {
         *              found = true;
         *              all.Remove(sw);
         *              foreach (Software s in MainWindow.allSoftware)
         *              {
         *                  if (s.Id.Equals(sw.Id))
         *                  {
         *                      all.Add(s);
         *                      break;
         *                  }
         *              }
         *              break;
         *          }
         *      }
         *      if (!found)
         *      {
         *          foreach (Software sw in added)
         *          {
         *              if (sw.Id.Equals(Software_Info.updated))
         *              {
         *                  added.Remove(sw);
         *                  foreach (Software s in MainWindow.allSoftware)
         *                  {
         *                      if (s.Id.Equals(sw.Id))
         *                      {
         *                          added.Add(s);
         *                          break;
         *                      }
         *                  }
         *                  break;
         *              }
         *          }
         *      }
         *      return;
         *  }
         * }*/

        private void add_new_software(object sender, RoutedEventArgs e)
        {
            Add_Software ac = new Add_Software(os);

            search_all_tb.Text = "";
            ac.Closed         += new EventHandler((sender2, e2) => added_new(sender2, e2));
            ac.ShowDialog();
        }
        private void add_new_software(object sender, RoutedEventArgs e)
        {
            Add_Software asw = new Add_Software();

            asw.ShowDialog();
        }