Browse Source

Some minor bug fixes, changed copyright date from 2007 to 2008.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@2812 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 18 years ago
parent
commit
054997566c
  1. 4
      src/AddIns/Misc/StartPage/Project/Src/ICSharpCodePage.cs
  2. 2
      src/Main/Base/Project/Resources/CommonAboutDialog.xfrm
  3. 18
      src/Main/Base/Project/Src/Gui/Dialogs/CommonAboutDialog.cs
  4. 83
      src/Main/Base/Project/Src/Gui/Dialogs/SharpDevelopAboutPanels.cs
  5. 1
      src/Main/Base/Project/Src/Project/CompilableProject.cs
  6. 8
      src/Main/Base/Project/Src/Services/IconService.cs
  7. 8
      src/Main/Core/Project/Src/AddInTree/AddInTree.cs
  8. 2
      src/Main/GlobalAssemblyInfo.template
  9. 30
      src/Main/ICSharpCode.SharpDevelop.Sda/Src/ExceptionBox.cs

4
src/AddIns/Misc/StartPage/Project/Src/ICSharpCodePage.cs

@ -202,7 +202,7 @@ namespace ICSharpCode.StartPage
StaticStyleSheet = startPageLocation + "/Layout/default.css"; StaticStyleSheet = startPageLocation + "/Layout/default.css";
MetaAuthor = "Christoph Wille - christophw@alphasierrapapa.com"; MetaAuthor = "Christoph Wille - christophw@alphasierrapapa.com";
MetaCopyright = "(c) 2001-2007 AlphaSierraPapa"; MetaCopyright = "(c) 2001-2008 AlphaSierraPapa";
ShowLeftMenu = false; ShowLeftMenu = false;
ShowRightBox = false; ShowRightBox = false;
@ -475,7 +475,7 @@ namespace ICSharpCode.StartPage
builder.Append(m_strMainColColor); builder.Append(m_strMainColColor);
builder.Append("\" class=\"copy\"><img src=\""+ startPageLocation + "/Layout/Common/blind.gif\" width=15 height=1>"); builder.Append("\" class=\"copy\"><img src=\""+ startPageLocation + "/Layout/Common/blind.gif\" width=15 height=1>");
builder.Append("<font size=\"-2\">"); builder.Append("<font size=\"-2\">");
builder.Append("Copyright &copy;2000-2007 <A HREF=\"mailto:webmaster@icsharpcode.net\" title=\""); builder.Append("Copyright &copy;2000-2008 <A HREF=\"mailto:webmaster@icsharpcode.net\" title=\"");
builder.Append(StringParser.Parse("${res:StartPage.ContactUs}")); builder.Append(StringParser.Parse("${res:StartPage.ContactUs}"));
builder.Append("\">IC#SharpCode</a>. "); builder.Append("\">IC#SharpCode</a>. ");
builder.Append(ICSharpCode.SharpDevelop.Gui.AboutSharpDevelopTabPage.LicenseSentence); builder.Append(ICSharpCode.SharpDevelop.Gui.AboutSharpDevelopTabPage.LicenseSentence);

2
src/Main/Base/Project/Resources/CommonAboutDialog.xfrm

@ -26,7 +26,7 @@
<!-- The copyright label --> <!-- The copyright label -->
<System.Windows.Forms.Label> <System.Windows.Forms.Label>
<Text value = "(c) 2000-2007 by icsharpcode.net"/> <Text value = "(c) 2000-2008 by icsharpcode.net"/>
<Width value = "400"/> <Width value = "400"/>
<Height value = "20"/> <Height value = "20"/>
<Location value = "{X=8, Y=234}"/> <Location value = "{X=8, Y=234}"/>

18
src/Main/Base/Project/Src/Gui/Dialogs/CommonAboutDialog.cs

