aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/FSE/Modules/Tango.FSE.PPCConsole/Views/FileSystemView.xaml
blob: af7449a2ee641e72fc1c08b6e957eb335b9222ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
pre { line-height: 125%; }
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
.highlight .hll { background-color: #ffffcc }
.highlight .c { color: #888888 } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { color: #008800; font-weight: bold } /* Keyword */
.highlight .ch { color: #888888 } /* Comment.Hashbang */
.highlight .cm { color: #888888 } /* Comment.Multiline */
.highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */
.highlight .cpf { color: #888888 } /* Comment.PreprocFile */
.highlight .c1 { color: #888888 } /* Comment.Single */
.highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */
.highlight .gr { color: #aa0000 } /* Generic.Error */
.highlight .gh { color: #333333 } /* Generic.Heading */
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
.highlight .go { color: #888888 } /* Generic.Output */
.highlight .gp { color: #555555 } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #666666 } /* Generic.Subheading */
.highlight .gt { color: #aa0000 } /* Generic.Traceback */
.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */
.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */
.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */
.highlight .kp { color: #008800 } /* Keyword.Pseudo */
.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */
.highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */
.highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */
.highlight .na { color: #336699 } /* Name.Attribute */
.highlight .nb { color: #003388 } /* Name.Builtin */
.highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */
.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */
.highlight .nd { color: #555555 } /* Name.Decorator */
.highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */
.highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */
.highlight .nl { color: #336699; font-style: italic } /* Name.Label */
.highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */
.highlight .py { color: #336699; font-weight: bold } /* Name.Property */
.highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */
.highlight .nv { color: #336699 } /* Name.Variable */
.highlight .ow { color: #008800 } /* Operator.Word */
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
.highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */
.highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */
.highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */
.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */
.highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */
.highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */
.highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */
.highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */
.highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */
.highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */
.highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */
.highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */
.highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */
.highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */
.highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */
.highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */
.highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */
.highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */
.highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */
.highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */
.highlight .vc { color: #336699 } /* Name.Variable.Class */
.highlight .vg { color: #dd7700 } /* Name.Variable.Global */
.highlight .vi { color: #3333bb } /* Name.Variable.Instance */
.highlight .vm { color: #336699 } /* Name.Variable.Magic */
.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)

using System;

namespace ICSharpCode.AvalonEdit.Highlighting.Xshd
{
	/// <summary>
	/// &lt;Rule&gt; element.
	/// </summary>
	[Serializable]
	public class XshdRule : XshdElement
	{
		/// <summary>
		/// Gets/sets the rule regex.
		/// </summary>
		public string Regex { get; set; }
		
		/// <summary>
		/// Gets/sets the rule regex type.
		/// </summary>
		public XshdRegexType RegexType { get; set; }
		
		/// <summary>
		/// Gets/sets the color reference.
		/// </summary>
		public XshdReference<XshdColor> ColorReference { get; set; }
		
		/// <inheritdoc/>
		public override object AcceptVisitor(IXshdVisitor visitor)
		{
			return visi
<UserControl x:Class="Tango.FSE.PPCConsole.Views.FileSystemView"
             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:global="clr-namespace:Tango.FSE.PPCConsole"
             xmlns:vm="clr-namespace:Tango.FSE.PPCConsole.ViewModels"
             xmlns:controls="clr-namespace:Tango.FSE.Common.Controls;assembly=Tango.FSE.Common"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:Tango.FSE.PPCConsole.Views"
             xmlns:material="http://materialdesigninxaml.net/winfx/xaml/themes"
             mc:Ignorable="d" 
             d:DesignHeight="450" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=vm:FileSystemViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.FileSystemViewVM}">
    <Grid IsEnabled="{Binding IsFree}">
        <Grid Margin="0 20 0 0" IsEnabled="{Binding MachineProvider.IsPPCAvailable}">
            <Grid.RowDefinitions>
                <RowDefinition Height="30" />
                <RowDefinition Height="1*" />
            </Grid.RowDefinitions>

            <DockPanel IsEnabled="{Binding MachineProvider.IsConnected}">
                <ListBox x:Name="listView" SelectedIndex="1" Background="{StaticResource FSE_PrimaryBackgroundLightBrush}" SelectionChanged="ListView_SelectionChanged" Style="{StaticResource MaterialDesignToolToggleListBox}" Margin="50 0 0 0" DockPanel.Dock="Right">
                    <ListBox.Resources>
                        <SolidColorBrush x:Key="MaterialDesignDivider" Color="{StaticResource FSE_PrimaryBackgroundDarkColor}"/>
                    </ListBox.Resources>
                    <ListBoxItem Width="60" HorizontalContentAlignment="Center" Tag="Large">
                        <material:PackIcon Kind="ViewList" Width="Auto" Height="20" />
                    </ListBoxItem>
                    <ListBoxItem Width="60" HorizontalContentAlignment="Center" Tag="Details">
                        <material:PackIcon Kind="FormatListBulleted" Width="Auto" Height="20" />
                    </ListBoxItem>
                </ListBox>
                <DockPanel>
                    <StackPanel DockPanel.Dock="Right" Orientation="Horizontal">
                        <Button Command="{Binding NavigateCommand}" material:ButtonAssist.CornerRadius="0 3 3 0" Style="{StaticResource FSE_RaisedButton_Dark_Hover}" Padding="0" Width="60" Height="Auto">
                            <material:PackIcon Kind="Refresh" Width="Auto" Height="20" />
                        </Button>
                    </StackPanel>
                    <StackPanel DockPanel.Dock="Left" Orientation="Horizontal">
                        <Button Command="{Binding BackCommand}" material:ButtonAssist.CornerRadius="3 0 0 3" Style="{StaticResource FSE_RaisedButton_Dark_Hover}" Padding="0" Width="60" Height="Auto">
                            <material:PackIcon Kind="ChevronLeft" Width="Auto" Height="20" />
                        </Button>
                    </StackPanel>
                    <Border>
                        <Border BorderThickness="3" BorderBrush="{StaticResource FSE_PrimaryBackgroundLightBrush}" Background="{StaticResource FSE_PrimaryBackgroundDarkBrush}">
                            <Border.Effect>
                                <DropShadowEffect BlurRadius="2" ShadowDepth="2" Opacity="0.3" Direction="270" />
                            </Border.Effect>
                            <Grid>
                                <Border IsHitTestVisible="False" Visibility="{Binding IsBusy,Converter={StaticResource BooleanToVisibilityConverter}}">
                                    <Border.Background>
                                        <LinearGradientBrush>
                                            <GradientStop Offset="0" Color="Transparent" />
                                            <GradientStop Offset="0.5" Color="#6303A9F4" />
                                            <GradientStop Offset="1" Color="Transparent" />
                                        </LinearGradientBrush>
                                    </Border.Background>
                                    <Border.Style>
                                        <Style TargetType="Border">
                                            <Style.Triggers>
                                                <DataTrigger Binding="{Binding IsBusy}" Value="True">
                                                    <DataTrigger.EnterActions>
                                                        <BeginStoryboard Name="loadingStory">
                                                            <Storyboard>
                                                                <DoubleAnimation Storyboard.TargetProperty="Background.GradientStops[1].Offset" From="0" To="1" AutoReverse="True" RepeatBehavior="Forever" />
                                                            </Storyboard>
                                                        </BeginStoryboard>
                                                    </DataTrigger.EnterActions>
                                                    <DataTrigger.ExitActions>
                                                        <RemoveStoryboard BeginStoryboardName="loadingStory" />
                                                    </DataTrigger.ExitActions>
                                                </DataTrigger>
                                            </Style.Triggers>
                                        </Style>
                                    </Border.Style>
                                </Border>

                                <TextBox IsEnabled="{Binding IsFree}" Padding="5 0 0 0" Text="{Binding CurrentPath,UpdateSourceTrigger=PropertyChanged,Mode=TwoWay}" Foreground="{StaticResource FSE_PrimaryForegroundBrush}" CaretBrush="{StaticResource FSE_PrimaryForegroundBrush}" Background="Transparent" BorderThickness="0" VerticalContentAlignment="Center" Style="{x:Null}">
                                    <TextBox.InputBindings>
                                        <KeyBinding Key="Return" Command="{Binding NavigateCommand}" />
                                    </TextBox.InputBindings>
                                </TextBox>
                            </Grid>
                        </Border>
                    </Border>
                </DockPanel>
            </DockPanel>

            <Grid Grid.Row="1" Margin="0 10 0 0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="200" />
                    <ColumnDefinition Width="5" />
                    <ColumnDefinition Width="1*" />
                </Grid.ColumnDefinitions>

                <Border IsEnabled="{Binding MachineProvider.IsConnected}" Background="{StaticResource FSE_PrimaryBackgroundDarkBrush}" BorderBrush="{StaticResource FSE_PrimaryBackgroundLightBrush}" BorderThickness="3" CornerRadius="3" Padding="10 5">
                    <StackPanel>
                        <controls:TextIconButton HorizontalContentAlignment="Left" Padding="5" Icon="Computer" Background="Transparent" BorderThickness="0" FocusVisualStyle="{x:Null}">Devices</controls:TextIconButton>
                        <StackPanel Margin="30 0 0 0">
                            <ItemsControl ItemsSource="{Binding Drives}">
                                <ItemsControl.ItemTemplate>
                                    <DataTemplate>
                                        <controls:TextIconButton HorizontalContentAlignment="Left" Padding="5" Icon="Harddisk" Background="Transparent" BorderThickness="0" FocusVisualStyle="{x:Null}" Content="{Binding Label}" Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.NavigateToFolderCommand}" CommandParameter="{Binding Path}"></controls:TextIconButton>
                                    </DataTemplate>
                                </ItemsControl.ItemTemplate>
                            </ItemsControl>
                        </StackPanel>

                        <controls:TextIconButton HorizontalContentAlignment="Left" Padding="5" Icon="Computer" Background="Transparent" BorderThickness="0" FocusVisualStyle="{x:Null}">Computer</controls:TextIconButton>
                        <StackPanel Margin="30 0 0 0">
                            <controls:TextIconButton HorizontalContentAlignment="Left" Padding="5" Icon="DesktopMac" Background="Transparent" BorderThickness="0" FocusVisualStyle="{x:Null}" Command="{Binding NavigateSpecialFolderCommand}" CommandParameter="DesktopDirectory">Desktop</controls:TextIconButton>
                            <controls:TextIconButton HorizontalContentAlignment="Left" Padding="5" Icon="FileDocument" Background="Transparent" BorderThickness="0" FocusVisualStyle="{x:Null}" Command="{Binding NavigateSpecialFolderCommand}" CommandParameter="MyDocuments">Documents</controls:TextIconButton>
                            <controls:TextIconButton HorizontalContentAlignment="Left" Padding="5" Icon="Application" Background="Transparent" BorderThickness="0" FocusVisualStyle="{x:Null}" Command="{Binding NavigateToFolderCommand}" CommandParameter='%appdata%\Twine\Tango'>Application Data</controls:TextIconButton>
                        </StackPanel>
                    </StackPanel>
                </Border>

                <Grid Margin="10 0 0 0" Grid.Column="2">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="1*" MinHeight="100" />
                        <RowDefinition Height="5" />
                        <RowDefinition Height="105" MinHeight="0" />
                    </Grid.RowDefinitions>
                    <controls:FileSystemControl
                                            x:Name="fileSystemControl"
                                            IsEnabled="{Binding MachineProvider.IsConnected}"
                                            AllowDrag="True"
                                            AllowDrop="True"
                                            CurrentItem="{Binding CurrentItem}" 
                                            Mode="{Binding ElementName=listView,Path=SelectedItem.Tag}"
                                            ItemDoubleClickedCommand="{Binding OpenItemCommand}" 
                                            DeleteCommand="{Binding DeleteCommand}"
                                            SelectedItems="{Binding SelectedItems}"
                                            DragCommand="{Binding DragCommand}"
                                            DropCommand="{Binding DropCommand}"
                                            CutPasteCommand="{Binding CutPasteCommand}"
                                            CopyPasteCommand="{Binding CopyPasteCommand}"
                                            DownloadCommand="{Binding DownloadCommand}"
                                            UploadCommand="{Binding UploadCommand}"
                                            BackCommand="{Binding BackCommand}"
                                            RenameCommand="{Binding RenameCommand}"
                                            NewFolderCommand="{Binding NewFolderCommand}"/>

                    <GridSplitter Grid.Row="1" Height="5" HorizontalAlignment="Stretch" VerticalAlignment="Center" />

                    <Grid Grid.Row="2">
                        <DockPanel>
                            <Grid DockPanel.Dock="Top" >
                                <StackPanel Margin="5" Orientation="Horizontal" HorizontalAlignment="Left">
                                    <material:PackIcon Kind="Download" />
                                    <material:PackIcon Margin="-2 0 0 0" Kind="Upload" />
                                    <TextBlock Margin="5 0 0 0" Foreground="{StaticResource FSE_PrimaryAccentBrush}" FontSize="{StaticResource FSE_SmallFontSize}">Transfer Queue</TextBlock>
                                    <TextBlock Margin="10 0 0 0" Foreground="{StaticResource FSE_GrayBrush}" FontSize="{StaticResource FSE_SmallFontSize}">
                                    <Run>(</Run><Run Text="{Binding FileSystemHandlers.Count,Mode=OneWay}"></Run><Run>)</Run>
                                    </TextBlock>
                                </StackPanel>
                                <StackPanel VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0 0 10 0" Orientation="Horizontal">
                                    <material:PackIcon ToolTip="Fast communication channel is available" Visibility="{Binding FileSystemProvider.IsWebRtcAvailable,Converter={StaticResource BooleanToVisibilityConverter}}" Kind="LightningBoltCircle" HorizontalAlignment="Right" Width="18" Height="18" Foreground="{StaticResource FSE_GreenBrush}" />
                                    <CheckBox Margin="5 0 0 0" IsEnabled="{Binding FileSystemProvider.IsWebRtcAvailable}" FontSize="{StaticResource FSE_SmallFontSize}" IsChecked="{Binding FileSystemProvider.EnableWebRTC}">Enable fast communication channel</CheckBox>
                                </StackPanel>
                            </Grid>
                            <Border CornerRadius="3" BorderThickness="3" BorderBrush="{StaticResource FSE_PrimaryBackgroundLightBrush}" Background="{StaticResource FSE_PrimaryBackgroundDarkBrush}">
                                <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
                                    <ItemsControl ItemsSource="{Binding FileSystemHandlers}" HorizontalContentAlignment="Stretch" FontSize="10" Background="Transparent">
                                        <ItemsControl.ItemTemplate>
                                            <DataTemplate>
                                                <Border Margin="5 5 5 0" CornerRadius="3" BorderBrush="{StaticResource FSE_PrimaryBackgroundLightBrush}" BorderThickness="2" Padding="10">
                                                    <DockPanel Height="40">
                                                        <Grid DockPanel.Dock="Left" Width="40">
                                                            <Image HorizontalAlignment="Left" RenderOptions.BitmapScalingMode="Fant" Stretch="Uniform">
                                                                <Image.Style>
                                                                    <Style TargetType="Image">
                                                                        <Setter Property="Source" Value="{Binding FileSystemItem.Icon}"></Setter>
                                                                        <Style.Triggers>
                                                                            <DataTrigger Binding="{Binding FileSystemItem.Type}" Value="Folder">
                                                                                <Setter Property="Source" Value="{Binding ElementName=fileSystemControl,Path=FolderIcon}"></Setter>
                                                                            </DataTrigger>
                                                                        </Style.Triggers>
                                                                    </Style>
                                                                </Image.Style>
                                                            </Image>
                                                            <Ellipse Margin="-5 -5 0 0"  Fill="{StaticResource FSE_PrimaryBackgroundDarkBrush}" HorizontalAlignment="Left" VerticalAlignment="Top" Width="20" Height="20" />
                                                            <material:PackIcon Margin="-3 -3 0 0" HorizontalAlignment="Left" VerticalAlignment="Top" Width="15" Height="15">
                                                                <material:PackIcon.Style>
                                                                    <Style TargetType="material:PackIcon">
                                                                        <Setter Property="Kind" Value="Hourglass"></Setter>
                                                                        <Setter Property="Foreground" Value="{StaticResource FSE_GrayBrush}"></Setter>
                                                                        <Style.Triggers>
                                                                            <DataTrigger Binding="{Binding Status}" Value="Downloading">
                                                                                <Setter Property="Kind" Value="Download"></Setter>
                                                                                <Setter Property="Foreground" Value="{StaticResource FSE_PrimaryForegroundBrush}"></Setter>
                                                                            </DataTrigger>
                                                                            <DataTrigger Binding="{Binding Status}" Value="Uploading">
                                                                                <Setter Property="Kind" Value="Upload"></Setter>
                                                                                <Setter Property="Foreground" Value="{StaticResource FSE_PrimaryForegroundBrush}"></Setter>
                                                                            </DataTrigger>
                                                                            <DataTrigger Binding="{Binding Status}" Value="Paused">
                                                                                <Setter Property="Kind" Value="Pause"></Setter>
                                                                                <Setter Property="Foreground" Value="{StaticResource FSE_OrangeBrush}"></Setter>
                                                                            </DataTrigger>
                                                                            <DataTrigger Binding="{Binding Status}" Value="Failed">
                                                                                <Setter Property="Kind" Value="Alert"></Setter>
                                                                                <Setter Property="Foreground" Value="{StaticResource FSE_ErrorBrush}"></Setter>
                                                                            </DataTrigger>
                                                                            <DataTrigger Binding="{Binding Status}" Value="Aborted">
                                                                                <Setter Property="Kind" Value="Alert"></Setter>
                                                                                <Setter Property="Foreground" Value="{StaticResource FSE_WarningBrush}"></Setter>
                                                                            </DataTrigger>
                                                                            <DataTrigger Binding="{Binding Status}" Value="Completed">
                                                                                <Setter Property="Kind" Value="Check"></Setter>
                                                                                <Setter Property="Foreground" Value="{StaticResource FSE_SuccessBrush}"></Setter>
                                                                            </DataTrigger>
                                                                        </Style.Triggers>
                                                                    </Style>
                                                                </material:PackIcon.Style>
                                                            </material:PackIcon>
                                                        </Grid>

                                                        <Grid DockPanel.Dock="Right" Width="140" Margin="20 0 0 0">
                                                            <UniformGrid Columns="3">
                                                                <Grid>
                                                                    <controls:ToggleIconButton ToolTip="Pause/Resume" Width="24" Height="24" UncheckedForeground="{StaticResource FSE_OrangeBrush}" CheckedForeground="{StaticResource FSE_GreenBrush}" UncheckedIcon="Pause" CheckedIcon="Play" Cursor="Hand" IsChecked="{Binding IsPaused,Mode=TwoWay}">
                                                                        <controls:ToggleIconButton.Style>
                                                                            <Style TargetType="controls:ToggleIconButton" BasedOn="{StaticResource {x:Type controls:ToggleIconButton}}">
                                                                                <Setter Property="IsEnabled" Value="False"></Setter>
                                                                                <Setter Property="Visibility" Value="Visible"></Setter>
                                                                                <Setter Property="Opacity" Value="0.2"></Setter>
                                                                                <Style.Triggers>
                                                                                    <DataTrigger Binding="{Binding Status}" Value="Downloading">
                                                                                        <Setter Property="IsEnabled" Value="True"></Setter>
                                                                                        <Setter Property="Opacity" Value="1"></Setter>
                                                                                    </DataTrigger>
                                                                                    <DataTrigger Binding="{Binding Status}" Value="Uploading">
                                                                                        <Setter Property="IsEnabled" Value="True"></Setter>
                                                                                        <Setter Property="Opacity" Value="1"></Setter>
                                                                                    </DataTrigger>
                                                                                    <DataTrigger Binding="{Binding Status}" Value="Paused">
                                                                                        <Setter Property="IsEnabled" Value="True"></Setter>
                                                                                        <Setter Property="Opacity" Value="1"></Setter>
                                                                                    </DataTrigger>
                                                                                    <DataTrigger Binding="{Binding Status}" Value="Failed">
                                                                                        <Setter Property="Visibility" Value="Hidden"></Setter>
                                                                                    </DataTrigger>
                                                                                </Style.Triggers>
                                                                            </Style>
                                                                        </controls:ToggleIconButton.Style>
                                                                    </controls:ToggleIconButton>
                                                                    <controls:IconButton Icon="Restart" ToolTip="Try again" Cursor="Hand" Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.RetryFailedFileSystemHandlerCommand}" CommandParameter="{Binding}">
                                                                        <controls:IconButton.Style>
                                                                            <Style TargetType="controls:IconButton" BasedOn="{StaticResource {x:Type controls:IconButton}}">
                                                                                <Setter Property="Visibility" Value="Hidden"></Setter>
                                                                                <Style.Triggers>
                                                                                    <DataTrigger Binding="{Binding Status}" Value="Failed">
                                                                                        <Setter Property="Visibility" Value="Visible"></Setter>
                                                                                    </DataTrigger>
                                                                                </Style.Triggers>
                                                                            </Style>
                                                                        </controls:IconButton.Style>
                                                                    </controls:IconButton>
                                                                </Grid>
                                                                <controls:IconButton Icon="FolderOpen" ToolTip="Open containing folder" Cursor="Hand" Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.OpenFileSystemHandlerDestinationCommand}" CommandParameter="{Binding}" />
                                                                <controls:IconButton Icon="DeleteForever" ToolTip="Remove from queue" Foreground="{StaticResource FSE_RedBrush}" Cursor="Hand" Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.DeleteFileSystemHandlerCommand}" CommandParameter="{Binding}" />
                                                            </UniformGrid>
                                                        </Grid>

                                                        <Grid Margin="10 0 0 0">
                                                            <DockPanel>
                                                                <TextBlock FontSize="{StaticResource FSE_SmallFontSize}" DockPanel.Dock="Top" HorizontalAlignment="Left" Text="{Binding FileSystemItem.Name}" TextTrimming="CharacterEllipsis"></TextBlock>
                                                                <DockPanel Width="140" TextElement.Foreground="{StaticResource FSE_GrayBrush}" Margin="0 2 0 0" DockPanel.Dock="Top" HorizontalAlignment="Left">
                                                                    <TextBlock TextTrimming="CharacterEllipsis">
                                                                        <Run Text="{Binding Progress.Value,Mode=OneWay,Converter={StaticResource ByteArrayToFileSizeConverter}}"></Run>
                                                                        <Run>/</Run>
                                                                        <Run Text="{Binding Progress.Maximum,Mode=OneWay,Converter={StaticResource ByteArrayToFileSizeConverter}}"></Run>
                                                                    </TextBlock>
                                                                    <TextBlock HorizontalAlignment="Right">
                                                                        <Run Text="{Binding TransferRate,Mode=OneWay,Converter={StaticResource ByteArrayToFileSizeConverter}}"></Run><Run>/s</Run>
                                                                    </TextBlock>
                                                                </DockPanel>

                                                                <Border VerticalAlignment="Bottom" Height="5" Background="{StaticResource FSE_PrimaryBackgroundBrush}">
                                                                    <ProgressBar Height="Auto" Minimum="0" Maximum="{Binding Progress.Maximum}" Value="{Binding Progress.Value}">
                                                                        <ProgressBar.Style>
                                                                            <Style TargetType="ProgressBar" BasedOn="{StaticResource {x:Type ProgressBar}}">
                                                                                <Setter Property="IsIndeterminate" Value="False"></Setter>
                                                                                <Style.Triggers>
                                                                                    <DataTrigger Binding="{Binding Status}" Value="Pending">
                                                                                        <Setter Property="IsIndeterminate" Value="True"></Setter>
                                                                                    </DataTrigger>
                                                                                </Style.Triggers>
                                                                            </Style>
                                                                        </ProgressBar.Style>
                                                                    </ProgressBar>
                                                                </Border>


                                                            </DockPanel>

                                                            <TextBlock FontSize="{StaticResource FSE_SmallFontSize}" HorizontalAlignment="Right" VerticalAlignment="Top" Text="{Binding Status}"></TextBlock>
                                                        </Grid>
                                                    </DockPanel>
                                                </Border>
                                            </DataTemplate>
                                        </ItemsControl.ItemTemplate>
                                    </ItemsControl>
                                </ScrollViewer>
                            </Border>
                        </DockPanel>
                    </Grid>
                </Grid>
            </Grid>
        </Grid>
    </Grid>
</UserControl>