/// <summary> /// Modify Event Tool Strip item /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void changeEventToolStripMenuItem_Click(object sender, EventArgs e) { if (listView3.SelectedItems.Count == 1) //If event selected { Class1.EventData edata = (Class1.EventData)listView3.SelectedItems[0].Tag; //Get the event data AddEvent eventUI = new AddEvent(ctx, AddEvent.MODE_EDIT); //Create new AddEvent Dialog eventUI.Show(); //Show the form eventUI.LoadEvent(edata); //Load the event data to the form } }
/// <summary> /// Add calendar event button /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void addEventToolStripMenuItem_Click(object sender, EventArgs e) { AddEvent eventUI = new AddEvent(ctx, AddEvent.MODE_ADD); //Create new AddEvent dialog eventUI.Show(); //Show the form }