Beispiel #1
0
        private void frmMain_Load(object sender, EventArgs e)
        {
            try
            {
                pastel          = new Pastel();
                pastel.Message += new Pastel.MessageHandler(pastel_Message);
                pastel.InitialisePastel();
                String msg;
                pastel_Message(this, new PastelArgs("Mail Receiver"));
                receiver = new MailReceiver(out msg);
                pastel_Message(this, new PastelArgs("SMS Poll"));
                smsPoll = new SMSPoll();
                smsPoll.NewMessageEvent += new EventHandler <MessageArgs>(smsPoll_NewMessageEvent);
                smsPoll.InitializePolling();
                pastel_Message(this, new PastelArgs("Statement Runner"));
                statementRunner          = new Statement();
                statementRunner.Message += new Statement.MessageHandler(statementRunner_Message);

                pastel_Message(this, new PastelArgs("Purger"));
                Purger purger = new Purger();
            }
            catch (Exception ex)
            {
                pastel_Message(this, new PastelArgs("Startup Error: " + ex.Message));
            }

            pastel_Message(this, new PastelArgs("Startup Completed"));
        }
Beispiel #2
0
        private void offAdminPurgeToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Purger purger = new Purger();

            purger.TransferFiles();
            MessageBox.Show("Complete");
        }