Browse Source

Applied custom quick class browser patch by Robert Zaunere.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@1481 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 20 years ago
parent
commit
357653ecc9
  1. 35
      src/Main/Base/Project/Src/TextEditor/Gui/Editor/SharpDevelopTextAreaControl.cs

35
src/Main/Base/Project/Src/TextEditor/Gui/Editor/SharpDevelopTextAreaControl.cs

@ -34,6 +34,7 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor @@ -34,6 +34,7 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor
readonly static string advancedHighlighterPath = "/AddIns/DefaultTextEditor/AdvancedHighlighter";
QuickClassBrowserPanel quickClassBrowserPanel = null;
Control customQuickClassBrowserPanel = null;
ErrorDrawer errorDrawer;
IAdvancedHighlighter advancedHighlighter;
@ -42,6 +43,19 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor @@ -42,6 +43,19 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor
return quickClassBrowserPanel;
}
}
public Control CustomQuickClassBrowserPanel {
get {
return customQuickClassBrowserPanel;
}
set {
if (customQuickClassBrowserPanel != null) {
RemoveQuickClassBrowserPanel();
customQuickClassBrowserPanel.Dispose();
}
customQuickClassBrowserPanel = value;
ActivateQuickClassBrowserOnDemand();
}
}
public SharpDevelopTextAreaControl()
{
@ -101,6 +115,10 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor @@ -101,6 +115,10 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor
quickClassBrowserPanel.Dispose();
quickClassBrowserPanel = null;
}
if (customQuickClassBrowserPanel != null) {
customQuickClassBrowserPanel.Dispose();
customQuickClassBrowserPanel = null;
}
if (advancedHighlighter != null) {
advancedHighlighter.Dispose();
advancedHighlighter = null;
@ -189,6 +207,13 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor @@ -189,6 +207,13 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor
quickClassBrowserPanel = null;
textAreaPanel.BorderStyle = System.Windows.Forms.BorderStyle.None;
}
if (customQuickClassBrowserPanel != null) {
if (Controls.Contains(customQuickClassBrowserPanel)) {
Controls.Remove(customQuickClassBrowserPanel);
customQuickClassBrowserPanel.Enabled = false;
textAreaPanel.BorderStyle = System.Windows.Forms.BorderStyle.None;
}
}
}
void ShowQuickClassBrowserPanel()
{
@ -197,6 +222,16 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor @@ -197,6 +222,16 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor
Controls.Add(quickClassBrowserPanel);
textAreaPanel.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
}
if (customQuickClassBrowserPanel != null) {
if (quickClassBrowserPanel != null)
RemoveQuickClassBrowserPanel();
if (!Controls.Contains(customQuickClassBrowserPanel)) {
Controls.Add(customQuickClassBrowserPanel);
customQuickClassBrowserPanel.Enabled = true;
textAreaPanel.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
}
return;
}
}
public void ActivateQuickClassBrowserOnDemand()
{

Loading…
Cancel
Save