Exemplo n.º 1
0
        private void Editor_FormClosing(object sender, FormClosingEventArgs e)
        {
            MemberCache.Export();
            dockingPanel.SaveAsXml(Program.PanelsXML);

            //
            // May not be neeed as content_Removed should handle
            if (dockingPanel.DocumentsCount > 0)
            {
                foreach (DockPane pane in dockingPanel.Panes)
                {
                    DockPanel    panel = pane.DockPanel;
                    RemoteSource src;
                    if (panel.ActiveContent is SourceEditor)
                    {
                        LastEditing = null;
                        src         = (panel.ActiveContent as SourceEditor).Tag as RemoteSource;
                        if (src != null)
                        {
                            src.Unlock();
                        }
                    }
                }
            }
        }
Exemplo n.º 2
0
        private void DockingPanel_ActiveContentChanged(object sender, EventArgs e)
        {
            SourceEditor PreviousEditor = GetTabEditor(dockingPanel.ActiveContent as DockContent);

            if (PreviousEditor != null)
            {
                LastEditing = PreviousEditor;
                LastEditing.DoAction(EditorAction.TasksUpdate);
            }
        }
Exemplo n.º 3
0
        private void onSelectError(string File, int Line, int Col)
        {
            DockContent theTab = Editor.TheEditor.GetTabByName(File, true);

            if (theTab != null)
            {
                SourceEditor SourceEditor = Editor.TheEditor.GetTabEditor(theTab);

                SourceEditor.Focus();
                SourceEditor.GotoLine(Line, Col);
            }
            else
            {
                MessageBox.Show("Unable to open error. Please open the source manually first and then try again.", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
Exemplo n.º 4
0
        private void onSelectError(string File, int Line, int Col, string ErrorText)
        {
            OpenTab theTab = Editor.TheEditor.EditorContains(File);

            if (theTab != null)
            {
                Editor.TheEditor.SwitchToTab(theTab.getSide(), theTab.getIndex());
                SourceEditor SourceEditor = Editor.TheEditor.GetTabEditor(theTab);

                SourceEditor.Focus();
                SourceEditor.GotoLine(Line, Col);
            }
            else
            {
                MessageBox.Show("Unable to open error. Please open the source manually first and then try again.", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
Exemplo n.º 5
0
        private void dockingPanel_ContentRemoved(object sender, DockContentEventArgs e)
        {
            DockPanel    panel = sender as DockPanel;
            RemoteSource src;

            if (panel != null)
            {
                if (panel.ActiveContent is SourceEditor)
                {
                    LastEditing = null;
                    src         = (panel.ActiveContent as SourceEditor).Tag as RemoteSource;
                    if (src != null)
                    {
                        src.Unlock();
                    }
                }
            }
        }
Exemplo n.º 6
0
 private void DockingPanel_ActiveContentChanged(object sender, EventArgs e)
 {
     LastEditing = GetTabEditor(dockingPanel.ActiveContent as DockContent);
 }