/// <summary>
        /// Adds a new desktop to the FrontEnd (new view to the project)
        /// </summary>
        public void NewDesktop()
        {
            string tmp = ResManager.GetString("MenuNewViewName");

            //determining the name of the new desktop
            int count = 1;
            foreach (ProjectManager.View view in projectManager.Views)
            {
                if (view.Name.Contains(tmp))
                {
                    //getting the number
                    int number = view.Name.IndexOfAny(new char[] {'0', '1',
                        '2', '3', '4', '5', '6', '7', '8', '9'});
                    if (number != -1)
                    {
                        string numberString = view.Name.Substring(number);
                        number = System.Convert.ToInt32(numberString);

                        if (number > count)
                        {
                            count = number;
                        }
                    }
                }
            }
            string name = tmp + System.Convert.ToString(count + 1);

            //creating new view and its content
            ProjectManager.View newView =
                projectManager.NewView(name);
            FerdaDesktop newDesktop =
                new FerdaDesktop(this, SvgManager, menu, newView, projectManager,
                archive, this, toolBar);
            DockWindow desktopContent = new DockWindow();

            views.Add(newDesktop);
            viewContents.Add(desktopContent);

            //other desktop initializations
            newDesktop.Dock = DockStyle.Fill;
            desktopContent.DockType = DockContainerType.Document;
            desktopContent.Text = newView.Name;
            desktopContent.TextChanged += new EventHandler(desktopContent_TextChanged);
            desktopContent.Closed += new EventHandler(desktopContent_Closed);
            desktopContent.Activated += new EventHandler(desktopContent_Activated);
            newDesktop.ResManager = this.ResManager;
            newDesktop.Clipboard = this;
            newDesktop.PropertiesDisplayer = propertyGrid;
            newDesktop.ContextHelpDisplayer = contextHelp;
            newDesktop.UserNote = userNote;

            //adding the views
            newDesktop.Views = views;

            desktopContent.Controls.Add(newDesktop);
            desktopContent.ResumeLayout(false);

            //setting the IViewDisplayers of the property grid
            propertyGrid.ViewDisplayers.Add(newDesktop);

            //docking the desktop
            dockingManager.AddForm(desktopContent);
            AddOwnedForm(desktopContent);
            dockingManager.DockWindow(desktopContent, DockStyle.Fill);
        }
        /// <summary>
        /// Opens a view that is present in the project but was closed by the user
        /// </summary>
        /// <param name="name">name of the view</param>
        public void OpenView(string name)
        {
            //creating the view and its content
            ProjectManager.View newView = projectManager.GetView(name);
            FerdaDesktop newDesktop = new FerdaDesktop(this, SvgManager, menu, newView,
                projectManager, archive, this, toolBar);
            DockWindow desktopContent = new DockWindow();

            views.Add(newDesktop);
            viewContents.Add(desktopContent);

            //other desktop initializations
            newDesktop.Dock = DockStyle.Fill;
            desktopContent.DockType = DockContainerType.Document;
            desktopContent.Text = newView.Name;
            desktopContent.TextChanged += new EventHandler(desktopContent_TextChanged);
            desktopContent.Closed += new EventHandler(desktopContent_Closed);
            desktopContent.Activated += new EventHandler(desktopContent_Activated);
            newDesktop.ResManager = this.ResManager;
            newDesktop.Clipboard = this;
            newDesktop.PropertiesDisplayer = propertyGrid;
            newDesktop.ContextHelpDisplayer = contextHelp;

            //adding the views
            newDesktop.Views = views;

            desktopContent.Controls.Add(newDesktop);
            desktopContent.ResumeLayout(false);

            //setting the IViewDisplayers of the property grid
            propertyGrid.ViewDisplayers.Add(newDesktop);

            //docking the desktop
            dockingManager.AddForm(desktopContent);
            AddOwnedForm(desktopContent);
            dockingManager.DockWindow(desktopContent, DockStyle.Fill);
        }
        /// <summary>
        /// Initializes the desktop (view) of the application
        /// </summary>
        protected void SetupDesktop()
        {
            foreach (ProjectManager.View view in projectManager.Views)
            {
                //creating a view and its content
                FerdaDesktop desktop =
                    new FerdaDesktop(this, SvgManager, menu, view,
                    projectManager, archive, this, toolBar);
                DockWindow desktopContent = new DockWindow();

                views.Add(desktop);
                viewContents.Add(desktopContent);

                //other desktop initializations
                desktop.Dock = DockStyle.Fill;
                desktopContent.DockType = DockContainerType.Document;
                desktopContent.Text = view.Name;
                desktop.ResManager = this.ResManager;
                desktop.Clipboard = this;
                desktop.PropertiesDisplayer = propertyGrid;
                desktop.ContextHelpDisplayer = contextHelp;
                desktop.UserNote = userNote;

                //event for changing names
                desktopContent.TextChanged += new EventHandler(desktopContent_TextChanged);
                //the closing event
                desktopContent.Closed += new EventHandler(desktopContent_Closed);

                desktopContent.Controls.Add(desktop);
                desktopContent.ResumeLayout(false);

                desktopContent.Activated += new EventHandler(desktopContent_Activated);

                //setting the IViewDisplayers of the property grid
                propertyGrid.ViewDisplayers.Add(desktop);
            }

            //setting the views property to the archive and all other views
            archive.Views = views;
            foreach (FerdaDesktop desktop in views)
            {
                desktop.Views = views;
            }
        }