@ -7,6 +7,7 @@
using System; using System;
using System.Drawing; using System.Drawing;
using System.Runtime.Serialization;
using System.Windows.Forms; using System.Windows.Forms;
using ICSharpCode.Core; using ICSharpCode.Core;
@ -68,12 +69,25 @@ namespace ICSharpCode.SharpDevelop.Gui
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question.\"\n -- Charles Babbage (1791-1871)" "On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question.\"\n -- Charles Babbage (1791-1871)"
}; };
// randomize the order in which the texts are displayed
Random rnd = new Random();
for (int i = 0; i < text.Length; i++) {
Swap(ref text[i], ref text[rnd.Next(i, text.Length)]);
}
timer = new Timer(); timer = new Timer();
timer.Interval = 40; timer.Interval = 40;
timer.Tick += new EventHandler(ScrollDown); timer.Tick += new EventHandler(ScrollDown);
timer.Start(); timer.Start();
} }
void Swap(ref string a, ref string b)
{
string c = a;
a = b;
b = c;
}
void ScrollDown(object sender, EventArgs e) void ScrollDown(object sender, EventArgs e)
{ {
++scroll; ++scroll;
@ -91,14 +105,14 @@ namespace ICSharpCode.SharpDevelop.Gui
{ {
Graphics g = pe.Graphics; Graphics g = pe.Graphics;
if (textHeights == null) { if (textHeights == null) {
textHeights = new int[text.Length]; textHeights = new int[text.Length];
for (int i = 0; i < text.Length; ++i) { for (int i = 0; i < text.Length; ++i) {
textHeights[i] = (int)g.MeasureString(text[i], Font, new SizeF(Width / 2, Height * 2)).Height; textHeights[i] = (int)g.MeasureString(text[i], Font, new SizeF(Width / 2, Height * 2)).Height;
} }
} }
g.DrawString(text[curText], g.DrawString(text[curText],
Font, Font,
Brushes.Black, Brushes.Black,
new Rectangle(Width / 2, 0 - scroll, Width / 2, Height * 2)); new Rectangle(Width / 2, 0 - scroll, Width / 2, Height * 2));
if (scroll > textHeights[curText]) { if (scroll > textHeights[curText]) {

83
src/Main/Base/Project/Src/Gui/Dialogs/SharpDevelopAboutPanels.cs

@ -6,10 +6,12 @@
// </file> // </file>
using System; using System;
using System.Globalization;
using System.Reflection; using System.Reflection;
using System.Runtime.Serialization; using System.Runtime.Serialization;
using System.Text; using System.Text;
using System.Windows.Forms; using System.Windows.Forms;
using System.Diagnostics.CodeAnalysis;
using ICSharpCode.Core; using ICSharpCode.Core;
@ -24,8 +26,7 @@ namespace ICSharpCode.SharpDevelop.Gui
TextBox versionTextBox = new TextBox(); TextBox versionTextBox = new TextBox();
Label sponsorLabel = new Label(); Label sponsorLabel = new Label();
TextBox versionInfoTextBox = new TextBox();
Button throwExceptionButton = new Button();
public AboutSharpDevelopTabPage() public AboutSharpDevelopTabPage()
{ {
@ -61,14 +62,19 @@ namespace ICSharpCode.SharpDevelop.Gui
sponsorLabel.Size = new System.Drawing.Size(362, 24); sponsorLabel.Size = new System.Drawing.Size(362, 24);
sponsorLabel.TabIndex = 8; sponsorLabel.TabIndex = 8;
Controls.Add(sponsorLabel); Controls.Add(sponsorLabel);
Dock = DockStyle.Fill;
throwExceptionButton.Location = new System.Drawing.Point(8, sponsorLabel.Bounds.Bottom + 1); versionInfoTextBox.Location = new System.Drawing.Point(8, 34 + 28);
throwExceptionButton.AutoSize = true; versionInfoTextBox.Size = new System.Drawing.Size(362, 100);
throwExceptionButton.Text = ResourceService.GetString("Dialog.About.ThrowExceptionButton"); versionInfoTextBox.Multiline = true;
throwExceptionButton.Size = new System.Drawing.Size(96, 24); versionInfoTextBox.ReadOnly = true;
throwExceptionButton.Click += new EventHandler(ThrowExceptionButtonClick); versionInfoTextBox.WordWrap = false;
Controls.Add(throwExceptionButton); versionInfoTextBox.Text = GetVersionInformationString();
versionInfoTextBox.ScrollBars = ScrollBars.Both;
versionInfoTextBox.TabIndex = 9;
versionInfoTextBox.Font = ResourceService.LoadFont("Courier New", 8);
Controls.Add(versionInfoTextBox);
Dock = DockStyle.Fill;
} }
public static string LicenseSentence { public static string LicenseSentence {
@ -78,29 +84,44 @@ namespace ICSharpCode.SharpDevelop.Gui
} }
} }
[Serializable()] [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")]
class ClownFishException : System.Exception public static string GetVersionInformationString()
{ {
public ClownFishException() : base() string str = "";
{ Version v = typeof(AboutSharpDevelopTabPage).Assembly.GetName().Version;
} str += "SharpDevelop Version : " + v.ToString() + Environment.NewLine;
str += ".NET Version : " + Environment.Version.ToString() + Environment.NewLine;
public ClownFishException(string message) : base(message) str += "OS Version : " + Environment.OSVersion.ToString() + Environment.NewLine;
{ string cultureName = null;
} try {
cultureName = CultureInfo.CurrentCulture.Name;
public ClownFishException(string message, Exception innerException) : base(message, innerException) str += "Current culture : " + CultureInfo.CurrentCulture.EnglishName + " (" + cultureName + ")" + Environment.NewLine;
{ } catch {}
} try {
if (cultureName == null || !cultureName.StartsWith(ResourceService.Language)) {
protected ClownFishException(SerializationInfo info, StreamingContext context) : base(info, context) str += "Current UI language : " + ResourceService.Language + Environment.NewLine;
{ }
} } catch {}
} try {
if (IntPtr.Size != 4) {
void ThrowExceptionButtonClick(object sender, EventArgs e) str += "Running as " + (IntPtr.Size * 8) + " bit process" + Environment.NewLine;
{ }
throw new ClownFishException(); string PROCESSOR_ARCHITEW6432 = Environment.GetEnvironmentVariable("PROCESSOR_ARCHITEW6432");
if (!string.IsNullOrEmpty(PROCESSOR_ARCHITEW6432)) {
str += "Running under WOW6432, processor architecture: " + PROCESSOR_ARCHITEW6432;
}
} catch {}
try {
if (SystemInformation.TerminalServerSession) {
str += "Terminal Server Session" + Environment.NewLine;
}
if (SystemInformation.BootMode != BootMode.Normal) {
str += "Boot Mode : " + SystemInformation.BootMode + Environment.NewLine;
}
} catch {}
str += "Working Set Memory : " + (Environment.WorkingSet / 1024) + "kb" + Environment.NewLine;
str += "GC Heap Memory : " + (GC.GetTotalMemory(false) / 1024) + "kb" + Environment.NewLine;
return str;
} }
} }

1
src/Main/Base/Project/Src/Project/CompilableProject.cs

@ -147,6 +147,7 @@ namespace ICSharpCode.SharpDevelop.Project
get; get;
} }
[Browsable(false)]
public string TargetFrameworkVersion { public string TargetFrameworkVersion {
get { return GetEvaluatedProperty("TargetFrameworkVersion") ?? "v2.0"; } get { return GetEvaluatedProperty("TargetFrameworkVersion") ?? "v2.0"; }
set { SetProperty("TargetFrameworkVersion", value); } set { SetProperty("TargetFrameworkVersion", value); }

8
src/Main/Base/Project/Src/Services/IconService.cs

@ -64,7 +64,13 @@ namespace ICSharpCode.SharpDevelop
public static Bitmap GetBitmap(string name) public static Bitmap GetBitmap(string name)
{ {
Bitmap bmp = ResourceService.GetBitmap(name); Bitmap bmp;
try {
bmp = ResourceService.GetBitmap(name);
} catch (ResourceNotFoundException ex) {
LoggingService.Warn(ex);
bmp = null;
}
if (bmp != null) { if (bmp != null) {
return bmp; return bmp;
} }

8
src/Main/Core/Project/Src/AddInTree/AddInTree.cs

@ -416,7 +416,13 @@ namespace ICSharpCode.Core
} }
} }
foreach (AddIn addIn in list) { foreach (AddIn addIn in list) {
InsertAddIn(addIn); try {
InsertAddIn(addIn);
} catch (AddInLoadException ex) {
LoggingService.Error(ex);
MessageService.ShowError("Error loading AddIn " + addIn.FileName + ":\n"
+ ex.Message);
}
} }
} }
} }

