Example #1
0
        void phoneBookSub_DropDownItemClicked(object sender, ToolStripItemClickedEventArgs e)
        {
            ContactToolStripItem item =
                (ContactToolStripItem)e.ClickedItem;

            if (item != null)
            {
                if (ClickAction != null)
                {
                    ClickAction(item.Person);
                }
            }
        }
Example #2
0
        void ContactsMenu_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
        {
            if (e.ClickedItem == null)
            {
                return;
            }
            if (!(e.ClickedItem is ContactToolStripItem))
            {
                return;
            }

            ContactToolStripItem item =
                (ContactToolStripItem)e.ClickedItem;

            if (item != null)
            {
                if (ClickAction != null)
                {
                    ClickAction(item.Person);
                }
            }
        }