Poniżej procedura która zapisuje listę kontrolek do pliku, przy dużej hydrze
private void ZapisPlik()
{
System.IO.StreamWriter file = new System.IO.StreamWriter("c:\\users\\bslowik\\test2.log", true);
try
{
/* Type type = Tabelem.GetType();
PropertyInfo[] pi = type.GetProperties();
foreach (PropertyInfo p in pi)
{
file.WriteLine(p.PropertyType.ToString() + " " + "Tabelem." + p.Name + "=" + p.GetValue(Tabelem, null));
}*/
foreach (ClaWindow t in base.GetWindow().Children)
{
file.WriteLine("Parent : "+t.Id.ToString()+ ", Name : "+t.Label);
}
}
catch (Exception e)
{
Runtime.WindowController.UnlockThread();
MessageBox.Show("Nie wybrano pozycji " + e.ToString());
Runtime.WindowController.LockThread();
}
file.Close();
}