Exemplo n.º 1
0
 //-------------------------------------------------------------------------------------
 private void richTextBox1_TextChanged(object sender, EventArgs e)
 {
  CodeQuery = null;
  buttonOK.Text = "Компиляция";
  buttonOK.Image = global::Sim.AdminForms.Properties.Resources.Compile;
  if(richTextBox1.Text.Length > 0)
   buttonOK.Enabled = true;
 }
Exemplo n.º 2
0
 //-------------------------------------------------------------------------------------
 private void buttonOK_Click(object sender, EventArgs e)
 {
  try
  {
   if(buttonOK.Text == "OK")
   {
    this.Hide();
    OnDialogClosed(DialogResult.OK);
   }
   else
   {
    Type t = ((ComboBoxItem<Type>)cbObject.SelectedItem).Key;
    ValuesPair<PulsarCodeTransfer.CodeQuery,List<string>> query = 
    PulsarCodeTransfer.GetCodeQuery(t, richTextBox1.Text);
    fdgvErrs.DataSource = new ListBinder(query.Value2);
    if(query.Value1 != null)
    {
     buttonOK.Text = "OK";
     buttonOK.Image = global::Sim.AdminForms.Properties.Resources.OK;
     CodeQuery = query.Value1;
    }
   }
  }
  catch(Exception Err)
  {
   Sim.Controls.ErrorBox.Show(Err);
  }
 }