private void buttonCreate_Click(object sender, EventArgs e) { string errorString; if (!AreFieldsValid(out errorString)) { this.logger.Error(errorString); return; } var go = new GameObjectData { Id = GameObjectData.GenerateId(short.Parse(this.lblId.Text)) }; if (this.StoreGameObject(go)) { this.treeViewGOs.Nodes[this.cboZone.SelectedIndex].Nodes[this.cboGOType.SelectedIndex].Nodes.Add(go.Guid.ToString(), go.Name); this.logger.LogFormat("New Game Object Created. Id = {0} Name = {1} ", go.Guid, go.Name); this.ResetFields(); } }