Ejemplo n.º 1
0
        //constructor responsible for sending email
        public SendMessageWindow(MainWindow mainWindow, Manager mManager)
        {
            if (isSendMessageManagerInitialized == false)
            {
                messageManager = new SendMessageManager(this);
                isSendMessageManagerInitialized = true;
            }
            mWindow = mainWindow;
            manager = mManager;
            InitializeComponent();

            AddComboBoxElements();
        }
Ejemplo n.º 2
0
        //constructor resposnsible for showing email
        public SendMessageWindow(Mail mail, MainWindow mainWindow, Manager mManager, MailType mailType)
        {
            if (isSendMessageManagerInitialized == false)
            {
                messageManager = new SendMessageManager(this);
                isSendMessageManagerInitialized = true;
            }
            mWindow = mainWindow;
            manager = mManager;
            InitializeComponent();

            if (mailType.ToString() == "view")
            {
                messageManager.ViewMessage(mail, manager);
            }
            else if (mailType.ToString() == "reply")
            {
                messageManager.ReplyMessage(mail, manager, mWindow);
            }
            else if (mailType.ToString() == "replyToAll")
            {
                //if there were no other receivers than do just normal reply
                if (!mail.Sender.Contains(","))
                {
                    messageManager.ReplyMessage(mail, manager, mWindow);
                }
                else
                {
                    messageManager.ReplyToAllMessage(mail, manager, mWindow);
                }
            }
            else if (mailType.ToString() == "forward")
            {
                messageManager.ForwardMessage(mail, mWindow, manager);
            }
        }