Browse Source

rename some obsolete classes to old_XY

newNRvisualizers
Peter Forstmeier 13 years ago
parent
commit
12dd9699f6
  1. 2
      src/Main/Base/Project/ICSharpCode.SharpDevelop.addin
  2. 6
      src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj
  3. 0
      src/Main/Base/Project/Resources/old_OutputWindowOptionsPanel.xfrm
  4. 6
      src/Main/Base/Project/Src/Gui/Components/old_FontSelectionPanel.cs
  5. 6
      src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/OutputWindowOptionsPanelXaml.xaml.cs
  6. 10
      src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/old_OutputWindowOptionsPanel.cs
  7. 28
      src/Main/Base/Project/Src/Gui/Pads/CompilerMessageView/CompilerMessageView.cs

2
src/Main/Base/Project/ICSharpCode.SharpDevelop.addin

@ -1257,7 +1257,7 @@ @@ -1257,7 +1257,7 @@
<OptionPanel id = "OutputWindowOptions"
label = "${res:Dialog.Options.IDEOptions.OutputPanel.Title}"
class = "ICSharpCode.SharpDevelop.Gui.OptionPanels.OutputWindowOptionsPanel"/>
class = "ICSharpCode.SharpDevelop.Gui.OptionPanels.old_OutputWindowOptionsPanel"/>
<OptionPanel id = "OutputWindowOptions1"
label = "${res:Dialog.Options.IDEOptions.OutputPanel.Title}"

6
src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj

@ -643,12 +643,12 @@ @@ -643,12 +643,12 @@
<Compile Include="Src\Internal\ConditionEvaluators\ActiveWindowStateEvaluator.cs" />
<Compile Include="Src\Internal\ConditionEvaluators\OpenWindowStateEvaluator.cs" />
<Compile Include="Src\Internal\ConditionEvaluators\DebuggerSupportsEvaluator.cs" />
<Compile Include="Src\Gui\Dialogs\OptionPanels\OutputWindowOptionsPanel.cs">
<Compile Include="Src\Gui\Dialogs\OptionPanels\old_OutputWindowOptionsPanel.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Src\Gui\Pads\CompilerMessageView\FileLineReference.cs" />
<Compile Include="Src\Gui\Pads\CompilerMessageView\OutputTextLineParser.cs" />
<Compile Include="Src\Gui\Components\FontSelectionPanel.cs">
<Compile Include="Src\Gui\Components\old_FontSelectionPanel.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="Src\Project\Items\FileProjectItem.cs" />
@ -736,7 +736,7 @@ @@ -736,7 +736,7 @@
<EmbeddedResource Include="Resources\FontSelectionPanel.xfrm" />
<EmbeddedResource Include="Resources\NewFileWithNameDialog.xfrm" />
<EmbeddedResource Include="Resources\NewFileDialog.xfrm" />
<EmbeddedResource Include="Resources\OutputWindowOptionsPanel.xfrm" />
<EmbeddedResource Include="Resources\old_OutputWindowOptionsPanel.xfrm" />
<EmbeddedResource Include="Resources\WordCountDialog.xfrm" />
<Compile Include="Src\Services\Tasks\TaskEventHandler.cs" />
<Compile Include="Src\Gui\Pads\DefinitionViewPad.cs" />

0
src/Main/Base/Project/Resources/OutputWindowOptionsPanel.xfrm → src/Main/Base/Project/Resources/old_OutputWindowOptionsPanel.xfrm

6
src/Main/Base/Project/Src/Gui/Components/FontSelectionPanel.cs → src/Main/Base/Project/Src/Gui/Components/old_FontSelectionPanel.cs

