Esempio n. 1
0
		/// <summary>
		/// Adds an Bar to the end of Bars collection.
		/// </summary>
		/// <param name="bar">The Bar to be added to the end of the Bars collection.</param>
		public void Add(Bar bar)
		{
			if(List.IndexOf(bar)<0)
				List.Add(bar);
			else
				throw new InvalidOperationException("Bar is already in collection.");
		}
Esempio n. 2
0
        public CmdAttributeTable(DevComponents.DotNetBar.Bar barTable)
        {
            //
            m_barTable = barTable;

            // TODO: Define values for the public properties
            //
            base.m_category = "CustomCE";                   //localizable text
            base.m_caption  = "打开属性表";                      //localizable text
            base.m_message  = "打开属性表";                      //localizable text
            base.m_toolTip  = "打开属性表";                      //localizable text
            base.m_name     = "CustomCE.CmdAttributeTable"; //unique id, non-localizable (e.g. "MyCategory_MyCommand")

            try
            {
                //
                // TODO: change bitmap name if necessary
                //
                string bitmapResourceName = GetType().Name + ".bmp";
                base.m_bitmap = new Bitmap(GetType(), bitmapResourceName);
            }
            catch (Exception ex)
            {
                System.Diagnostics.Trace.WriteLine(ex.Message, "Invalid Bitmap");
            }
        }
Esempio n. 3
0
 public FrmSymboloTin(AxMapControl pmapcontral, AxTOCControl ptoccontral, AxSceneControl scenecontrol, ITinLayer pLayer, DevComponents.DotNetBar.Bar bar)
 {
     InitializeComponent();
     this.EnableGlass = false;
     pMapContral      = pmapcontral;
     pTocContral      = ptoccontral;
     pTLayer          = pLayer;
     pSceneControl    = scenecontrol;
     bar3             = bar;
 }
        private bool m_Sel;                                //是否过滤选择要素

        public frmSelHistoryDataVersion(ArrayList arrayListFromDate, AxMapControl arcGisMapControl, DevComponents.DotNetBar.Bar barHistory, bool bSel)
        {
            InitializeComponent();
            InitialFrm(arrayListFromDate);
            ArcGisMapControl          = arcGisMapControl;
            Mapcontrol                = ArcGisMapControl.Object as IMapControlDefault;
            BarHistory                = barHistory;
            BarHistory.DockTabChange += new DotNetBarManager.DockTabChangeEventHandler(BarHistory_DockTabChange);
            m_Sel = bSel;
        }
Esempio n. 5
0
 public FrmJoinAttribute(AxMapControl mapcontrol, ILayer layer, DevComponents.DotNetBar.Bar barTable, DataTable AttributeTable, DevComponents.DotNetBar.Controls.DataGridViewX gridfield, DockContainerItem docktable)
 {
     InitializeComponent();
     this.EnableGlass = false;
     pMapControl      = mapcontrol;
     pLayer           = layer;
     m_barTable       = barTable;
     m_AttributeTable = AttributeTable;
     m_gridfield      = gridfield;
     m_docktable      = docktable;
 }
Esempio n. 6
0
        public DevComponents.DotNetBar.Bar CreateBar(string strName, enumLayType layType)
        {
            DevComponents.DotNetBar.Bar bar = new DevComponents.DotNetBar.Bar();
            bar.AccessibleRole       = System.Windows.Forms.AccessibleRole.ToolBar;
            bar.AlwaysDisplayDockTab = true;
            bar.CanCustomize         = false;
            bar.CanDockBottom        = false;
            bar.CanDockDocument      = true;
            bar.CanDockLeft          = false;
            bar.CanDockRight         = false;
            bar.CanDockTop           = false;
            bar.CanHide          = true;
            bar.CanUndock        = false;
            bar.DockTabAlignment = DevComponents.DotNetBar.eTabStripAlignment.Top;
            bar.LayoutType       = DevComponents.DotNetBar.eLayoutType.DockContainer;
            bar.SelectedDockTab  = 0;
            bar.Stretch          = true;
            bar.Style            = DevComponents.DotNetBar.eDotNetBarStyle.Office2003;
            bar.TabStop          = false;
            bar.Name             = strName;

            DevComponents.DotNetBar.DockSite dockSite = null;
            switch (layType)
            {
            case enumLayType.BOTTOM:
                dockSite = this.barBottomDockSite;
                break;

            case enumLayType.FILL:
                dockSite = this.barFilldockSite;
                break;

            case enumLayType.LEFT:
                dockSite = this.barLeftDockSite;
                break;

            case enumLayType.RIGHT:
                dockSite = this.barRightDockSite;
                break;

            case enumLayType.TOP:
                dockSite = this.barTopDockSite;
                break;
            }
            if (dockSite != null)
            {
                dockSite.Controls.Add(bar);
                dockSite.DocumentDockContainer.Orientation = DevComponents.DotNetBar.eOrientation.Vertical;
                DevComponents.DotNetBar.DocumentBarContainer aDocumentBarContainer = new DocumentBarContainer(bar, bar.Size.Width, bar.Size.Height);
                dockSite.DocumentDockContainer.Documents.Add(((DevComponents.DotNetBar.DocumentBaseContainer)(aDocumentBarContainer)));
            }

            return(bar);
        }
Esempio n. 7
0
		public Bar[] CreateToolbars()
		{
			ToolbarCodon[] codons = (ToolbarCodon[])(node.BuildChildItems(this)).ToArray(typeof(ToolbarCodon));
			
			Bar[] toolBars = new Bar[codons.Length];//创建一个工具栏数组.
			
			for (int i = 0; i < toolBars.Length; ++i) 
			{
				toolBars[i] = CreateToolBarFromCodon(codons[i]);
			}
			return toolBars;
		}
Esempio n. 8
0
 /// <summary>
 /// 窗体加载
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void frmBaseTool_Load(object sender, EventArgs e)
 {
     try
     {
         _BaseToolBar = barTool;
         if (FormID != 0)
         {
             ToolIniCreateBar();
         }
     }
     catch (Exception E)
     {
         throw new Exception(E.Message);
     }
 }
Esempio n. 9
0
		Bar CreateToolBarFromCodon(ToolbarCodon codon)
		{
			Bar bar = new Bar();
			bar.Stretch=true;
			bar.CanHide=false;
			bar.GrabHandleStyle=eGrabHandleStyle.StripeFlat;
			bar.WrapItemsDock=false;
			bar.BackColor = SystemColors.Control;

			ResourceService ResourceService = (ResourceService)ServiceManager.Services.GetService(typeof(ResourceService));
			StringParserService stringParserService = (StringParserService)ServiceManager.Services.GetService(typeof(StringParserService));

			foreach (ToolbarItemCodon childCodon in codon.SubItems) 
			{
				ButtonItem button = new ButtonItem();
				
				if (childCodon.Icon != null) 
				{
					button.Image = ResourceService.GetBitmap(childCodon.Icon);
				}
				if (childCodon.Text != null) 
				{
					button.Text = stringParserService.Parse(childCodon.Text);
					button.ButtonStyle = eButtonStyle.ImageAndText;
				}
				
				if (childCodon.ToolTip != null) 
				{
					if (childCodon.BeginGroup == "true") 
					{
						button.BeginGroup = true;
					} 
					else 
					{
						button.Tooltip = stringParserService.Parse(childCodon.ToolTip);
					}
				}
				button.Enabled     = childCodon.Enabled;
				if (childCodon.Class != null) 
				{
					ClickWrapper clickHandler = new ClickWrapper((ICommand)childCodon.AddIn.CreateObject(childCodon.Class));
					button.Click += new EventHandler(clickHandler.Run);
				}
				bar.Items.Add(button);
			}
			return bar;
		}
Esempio n. 10
0
        public void InitialMainViewControl()
        {
            frmBarManager newfrmBarManager = new frmBarManager();

            newfrmBarManager.TopLevel = false;
            newfrmBarManager.Dock     = DockStyle.Fill;
            newfrmBarManager.Show();
            this.Controls.Add(newfrmBarManager);

            //初始化树节点
            InitIndexTree();


            //提示
            //根据配置文件获取要创建的树信息。

            //加载设置数据索引窗口
            DevComponents.DotNetBar.Bar barIndexView = newfrmBarManager.CreateBar("barIndexView", enumLayType.FILL);
            barIndexView.CanHide = false;
            DevComponents.DotNetBar.PanelDockContainer PanelIndexView = newfrmBarManager.CreatePanelDockContainer("PanelIndexView", barIndexView);
            PanelIndexView.Controls.Add(this.tabControlIndex);
            this.tabControlIndex.Dock = DockStyle.Fill;


            //加载设置视图窗口
            DevComponents.DotNetBar.Bar barMapView = newfrmBarManager.CreateBar("barMapView", enumLayType.FILL);
            barMapView.CanHide = false;
            DevComponents.DotNetBar.PanelDockContainer PanelMapView = newfrmBarManager.CreatePanelDockContainer("PanelMapView", barMapView);
            PanelMapView.Controls.Add(this.tabControlData);
            this.tabControlData.Dock = DockStyle.Fill;
            _MapToolControl          = PanelMapView as Control;

            //布局设置
            newfrmBarManager.MainDotNetBarManager.FillDockSite.GetDocumentUIManager().Dock(barIndexView, barMapView, eDockSide.Right);
            newfrmBarManager.MainDotNetBarManager.FillDockSite.GetDocumentUIManager().SetBarWidth(barIndexView, this.Width / 5);

            //加载设置提示窗体
            //用户组配置

            /*      PanelDockContainer PanelTipData = new PanelDockContainer();
             *    PanelTipData.Controls.Add(this.tipRichBox);
             *    this.tipRichBox.Dock = DockStyle.Fill;
             *    DockContainerItem dockItemData = new DockContainerItem("dockItemData", "提示");
             *    dockItemData.Control = PanelTipData;
             *    newfrmBarManager.ButtomBar.Items.Add(dockItemData);   */
        }
Esempio n. 11
0
        //初始化框架插件控件界面
        //根据sys配置文件添加菜单和工具栏
        public void InitialFrmDefControl()
        {
            ////得到Xml的System节点,根据XML加载插件界面
            string xPath = ".//System[@Name='" + this.Name + "']";

            Plugin.ModuleCommon.LoadButtonViewByXmlNode(ModFrameData.v_AppPrivileges.ControlContainer, xPath, ModFrameData.v_AppPrivileges);

            ////右键菜单
            //   _dicContextMenu = ModFrameData.v_AppPrivileges.DicContextMenu;
            //初始化地图浏览工具栏
            //Plugin.Application.IAppFormRef pAppFrm = ModFrameData.v_AppPrivileges as Plugin.Application.IAppFormRef;
            //XmlNode barXmlNode = pAppFrm.SystemXml.SelectSingleNode(".//ToolBar[@Name='ControlMapToolBar9']");
            //if (barXmlNode == null || _MapToolControl == null) return;
            ////DevComponents.DotNetBar.Bar mapToolBar = Plugin.ModuleCommon.LoadButtonView(_MapToolControl, barXmlNode, pAppFrm, null, false) as Bar;
            //DevComponents.DotNetBar.Bar mapToolBar = Plugin.ModuleCommon.LoadButtonView(_MapToolControl, barXmlNode, pAppFrm, null) as Bar;
            //if (mapToolBar != null)
            //{
            //    mapToolBar.AccessibleRole = System.Windows.Forms.AccessibleRole.ToolBar;
            //    mapToolBar.DockOrientation = DevComponents.DotNetBar.eOrientation.Vertical;
            //    mapToolBar.DockSide = DevComponents.DotNetBar.eDockSide.Left;
            //    mapToolBar.GrabHandleStyle = DevComponents.DotNetBar.eGrabHandleStyle.Office2003;
            //    mapToolBar.Style = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
            //}


            //初始化地图浏览工具栏
            Plugin.Application.IAppFormRef pAppFrm = ModFrameData.v_AppPrivileges as Plugin.Application.IAppFormRef;
            XmlNode barXmlNode = pAppFrm.SystemXml.SelectSingleNode(".//ToolBar[@Name='ControlMapToolBar4']");

            if (barXmlNode == null || _MapToolControl == null)
            {
                return;
            }
            DevComponents.DotNetBar.Bar mapToolBar = Plugin.ModuleCommon.LoadButtonView(_MapToolControl, barXmlNode, pAppFrm, null) as Bar;
            if (mapToolBar != null)
            {
                mapToolBar.AccessibleRole  = System.Windows.Forms.AccessibleRole.ToolBar;
                mapToolBar.DockOrientation = DevComponents.DotNetBar.eOrientation.Vertical;
                mapToolBar.DockSide        = DevComponents.DotNetBar.eDockSide.Left;
                mapToolBar.GrabHandleStyle = DevComponents.DotNetBar.eGrabHandleStyle.None;
                mapToolBar.Style           = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
                mapToolBar.RoundCorners    = false;
                mapToolBar.SendToBack();
            }
        }
