// // // // // $Revision$ // using System; using ICSharpCode.Core; using ICSharpCode.SharpDevelop; using ICSharpCode.SharpDevelop.Gui; namespace ICSharpCode.Svn { /// /// Output pad category for subversion. /// public static class SvnMessageView { static MessageViewCategory category; /// /// Gets the subversion message view category. /// public static MessageViewCategory Category { get { if (category == null) { MessageViewCategory.Create(ref category, "Subversion"); } return category; } } /// /// Appends a line to the svn message view. /// 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); }; AsynchronousWaitDialog waitDialog = null; client.OperationStarted += delegate(object sender, SubversionOperationEventArgs e) { if (waitDialog == null) { waitDialog = AsynchronousWaitDialog.ShowWaitDialog("svn " + e.Operation); // waitDialog.Cancelled += delegate { // client.Cancel(); // }; } }; client.OperationFinished += delegate { if (waitDialog != null) { waitDialog.Dispose(); waitDialog = null; } }; } } }