Changeset 8563
- Timestamp:
- 09/04/12 10:34:44 (12 years ago)
- Location:
- trunk/sources/HeuristicLab.PluginInfrastructure/3.3
- Files:
-
- 4 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.PluginInfrastructure/3.3/HeuristicLab.PluginInfrastructure-3.3.csproj
r7649 r8563 223 223 <DependentUpon>PluginView.cs</DependentUpon> 224 224 </Compile> 225 <Compile Include="ArgumentHandling\ArgumentHandling.cs" /> 226 <Compile Include="ArgumentHandling\Arguments.cs" /> 227 <Compile Include="ArgumentHandling\IArgument.cs" /> 225 228 <Compile Include="Attributes\ApplicationAttribute.cs" /> 226 229 <Compile Include="Attributes\ContactInformationAttribute.cs" /> -
trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Main.cs
r7259 r8563 42 42 Application.EnableVisualStyles(); 43 43 Application.SetCompatibleTextRenderingDefault(false); 44 Application.Run(new StarterForm( ));44 Application.Run(new StarterForm(args)); 45 45 } 46 46 catch (Exception ex) { -
trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Starter/StarterForm.Designer.cs
r7967 r8563 181 181 this.Name = "StarterForm"; 182 182 this.Text = "HeuristicLab Starter"; 183 this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainForm_FormClosing); 183 this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.StarterForm_FormClosing); 184 this.Shown += new System.EventHandler(this.StarterForm_Shown); 184 185 this.ResumeLayout(false); 185 186 -
trunk/sources/HeuristicLab.PluginInfrastructure/3.3/Starter/StarterForm.cs
r7259 r8563 26 26 using System.Linq; 27 27 using System.Threading; 28 using System.Threading.Tasks; 28 29 using System.Windows.Forms; 29 30 using HeuristicLab.PluginInfrastructure.Advanced; 30 31 using HeuristicLab.PluginInfrastructure.Manager; 31 using System.Threading.Tasks;32 32 33 33 namespace HeuristicLab.PluginInfrastructure.Starter { … … 46 46 private SplashScreen splashScreen; 47 47 private bool updatesAvailable = false; 48 private string[] arguments; 49 48 50 /// <summary> 49 51 /// Initializes an instance of the starter form. … … 127 129 } 128 130 131 /// <summary> 132 /// Creates a new StarterForm and passes the arguments in <paramref name="args"/>. 133 /// </summary> 134 /// <param name="args">The arguments that should be processed</param> 135 public StarterForm(string[] args) 136 : this() { 137 this.arguments = args; 138 } 139 140 private void StarterForm_Shown(object sender, EventArgs e) { 141 foreach (var argument in ArgumentHandling.GetArguments(arguments)) { 142 if (argument is StartArgument) { 143 var appDesc = (from desc in pluginManager.Applications 144 where desc.Name == argument.Value 145 select desc).SingleOrDefault(); 146 if (appDesc != null) { 147 StartApplication(appDesc); 148 } else { 149 MessageBox.Show("Cannot start application " + argument.Value + ".", 150 "HeuristicLab", 151 MessageBoxButtons.OK, 152 MessageBoxIcon.Warning); 153 } 154 } 155 } 156 } 157 129 158 private void applicationsListView_ItemActivate(object sender, EventArgs e) { 130 159 if (applicationsListView.SelectedItems.Count > 0) { … … 259 288 } 260 289 261 private void MainForm_FormClosing(object sender, FormClosingEventArgs e) {290 private void StarterForm_FormClosing(object sender, FormClosingEventArgs e) { 262 291 splashScreen.Close(); 263 292 abortRequested = true;
Note: See TracChangeset
for help on using the changeset viewer.