private void BackBtn_OnClicked(object sender, EventArgs e) { Back?.Invoke(this, EventArgs.Empty); PropertyInfoContainer.IsVisible = false; PropertyNameLbl.Text = string.Empty; ControlNameLbl.IsVisible = true; }
internal WizardEventArgs FireBackEvent(int currentTabIndex) { var ev = new WizardEventArgs(currentTabIndex, Direction.Backward); Back?.Invoke(this, ev); return(ev); }
/// <summary> /// Raises event 'Back' /// </summary> protected virtual void OnBack() { if (Back != null) { Back.Invoke(this, System.EventArgs.Empty); } }
// TODO: Exercise 4: Task 4a: Enable a teacher to remove a student from a class private void Remove_Click(object sender, RoutedEventArgs e) { if (SessionContext.UserRole == Role.Teacher) { try { Student selectedStudent = SessionContext.CurrentStudent; if (MessageBox .Show($"Remove {selectedStudent.FirstName} {selectedStudent.LastName} from class?" , "Confirm remove." , MessageBoxButton.YesNo) .Equals(MessageBoxResult.Yes)) { SessionContext.CurrentTeacher.RemoveFromClass(selectedStudent); Back?.Invoke(sender, e); // Going back to the previous page. } } catch { MessageBox.Show("Some bad stuff happened, closing application", "Exception caught"); throw; } } }
private void Button_KeyDown_Back(object sender, KeyEventArgs e) { if (e.Key == Key.Left) { Back?.Invoke(this, new RoutedEventArgs()); } }
private void Back_Click(object sender, RoutedEventArgs e) { if (SessionContext.UserRole != Role.Teacher) { return; } Back?.Invoke(sender, e); }
public NextBack() { InitializeComponent(); OKButton.Clicked += (object sender, EventArgs e) => { Sound.OK(); OK?.Invoke(this, e); }; NextButton.Clicked += (object sender, EventArgs e) => { Sound.OK(); Next?.Invoke(this, e); }; BackButton.Clicked += (object sender, EventArgs e) => { Sound.NG(); Back?.Invoke(this, e); }; OKButton.Command = new Command(() => { Sound.OK(); ClickButton?.Execute(BUTTON_TYPE.OK); }); NextButton.Command = new Command(() => { Sound.OK(); ClickButton?.Execute(BUTTON_TYPE.NEXT); }); BackButton.Command = new Command(() => { Sound.OK(); ClickButton?.Execute(BUTTON_TYPE.BACK); }); }
private void BtnPrev_Click(object sender, EventArgs e) { if (QuestionNumber > 0) { PreviousQuestion?.Invoke(this, rbGroup.CheckedRadioButtonId); } else { Back?.Invoke(this, EventArgs.Empty); } }
private void Button_Click(object sender, RoutedEventArgs e) { if (this.Check()) { this.FülleFelder(); us.Erstellen(); MessageBox.Show("Success"); Global.Context.SaveChanges(); Back.Invoke(this, EventArgs.Empty); clear(); } }
/// <summary> /// 关闭当前窗口事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void TCloseButton_Click(object sender, RoutedEventArgs e) { //System.Windows.Application.Current.Host.Content.IsFullScreen = System.Windows.Application.Current.Host.Content.IsFullScreen ? false : true; ICleanup content = PanelContent as ICleanup; if (content != null) { content.Cleanup(); PanelContent = null; } if (Back != null) { Back.Invoke(sender, e); } }
//Safe Button private void Button_Click(object sender, RoutedEventArgs e) { if (Check()) { Data.Userstory us = Data.Userstory.LesenID(id); us.Title = Title.Text; us.Text = Story.Text; us.DefinitionOfDone = DOD.Text; us.Phase = phasenBox.Text; us.CreatedAt = Date.SelectedDate ?? DateTime.Today; us.ShowInBacklog = Show.IsChecked ?? false; us.StoryPoints = Convert.ToInt32(StoryPoints.Text); us.Aktualisieren(); Back.Invoke(this, EventArgs.Empty); } }
public void ShowBack(CustomNavigationPage customNavigationPage) { try { this.Navigation.InsertPageBefore(new Page(), this); customNavigationPage.PopView = (page) => { if (page == this) { Back.Invoke(); return(true); } return(false); }; } catch (Exception e) { ExceptionHandler.Catch(e); } }
private void HandleInput(IMenuItemInfo[] options, ref int selected) { var key = Console.ReadKey(true).Key; switch (key) { case ConsoleKey.UpArrow: if (selected <= 0) { selected = options.GetUpperBound(0); } else { selected--; } break; case ConsoleKey.DownArrow: if (selected >= options.GetUpperBound(0)) { selected = 0; } else { selected++; } break; case ConsoleKey.Backspace: case ConsoleKey.Escape: Back?.Invoke(this, EventArgs.Empty); selected = -1; break; case ConsoleKey.Enter: Chosen?.Invoke(this, new MenuItemInfoEventArgs(options[selected])); selected = -1; break; } }
private void Remove_Click(object sender, RoutedEventArgs e) { if (SessionContext.UserRole != Role.Teacher) { return; } try { var message = $"Remove {SessionContext.CurrentStudent.FirstName} {SessionContext.CurrentStudent.LastName}"; var reply = MessageBox.Show(message, "Confirm", MessageBoxButton.YesNo, MessageBoxImage.Question); if (reply == MessageBoxResult.Yes) { SessionContext.CurrentTeacher.RemoveFromClass(SessionContext.CurrentStudent); Back?.Invoke(sender, e); } } catch (Exception ex) { MessageBox.Show(ex.Message, "Error removing student from class", MessageBoxButton.OK, MessageBoxImage.Error); } }
//Abbrechen Button private void Button_Click_2(object sender, RoutedEventArgs e) { Back.Invoke(this, EventArgs.Empty); }
//Delete Button private void Button_Click_1(object sender, RoutedEventArgs e) { Data.Userstory.LesenID(id).Loeschen(); Back.Invoke(this, EventArgs.Empty); }
private void btn_Back_Click(object o, EventArgs e) { Back?.Invoke(); }
protected void OnBack(BeforeNavigateEventArgs args) { Back?.Invoke(this, args); }
protected virtual void OnBack() { Back?.Invoke(this, EventArgs.Empty); }
private void OnButtonAddProductsClick(object o, EventArgs e) { Back?.Invoke(); }
private void OnButtonCancelDeliveryClick(object o, EventArgs e) { Back?.Invoke(); }
private void OnButtonBackClick(object o, EventArgs e) { Back?.Invoke(); }
private void OnBackButtonClick(object Sender, RoutedEventArgs E) { Back?.Invoke(this, EventArgs.Empty); }
private void exitFullscreenButton_Click(object sender, EventArgs e) { Back?.Invoke(); }
private void BackwardButton_Click(object sender, RoutedEventArgs e) => Back?.Invoke(this, new RoutedEventArgs());
private void IconButtonRound_Click(object sender, RoutedEventArgs e) { Back?.Invoke(sender, e); }
private void OnButtonExitClick(object sender, EventArgs e) { Back?.Invoke(); }
private void BtnMenu_Click(object sender, EventArgs e) { Back?.Invoke(this, EventArgs.Empty); }