コード例 #1
0
        private void DeleteRoomButton_Click(object sender, RoutedEventArgs e)
        {
            if (!deleteButton)
            {
                if (moveButton)
                {
                    moveButton = false;
                    MoveRoomButton.ClearValue(Button.BackgroundProperty);
                }
                deleteButton = true;
                DeleteRoomButton.Background = new SolidColorBrush(Color.FromArgb(255, 57, 255, 20));
            }

            else
            {
                deleteButton = false;
                DeleteRoomButton.ClearValue(Button.BackgroundProperty);
            }
        }
コード例 #2
0
        private void BackMenuButton_Click(object sender, RoutedEventArgs e)
        {
            // Changes to Menu Grid Button Panel
            this.Main.NavigationService.Navigate(this.Parent);
            RoomEditor.Visibility         = Visibility.Hidden;
            TransactionsButton.Visibility = Visibility.Hidden;
            MenuButtons.Visibility        = Visibility.Visible;

            EditRoomButton.Content = "Edit Rooms";
            EditRoomButton.Padding = new Thickness(2);
            isEdit = false;
            AddRoomButton.IsEnabled    = false;
            MoveRoomButton.IsEnabled   = false;
            DeleteRoomButton.IsEnabled = false;

            moveButton = false;
            MoveRoomButton.ClearValue(Button.BackgroundProperty);
            deleteButton = false;
            DeleteRoomButton.ClearValue(Button.BackgroundProperty);
        }