Пример #1
0
        public void MailChoose(MyUserControl item)
        {
            String email = item.getEmail();
            if (email.Equals(""))
                return;
            else
            {
                factory.strSendTo = email;
                MailList.Visibility = Visibility.Collapsed;

                SendMail send = new SendMail();
                send.sendMail(factory.strSendTo, factory.strContent, factory.HasPicture);
                MailBox.Document.SetText(Windows.UI.Text.TextSetOptions.None, "");
                Message.ShowToast("邮件正在发送中....");
            }
        }
Пример #2
0
        public async void CreateMailList()
        {
            MailList.Items.Clear();
            MailList.Visibility = Visibility.Visible;
            List<string[]> storeList = new List<string[]>();
            string[] storeString = new string[3];

            try
            {
                StoreSetting storeSetting = new StoreSetting();
                Task<int> task = storeSetting.GetStoreListCount();
                int count = await task;
                if (count == 0)
                {
                    Message.ShowToast("通讯录为空,请设置!");
                    return;
                }

                storeList = storeSetting.getStoreList();
                for (int i = 0; i < count; i++)
                {
                    MyUserControl item = new MyUserControl(storeList[i][0], storeList[i][2]);
                    MailList.Items.Add(item);
                }
            }
            catch (Exception ex)
            {
                Message.ShowToast("通讯录为空,请设置!");
            }
        }