Esempio n. 12
0
        /// <summary>
        /// Sets Bar visible property and remembers the auto-hide state.
        /// </summary>
        /// <param name="bar">Bar to set visibility for.</param>
        /// <param name="visible">true if visible otherwise false</param>
        public static void SetBarVisible(Bar bar, bool visible)
        {
            if (bar == null || bar.Visible == visible)
                return;

            DotNetBarManager manager = bar.Owner as DotNetBarManager;
            if (manager != null)
                manager.SuspendLayout = true;

            try
            {
                if (visible)
                {
                    bar.Visible = true;
                    if (bar.PropertyBag.ContainsKey(BarPropertyBagKeys.AutoHideSetting))
                    {
                        bar.PropertyBag.Remove(BarPropertyBagKeys.AutoHideSetting);
                        bar.AutoHide = true;
                    }
                }
                else
                {
                    if (bar.PropertyBag.ContainsKey(BarPropertyBagKeys.AutoHideSetting))
                        bar.PropertyBag.Remove(BarPropertyBagKeys.AutoHideSetting);
                    // Remember auto-hide setting
                    if (bar.AutoHide)
                        bar.PropertyBag.Add(BarPropertyBagKeys.AutoHideSetting, true);
                    bar.CloseBar();
                }
            }
            finally
            {
                if (manager != null)
                    manager.SuspendLayout = false;
                bar.RecalcLayout();
            }
        }
Esempio n. 13
0
        /// <summary>
        /// Initializes a new instance of the AdvPropertyGrid class.
        /// </summary>
        public AdvPropertyGrid()
        {
            _SystemText = new AdvPropertyGridLocalization();
            _SystemText.PropertyChanged += new PropertyChangedEventHandler(SystemTextPropertyChanged);

            _Appearance = new AdvPropertyGridAppearance();
            _Appearance.PropertyChanged += new PropertyChangedEventHandler(AppearancePropertyChanged);

            _PropertySettings = new PropertySettingsCollection(this);

            _Toolbar = CreateToolbar();
            _PropertyTree = CreatePropertyTree();
            _SuperTooltip = CreateSuperTooltip();
            _ExpandableSplitter = CreateExpandableSplitter();
            _HelpPanel = CreateHelpPanel();
            _ExpandableSplitter.ExpandableControl = _HelpPanel;

            this.Controls.Add(_PropertyTree);
            this.Controls.Add(_Toolbar);
            this.Controls.Add(_ExpandableSplitter);
            this.Controls.Add(_HelpPanel);
            _ExpandableSplitter.Visible = false;
            _HelpPanel.Visible = false;
        }
Esempio n. 14
0
        private Bar CreateToolbar()
        {
            Bar bar = new Bar();
            bar.Dock = DockStyle.Top;
            bar.RoundCorners = false;

            ButtonItem item = new ButtonItem("sys_Category");
            item.Image = BarFunctions.LoadBitmap("SystemImages.Category.png");
            item.OptionGroup = "sorting";
            item.Checked = true;
            item.OptionGroupChanging += new OptionGroupChangingEventHandler(SortToolbarButtonOptionGroupChanging);
            item.Tooltip = _SystemText.CategorizeToolbarTooltip;
            bar.Items.Add(item);
            _CategoryToolbarButton = item;

            item = new ButtonItem("sys_Sort");
            item.Image = BarFunctions.LoadBitmap("SystemImages.Sort.png");
            item.OptionGroup = "sorting";
            item.OptionGroupChanging += new OptionGroupChangingEventHandler(SortToolbarButtonOptionGroupChanging);
            item.Tooltip = _SystemText.AlphabeticalToolbarTooltip;
            bar.Items.Add(item);
            _SortToolbarButton = item;

            TextBoxItem textBox = new TextBoxItem();
            textBox.WatermarkEnabled = true;
            textBox.WatermarkText = _SystemText.SearchBoxWatermarkText;
            textBox.WatermarkBehavior = eWatermarkBehavior.HideNonEmpty;
            textBox.TextBoxWidth = 90;
            textBox.BeginGroup = true;
            textBox.InputTextChanged += new DevComponents.DotNetBar.TextBoxItem.TextChangedEventHandler(SearchTextChanged);
            textBox.TextBox.GotFocus += new EventHandler(SearchTextBoxGotFocus);
            textBox.Enabled = false;
            _SearchTextBox = textBox;
            bar.Items.Add(textBox);

            bar.Style = eDotNetBarStyle.Office2007;

            return bar;
        }
Esempio n. 15
0
        public DevComponents.DotNetBar.PanelDockContainer CreatePanelDockContainer(string panelName, DevComponents.DotNetBar.Bar bar)
        {
            DevComponents.DotNetBar.PanelDockContainer panelDockContainer = new PanelDockContainer();
            panelDockContainer.Name            = panelName;
            panelDockContainer.Style.Alignment = System.Drawing.StringAlignment.Center;
            panelDockContainer.Style.BackColor1.ColorSchemePart  = DevComponents.DotNetBar.eColorSchemePart.BarBackground;
            panelDockContainer.Style.BackColor2.ColorSchemePart  = DevComponents.DotNetBar.eColorSchemePart.BarBackground2;
            panelDockContainer.Style.BackgroundImagePosition     = DevComponents.DotNetBar.eBackgroundImagePosition.Tile;
            panelDockContainer.Style.BorderColor.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.BarDockedBorder;
            panelDockContainer.Style.ForeColor.ColorSchemePart   = DevComponents.DotNetBar.eColorSchemePart.ItemText;
            panelDockContainer.Style.GradientAngle = 90;
            panelDockContainer.Dock = DockStyle.Fill;
            bar.Controls.Add(panelDockContainer);

            return(panelDockContainer);
        }
Esempio n. 16
0
        /// <summary>
        /// Sets the visible property of DockContainerItem and hides the bar if the given item is the last visible item on the bar.
        /// It will also automatically display the bar if bar is not visible.
        /// </summary>
        /// <param name="item">DockContainerItem to set visibility for.</param>
        /// <param name="visible">Indicates the visibility of the item</param>
        private void SetDockContainerVisible(DevComponents.DotNetBar.DockContainerItem item, bool visible)
        {
            if (item == null || item.Visible == visible)
            {
                return;
            }

            int visibleCount = 0;

            DevComponents.DotNetBar.Bar containerBar = item.ContainerControl as DevComponents.DotNetBar.Bar;
            if (containerBar == null)
            {
                // If bar has not been assigned yet just set the visible property and exit
                item.Visible = visible;
                return;
            }

            DotNetBarManager manager = containerBar.Owner as DotNetBarManager;

            if (manager != null)
            {
                manager.SuspendLayout = true;
            }

            try
            {
                foreach (DevComponents.DotNetBar.BaseItem dockItem in containerBar.Items)
                {
                    if (dockItem.Visible)
                    {
                        visibleCount++;
                    }
                }

                if (visible)
                {
                    item.Visible = true;
                    if (!containerBar.AutoHide && !containerBar.Visible && visibleCount <= 1)
                    {
                        containerBar.Visible = true;
                        if (containerBar.Tag == null)
                        {
                            containerBar.Tag = "";
                        }
                        if (containerBar.Tag.ToString() == "autohide")
                        {
                            containerBar.AutoHide = true;
                        }
                    }
                }
                else
                {
                    item.Visible = false;
                    if (visibleCount == 1)
                    {
                        // Remember auto-hide setting
                        if (containerBar.AutoHide)
                        {
                            containerBar.AutoHide = false;
                            containerBar.Tag      = "autohide";
                        }
                        else
                        {
                            containerBar.Tag = "";
                        }

                        containerBar.Visible = false;
                    }
                }
            }
            finally
            {
                if (manager != null)
                {
                    manager.SuspendLayout = false;
                }
                else
                {
                    containerBar.RecalcLayout();
                }
            }
        }
