using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace UniversalEditor.UserInterface { public abstract class Engine { protected abstract void MainLoop(); private System.Collections.ObjectModel.ReadOnlyCollection mvarSelectedFileNames = null; public System.Collections.ObjectModel.ReadOnlyCollection SelectedFileNames { get { return mvarSelectedFileNames; } } public void StartApplication() { string[] args1 = Environment.GetCommandLineArgs(); string[] args = new string[args1.Length - 1]; Array.Copy(args1, 1, args, 0, args.Length); System.Collections.ObjectModel.Collection selectedFileNames = new System.Collections.ObjectModel.Collection(); foreach (string commandLineArgument in args) { selectedFileNames.Add(commandLineArgument); } mvarSelectedFileNames = new System.Collections.ObjectModel.ReadOnlyCollection(selectedFileNames); MainLoop(); } } }