コード例 #1
0
        public static void Main()
        {
            ChatbotController cb   = new ChatbotController();
            ChatbotView       view = new ChatbotView(cb);

            view.ShowDialog();
        }
コード例 #2
0
 // Metodo que permite iniciar la ventana de SavloLogDialog cuando el log existe
 // Entrada : ChatbotController cbot, String con la respuesta de EndDialog para la comparacion, Boton SaveDialog
 // Salida : Vacia
 public void LockSaveDialog(ChatbotController cbot, string response, Button saveButton)
 {
     if (response.Equals("AVISO : Debe iniciar una conversacion con BeginDialog y un seed (0 o 1).\r\n"))
     {
         saveButton.Enabled = false;
     }
     else
     {
         saveButton.Enabled = true;
     }
 }
コード例 #3
0
 // Metodo que dado un objeto ChatbotController permite volver a abrir la ventana de chatbot.
 // Entrada : Objeto ChatbotController
 // Salida : Vacia.
 public void BackToChatbotView(ChatbotController cbot, TextBox Warning)
 {
     chatbotView = new ChatbotView(cbot);
     if (Warning.Text.Equals("AVISO : El rate se ha añadido satisfactoriamente."))
     {
         Warning.Text = "AVISO : Cerrando...";
         Application.DoEvents();
         Thread.Sleep(2500);
         rateView.Hide();
     }
     else
     {
         Warning.Text = "AVISO : Ingrese un valor nuevamente.";
         Application.DoEvents();
         Thread.Sleep(2500);
     }
 }
コード例 #4
0
        // Metodos

        // Metodo que dado un objeto ChatbotController permite abrir la ventana de rate.
        // Entrada : Objeto ChatbotController
        // Salida : Vacia.
        public void openRateView(ChatbotController cbot, string aux, TextBox chat)
        {
            if (aux.Equals("AVISO : Debe iniciar una conversacion con BeginDialog y un seed (0 o 1).\r\n"))
            {
            }
            else
            {
                Application.DoEvents();
                Thread.Sleep(2500);
                chat.Text += "AVISO : Abriendo ventada de Rate...\r\n";
                Application.DoEvents();
                Thread.Sleep(2500);
                chatbot  = cbot;
                rateView = new RateView(this, cbot);
                rateView.ShowDialog();
            }
        }