当前位置: 首页>>代码示例>>C#>>正文


C# FormProcess.ShowDialog方法代码示例

本文整理汇总了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);
            }
        }
开发者ID:meaney,项目名称:gitextensions,代码行数:34,代码来源:FormCheckoutBranch.cs

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

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

示例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();
        }
开发者ID:Gitulf,项目名称:gitextensions,代码行数:14,代码来源:FormAddSubmodule.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);
            process.ShowDialog();
            FormVerify_Shown(null, null);
        }
开发者ID:Gitulf,项目名称:gitextensions,代码行数:17,代码来源:FormVerify.cs

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

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

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


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