Esempio n. 17
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.components = new System.ComponentModel.Container();
     System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Form1));
     this.dotNetBarManager1 = new DevComponents.DotNetBar.DotNetBarManager(this.components);
     this.barBottomDockSite = new DevComponents.DotNetBar.DockSite();
     this.barLeftDockSite   = new DevComponents.DotNetBar.DockSite();
     this.barRightDockSite  = new DevComponents.DotNetBar.DockSite();
     this.barTopDockSite    = new DevComponents.DotNetBar.DockSite();
     this.mdiClient1        = new System.Windows.Forms.MdiClient();
     this.dockSite1         = new DevComponents.DotNetBar.DockSite();
     this.dockSite2         = new DevComponents.DotNetBar.DockSite();
     this.dockSite3         = new DevComponents.DotNetBar.DockSite();
     this.dockSite4         = new DevComponents.DotNetBar.DockSite();
     this.mainmenu          = new DevComponents.DotNetBar.Bar();
     this.item_50           = new DevComponents.DotNetBar.ButtonItem();
     this.mNew          = new DevComponents.DotNetBar.ButtonItem();
     this.mTextFile     = new DevComponents.DotNetBar.ButtonItem();
     this.mXMLDocument  = new DevComponents.DotNetBar.ButtonItem();
     this.mHTMLDocument = new DevComponents.DotNetBar.ButtonItem();
     this.mOpen         = new DevComponents.DotNetBar.ButtonItem();
     this.mExit         = new DevComponents.DotNetBar.ButtonItem();
     this.item_55       = new DevComponents.DotNetBar.ButtonItem();
     this.mAbout        = new DevComponents.DotNetBar.ButtonItem();
     this.mSwitch       = new DevComponents.DotNetBar.ButtonItem();
     this.dockSite3.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.mainmenu)).BeginInit();
     this.SuspendLayout();
     //
     // dotNetBarManager1
     //
     this.dotNetBarManager1.BottomDockSite           = this.barBottomDockSite;
     this.dotNetBarManager1.DefinitionName           = "";
     this.dotNetBarManager1.LeftDockSite             = this.barLeftDockSite;
     this.dotNetBarManager1.ParentForm               = this;
     this.dotNetBarManager1.RightDockSite            = this.barRightDockSite;
     this.dotNetBarManager1.ShowCustomizeContextMenu = false;
     this.dotNetBarManager1.Style = DevComponents.DotNetBar.eDotNetBarStyle.OfficeXP;
     this.dotNetBarManager1.ToolbarBottomDockSite = this.dockSite4;
     this.dotNetBarManager1.ToolbarLeftDockSite   = this.dockSite1;
     this.dotNetBarManager1.ToolbarRightDockSite  = this.dockSite2;
     this.dotNetBarManager1.ToolbarTopDockSite    = this.dockSite3;
     this.dotNetBarManager1.TopDockSite           = this.barTopDockSite;
     this.dotNetBarManager1.ItemClick            += new System.EventHandler(this.OnItemClick);
     //
     // barBottomDockSite
     //
     this.barBottomDockSite.AccessibleRole        = System.Windows.Forms.AccessibleRole.Window;
     this.barBottomDockSite.Dock                  = System.Windows.Forms.DockStyle.Bottom;
     this.barBottomDockSite.DocumentDockContainer = new DevComponents.DotNetBar.DocumentDockContainer();
     this.barBottomDockSite.Location              = new System.Drawing.Point(0, 273);
     this.barBottomDockSite.Name                  = "barBottomDockSite";
     this.barBottomDockSite.Size                  = new System.Drawing.Size(406, 0);
     this.barBottomDockSite.TabIndex              = 2;
     this.barBottomDockSite.TabStop               = false;
     //
     // barLeftDockSite
     //
     this.barLeftDockSite.AccessibleRole        = System.Windows.Forms.AccessibleRole.Window;
     this.barLeftDockSite.Dock                  = System.Windows.Forms.DockStyle.Left;
     this.barLeftDockSite.DocumentDockContainer = new DevComponents.DotNetBar.DocumentDockContainer();
     this.barLeftDockSite.Location              = new System.Drawing.Point(0, 25);
     this.barLeftDockSite.Name                  = "barLeftDockSite";
     this.barLeftDockSite.Size                  = new System.Drawing.Size(0, 248);
     this.barLeftDockSite.TabIndex              = 3;
     this.barLeftDockSite.TabStop               = false;
     //
     // barRightDockSite
     //
     this.barRightDockSite.AccessibleRole        = System.Windows.Forms.AccessibleRole.Window;
     this.barRightDockSite.Dock                  = System.Windows.Forms.DockStyle.Right;
     this.barRightDockSite.DocumentDockContainer = new DevComponents.DotNetBar.DocumentDockContainer();
     this.barRightDockSite.Location              = new System.Drawing.Point(406, 25);
     this.barRightDockSite.Name                  = "barRightDockSite";
     this.barRightDockSite.Size                  = new System.Drawing.Size(0, 248);
     this.barRightDockSite.TabIndex              = 4;
     this.barRightDockSite.TabStop               = false;
     //
     // barTopDockSite
     //
     this.barTopDockSite.AccessibleRole        = System.Windows.Forms.AccessibleRole.Window;
     this.barTopDockSite.Dock                  = System.Windows.Forms.DockStyle.Top;
     this.barTopDockSite.DocumentDockContainer = new DevComponents.DotNetBar.DocumentDockContainer();
     this.barTopDockSite.Location              = new System.Drawing.Point(0, 25);
     this.barTopDockSite.Name                  = "barTopDockSite";
     this.barTopDockSite.Size                  = new System.Drawing.Size(406, 0);
     this.barTopDockSite.TabIndex              = 1;
     this.barTopDockSite.TabStop               = false;
     //
     // mdiClient1
     //
     this.mdiClient1.Dock     = System.Windows.Forms.DockStyle.Fill;
     this.mdiClient1.Location = new System.Drawing.Point(0, 25);
     this.mdiClient1.Name     = "mdiClient1";
     this.mdiClient1.TabIndex = 5;
     //
     // dockSite1
     //
     this.dockSite1.AccessibleRole = System.Windows.Forms.AccessibleRole.Window;
     this.dockSite1.Dock           = System.Windows.Forms.DockStyle.Left;
     this.dockSite1.Location       = new System.Drawing.Point(0, 25);
     this.dockSite1.Name           = "dockSite1";
     this.dockSite1.Size           = new System.Drawing.Size(0, 248);
     this.dockSite1.TabIndex       = 6;
     this.dockSite1.TabStop        = false;
     //
     // dockSite2
     //
     this.dockSite2.AccessibleRole = System.Windows.Forms.AccessibleRole.Window;
     this.dockSite2.Dock           = System.Windows.Forms.DockStyle.Right;
     this.dockSite2.Location       = new System.Drawing.Point(406, 25);
     this.dockSite2.Name           = "dockSite2";
     this.dockSite2.Size           = new System.Drawing.Size(0, 248);
     this.dockSite2.TabIndex       = 7;
     this.dockSite2.TabStop        = false;
     //
     // dockSite3
     //
     this.dockSite3.AccessibleRole = System.Windows.Forms.AccessibleRole.Window;
     this.dockSite3.Controls.AddRange(new System.Windows.Forms.Control[] {
         this.mainmenu
     });
     this.dockSite3.Dock     = System.Windows.Forms.DockStyle.Top;
     this.dockSite3.Name     = "dockSite3";
     this.dockSite3.Size     = new System.Drawing.Size(406, 25);
     this.dockSite3.TabIndex = 8;
     this.dockSite3.TabStop  = false;
     //
     // dockSite4
     //
     this.dockSite4.AccessibleRole = System.Windows.Forms.AccessibleRole.Window;
     this.dockSite4.Dock           = System.Windows.Forms.DockStyle.Bottom;
     this.dockSite4.Location       = new System.Drawing.Point(0, 273);
     this.dockSite4.Name           = "dockSite4";
     this.dockSite4.Size           = new System.Drawing.Size(406, 0);
     this.dockSite4.TabIndex       = 9;
     this.dockSite4.TabStop        = false;
     //
     // mainmenu
     //
     this.mainmenu.AccessibleDescription = "Main Menu (mainmenu)";
     this.mainmenu.AccessibleName        = "Main Menu";
     this.mainmenu.AccessibleRole        = System.Windows.Forms.AccessibleRole.MenuBar;
     this.mainmenu.DockSide = DevComponents.DotNetBar.eDockSide.Top;
     this.mainmenu.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] {
         this.item_50,
         this.item_55,
         this.mSwitch
     });
     this.mainmenu.MenuBar  = true;
     this.mainmenu.Name     = "mainmenu";
     this.mainmenu.Size     = new System.Drawing.Size(406, 24);
     this.mainmenu.Stretch  = true;
     this.mainmenu.Style    = DevComponents.DotNetBar.eDotNetBarStyle.Office2003;
     this.mainmenu.TabIndex = 0;
     this.mainmenu.TabStop  = false;
     this.mainmenu.Text     = "Main Menu";
     //
     // item_50
     //
     this.item_50.GlobalName     = "item_50";
     this.item_50.Name           = "item_50";
     this.item_50.PopupAnimation = DevComponents.DotNetBar.ePopupAnimation.SystemDefault;
     this.item_50.SubItems.AddRange(new DevComponents.DotNetBar.BaseItem[] {
         this.mNew,
         this.mOpen,
         this.mExit
     });
     this.item_50.Text = "&File";
     //
     // mNew
     //
     this.mNew.GlobalName     = "mNew";
     this.mNew.Image          = ((System.Drawing.Bitmap)(resources.GetObject("mNew.Image")));
     this.mNew.Name           = "mNew";
     this.mNew.PopupAnimation = DevComponents.DotNetBar.ePopupAnimation.SystemDefault;
     this.mNew.Shortcuts.Add(DevComponents.DotNetBar.eShortcut.CtrlN);
     this.mNew.SubItems.AddRange(new DevComponents.DotNetBar.BaseItem[] {
         this.mTextFile,
         this.mXMLDocument,
         this.mHTMLDocument
     });
     this.mNew.Text = "&New";
     //
     // mTextFile
     //
     this.mTextFile.GlobalName     = "mTextFile";
     this.mTextFile.Name           = "mTextFile";
     this.mTextFile.PopupAnimation = DevComponents.DotNetBar.ePopupAnimation.SystemDefault;
     this.mTextFile.Text           = "&Text File";
     //
     // mXMLDocument
     //
     this.mXMLDocument.GlobalName     = "mXMLDocument";
     this.mXMLDocument.Name           = "mXMLDocument";
     this.mXMLDocument.PopupAnimation = DevComponents.DotNetBar.ePopupAnimation.SystemDefault;
     this.mXMLDocument.Text           = "&XML Document";
     //
     // mHTMLDocument
     //
     this.mHTMLDocument.GlobalName     = "mHTMLDocument";
     this.mHTMLDocument.Name           = "mHTMLDocument";
     this.mHTMLDocument.PopupAnimation = DevComponents.DotNetBar.ePopupAnimation.SystemDefault;
     this.mHTMLDocument.Text           = "&HTML Document";
     //
     // mOpen
     //
     this.mOpen.GlobalName     = "mOpen";
     this.mOpen.Image          = ((System.Drawing.Bitmap)(resources.GetObject("mOpen.Image")));
     this.mOpen.Name           = "mOpen";
     this.mOpen.PopupAnimation = DevComponents.DotNetBar.ePopupAnimation.SystemDefault;
     this.mOpen.Shortcuts.Add(DevComponents.DotNetBar.eShortcut.CtrlO);
     this.mOpen.Text = "&Open";
     //
     // mExit
     //
     this.mExit.BeginGroup     = true;
     this.mExit.GlobalName     = "mExit";
     this.mExit.Name           = "mExit";
     this.mExit.PopupAnimation = DevComponents.DotNetBar.ePopupAnimation.SystemDefault;
     this.mExit.Shortcuts.Add(DevComponents.DotNetBar.eShortcut.CtrlX);
     this.mExit.Text = "&Exit";
     //
     // item_55
     //
     this.item_55.GlobalName     = "item_55";
     this.item_55.Name           = "item_55";
     this.item_55.PopupAnimation = DevComponents.DotNetBar.ePopupAnimation.SystemDefault;
     this.item_55.SubItems.AddRange(new DevComponents.DotNetBar.BaseItem[] {
         this.mAbout
     });
     this.item_55.Text = "&Help";
     //
     // mAbout
     //
     this.mAbout.GlobalName     = "mAbout";
     this.mAbout.Name           = "mAbout";
     this.mAbout.PopupAnimation = DevComponents.DotNetBar.ePopupAnimation.SystemDefault;
     this.mAbout.Shortcuts.Add(DevComponents.DotNetBar.eShortcut.F1);
     this.mAbout.Text = "&About";
     //
     // mSwitch
     //
     this.mSwitch.GlobalName     = "mSwitch";
     this.mSwitch.ItemAlignment  = DevComponents.DotNetBar.eItemAlignment.Far;
     this.mSwitch.Name           = "mSwitch";
     this.mSwitch.PopupAnimation = DevComponents.DotNetBar.ePopupAnimation.SystemDefault;
     this.mSwitch.ShowSubItems   = false;
     this.mSwitch.Text           = "Switch Style";
     //
     // Form1
     //
     this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
     this.ClientSize        = new System.Drawing.Size(406, 273);
     this.Controls.AddRange(new System.Windows.Forms.Control[] {
         this.barTopDockSite,
         this.barBottomDockSite,
         this.barLeftDockSite,
         this.barRightDockSite,
         this.dockSite1,
         this.dockSite2,
         this.dockSite3,
         this.dockSite4,
         this.mdiClient1
     });
     this.IsMdiContainer = true;
     this.Name           = "Form1";
     this.Text           = "Form1";
     this.dockSite3.ResumeLayout(false);
     ((System.ComponentModel.ISupportInitialize)(this.mainmenu)).EndInit();
     this.ResumeLayout(false);
 }