@ -17,7 +17,7 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -17,7 +17,7 @@ namespace ICSharpCode.SharpDevelop.Gui
/// Description of FontSelectionPanel.
/// </summary>
[Obsolete("XMLForms-based FontSelectionPanel is obsolete, use FontSelector instead!")]
public class FontSelectionPanel : BaseSharpDevelopUserControl
public class old_FontSelectionPanel : BaseSharpDevelopUserControl
{
public string CurrentFontString {
get {
@ -28,7 +28,7 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -28,7 +28,7 @@ namespace ICSharpCode.SharpDevelop.Gui
return null;
}
set {
CurrentFont = FontSelectionPanel.ParseFont(value);
CurrentFont = old_FontSelectionPanel.ParseFont(value);
}
}
@ -58,7 +58,7 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -58,7 +58,7 @@ namespace ICSharpCode.SharpDevelop.Gui
}
}
public FontSelectionPanel()
public old_FontSelectionPanel()
{
SetupFromXmlStream(this.GetType().Assembly.GetManifestResourceStream("ICSharpCode.SharpDevelop.Resources.FontSelectionPanel.xfrm"));

6
src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/OutputWindowOptionsPanelXaml.xaml.cs

@ -17,7 +17,7 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels @@ -17,7 +17,7 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels
/// </summary>
public partial class OutputWindowOptionsPanelXaml : OptionPanel
{
private static readonly string OutputWindowsProperty = "SharpDevelop.UI.OutputWindowOptions";
public static readonly string OutputWindowsProperty = "SharpDevelop.UI.OutputWindowOptions";
public OutputWindowOptionsPanelXaml()
{
@ -58,7 +58,9 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels @@ -58,7 +58,9 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels
var font = new Font(new System.Drawing.FontFamily(fontSelectionPanel.SelectedFontName),
(float)fontSelectionPanel.SelectedFontSize);
Console.WriteLine(font.ToString());
if (font != null) {
properties.Set("DefaultFont", font.ToString());
}
font.Dispose();
return base.SaveOptions();
}

10
src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/OutputWindowOptionsPanel.cs → src/Main/Base/Project/Src/Gui/Dialogs/OptionPanels/old_OutputWindowOptionsPanel.cs

@ -9,22 +9,22 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels @@ -9,22 +9,22 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels
/// <summary>
/// The Output Window options panel.
/// </summary>
public class OutputWindowOptionsPanel : XmlFormsOptionPanel
public class old_OutputWindowOptionsPanel : XmlFormsOptionPanel
{
public static readonly string OutputWindowsProperty = "SharpDevelop.UI.OutputWindowOptions";
FontSelectionPanel fontSelectionPanel;
old_FontSelectionPanel fontSelectionPanel;
public OutputWindowOptionsPanel()
public old_OutputWindowOptionsPanel()
{
}
public override void LoadPanelContents()
{
SetupFromXmlStream(this.GetType().Assembly.GetManifestResourceStream("ICSharpCode.SharpDevelop.Resources.OutputWindowOptionsPanel.xfrm"));
SetupFromXmlStream(this.GetType().Assembly.GetManifestResourceStream("ICSharpCode.SharpDevelop.Resources.old_OutputWindowOptionsPanel.xfrm"));
Properties properties = PropertyService.NestedProperties(OutputWindowsProperty);
fontSelectionPanel = new FontSelectionPanel();
fontSelectionPanel = new old_FontSelectionPanel();
fontSelectionPanel.Dock = DockStyle.Fill;
ControlDictionary["FontGroupBox"].Controls.Add(fontSelectionPanel);
((CheckBox)ControlDictionary["wordWrapCheckBox"]).Checked = properties.Get("WordWrap", true);

28
src/Main/Base/Project/Src/Gui/Pads/CompilerMessageView/CompilerMessageView.cs

@ -207,12 +207,11 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -207,12 +207,11 @@ namespace ICSharpCode.SharpDevelop.Gui
textEditor.ContextMenu = MenuService.CreateContextMenu(this, "/SharpDevelop/Pads/CompilerMessageView/ContextMenu");
properties = PropertyService.NestedProperties(OutputWindowOptionsPanel.OutputWindowsProperty);
properties = PropertyService.NestedProperties(OutputWindowOptionsPanelXaml.OutputWindowsProperty);
// var font = FontSelectionPanel.ParseFont(properties.Get("DefaultFont", SD.WinForms.DefaultMonospacedFont.ToString()).ToString());
var font = OutputWindowOptionsPanelXaml.ParseFont(properties.Get("DefaultFont", SD.WinForms.DefaultMonospacedFont.ToString()).ToString());
textEditor.FontFamily = new FontFamily(font.FontFamily.Name);
textEditor.FontSize = Math.Round(font.Size * 96.0 / 72.0);
SetTextEditorFont();
// textEditor.FontFamily = new FontFamily(font.FontFamily.Name);
// textEditor.FontSize = Math.Round(font.Size * 96.0 / 72.0);
properties.PropertyChanged += new PropertyChangedEventHandler(PropertyChanged);
MessageViewLinkElementGenerator.RegisterGenerators(textEditor.TextArea.TextView);
@ -238,12 +237,22 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -238,12 +237,22 @@ namespace ICSharpCode.SharpDevelop.Gui
}
}
void SetWordWrap()
private void SetWordWrap()
{
bool wordWrap = this.WordWrap;
textEditor.WordWrap = wordWrap;
}
private void SetTextEditorFont()
{
var font = OutputWindowOptionsPanelXaml.ParseFont(properties.Get("DefaultFont",
SD.WinForms.DefaultMonospacedFont.ToString()).ToString());
textEditor.FontFamily = new FontFamily(font.FontFamily.Name);
textEditor.FontSize = Math.Round(font.Size * 96.0 / 72.0);
}
#region Category handling
/// <summary>
/// Adds a category to the compiler message view. This method is thread-safe.
@ -404,10 +413,9 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -404,10 +413,9 @@ namespace ICSharpCode.SharpDevelop.Gui
ToolBarService.UpdateStatus(toolStrip.Items);
}
if (e.PropertyName == "DefaultFont") {
var font = FontSelectionPanel.ParseFont(properties.Get("DefaultFont", SD.WinForms.DefaultMonospacedFont.ToString()).ToString());
textEditor.FontFamily = new FontFamily(font.FontFamily.Name);
textEditor.FontSize = Math.Round(font.Size * 96.0 / 72.0);
SetTextEditorFont();
// textEditor.FontFamily = new FontFamily(font.FontFamily.Name);
// textEditor.FontSize = Math.Round(font.Size * 96.0 / 72.0);
}
}

Loading…
Cancel
Save