Advertisement
Morogn93

do cofniecia

Mar 4th, 2018
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.03 KB | None | 0 0
  1.  Mrowka[] listaMrowek;
  2.  
  3.         public Form1()
  4.         {
  5.             CreateObjects(20);
  6.             InitializeComponent();
  7.             Konosla();
  8.             Console.WriteLine(listaMrowek[0].imie);
  9.             Console.WriteLine(listaMrowek[0].ListaUmiejetnosci[1]);
  10.  
  11.         }
  12.  
  13.  
  14.         public void CreateObjects(int itemsAnts)
  15.         {
  16.             listaMrowek = new Mrowka[itemsAnts];
  17.             for (int i = 0; i<listaMrowek.Length; i++)
  18.             {
  19.                 listaMrowek[i] = new Mrowka(4);
  20.             }
  21.            
  22.         }
  23.        
  24.  
  25.         private void mrowkaComboBox_SelectedIndexChanged(object sender, EventArgs e)
  26.         {      
  27.  
  28.             // odwolanie sie do tablicy elementow typu mrowka
  29.         }
  30.        
  31.  
  32.         #region Konsola
  33.         public void Konosla()
  34.         {
  35.             AllocConsole();
  36.         }
  37.         [DllImport("kernel32.dll", SetLastError = true)]
  38.         [return: MarshalAs(UnmanagedType.Bool)]
  39.         static extern bool AllocConsole();
  40.         #endregion
  41.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement