checkoutcommand.cs
来自「SharpDevelop2.0.0 c#开发免费工具」· CS 代码 · 共 53 行
CS
53 行
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Mike Krüger" email="mike@icsharpcode.net"/>
// <version>$Revision: 915 $</version>
// </file>
using System;
using System.Threading;
using System.Windows.Forms;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop;
using NSvn.Common;
using NSvn.Core;
namespace ICSharpCode.Svn.Commands
{
public class CheckoutCommand : AbstractMenuCommand
{
string from = String.Empty;
string to = String.Empty;
bool recurse;
Revision revision = null;
void DoCheckoutCommand()
{
try {
SvnClient.Instance.Client.Checkout(from, to, revision, recurse);
} catch (SvnClientException ex) {
MessageService.ShowError(ex.Message);
}
}
/// <summary>
/// Starts the command
/// </summary>
public override void Run()
{
using (CheckoutDialog checkoutDialog = new CheckoutDialog()) {
if (checkoutDialog.ShowDialog(ICSharpCode.SharpDevelop.Gui.WorkbenchSingleton.MainForm) == DialogResult.OK) {
from = checkoutDialog.Source;
to = checkoutDialog.Destination;
revision = checkoutDialog.Revision;
recurse = !checkoutDialog.NonRecursive;
SvnClient.Instance.OperationStart("Checkout", new ThreadStart(DoCheckoutCommand));
SvnClient.Instance.WaitForOperationEnd();
}
}
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?