Ejemplo n.º 1
0
        public FormStatus(ConsoleOutputControl aConsoleOutput, bool useDialogSettings)
            : base(true)
        {
            UseDialogSettings = useDialogSettings;
            if (aConsoleOutput == null)
            {
                ConsoleOutput = ConsoleOutputControl.CreateInstance();
            }
            else
            {
                ConsoleOutput = aConsoleOutput;
            }
            ConsoleOutput.Dock        = DockStyle.Fill;
            ConsoleOutput.Terminated += delegate { Close(); }; // This means the control is not visible anymore, no use in keeping. Expected scenario: user hits ESC in the prompt after the git process exits

            InitializeComponent();
            Translate();
            if (UseDialogSettings)
            {
                KeepDialogOpen.Checked = !GitCommands.AppSettings.CloseProcessDialog;
            }
            else
            {
                KeepDialogOpen.Hide();
            }
        }
Ejemplo n.º 2
0
        public FormStatus(GitUICommands commands, [CanBeNull] ConsoleOutputControl consoleOutput, bool useDialogSettings)
            : base(commands, enablePositionRestore: true)
        {
            _useDialogSettings = useDialogSettings;

            ConsoleOutput             = consoleOutput ?? ConsoleOutputControl.CreateInstance();
            ConsoleOutput.Dock        = DockStyle.Fill;
            ConsoleOutput.Terminated += delegate { Close(); }; // This means the control is not visible anymore, no use in keeping. Expected scenario: user hits ESC in the prompt after the git process exits

            InitializeComponent();

            if (_useDialogSettings)
            {
                KeepDialogOpen.Checked = !AppSettings.CloseProcessDialog;
            }
            else
            {
                KeepDialogOpen.Hide();
            }

            // work-around the designer bug that can't add controls to FlowLayoutPanel
            ControlsPanel.Controls.Add(Abort);
            ControlsPanel.Controls.Add(Ok);
            ControlsPanel.Controls.Add(KeepDialogOpen);

            Controls.SetChildIndex(ProgressBar, 1);
            ProgressBar.Dock = DockStyle.Bottom;

            InitializeComplete();
        }
Ejemplo n.º 3
0
        public FormStatus([CanBeNull] ConsoleOutputControl consoleOutput, bool useDialogSettings)
            : base(true)
        {
            _useDialogSettings = useDialogSettings;

            ConsoleOutput             = consoleOutput ?? ConsoleOutputControl.CreateInstance();
            ConsoleOutput.Dock        = DockStyle.Fill;
            ConsoleOutput.Terminated += delegate { Close(); }; // This means the control is not visible anymore, no use in keeping. Expected scenario: user hits ESC in the prompt after the git process exits

            InitializeComponent();

            if (_useDialogSettings)
            {
                KeepDialogOpen.Checked = !AppSettings.CloseProcessDialog;
            }
            else
            {
                KeepDialogOpen.Hide();
            }

            InitializeComplete();
        }