Exemplo n.º 1
0
 private void btnChangeProperties_Click(object sender, EventArgs e)
 {
     if (btnChangeProperties.Text == Localizator.Dictionary.GetString("EDIT_PARAMS"))
     {
         txtCompetitionName.ReadOnly = false;
         cbxChangesRating.Enabled    = FCompetition.Info.CompetitionType.CanChangeRating;
         if (pnlCompetitionParams != null)
         {
             pnlCompetitionParams.ReadOnly = false;
         }
         btnChangeProperties.Text = Localizator.Dictionary.GetString("APPLY_PARAMS");
     }
     else
     {
         cbxChangesRating.Enabled    = false;
         txtCompetitionName.ReadOnly = true;
         if (pnlCompetitionParams != null)
         {
             pnlCompetitionParams.ReadOnly = true;
             pnlCompetitionParams.WriteParameters();
         }
         FCompetition.Info.ChangesRating = cbxChangesRating.Checked && FCompetition.Info.CompetitionType.CanChangeRating;
         FCompetition.Info.Name          = txtCompetitionName.Text;
         DatabaseManager.CurrentDb.CompetitionInfoSave(FCompetition.Info);
         btnChangeProperties.Text = Localizator.Dictionary.GetString("CHANGE_PARAMS");
         UpdateButtons();
     }
 }
Exemplo n.º 2
0
 private void btnOk_Click(object sender, EventArgs e)
 {
     if (ParamsPanel != null)
     {
         ParamsPanel.WriteParameters();
     }
     DialogResult = DialogResult.OK;
 }