本文整理汇总了C#中GitUI.FormProcess类的典型用法代码示例。如果您正苦于以下问题:C# FormProcess类的具体用法?C# FormProcess怎么用?C# FormProcess使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
FormProcess类属于GitUI命名空间,在下文中一共展示了FormProcess类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SynchronizeSubmoduleClick
private void SynchronizeSubmoduleClick(object sender, EventArgs e)
{
Cursor.Current = Cursors.WaitCursor;
var process = new FormProcess(GitCommands.GitCommands.SubmoduleSyncCmd(SubModuleName.Text));
process.ShowDialog();
Initialize();
}
示例2: InitSubmodule_Click
private void InitSubmodule_Click(object sender, EventArgs e)
{
Cursor.Current = Cursors.WaitCursor;
FormProcess process = new FormProcess(GitCommands.GitCommands.SubmoduleInitCmd(SubModuleName.Text));
process.ShowDialog();
Initialize();
}
示例3: OkClick
private void OkClick(object sender, EventArgs e)
{
try
{
//Get a localbranch name
var remoteName = GitCommands.GitCommands.GetRemoteName(Branches.Text, GitCommands.GitCommands.GetRemotes());
var localBranchName = Branches.Text.Substring(remoteName.Length + 1);
var command = "checkout";
if (Remotebranch.Checked)
{
var result =
MessageBox.Show(
"You choose to checkout a remote branch." + Environment.NewLine + Environment.NewLine +
"Do you want create a local branch with the name '" + localBranchName + "'" +
Environment.NewLine + "that track's this remote branch?", "Checkout branch",
MessageBoxButtons.YesNo);
if (result == DialogResult.Yes)
command += string.Format(" -b {0}", localBranchName);
}
if (Force.Checked)
command += " --force";
command += " \"" + Branches.Text + "\"";
var form = new FormProcess(command);
form.ShowDialog();
if (!form.ErrorOccured())
Close();
}
catch(Exception ex)
{
Trace.WriteLine(ex.Message);
}
}
示例4: ShowDialog
public static bool ShowDialog(IWin32Window owner, string process, string arguments, string aWorkingDirectory, string input, bool useDialogSettings)
{
using (var formProcess = new FormProcess(process, arguments, aWorkingDirectory, input, useDialogSettings))
{
formProcess.ShowDialog(owner);
return !formProcess.ErrorOccurred();
}
}
示例5: Cleanup_Click
private void Cleanup_Click(object sender, EventArgs e)
{
if (MessageBox.Show("Are you sure you want to cleanup the repository?", "Cleanup", MessageBoxButtons.YesNo) == DialogResult.Yes)
{
FormProcess form = new FormProcess(GitCommandHelpers.CleanUpCmd(false, RemoveDirectories.Checked, RemoveNonIgnored.Checked, RemoveIngnored.Checked));
form.ShowDialog();
PreviewOutput.Text = form.OutputString.ToString();
}
}
示例6: Cleanup_Click
private void Cleanup_Click(object sender, EventArgs e)
{
if (MessageBox.Show(_reallyCleanupQuestion.Text, _reallyCleanupQuestionCaption.Text, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
{
var form = new FormProcess(GitCommandHelpers.CleanUpCmd(false, RemoveDirectories.Checked, RemoveNonIgnored.Checked, RemoveIngnored.Checked));
form.ShowDialog();
PreviewOutput.Text = form.OutputString.ToString();
}
}
示例7: Ok_Click
private void Ok_Click(object sender, EventArgs e)
{
FormProcess process = new FormProcess(GitCommands.GitCommands.MergeBranchCmd(Branches.Text, !NoFastForward.Checked));
MergeConflictHandler.HandleMergeConflicts();
if (!process.ErrorOccured())
Close();
}
示例8: OkClick
private void OkClick(object sender, EventArgs e)
{
var process = new FormProcess(GitCommandHelpers.MergeBranchCmd(Branches.Text, fastForward.Checked, squash.Checked, noCommit.Checked, _NO_TRANSLATE_mergeStrategy.Text));
process.ShowDialog();
var wasConflict = MergeConflictHandler.HandleMergeConflicts();
if (!process.ErrorOccurred() || wasConflict)
Close();
}
示例9: BisectRange
private void BisectRange( string startRevision, string endRevision )
{
var command = GitCommandHelpers.MarkRevisionBisectCmd(true, startRevision);
var form = new FormProcess(command);
form.ShowDialog(this);
if (form.ErrorOccurred)
return;
command = GitCommandHelpers.MarkRevisionBisectCmd(false, endRevision);
form = new FormProcess(command);
form.ShowDialog(this);
}
示例10: Add_Click
private void Add_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(Directory.Text) || string.IsNullOrEmpty(LocalPath.Text))
{
MessageBox.Show("A remote path and local path are required");
return;
}
Cursor.Current = Cursors.WaitCursor;
FormProcess formProcess = new FormProcess(GitCommands.GitCommands.AddSubmoduleCmd(Directory.Text, LocalPath.Text, Branch.Text));
Close();
}
示例11: BisectRange
private void BisectRange(string startRevision, string endRevision)
{
var command = GitCommandHelpers.ContinueBisectCmd(GitBisectOption.Good, startRevision);
using (var form = new FormProcess(command))
{
form.ShowDialog(this);
if (form.ErrorOccurred())
return;
}
command = GitCommandHelpers.ContinueBisectCmd(GitBisectOption.Bad, endRevision);
FormProcess.ShowDialog(this, command);
}
示例12: button1_Click
private void button1_Click(object sender, EventArgs e)
{
string options = "";
if (Unreachable.Checked)
options += " --unreachable";
if (FullCheck.Checked)
options += " --full";
if (NoReflogs.Checked)
options += " --no-reflogs";
FormProcess process = new FormProcess("fsck-objects --lost-found" + options);
FormVerify_Shown(null, null);
}
示例13: InitializeSubmodulesRecursive
private static void InitializeSubmodulesRecursive()
{
string oldworkingdir = Settings.WorkingDir;
foreach (GitSubmodule submodule in GitCommands.GitCommands.GetSubmodules())
{
Settings.WorkingDir = oldworkingdir + submodule.LocalPath;
if (File.Exists(GitCommands.Settings.WorkingDir + ".gitmodules"))
{
FormProcess process = new FormProcess(GitCommands.GitCommands.SubmoduleInitCmd(""));
InitializeSubmodulesRecursive();
}
}
Settings.WorkingDir = oldworkingdir;
}
示例14: OkClick
private void OkClick(object sender, EventArgs e)
{
try
{
if (Revision == null)
{
MessageBox.Show(_noRevisionSelected.Text, Text);
return;
}
var branchCmd = GitCommandHelpers.BranchCmd(BranchNameTextBox.Text, Revision.Guid,
CheckoutAfterCreate.Checked);
using (var formProcess = new FormProcess(branchCmd))
{
formProcess.ShowDialog();
}
DialogResult = DialogResult.OK;
}
catch (Exception ex)
{
Trace.WriteLine(ex.Message);
}
}
示例15: InitializeSubmodulesRecursive
private static void InitializeSubmodulesRecursive()
{
string oldworkingdir = Settings.WorkingDir;
foreach (GitSubmodule submodule in (new GitCommands.GitCommands()).GetSubmodules())
{
if (!string.IsNullOrEmpty(submodule.LocalPath))
{
Settings.WorkingDir = oldworkingdir + submodule.LocalPath;
if (Settings.WorkingDir != oldworkingdir && File.Exists(GitCommands.Settings.WorkingDir + ".gitmodules"))
{
FormProcess process = new FormProcess(GitCommands.GitCommands.SubmoduleInitCmd(""));
process.ShowDialog();
InitializeSubmodulesRecursive();
}
Settings.WorkingDir = oldworkingdir;
}
}
Settings.WorkingDir = oldworkingdir;
}