public MainWindow()
        {
            InitializeComponent();
            this.conseils = "";
            this.listViewSortAdorner = null;
            this.listViewSortCol = null;
            Engine.getEngine().registerObserver(this);
            Society.getSociety("Nom", "FR", "EUR");
            /*Assistant ast=new Assistant();
            ast.ShowDialog();*/

            worker.DoWork += worker_DoWork;
            worker.RunWorkerCompleted += worker_RunWorkerCompleted;
            worker.ProgressChanged += worker_ProgressChanged;
            worker.WorkerReportsProgress = true;
        }
 private void SpreadHeader_Click(object sender, RoutedEventArgs e)
 {
     GridViewColumnHeader column = (sender as GridViewColumnHeader);
     string sortBy = column.Tag.ToString();
     if (listViewSortCol != null)
     {
         AdornerLayer.GetAdornerLayer(listViewSortCol).Remove(listViewSortAdorner);
         spreadmodule.Items.SortDescriptions.Clear();
     }
     ListSortDirection newDir = ListSortDirection.Ascending;
     if (listViewSortCol == column && listViewSortAdorner.Direction == newDir)
         newDir = ListSortDirection.Descending;
     listViewSortCol = column;
     listViewSortAdorner = new SortAdorner(listViewSortCol, newDir);
     AdornerLayer.GetAdornerLayer(listViewSortCol).Add(listViewSortAdorner);
     spreadmodule.Items.SortDescriptions.Add(new SortDescription(sortBy, newDir));
 }