private async void LoginButton_Click(object sender, RoutedEventArgs e) { DialogPopupWindow waitingDialog = new DialogPopupWindow(); waitingDialog.DataContext = new DialogWindowViewModel() { CanMaximized = false, CanMinimized = false, MessageText = "Vui lòng đợi", DialogType = DialogWindowType.WaitingMessage, }; // For the weird behave of PasswordBox, its value cannot be used in binding with // Text property of normal textbox. Therefore, this is a must-have function to update // the password in view model last time before login process viewModel.UpdateTypingPassword(PasswordBox.Password); bool?result = await viewModel.LoginAsync(waitingDialog); if (result != null && result == true) { InitializeHomepageWindow(); this.Hide(); } }
void ContextCallBack(object obj) { switch (obj.ToString()) { case "0": DialogPopupWindow.InitDialogPopup(); break; case "1": CS_DialogUtils.LoadGraph(); break; case "2": CS_DialogUtils.UnloadGraph(); break; case "3": CS_DialogUtils.CreateDialog(currentGraph, mousePos); CS_DialogUtils.ReplaceDialog(currentGraph); break; case "5": CS_DialogUtils.DeleteDialog(deleteNoteID, currentGraph); CS_DialogUtils.ReplaceDialog(currentGraph); break; default: break; } }
private void BtnDeleteProduct_Click(object sender, RoutedEventArgs e) { DialogPopupWindow notifyDeleteWnd = new DialogPopupWindow(); this.btnDeleteProduct.CommandParameter = notifyDeleteWnd; }
private void BtnDeleteProvider_Click(object sender, RoutedEventArgs e) { DialogPopupWindow deleteNotifyWnd = new DialogPopupWindow(); btnDeleteProvider.CommandParameter = deleteNotifyWnd; }
public static void InitDialogPopup() { currentPopupWindow = GetWindow <DialogPopupWindow>(); currentPopupWindow.titleContent.text = "Create Dialog Database"; }
private void DeleteCustomerHandler(object sender, RoutedEventArgs e) { DialogPopupWindow notifyWnd = new DialogPopupWindow(); btnDelete.CommandParameter = notifyWnd; }
private void BtnLoadBaoCao_Click(object sender, RoutedEventArgs e) { DialogPopupWindow loadingWindow = new DialogPopupWindow(); btnLoadBaoCao.CommandParameter = loadingWindow; }