57 lines
3.1 KiB
XML
57 lines
3.1 KiB
XML
<StatusBarItem x:Class="JD.Perforce.P4ConnectionStatusWpfUserControl"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:local="clr-namespace:JD.Perforce"
|
|
mc:Ignorable="d"
|
|
d:DesignHeight="30" d:DesignWidth="126"
|
|
Width="32" Height="32"
|
|
DataContext="{Binding Source={x:Static local:P4Manager.Instance}}">
|
|
|
|
<StatusBarItem.Resources>
|
|
<Style x:Key="StatusIconStyle" TargetType="Button">
|
|
<Setter Property="ToolTip">
|
|
<Setter.Value>
|
|
<TextBlock>
|
|
<Run FontWeight="Bold" Foreground="#FFEE5C42" Text="Disconnected from Perforce...Click to connect" />
|
|
</TextBlock>
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate>
|
|
<Image Source="/JD.Perforce;component/Resources/p4-disconnected.png" RenderOptions.BitmapScalingMode="HighQuality"/>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding Path=Connected}" Value="True">
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate>
|
|
<Image Source="/JD.Perforce;component/Resources/p4-connected.png" RenderOptions.BitmapScalingMode="HighQuality"/>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Setter Property="ToolTip">
|
|
<Setter.Value>
|
|
<TextBlock>
|
|
<Run FontWeight="Bold" Foreground="#FF20C020" Text="Connected to Perforce!" /><LineBreak />
|
|
<Bold>Port:</Bold> <Run Text="{Binding Path=PerforceWrapper.PerforcePort, Mode=OneWay}" /><LineBreak />
|
|
<Bold>User:</Bold> <Run Text="{Binding Path=PerforceWrapper.PerforceUser, Mode=OneWay}" /><LineBreak />
|
|
<Bold>Client:</Bold> <Run Text="{Binding Path=PerforceWrapper.PerforceClient, Mode=OneWay}" /><LineBreak />
|
|
<Bold>Host:</Bold> <Run Text="{Binding Path=PerforceWrapper.PerforceHostname, Mode=OneWay}" /><LineBreak />
|
|
<Bold>Root:</Bold> <Run Text="{Binding Path=WorkspaceRootPath, Mode=OneWay}" />
|
|
</TextBlock>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
|
|
</StatusBarItem.Resources>
|
|
<Button HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Style="{StaticResource StatusIconStyle}" Click="OnClick" >
|
|
|
|
</Button>
|
|
</StatusBarItem>
|