Exemplo n.º 1
0
 private void Thing_SelectUID(FableMod.TNG.Variable variable)
 {
     myView.Mode          = EditorMode.Pick;
     myCreateMode         = CreateMode.SelectObject;
     myUIDVariable        = variable;
     controlThing.Enabled = false;
     //MessageBox.Show("Select an object, please.");
 }
Exemplo n.º 2
0
        private void myView_ThingPicked(FableMod.TNG.Thing thing)
        {
            if (!string.IsNullOrEmpty(myUIDVariable.Restriction))
            {
                if (thing.Name != myUIDVariable.Restriction)
                {
                    // Invalid.
                    MessageBox.Show("Invalid object. Select \"" +
                                    myUIDVariable.Restriction + "\", please.");
                    return;
                }
            }

            MessageBox.Show("Selected " +
                            thing.Name + ":" + thing.DefinitionType + ":" + thing.UID + ".");

            myUIDVariable.Value = thing.UID;
            myUIDVariable       = null;
            myCreateMode        = CreateMode.None;
            myView.Mode         = EditorMode.Normal;

            controlThing.Enabled = true;
        }