예제 #1
0
        public virtual void ShowView(IViewContent content)
        {
            System.Diagnostics.Debug.Assert(layout != null);

            ViewContentCollection.Add(content);
            layout.ShowView(content);
            content.WorkbenchWindow.SelectWindow();
        }
예제 #2
0
        public void ShowView(IViewContent content)
        {
            System.Diagnostics.Debug.Assert(_layout != null);
            ViewContentCollection.Add(content);

            _layout.ShowView(content);
            content.WorkbenchWindow.SelectWindow();
            OnViewOpened(new ViewContentEventArgs(content));
        }
예제 #3
0
        private void NewSolution(string solutionID, string solution)
        {
            FormContent form = new FormContent();

            form.Solution              = SolutionInstance.GetInstance().Solution;
            form.Solution.SolutionID   = solutionID;
            form.Solution.SolutionName = solution;
            form.Text    = solution + "*";
            form.TabText = solution + "*";
            form.Init();
            form.Show(dockPanel);
            ViewContentCollection.Add(form);
            this.InitDockForm();
        }
예제 #4
0
 private void OpenSolution(string fileName)
 {
     if (File.Exists(fileName))
     {
         FormContent form = new FormContent();
         form.FileName = fileName;
         form.Init();
         if (form.Controls.Count == 0)
         {
             MessageBox.Show("该文件可能是版本过旧,无法识别");
             return;
         }
         form.Show(dockPanel);
         ViewContentCollection.Add(form);
         this.InitDockForm();
     }
 }
예제 #5
0
        public virtual void ShowView(IViewContent content)
        {
            System.Diagnostics.Debug.Assert(layout != null);
            ViewContentCollection.Add(content);
            if (PropertyService.Get("SharpDevelop.LoadDocumentProperties", true) && content is IMementoCapable)
            {
                try {
                    Properties memento = GetStoredMemento(content);
                    if (memento != null)
                    {
                        ((IMementoCapable)content).SetMemento(memento);
                    }
                } catch (Exception e) {
                    MessageService.ShowError(e, "Can't get/set memento");
                }
            }

            layout.ShowView(content);
            content.WorkbenchWindow.SelectWindow();
            OnViewOpened(new ViewContentEventArgs(content));
        }