예제 #1
0
        /// <summary>
        /// Exibe MessageBox
        /// </summary>
        /// <param name="message">passa messagem por parametro</param>
        private void AsyncMessageBox(string message, bool retornook)
        {
            BlackBox     = Visibility.Collapsed;
            StarProgress = false;
            TextMsgBox   = message;
            ShowMsgBox   = Visibility.Visible;
            System.Media.SystemSounds.Exclamation.Play();

            Task.Factory.StartNew(() => Freezetime(10)).ContinueWith(taskmsg =>
            {
                if (taskmsg.IsCompleted)
                {
                    ShowMsgBox = Visibility.Collapsed;
                    if (retornook == true)
                    {
                        Atendimento.Clear();
                        PF.Clear();
                        PJ.Clear();
                        Protocolo            = NProtocolo();
                        Atendimento.Operador = AccountOn.Identificador;
                        AreaTransferencia.Limpar();
                        ns.GoBack();
                    }
                }
            }, System.Threading.CancellationToken.None,
                                                                     TaskContinuationOptions.None,
                                                                     TaskScheduler.FromCurrentSynchronizationContext());
        }
예제 #2
0
 private void ExecuteCommandCancelCliente(object obj)
 {
     if (MessageBox.Show(string.Format("Cancelar Atendimento do Cliente  {0}?", Atendimento.Cliente.NomeRazao), "Sim.Alerta!", MessageBoxButton.YesNo, MessageBoxImage.Information) == MessageBoxResult.Yes)
     {
         Atendimento.Clear();
         PJ.Clear();
         PF.Clear();
         Atendimento.Operador = AccountOn.Identificador;
         AreaTransferencia.Limpar();
         Corpo     = Visibility.Collapsed;
         Cabecalho = Visibility.Visible;
     }
 }
예제 #3
0
 private void ExecuteCommandCancel(object obj)
 {
     Atendimento.Clear();
     PJ.Clear();
     PF.Clear();
     Atendimento.Operador = AccountOn.Identificador;
     AreaTransferencia.Limpar();
     Corpo     = Visibility.Collapsed;
     Cabecalho = Visibility.Visible;
     if (ns.CanGoBack)
     {
         ns.GoBack();
     }
 }