Example #1
0
        private void EventDGV_DoubleClick(object sender, EventArgs e)
        {
            // get the subject string
            string subject = EventDGV.SelectedRows[0].Cells[1].Value.ToString();

            // search for the currentuser's event with that subject
            var match = CurrentUser.Events.Where(ev => ev.Subject == subject).FirstOrDefault();

            // there was no match found
            if (match == null)
            {
                return;
            }

            ViewerForm v = new ViewerForm(this, match);

            v.Show();
        }
Example #2
0
        private void WeekDGV_DoubleClick(object sender, EventArgs e)
        {
            // the time of day was double clicked or there is nothing in the cell
            if (WeekDGV.SelectedCells[0].ColumnIndex == 0 || WeekDGV.SelectedCells[0].Value == null)
            {
                return;
            }

            // get the subject string
            string subject = WeekDGV.SelectedCells[0].Value.ToString();

            // search for the currentuser's event with that subject
            var match = CurrentUser.Events.Where(ev => ev.Subject == subject).FirstOrDefault();

            // there was no match found
            if (match == null)
            {
                return;
            }

            ViewerForm v = new ViewerForm(this, match);

            v.Show();
        }