/// <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); } }
public RatedEventsTab() { InitializeComponent(); richTextBox1.Dock = DockStyle.Fill; pictureBox1.Dock = DockStyle.Fill; string s = Properties.Settings.Default.RatedLocation; if (s.Length < 1) { s = GCGlobal.LastLocation.EncodedString; } ratedLocation = new GCLocation(); ratedLocation.EncodedString = s; s = Properties.Settings.Default.RatedStartDate; if (s.Length > 1) { ratedStartDate.EncodedString = s; } s = Properties.Settings.Default.RatedEndDate; if (s.Length > 1) { ratedEndDate.EncodedString = s; } InitTemplates(); s = Properties.Settings.Default.RatedConfiguration; SelectedConfiguration = GCConfigRatedManager.GetConfiguration(s); bEnchit = true; templateComboBox.SelectedIndex = templateComboBox.Items.IndexOf(SelectedConfiguration.Title); bEnchit = false; SetMode(Properties.Settings.Default.RatedEventsShowMode); }
private void onDeleteConfigTemplateYes(object sender, EventArgs e) { if (sender is AskDeleteObject) { AskDeleteObject d = sender as AskDeleteObject; GCConfigRatedManager.DeleteConfiguration(d.Tag as GCConfigRatedEvents); InitListConfigs(); } }