Beispiel #1
0
        /// <summary>
        /// User interface handler for NEW related event
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void buttonNew_Click(object sender, EventArgs e)
        {
            EventRelatedDetails           d  = new EventRelatedDetails();
            EventRelatedDetailsController dc = new EventRelatedDetailsController(d);

            dc.ViewContainer = Controller.ViewContainer;
            d.setEvent(null);
            d.setParentEvent(EventObject);
            d.OnEventDetailChanged += new TBButtonPressed(onRelatedEventChanged);

            if (ViewContainer != null)
            {
                ViewContainer.AddControl(dc, GVControlAlign.Fill);
            }
        }
Beispiel #2
0
        /// <summary>
        /// User interface handler for EDIT related event
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void buttonEdit_Click(object sender, EventArgs e)
        {
            if (listBox1.SelectedIndex >= 0 &&
                listBox1.SelectedIndex < listBox1.Items.Count)
            {
                GCListBoxEntry lbe = listBox1.Items[listBox1.SelectedIndex] as GCListBoxEntry;
                if (lbe != null && lbe.Tag != null && lbe.Tag is GCFestivalRelated)
                {
                    GCFestivalRelated             r  = lbe.Tag as GCFestivalRelated;
                    EventRelatedDetails           d  = new EventRelatedDetails();
                    EventRelatedDetailsController dc = new EventRelatedDetailsController(d);

                    dc.ViewContainer = Controller.ViewContainer;
                    d.setEvent(r);
                    d.setParentEvent(EventObject);
                    d.OnEventDetailChanged += new TBButtonPressed(onRelatedEventChanged);

                    if (ViewContainer != null)
                    {
                        ViewContainer.AddControl(dc, GVControlAlign.Fill);
                    }
                }
            }
        }
Beispiel #3
0
 public EventRelatedDetailsController(EventRelatedDetails v)
 {
     View         = v;
     v.Controller = this;
 }