private void btn_NewProperty_Click(object sender, EventArgs e)
 {
     if (selectedObject == null) return;
     NewGameObjectProperty newProperty = new NewGameObjectProperty(selectedObject);
     newProperty.ShowDialog();
     switch (newProperty.ValidProperty)
     {
         case true:
             selectedObject.AddProperty(newProperty.ReturnProperty);
             listBox_Properties.Items.Add(newProperty.ReturnProperty.Name);
             return;
         case false:
             return;
     }
 }
        private void btn_NewProperty_Click(object sender, EventArgs e)
        {
            if (selectedObject == null)
            {
                return;
            }
            NewGameObjectProperty newProperty = new NewGameObjectProperty(selectedObject);

            newProperty.ShowDialog();
            switch (newProperty.ValidProperty)
            {
            case true:
                selectedObject.AddProperty(newProperty.ReturnProperty);
                listBox_Properties.Items.Add(newProperty.ReturnProperty.Name);
                return;

            case false:
                return;
            }
        }
        private void btn_NewProperty_Click(object sender, EventArgs e)
        {
            string objectName = (string)listBox_GameObjects.SelectedItem;

            if (string.IsNullOrEmpty(objectName))
            {
                return;
            }

            NewGameObjectProperty newPropWindow = new NewGameObjectProperty(selectedGameObject);

            newPropWindow.Closed += delegate(object o, EventArgs args)
            {
                if (!newPropWindow.ValidProperty)
                {
                    return;
                }
                selectedGameObject.AddProperty(newPropWindow.ReturnProperty);
                SaveSelectedGameObject();
                AddPropertyToDisplayWindow(newPropWindow.ReturnProperty);
            };
            newPropWindow.ShowDialog();
        }
        private void btn_NewProperty_Click(object sender, EventArgs e)
        {
            string objectName = (string) listBox_GameObjects.SelectedItem;
            if (string.IsNullOrEmpty(objectName))
            {
                return;
            }

            NewGameObjectProperty newPropWindow = new NewGameObjectProperty(selectedGameObject);
            newPropWindow.Closed += delegate(object o, EventArgs args)
            {
                if (!newPropWindow.ValidProperty) return;
                selectedGameObject.AddProperty(newPropWindow.ReturnProperty);
                SaveSelectedGameObject();
                AddPropertyToDisplayWindow(newPropWindow.ReturnProperty);
            };
            newPropWindow.ShowDialog();
        }