Changeset 8818 for trunk/sources/HeuristicLab.Optimizer
- Timestamp:
- 10/17/12 21:46:00 (12 years ago)
- Location:
- trunk/sources/HeuristicLab.Optimizer/3.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Optimizer/3.3/FileManager.cs
r8587 r8818 21 21 22 22 using System; 23 using System.Collections.Generic; 23 24 using System.Linq; 24 25 using System.Windows.Forms; … … 59 60 60 61 if (openFileDialog.ShowDialog() == DialogResult.OK) { 61 foreach (string filename in openFileDialog.FileNames) { 62 ((MainForm.WindowsForms.MainForm)MainFormManager.MainForm).SetAppStartingCursor(); 63 ContentManager.LoadAsync(filename, LoadingCompleted); 64 } 62 OpenFiles(openFileDialog.FileNames); 65 63 } 66 64 } 65 66 public static void OpenFiles(IEnumerable<string> fileNames) { 67 foreach (string filename in fileNames) { 68 ((MainForm.WindowsForms.MainForm)MainFormManager.MainForm).SetAppStartingCursor(); 69 ContentManager.LoadAsync(filename, LoadingCompleted); 70 } 71 } 72 67 73 private static void LoadingCompleted(IStorableContent content, Exception error) { 68 74 try { -
trunk/sources/HeuristicLab.Optimizer/3.3/Plugin.cs.frame
r8246 r8818 20 20 #endregion 21 21 22 using System.Linq; 22 23 using System.Windows.Forms; 23 24 using HeuristicLab.Clients.Access; … … 48 49 [Application("Optimizer", "HeuristicLab Optimizer 3.3.7.$WCREV$")] 49 50 internal class HeuristicLabOptimizerApplication : ApplicationBase { 50 public override void Run( ) {51 HeuristicLab.MainForm.WindowsForms.MainForm mainForm = null;51 public override void Run(ICommandLineArgument[] args) { 52 HeuristicLab.MainForm.WindowsForms.MainForm mainForm = null; 52 53 53 54 if (Settings.Default.MainFormType == OptimizerMainFormTypes.DockingMainForm) { … … 64 65 65 66 mainForm.ShowContentInViewHost = true; 67 mainForm.Arguments = args; 68 var filesToOpen = mainForm.Arguments.OfType<OpenArgument>().Select(x => x.Value); 69 mainForm.Load += (sender, eventArgs) => FileManager.OpenFiles(filesToOpen); 66 70 Application.Run(mainForm); 67 71 } else {
Note: See TracChangeset
for help on using the changeset viewer.