private void button_Click(object sender, RoutedEventArgs e) { int len=0, wid=0; try { len = int.Parse(((TextBox)Buttons.Children[0]).Text); wid = int.Parse(((TextBox)Buttons.Children[1]).Text); coordinate lb = new coordinate(10, 10); coordinate tr = new coordinate(10 + len, 10 + wid); Room.Resize(lb, tr); drawroom(); } catch { MessageBox.Show("Something goes wrong"); } }
public void Resize(coordinate leftbottom,coordinate topright) { coord[0] = leftbottom; coord[1] = topright; }