Exemple #1
0
        /// <summary>
        /// Edit event
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button2_Click(object sender, EventArgs e)
        {
            GCListBoxEntry item = GetSelectedItem();

            if (item != null && item.Tag != null)
            {
                GCFestivalBase b = item.Tag as GCFestivalBase;
                EventDetails   d = new EventDetails();
                d.EventObject      = b;
                d.OnButtonOK      += new TBButtonPressed(onNewEventDoneOK);
                d.OnButtonCancel  += new TBButtonPressed(onNewEventDoneCancel);
                d.OnButtonRelated += new TBButtonPressed(onNewEventDoneRelated);
                EventDetailsController dc = new EventDetailsController(d);
                dc.ShowInContainer(Controller.ViewContainer, GVControlAlign.Fill);
            }
        }
Exemple #2
0
        /// <summary>
        /// OK callback from New Event dialog
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void onNewEventOK(object sender, EventArgs e)
        {
            if (sender is AskEventType)
            {
                AskEventType aet = sender as AskEventType;

                GCFestivalBase b = aet.SelectedObject;
                b.Text = "(Untitled)";
                if (b != null)
                {
                    EventDetails           d  = new EventDetails();
                    EventDetailsController dc = new EventDetailsController(d);
                    dc.ViewContainer   = Controller.ViewContainer;
                    d.EventObject      = b;
                    d.OnButtonOK      += new TBButtonPressed(onNewEventDoneOK);
                    d.OnButtonCancel  += new TBButtonPressed(onNewEventDoneCancel);
                    d.OnButtonRelated += new TBButtonPressed(onNewEventDoneRelated);

                    dc.ShowInContainer(Controller.ViewContainer, GVControlAlign.Fill);
                }
            }
        }