using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;

namespace EnterpriseDesktop.Controls
{
    public partial class HomeTree : UserControl
    {
        public HomeTree()
        {
            InitializeComponent();
            this.Dock = DockStyle.Fill;
            treeView1.ExpandAll();
        }

        private void treeView1_AfterSelect(object sender, TreeViewEventArgs e)
        {
            string name = e.Node.Name.ToString();
            switch (name)
            {
                case "home":
                    Program.Shell.ShowControlInPanel2(new Home());
                    break;
                case "contacts":
                    Program.Shell.ShowControlInPanel2(new EnterpriseDesktop.Contacts.WinForm.Contacts());
                    break;
            }
        }
    }
}
