本文整理汇总了C#中GitCommands.GitRevision类的典型用法代码示例。如果您正苦于以下问题:C# GitRevision类的具体用法?C# GitRevision怎么用?C# GitRevision使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
GitRevision类属于GitCommands命名空间,在下文中一共展示了GitRevision类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: BuildStatusMessageCellPainting
public static void BuildStatusMessageCellPainting(DataGridViewCellPaintingEventArgs e, GitRevision revision, Brush foreBrush, Font rowFont)
{
if (revision.BuildStatus != null)
{
Brush buildStatusForebrush = foreBrush;
switch (revision.BuildStatus.Status)
{
case BuildInfo.BuildStatus.Success:
buildStatusForebrush = Brushes.DarkGreen;
break;
case BuildInfo.BuildStatus.Failure:
buildStatusForebrush = Brushes.DarkRed;
break;
case BuildInfo.BuildStatus.InProgress:
buildStatusForebrush = Brushes.Blue;
break;
case BuildInfo.BuildStatus.Unstable:
buildStatusForebrush = Brushes.OrangeRed;
break;
case BuildInfo.BuildStatus.Stopped:
buildStatusForebrush = Brushes.Gray;
break;
}
var text = (string)e.FormattedValue;
e.Graphics.DrawString(text, rowFont, buildStatusForebrush, new PointF(e.CellBounds.Left, e.CellBounds.Top + 4));
}
}
示例2: BuildStatusImageColumnCellPainting
public static void BuildStatusImageColumnCellPainting(DataGridViewCellPaintingEventArgs e, GitRevision revision, Brush foreBrush, Font rowFont)
{
if (revision.BuildStatus != null)
{
Image buildStatusImage = null;
switch (revision.BuildStatus.Status)
{
case BuildInfo.BuildStatus.Success:
buildStatusImage = Resources.BuildSuccessful;
break;
case BuildInfo.BuildStatus.Failure:
buildStatusImage = Resources.BuildFailed;
break;
case BuildInfo.BuildStatus.Unknown:
buildStatusImage = Resources.BuildCancelled;
break;
case BuildInfo.BuildStatus.InProgress:
buildStatusImage = Resources.Icon_77;
break;
case BuildInfo.BuildStatus.Unstable:
buildStatusImage = Resources.bug;
break;
case BuildInfo.BuildStatus.Stopped:
buildStatusImage = Resources.BuildCancelled;
break;
}
if (buildStatusImage != null)
{
e.Graphics.DrawImage(buildStatusImage, new Rectangle(e.CellBounds.Left, e.CellBounds.Top + 4, 16, 16));
}
}
}
示例3: RevisionGrid
public RevisionGrid(GitRevision initialSelectedRevision)
{
_initialSelectedRevision = initialSelectedRevision;
syncContext = SynchronizationContext.Current;
base.InitLayout();
InitializeComponent(); Translate();
NormalFont = Revisions.Font;
HeadFont = new Font(NormalFont, FontStyle.Underline);
RefsFont = new Font(NormalFont, FontStyle.Bold);
Revisions.CellPainting += new DataGridViewCellPaintingEventHandler(Revisions_CellPainting);
Revisions.KeyDown += new KeyEventHandler(Revisions_KeyDown);
showRevisionGraphToolStripMenuItem.Checked = Settings.ShowRevisionGraph;
showAuthorDateToolStripMenuItem.Checked = Settings.ShowAuthorDate;
orderRevisionsByDateToolStripMenuItem.Checked = Settings.OrderRevisionByDate;
showRelativeDateToolStripMenuItem.Checked = Settings.RelativeDate;
BranchFilter = String.Empty;
SetShowBranches();
filter = "";
quickSearchString = "";
quickSearchTimer.Tick += new EventHandler(quickSearchTimer_Tick);
Revisions.Loading += new DvcsGraph.LoadingHandler(Revisions_Loading);
}
示例4: SetRevision
public void SetRevision(string revision)
{
Revision = new GitRevision();
Revision.Guid = revision;
Revision.ParentGuids = new string[]{revision + "^"};
SetRevision(Revision);
}
示例5: FormDiff
public FormDiff(GitUICommands aCommands, RevisionGrid revisionGrid, string baseCommitSha,
string headCommitSha, string baseCommitDisplayStr, string headCommitDisplayStr) : base(aCommands)
{
RevisionGrid = revisionGrid;
_baseCommitDisplayStr = baseCommitDisplayStr;
_headCommitDisplayStr = headCommitDisplayStr;
InitializeComponent();
Translate();
_toolTipControl.SetToolTip(btnAnotherBaseBranch, anotherBranchTooltip.Text);
_toolTipControl.SetToolTip(btnAnotherHeadBranch, anotherBranchTooltip.Text);
_toolTipControl.SetToolTip(btnAnotherBaseCommit, anotherCommitTooltip.Text);
_toolTipControl.SetToolTip(btnAnotherHeadCommit, anotherCommitTooltip.Text);
_toolTipControl.SetToolTip(btnSwap, btnSwapTooltip.Text);
if (!IsUICommandsInitialized)
{// UICommands is not initialized in translation unit test.
return;
}
_baseRevision = new GitRevision(Module, baseCommitSha);
_headRevision = new GitRevision(Module, headCommitSha);
_mergeBase = new GitRevision(Module, Module.GetMergeBase(_baseRevision.Guid, _headRevision.Guid));
lblBaseCommit.BackColor = AppSettings.DiffRemovedColor;
lblHeadCommit.BackColor = AppSettings.DiffAddedColor;
DiffFiles.SelectedIndexChanged += DiffFiles_SelectedIndexChanged;
DiffFiles.ContextMenuStrip = DiffContextMenu;
this.Load += (sender, args) => PopulateDiffFiles();
}
示例6: FormDiff
public FormDiff(GitRevision revision)
{
InitializeComponent();
EditorOptions.SetSyntax(DiffText, "output.cs");
RevisionGrid.SetSelectedRevision( revision);
}
示例7: FormFileHistory
public FormFileHistory(string fileName, GitRevision revision, bool filterByRevision)
: base(true)
{
InitializeComponent();
syncContext = SynchronizationContext.Current;
filterBranchHelper = new FilterBranchHelper(toolStripBranches, toolStripDropDownButton2, FileChanges);
filterRevisionsHelper = new FilterRevisionsHelper(toolStripTextBoxFilter, toolStripDropDownButton1, FileChanges, toolStripLabel2, this);
FileChanges.SetInitialRevision(revision);
Translate();
FileName = fileName;
Diff.ExtraDiffArgumentsChanged += DiffExtraDiffArgumentsChanged;
FileChanges.SelectionChanged += FileChangesSelectionChanged;
FileChanges.DisableContextMenu();
followFileHistoryToolStripMenuItem.Checked = Settings.FollowRenamesInFileHistory;
fullHistoryToolStripMenuItem.Checked = Settings.FullHistoryInFileHistory;
loadHistoryOnShowToolStripMenuItem.Checked = Settings.LoadFileHistoryOnShow;
loadBlameOnShowToolStripMenuItem.Checked = Settings.LoadBlameOnShow;
if (filterByRevision && revision != null && revision.Guid != null)
filterBranchHelper.SetBranchFilter(revision.Guid, false);
}
示例8: SetRevision
public void SetRevision(string revision)
{
Revision = new GitRevision();
Revision.Guid = revision;
Revision.ParentGuids.Add(revision + "^");
SetRevision(Revision);
}
示例9: FormDiff
public FormDiff(GitRevision revision)
{
InitializeComponent();
Translate();
RevisionGrid.SetSelectedRevision(revision);
}
示例10: FormCherryPickCommitSmall
public FormCherryPickCommitSmall(GitRevision revision)
{
Revision = revision;
InitializeComponent();
Translate();
}
示例11: AddPoint
public LanePoint AddPoint(Lane lane, GitRevision revision)
{
LanePoint point = lane.AddPoint(lane, Points.Count);
Points.Add(point);
point.Revision = revision;
return point;
}
示例12: FormResetCurrentBranch
public FormResetCurrentBranch(GitUICommands aCommands, GitRevision Revision)
: base(aCommands)
{
this.Revision = Revision;
InitializeComponent(); Translate();
}
示例13: FormRevertCommitSmall
public FormRevertCommitSmall(GitUICommands aCommands, GitRevision Revision)
: base(aCommands)
{
this.Revision = Revision;
InitializeComponent(); Translate();
}
示例14: SetRevision
public void SetRevision(GitRevision revision)
{
Revision = revision;
DiffFiles.GitItemStatuses = null;
DiffFiles.GitItemStatuses = Settings.Module.GetDiffFiles(revision.Guid, revision.Guid + "^");
commitInfo.SetRevision(revision.Guid);
}
示例15: SetRevision
public void SetRevision(GitRevision revision)
{
Revision = revision;
DiffFiles.DataSource = null;
DiffFiles.DisplayMember = "FileNameB";
DiffFiles.DataSource = GitCommands.GitCommands.GetDiffFiles(revision.Guid, revision.ParentGuids[0]);
}