Beispiel #1
0
        private AnswerScreen on_click()
        {
            File.WriteAllText(@"inner_temp\question.dx", string.Empty);
            File.WriteAllText(@"inner_temp\response.dx", string.Empty);
            fl.set_text(question.Text.ToString(), @"inner_temp\question.dx");

            process_exec ps = new process_exec(@"Python\python.exe", @"scripts\PySpark.py");

            ps.process();

            return(new AnswerScreen());
        }
        private void send_q_Click(object sender, EventArgs e)
        {
            string user    = username.Text;
            string pass    = passwrd.Text;
            string To      = to.Text;
            string Message = message_text.Text;

            File.WriteAllText(@"mail_data\username.edxf", string.Empty);
            File.WriteAllText(@"mail_data\passwrd.edxf", string.Empty);
            File.WriteAllText(@"mail_data\to_mail.edxf", string.Empty);
            File.WriteAllText(@"mail_data\message.edxf", string.Empty);
            File.WriteAllText(@"mail_data\response.dx", string.Empty);



            if (user != "" && pass != "" && Message != "")
            {
                fl.set_text(user, @"mail_data\username.edxf");
                fl.set_text(pass, @"mail_data\passwrd.edxf");
                fl.set_text(To, @"mail_data\to_mail.edxf");
                fl.set_text(Message, @"mail_data\message.edxf");
                process_exec ps = new process_exec(@"Python\python.exe", @"scripts\SendMail.py");
                ps.process();
            }
            else
            {
                MessageBox.Show("Please, fill all the fields", "", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
            string result = fl.get_text(@"mail_data\response.dx");

            if (result == "success")
            {
                MessageBox.Show("Message sent successfully", "Success (:", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else if (result == "error")
            {
                MessageBox.Show("Something went wrong, Please try again later.", "Sorry x_x", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Beispiel #3
0
        public static void process()
        {
            process_exec ps = new process_exec(@"Python\python.exe", @"scripts\speak.py");

            ps.process();
        }