Esempio n. 1
0
        void m_solutionExplorer_SelectedFile(object sender, SelectedFileEventArgs e)
        {
            //FIXME better document tracking required,
            //if you undock the document its not in dockPanel anymore

            foreach (IDockContent d in dockPanel.Documents)
            {
                //Only one solution supported at a time currently
                if (d.GetType() == typeof(SolutionSettings) && e.rootnode == true)
                {
                    SolutionSettings ss = (SolutionSettings)d;
                    ss.Show();
                    return;
                }

                if (d.GetType() == typeof(EditorWindow) && e.rootnode == false)
                {
                    EditorWindow ew = (EditorWindow)d;
                    if (ew.filename == e.name)
                    {
                        ew.Show();
                        return;
                    }
                }
            }

            if (e.rootnode == true)
            {
                SolutionSettings ss2 = new SolutionSettings(solution);
                ss2.MdiParent = this;
                ss2.DockPanel = this.dockPanel;
                ss2.Show();
                return;
            }
            else
            {
                loadfile(e.name);
            }
        }
Esempio n. 2
0
        void m_solutionExplorer_SelectedFile(object sender, SelectedFileEventArgs e)
        {
            //FIXME better document tracking required,
            //if you undock the document its not in dockPanel anymore

            foreach (IDockContent d in dockPanel.Documents)
            {
                //Only one solution supported at a time currently
                if (d.GetType() == typeof(SolutionSettings) && e.rootnode == true)
                {
                    SolutionSettings ss = (SolutionSettings)d;
                    ss.Show();
                    return;
                }

                if (d.GetType() == typeof(EditorWindow) && e.rootnode == false)
                {
                    EditorWindow ew = (EditorWindow)d;
                    if (ew.filename == e.name)
                    {
                        ew.Show();
                        return;
                    }

                }
            }

               if(e.rootnode==true)
               {
                SolutionSettings ss2 = new SolutionSettings(solution);
                ss2.MdiParent = this;
                ss2.DockPanel = this.dockPanel;
                ss2.Show();
                return;
               }
               else
               {
                 loadfile(e.name);
               }
        }