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

            if (o == null)
            {
                return;
            }

            EditGameObject.PerformEdit(o);
        }
Example #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;
            }
        }