- Timestamp:
- 04/16/13 13:13:41 (12 years ago)
- Location:
- branches/OaaS
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/OaaS
- Property svn:ignore
-
old new 21 21 protoc.exe 22 22 _ReSharper.HeuristicLab 3.3 Tests 23 Google.ProtocolBuffers-2.4.1.473.dll 23 24 packages
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/OaaS/HeuristicLab.PluginInfrastructure/3.3/ErrorHandling/ErrorHandling.cs
r7259 r9363 21 21 22 22 using System; 23 using System.Diagnostics; 23 24 using System.Windows.Forms; 24 25 … … 29 30 return string.Empty; 30 31 } else { 31 string message = exception.GetType().Name + ": " + exception.Message + Environment.NewLine + 32 string message = 33 "HeuristicLab version: " + FileVersionInfo.GetVersionInfo(typeof(ErrorHandling).Assembly.Location).FileVersion + Environment.NewLine + 34 exception.GetType().Name + ": " + exception.Message + Environment.NewLine + 32 35 exception.StackTrace; 33 36 -
branches/OaaS/HeuristicLab.PluginInfrastructure/3.3/ErrorHandling/FrameworkVersionErrorDialog.Designer.cs
r7967 r9363 49 49 this.linkLabel = new System.Windows.Forms.LinkLabel(); 50 50 this.label = new System.Windows.Forms.Label(); 51 this.linkLabelMono = new System.Windows.Forms.LinkLabel(); 51 52 this.SuspendLayout(); 52 53 // 53 54 // iconLabel 54 55 // 55 this.iconLabel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 56 56 this.iconLabel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 57 | System.Windows.Forms.AnchorStyles.Left))); 57 58 this.iconLabel.Image = global::HeuristicLab.PluginInfrastructure.Resources.Error; 58 59 this.iconLabel.ImageAlign = System.Drawing.ContentAlignment.TopLeft; 59 60 this.iconLabel.Location = new System.Drawing.Point(12, 9); 60 61 this.iconLabel.Name = "iconLabel"; 61 this.iconLabel.Size = new System.Drawing.Size(50, 98);62 this.iconLabel.Size = new System.Drawing.Size(50, 121); 62 63 this.iconLabel.TabIndex = 0; 63 64 // … … 66 67 this.closeButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); 67 68 this.closeButton.DialogResult = System.Windows.Forms.DialogResult.OK; 68 this.closeButton.Location = new System.Drawing.Point(294, 81);69 this.closeButton.Location = new System.Drawing.Point(294, 104); 69 70 this.closeButton.Name = "closeButton"; 70 71 this.closeButton.Size = new System.Drawing.Size(75, 23); … … 76 77 // linkLabel 77 78 // 78 this.linkLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 79 | System.Windows.Forms.AnchorStyles.Left)80 79 this.linkLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 80 | System.Windows.Forms.AnchorStyles.Left) 81 | System.Windows.Forms.AnchorStyles.Right))); 81 82 this.linkLabel.Location = new System.Drawing.Point(68, 52); 82 83 this.linkLabel.Name = "linkLabel"; 83 this.linkLabel.Size = new System.Drawing.Size(301, 26);84 this.linkLabel.Size = new System.Drawing.Size(301, 49); 84 85 this.linkLabel.TabIndex = 2; 85 86 this.linkLabel.TabStop = true; … … 89 90 // label 90 91 // 91 this.label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 92 92 this.label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 93 | System.Windows.Forms.AnchorStyles.Right))); 93 94 this.label.Location = new System.Drawing.Point(68, 9); 94 95 this.label.Name = "label"; 95 96 this.label.Size = new System.Drawing.Size(301, 43); 96 97 this.label.TabIndex = 1; 97 this.label.Text = "The Microsoft .NET Framework 4 (Full Profile) is not properly installed on your s" + 98 "ystem. Please download and install it."; 98 this.label.Text = "To run HeuristicLab you need at least the Microsoft .NET Framework 4 (Full Profil" + 99 "e) or Mono version 2.11.4 or higher. Please download and install it."; 100 // 101 // linkLabelMono 102 // 103 this.linkLabelMono.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 104 | System.Windows.Forms.AnchorStyles.Left) 105 | System.Windows.Forms.AnchorStyles.Right))); 106 this.linkLabelMono.Location = new System.Drawing.Point(68, 72); 107 this.linkLabelMono.Name = "linkLabelMono"; 108 this.linkLabelMono.Size = new System.Drawing.Size(301, 16); 109 this.linkLabelMono.TabIndex = 4; 110 this.linkLabelMono.TabStop = true; 111 this.linkLabelMono.Text = "Download Mono"; 112 this.linkLabelMono.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabelMono_LinkClicked); 99 113 // 100 114 // FrameworkVersionErrorDialog 101 115 // 102 116 this.AcceptButton = this.closeButton; 103 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);104 117 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; 105 118 this.CancelButton = this.closeButton; 106 this.ClientSize = new System.Drawing.Size(381, 116); 119 this.ClientSize = new System.Drawing.Size(381, 139); 120 this.Controls.Add(this.linkLabelMono); 107 121 this.Controls.Add(this.label); 108 122 this.Controls.Add(this.linkLabel); … … 127 141 private System.Windows.Forms.LinkLabel linkLabel; 128 142 private System.Windows.Forms.Label label; 143 private System.Windows.Forms.LinkLabel linkLabelMono; 129 144 } 130 145 } -
branches/OaaS/HeuristicLab.PluginInfrastructure/3.3/ErrorHandling/FrameworkVersionErrorDialog.cs
r7259 r9363 8 8 * it under the terms of the GNU General Public License as published by 9 9 * the Free Software Foundation, either version 3 of the License, or 10 11 12 13 14 15 16 17 18 19 10 * (at your option) any later version. 11 * 12 * HeuristicLab is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>. 19 */ 20 20 #endregion 21 21 22 22 using System; 23 using System.Reflection; 23 24 using System.Windows.Forms; 24 25 … … 26 27 public partial class FrameworkVersionErrorDialog : Form { 27 28 public static bool NET4FullProfileInstalled { 28 get { return Microsoft.Win32.Registry.LocalMachine.OpenSubKey("Software\\Microsoft\\NET Framework Setup\\NDP\\v4\\Full") != null; } 29 get { 30 try { 31 return Microsoft.Win32.Registry.LocalMachine.OpenSubKey("Software\\Microsoft\\NET Framework Setup\\NDP\\v4\\Full") != null; 32 } 33 catch (System.Security.SecurityException) { 34 return false; 35 } 36 } 37 } 38 39 public static bool MonoInstalled { 40 get { return Type.GetType("Mono.Runtime") != null; } 41 } 42 43 public static bool MonoCorrectVersionInstalled { 44 get { 45 var monoVersion = MonoVersion; 46 var minRequiredVersion = new Version(2, 11, 4); 47 48 //we need at least mono version 2.11.4 49 if (monoVersion != null && monoVersion >= minRequiredVersion) { 50 return true; 51 } else { 52 return false; 53 } 54 } 55 } 56 57 public static Version MonoVersion { 58 get { 59 Type type = Type.GetType("Mono.Runtime"); 60 if (type != null) { 61 MethodInfo dispalayName = type.GetMethod("GetDisplayName", BindingFlags.NonPublic | BindingFlags.Static); 62 if (dispalayName != null) { 63 string versionString = dispalayName.Invoke(null, null) as string; 64 if (versionString != null) { 65 // the version string looks something like: 2.11.4 (master/99d5e54 Thu Sep 6 15:55:44 CEST 2012) 66 var subVerStrings = versionString.Split(' '); 67 if (subVerStrings.Length > 0) { 68 try { 69 return Version.Parse(subVerStrings[0]); 70 } 71 catch { } 72 } 73 } 74 } 75 } 76 return null; 77 } 29 78 } 30 79 … … 44 93 Application.Exit(); 45 94 } 95 96 private void linkLabelMono_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { 97 try { 98 System.Diagnostics.Process.Start("http://www.mono-project.org"); 99 linkLabelMono.LinkVisited = true; 100 } 101 catch (Exception) { } 102 } 46 103 } 47 104 }
Note: See TracChangeset
for help on using the changeset viewer.