private void UserControl_MouseDown(object sender, MouseButtonEventArgs e) { if (Name.Contains("Floor")) { ButtonColorUI(); Evt_Y2.Instance(FloorText + "FloorClick").Invoke(_bChoiceState, Convert.ToInt32(tblFloor.Text)); } }
private void InitFloorButton() { lblRepairing.Visibility = Visibility.Hidden; for (int i = controller.model.AllFloorCount; i > 0; i--) { ucFloorButton cUcFloorButton = new ucFloorButton(i) { Name = "Floor" + i.ToString(), Width = 12, Margin = new Thickness(1, 2, 1, 2), }; Evt_Y2.Instance(i.ToString() + "FloorClick").Event += (bChoiceState, iFloor) => { controller.FloorReserve(bChoiceState, iFloor); }; wrpFloorButtons.Children.Add(cUcFloorButton); } }