/// <summary> /// Mensagem por Popup /// </summary> /// <param name="Texto">Mensagem a ser exibida</param> /// <param name="Icone">1-Informação, 2-Interrogação, 3-Exclamação, 4-Proibido</param> /// <returns></returns> public static bool PopupBox(string Texto, int Icone) { PopupBox _popupBox = new PopupBox(Texto, Icone); _popupBox.ShowDialog(); return(_popupBox.Result); }
private void cntxtMenu_AddSurvey(object sender, RoutedEventArgs e) { //UserSession.IsNews = false; if (dgSurvey.SelectedItem != null && UserSession.PilotId > 0) { mdiWinow.SetAdminSection("AddEditSurvey"); } else { PopupBox frmPopup = new PopupBox("Information", "Please Select a project first.", MessageBoxImage.Error); frmPopup.ShowDialog(); } }
private void cntxtMenu_ViewSurvey(object sender, RoutedEventArgs e) { try { if (dgSurvey.SelectedItem != null) { PilotSession.SurveyId = (dgSurvey.SelectedItem as SurveyModel).ID; mdiWinow.SetAdminSection("AddEditSurvey"); } else { PopupBox frmPopup = new PopupBox("Information", "Please Select a survey first.", MessageBoxImage.Error); frmPopup.ShowDialog(); } } catch { } }