• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# GitUI.FormProcess类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中GitUI.FormProcess的典型用法代码示例。如果您正苦于以下问题:C# FormProcess类的具体用法?C# FormProcess怎么用?C# FormProcess使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



FormProcess类属于GitUI命名空间,在下文中一共展示了FormProcess类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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();
 }
开发者ID:meaney,项目名称:gitextensions,代码行数:7,代码来源:FormSubmodules.cs


示例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();
 }
开发者ID:Gitulf,项目名称:gitextensions,代码行数:7,代码来源:FormSubmodules.cs


示例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);
            }
        }
开发者ID:meaney,项目名称:gitextensions,代码行数:34,代码来源:FormCheckoutBranch.cs


示例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();
     }
 }
开发者ID:Carbenium,项目名称:gitextensions,代码行数:8,代码来源:FormProcess.cs


示例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();
     }
 }
开发者ID:RyanFarley,项目名称:gitextensions,代码行数:9,代码来源:FormCleanupRepository.cs


示例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();
     }
 }
开发者ID:sopolenius,项目名称:gitextensions,代码行数:9,代码来源:FormCleanupRepository.cs


示例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();
        }
开发者ID:spidercat,项目名称:gitextensions,代码行数:9,代码来源:FormMergeBranch.cs


示例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();
        }
开发者ID:jscoles,项目名称:gitextensions,代码行数:10,代码来源:FormMergeBranch.cs


示例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);
 }
开发者ID:dominiqueplante,项目名称:gitextensions,代码行数:11,代码来源:FormBisect.cs


示例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();
        }
开发者ID:jorn,项目名称:gitextensions,代码行数:13,代码来源:FormAddSubmodule.cs


示例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);
        }
开发者ID:Nehle,项目名称:gitextensions,代码行数:13,代码来源:FormBisect.cs


示例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);
        }
开发者ID:spidercat,项目名称:gitextensions,代码行数:16,代码来源:FormVerify.cs


示例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;
        }
开发者ID:MikeDSmith,项目名称:gitextensions,代码行数:18,代码来源:FormClone.cs


示例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);
            }
        }
开发者ID:sopolenius,项目名称:gitextensions,代码行数:23,代码来源:FormBranchSmall.cs


示例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;
        }
开发者ID:TwistedHope,项目名称:gitextensions,代码行数:24,代码来源:FormClone.cs


示例16: DoCommit

        private void DoCommit(bool amend, bool push)
        {
            if (GitCommandHelpers.InTheMiddleOfConflictedMerge())
            {
                MessageBox.Show(_mergeConflicts.Text, _mergeConflictsCaption.Text, MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }
            if (string.IsNullOrEmpty(Message.Text))
            {
                MessageBox.Show(_enterCommitMessage.Text, _enterCommitMessageCaption.Text, MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                return;
            }

            if (GitCommandHelpers.GetSelectedBranch().Equals("(no branch)", StringComparison.OrdinalIgnoreCase) &&
                MessageBox.Show(_notOnBranch.Text, _notOnBranchCaption.Text, MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation) == DialogResult.No)
                return;

            try
            {
                SetCommitMessageFromTextBox(Message.Text);

                var form = new FormProcess(GitCommandHelpers.CommitCmd(amend, toolAuthor.Text));
                form.ShowDialog();

                NeedRefresh = true;

                if (form.ErrorOccurred())
                    return;

                Message.Text = string.Empty;

                if (push)
                {
                    GitUICommands.Instance.StartPushDialog(true);
                }

                if (Settings.CloseCommitDialogAfterCommit)
                {
                    Close();
                    return;
                }

                if (Unstaged.GitItemStatuses.Any(gitItemStatus => gitItemStatus.IsTracked))
                {
                    InitializedStaged();
                    return;
                }

                if (Settings.CloseCommitDialogAfterLastCommit)
                    Close();
                else
                    InitializedStaged();
            }
            catch (Exception e)
            {
                MessageBox.Show(string.Format("Exception: {0}", e.Message));
            }
        }
开发者ID:Siorghlas,项目名称:gitextensions,代码行数:58,代码来源:FormCommit.cs


示例17: ShowProcessDialogBox

 private void ShowProcessDialogBox(IWin32Window owner, string source, FormProcess process)
 {
     if (process == null)
         return;
     if (!IsPullAll())
         process.Remote = source;
     process.ShowDialog(owner);
     ErrorOccurred = process.ErrorOccurred();
 }
开发者ID:eranws,项目名称:gitextensions,代码行数:9,代码来源:FormPull.cs


示例18: ShouldStashPop

 private bool ShouldStashPop(bool messageBoxResult, FormProcess process, bool stashed)
 {
     return stashed &&
            process != null &&
            !process.ErrorOccurred() &&
            !Module.InTheMiddleOfConflictedMerge() &&
            !Module.InTheMiddleOfRebase() &&
            messageBoxResult;
 }
开发者ID:eranws,项目名称:gitextensions,代码行数:9,代码来源:FormPull.cs


示例19: EvaluateResultsBasedOnSettings

        private bool EvaluateResultsBasedOnSettings(bool stashed, FormProcess process)
        {
            if (!Module.InTheMiddleOfConflictedMerge() &&
                !Module.InTheMiddleOfRebase() &&
                (process != null && !process.ErrorOccurred()))
            {
                InitModules();
                return true;
            }

            // Rebase failed -> special 'rebase' merge conflict
            if (Rebase.Checked && Module.InTheMiddleOfRebase())
            {
                UICommands.StartRebaseDialog(null);
                if (!Module.InTheMiddleOfConflictedMerge() &&
                    !Module.InTheMiddleOfRebase())
                {
                    return true;
                }
            }
            else
            {
                MergeConflictHandler.HandleMergeConflicts(UICommands, this);
                if (!Module.InTheMiddleOfConflictedMerge() &&
                    !Module.InTheMiddleOfRebase())
                {
                    return true;
                }
            }

            if (!AutoStash.Checked || !stashed || Module.InTheMiddleOfConflictedMerge() ||
                Module.InTheMiddleOfRebase())
            {
                return true;
            }
            return false;
        }
开发者ID:eranws,项目名称:gitextensions,代码行数:37,代码来源:FormPull.cs


示例20: EvaluateProcessDialogResults

        private DialogResult EvaluateProcessDialogResults(IWin32Window owner, FormProcess process, bool stashed)
        {
            try
            {
                if (EvaluateResultsBasedOnSettings(stashed, process))
                    return DialogResult.OK;
            }
            finally
            {
                if (stashed)
                {
                    bool messageBoxResult =
                        MessageBox.Show(owner, _applyShashedItemsAgain.Text, _applyShashedItemsAgainCaption.Text,
                                        MessageBoxButtons.YesNo) == DialogResult.Yes;
                    if (ShouldStashPop(messageBoxResult, process, true))
                    {
                        FormProcess.ShowDialog(owner, Module, "stash pop");
                        MergeConflictHandler.HandleMergeConflicts(UICommands, owner, false);
                    }
                }

                ScriptManager.RunEventScripts(Module, ScriptEvent.AfterPull);
            }

            return DialogResult.No;
        }
开发者ID:eranws,项目名称:gitextensions,代码行数:26,代码来源:FormPull.cs



注:本文中的GitUI.FormProcess类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# GitUI.FormStatus类代码示例发布时间:2022-05-26
下一篇:
C# Transport.URIish类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap