public void floorchange()
{
switch (current_direction)
{
case Defaults.Direction.Upward: floor++; break;
case Defaults.Direction.Downward: floor--; break;
}
button_close_door.Enabled = false;
button_open_door.Enabled = false;
if ((floor == -Defaults.Basements && current_direction == Defaults.Direction.Downward) ||
(floor == (Defaults.Floors - Defaults.Basements - 1) && current_direction == Defaults.Direction.Upward)) //ganz oben oder ganz unten --> Richtungswechsel
{
switchDirection();
}
pictureBox_direction.Visible = true;
}