Ejemplo n.º 1
0
 private void AddVariableWindow_FormClosing(object sender, FormClosingEventArgs e)
 {
     // See if if the user is trying to create a reserved variable
     if (this.DialogResult == System.Windows.Forms.DialogResult.OK &&
         radCreateNewEvent.Checked &&
         EditorLogic.CurrentEntitySave != null &&
         ExposedVariableManager.IsMemberDefinedByPositionedObject(this.textBox1.Text)
         )
     {
         System.Windows.Forms.MessageBox.Show("The variable " + this.textBox1.Text + " is " +
                                              "already defined by the engine.  You can expose this variable or select a different name.");
         e.Cancel = true;
     }
 }