Browse Source
git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@2973 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61shortcuts
34 changed files with 332 additions and 370 deletions
@ -1,46 +0,0 @@
@@ -1,46 +0,0 @@
|
||||
// <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>
|
||||
|
||||
using System; |
||||
using ICSharpCode.SharpDevelop.Project; |
||||
|
||||
namespace ICSharpCode.Svn |
||||
{ |
||||
/// <summary>
|
||||
/// Description of SvnProjectBrowserVisitor.
|
||||
/// </summary>
|
||||
public class SvnProjectBrowserVisitor : ProjectBrowserTreeNodeVisitor |
||||
{ |
||||
public override object Visit(SolutionNode node, object data) |
||||
{ |
||||
if (Commands.RegisterEventsCommand.CanBeVersionControlledDirectory(node.Solution.Directory)) { |
||||
OverlayIconManager.Enqueue(node); |
||||
} |
||||
return node.AcceptChildren(this, data); |
||||
} |
||||
|
||||
public override object Visit(ProjectNode node, object data) |
||||
{ |
||||
return Visit((DirectoryNode)node, data); |
||||
} |
||||
|
||||
public override object Visit(DirectoryNode node, object data) |
||||
{ |
||||
if (Commands.RegisterEventsCommand.CanBeVersionControlledDirectory(node.Directory)) { |
||||
OverlayIconManager.Enqueue(node); |
||||
return node.AcceptChildren(this, data); |
||||
} |
||||
return data; |
||||
} |
||||
|
||||
public override object Visit(FileNode node, object data) |
||||
{ |
||||
OverlayIconManager.Enqueue(node); |
||||
return node.AcceptChildren(this, data); |
||||
} |
||||
} |
||||
} |
||||
@ -1,141 +0,0 @@
@@ -1,141 +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.Threading; |
||||
|
||||
namespace ICSharpCode.Svn |
||||
{ |
||||
/// <summary>
|
||||
/// Description of InOperationDialog.
|
||||
/// </summary>
|
||||
public class InOperationDialog : System.Windows.Forms.Form |
||||
{ |
||||
private System.Windows.Forms.ProgressBar progressBar1; |
||||
private System.Windows.Forms.Button cancelButton; |
||||
private System.Windows.Forms.Label operationNameLabel; |
||||
|
||||
Thread operation; |
||||
public Thread Operation { |
||||
get { |
||||
return operation; |
||||
} |
||||
set { |
||||
operation = value; |
||||
} |
||||
} |
||||
|
||||
System.Windows.Forms.Timer timer = new System.Windows.Forms.Timer(); |
||||
|
||||
public InOperationDialog(string operationName, Thread operation) |
||||
{ |
||||
//
|
||||
// The InitializeComponent() call is required for Windows Forms designer support.
|
||||
//
|
||||
InitializeComponent(); |
||||
|
||||
this.operation = operation; |
||||
|
||||
operationNameLabel.Text = operationName; |
||||
|
||||
timer.Tick += new EventHandler(TimerTick); |
||||
timer.Interval = 100; |
||||
timer.Start(); |
||||
|
||||
} |
||||
|
||||
void TimerTick(object myObject, EventArgs e) |
||||
{ |
||||
if (progressBar1.Value + 1 < progressBar1.Maximum) { |
||||
progressBar1.Value++; |
||||
} else { |
||||
progressBar1.Value = progressBar1.Minimum; |
||||
} |
||||
} |
||||
|
||||
#region Windows Forms Designer generated code
|
||||
/// <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() { |
||||
this.operationNameLabel = new System.Windows.Forms.Label(); |
||||
this.cancelButton = new System.Windows.Forms.Button(); |
||||
this.progressBar1 = new System.Windows.Forms.ProgressBar(); |
||||
this.SuspendLayout(); |
||||
//
|
||||
// operationNameLabel
|
||||
//
|
||||
this.operationNameLabel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) |
||||
| System.Windows.Forms.AnchorStyles.Right))); |
||||
this.operationNameLabel.Location = new System.Drawing.Point(8, 40); |
||||
this.operationNameLabel.Name = "operationNameLabel"; |
||||
this.operationNameLabel.Size = new System.Drawing.Size(312, 23); |
||||
this.operationNameLabel.TabIndex = 1; |
||||
this.operationNameLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; |
||||
//
|
||||
// cancelButton
|
||||
//
|
||||
this.cancelButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); |
||||
this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; |
||||
this.cancelButton.Location = new System.Drawing.Point(248, 72); |
||||
this.cancelButton.Name = "cancelButton"; |
||||
this.cancelButton.TabIndex = 2; |
||||
this.cancelButton.Text = "Cancel"; |
||||
this.cancelButton.Click += new System.EventHandler(this.CancelButtonClick); |
||||
//
|
||||
// progressBar1
|
||||
//
|
||||
this.progressBar1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) |
||||
| System.Windows.Forms.AnchorStyles.Right))); |
||||
this.progressBar1.Location = new System.Drawing.Point(8, 8); |
||||
this.progressBar1.Maximum = 20; |
||||
this.progressBar1.Name = "progressBar1"; |
||||
this.progressBar1.Size = new System.Drawing.Size(312, 23); |
||||
this.progressBar1.TabIndex = 0; |
||||
//
|
||||
// InOperationDialog
|
||||
//
|
||||
this.CancelButton = this.cancelButton; |
||||
this.ClientSize = new System.Drawing.Size(330, 104); |
||||
this.Controls.Add(this.cancelButton); |
||||
this.Controls.Add(this.operationNameLabel); |
||||
this.Controls.Add(this.progressBar1); |
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; |
||||
this.Name = "InOperationDialog"; |
||||
this.ShowInTaskbar = false; |
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; |
||||
this.Text = "Please wait..."; |
||||
this.ResumeLayout(false); |
||||
} |
||||
#endregion
|
||||
|
||||
void CancelButtonClick(object sender, System.EventArgs e) |
||||
{ |
||||
Close(); |
||||
} |
||||
|
||||
protected override void OnClosed(System.EventArgs ea) |
||||
{ |
||||
base.OnClosed(ea); |
||||
try { |
||||
timer.Stop(); |
||||
} catch (Exception e) { |
||||
ICSharpCode.Core.MessageService.ShowError(e); |
||||
} |
||||
|
||||
try { |
||||
if (operation != null && operation.IsAlive) { |
||||
operation.Abort(); |
||||
} |
||||
} catch (Exception e) { |
||||
ICSharpCode.Core.MessageService.ShowError(e); |
||||
} |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,45 @@
@@ -0,0 +1,45 @@
|
||||
// <file>
|
||||
// <copyright see="prj:///doc/copyright.txt"/>
|
||||
// <license see="prj:///doc/license.txt"/>
|
||||
// <author name="Daniel Grunwald"/>
|
||||
// <version>$Revision$</version>
|
||||
// </file>
|
||||
|
||||
using System; |
||||
using ICSharpCode.Core; |
||||
using ICSharpCode.SharpDevelop; |
||||
using ICSharpCode.SharpDevelop.Gui; |
||||
|
||||
namespace ICSharpCode.Svn |
||||
{ |
||||
/// <summary>
|
||||
/// Description of SvnMessageView.
|
||||
/// </summary>
|
||||
public static class SvnMessageView |
||||
{ |
||||
static MessageViewCategory category; |
||||
|
||||
public static MessageViewCategory Category { |
||||
get { |
||||
if (category == null) { |
||||
category = new MessageViewCategory("Subversion"); |
||||
CompilerMessageView compilerMessageView = (CompilerMessageView)WorkbenchSingleton.Workbench.GetPad(typeof(CompilerMessageView)).PadContent; |
||||
compilerMessageView.AddCategory(category); |
||||
} |
||||
return category; |
||||
} |
||||
} |
||||
|
||||
public static void AppendLine(string text) |
||||
{ |
||||
Category.AppendLine(text); |
||||
} |
||||
|
||||
public static void HandleNotifications(SvnClientWrapper client) |
||||
{ |
||||
client.Notify += delegate(object sender, NotificationEventArgs e) { |
||||
AppendLine(e.Kind + e.Action + " " + e.Path); |
||||
}; |
||||
} |
||||
} |
||||
} |
||||
Loading…
Reference in new issue