Esempio n. 18
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.components = new System.ComponentModel.Container();
     System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Form1));
     this.axWebBrowser1     = new AxSHDocVw.AxWebBrowser();
     this.dotNetBarManager1 = new DevComponents.DotNetBar.DotNetBarManager(this.components);
     this.barBottomDockSite = new DevComponents.DotNetBar.DockSite();
     this.barLeftDockSite   = new DevComponents.DotNetBar.DockSite();
     this.barRightDockSite  = new DevComponents.DotNetBar.DockSite();
     this.dockSite4         = new DevComponents.DotNetBar.DockSite();
     this.dockSite1         = new DevComponents.DotNetBar.DockSite();
     this.dockSite2         = new DevComponents.DotNetBar.DockSite();
     this.dockSite3         = new DevComponents.DotNetBar.DockSite();
     this.barMenu           = new DevComponents.DotNetBar.Bar();
     this.bFile             = new DevComponents.DotNetBar.ButtonItem();
     this.bOpen             = new DevComponents.DotNetBar.ButtonItem();
     this.bPrint            = new DevComponents.DotNetBar.ButtonItem();
     this.bExit             = new DevComponents.DotNetBar.ButtonItem();
     this.bFavorites        = new DevComponents.DotNetBar.ButtonItem();
     this.bAddToFavorites   = new DevComponents.DotNetBar.ButtonItem();
     this.bar3           = new DevComponents.DotNetBar.Bar();
     this.bBack          = new DevComponents.DotNetBar.ButtonItem();
     this.bForward       = new DevComponents.DotNetBar.ButtonItem();
     this.bStop          = new DevComponents.DotNetBar.ButtonItem();
     this.bRefresh       = new DevComponents.DotNetBar.ButtonItem();
     this.bSearch        = new DevComponents.DotNetBar.ButtonItem();
     this.bHome          = new DevComponents.DotNetBar.ButtonItem();
     this.buttonItem1    = new DevComponents.DotNetBar.ButtonItem();
     this.buttonItem2    = new DevComponents.DotNetBar.ButtonItem();
     this.barLocation    = new DevComponents.DotNetBar.Bar();
     this.bAddress       = new DevComponents.DotNetBar.ComboBoxItem();
     this.bGo            = new DevComponents.DotNetBar.ButtonItem();
     this.barTopDockSite = new DevComponents.DotNetBar.DockSite();
     ((System.ComponentModel.ISupportInitialize)(this.axWebBrowser1)).BeginInit();
     this.dockSite3.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.barMenu)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.bar3)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.barLocation)).BeginInit();
     this.SuspendLayout();
     //
     // axWebBrowser1
     //
     this.axWebBrowser1.Dock              = System.Windows.Forms.DockStyle.Fill;
     this.axWebBrowser1.Enabled           = true;
     this.axWebBrowser1.Location          = new System.Drawing.Point(0, 87);
     this.axWebBrowser1.OcxState          = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axWebBrowser1.OcxState")));
     this.axWebBrowser1.Size              = new System.Drawing.Size(472, 243);
     this.axWebBrowser1.TabIndex          = 4;
     this.axWebBrowser1.NavigateError    += new AxSHDocVw.DWebBrowserEvents2_NavigateErrorEventHandler(this.WebNavigateError);
     this.axWebBrowser1.DocumentComplete += new AxSHDocVw.DWebBrowserEvents2_DocumentCompleteEventHandler(this.WebDocumentComplete);
     //
     // dotNetBarManager1
     //
     this.dotNetBarManager1.BottomDockSite        = this.barBottomDockSite;
     this.dotNetBarManager1.DefinitionName        = "";
     this.dotNetBarManager1.LeftDockSite          = this.barLeftDockSite;
     this.dotNetBarManager1.ParentForm            = this;
     this.dotNetBarManager1.RightDockSite         = this.barRightDockSite;
     this.dotNetBarManager1.Style                 = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
     this.dotNetBarManager1.ToolbarBottomDockSite = this.dockSite4;
     this.dotNetBarManager1.ToolbarLeftDockSite   = this.dockSite1;
     this.dotNetBarManager1.ToolbarRightDockSite  = this.dockSite2;
     this.dotNetBarManager1.ToolbarTopDockSite    = this.dockSite3;
     this.dotNetBarManager1.TopDockSite           = this.barTopDockSite;
     this.dotNetBarManager1.ItemClick            += new System.EventHandler(this.BarItemClick);
     this.dotNetBarManager1.MouseDown            += new System.Windows.Forms.MouseEventHandler(this.ItemMouseDown);
     //
     // barBottomDockSite
     //
     this.barBottomDockSite.AccessibleRole        = System.Windows.Forms.AccessibleRole.Window;
     this.barBottomDockSite.Dock                  = System.Windows.Forms.DockStyle.Bottom;
     this.barBottomDockSite.DocumentDockContainer = new DevComponents.DotNetBar.DocumentDockContainer();
     this.barBottomDockSite.Location              = new System.Drawing.Point(0, 330);
     this.barBottomDockSite.Name                  = "barBottomDockSite";
     this.barBottomDockSite.Size                  = new System.Drawing.Size(472, 0);
     this.barBottomDockSite.TabIndex              = 8;
     this.barBottomDockSite.TabStop               = false;
     //
     // barLeftDockSite
     //
     this.barLeftDockSite.AccessibleRole        = System.Windows.Forms.AccessibleRole.Window;
     this.barLeftDockSite.Dock                  = System.Windows.Forms.DockStyle.Left;
     this.barLeftDockSite.DocumentDockContainer = new DevComponents.DotNetBar.DocumentDockContainer();
     this.barLeftDockSite.Location              = new System.Drawing.Point(0, 87);
     this.barLeftDockSite.Name                  = "barLeftDockSite";
     this.barLeftDockSite.Size                  = new System.Drawing.Size(0, 243);
     this.barLeftDockSite.TabIndex              = 5;
     this.barLeftDockSite.TabStop               = false;
     //
     // barRightDockSite
     //
     this.barRightDockSite.AccessibleRole        = System.Windows.Forms.AccessibleRole.Window;
     this.barRightDockSite.Dock                  = System.Windows.Forms.DockStyle.Right;
     this.barRightDockSite.DocumentDockContainer = new DevComponents.DotNetBar.DocumentDockContainer();
     this.barRightDockSite.Location              = new System.Drawing.Point(472, 87);
     this.barRightDockSite.Name                  = "barRightDockSite";
     this.barRightDockSite.Size                  = new System.Drawing.Size(0, 243);
     this.barRightDockSite.TabIndex              = 6;
     this.barRightDockSite.TabStop               = false;
     //
     // dockSite4
     //
     this.dockSite4.AccessibleRole = System.Windows.Forms.AccessibleRole.Window;
     this.dockSite4.Dock           = System.Windows.Forms.DockStyle.Bottom;
     this.dockSite4.Location       = new System.Drawing.Point(0, 330);
     this.dockSite4.Name           = "dockSite4";
     this.dockSite4.Size           = new System.Drawing.Size(472, 0);
     this.dockSite4.TabIndex       = 12;
     this.dockSite4.TabStop        = false;
     //
     // dockSite1
     //
     this.dockSite1.AccessibleRole = System.Windows.Forms.AccessibleRole.Window;
     this.dockSite1.Dock           = System.Windows.Forms.DockStyle.Left;
     this.dockSite1.Location       = new System.Drawing.Point(0, 87);
     this.dockSite1.Name           = "dockSite1";
     this.dockSite1.Size           = new System.Drawing.Size(0, 243);
     this.dockSite1.TabIndex       = 9;
     this.dockSite1.TabStop        = false;
     //
     // dockSite2
     //
     this.dockSite2.AccessibleRole = System.Windows.Forms.AccessibleRole.Window;
     this.dockSite2.Dock           = System.Windows.Forms.DockStyle.Right;
     this.dockSite2.Location       = new System.Drawing.Point(472, 87);
     this.dockSite2.Name           = "dockSite2";
     this.dockSite2.Size           = new System.Drawing.Size(0, 243);
     this.dockSite2.TabIndex       = 10;
     this.dockSite2.TabStop        = false;
     //
     // dockSite3
     //
     this.dockSite3.AccessibleRole = System.Windows.Forms.AccessibleRole.Window;
     this.dockSite3.Controls.AddRange(new System.Windows.Forms.Control[] {
         this.barMenu,
         this.bar3,
         this.barLocation
     });
     this.dockSite3.Dock     = System.Windows.Forms.DockStyle.Top;
     this.dockSite3.Name     = "dockSite3";
     this.dockSite3.Size     = new System.Drawing.Size(472, 87);
     this.dockSite3.TabIndex = 11;
     this.dockSite3.TabStop  = false;
     //
     // barMenu
     //
     this.barMenu.AccessibleDescription = "DotNetBar Bar (barMenu)";
     this.barMenu.AccessibleName        = "DotNetBar Bar";
     this.barMenu.AccessibleRole        = System.Windows.Forms.AccessibleRole.MenuBar;
     this.barMenu.DockSide = DevComponents.DotNetBar.eDockSide.Top;
     this.barMenu.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] {
         this.bFile,
         this.bFavorites
     });
     this.barMenu.MenuBar  = true;
     this.barMenu.Name     = "barMenu";
     this.barMenu.Size     = new System.Drawing.Size(472, 24);
     this.barMenu.Stretch  = true;
     this.barMenu.Style    = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
     this.barMenu.TabIndex = 0;
     this.barMenu.TabStop  = false;
     this.barMenu.Text     = "Main Menu";
     //
     // bFile
     //
     this.bFile.GlobalName = "bFile";
     this.bFile.Name       = "bFile";
     this.bFile.SubItems.AddRange(new DevComponents.DotNetBar.BaseItem[] {
         this.bOpen,
         this.bPrint,
         this.bExit
     });
     this.bFile.Text = "&File";
     //
     // bOpen
     //
     this.bOpen.GlobalName = "bOpen";
     this.bOpen.Name       = "bOpen";
     this.bOpen.Shortcuts.Add(DevComponents.DotNetBar.eShortcut.CtrlO);
     this.bOpen.Text = "&Open...";
     //
     // bPrint
     //
     this.bPrint.BeginGroup = true;
     this.bPrint.GlobalName = "bPrint";
     this.bPrint.Name       = "bPrint";
     this.bPrint.Text       = "&Print";
     //
     // bExit
     //
     this.bExit.BeginGroup = true;
     this.bExit.GlobalName = "bExit";
     this.bExit.Name       = "bExit";
     this.bExit.Shortcuts.Add(DevComponents.DotNetBar.eShortcut.CtrlX);
     this.bExit.Text = "E&xit";
     //
     // bFavorites
     //
     this.bFavorites.GlobalName = "bFavorites";
     this.bFavorites.Name       = "bFavorites";
     this.bFavorites.SubItems.AddRange(new DevComponents.DotNetBar.BaseItem[] {
         this.bAddToFavorites
     });
     this.bFavorites.Text = "F&avorites";
     //
     // bAddToFavorites
     //
     this.bAddToFavorites.GlobalName = "bAddToFavorites";
     this.bAddToFavorites.Name       = "bAddToFavorites";
     this.bAddToFavorites.Text       = "&Add to Favorites...";
     //
     // bar3
     //
     this.bar3.AccessibleDescription = "DotNetBar Bar (bar3)";
     this.bar3.AccessibleName        = "DotNetBar Bar";
     this.bar3.AccessibleRole        = System.Windows.Forms.AccessibleRole.ToolBar;
     this.bar3.DockLine        = 1;
     this.bar3.DockSide        = DevComponents.DotNetBar.eDockSide.Top;
     this.bar3.GrabHandleStyle = DevComponents.DotNetBar.eGrabHandleStyle.Office2003;
     this.bar3.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] {
         this.bBack,
         this.bForward,
         this.bStop,
         this.bRefresh,
         this.bSearch,
         this.bHome,
         this.buttonItem1,
         this.buttonItem2
     });
     this.bar3.Location = new System.Drawing.Point(0, 25);
     this.bar3.Name     = "bar3";
     this.bar3.Size     = new System.Drawing.Size(472, 33);
     this.bar3.Stretch  = true;
     this.bar3.Style    = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
     this.bar3.TabIndex = 1;
     this.bar3.TabStop  = false;
     this.bar3.Text     = "Navigation";
     //
     // bBack
     //
     this.bBack.ButtonStyle = DevComponents.DotNetBar.eButtonStyle.ImageAndText;
     this.bBack.GlobalName  = "bBack";
     this.bBack.Image       = ((System.Drawing.Bitmap)(resources.GetObject("bBack.Image")));
     this.bBack.Name        = "bBack";
     this.bBack.Text        = "&Back";
     //
     // bForward
     //
     this.bForward.GlobalName = "bForward";
     this.bForward.Image      = ((System.Drawing.Bitmap)(resources.GetObject("bForward.Image")));
     this.bForward.Name       = "bForward";
     this.bForward.Text       = "&Forward";
     //
     // bStop
     //
     this.bStop.GlobalName = "bStop";
     this.bStop.Image      = ((System.Drawing.Bitmap)(resources.GetObject("bStop.Image")));
     this.bStop.Name       = "bStop";
     this.bStop.Text       = "&Stop";
     //
     // bRefresh
     //
     this.bRefresh.GlobalName = "bRefresh";
     this.bRefresh.Image      = ((System.Drawing.Bitmap)(resources.GetObject("bRefresh.Image")));
     this.bRefresh.Name       = "bRefresh";
     this.bRefresh.Text       = "&Refresh";
     //
     // bSearch
     //
     this.bSearch.BeginGroup = true;
     this.bSearch.GlobalName = "bSearch";
     this.bSearch.Image      = ((System.Drawing.Bitmap)(resources.GetObject("bSearch.Image")));
     this.bSearch.Name       = "bSearch";
     this.bSearch.Text       = "&Search";
     //
     // bHome
     //
     this.bHome.GlobalName = "bHome";
     this.bHome.Image      = ((System.Drawing.Bitmap)(resources.GetObject("bHome.Image")));
     this.bHome.Name       = "bHome";
     this.bHome.Text       = "&Home";
     //
     // buttonItem1
     //
     this.buttonItem1.ButtonStyle = DevComponents.DotNetBar.eButtonStyle.ImageAndText;
     this.buttonItem1.GlobalName  = "bFavorites";
     this.buttonItem1.Image       = ((System.Drawing.Bitmap)(resources.GetObject("buttonItem1.Image")));
     this.buttonItem1.Name        = "buttonItem1";
     this.buttonItem1.Text        = "&Favorites";
     //
     // buttonItem2
     //
     this.buttonItem2.BeginGroup = true;
     this.buttonItem2.GlobalName = "bPrint";
     this.buttonItem2.Image      = ((System.Drawing.Bitmap)(resources.GetObject("buttonItem2.Image")));
     this.buttonItem2.Name       = "buttonItem2";
     this.buttonItem2.Text       = "&Print";
     //
     // barLocation
     //
     this.barLocation.AccessibleDescription = "DotNetBar Bar (barLocation)";
     this.barLocation.AccessibleName        = "DotNetBar Bar";
     this.barLocation.AccessibleRole        = System.Windows.Forms.AccessibleRole.ToolBar;
     this.barLocation.CanDockLeft           = false;
     this.barLocation.CanDockRight          = false;
     this.barLocation.DockLine        = 2;
     this.barLocation.DockSide        = DevComponents.DotNetBar.eDockSide.Top;
     this.barLocation.GrabHandleStyle = DevComponents.DotNetBar.eGrabHandleStyle.Office2003;
     this.barLocation.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] {
         this.bAddress,
         this.bGo
     });
     this.barLocation.Location = new System.Drawing.Point(0, 59);
     this.barLocation.Name     = "barLocation";
     this.barLocation.Size     = new System.Drawing.Size(472, 27);
     this.barLocation.Stretch  = true;
     this.barLocation.Style    = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
     this.barLocation.TabIndex = 2;
     this.barLocation.TabStop  = false;
     this.barLocation.Text     = "Location";
     //
     // bAddress
     //
     this.bAddress.ComboWidth    = 128;
     this.bAddress.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDown;
     this.bAddress.GlobalName    = "bAddress";
     this.bAddress.ItemHeight    = 14;
     this.bAddress.Name          = "bAddress";
     this.bAddress.Stretch       = true;
     //
     // bGo
     //
     this.bGo.ButtonStyle = DevComponents.DotNetBar.eButtonStyle.ImageAndText;
     this.bGo.GlobalName  = "bGo";
     this.bGo.Image       = ((System.Drawing.Bitmap)(resources.GetObject("bGo.Image")));
     this.bGo.Name        = "bGo";
     this.bGo.Text        = "Go";
     //
     // barTopDockSite
     //
     this.barTopDockSite.AccessibleRole        = System.Windows.Forms.AccessibleRole.Window;
     this.barTopDockSite.Dock                  = System.Windows.Forms.DockStyle.Top;
     this.barTopDockSite.DocumentDockContainer = new DevComponents.DotNetBar.DocumentDockContainer();
     this.barTopDockSite.Location              = new System.Drawing.Point(0, 87);
     this.barTopDockSite.Name                  = "barTopDockSite";
     this.barTopDockSite.Size                  = new System.Drawing.Size(472, 0);
     this.barTopDockSite.TabIndex              = 7;
     this.barTopDockSite.TabStop               = false;
     //
     // Form1
     //
     this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
     this.ClientSize        = new System.Drawing.Size(472, 330);
     this.Controls.AddRange(new System.Windows.Forms.Control[] {
         this.axWebBrowser1,
         this.barLeftDockSite,
         this.barRightDockSite,
         this.barTopDockSite,
         this.barBottomDockSite,
         this.dockSite1,
         this.dockSite2,
         this.dockSite3,
         this.dockSite4
     });
     this.Name        = "Form1";
     this.Text        = "DotNetBar Explorer";
     this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
     this.Load       += new System.EventHandler(this.Form1_Load);
     this.Closed     += new System.EventHandler(this.Form1_Closed);
     ((System.ComponentModel.ISupportInitialize)(this.axWebBrowser1)).EndInit();
     this.dockSite3.ResumeLayout(false);
     ((System.ComponentModel.ISupportInitialize)(this.barMenu)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.bar3)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.barLocation)).EndInit();
     this.ResumeLayout(false);
 }
