本文整理汇总了C#中GitUI.FormStatus类的典型用法代码示例。如果您正苦于以下问题:C# FormStatus类的具体用法?C# FormStatus怎么用?C# FormStatus使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
FormStatus类属于GitUI命名空间,在下文中一共展示了FormStatus类的16个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: Start
public static void Start(FormStatus form)
{
_form = form;
_timer = new Timer(600);
_timer.Elapsed += _timer_Elapsed;
_timer.Enabled = true;
}
开发者ID:nitoyon,项目名称:gitextensions,代码行数:7,代码来源:ProcessOutputTimer.cs
示例2: Start
public static void Start(FormStatus form)
{
_form = form;
_timer = new Timer(300);
_timer.Elapsed += new ElapsedEventHandler(_timer_Elapsed);
_timer.Enabled = true;
}
开发者ID:gorbach,项目名称:gitextensions,代码行数:7,代码来源:ProcessOutputTimer.cs
示例3: stageFile
private void stageFile(string filename)
{
var processStart = new FormStatus.ProcessStart
(
delegate(FormStatus form)
{
form.AddOutput(string.Format(stageFilename.Text, filename));
string output = Settings.Module.RunCmd
(
Settings.GitCommand, "add -- \"" + filename + "\""
);
form.AddOutput(output);
form.Done(string.IsNullOrEmpty(output));
}
);
var process = new FormStatus(processStart, null) { Text = string.Format(stageFilename.Text, filename) };
process.ShowDialogOnError(this);
}
开发者ID:JTidswell,项目名称:gitextensions,代码行数:18,代码来源:FormResolveConflicts.cs
示例4: Stage
private void Stage(ICollection<GitItemStatus> gitItemStatusses)
{
EnableStageButtons(false);
try
{
Cursor.Current = Cursors.WaitCursor;
toolStripProgressBar1.Visible = true;
toolStripProgressBar1.Maximum = gitItemStatusses.Count * 2;
toolStripProgressBar1.Value = 0;
var files = new List<GitItemStatus>();
foreach (var gitItemStatus in gitItemStatusses)
{
toolStripProgressBar1.Value = Math.Min(toolStripProgressBar1.Maximum - 1, toolStripProgressBar1.Value + 1);
files.Add(gitItemStatus);
}
if (Settings.ShowErrorsWhenStagingFiles)
{
FormStatus.ProcessStart processStart =
form =>
{
form.AddOutput(string.Format(_stageFiles.Text,
files.Count));
var output = GitCommandHelpers.StageFiles(files);
form.AddOutput(output);
form.Done(string.IsNullOrEmpty(output));
};
var process = new FormStatus(processStart, null) { Text = _stageDetails.Text };
process.ShowDialogOnError();
}
else
{
GitCommandHelpers.StageFiles(files);
}
InitializedStaged();
var stagedFiles = (List<GitItemStatus>)Staged.GitItemStatuses;
var unStagedFiles = (List<GitItemStatus>)Unstaged.GitItemStatuses;
Unstaged.GitItemStatuses = null;
unStagedFiles.RemoveAll(item => stagedFiles.Exists(i => i.Name == item.Name || i.OldName == item.Name) && files.Exists(i => i.Name == item.Name));
Unstaged.GitItemStatuses = unStagedFiles;
toolStripProgressBar1.Value = toolStripProgressBar1.Maximum;
toolStripProgressBar1.Visible = false;
}
catch (Exception ex)
{
Trace.WriteLine(ex.Message);
}
EnableStageButtons(true);
Commit.Enabled = true;
Amend.Enabled = true;
AcceptButton = Commit;
Commit.Focus();
Cursor.Current = Cursors.Default;
if (Settings.RevisionGraphShowWorkingDirChanges)
NeedRefresh = true;
}
开发者ID:Siorghlas,项目名称:gitextensions,代码行数:65,代码来源:FormCommit.cs
示例5: processStart
private void processStart(FormStatus form)
{
BeforeProcessStart();
AddOutput(ProcessString + " " + ProcessArguments);
gitCommand = new GitCommandsInstance { CollectOutput = false };
try
{
Process = gitCommand.CmdStartProcess(ProcessString, ProcessArguments);
gitCommand.Exited += gitCommand_Exited;
gitCommand.DataReceived += gitCommand_DataReceived;
if (!string.IsNullOrEmpty(ProcessInput))
{
Thread.Sleep(500);
Process.StandardInput.Write(ProcessInput);
AddOutput(string.Format(":: Wrote [{0}] to process!\r\n", ProcessInput));
}
}
catch (Exception e)
{
AddOutput(e.Message);
gitCommand.ExitCode = 1;
gitCommand_Exited(null, null);
}
}
开发者ID:afabre,项目名称:gitextensions,代码行数:26,代码来源:FormProcess.cs
示例6: processAbort
private void processAbort(FormStatus form)
{
if (Process != null)
{
Process.Kill();
}
}
开发者ID:afabre,项目名称:gitextensions,代码行数:7,代码来源:FormProcess.cs
示例7: Stage
private void Stage(IEnumerable<GitItemStatus> gitItemStatusses)
{
EnableStageButtons(false);
try
{
Cursor.Current = Cursors.WaitCursor;
Unstaged.StoreNextIndexToSelect();
toolStripProgressBar1.Visible = true;
toolStripProgressBar1.Maximum = gitItemStatusses.Count() * 2;
toolStripProgressBar1.Value = 0;
var files = new List<GitItemStatus>();
foreach (var gitItemStatus in gitItemStatusses)
{
toolStripProgressBar1.Value = Math.Min(toolStripProgressBar1.Maximum - 1, toolStripProgressBar1.Value + 1);
files.Add(gitItemStatus);
}
bool wereErrors = false;
if (Settings.ShowErrorsWhenStagingFiles)
{
FormStatus.ProcessStart processStart =
form =>
{
form.AddMessageLine(string.Format(_stageFiles.Text,
files.Count));
var output = Module.StageFiles(files, out wereErrors);
form.AddMessageLine(output);
form.Done(string.IsNullOrEmpty(output));
};
using (var process = new FormStatus(processStart, null) { Text = _stageDetails.Text })
process.ShowDialogOnError(this);
}
else
{
Module.StageFiles(files, out wereErrors);
}
if (wereErrors)
RescanChanges();
else
{
InitializedStaged();
var unStagedFiles = (List<GitItemStatus>)Unstaged.GitItemStatuses;
Unstaged.GitItemStatuses = null;
unStagedFiles.RemoveAll(item => files.Exists(i => i.Name == item.Name || i.OldName == item.Name) && files.Exists(i => i.Name == item.Name));
Unstaged.GitItemStatuses = unStagedFiles;
Unstaged.SelectStoredNextIndex();
}
toolStripProgressBar1.Value = toolStripProgressBar1.Maximum;
toolStripProgressBar1.Visible = false;
}
catch (Exception ex)
{
Trace.WriteLine(ex.Message);
}
EnableStageButtons(true);
Commit.Enabled = true;
Amend.Enabled = true;
AcceptButton = Commit;
Cursor.Current = Cursors.Default;
if (Settings.RevisionGraphShowWorkingDirChanges)
NeedRefresh = true;
}
开发者ID:piet-delaney,项目名称:gitextensions,代码行数:70,代码来源:FormCommit.cs
示例8: processStart
private void processStart(FormStatus form)
{
BeforeProcessStart();
string QuotedProcessString = ProcessString;
if (QuotedProcessString.IndexOf(' ') != -1)
QuotedProcessString = QuotedProcessString.Quote();
AddMessageLine(QuotedProcessString + " " + ProcessArguments);
gitCommand = new GitCommandsInstance(WorkingDirectory) { CollectOutput = false };
try
{
Process = gitCommand.CmdStartProcess(ProcessString, ProcessArguments);
gitCommand.Exited += gitCommand_Exited;
gitCommand.DataReceived += gitCommand_DataReceived;
if (!string.IsNullOrEmpty(ProcessInput))
{
Thread.Sleep(500);
Process.StandardInput.Write(ProcessInput);
AddMessageLine(string.Format(":: Wrote [{0}] to process!\r\n", ProcessInput));
}
}
catch (Exception e)
{
AddMessageLine("\n" + e.ToStringWithData());
gitCommand.ExitCode = 1;
gitCommand_Exited(null, null);
}
}
开发者ID:CallMeLaNN,项目名称:gitextensions,代码行数:29,代码来源:FormProcess.cs
示例9: processAbort
private void processAbort(FormStatus form)
{
if (Process != null)
{
Process.TerminateTree();
}
}
开发者ID:CallMeLaNN,项目名称:gitextensions,代码行数:7,代码来源:FormProcess.cs
示例10: Stage
private void Stage(IList<GitItemStatus> gitItemStatusses)
{
UnstageFiles.Enabled = false;
AddFiles.Enabled = false;
try
{
Cursor.Current = Cursors.WaitCursor;
//Loading.Visible = true;
progressBar.Visible = true;
progressBar.Maximum = gitItemStatusses.Count * 2;
progressBar.Value = 0;
List<GitItemStatus> files = new List<GitItemStatus>();
foreach (GitItemStatus gitItemStatus in gitItemStatusses)
{
progressBar.Value = Math.Min(progressBar.Maximum - 1, progressBar.Value + 1);
files.Add(gitItemStatus);
}
/*OutPut.Text = */
FormStatus.ProcessStart processStart = new FormStatus.ProcessStart
(
delegate(FormStatus form)
{
form.AddOutput(string.Format(stageFiles.Text, files.Count));
string output = GitCommands.GitCommands.StageFiles(files);
form.AddOutput(output);
form.Done(string.IsNullOrEmpty(output));
}
);
FormStatus process = new FormStatus(processStart, null);
process.Text = stageDetails.Text;
process.ShowDialogOnError();
InitializedStaged();
List<GitItemStatus> stagedFiles = (List<GitItemStatus>)Staged.GitItemStatusses;
List<GitItemStatus> unStagedFiles = (List<GitItemStatus>)Unstaged.GitItemStatusses;
Unstaged.GitItemStatusses = null;
unStagedFiles.RemoveAll(item => stagedFiles.Exists(i => i.Name == item.Name));
Unstaged.GitItemStatusses = unStagedFiles;
progressBar.Value = progressBar.Maximum;
//Initialize();
progressBar.Visible = false;
}
catch
{
}
UnstageFiles.Enabled = true;
AddFiles.Enabled = true;
Commit.Enabled = true;
Amend.Enabled = true;
AcceptButton = Commit;
Commit.Focus();
}
开发者ID:alexeik,项目名称:gitextensions,代码行数:60,代码来源:FormCommit.cs
示例11: processStart
private void processStart(FormStatus form)
{
restart = false;
AddOutput(ProcessString + " " + ProcessArguments);
Plink = GitCommandHelpers.Plink();
gitCommand = new GitCommands.GitCommandsInstance();
gitCommand.CollectOutput = false;
Process = gitCommand.CmdStartProcess(ProcessString, ProcessArguments);
gitCommand.Exited += new EventHandler(gitCommand_Exited);
gitCommand.DataReceived += new DataReceivedEventHandler(gitCommand_DataReceived);
}
开发者ID:RyanFarley,项目名称:gitextensions,代码行数:14,代码来源:FormProcess.cs
示例12: processStart
private void processStart(FormStatus form)
{
restart = false;
AddOutput(ProcessString + " " + ProcessArguments);
Plink = GitCommandHelpers.Plink();
gitCommand = new GitCommands.GitCommandsInstance();
gitCommand.CollectOutput = false;
try
{
Process = gitCommand.CmdStartProcess(ProcessString, ProcessArguments);
gitCommand.Exited += new EventHandler(gitCommand_Exited);
gitCommand.DataReceived += new DataReceivedEventHandler(gitCommand_DataReceived);
}
catch (Exception e)
{
AddOutput(e.Message);
gitCommand.ExitCode = 1;
gitCommand_Exited(null, null);
}
}
开发者ID:gorbach,项目名称:gitextensions,代码行数:23,代码来源:FormProcess.cs
示例13: Stage
private void Stage(ICollection<GitItemStatus> gitItemStatusses)
{
UnstageFiles.Enabled = false;
AddFiles.Enabled = false;
try
{
Cursor.Current = Cursors.WaitCursor;
progressBar.Visible = true;
progressBar.Maximum = gitItemStatusses.Count*2;
progressBar.Value = 0;
var files = new List<GitItemStatus>();
foreach (var gitItemStatus in gitItemStatusses)
{
progressBar.Value = Math.Min(progressBar.Maximum - 1, progressBar.Value + 1);
files.Add(gitItemStatus);
}
FormStatus.ProcessStart processStart =
form =>
{
form.AddOutput(string.Format(_stageFiles.Text,
files.Count));
var output = GitCommands.GitCommands.StageFiles(files);
form.AddOutput(output);
form.Done(string.IsNullOrEmpty(output));
};
var process = new FormStatus(processStart, null) {Text = _stageDetails.Text};
process.ShowDialogOnError();
InitializedStaged();
var stagedFiles = (List<GitItemStatus>) Staged.GitItemStatusses;
var unStagedFiles = (List<GitItemStatus>) Unstaged.GitItemStatusses;
Unstaged.GitItemStatusses = null;
unStagedFiles.RemoveAll(item => stagedFiles.Exists(i => i.Name == item.Name) && files.Exists(i => i.Name == item.Name));
Unstaged.GitItemStatusses = unStagedFiles;
progressBar.Value = progressBar.Maximum;
progressBar.Visible = false;
}
catch (Exception ex)
{
Trace.WriteLine(ex.Message);
}
UnstageFiles.Enabled = true;
AddFiles.Enabled = true;
Commit.Enabled = true;
Amend.Enabled = true;
AcceptButton = Commit;
Commit.Focus();
}
开发者ID:meaney,项目名称:gitextensions,代码行数:56,代码来源:FormCommit.cs
示例14: processStart
private void processStart(FormStatus form)
{
BeforeProcessStart();
string QuotedProcessString = ProcessString;
if (QuotedProcessString.IndexOf(' ') != -1)
QuotedProcessString = QuotedProcessString.Quote();
AddMessageLine(QuotedProcessString + " " + ProcessArguments);
try
{
ConsoleOutput.StartProcess(ProcessString, ProcessArguments, WorkingDirectory);
if (!string.IsNullOrEmpty(ProcessInput))
{
throw new NotSupportedException("No non-NULL usages of ProcessInput are currently expected."); // Not implemented with all terminal variations, so let's postpone until there's at least one non-null case
/*
Thread.Sleep(500);
Process.StandardInput.Write(ProcessInput);
AddMessageLine(string.Format(":: Wrote [{0}] to process!\r\n", ProcessInput));
*/
}
}
catch (Exception e)
{
AddMessageLine("\n" + e.ToStringWithData());
OnExit(1);
}
}
开发者ID:qgppl,项目名称:gitextensions,代码行数:28,代码来源:FormProcess.cs
示例15: processAbort
private void processAbort(FormStatus form)
{
ConsoleOutput.KillProcess();
}
开发者ID:qgppl,项目名称:gitextensions,代码行数:4,代码来源:FormProcess.cs
示例16: DispatcherFrameModalControler
public DispatcherFrameModalControler(FormStatus aFormStatus, IWin32Window aOwner)
{
FormStatus = aFormStatus;
Owner = aOwner;
}
开发者ID:qgppl,项目名称:gitextensions,代码行数:5,代码来源:FormStatus.cs
注:本文中的GitUI.FormStatus类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论