Changeset 2504 for branches/PluginInfrastructure Refactoring/HeuristicLab.PluginInfrastructure/Starter
- Timestamp:
- 11/18/09 18:33:30 (15 years ago)
- Location:
- branches/PluginInfrastructure Refactoring/HeuristicLab.PluginInfrastructure/Starter
- Files:
-
- 1 added
- 6 moved
Legend:
- Unmodified
- Added
- Removed
-
branches/PluginInfrastructure Refactoring/HeuristicLab.PluginInfrastructure/Starter/MainForm.Designer.cs
r2485 r2504 20 20 #endregion 21 21 22 namespace HeuristicLab {22 namespace HeuristicLab.PluginInfrastructure { 23 23 partial class MainForm { 24 24 /// <summary> … … 32 32 /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> 33 33 protected override void Dispose(bool disposing) { 34 if (disposing && (components != null)) {34 if (disposing && (components != null)) { 35 35 components.Dispose(); 36 36 } … … 131 131 this.detailsButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 132 132 this.detailsButton.AutoSize = true; 133 this.detailsButton.Image = global::HeuristicLab.Properties.Resources.Details;133 this.detailsButton.Image = HeuristicLab.PluginInfrastructure.Properties.Resources.Details; 134 134 this.detailsButton.Location = new System.Drawing.Point(68, 511); 135 135 this.detailsButton.Name = "detailsButton"; … … 144 144 this.listButton.AutoSize = true; 145 145 this.listButton.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; 146 this.listButton.Image = global::HeuristicLab.Properties.Resources.List;146 this.listButton.Image = HeuristicLab.PluginInfrastructure.Properties.Resources.List; 147 147 this.listButton.Location = new System.Drawing.Point(40, 511); 148 148 this.listButton.Name = "listButton"; … … 157 157 this.largeIconsButton.AutoSize = true; 158 158 this.largeIconsButton.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; 159 this.largeIconsButton.Image = global::HeuristicLab.Properties.Resources.LargeIcons;159 this.largeIconsButton.Image = HeuristicLab.PluginInfrastructure.Properties.Resources.LargeIcons; 160 160 this.largeIconsButton.Location = new System.Drawing.Point(12, 511); 161 161 this.largeIconsButton.Name = "largeIconsButton"; -
branches/PluginInfrastructure Refactoring/HeuristicLab.PluginInfrastructure/Starter/MainForm.cs
r2497 r2504 33 33 using System.IO; 34 34 35 namespace HeuristicLab {35 namespace HeuristicLab.PluginInfrastructure { 36 36 public partial class MainForm : Form { 37 37 … … 44 44 InitializeComponent(); 45 45 46 abortRequested = false;47 46 string pluginPath = Path.GetFullPath(HeuristicLab.PluginInfrastructure.Properties.Settings.Default.PluginDir); 48 47 pluginManager = new PluginManager(pluginPath); … … 142 141 } 143 142 144 public void ShowErrorMessageBox(Exception ex) { 145 MessageBox.Show(BuildErrorMessage(ex), 146 "Error - " + ex.GetType().Name, 147 MessageBoxButtons.OK, 148 MessageBoxIcon.Error); 143 private void ShowErrorMessageBox(Exception ex) { 144 MessageBoxOptions options = RightToLeft == RightToLeft.Yes ? MessageBoxOptions.RightAlign | MessageBoxOptions.RtlReading : MessageBoxOptions.DefaultDesktopOnly; 145 MessageBox.Show(this, 146 BuildErrorMessage(ex), 147 "Error - " + ex.GetType().Name, 148 MessageBoxButtons.OK, 149 MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, options); 149 150 } 150 private st ring BuildErrorMessage(Exception ex) {151 private static string BuildErrorMessage(Exception ex) { 151 152 StringBuilder sb = new StringBuilder(); 152 153 sb.Append("Sorry, but something went wrong!\n\n" + ex.Message + "\n\n" + ex.StackTrace); -
branches/PluginInfrastructure Refactoring/HeuristicLab.PluginInfrastructure/Starter/SplashScreen.Designer.cs
r2485 r2504 21 21 22 22 using HeuristicLab.PluginInfrastructure; 23 namespace HeuristicLab {23 namespace HeuristicLab.PluginInfrastructure { 24 24 partial class SplashScreen { 25 25 /// <summary> … … 39 39 base.Dispose(disposing); 40 40 } 41 41 42 42 43 43 #region Windows Form Designer generated code … … 191 191 this.pictureBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 192 192 | System.Windows.Forms.AnchorStyles.Left))); 193 this.pictureBox.Image = global::HeuristicLab.P roperties.Resources.Logo_white;193 this.pictureBox.Image = global::HeuristicLab.PluginInfrastructure.Properties.Resources.Logo_white; 194 194 this.pictureBox.Location = new System.Drawing.Point(-1, -1); 195 195 this.pictureBox.Name = "pictureBox"; -
branches/PluginInfrastructure Refactoring/HeuristicLab.PluginInfrastructure/Starter/SplashScreen.cs
r2497 r2504 29 29 using HeuristicLab.PluginInfrastructure.Manager; 30 30 31 namespace HeuristicLab {32 publicpartial class SplashScreen : Form {31 namespace HeuristicLab.PluginInfrastructure { 32 internal partial class SplashScreen : Form { 33 33 private const int FADE_INTERVAL = 50; 34 34 private System.Timers.Timer fadeTimer; 35 35 private int initialInterval; 36 36 private object bigLock = new object(); 37 private bool closing = false;37 private bool closing; 38 38 private PluginManager manager; 39 39 40 publicSplashScreen() {40 internal SplashScreen() { 41 41 InitializeComponent(); 42 42 } 43 43 44 publicSplashScreen(PluginManager manager, int initialInterval, string initialText)44 internal SplashScreen(PluginManager manager, int initialInterval, string initialText) 45 45 : this() { 46 46 this.initialInterval = initialInterval; … … 57 57 58 58 foreach (object obj in attributes) { 59 if (obj is AssemblyCopyrightAttribute) { 60 copyrightLabel.Text = "Copyright " + ((AssemblyCopyrightAttribute)obj).Copyright; 59 var attr = obj as AssemblyCopyrightAttribute; 60 if (attr != null) { 61 copyrightLabel.Text = "Copyright " + attr.Copyright; 61 62 } 62 63 } 63 64 64 try { 65 user = HeuristicLab.Properties.Settings.Default.User; 66 company = HeuristicLab.Properties.Settings.Default.Organization; 65 user = HeuristicLab.PluginInfrastructure.Properties.Settings.Default.User; 66 company = HeuristicLab.PluginInfrastructure.Properties.Settings.Default.Organization; 67 67 68 if ((user == null) || (user.Equals(""))) {69 70 71 72 68 if (string.IsNullOrEmpty(user)) { 69 userNameLabel.Text = "-"; 70 } else { 71 userNameLabel.Text = user; 72 } 73 73 74 if ((company == null) || (company.Equals(""))) { 75 companyLabel.Text = "-"; 76 } else { 77 companyLabel.Text = company; 78 } 79 } 80 catch (Exception) { 81 userNameLabel.Text = "-"; 74 if (string.IsNullOrEmpty(company)) { 82 75 companyLabel.Text = "-"; 76 } else { 77 companyLabel.Text = company; 83 78 } 84 79 } … … 88 83 } 89 84 90 p ublicvoid managerActionEventHandler(object sender, PluginInfrastructureEventArgs e) {85 private void managerActionEventHandler(object sender, PluginInfrastructureEventArgs e) { 91 86 string info = e.Action + ": " + e.Entity; 92 87 //if (e.Action == PluginManagerAction.Initializing) info = "Initializing ...";
Note: See TracChangeset
for help on using the changeset viewer.