Esempio n. 19
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Form1));
     this.bar1 = new DevComponents.DotNetBar.Bar();
     this.buttonBlackScheme       = new DevComponents.DotNetBar.ButtonItem();
     this.buttonSilverScheme      = new DevComponents.DotNetBar.ButtonItem();
     this.buttonBlueScheme        = new DevComponents.DotNetBar.ButtonItem();
     this.colorPickerCustomScheme = new DevComponents.DotNetBar.ColorPickerDropDown();
     this.groupPanel1             = new DevComponents.DotNetBar.Controls.GroupPanel();
     this.textBoxX5   = new DevComponents.DotNetBar.Controls.TextBoxX();
     this.comboBoxEx1 = new DevComponents.DotNetBar.Controls.ComboBoxEx();
     this.textBoxX4   = new DevComponents.DotNetBar.Controls.TextBoxX();
     this.textBoxX3   = new DevComponents.DotNetBar.Controls.TextBoxX();
     this.textBoxX2   = new DevComponents.DotNetBar.Controls.TextBoxX();
     this.textBoxX1   = new DevComponents.DotNetBar.Controls.TextBoxX();
     this.buttonX1    = new DevComponents.DotNetBar.ButtonX();
     ((System.ComponentModel.ISupportInitialize)(this.bar1)).BeginInit();
     this.groupPanel1.SuspendLayout();
     this.SuspendLayout();
     //
     // bar1
     //
     this.bar1.BarType = DevComponents.DotNetBar.eBarType.StatusBar;
     this.bar1.Dock    = System.Windows.Forms.DockStyle.Top;
     this.bar1.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] {
         this.buttonBlackScheme,
         this.buttonSilverScheme,
         this.buttonBlueScheme,
         this.colorPickerCustomScheme
     });
     this.bar1.Name         = "bar1";
     this.bar1.RoundCorners = false;
     this.bar1.Size         = new System.Drawing.Size(338, 25);
     this.bar1.Stretch      = true;
     this.bar1.Style        = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
     this.bar1.TabIndex     = 0;
     this.bar1.TabStop      = false;
     this.bar1.Text         = "bar1";
     //
     // buttonBlackScheme
     //
     this.buttonBlackScheme.Name   = "buttonBlackScheme";
     this.buttonBlackScheme.Text   = "Black";
     this.buttonBlackScheme.Click += new System.EventHandler(this.buttonBlackScheme_Click);
     //
     // buttonSilverScheme
     //
     this.buttonSilverScheme.Name   = "buttonSilverScheme";
     this.buttonSilverScheme.Text   = "Silver";
     this.buttonSilverScheme.Click += new System.EventHandler(this.buttonSilverScheme_Click);
     //
     // buttonBlueScheme
     //
     this.buttonBlueScheme.Name   = "buttonBlueScheme";
     this.buttonBlueScheme.Text   = "Blue";
     this.buttonBlueScheme.Click += new System.EventHandler(this.buttonBlueScheme_Click);
     //
     // colorPickerCustomScheme
     //
     this.colorPickerCustomScheme.AutoExpandOnClick = true;
     this.colorPickerCustomScheme.Image             = ((System.Drawing.Bitmap)(resources.GetObject("colorPickerCustomScheme.Image")));
     this.colorPickerCustomScheme.Name = "colorPickerCustomScheme";
     this.colorPickerCustomScheme.Text = "Custom";
     this.colorPickerCustomScheme.SelectedColorChanged += new System.EventHandler(this.colorPickerCustomScheme_SelectedColorChanged);
     this.colorPickerCustomScheme.ExpandChange         += new System.EventHandler(this.colorPickerCustomScheme_ExpandChange);
     this.colorPickerCustomScheme.ColorPreview         += new DevComponents.DotNetBar.ColorPreviewEventHandler(this.colorPickerCustomScheme_ColorPreview);
     //
     // groupPanel1
     //
     this.groupPanel1.Anchor = (((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                 | System.Windows.Forms.AnchorStyles.Left)
                                | System.Windows.Forms.AnchorStyles.Right);
     this.groupPanel1.AutoScroll       = true;
     this.groupPanel1.CanvasColor      = System.Drawing.SystemColors.Control;
     this.groupPanel1.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
     this.groupPanel1.Controls.AddRange(new System.Windows.Forms.Control[] {
         this.textBoxX5,
         this.comboBoxEx1,
         this.textBoxX4,
         this.textBoxX3,
         this.textBoxX2,
         this.textBoxX1
     });
     this.groupPanel1.Location = new System.Drawing.Point(8, 40);
     this.groupPanel1.Name     = "groupPanel1";
     this.groupPanel1.Size     = new System.Drawing.Size(322, 199);
     //
     // groupPanel1.Style
     //
     this.groupPanel1.Style.BackColor2SchemePart   = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
     this.groupPanel1.Style.BackColorGradientAngle = 90;
     this.groupPanel1.Style.BackColorSchemePart    = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
     this.groupPanel1.Style.BorderBottom           = DevComponents.DotNetBar.eStyleBorderType.Solid;
     this.groupPanel1.Style.BorderBottomWidth      = 1;
     this.groupPanel1.Style.BorderColorSchemePart  = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
     this.groupPanel1.Style.BorderLeft             = DevComponents.DotNetBar.eStyleBorderType.Solid;
     this.groupPanel1.Style.BorderLeftWidth        = 1;
     this.groupPanel1.Style.BorderRight            = DevComponents.DotNetBar.eStyleBorderType.Solid;
     this.groupPanel1.Style.BorderRightWidth       = 1;
     this.groupPanel1.Style.BorderTop           = DevComponents.DotNetBar.eStyleBorderType.Solid;
     this.groupPanel1.Style.BorderTopWidth      = 1;
     this.groupPanel1.Style.CornerDiameter      = 4;
     this.groupPanel1.Style.CornerType          = DevComponents.DotNetBar.eCornerType.Rounded;
     this.groupPanel1.Style.Font                = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
     this.groupPanel1.Style.TextAlignment       = DevComponents.DotNetBar.eStyleTextAlignment.Center;
     this.groupPanel1.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
     this.groupPanel1.Style.TextLineAlignment   = DevComponents.DotNetBar.eStyleTextAlignment.Near;
     this.groupPanel1.TabIndex = 1;
     this.groupPanel1.Text     = "Customer Data";
     //
     // textBoxX5
     //
     this.textBoxX5.AutoSize = false;
     //
     // textBoxX5.Border
     //
     this.textBoxX5.Border.Class = "TextBoxBorder";
     this.textBoxX5.Location     = new System.Drawing.Point(16, 168);
     this.textBoxX5.Multiline    = true;
     this.textBoxX5.Name         = "textBoxX5";
     this.textBoxX5.ScrollBars   = System.Windows.Forms.ScrollBars.Vertical;
     this.textBoxX5.Size         = new System.Drawing.Size(264, 104);
     this.textBoxX5.TabIndex     = 5;
     //
     // comboBoxEx1
     //
     this.comboBoxEx1.DisplayMember = "Text";
     this.comboBoxEx1.DrawMode      = System.Windows.Forms.DrawMode.OwnerDrawFixed;
     this.comboBoxEx1.Location      = new System.Drawing.Point(16, 104);
     this.comboBoxEx1.Name          = "comboBoxEx1";
     this.comboBoxEx1.Size          = new System.Drawing.Size(264, 21);
     this.comboBoxEx1.TabIndex      = 4;
     this.comboBoxEx1.WatermarkText = "Choose State";
     //
     // textBoxX4
     //
     this.textBoxX4.AutoSize = false;
     //
     // textBoxX4.Border
     //
     this.textBoxX4.Border.Class  = "TextBoxBorder";
     this.textBoxX4.Location      = new System.Drawing.Point(16, 136);
     this.textBoxX4.Name          = "textBoxX4";
     this.textBoxX4.Size          = new System.Drawing.Size(264, 20);
     this.textBoxX4.TabIndex      = 3;
     this.textBoxX4.WatermarkText = "Post code";
     //
     // textBoxX3
     //
     this.textBoxX3.AutoSize = false;
     //
     // textBoxX3.Border
     //
     this.textBoxX3.Border.Class  = "TextBoxBorder";
     this.textBoxX3.Location      = new System.Drawing.Point(16, 72);
     this.textBoxX3.Name          = "textBoxX3";
     this.textBoxX3.Size          = new System.Drawing.Size(264, 20);
     this.textBoxX3.TabIndex      = 2;
     this.textBoxX3.WatermarkText = "Address";
     //
     // textBoxX2
     //
     this.textBoxX2.AutoSize = false;
     //
     // textBoxX2.Border
     //
     this.textBoxX2.Border.Class  = "TextBoxBorder";
     this.textBoxX2.Location      = new System.Drawing.Point(16, 40);
     this.textBoxX2.Name          = "textBoxX2";
     this.textBoxX2.Size          = new System.Drawing.Size(264, 20);
     this.textBoxX2.TabIndex      = 1;
     this.textBoxX2.WatermarkText = "Last Name";
     //
     // textBoxX1
     //
     this.textBoxX1.AutoSize = false;
     //
     // textBoxX1.Border
     //
     this.textBoxX1.Border.Class  = "TextBoxBorder";
     this.textBoxX1.Location      = new System.Drawing.Point(16, 8);
     this.textBoxX1.Name          = "textBoxX1";
     this.textBoxX1.Size          = new System.Drawing.Size(264, 20);
     this.textBoxX1.TabIndex      = 0;
     this.textBoxX1.WatermarkText = "First Name";
     //
     // buttonX1
     //
     this.buttonX1.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
     this.buttonX1.Anchor         = (System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right);
     this.buttonX1.ColorScheme.DockSiteBackColorGradientAngle = 0;
     this.buttonX1.Location = new System.Drawing.Point(258, 247);
     this.buttonX1.Name     = "buttonX1";
     this.buttonX1.Size     = new System.Drawing.Size(72, 24);
     this.buttonX1.TabIndex = 2;
     this.buttonX1.Text     = "Close";
     this.buttonX1.Click   += new System.EventHandler(this.buttonX1_Click);
     //
     // Form1
     //
     this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
     this.BackColor         = System.Drawing.Color.FromArgb(((System.Byte)(194)), ((System.Byte)(217)), ((System.Byte)(247)));
     this.ClientSize        = new System.Drawing.Size(338, 277);
     this.Controls.AddRange(new System.Windows.Forms.Control[] {
         this.buttonX1,
         this.groupPanel1,
         this.bar1
     });
     this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
     this.Icon            = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
     this.MaximizeBox     = false;
     this.MinimizeBox     = false;
     this.Name            = "Form1";
     this.Text            = "Drop-in replacement controls";
     this.Load           += new System.EventHandler(this.Form1_Load);
     ((System.ComponentModel.ISupportInitialize)(this.bar1)).EndInit();
     this.groupPanel1.ResumeLayout(false);
     this.ResumeLayout(false);
 }
