Beispiel #1
0
        /// <summary>
        /// Callback from new title dialog
        /// this is received in two cases:
        /// - creation of the new configuration
        /// - cloning of the existing configuration
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void OnNewConfiguration(object sender, EventArgs e)
        {
            if (sender is RatedEventNewTitle)
            {
                RatedEventNewTitle  d  = sender as RatedEventNewTitle;
                GCConfigRatedEvents ge = GCConfigRatedManager.CreateConfiguration(d.TextValue);
                if (d.ExistingConfiguration != null)
                {
                    ge.CopyFrom(d.ExistingConfiguration);
                }
                if (OnConfListChanged != null)
                {
                    OnConfListChanged(this, e);
                }

                RatedEventDetails d1 = new RatedEventDetails();
                if (OnConfListChanged != null)
                {
                    d1.OnConfigurationChanged += new TBButtonPressed(OnConfListChanged);
                }
                d1.setConfig(ge);
                RatedEventDetailsController d1c = new RatedEventDetailsController(d1);
                d1c.ShowInContainer(Controller.ViewContainer, GVControlAlign.Fill);
            }
        }
Beispiel #2
0
 private void toolStripButtonEdit_Click(object sender, EventArgs e)
 {
     if (SelectedTemplateConfig != null)
     {
         RatedEventDetails d1 = new RatedEventDetails();
         if (OnConfListChanged != null)
         {
             d1.OnConfigurationChanged += new TBButtonPressed(OnConfListChanged);
         }
         d1.setConfig(SelectedTemplateConfig);
         RatedEventDetailsController d1c = new RatedEventDetailsController(d1);
         d1c.ShowInContainer(Controller.ViewContainer, GVControlAlign.Fill);
     }
 }