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

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

@ -643,12 +643,12 @@
<Compile Include="Src\Internal\ConditionEvaluators\ActiveWindowStateEvaluator.cs" /> <Compile Include="Src\Internal\ConditionEvaluators\ActiveWindowStateEvaluator.cs" />
<Compile Include="Src\Internal\ConditionEvaluators\OpenWindowStateEvaluator.cs" /> <Compile Include="Src\Internal\ConditionEvaluators\OpenWindowStateEvaluator.cs" />
<Compile Include="Src\Internal\ConditionEvaluators\DebuggerSupportsEvaluator.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> <SubType>UserControl</SubType>
</Compile> </Compile>
<Compile Include="Src\Gui\Pads\CompilerMessageView\FileLineReference.cs" /> <Compile Include="Src\Gui\Pads\CompilerMessageView\FileLineReference.cs" />
<Compile Include="Src\Gui\Pads\CompilerMessageView\OutputTextLineParser.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> <SubType>UserControl</SubType>
</Compile> </Compile>
<Compile Include="Src\Project\Items\FileProjectItem.cs" /> <Compile Include="Src\Project\Items\FileProjectItem.cs" />
@ -736,7 +736,7 @@
<EmbeddedResource Include="Resources\FontSelectionPanel.xfrm" /> <EmbeddedResource Include="Resources\FontSelectionPanel.xfrm" />
<EmbeddedResource Include="Resources\NewFileWithNameDialog.xfrm" /> <EmbeddedResource Include="Resources\NewFileWithNameDialog.xfrm" />
<EmbeddedResource Include="Resources\NewFileDialog.xfrm" /> <EmbeddedResource Include="Resources\NewFileDialog.xfrm" />
<EmbeddedResource Include="Resources\OutputWindowOptionsPanel.xfrm" /> <EmbeddedResource Include="Resources\old_OutputWindowOptionsPanel.xfrm" />
<EmbeddedResource Include="Resources\WordCountDialog.xfrm" /> <EmbeddedResource Include="Resources\WordCountDialog.xfrm" />
<Compile Include="Src\Services\Tasks\TaskEventHandler.cs" /> <Compile Include="Src\Services\Tasks\TaskEventHandler.cs" />
<Compile Include="Src\Gui\Pads\DefinitionViewPad.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
/// Description of FontSelectionPanel. /// Description of FontSelectionPanel.
/// </summary> /// </summary>
[Obsolete("XMLForms-based FontSelectionPanel is obsolete, use FontSelector instead!")] [Obsolete("XMLForms-based FontSelectionPanel is obsolete, use FontSelector instead!")]
public class FontSelectionPanel : BaseSharpDevelopUserControl public class old_FontSelectionPanel : BaseSharpDevelopUserControl
{ {
public string CurrentFontString { public string CurrentFontString {
get { get {
@ -28,7 +28,7 @@ namespace ICSharpCode.SharpDevelop.Gui
return null; return null;
} }
set { set {
CurrentFont = FontSelectionPanel.ParseFont(value); CurrentFont = old_FontSelectionPanel.ParseFont(value);
} }
} }
@ -58,7 +58,7 @@ namespace ICSharpCode.SharpDevelop.Gui
} }
} }
public FontSelectionPanel() public old_FontSelectionPanel()
{ {
SetupFromXmlStream(this.GetType().Assembly.GetManifestResourceStream("ICSharpCode.SharpDevelop.Resources.FontSelectionPanel.xfrm")); 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
/// </summary> /// </summary>
public partial class OutputWindowOptionsPanelXaml : OptionPanel public partial class OutputWindowOptionsPanelXaml : OptionPanel
{ {
private static readonly string OutputWindowsProperty = "SharpDevelop.UI.OutputWindowOptions"; public static readonly string OutputWindowsProperty = "SharpDevelop.UI.OutputWindowOptions";
public OutputWindowOptionsPanelXaml() public OutputWindowOptionsPanelXaml()
{ {
@ -58,7 +58,9 @@ namespace ICSharpCode.SharpDevelop.Gui.OptionPanels
var font = new Font(new System.Drawing.FontFamily(fontSelectionPanel.SelectedFontName), var font = new Font(new System.Drawing.FontFamily(fontSelectionPanel.SelectedFontName),
(float)fontSelectionPanel.SelectedFontSize); (float)fontSelectionPanel.SelectedFontSize);
Console.WriteLine(font.ToString()); if (font != null) {
properties.Set("DefaultFont", font.ToString());
}
font.Dispose(); font.Dispose();
return base.SaveOptions(); 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
/// <summary> /// <summary>
/// The Output Window options panel. /// The Output Window options panel.
/// </summary> /// </summary>
public class OutputWindowOptionsPanel : XmlFormsOptionPanel public class old_OutputWindowOptionsPanel : XmlFormsOptionPanel
{ {
public static readonly string OutputWindowsProperty = "SharpDevelop.UI.OutputWindowOptions"; public static readonly string OutputWindowsProperty = "SharpDevelop.UI.OutputWindowOptions";
FontSelectionPanel fontSelectionPanel; old_FontSelectionPanel fontSelectionPanel;
public OutputWindowOptionsPanel() public old_OutputWindowOptionsPanel()
{ {
} }
public override void LoadPanelContents() 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); Properties properties = PropertyService.NestedProperties(OutputWindowsProperty);
fontSelectionPanel = new FontSelectionPanel(); fontSelectionPanel = new old_FontSelectionPanel();
fontSelectionPanel.Dock = DockStyle.Fill; fontSelectionPanel.Dock = DockStyle.Fill;
ControlDictionary["FontGroupBox"].Controls.Add(fontSelectionPanel); ControlDictionary["FontGroupBox"].Controls.Add(fontSelectionPanel);
((CheckBox)ControlDictionary["wordWrapCheckBox"]).Checked = properties.Get("WordWrap", true); ((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
textEditor.ContextMenu = MenuService.CreateContextMenu(this, "/SharpDevelop/Pads/CompilerMessageView/ContextMenu"); 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()); SetTextEditorFont();
var font = OutputWindowOptionsPanelXaml.ParseFont(properties.Get("DefaultFont", SD.WinForms.DefaultMonospacedFont.ToString()).ToString()); // textEditor.FontFamily = new FontFamily(font.FontFamily.Name);
textEditor.FontFamily = new FontFamily(font.FontFamily.Name); // textEditor.FontSize = Math.Round(font.Size * 96.0 / 72.0);
textEditor.FontSize = Math.Round(font.Size * 96.0 / 72.0);
properties.PropertyChanged += new PropertyChangedEventHandler(PropertyChanged); properties.PropertyChanged += new PropertyChangedEventHandler(PropertyChanged);
MessageViewLinkElementGenerator.RegisterGenerators(textEditor.TextArea.TextView); MessageViewLinkElementGenerator.RegisterGenerators(textEditor.TextArea.TextView);
@ -238,12 +237,22 @@ namespace ICSharpCode.SharpDevelop.Gui
} }
} }
void SetWordWrap()
private void SetWordWrap()
{ {
bool wordWrap = this.WordWrap; bool wordWrap = this.WordWrap;
textEditor.WordWrap = 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 #region Category handling
/// <summary> /// <summary>
/// Adds a category to the compiler message view. This method is thread-safe. /// Adds a category to the compiler message view. This method is thread-safe.
@ -404,10 +413,9 @@ namespace ICSharpCode.SharpDevelop.Gui
ToolBarService.UpdateStatus(toolStrip.Items); ToolBarService.UpdateStatus(toolStrip.Items);
} }
if (e.PropertyName == "DefaultFont") { if (e.PropertyName == "DefaultFont") {
var font = FontSelectionPanel.ParseFont(properties.Get("DefaultFont", SD.WinForms.DefaultMonospacedFont.ToString()).ToString()); SetTextEditorFont();
// textEditor.FontFamily = new FontFamily(font.FontFamily.Name);
textEditor.FontFamily = new FontFamily(font.FontFamily.Name); // textEditor.FontSize = Math.Round(font.Size * 96.0 / 72.0);
textEditor.FontSize = Math.Round(font.Size * 96.0 / 72.0);
} }
} }

Loading…
Cancel
Save