示例#1
0
        private void inboxDataGridView_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex == -1)
            {
                return;
            }
            Debug.WriteLine("Current Row: " + e.RowIndex.ToString());
            Debug.WriteLine("Mail-ID: " + inboxDataGridView.Rows[e.RowIndex].Cells["Mail-ID"].FormattedValue.ToString());
            string mail_id = inboxDataGridView.Rows[e.RowIndex].Cells["Mail-ID"].FormattedValue.ToString();

            MailContent = new Dictionary <string, string>();
            dbHandler   = new DBHandler();

            MailContent    = dbHandler.GetFullMailFromMailID(mail_id);
            ShowMailWindow = new ShowMail(MailContent["recipient"], MailContent["sender"], MailContent["subject"], MailContent["message"]);
            ShowMailWindow.Show();
        }
示例#2
0
        private void inboxDataGridView_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex == -1)
            {
                return;
            }
            Debug.WriteLine("Current Row: " + e.RowIndex.ToString());
            Debug.WriteLine("Mail-ID: " + inboxDataGridView.Rows[e.RowIndex].Cells["Mail-ID"].FormattedValue.ToString());
            string mail_id = inboxDataGridView.Rows[e.RowIndex].Cells["Mail-ID"].FormattedValue.ToString();

            MailContent = new Dictionary<string,string>();
            dbHandler = new DBHandler();

            MailContent = dbHandler.GetFullMailFromMailID(mail_id);
            ShowMailWindow = new ShowMail(MailContent["recipient"],MailContent["sender"], MailContent["subject"],MailContent["message"]);
            ShowMailWindow.Show();
        }
示例#3
0
        /* Events to execute when a cell in "indox" is doubleclicked */
        private void inboxDataGridView_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            /* If statment to check to see if you did not click on a vaild cell */
            if (e.RowIndex == -1)
            {
                return;
            }
            Debug.WriteLine("Current Row: " + e.RowIndex.ToString());
            Debug.WriteLine("Mail-ID: " + inboxDataGridView.Rows[e.RowIndex].Cells["Mail-ID"].FormattedValue.ToString());

            /* Finds the hidden MailID */
            string mail_id = inboxDataGridView.Rows[e.RowIndex].Cells["Mail-ID"].FormattedValue.ToString();

            /* Create a new Dictionary and add the full mail based on the MailID */
            MailContent = new Dictionary <string, string>();
            MailContent = dbHandler.GetFullMailFromMailID(mail_id);

            /* create a new instance of ShowMail and send the information to be shown */
            ShowMailWindow = new ShowMail(MailContent["recipient"], MailContent["sender"], MailContent["subject"], MailContent["message"]);
            ShowMailWindow.Show();
        }