Esempio n. 1
0
        private void DataReceivedCore(object sender, TextEventArgs e)
        {
            if(e.Text.Contains("%") || e.Text.Contains("remote: Counting objects"))
                SetProgress(e.Text);
            else
            {
                const string ansiSuffix = "\u001B[K";
                string line = e.Text.Replace(ansiSuffix, "");

                if(ConsoleOutput.IsDisplayingFullProcessOutput)
                    OutputLog.Append(line); // To the log only, display control displays it by itself
                else
                    AppendOutput(line); // Both to log and display control
            }

            DataReceived(sender, e);
        }
        protected override void DataReceived(object sender, TextEventArgs e)
        {
            if (Plink)
            {
                if (e.Text.StartsWith("If you trust this host, enter \"y\" to add the key to"))
                {
                    if (MessageBox.Show(this, _fingerprintNotRegistredText.Text, _fingerprintNotRegistredTextCaption.Text, MessageBoxButtons.YesNo) == DialogResult.Yes)
                    {
                        string remoteUrl = Module.GetPathSetting(string.Format(SettingKeyString.RemoteUrl, Remote));
                        remoteUrl = string.IsNullOrEmpty(remoteUrl) ? Remote : remoteUrl;
                        remoteUrl = GitCommandHelpers.GetPlinkCompatibleUrl(remoteUrl);

                        Module.RunExternalCmdShowConsole("cmd.exe", string.Format("/k \"\"{0}\" {1}\"", AppSettings.Plink, remoteUrl));

                        restart = true;
                    }

                    KillGitCommand();
                }
            }
            base.DataReceived(sender, e);
        }
Esempio n. 3
0
 protected virtual void DataReceived(object sender, TextEventArgs e)
 {
 }