本文整理汇总了C#中GitUI.FormProcess.ShowDialog方法的典型用法代码示例。如果您正苦于以下问题:C# FormProcess.ShowDialog方法的具体用法?C# FormProcess.ShowDialog怎么用?C# FormProcess.ShowDialog使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GitUI.FormProcess
的用法示例。
在下文中一共展示了FormProcess.ShowDialog方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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);
}
}
示例2: SynchronizeSubmoduleClick
private void SynchronizeSubmoduleClick(object sender, EventArgs e)
{
Cursor.Current = Cursors.WaitCursor;
var process = new FormProcess(GitCommands.GitCommands.SubmoduleSyncCmd(SubModuleName.Text));
process.ShowDialog();
Initialize();
}
示例3: 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();
}
示例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: OkClick
private void OkClick(object sender, EventArgs e)
{
var process = new FormProcess(GitCommands.GitCommands.MergeBranchCmd(Branches.Text, fastForward.Checked));
process.ShowDialog();
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: 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);
}
示例11: 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));
formProcess.ShowDialog();
Close();
}
示例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);
process.ShowDialog();
FormVerify_Shown(null, null);
}
示例13: 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);
}
}
示例14: 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;
}
示例15: OkClick
private void OkClick(object sender, EventArgs e)
{
try
{
Settings.AutoStash = cbAutoStash.Checked;
var command = "checkout";
//Get a localbranch name
if (rbCreateBranch.Checked)
command += string.Format(" -b {0}", _newLocalBranchName);
else if (rbResetBranch.Checked)
command += string.Format(" -B {0}", _localBranchName);
command += " \"" + _branch + "\"";
bool stashed = CalculateStashedValue();
var form = new FormProcess(command);
form.ShowDialog(this);
if (!form.ErrorOccurred() && stashed)
{
bool messageBoxResult = MessageBox.Show(this, _applyShashedItemsAgain.Text,
_applyShashedItemsAgainCaption.Text, MessageBoxButtons.YesNo) == DialogResult.Yes;
if (messageBoxResult)
new FormProcess("stash pop").ShowDialog(this);
}
if (!form.ErrorOccurred())
Close();
}
catch (Exception ex)
{
Trace.WriteLine(ex.Message);
}
}