Esempio n. 20
0
 private eDockSide GetDockSide(Bar bar)
 {
     if (bar.Parent == null)
         return eDockSide.None;
     else if (bar.Parent.Dock == DockStyle.Left)
         return eDockSide.Left;
     else if (bar.Parent.Dock == DockStyle.Right)
         return eDockSide.Right;
     else if (bar.Parent.Dock == DockStyle.Top)
         return eDockSide.Top;
     else if (bar.Parent.Dock == DockStyle.Bottom)
         return eDockSide.Bottom;
     else if (bar.Parent.Dock == DockStyle.Fill)
         return eDockSide.Document;
     return eDockSide.None;
 }
Esempio n. 21
0
		private void RestoreBarStyle(Bar bar)
		{
            if (m_Container != null && m_Container.Owner != null && m_Container.Owner.ApplyDocumentBarStyle && m_Container.Dock == DockStyle.Fill)
			{
				BarFunctions.RestoreAutoDocumentBarStyle(bar);
			}
		}
Esempio n. 22
0
        /// <summary>
        /// Adjusts the size of the dock container if needed after a bar has been docked to it.
        /// </summary>
        /// <param name="barToDock">Bar object that has been docked.</param>
        /// <param name="visibleChanged">Indicates that bar was already docked but its Visible property has changed</param>
        internal void AdjustContainerSize(Bar barToDock, bool visibleChanged)
        {
            if (m_Container.Owner != null && m_Container.Owner.IsLoadingLayout) return;

            // Adjust the size of the container since it dictates the size of the bars docked inside
            if (m_Container.Dock != DockStyle.Fill)
            {
                DocumentBaseContainer doc = this.GetDocumentFromBar(barToDock);
                if (doc == null) return;
                if (m_Container.Dock == DockStyle.Left || m_Container.Dock == DockStyle.Right)
                {
                    if (m_Container.Width == 0 || doc.Parent == m_DocumentDockContainer &&
                        (m_DocumentDockContainer.Orientation == eOrientation.Horizontal || visibleChanged && m_DocumentDockContainer.Documents.Count == 1))
                    {
                        int width = barToDock.GetBarDockedSize(eOrientation.Vertical);
                        if (barToDock.Width > 0 && barToDock.Width<m_Container.Width) width = barToDock.Width;
                        int clientWidth = GetClientWidth();

                        if (barToDock.Visible)
                        {
                            if (width > clientWidth)
                                width = barToDock.MinimumDockSize(eOrientation.Vertical).Width * 2;
                            if (width > clientWidth)
                                width = barToDock.MinimumDockSize(eOrientation.Vertical).Width;
                        }
                        
						if(doc.LayoutBounds.Width == 0)
							doc.SetLayoutBounds(new Rectangle(doc.LayoutBounds.X, doc.LayoutBounds.Y, width, doc.LayoutBounds.Height));
                        width += m_DocumentDockContainer.SplitterSize;
                        if (visibleChanged)
                        {
                            if(barToDock.Visible)
                                m_Container.Width += width;
                            else if(m_Container.Width>0)
                                m_Container.Width -= Math.Min(width, m_Container.Width);
                        }
                        else
                            m_Container.Width += width;
                        m_Container.Invalidate();
                    }
                }
                else if (m_Container.Dock == DockStyle.Top || m_Container.Dock == DockStyle.Bottom)
                {
                    if (m_Container.Height == 0 || doc.Parent == m_DocumentDockContainer &&
                        (m_DocumentDockContainer.Orientation == eOrientation.Vertical || visibleChanged && m_DocumentDockContainer.Documents.Count == 1))
                    {
                        int height = barToDock.GetBarDockedSize(eOrientation.Horizontal);
                        if (barToDock.Height > 0 && barToDock.Height<m_Container.Height) height = barToDock.Height;
                        int clientHeight = GetClientHeight();

                        if (barToDock.Visible)
                        {
                            if (height > clientHeight)
                                height = barToDock.MinimumDockSize(eOrientation.Horizontal).Height * 2;
                            if (height > clientHeight)
                                height = barToDock.MinimumDockSize(eOrientation.Horizontal).Height;
                        }
                        
						if(doc.LayoutBounds.Height == 0)
							doc.SetLayoutBounds(new Rectangle(doc.LayoutBounds.X, doc.LayoutBounds.Y, doc.LayoutBounds.Width, height));
                        height += m_DocumentDockContainer.SplitterSize;
                        if (visibleChanged)
                        {
                            if (barToDock.Visible)
                                m_Container.Height += height;
                            else if (m_Container.Height > 0)
                                m_Container.Height -= Math.Min(height, m_Container.Height);
                        }
                        else
                            m_Container.Height += height;
                        m_Container.Invalidate();
                    }
                }
            }
        }
Esempio n. 23
0
		public void UnDock(Bar barToUnDock)
		{
			UnDock(barToUnDock,true);
		}
Esempio n. 24
0
		/// <summary>
		/// Docks specified bar by appending it to the container. Bar will be added according to the container's orientation.
		/// </summary>
		/// <param name="barToDock">Bar to dock.</param>
		public void Dock(Bar barToDock)
		{
			Dock(null,barToDock,eDockSide.None);
		}
Esempio n. 25
0
		/// <summary>
		/// Returns DocumentBaseContainer that holds the reference bar.
		/// </summary>
		/// <param name="bar">Bar to return document container for.</param>
		/// <returns>Returns null if document container cannot  be found or reference to the document container.</returns>
		public DocumentBaseContainer GetDocumentFromBar(Bar bar)
		{
			if(bar==null)
				return null;
			return GetDocumentFromBar(bar,m_DocumentDockContainer);
		}
Esempio n. 26
0
		/// <summary>
		/// Sets the height of the bar that is managed by this document layout. Height can be set only if parent container has
		/// vertical orientation. Note that bar minimum size is respected by this method and
		/// it will be enforced. If height is less than minimum height bar's height will be set to minimum height.
		/// </summary>
		/// <param name="bar">Reference to bar object.</param>
		/// <param name="height">Desired height.</param>
		public void SetBarHeight(Bar bar, int height)
		{
			DocumentBarContainer docBar=GetDocumentFromBar(bar) as DocumentBarContainer;
			if(docBar==null)
				return;

            if (m_Container!=null && (m_Container.Dock == DockStyle.Top || m_Container.Dock== DockStyle.Bottom) && 
                docBar.Parent == m_DocumentDockContainer
                /*&& (m_DocumentDockContainer.Orientation == eOrientation.Horizontal || m_DocumentDockContainer.Documents.Count == 1)*/)
            {
                //m_Container.Height += (height - bar.Height);
                //m_DocumentDockContainer.SetHeight(height);
                m_Container.SuspendLayout();
                int diff = height;
                if (docBar.DisplayBounds.Height == 0)
                    diff -= bar.GetBarDockedSize(eOrientation.Vertical);
                else
                    diff -= docBar.DisplayBounds.Height;
                m_Container.Height += diff;
                //((DocumentDockContainer)docBar.Parent).SetHeight(height);
                docBar.SetHeight(height);
                m_Container.ResumeLayout(true);
            }
            else if (docBar.Parent is DocumentDockContainer && ((DocumentDockContainer)docBar.Parent).Orientation == eOrientation.Horizontal)
            {
                ((DocumentDockContainer)docBar.Parent).SetHeight(height);
            }
            else
            {
                if (height < docBar.MinimumSize.Height)
                    height = docBar.MinimumSize.Height;
                docBar.SetHeight(height);
            }
			m_Container.RecalcLayout();
		}
Esempio n. 27
0
 private bool IsGradientBackground(Bar bar)
 {
     if (bar.Style == eDotNetBarStyle.VS2005 && bar.LayoutType == eLayoutType.DockContainer)
         return false;
     return true;
 }
Esempio n. 28
0
        public DevComponents.DotNetBar.DockContainerItem CreateDockContainerItem(string ItemName, string ItemText, DevComponents.DotNetBar.PanelDockContainer panelDockContainer, DevComponents.DotNetBar.Bar bar)
        {
            DevComponents.DotNetBar.DockContainerItem dockContainerItem = new DockContainerItem();
            dockContainerItem.Control = panelDockContainer;
            dockContainerItem.Name    = ItemName;
            dockContainerItem.Text    = ItemText;

            bar.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] { dockContainerItem });

            return(dockContainerItem);
        }
Esempio n. 29
0
		/// <summary>
		/// Sets the width of the bar that is managed by this document layout. Width can be set only if parent container has
		/// Horizontal orientation. Note that bar minimum size is respected by this method and
		/// it will be enforced. If width is less than minimum width bar's width will be set to minimum width.
		/// </summary>
		/// <param name="bar">Reference to bar object.</param>
		/// <param name="width">Desired width.</param>
		public void SetBarWidth(Bar bar, int width)
		{
			DocumentBarContainer docBar=GetDocumentFromBar(bar) as DocumentBarContainer;
			if(docBar==null)
				return;
			if(docBar.Parent == m_DocumentDockContainer && (m_Container.Dock == DockStyle.Left || m_Container.Dock == DockStyle.Right)
				/*&& (m_DocumentDockContainer.Orientation == eOrientation.Vertical || m_DocumentDockContainer.Documents.Count == 1)*/)
			{
				m_Container.SuspendLayout();
				int diff = width;
				if(docBar.DisplayBounds.Width == 0)
					diff -= bar.GetBarDockedSize(eOrientation.Vertical);
				else
					diff -= docBar.DisplayBounds.Width;
                if (diff != 0)
                {
                    m_Container.Width += diff;
                    docBar.SetWidth(width);
                }
				//((DocumentDockContainer)docBar.Parent).SetWidth(width);
				m_Container.ResumeLayout(true);
			}
            else if (docBar.Parent is DocumentDockContainer && ((DocumentDockContainer)docBar.Parent).Orientation == eOrientation.Vertical)
            {
                ((DocumentDockContainer)docBar.Parent).SetWidth(width);
            }
            else
            {
                if (width < docBar.MinimumSize.Width)
                    width = docBar.MinimumSize.Width;
                docBar.SetWidth(width);
            }
			m_Container.RecalcLayout();
		}
Esempio n. 30
0
		private bool AnimateHide(Bar bar)
		{
			return bar.AnimateHide();
		}
