Exemplo n.º 1
0
 /// <summary>
 /// Cette méthode classe par ordre croissant de date de modification
 /// une liste contenant des objet de types Kernel.Domain.AutomaticSourcingSheet;
 /// </summary>
 /// <param name="list"></param>
 public static void BubbleSortSheetList(this IList list)
 {
     for (int i = list.Count - 1; i >= 0; i--)
     {
         for (int j = 1; j <= i; j++)
         {
             Kernel.Domain.AutomaticSourcingSheet o1 = list[j - 1] as Kernel.Domain.AutomaticSourcingSheet;
             Kernel.Domain.AutomaticSourcingSheet o2 = list[j] as Kernel.Domain.AutomaticSourcingSheet;
             if ((o1.position - o2.position) > 0)
             {
                 list.Remove(o1);
                 list.Insert(j, o1);
             }
         }
     }
 }
Exemplo n.º 2
0
 private void RangeTextBox_KeyUp(object sender, KeyEventArgs args)
 {
     if (args.Key == Key.Enter)
     {
         if (throwChange && OnSelectedRangeChange != null)
         {
             Kernel.Ui.Office.Range range         = new Kernel.Ui.Office.Range();
             AutomaticSourcingSheet sourcingSheet = new Kernel.Domain.AutomaticSourcingSheet();
             range = sourcingSheet.buildRange(RangeTextBox.Text.TrimEnd());
             if (range != null && range.CellCount > 0)
             {
                 OnSelectedRangeChange(range);
             }
         }
     }
 }