コード例 #1
0
        void RefreshMails()
        {
            try
            {
                string[][]          inboxData     = proxy.GetInboxMessages();
                List <InboxMsgMeta> inboxMessages = new List <InboxMsgMeta>();
                for (int i = 0; i < inboxData.Length; i++)
                {
                    InboxMsgMeta msg = new InboxMsgMeta(inboxData[i][5] == "1" ? true : false, inboxData[i][0], inboxData[i][2], inboxData[i][3], inboxData[i][4]);
                    inboxMessages.Add(msg);
                }
                dg_inbox.ItemsSource = inboxMessages;

                string[][]         sentData     = proxy.GetSentMessages();
                List <SentMsgMeta> sentMessages = new List <SentMsgMeta>();
                for (int i = 0; i < sentData.Length; i++)
                {
                    SentMsgMeta msg = new SentMsgMeta(sentData[i][5] == "1" ? true : false, sentData[i][1], sentData[i][2], sentData[i][3], sentData[i][4]);
                    sentMessages.Add(msg);
                }
                dg_sent.ItemsSource = sentMessages;
            }
            catch (Exception x)
            {
                MessageBox.Show("Server is not available! - " + x.Message);
            }
        }
コード例 #2
0
 void LoadSearchData()
 {
     try
     {
         string[][]          msgData  = proxy.Filter(tb_srchKey.Text);
         List <InboxMsgMeta> messages = new List <InboxMsgMeta>();
         for (int i = 0; i < msgData.Length; i++)
         {
             InboxMsgMeta msg = new InboxMsgMeta(msgData[i][5] == "1" ? true : false, msgData[i][0], msgData[i][2], msgData[i][3], msgData[i][4]);
             messages.Add(msg);
         }
         dg_search.ItemsSource = messages;
     }
     catch (Exception x)
     {
         MessageBox.Show("Server is not available! - " + x.Message);
     }
 }