Esempio n. 31
0
        private Rectangle GetEdgeDockPreviewRectangle(Bar bar, ref DockSiteInfo dockInfo)
        {
            Rectangle r = Rectangle.Empty;
            int fullSizeIndex = -1;
            int partialSizeIndex = -1;
            if (dockInfo.FullSizeDock)
                fullSizeIndex = m_Container.GetFullSizeIndex();
            else if (dockInfo.PartialSizeDock)
                partialSizeIndex = m_Container.GetPartialSizeIndex();

            // Docks the bar to the edge
            switch (m_Container.Dock)
            {
                case DockStyle.Top:
                    {
                        r.Width = m_Container.ClientRectangle.Width;
                        r.Height = bar.GetBarDockedSize(eOrientation.Horizontal);

                        if (fullSizeIndex >= 0)
                        {
                            r.Width += m_Container.GetSiteZOrderSize(m_Container.Owner.LeftDockSite, true).Width;
                            r.Width += m_Container.GetSiteZOrderSize(m_Container.Owner.RightDockSite, true).Width;
                            dockInfo.DockSiteZOrderIndex = fullSizeIndex;
                        }
                        else if (partialSizeIndex >= 0)
                        {
                            // Reduce by the size of the left and right dock site
                            r.Width -= m_Container.GetSiteZOrderSize(m_Container.Owner.LeftDockSite, false).Width;
                            r.Width -= m_Container.GetSiteZOrderSize(m_Container.Owner.RightDockSite, false).Width;
                            dockInfo.DockSiteZOrderIndex = partialSizeIndex;

                        }

                        Point p = Point.Empty;
                        if (dockInfo.DockLine == -1)
                        {
                            p = m_Container.PointToScreen(m_Container.ClientRectangle.Location);
                        }
                        else
                        {
                            p = m_Container.PointToScreen(new Point(m_Container.ClientRectangle.X, m_Container.ClientRectangle.Bottom));
                            p.Y++;
                        }
                        if (fullSizeIndex >= 0)
                            p.X -= m_Container.GetSiteZOrderSize(m_Container.Owner.LeftDockSite, true).Width;
                        else if (partialSizeIndex >= 0)
                            p.X += m_Container.GetSiteZOrderSize(m_Container.Owner.LeftDockSite, false).Width;
                        r.Location = p;
                        break;
                    }
                case DockStyle.Bottom:
                    {
                        r.Width = m_Container.ClientRectangle.Width;
                        r.Height = bar.GetBarDockedSize(eOrientation.Horizontal);
                        if (fullSizeIndex >= 0)
                        {
                            r.Width += m_Container.GetSiteZOrderSize(m_Container.Owner.LeftDockSite, true).Width;
                            r.Width += m_Container.GetSiteZOrderSize(m_Container.Owner.RightDockSite, true).Width;
                            dockInfo.DockSiteZOrderIndex = fullSizeIndex;
                        }
                        else if (partialSizeIndex >= 0)
                        {
                            // Reduce by the size of the left and right dock site
                            r.Width -= m_Container.GetSiteZOrderSize(m_Container.Owner.LeftDockSite, false).Width;
                            r.Width -= m_Container.GetSiteZOrderSize(m_Container.Owner.RightDockSite, false).Width;
                            dockInfo.DockSiteZOrderIndex = partialSizeIndex;

                        }

                        Point p = Point.Empty;
                        if (dockInfo.DockLine == -1)
                        {
                            p = m_Container.PointToScreen(new Point(m_Container.ClientRectangle.X, m_Container.ClientRectangle.Y - r.Height));
                        }
                        else
                        {
                            p = m_Container.PointToScreen(new Point(m_Container.ClientRectangle.X, m_Container.ClientRectangle.Bottom - r.Height));
                            p.Y++;
                        }
                        if (fullSizeIndex >= 0)
                            p.X -= m_Container.GetSiteZOrderSize(m_Container.Owner.LeftDockSite, true).Width;
                        else if (partialSizeIndex >= 0)
                            p.X += m_Container.GetSiteZOrderSize(m_Container.Owner.LeftDockSite, false).Width;
                        r.Location = p;
                        break;
                    }
                case DockStyle.Right:
                    {
                        r.Height = m_Container.ClientRectangle.Height;

                        if (fullSizeIndex >= 0)
                        {
                            r.Height += m_Container.GetSiteZOrderSize(m_Container.Owner.TopDockSite, true).Height;
                            r.Height += m_Container.GetSiteZOrderSize(m_Container.Owner.BottomDockSite, true).Height;
                            dockInfo.DockSiteZOrderIndex = fullSizeIndex;
                        }
                        else if (partialSizeIndex >= 0)
                        {
                            // Reduce by the size of the top and bottom dock site
                            r.Height -= m_Container.GetSiteZOrderSize(m_Container.Owner.TopDockSite, false).Height;
                            r.Height -= m_Container.GetSiteZOrderSize(m_Container.Owner.BottomDockSite, false).Height;
                            dockInfo.DockSiteZOrderIndex = partialSizeIndex;

                        }

                        r.Width = bar.GetBarDockedSize(eOrientation.Vertical);
                        Point p = Point.Empty;
                        if (dockInfo.DockLine == -1)
                        {
                            p = m_Container.PointToScreen(new Point(m_Container.ClientRectangle.X - r.Width, m_Container.ClientRectangle.Y));
                        }
                        else
                        {
                            p = m_Container.PointToScreen(new Point(m_Container.ClientRectangle.Right - r.Width, m_Container.ClientRectangle.Y));
                            p.X--;
                        }
                        if (fullSizeIndex >= 0)
                            p.Y -= m_Container.GetSiteZOrderSize(m_Container.Owner.TopDockSite, true).Height;
                        else if (partialSizeIndex >= 0)
                            p.Y += m_Container.GetSiteZOrderSize(m_Container.Owner.TopDockSite, false).Height;
                        r.Location = p;
                        break;
                    }
                default:
                    {
                        r.Height = m_Container.ClientRectangle.Height;
                        if (fullSizeIndex >= 0)
                        {
                            r.Height += m_Container.GetSiteZOrderSize(m_Container.Owner.TopDockSite, true).Height;
                            r.Height += m_Container.GetSiteZOrderSize(m_Container.Owner.BottomDockSite, true).Height;
                            dockInfo.DockSiteZOrderIndex = fullSizeIndex;
                        }
                        else if (partialSizeIndex >= 0)
                        {
                            // Reduce by the size of the top and bottom dock site
                            r.Height -= m_Container.GetSiteZOrderSize(m_Container.Owner.TopDockSite, false).Height;
                            r.Height -= m_Container.GetSiteZOrderSize(m_Container.Owner.BottomDockSite, false).Height;
                            dockInfo.DockSiteZOrderIndex = partialSizeIndex;

                        }
                        r.Width = bar.GetBarDockedSize(eOrientation.Vertical);

                        Point p = Point.Empty;
                        if (dockInfo.DockLine == -1)
                        {
                            p = m_Container.PointToScreen(new Point(m_Container.ClientRectangle.X, m_Container.ClientRectangle.Y));
                        }
                        else
                        {
                            p = m_Container.PointToScreen(new Point(m_Container.ClientRectangle.Right, m_Container.ClientRectangle.Y));
                            p.X++;
                        }
                        if (fullSizeIndex >= 0)
                            p.Y -= m_Container.GetSiteZOrderSize(m_Container.Owner.TopDockSite, true).Height;
                        else if (partialSizeIndex >= 0)
                            p.Y += m_Container.GetSiteZOrderSize(m_Container.Owner.TopDockSite, false).Height;
                        r.Location = p;
                        break;
                    }
            }

            return r;
        }
Esempio n. 32
0
		private bool AnimateShow(Bar bar)
		{
			if(bar.Enabled)
				return bar.AnimateShow();
            return false;
		}
Esempio n. 33
0
		private DocumentBaseContainer GetDocumentFromBar(Bar bar, DocumentDockContainer dockContainer)
		{
			foreach(DocumentBaseContainer doc in dockContainer.Documents)
			{
				if(doc is DocumentBarContainer && ((DocumentBarContainer)doc).Bar==bar)
					return doc;
				else if(doc is DocumentDockContainer)
				{
					DocumentBaseContainer d=GetDocumentFromBar(bar,doc as DocumentDockContainer);
					if(d!=null)
						return d;
				}
			}
			return null;
		}
Esempio n. 34
0
		/// <summary>
		/// Sets bars position on the auto-hide panel.
		/// </summary>
		/// <param name="bar">Bar for which position should be changed.</param>
		/// <param name="iIndex">New indexed position of the bar.</param>
		public void SetBarPosition(Bar bar, int iIndex)
		{
			if(iIndex<m_Panels.Count)
			{
				for(int i=0;i<m_Panels.Count;i++)
				{
					if(((PanelBar)m_Panels[i]).BoundBar==bar)
					{
						if(i!=iIndex)
						{
							PanelBar panel=(PanelBar)m_Panels[i];
							m_Panels.RemoveAt(i);
							m_Panels.Insert(iIndex,panel);
							this.Refresh();
						}
						break;
					}
				}
			}
		}
Esempio n. 35
0
        /// <summary>
        /// Docks specified bar by appending it to the container. Bar will be added according to the container's orientation.
        /// </summary>
        /// <param name="barToDock">Bar to dock.</param>
        /// <param name="dockSide">Side to dock bar at.</param>
		public void Dock(Bar referenceBar, Bar barToDock, eDockSide dockSide)
		{
			if(dockSide==eDockSide.None && barToDock.Parent==m_Container)
			{
				ApplyBarStyle(barToDock);
				return;
			}

			if(barToDock.Parent is DockSite && ((DockSite)barToDock.Parent).DocumentDockContainer!=null)
				((DockSite)barToDock.Parent).GetDocumentUIManager().UnDock(barToDock);
			else if(barToDock.Parent is DockSite && barToDock.Parent!=m_Container)
				((DockSite)barToDock.Parent).RemoveBar(barToDock);
            else if (barToDock.Parent != null && barToDock.Parent != m_Container)
            {
                if (barToDock.Parent is FloatingContainer)
                {
                    barToDock.RemoveFromFloatingContainer();
                    barToDock.SetBarState(eBarState.Docked);
                }
                else
                    barToDock.Parent.Controls.Remove(barToDock);
            }

			if(!m_LoadingLayout)
			{
				// TODO: Add Docking as Document, i.e. add DockContainerItems from barToDock...
				DocumentBarContainer doc=this.CreateDocumentBarContainer(barToDock);
                DocumentBaseContainer referenceDoc = this.GetDocumentFromBar(referenceBar);

                if (referenceBar == null || dockSide == eDockSide.None || referenceBar == barToDock || referenceDoc == null)
				{
                    if (m_Container.Dock == DockStyle.Fill)
                        m_DocumentDockContainer.Documents.Add(doc);
                    else
                    {
                        eOrientation containerOrientation = eOrientation.Horizontal; // Needed container orientation
                        if (m_Container.Dock == DockStyle.Top || m_Container.Dock == DockStyle.Bottom)
                            containerOrientation = eOrientation.Vertical;

                        // Switch orientation when adding new bar if possible
                        if (m_DocumentDockContainer.Orientation != containerOrientation)
                        {
                            if (m_DocumentDockContainer.Documents.Count <= 1)
                            {
                                m_DocumentDockContainer.Orientation = containerOrientation;
                                if (IsAddedInFront(dockSide))
                                    m_DocumentDockContainer.Documents.Insert(0, doc);
                                else
                                    m_DocumentDockContainer.Documents.Add(doc);
                            }
                            else
                            {
                                DocumentBaseContainer[] docs = new DocumentBaseContainer[m_DocumentDockContainer.Documents.Count];
                                m_DocumentDockContainer.Documents.CopyTo(docs);
                                m_DocumentDockContainer.Documents.Clear();

                                DocumentDockContainer newParent = new DocumentDockContainer(docs, m_DocumentDockContainer.Orientation);
								newParent.SetLayoutBounds(m_DocumentDockContainer.DisplayBounds);
                                m_DocumentDockContainer.Orientation = containerOrientation;
                                m_DocumentDockContainer.Documents.Add(newParent);
                                if (IsAddedInFront(dockSide))
                                    m_DocumentDockContainer.Documents.Insert(0, doc);
                                else
                                    m_DocumentDockContainer.Documents.Add(doc);
                            }
                        }
                        else
                        {
                            if (IsAddedInFront(dockSide))
                                m_DocumentDockContainer.Documents.Insert(0, doc);
                            else
                                m_DocumentDockContainer.Documents.Add(doc);
                        }
                    }
				}
				else
				{
					DocumentDockContainer parent=referenceDoc.Parent as DocumentDockContainer;

					referenceDoc.SetLayoutBounds(Rectangle.Empty);
					doc.SetLayoutBounds(Rectangle.Empty);

					if((parent.Orientation==eOrientation.Horizontal && (dockSide==eDockSide.Left || dockSide==eDockSide.Right)) ||
						(parent.Orientation==eOrientation.Vertical && (dockSide==eDockSide.Top || dockSide==eDockSide.Bottom)))
					{
						if(dockSide==eDockSide.Right || dockSide==eDockSide.Bottom)
							parent.Documents.Insert(parent.Documents.IndexOf(referenceDoc)+1,doc);
						else
							parent.Documents.Insert(parent.Documents.IndexOf(referenceDoc),doc);
					}
					else if(parent.Documents.Count==1)
					{
						// Orientation of the parent dock container can be changed
						if(parent.Orientation==eOrientation.Vertical)
							parent.Orientation=eOrientation.Horizontal;
						else
							parent.Orientation=eOrientation.Vertical;

						if(dockSide==eDockSide.Right || dockSide==eDockSide.Bottom)
							parent.Documents.Insert(parent.Documents.IndexOf(referenceDoc)+1,doc);
						else
							parent.Documents.Insert(parent.Documents.IndexOf(referenceDoc),doc);
					}
					else
					{
						// New DocumentDockContainer needs to be inserted with appropriate orientation and referenceBar needs
						// to be moved into it.
						DocumentDockContainer newParent=new DocumentDockContainer();
						if(parent.Orientation==eOrientation.Horizontal)
							newParent.Orientation=eOrientation.Vertical;
						else
							newParent.Orientation=eOrientation.Horizontal;

						parent.Documents.Insert(parent.Documents.IndexOf(referenceDoc),newParent);
						parent.Documents.Remove(referenceDoc);
	                    
						if(dockSide==eDockSide.Right || dockSide==eDockSide.Bottom)
						{
							newParent.Documents.Add(referenceDoc);
							newParent.Documents.Add(doc);
						}
						else
						{
							newParent.Documents.Add(doc);
							newParent.Documents.Add(referenceDoc);
						}
					}
				}

                AdjustContainerSize(barToDock, false);
			}

			if(m_Container!=null)
			{
				if(barToDock.Parent==null)
					m_Container.Controls.Add(barToDock);
                ApplyBarStyle(barToDock);	
				m_Container.RecalcLayout();
			}
			else
				ApplyBarStyle(barToDock);
		}
