27 lines
687 B
C#
27 lines
687 B
C#
using System.Windows.Controls.Primitives;
|
|
|
|
namespace JD.Perforce
|
|
{
|
|
/// <summary>
|
|
/// Interaction logic for P4ConnectionStatusUserControl.xaml
|
|
/// </summary>
|
|
public partial class P4ConnectionStatusWpfUserControl : StatusBarItem
|
|
{
|
|
public P4ConnectionStatusWpfUserControl()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void OnClick(object sender, System.Windows.RoutedEventArgs e)
|
|
{
|
|
if (P4Manager.Instance.Connected == false)
|
|
{
|
|
P4Manager.Instance.Connect();
|
|
}
|
|
else
|
|
{
|
|
P4Manager.Instance.Disconnect();
|
|
}
|
|
}
|
|
}
|
|
}
|