public ConsoleHandler(ConsoleForm consoleForm)
        {
            consoleForm.FormConsoleHandler = this;
            this.MainForm = consoleForm;
            Process = null;
            Terminating = false;
            ProcessIOActive = false;
            IgnoreNextLossOfFocus = true;

            ProgramDirectory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
            string configurationPath = Path.Combine(ProgramDirectory, Configuration.ConfigurationFile);

            ConfigurationSerialiser = new Nil.Serialiser<Configuration>(configurationPath);

            AutoCompletionMatchesForm = new AutoCompletionForm(this);
            OriginalAutoListBoxHeight = AutoCompletionMatchesForm.AutoCompletionListBox.Height;

            HomePath = Environment.GetFolderPath(System.Environment.SpecialFolder.Personal);

            LoadConfiguration();
            InitialiseVariableDictionary();
            InitialiseKeyPressHandlerDictionary();
            IsWindows = IsWindowsOS();
            PathNames = LoadPathNames();
            InitialiseCommands();
        }
示例#2
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            ConsoleForm consoleForm = new ConsoleForm();
            new ConsoleHandler(consoleForm);

            Application.Run(consoleForm);
        }