2
src/Main/GlobalAssemblyInfo.template

@ -19,7 +19,7 @@ using System.Reflection;
[assembly: System.Runtime.InteropServices.ComVisible(false)] [assembly: System.Runtime.InteropServices.ComVisible(false)]
[assembly: AssemblyCompany("ic#code")] [assembly: AssemblyCompany("ic#code")]
[assembly: AssemblyProduct("SharpDevelop")] [assembly: AssemblyProduct("SharpDevelop")]
[assembly: AssemblyCopyright("2000-2007 AlphaSierraPapa")] [assembly: AssemblyCopyright("2000-2008 AlphaSierraPapa")]
[assembly: AssemblyVersion(RevisionClass.FullVersion)] [assembly: AssemblyVersion(RevisionClass.FullVersion)]
internal static class RevisionClass internal static class RevisionClass

30
src/Main/ICSharpCode.SharpDevelop.Sda/Src/ExceptionBox.cs

@ -119,37 +119,9 @@ namespace ICSharpCode.SharpDevelop.Sda
} }
} }
[SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes")]
string getClipboardString() string getClipboardString()
{ {
string str = ""; string str = Gui.AboutSharpDevelopTabPage.GetVersionInformationString();
Version v = typeof(ExceptionBox).Assembly.GetName().Version;
str += "SharpDevelop Version : " + v.ToString() + Environment.NewLine;
str += ".NET Version : " + Environment.Version.ToString() + Environment.NewLine;
str += "OS Version : " + Environment.OSVersion.ToString() + Environment.NewLine;
string cultureName = null;
try {
cultureName = CultureInfo.CurrentCulture.Name;
str += "Current culture : " + CultureInfo.CurrentCulture.EnglishName + " (" + cultureName + ")" + Environment.NewLine;
} catch {}
try {
if (cultureName == null || !cultureName.StartsWith(ResourceService.Language)) {
str += "Current UI language : " + ResourceService.Language + Environment.NewLine;
}
} catch {}
try {
if (IntPtr.Size != 4) {
str += "Running as " + (IntPtr.Size * 8) + " bit process" + Environment.NewLine;
}
if (SystemInformation.TerminalServerSession) {
str += "Terminal Server Session" + Environment.NewLine;
}
if (SystemInformation.BootMode != BootMode.Normal) {
str += "Boot Mode : " + SystemInformation.BootMode + Environment.NewLine;
}
} catch {}
str += "Working Set Memory : " + (Environment.WorkingSet / 1024) + "kb" + Environment.NewLine;
str += "GC Heap Memory : " + (GC.GetTotalMemory(false) / 1024) + "kb" + Environment.NewLine;
str += Environment.NewLine; str += Environment.NewLine;

Loading…
Cancel
Save