//---------------------------------------------------------------------------------------------------------------------------------------------------
// <copyright file="UCAD_MenuStrip.cs" company="DarkWynter Studios">
//     Copyright (C)2007 DarkWynter Studios.  All rights reserved.
// </copyright>
//---------------------------------------------------------------------------------------------------------------------------------------------------
// {Contact : darkwynter.com for licensing information
//---------------------------------------------------------------------------------------------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Text;
using System.Windows.Forms;
using System.CodeDom;
using System.CodeDom.Compiler;
using System.Runtime.CompilerServices;
using System.Reflection;
using System.Xml;
using Microsoft.CSharp;

namespace DarkWynter.Shell
{
    public class UCAD_MenuStrip : MenuStrip
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="TabText">Text used in TabControl</param>
        /// <param name="AssemblyName">Name of DLL where UserControls are found. (eg - "AccountingControls.dll")</param>
        /// <param name="AssemblyNamespace">Root Namespace for all UserControls</param>
        public UCAD_MenuStrip(XmlNode node)
        {
            this.SuspendLayout();

            this.ForeColor = UCAD_Control.settings.menuForeColor;
            this.BackColor = UCAD_Control.settings.menuBackColor;

            this.Dock = System.Windows.Forms.DockStyle.None;
            this.GripStyle = System.Windows.Forms.ToolStripGripStyle.Visible;
            this.Location = new System.Drawing.Point(0, 0);
            this.Name = "menuStrip1";
            this.Text = "UCAD Menu Strip";
            this.Size = new System.Drawing.Size(806, 24);
            this.TabIndex = 0;
            this.AutoSize = true;
            this.Font = new System.Drawing.Font("Verdana", 12F, ((System.Drawing.FontStyle)((System.Drawing.FontStyle.Bold | System.Drawing.FontStyle.Underline))), System.Drawing.GraphicsUnit.Point, ((byte)(0)));


            // Upack the Tabs
            foreach (XmlNode tabNode in node.ChildNodes)
            {
                if (tabNode.Name == "Tab")
                {
                    this.Items.Add(new UCAD_Control(tabNode));
                }
                if (tabNode.Name == "Spacer")
                {
                    this.Items.Add(new ToolStripSeparator());
                }
            }
            this.ResumeLayout(false);
            this.PerformLayout();
        }
    }
}