Example #1
0
 protected virtual void onTableResized(TableResizedEventArgs e)
 {
     if (TableResized != null)
     {
         TableResized(this, e);
     }
 }
Example #2
0
 public void Resize(int targetSize) //Zrobic resize do index * 2, zamiast resize'owac wielokrotnie np dla 1000 indexu
 {
     if (targetSize >= allocatedSize)
     {
         int newAllocatedSize            = targetSize * arrayExpandFactor;
         TableResizedEventArgs eventArgs = new TableResizedEventArgs(allocatedSize, newAllocatedSize);
         int[] newTable = new int[newAllocatedSize];
         table.CopyTo(newTable, 0);
         table         = newTable;
         allocatedSize = newAllocatedSize;
         onTableResized(eventArgs);
         for (int i = size; i < allocatedSize; i++)
         {
             table[i] = defaultValue;
         }
     }
 }
Example #3
0
 static void TableResized(object source, TableResizedEventArgs e)
 {
     Console.WriteLine(e.Description);
 }