Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/10/11 01:58:40 (13 years ago)
Author:
swagner
Message:

Restructured code and adapted layout of framework version error dialog (#1466)

Location:
trunk/sources/HeuristicLab.PluginInfrastructure/3.3
Files:
2 edited
2 moved

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.PluginInfrastructure/3.3/ErrorHandling/FrameworkVersionErrorDialog.Designer.cs

    r5996 r5997  
    1919 */
    2020#endregion
     21
    2122namespace HeuristicLab.PluginInfrastructure {
    22   partial class FrameworkVersionWarning {
     23  partial class FrameworkVersionErrorDialog {
    2324    /// <summary>
    2425    /// Required designer variable.
     
    4546    private void InitializeComponent() {
    4647      this.iconLabel = new System.Windows.Forms.Label();
    47       this.okButton = new System.Windows.Forms.Button();
     48      this.closeButton = new System.Windows.Forms.Button();
    4849      this.linkLabel = new System.Windows.Forms.LinkLabel();
    49       this.label1 = new System.Windows.Forms.Label();
     50      this.label = new System.Windows.Forms.Label();
    5051      this.SuspendLayout();
    5152      //
    5253      // iconLabel
    5354      //
     55      this.iconLabel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
     56                  | System.Windows.Forms.AnchorStyles.Left)));
    5457      this.iconLabel.Image = global::HeuristicLab.PluginInfrastructure.Resources.Error;
     58      this.iconLabel.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
    5559      this.iconLabel.Location = new System.Drawing.Point(12, 9);
    5660      this.iconLabel.Name = "iconLabel";
    57       this.iconLabel.Size = new System.Drawing.Size(21, 22);
    58       this.iconLabel.TabIndex = 1;
     61      this.iconLabel.Size = new System.Drawing.Size(50, 98);
     62      this.iconLabel.TabIndex = 0;
    5963      //
    60       // okButton
     64      // closeButton
    6165      //
    62       this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
    63       this.okButton.DialogResult = System.Windows.Forms.DialogResult.OK;
    64       this.okButton.Location = new System.Drawing.Point(206, 102);
    65       this.okButton.Name = "okButton";
    66       this.okButton.Size = new System.Drawing.Size(75, 23);
    67       this.okButton.TabIndex = 6;
    68       this.okButton.Text = "&Close";
    69       this.okButton.UseVisualStyleBackColor = true;
    70       this.okButton.Click += new System.EventHandler(this.cancelButton_Click);
     66      this.closeButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
     67      this.closeButton.DialogResult = System.Windows.Forms.DialogResult.OK;
     68      this.closeButton.Location = new System.Drawing.Point(294, 81);
     69      this.closeButton.Name = "closeButton";
     70      this.closeButton.Size = new System.Drawing.Size(75, 23);
     71      this.closeButton.TabIndex = 3;
     72      this.closeButton.Text = "&Close";
     73      this.closeButton.UseVisualStyleBackColor = true;
     74      this.closeButton.Click += new System.EventHandler(this.cancelButton_Click);
    7175      //
    7276      // linkLabel
    7377      //
    74       this.linkLabel.AutoSize = true;
    75       this.linkLabel.Location = new System.Drawing.Point(39, 66);
     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                  | System.Windows.Forms.AnchorStyles.Right)));
     81      this.linkLabel.Location = new System.Drawing.Point(68, 52);
    7682      this.linkLabel.Name = "linkLabel";
    77       this.linkLabel.Size = new System.Drawing.Size(210, 13);
    78       this.linkLabel.TabIndex = 9;
     83      this.linkLabel.Size = new System.Drawing.Size(301, 26);
     84      this.linkLabel.TabIndex = 2;
    7985      this.linkLabel.TabStop = true;
    80       this.linkLabel.Text = ".NET framework v4.0 (full profile) download";
     86      this.linkLabel.Text = "Download Microsoft .NET Framework 4 (Full Profile)";
    8187      this.linkLabel.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel_LinkClicked);
    8288      //
    83       // label1
     89      // label
    8490      //
    85       this.label1.Location = new System.Drawing.Point(39, 9);
    86       this.label1.Name = "label1";
    87       this.label1.Size = new System.Drawing.Size(255, 33);
    88       this.label1.TabIndex = 10;
    89       this.label1.Text = ".NET framework version 4.0 (full profile) is not properly installed. Please downl" +
    90           "oad and install it.";
     91      this.label.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
     92                  | System.Windows.Forms.AnchorStyles.Right)));
     93      this.label.Location = new System.Drawing.Point(68, 9);
     94      this.label.Name = "label";
     95      this.label.Size = new System.Drawing.Size(301, 43);
     96      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.";
    9199      //
    92       // FrameworkVersionWarning
     100      // FrameworkVersionErrorDialog
    93101      //
    94       this.AcceptButton = this.okButton;
     102      this.AcceptButton = this.closeButton;
    95103      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    96104      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    97       this.CancelButton = this.okButton;
    98       this.ClientSize = new System.Drawing.Size(293, 137);
    99       this.Controls.Add(this.label1);
     105      this.CancelButton = this.closeButton;
     106      this.ClientSize = new System.Drawing.Size(381, 116);
     107      this.Controls.Add(this.label);
    100108      this.Controls.Add(this.linkLabel);
    101       this.Controls.Add(this.okButton);
     109      this.Controls.Add(this.closeButton);
    102110      this.Controls.Add(this.iconLabel);
    103111      this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
     
    105113      this.MaximizeBox = false;
    106114      this.MinimizeBox = false;
    107       this.Name = "FrameworkVersionWarning";
     115      this.Name = "FrameworkVersionErrorDialog";
    108116      this.ShowInTaskbar = false;
    109117      this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
    110       this.Text = "Warning";
     118      this.Text = "Error";
    111119      this.ResumeLayout(false);
    112       this.PerformLayout();
    113120
    114121    }
     
    117124
    118125    private System.Windows.Forms.Label iconLabel;
    119     private System.Windows.Forms.Button okButton;
     126    private System.Windows.Forms.Button closeButton;
    120127    private System.Windows.Forms.LinkLabel linkLabel;
    121     private System.Windows.Forms.Label label1;
     128    private System.Windows.Forms.Label label;
    122129  }
    123130}
  • trunk/sources/HeuristicLab.PluginInfrastructure/3.3/ErrorHandling/FrameworkVersionErrorDialog.cs

    r5996 r5997  
    1919   */
    2020#endregion
     21
    2122using System;
    2223using System.Windows.Forms;
    2324
    2425namespace HeuristicLab.PluginInfrastructure {
    25   public partial class FrameworkVersionWarning : Form {
    26     public FrameworkVersionWarning() {
     26  public partial class FrameworkVersionErrorDialog : Form {
     27    public static bool NET4FullProfileInstalled {
     28      get { return Microsoft.Win32.Registry.LocalMachine.OpenSubKey("Software\\Microsoft\\NET Framework Setup\\NDP\\v4\\Full") != null; }
     29    }
     30
     31    public FrameworkVersionErrorDialog() {
    2732      InitializeComponent();
    2833    }
  • trunk/sources/HeuristicLab.PluginInfrastructure/3.3/HeuristicLab.PluginInfrastructure-3.3.csproj

    r5984 r5997  
    221221    <Compile Include="BaseClasses\PluginBase.cs" />
    222222    <Compile Include="DefaultApplicationManager.cs" />
    223     <Compile Include="ErrorHandling\FrameworkVersionWarning.cs">
    224       <SubType>Form</SubType>
    225     </Compile>
    226     <Compile Include="ErrorHandling\FrameworkVersionWarning.Designer.cs">
    227       <DependentUpon>FrameworkVersionWarning.cs</DependentUpon>
    228     </Compile>
    229223    <Compile Include="ErrorHandling\ErrorDialog.cs">
    230224      <SubType>Form</SubType>
     
    234228    </Compile>
    235229    <Compile Include="ErrorHandling\ErrorHandling.cs">
     230    </Compile>
     231    <Compile Include="ErrorHandling\FrameworkVersionErrorDialog.cs">
     232      <SubType>Form</SubType>
     233    </Compile>
     234    <Compile Include="ErrorHandling\FrameworkVersionErrorDialog.Designer.cs">
     235      <DependentUpon>FrameworkVersionErrorDialog.cs</DependentUpon>
    236236    </Compile>
    237237    <Compile Include="LightweightApplicationManager.cs" />
  • trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Main.cs

    r5984 r5997  
    3434    /// <param name="args">Command line arguments</param>
    3535    public static void Run(string[] args) {
    36       bool fullProfileInstalled = Microsoft.Win32.Registry.LocalMachine.OpenSubKey("Software\\Microsoft\\NET Framework Setup\\NDP\\v4\\Full") != null;
    37       if (!fullProfileInstalled) {
     36      if (!FrameworkVersionErrorDialog.NET4FullProfileInstalled) {
    3837        Application.EnableVisualStyles();
    3938        Application.SetCompatibleTextRenderingDefault(false);
    40         Application.Run(new FrameworkVersionWarning());
     39        Application.Run(new FrameworkVersionErrorDialog());
    4140      } else {
    4241        try {
Note: See TracChangeset for help on using the changeset viewer.