Browse Source
git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@2016 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61shortcuts
9 changed files with 437 additions and 302 deletions
@ -1,163 +0,0 @@
@@ -1,163 +0,0 @@
|
||||
<Components version="1.0"> |
||||
<System.Windows.Forms.UserControl> |
||||
<Name value="XmlUserControl1" /> |
||||
<DockPadding value="" /> |
||||
<ClientSize value="{Width=608, Height=472}" /> |
||||
<Controls> |
||||
<System.Windows.Forms.Panel> |
||||
<Name value="panel2" /> |
||||
<Location value="{X=0,Y=203}" /> |
||||
<Size value="{Width=608, Height=269}" /> |
||||
<DockPadding value="" /> |
||||
<TabIndex value="2" /> |
||||
<Dock value="Fill" /> |
||||
<Controls> |
||||
<System.Windows.Forms.Label> |
||||
<Name value="diffLabel" /> |
||||
<Text value="&Diff:" /> |
||||
<TextAlign value="BottomLeft" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<TabIndex value="7" /> |
||||
<Size value="{Width=592, Height=16}" /> |
||||
<Location value="{X=8,Y=8}" /> |
||||
</System.Windows.Forms.Label> |
||||
<System.Windows.Forms.RichTextBox> |
||||
<Name value="diffRichTextBox" /> |
||||
<Anchor value="Top, Bottom, Left, Right" /> |
||||
<ReadOnly value="True" /> |
||||
<Size value="{Width=592, Height=240}" /> |
||||
<Location value="{X=8,Y=24}" /> |
||||
<Text value="" /> |
||||
<TabIndex value="8" /> |
||||
<WordWrap value="False" /> |
||||
</System.Windows.Forms.RichTextBox> |
||||
</Controls> |
||||
</System.Windows.Forms.Panel> |
||||
<System.Windows.Forms.Splitter> |
||||
<Name value="splitter1" /> |
||||
<TabIndex value="6" /> |
||||
<Size value="{Width=608, Height=608}" /> |
||||
<Location value="{X=0,Y=200}" /> |
||||
<Dock value="Top" /> |
||||
</System.Windows.Forms.Splitter> |
||||
<System.Windows.Forms.Panel> |
||||
<Name value="topPanel" /> |
||||
<Location value="{X=0,Y=0}" /> |
||||
<Size value="{Width=608, Height=200}" /> |
||||
<DockPadding value="" /> |
||||
<TabIndex value="0" /> |
||||
<Dock value="Top" /> |
||||
<Controls> |
||||
<System.Windows.Forms.Panel> |
||||
<Name value="toRevisionPanel" /> |
||||
<Location value="{X=283,Y=0}" /> |
||||
<Size value="{Width=325, Height=200}" /> |
||||
<DockPadding value="" /> |
||||
<TabIndex value="7" /> |
||||
<Dock value="Fill" /> |
||||
<Controls> |
||||
<System.Windows.Forms.Label> |
||||
<Name value="label2" /> |
||||
<Text value="Diff &to:" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<TabIndex value="4" /> |
||||
<Size value="{Width=312, Height=16}" /> |
||||
<Location value="{X=8,Y=8}" /> |
||||
</System.Windows.Forms.Label> |
||||
<System.Windows.Forms.ListView> |
||||
<Name value="toRevisionListView" /> |
||||
<GridLines value="True" /> |
||||
<MultiSelect value="False" /> |
||||
<Anchor value="Top, Bottom, Left, Right" /> |
||||
<TabIndex value="5" /> |
||||
<View value="Details" /> |
||||
<FullRowSelect value="True" /> |
||||
<Location value="{X=8,Y=24}" /> |
||||
<Size value="{Width=296, Height=168}" /> |
||||
<HideSelection value="False" /> |
||||
<Columns> |
||||
<System.Windows.Forms.ColumnHeader> |
||||
<Name value="columnHeader1" /> |
||||
<Text value="Revision" /> |
||||
</System.Windows.Forms.ColumnHeader> |
||||
<System.Windows.Forms.ColumnHeader> |
||||
<Name value="columnHeader2" /> |
||||
<Width value="100" /> |
||||
<Text value="Author" /> |
||||
</System.Windows.Forms.ColumnHeader> |
||||
<System.Windows.Forms.ColumnHeader> |
||||
<Width value="120" /> |
||||
<Text value="Date" /> |
||||
<Name value="columnHeader3" /> |
||||
</System.Windows.Forms.ColumnHeader> |
||||
<System.Windows.Forms.ColumnHeader> |
||||
<Width value="500" /> |
||||
<Text value="Comment" /> |
||||
<Name value="columnHeader4" /> |
||||
</System.Windows.Forms.ColumnHeader> |
||||
</Columns> |
||||
</System.Windows.Forms.ListView> |
||||
</Controls> |
||||
</System.Windows.Forms.Panel> |
||||
<System.Windows.Forms.Splitter> |
||||
<Name value="splitter2" /> |
||||
<TabIndex value="3" /> |
||||
<Size value="{Width=3, Height=200}" /> |
||||
<Location value="{X=280,Y=0}" /> |
||||
</System.Windows.Forms.Splitter> |
||||
<System.Windows.Forms.Panel> |
||||
<Name value="fromRevisionPanel" /> |
||||
<Location value="{X=0,Y=0}" /> |
||||
<Size value="{Width=280, Height=200}" /> |
||||
<DockPadding value="" /> |
||||
<TabIndex value="0" /> |
||||
<Dock value="Left" /> |
||||
<Controls> |
||||
<System.Windows.Forms.Label> |
||||
<Name value="label1" /> |
||||
<Text value="Diff &from:" /> |
||||
<Anchor value="Top, Left, Right" /> |
||||
<TabIndex value="4" /> |
||||
<Size value="{Width=264, Height=16}" /> |
||||
<Location value="{X=8,Y=8}" /> |
||||
</System.Windows.Forms.Label> |
||||
<System.Windows.Forms.ListView> |
||||
<Name value="fromRevisionListView" /> |
||||
<GridLines value="True" /> |
||||
<MultiSelect value="False" /> |
||||
<Anchor value="Top, Bottom, Left, Right" /> |
||||
<TabIndex value="2" /> |
||||
<View value="Details" /> |
||||
<FullRowSelect value="True" /> |
||||
<Location value="{X=8,Y=24}" /> |
||||
<Size value="{Width=264, Height=168}" /> |
||||
<HideSelection value="False" /> |
||||
<Columns> |
||||
<System.Windows.Forms.ColumnHeader> |
||||
<Name value="columnHeader1" /> |
||||
<Text value="Revision" /> |
||||
</System.Windows.Forms.ColumnHeader> |
||||
<System.Windows.Forms.ColumnHeader> |
||||
<Name value="columnHeader2" /> |
||||
<Width value="100" /> |
||||
<Text value="Author" /> |
||||
</System.Windows.Forms.ColumnHeader> |
||||
<System.Windows.Forms.ColumnHeader> |
||||
<Width value="120" /> |
||||
<Text value="Date" /> |
||||
<Name value="columnHeader3" /> |
||||
</System.Windows.Forms.ColumnHeader> |
||||
<System.Windows.Forms.ColumnHeader> |
||||
<Width value="500" /> |
||||
<Text value="Comment" /> |
||||
<Name value="columnHeader4" /> |
||||
</System.Windows.Forms.ColumnHeader> |
||||
</Columns> |
||||
</System.Windows.Forms.ListView> |
||||
</Controls> |
||||
</System.Windows.Forms.Panel> |
||||
</Controls> |
||||
</System.Windows.Forms.Panel> |
||||
</Controls> |
||||
</System.Windows.Forms.UserControl> |
||||
</Components> |
@ -0,0 +1,254 @@
@@ -0,0 +1,254 @@
|
||||
// <file>
|
||||
// <copyright see="prj:///doc/copyright.txt"/>
|
||||
// <license see="prj:///doc/license.txt"/>
|
||||
// <owner name="Daniel Grunwald" email="daniel@danielgrunwald.de"/>
|
||||
// <version>$Revision$</version>
|
||||
// </file>
|
||||
namespace ICSharpCode.Svn |
||||
{ |
||||
partial class DiffPanel : System.Windows.Forms.UserControl |
||||
{ |
||||
/// <summary>
|
||||
/// Designer variable used to keep track of non-visual components.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null; |
||||
|
||||
/// <summary>
|
||||
/// Disposes resources used by the control.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing) |
||||
{ |
||||
if (disposing) { |
||||
if (components != null) { |
||||
components.Dispose(); |
||||
} |
||||
} |
||||
base.Dispose(disposing); |
||||
} |
||||
|
||||
/// <summary>
|
||||
/// This method is required for Windows Forms designer support.
|
||||
/// Do not change the method contents inside the source code editor. The Forms designer might
|
||||
/// not be able to load this method if it was changed manually.
|
||||
/// </summary>
|
||||
private void InitializeComponent() |
||||
{ |
||||
System.Windows.Forms.ColumnHeader revisionColumnHeader; |
||||
System.Windows.Forms.ColumnHeader columnHeader1; |
||||
this.mainSplitContainer = new System.Windows.Forms.SplitContainer(); |
||||
this.topSplitContainer = new System.Windows.Forms.SplitContainer(); |
||||
this.leftListView = new System.Windows.Forms.ListView(); |
||||
this.authorColumnHeader = new System.Windows.Forms.ColumnHeader(); |
||||
this.dateColumnHeader = new System.Windows.Forms.ColumnHeader(); |
||||
this.commentColumnHeader = new System.Windows.Forms.ColumnHeader(); |
||||
this.label1 = new System.Windows.Forms.Label(); |
||||
this.rightListView = new System.Windows.Forms.ListView(); |
||||
this.columnHeader2 = new System.Windows.Forms.ColumnHeader(); |
||||
this.columnHeader3 = new System.Windows.Forms.ColumnHeader(); |
||||
this.columnHeader4 = new System.Windows.Forms.ColumnHeader(); |
||||
this.label2 = new System.Windows.Forms.Label(); |
||||
this.diffViewPanel = new System.Windows.Forms.Panel(); |
||||
this.diffLabel = new System.Windows.Forms.Label(); |
||||
revisionColumnHeader = new System.Windows.Forms.ColumnHeader(); |
||||
columnHeader1 = new System.Windows.Forms.ColumnHeader(); |
||||
this.mainSplitContainer.Panel1.SuspendLayout(); |
||||
this.mainSplitContainer.Panel2.SuspendLayout(); |
||||
this.mainSplitContainer.SuspendLayout(); |
||||
this.topSplitContainer.Panel1.SuspendLayout(); |
||||
this.topSplitContainer.Panel2.SuspendLayout(); |
||||
this.topSplitContainer.SuspendLayout(); |
||||
this.SuspendLayout(); |
||||
//
|
||||
// revisionColumnHeader
|
||||
//
|
||||
revisionColumnHeader.Text = "Revision"; |
||||
//
|
||||
// columnHeader1
|
||||
//
|
||||
columnHeader1.Text = "Revision"; |
||||
//
|
||||
// mainSplitContainer
|
||||
//
|
||||
this.mainSplitContainer.Dock = System.Windows.Forms.DockStyle.Fill; |
||||
this.mainSplitContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel1; |
||||
this.mainSplitContainer.Location = new System.Drawing.Point(0, 0); |
||||
this.mainSplitContainer.Name = "mainSplitContainer"; |
||||
this.mainSplitContainer.Orientation = System.Windows.Forms.Orientation.Horizontal; |
||||
//
|
||||
// mainSplitContainer.Panel1
|
||||
//
|
||||
this.mainSplitContainer.Panel1.Controls.Add(this.topSplitContainer); |
||||
this.mainSplitContainer.Panel1MinSize = 75; |
||||
//
|
||||
// mainSplitContainer.Panel2
|
||||
//
|
||||
this.mainSplitContainer.Panel2.Controls.Add(this.diffViewPanel); |
||||
this.mainSplitContainer.Panel2.Controls.Add(this.diffLabel); |
||||
this.mainSplitContainer.Panel2MinSize = 75; |
||||
this.mainSplitContainer.Size = new System.Drawing.Size(600, 400); |
||||
this.mainSplitContainer.SplitterDistance = 177; |
||||
this.mainSplitContainer.TabIndex = 0; |
||||
//
|
||||
// topSplitContainer
|
||||
//
|
||||
this.topSplitContainer.Dock = System.Windows.Forms.DockStyle.Fill; |
||||
this.topSplitContainer.Location = new System.Drawing.Point(0, 0); |
||||
this.topSplitContainer.Name = "topSplitContainer"; |
||||
//
|
||||
// topSplitContainer.Panel1
|
||||
//
|
||||
this.topSplitContainer.Panel1.Controls.Add(this.leftListView); |
||||
this.topSplitContainer.Panel1.Controls.Add(this.label1); |
||||
this.topSplitContainer.Panel1MinSize = 75; |
||||
//
|
||||
// topSplitContainer.Panel2
|
||||
//
|
||||
this.topSplitContainer.Panel2.Controls.Add(this.rightListView); |
||||
this.topSplitContainer.Panel2.Controls.Add(this.label2); |
||||
this.topSplitContainer.Panel2MinSize = 75; |
||||
this.topSplitContainer.Size = new System.Drawing.Size(600, 177); |
||||
this.topSplitContainer.SplitterDistance = 297; |
||||
this.topSplitContainer.TabIndex = 0; |
||||
//
|
||||
// leftListView
|
||||
//
|
||||
this.leftListView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) |
||||
| System.Windows.Forms.AnchorStyles.Left) |
||||
| System.Windows.Forms.AnchorStyles.Right))); |
||||
this.leftListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { |
||||
revisionColumnHeader, |
||||
this.authorColumnHeader, |
||||
this.dateColumnHeader, |
||||
this.commentColumnHeader}); |
||||
this.leftListView.FullRowSelect = true; |
||||
this.leftListView.GridLines = true; |
||||
this.leftListView.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable; |
||||
this.leftListView.HideSelection = false; |
||||
this.leftListView.Location = new System.Drawing.Point(3, 25); |
||||
this.leftListView.MultiSelect = false; |
||||
this.leftListView.Name = "leftListView"; |
||||
this.leftListView.Size = new System.Drawing.Size(291, 149); |
||||
this.leftListView.TabIndex = 1; |
||||
this.leftListView.UseCompatibleStateImageBehavior = false; |
||||
this.leftListView.View = System.Windows.Forms.View.Details; |
||||
this.leftListView.SelectedIndexChanged += new System.EventHandler(this.LeftListViewSelectedIndexChanged); |
||||
//
|
||||
// authorColumnHeader
|
||||
//
|
||||
this.authorColumnHeader.Text = "Author"; |
||||
this.authorColumnHeader.Width = 77; |
||||
//
|
||||
// dateColumnHeader
|
||||
//
|
||||
this.dateColumnHeader.Text = "Date"; |
||||
this.dateColumnHeader.Width = 82; |
||||
//
|
||||
// commentColumnHeader
|
||||
//
|
||||
this.commentColumnHeader.Text = "Comment"; |
||||
this.commentColumnHeader.Width = 144; |
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.Location = new System.Drawing.Point(3, 9); |
||||
this.label1.Name = "label1"; |
||||
this.label1.Size = new System.Drawing.Size(100, 23); |
||||
this.label1.TabIndex = 0; |
||||
this.label1.Text = "Diff &from:"; |
||||
//
|
||||
// rightListView
|
||||
//
|
||||
this.rightListView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) |
||||
| System.Windows.Forms.AnchorStyles.Left) |
||||
| System.Windows.Forms.AnchorStyles.Right))); |
||||
this.rightListView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { |
||||
columnHeader1, |
||||
this.columnHeader2, |
||||
this.columnHeader3, |
||||
this.columnHeader4}); |
||||
this.rightListView.FullRowSelect = true; |
||||
this.rightListView.GridLines = true; |
||||
this.rightListView.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.Nonclickable; |
||||
this.rightListView.HideSelection = false; |
||||
this.rightListView.Location = new System.Drawing.Point(5, 25); |
||||
this.rightListView.MultiSelect = false; |
||||
this.rightListView.Name = "rightListView"; |
||||
this.rightListView.Size = new System.Drawing.Size(291, 149); |
||||
this.rightListView.TabIndex = 2; |
||||
this.rightListView.UseCompatibleStateImageBehavior = false; |
||||
this.rightListView.View = System.Windows.Forms.View.Details; |
||||
this.rightListView.SelectedIndexChanged += new System.EventHandler(this.RightListViewSelectedIndexChanged); |
||||
//
|
||||
// columnHeader2
|
||||
//
|
||||
this.columnHeader2.Text = "Author"; |
||||
this.columnHeader2.Width = 77; |
||||
//
|
||||
// columnHeader3
|
||||
//
|
||||
this.columnHeader3.Text = "Date"; |
||||
this.columnHeader3.Width = 82; |
||||
//
|
||||
// columnHeader4
|
||||
//
|
||||
this.columnHeader4.Text = "Comment"; |
||||
this.columnHeader4.Width = 144; |
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.Location = new System.Drawing.Point(3, 9); |
||||
this.label2.Name = "label2"; |
||||
this.label2.Size = new System.Drawing.Size(100, 23); |
||||
this.label2.TabIndex = 1; |
||||
this.label2.Text = "Diff &to:"; |
||||
//
|
||||
// diffViewPanel
|
||||
//
|
||||
this.diffViewPanel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) |
||||
| System.Windows.Forms.AnchorStyles.Left) |
||||
| System.Windows.Forms.AnchorStyles.Right))); |
||||
this.diffViewPanel.Location = new System.Drawing.Point(3, 21); |
||||
this.diffViewPanel.Name = "diffViewPanel"; |
||||
this.diffViewPanel.Size = new System.Drawing.Size(594, 195); |
||||
this.diffViewPanel.TabIndex = 1; |
||||
//
|
||||
// diffLabel
|
||||
//
|
||||
this.diffLabel.Location = new System.Drawing.Point(3, 6); |
||||
this.diffLabel.Name = "diffLabel"; |
||||
this.diffLabel.Size = new System.Drawing.Size(100, 23); |
||||
this.diffLabel.TabIndex = 0; |
||||
this.diffLabel.Text = "Diff:"; |
||||
//
|
||||
// DiffPanel
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); |
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; |
||||
this.Controls.Add(this.mainSplitContainer); |
||||
this.Name = "DiffPanel"; |
||||
this.Size = new System.Drawing.Size(600, 400); |
||||
this.mainSplitContainer.Panel1.ResumeLayout(false); |
||||
this.mainSplitContainer.Panel2.ResumeLayout(false); |
||||
this.mainSplitContainer.ResumeLayout(false); |
||||
this.topSplitContainer.Panel1.ResumeLayout(false); |
||||
this.topSplitContainer.Panel2.ResumeLayout(false); |
||||
this.topSplitContainer.ResumeLayout(false); |
||||
this.ResumeLayout(false); |
||||
} |
||||
private System.Windows.Forms.Label diffLabel; |
||||
private System.Windows.Forms.Panel diffViewPanel; |
||||
private System.Windows.Forms.Label label2; |
||||
private System.Windows.Forms.ColumnHeader columnHeader4; |
||||
private System.Windows.Forms.ColumnHeader columnHeader3; |
||||
private System.Windows.Forms.ColumnHeader columnHeader2; |
||||
private System.Windows.Forms.ListView rightListView; |
||||
private System.Windows.Forms.Label label1; |
||||
private System.Windows.Forms.ColumnHeader commentColumnHeader; |
||||
private System.Windows.Forms.ColumnHeader dateColumnHeader; |
||||
private System.Windows.Forms.ColumnHeader authorColumnHeader; |
||||
private System.Windows.Forms.ListView leftListView; |
||||
private System.Windows.Forms.SplitContainer topSplitContainer; |
||||
private System.Windows.Forms.SplitContainer mainSplitContainer; |
||||
} |
||||
} |
@ -1,135 +0,0 @@
@@ -1,135 +0,0 @@
|
||||
// <file>
|
||||
// <copyright see="prj:///doc/copyright.txt"/>
|
||||
// <license see="prj:///doc/license.txt"/>
|
||||
// <owner name="Mike Krüger" email="mike@icsharpcode.net"/>
|
||||
// <version>$Revision$</version>
|
||||
// </file>
|
||||
|
||||
using System; |
||||
using System.IO; |
||||
using System.Text; |
||||
using System.Threading; |
||||
using System.Windows.Forms; |
||||
|
||||
using ICSharpCode.Core; |
||||
using ICSharpCode.SharpDevelop.Gui; |
||||
using ICSharpCode.SharpDevelop.Gui.XmlForms; |
||||
using NSvn.Common; |
||||
using NSvn.Core; |
||||
|
||||
namespace ICSharpCode.Svn |
||||
{ |
||||
/// <summary>
|
||||
/// Description of InfoPanel.
|
||||
/// </summary>
|
||||
public class DiffPanel : BaseSharpDevelopUserControl |
||||
{ |
||||
IViewContent viewContent; |
||||
|
||||
public DiffPanel(IViewContent viewContent) |
||||
{ |
||||
this.viewContent = viewContent; |
||||
SetupFromXmlStream(GetType().Assembly.GetManifestResourceStream("ICSharpCode.Svn.Resources.DiffPanel.xfrm")); |
||||
Get<ListView>("fromRevision").SelectedIndexChanged += new EventHandler(ShowDiff); |
||||
Get<ListView>("toRevision").SelectedIndexChanged += new EventHandler(ShowDiff); |
||||
|
||||
ControlDictionary["diffRichTextBox"].Enabled = false; |
||||
ControlDictionary["diffRichTextBox"].Font = ResourceService.DefaultMonospacedFont; |
||||
ControlDictionary["splitter1"].Height = 3; |
||||
|
||||
ListViewItem newItem; |
||||
newItem = new ListViewItem(new string[] { "Base", "", "", "" }); |
||||
newItem.Tag = Revision.Base; |
||||
Get<ListView>("fromRevision").Items.Add(newItem); |
||||
newItem.Selected = true; |
||||
newItem = new ListViewItem(new string[] { "Work", "", "", "" }); |
||||
newItem.Tag = Revision.Working; |
||||
Get<ListView>("toRevision").Items.Add(newItem); |
||||
} |
||||
|
||||
protected override void OnLoad(EventArgs e) |
||||
{ |
||||
// fix sizing problems
|
||||
Get<ListView>("toRevision").Width -= 13; |
||||
ControlDictionary["fromRevisionPanel"].Width = ControlDictionary["topPanel"].Width / 2 - 2; |
||||
} |
||||
|
||||
string output = null; |
||||
string fileName = null; |
||||
Revision fromRevision; |
||||
Revision toRevision; |
||||
|
||||
void DoDiffOperation() |
||||
{ |
||||
output = null; |
||||
MemoryStream outStream = new MemoryStream(); |
||||
MemoryStream errStream = new MemoryStream(); |
||||
SvnClient.Instance.Client.Diff(new string [] {} , |
||||
fileName, |
||||
fromRevision, |
||||
fileName, |
||||
toRevision, |
||||
Recurse.None, |
||||
false, |
||||
true, |
||||
outStream, |
||||
errStream); |
||||
output = Encoding.Default.GetString(outStream.ToArray()); |
||||
WorkbenchSingleton.SafeThreadCall(SetOutput); |
||||
} |
||||
|
||||
void SetOutput() |
||||
{ |
||||
ControlDictionary["diffRichTextBox"].Enabled = true; |
||||
ControlDictionary["diffLabel"].Text = "Diff from revision " + fromRevision + " to " + toRevision + ":"; |
||||
ControlDictionary["diffRichTextBox"].Text = output; |
||||
} |
||||
|
||||
void Disable() |
||||
{ |
||||
ControlDictionary["diffRichTextBox"].Enabled = false; |
||||
ControlDictionary["diffLabel"].Text = "Diff:"; |
||||
ControlDictionary["diffRichTextBox"].Text = ""; |
||||
} |
||||
|
||||
void ShowDiff(object sender, EventArgs e) |
||||
{ |
||||
Disable(); |
||||
|
||||
if (Get<ListView>("fromRevision").SelectedItems.Count == 0 || Get<ListView>("toRevision").SelectedItems.Count == 0 ) { |
||||
return; |
||||
} |
||||
|
||||
fromRevision = Get<ListView>("fromRevision").SelectedItems[0].Tag as Revision; |
||||
toRevision = Get<ListView>("toRevision").SelectedItems[0].Tag as Revision; |
||||
fileName = Path.GetFullPath(viewContent.FileName); |
||||
|
||||
if (fromRevision.ToString() == toRevision.ToString()) { |
||||
output = ""; |
||||
} else { |
||||
SvnClient.Instance.OperationStart("Diff", new ThreadStart(DoDiffOperation)); |
||||
} |
||||
} |
||||
|
||||
public void AddLogMessage(LogMessage logMessage) |
||||
{ |
||||
ListViewItem newItem = new ListViewItem(new string[] { |
||||
logMessage.Revision.ToString(), |
||||
logMessage.Author, |
||||
logMessage.Date.ToString(), |
||||
logMessage.Message |
||||
}); |
||||
newItem.Tag = Revision.FromNumber(logMessage.Revision); |
||||
Get<ListView>("fromRevision").Items.Add(newItem); |
||||
|
||||
ListViewItem newItem2 = new ListViewItem(new string[] { |
||||
logMessage.Revision.ToString(), |
||||
logMessage.Author, |
||||
logMessage.Date.ToString(), |
||||
logMessage.Message |
||||
}); |
||||
newItem2.Tag = Revision.FromNumber(logMessage.Revision); |
||||
Get<ListView>("toRevision").Items.Add(newItem2); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,126 @@
@@ -0,0 +1,126 @@
|
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<root> |
||||
<!-- |
||||
Microsoft ResX Schema |
||||
|
||||
Version 2.0 |
||||
|
||||
The primary goals of this format is to allow a simple XML format |
||||
that is mostly human readable. The generation and parsing of the |
||||
various data types are done through the TypeConverter classes |
||||
associated with the data types. |
||||
|
||||
Example: |
||||
|
||||
... ado.net/XML headers & schema ... |
||||
<resheader name="resmimetype">text/microsoft-resx</resheader> |
||||
<resheader name="version">2.0</resheader> |
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> |
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> |
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> |
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> |
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> |
||||
<value>[base64 mime encoded serialized .NET Framework object]</value> |
||||
</data> |
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> |
||||
<comment>This is a comment</comment> |
||||
</data> |
||||
|
||||
There are any number of "resheader" rows that contain simple |
||||
name/value pairs. |
||||
|
||||
Each data row contains a name, and value. The row also contains a |
||||
type or mimetype. Type corresponds to a .NET class that support |
||||
text/value conversion through the TypeConverter architecture. |
||||
Classes that don't support this are serialized and stored with the |
||||
mimetype set. |
||||
|
||||
The mimetype is used for serialized objects, and tells the |
||||
ResXResourceReader how to depersist the object. This is currently not |
||||
extensible. For a given mimetype the value must be set accordingly: |
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format |
||||
that the ResXResourceWriter will generate, however the reader can |
||||
read any of the formats listed below. |
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64 |
||||
value : The object must be serialized with |
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter |
||||
: and then encoded with base64 encoding. |
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64 |
||||
value : The object must be serialized with |
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter |
||||
: and then encoded with base64 encoding. |
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64 |
||||
value : The object must be serialized into a byte array |
||||
: using a System.ComponentModel.TypeConverter |
||||
: and then encoded with base64 encoding. |
||||
--> |
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> |
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> |
||||
<xsd:element name="root" msdata:IsDataSet="true"> |
||||
<xsd:complexType> |
||||
<xsd:choice maxOccurs="unbounded"> |
||||
<xsd:element name="metadata"> |
||||
<xsd:complexType> |
||||
<xsd:sequence> |
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" /> |
||||
</xsd:sequence> |
||||
<xsd:attribute name="name" use="required" type="xsd:string" /> |
||||
<xsd:attribute name="type" type="xsd:string" /> |
||||
<xsd:attribute name="mimetype" type="xsd:string" /> |
||||
<xsd:attribute ref="xml:space" /> |
||||
</xsd:complexType> |
||||
</xsd:element> |
||||
<xsd:element name="assembly"> |
||||
<xsd:complexType> |
||||
<xsd:attribute name="alias" type="xsd:string" /> |
||||
<xsd:attribute name="name" type="xsd:string" /> |
||||
</xsd:complexType> |
||||
</xsd:element> |
||||
<xsd:element name="data"> |
||||
<xsd:complexType> |
||||
<xsd:sequence> |
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> |
||||
</xsd:sequence> |
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> |
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> |
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> |
||||
<xsd:attribute ref="xml:space" /> |
||||
</xsd:complexType> |
||||
</xsd:element> |
||||
<xsd:element name="resheader"> |
||||
<xsd:complexType> |
||||
<xsd:sequence> |
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
||||
</xsd:sequence> |
||||
<xsd:attribute name="name" type="xsd:string" use="required" /> |
||||
</xsd:complexType> |
||||
</xsd:element> |
||||
</xsd:choice> |
||||
</xsd:complexType> |
||||
</xsd:element> |
||||
</xsd:schema> |
||||
<resheader name="resmimetype"> |
||||
<value>text/microsoft-resx</value> |
||||
</resheader> |
||||
<resheader name="version"> |
||||
<value>2.0</value> |
||||
</resheader> |
||||
<resheader name="reader"> |
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
||||
</resheader> |
||||
<resheader name="writer"> |
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
||||
</resheader> |
||||
<metadata name="revisionColumnHeader.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> |
||||
<value>False</value> |
||||
</metadata> |
||||
<metadata name="columnHeader1.GenerateMember" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> |
||||
<value>False</value> |
||||
</metadata> |
||||
</root> |
@ -0,0 +1,38 @@
@@ -0,0 +1,38 @@
|
||||
<?xml version="1.0"?> |
||||
<!-- syntaxdefinition for C/C++ 2001 by Andrea Paatz and Mike Krueger --> |
||||
|
||||
<SyntaxDefinition name = "Patch files" extensions = ".patch;.diff"> |
||||
<!--<Digits name = "Digits" bold = "false" italic = "false" color = "DarkBlue"/>--> |
||||
|
||||
<RuleSets> |
||||
<RuleSet ignorecase = "false"> |
||||
<Delimiters>~!%^*()-+=|\#/{}[]:;"'<> , .?</Delimiters> |
||||
|
||||
<Span name = "IndexLine" bold="true" italic="false" color="Green" stopateol = "true"> |
||||
<Begin>Index: </Begin> |
||||
</Span> |
||||
<Span name = "IndexUnderline" bold="false" italic="false" color="DarkRed" stopateol = "true"> |
||||
<Begin>==</Begin> |
||||
</Span> |
||||
<Span name = "IndexOldFile" bold="false" italic="false" color="DarkRed" stopateol = "true"> |
||||
<Begin>---</Begin> |
||||
</Span> |
||||
<Span name = "IndexNewFile" bold="false" italic="false" color="DarkRed" stopateol = "true"> |
||||
<Begin>+++</Begin> |
||||
</Span> |
||||
<Span name = "LocationMarker" bold="false" italic="false" color="Purple" stopateol = "true"> |
||||
<Begin>@@</Begin> |
||||
</Span> |
||||
<Span name = "RemovedLine" bold="false" italic="false" color="#339966" stopateol = "true"> |
||||
<Begin>-</Begin> |
||||
</Span> |
||||
<Span name = "AddedLine" bold="false" italic="false" color="Navy" stopateol = "true" > |
||||
<Begin>+</Begin> |
||||
</Span> |
||||
<Span name = "NormalLine" bold="false" italic="false" color="SystemColors.WindowText" stopateol = "true" > |
||||
<Begin> </Begin> |
||||
</Span> |
||||
</RuleSet> |
||||
</RuleSets> |
||||
</SyntaxDefinition> |
||||
|
Loading…
Reference in new issue