Пример #1
0
        static void Main(string[] args)
        {
            SmtpClient        smtp        = new SmtpClient("smtp.gmail.com", 587);
            NetworkCredential credentials = new NetworkCredential("Smtptest505", "Testpassword505");

            smtp.Credentials = credentials;
            smtp.EnableSsl   = true;

            ApplicationMaster app = new ApplicationMaster(smtp, new MarketingFirm(SweepstakesManagerFactory.CreateSweepstakesManager(UI.PromptForSweepstakesManager())));

            app.ManageAllSweepstakes();
        }
Пример #2
0
        public MarketingFirm()
        {
            bool validInput;

            do
            {
                Console.WriteLine("Will you use a stack or a queue?");
                string input = Console.ReadLine();
                try
                {
                    manager    = SweepstakesManagerFactory.GetManager(input);
                    validInput = true;
                }
                catch (Exception e)
                {
                    Console.WriteLine(e.Message);
                    validInput = false;
                }
            }while (validInput == false);
        }
Пример #3
0
 public void CreateMarketingFirm()
 {
     marketingFirm = new MarketingFirm(SweepstakesManagerFactory.CreateSweepstakesManager());
 }
Пример #4
0
        public MarketingFirm CreateMarketingFirmWithManager()
        {
            MarketingFirm marketingFirm = new MarketingFirm(SweepstakesManagerFactory.CreateSweepstakesManager(UserInterface.DecideManagerType()));

            return(marketingFirm);
        }