private void TextBoxChange(object sender, InputType type)
        {
            string         newStringValue;
            UIManagerClass uiManager = UIManagerClass.UIManager;

            switch (type)
            {
            case InputType.Name:
            {
                newStringValue = TreeNameTextBox.Text;
                if (newStringValue != TreeModel.Name)
                {
                    if (newStringValue == DatabaseName)
                    {
                        TreeModel.Name = newStringValue;
//								TreeNameTextBox.BackColor = uiManager.Skin.ControlBackgroundColor;
                        break;
                    }
                    if (CheckForUniqueness(newStringValue, InputType.Name) == true)
                    {
                        TreeModel.Name = newStringValue;
                        RecordChanged  = true;
//								TreeNameTextBox.BackColor = uiManager.Skin.ControlBackgroundColor;
                    }
                    else
                    {
                        AllowChangeEvents         = false;
                        TreeNameTextBox.Text      = TreeModel.Name;
                        TreeNameTextBox.BackColor = Color.OrangeRed;
                        AllowChangeEvents         = true;
                        TreeNameTextBox.Focus();
                    }

                    EnhancementTreeControl.TreeText = TreeNameTextBox.Text;
                }
                break;
            }

            case InputType.Background:
            {
                newStringValue = TreeBackgoundTextBox.Text;
                if (newStringValue != TreeModel.Background)
                {
                    TreeModel.Background = newStringValue;
                    RecordChanged        = true;
                    //Lets set the EnhancementTree Background image
                    EnhancementTreeControl.BackgroundImage = Image.FromFile(Application.StartupPath + "\\Graphics\\Interface\\" + newStringValue + ".png");
                }
                break;
            }
            }
        }
        private void OnNewTreeButtonClick(object sender, EventArgs e)
        {
            UIManagerClass uiManager = UIManagerClass.UIManager;

            if (DataHasChangedWarning() == false)
            {
                return;
            }
            AllowChangeEvents = false;
            NewRecord         = true;
//			NewTreeButton.BackColor = uiManager.Skin.PanelHeaderColor;
            PopulateFields("_New Enhancement Tree_");
            TreeNameTextBox.Focus();
            AllowChangeEvents = true;
        }
 private void OnEnhancementTreeListBoxSelectedIndexChanged(object sender, EventArgs e)
 {
     if (AllowChangeEvents == true)
     {
         if (EnhancementTreeListBox.SelectedIndex == -1)
         {
             return;
         }
         if (DataHasChangedWarning() == false)
         {
             return;
         }
         ChangeEnhancementTreeRecord(EnhancementTreeListBox.SelectedItem.ToString());
         TreeNameTextBox.Focus();
     }
 }