public static bool PerformEdit(GameObject o)
 {
     using (EditGameObject f = new EditGameObject(o))
     {
         return(f.ShowDialog() == DialogResult.OK);
     }
 }
Beispiel #2
0
        private void gameObjectsDataGridView_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            GameObject o = (GameObject)gameObjectsBindingSource.Current;

            if (o == null)
            {
                return;
            }

            EditGameObject.PerformEdit(o);
        }
Beispiel #3
0
        private void gameObjectsBindingSource_AddingNew(object sender, AddingNewEventArgs e)
        {
            GameObject obj = new GameObject();

            obj.Id = World.GetNextObjectId();

            if (EditGameObject.PerformEdit(obj))
            {
                e.NewObject = obj;
            }
        }