Esempio n. 36
0
		public void AddBar(Bar bar)
		{
			if(bar.Style==eDotNetBarStyle.Office2003)
				m_Style=eDotNetBarStyle.Office2003;
			else if(bar.Style==eDotNetBarStyle.VS2005)
				m_Style=eDotNetBarStyle.VS2005;
            else if (bar.Style == eDotNetBarStyle.Office2007)
                m_Style = eDotNetBarStyle.Office2007;
            else if (bar.Style == eDotNetBarStyle.Office2010)
                m_Style = eDotNetBarStyle.Office2010;
            else if (bar.Style == eDotNetBarStyle.Windows7)
                m_Style = eDotNetBarStyle.Windows7;
            else if (bar.Style == eDotNetBarStyle.StyleManagerControlled)
                m_Style = bar.ItemsContainer.EffectiveStyle;
			else
				m_Style=eDotNetBarStyle.OfficeXP;

			PanelBar panel=new PanelBar(this,bar);
			m_Panels.Add(panel);
			if(this.Dock==DockStyle.Right || this.Dock==DockStyle.Left)
			{
				if(panel.PanelSize.Height>this.Width)
					this.Width=panel.PanelSize.Height;
			}
			else
			{
				if(panel.PanelSize.Height>this.Height)
					this.Height=panel.PanelSize.Height;
			}

			if(!this.Visible)
			{
				BarFunctions.SetControlVisible(this,true);
			}
			else
				this.Refresh();
			this.Parent.PerformLayout();
			this.Parent.Update();
		}
Esempio n. 37
0
		/// <summary>
		/// Estimates the docking position and size of a given bar for outline purposes during drag&drop
		/// </summary>
		/// <param name="bar">Bar to find estimated docking position and size for</param>
		/// <param name="pDockInfo">Docking information</param>
		/// <returns>Preview Rectangle in screen coordinates.</returns>
		internal Rectangle GetDockPreviewRectangle(Bar bar, ref DockSiteInfo dockInfo)
		{
			DocumentBaseContainer referenceDoc=GetDocumentFromBar(dockInfo.MouseOverBar);
			Rectangle r=Rectangle .Empty;

            // Handle edge case docking first
            if (m_Container.Dock!= DockStyle.Fill && (dockInfo.DockLine == 999 || dockInfo.DockLine == -1))
            {
                return GetEdgeDockPreviewRectangle(bar, ref dockInfo);
            }
			else if(referenceDoc!=null)
			{
				if(dockInfo.MouseOverDockSide==eDockSide.Left)
				{
					r=referenceDoc.DisplayBounds;
					r.Width=r.Width/2;
				}
				else if(dockInfo.MouseOverDockSide==eDockSide.Right)
				{
					r=referenceDoc.DisplayBounds;
					r.X+=r.Width/2;
					r.Width=r.Width/2;
				}
				else if(dockInfo.MouseOverDockSide==eDockSide.Top)
				{
					r=referenceDoc.DisplayBounds;
					r.Height=r.Height/2;
				}
				else if(dockInfo.MouseOverDockSide==eDockSide.Bottom)
				{
					r=referenceDoc.DisplayBounds;
					r.Y+=r.Height/2;
					r.Height=r.Height/2;
				}
				else if(dockInfo.MouseOverDockSide==eDockSide.Document)
				{
					r=referenceDoc.DisplayBounds;
				}
				r.Location=m_Container.PointToScreen(r.Location);
			}
			else
			{
                if (m_Container.Dock == DockStyle.Fill)
                {
                    r = m_Container.ClientRectangle;
                    r.Location = m_Container.PointToScreen(r.Location);
                }
                else if (m_Container.Dock == DockStyle.Right)
                {
                    r = m_Container.ClientRectangle;
                    r.Location = m_Container.PointToScreen(r.Location);
                    if (r.Width == 0)
                    {
                        r.Width = bar.GetBarDockedSize(eOrientation.Vertical);
                        r.X -= r.Width;
                    }
                }
                else if (m_Container.Dock == DockStyle.Left)
                {
                    r = m_Container.ClientRectangle;
                    r.Location = m_Container.PointToScreen(r.Location);
                    if (r.Width == 0)
                    {
                        r.Width = bar.GetBarDockedSize(eOrientation.Vertical);
                    }
                }
                else if (m_Container.Dock == DockStyle.Top)
                {
                    r = m_Container.ClientRectangle;
                    r.Location = m_Container.PointToScreen(r.Location);
                    if (r.Height == 0)
                    {
                        r.Height = bar.GetBarDockedSize(eOrientation.Horizontal);
                    }
                }
                else if (m_Container.Dock == DockStyle.Bottom)
                {
                    r = m_Container.ClientRectangle;
                    r.Location = m_Container.PointToScreen(r.Location);
                    if (r.Height == 0)
                    {
                        r.Height = bar.GetBarDockedSize(eOrientation.Horizontal);
                        r.Y -= r.Height;
                    }
                }
			}

			return r;
		}
Esempio n. 38
0
		public void RemoveBar(Bar bar)
		{
			foreach(PanelBar panel in m_Panels)
			{
				if(panel.BoundBar==bar)
				{
					m_Panels.Remove(panel);
					panel.Dispose();
					if(m_Panels.Count==0)
					{
						this.Visible=false;
						if(this.Dock==DockStyle.Right || this.Dock==DockStyle.Left)
						{
							this.Width=0;
						}
						else
						{
							this.Height=0;
						}
					}
					else
						this.Refresh();
					break;
				}
			}
			if(m_Panels.Count==0)
				DestroyTimer();
		}
Esempio n. 39
0
 internal void SaveLastDockInfo(Bar bar, DocumentBarContainer doc, DockSiteInfo info)
 {
     if (bar.m_LastDockSiteInfo == null) return;
     //bar.m_LastDockSiteInfo.LastRelativeDockToBar = null;
     //bar.m_LastDockSiteInfo.LastRelativeDocumentId = -1;
     // Tries to find relative dock-to-bar so un-docked bar can be returned back
     if (!(doc.Parent is DocumentDockContainer)) return;
     DocumentDockContainer dockParent = (DocumentDockContainer)doc.Parent;
     DocumentBaseContainer nextBarDocument = GetNextDocument(dockParent, dockParent.Documents.IndexOf(doc));
     if (nextBarDocument == null)
     {
         DocumentBaseContainer prevBarDocument = GetPreviousDocument(dockParent, dockParent.Documents.IndexOf(doc));
         if (prevBarDocument != null)
         {
             Bar prevBar = null;
             if (prevBarDocument is DocumentBarContainer)
             {
                 prevBar = ((DocumentBarContainer)prevBarDocument).Bar;
                 bar.m_LastDockSiteInfo.LastRelativeDockToBar = prevBar;
                 prevBar.m_LastDockSiteInfo.LastRelativeDockToBar = bar;
                 prevBar.m_LastDockSiteInfo.LastRelativeDocumentId = doc.Id;
             }
             bar.m_LastDockSiteInfo.LastRelativeDocumentId = prevBarDocument.Id;
             if (dockParent.Orientation == eOrientation.Horizontal)
             {
                 bar.LastDockSide = eDockSide.Right;
                 if (prevBar != null) prevBar.LastDockSide = eDockSide.Left;
             }
             else
             {
                 bar.LastDockSide = eDockSide.Bottom;
                 if (prevBar != null) prevBar.LastDockSide = eDockSide.Top;
             }
         }
     }
     else
     {
         Bar nextBar = null;
         if (nextBarDocument is DocumentBarContainer)
         {
             nextBar = ((DocumentBarContainer)nextBarDocument).Bar;
             bar.m_LastDockSiteInfo.LastRelativeDockToBar = nextBar;
             nextBar.m_LastDockSiteInfo.LastRelativeDockToBar = bar;
             nextBar.m_LastDockSiteInfo.LastRelativeDocumentId = doc.Id;
         }
         bar.m_LastDockSiteInfo.LastRelativeDocumentId = nextBarDocument.Id;
         if (dockParent.Orientation == eOrientation.Horizontal)
         {
             bar.LastDockSide = eDockSide.Left;
             if (nextBar != null) nextBar.LastDockSide = eDockSide.Right;
         }
         else
         {
             bar.LastDockSide = eDockSide.Top;
             if (nextBar != null) nextBar.LastDockSide = eDockSide.Bottom;
         }
     }
     if (GetDockSide(bar) != eDockSide.None)
         bar.m_LastDockSiteInfo.LastDockSiteSide = GetDockSide(bar);
 }
Esempio n. 40
0
		public void RefreshBar(Bar bar)
		{
			foreach(PanelBar panel in m_Panels)
			{
				if(panel.BoundBar==bar)
				{
					panel.ReloadDockItems();
					break;
				}
			}
			this.Refresh();
		}
Esempio n. 41
0
		public void UnDock(Bar barToUnDock, bool removeFromContainer)
		{
			DocumentBarContainer doc=m_DocumentDockContainer.GetBarDocumentContainer(barToUnDock);

            if (barToUnDock.DockSide != eDockSide.None) barToUnDock.LastDockSide = barToUnDock.DockSide;
            if (doc != null)
                SaveLastDockInfo(barToUnDock, doc, barToUnDock.m_LastDockSiteInfo);
            
            int containerSizeReduction = 0;
            // Calculate the size reduction of container if needed
            if (doc != null && m_Container != null && m_Container.Dock != DockStyle.Fill)
            {
                if (m_Container.Dock == DockStyle.Left || m_Container.Dock == DockStyle.Right)
                {
                    if (doc.Parent != null && doc.Parent == m_DocumentDockContainer && m_DocumentDockContainer.Orientation == eOrientation.Horizontal)
                        containerSizeReduction = barToUnDock.Width + m_DocumentDockContainer.SplitterSize;
                }
                else if (m_Container.Dock == DockStyle.Top || m_Container.Dock == DockStyle.Bottom)
                {
                    if (doc.Parent != null && doc.Parent == m_DocumentDockContainer && m_DocumentDockContainer.Orientation == eOrientation.Vertical)
                        containerSizeReduction = barToUnDock.Height + m_DocumentDockContainer.SplitterSize;
                }
            }

            if(doc==null)
            {
                if (removeFromContainer && barToUnDock.Parent == m_Container)
                    m_Container.Controls.Remove(barToUnDock);
				RestoreBarStyle(barToUnDock);
                return;
            }
			
			DocumentDockContainer parent=doc.Parent as DocumentDockContainer;
			if(parent!=null)
			{
				parent.Documents.Remove(doc);
				if(parent!=m_DocumentDockContainer)
					RemoveEmptyContainers(parent);
				else if(parent.Documents.Count==1 && parent.Documents[0] is DocumentDockContainer)
					RemoveEmptyContainers(parent.Documents[0] as DocumentDockContainer);
			}

			if(m_Container!=null)
			{
				if(removeFromContainer)
					m_Container.Controls.Remove(barToUnDock);
				RestoreBarStyle(barToUnDock);
                bool isLoadingLayout = false;
                if (m_Container.Owner != null) isLoadingLayout = m_Container.Owner.IsLoadingLayout;
                if (!isLoadingLayout && !m_Container.IsAnyControlVisible)
                {
                    if (m_Container.Dock == DockStyle.Left || m_Container.Dock == DockStyle.Right)
                        m_Container.Width = 0;
                    else if (m_Container.Dock == DockStyle.Top || m_Container.Dock == DockStyle.Bottom)
                        m_Container.Height = 0;
                }
                else if (!isLoadingLayout && containerSizeReduction != 0)
                {
                    if (m_Container.Dock == DockStyle.Left || m_Container.Dock == DockStyle.Right)
                        m_Container.Width -= containerSizeReduction;
                    else if (m_Container.Dock == DockStyle.Top || m_Container.Dock == DockStyle.Bottom)
                        m_Container.Height -= containerSizeReduction;
                }
                else
                    m_Container.RecalcLayout();
			}
			else
				RestoreBarStyle(barToUnDock);
		}
Esempio n. 42
0
 /// <summary>
 /// Creates new instance of the object and initializes it with default data.
 /// </summary>
 /// <param name="bar">Reference to bar object.</param>
 /// <param name="g">Reference to Graphics object.</param>
 public ToolbarRendererEventArgs(Bar bar, Graphics g, Rectangle bounds)
 {
     this.Bar = bar;
     this.Graphics = g;
     this.Bounds = bounds;
 }
Esempio n. 43
0
		private DocumentBarContainer CreateDocumentBarContainer(Bar bar)
		{
			DocumentBarContainer doc=new DocumentBarContainer(bar);
			return doc;
		}
Esempio n. 44
0
		/// <summary>
		/// Returns the DocumentBarContainer object for a given bar.
		/// </summary>
		/// <param name="bar">Bar to search for.</param>
		/// <returns>Reference to container or null if bar could not be found</returns>
		public DocumentBarContainer GetBarDocumentContainer(Bar bar)
		{
			foreach(DocumentBaseContainer doc in m_Documents)
			{
				if(doc is DocumentBarContainer && ((DocumentBarContainer)doc).Bar==bar)
					return (DocumentBarContainer)doc;
				else if(doc is DocumentDockContainer)
				{
					DocumentBarContainer db=((DocumentDockContainer)doc).GetBarDocumentContainer(bar);
					if(db!=null) return db;
				}
			}
			return null;
		}