738 lines
39 KiB
XML
738 lines
39 KiB
XML
<Window
|
|
x:Class="FileTime.GuiApp.Views.MainWindow"
|
|
xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:appCoreModels="using:FileTime.App.Core.Models"
|
|
xmlns:config="using:FileTime.GuiApp.Configuration"
|
|
xmlns:corevm="using:FileTime.App.Core.ViewModels"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:interactions="using:FileTime.Core.Interactions"
|
|
xmlns:local="using:FileTime.GuiApp.Views"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:vm="using:FileTime.GuiApp.ViewModels"
|
|
Title="FileTime"
|
|
MinWidth="800"
|
|
MinHeight="600"
|
|
d:DesignHeight="450"
|
|
d:DesignWidth="800"
|
|
x:CompileBindings="True"
|
|
x:DataType="vm:IMainWindowViewModelBase"
|
|
Background="Transparent"
|
|
Closed="OnWindowClosed"
|
|
ExtendClientAreaToDecorationsHint="True"
|
|
FontFamily="{Binding MainFont^, Mode=OneWay}"
|
|
Icon="/Assets/filetime.ico"
|
|
KeyDown="OnKeyDown"
|
|
Opened="OnWindowOpened"
|
|
RequestedThemeVariant="Dark"
|
|
TransparencyLevelHint="Blur"
|
|
mc:Ignorable="d">
|
|
<Window.Resources>
|
|
<ResourceDictionary>
|
|
<ResourceDictionary.MergedDictionaries>
|
|
<ResourceInclude Source="avares://FileTime.GuiApp/Resources/SolarizedDarkTheme.axaml" />
|
|
<ResourceInclude Source="avares://FileTime.GuiApp/Resources/Brushes.axaml" />
|
|
<ResourceInclude Source="avares://FileTime.GuiApp/Resources/Converters.axaml" />
|
|
</ResourceDictionary.MergedDictionaries>
|
|
</ResourceDictionary>
|
|
</Window.Resources>
|
|
<Window.Styles>
|
|
<StyleInclude Source="avares://FileTime.GuiApp/Resources/Styles.axaml" />
|
|
</Window.Styles>
|
|
|
|
<Grid Background="{DynamicResource AppBackgroundBrush}">
|
|
<Grid
|
|
x:DataType="vm:MainWindowViewModel"
|
|
IsVisible="{Binding Loading, Converter={x:Static BoolConverters.Not}, FallbackValue=False}">
|
|
|
|
<Grid
|
|
ColumnDefinitions="250,*"
|
|
RowDefinitions="Auto,*">
|
|
|
|
<Grid PointerPressed="HeaderPointerPressed">
|
|
<Rectangle Fill="#01000000" />
|
|
<TextBlock
|
|
Margin="15,10"
|
|
Text="{Binding Title}" />
|
|
</Grid>
|
|
|
|
<Grid
|
|
Grid.Column="1"
|
|
PointerPressed="HeaderPointerPressed">
|
|
<Rectangle Fill="#01000000" />
|
|
|
|
<StackPanel
|
|
Margin="20,10"
|
|
Orientation="Horizontal">
|
|
<local:PathPresenter DataContext="{Binding AppState.SelectedTab^.CurrentLocation^.FullName.Path, Converter={StaticResource PathPreformatter}}" />
|
|
<TextBlock
|
|
Foreground="{StaticResource AccentBrush}"
|
|
Text="{Binding AppState.SelectedTab^.CurrentSelectedItem^.DisplayNameText}" />
|
|
</StackPanel>
|
|
</Grid>
|
|
|
|
<Grid
|
|
Grid.Row="1"
|
|
RowDefinitions="Auto,Auto,Auto,Auto">
|
|
|
|
<Border
|
|
Margin="10"
|
|
Padding="10"
|
|
Background="{DynamicResource ContainerBackgroundBrush}"
|
|
CornerRadius="10">
|
|
<Grid RowDefinitions="Auto,Auto">
|
|
|
|
<TextBlock
|
|
Margin="0,0,0,10"
|
|
Text="Drives" />
|
|
|
|
<ItemsRepeater
|
|
Grid.Row="1"
|
|
Items="{Binding AppState.RootDriveInfos.Collection}">
|
|
<ItemsRepeater.ItemTemplate>
|
|
<DataTemplate x:DataType="vm:RootDriveInfo">
|
|
<Grid
|
|
Classes="SidebarContainerPresenter"
|
|
Cursor="Hand"
|
|
PointerPressed="OnHasContainerPointerPressed">
|
|
<Grid
|
|
Margin="0,5"
|
|
ColumnDefinitions="Auto,*,Auto"
|
|
RowDefinitions="Auto,Auto">
|
|
<Image
|
|
Grid.RowSpan="2"
|
|
Width="20"
|
|
Height="20"
|
|
HorizontalAlignment="Left"
|
|
VerticalAlignment="Center"
|
|
Source="{SvgImage /Assets/material/folder.svg}" />
|
|
|
|
<StackPanel
|
|
Grid.Column="1"
|
|
HorizontalAlignment="Stretch"
|
|
VerticalAlignment="Center"
|
|
Orientation="Horizontal">
|
|
|
|
<TextBlock
|
|
Margin="5,0,0,0"
|
|
VerticalAlignment="Center"
|
|
Text="{Binding FullName}" />
|
|
|
|
<TextBlock
|
|
Margin="5,0,0,0"
|
|
VerticalAlignment="Center"
|
|
Classes="ExtraSmallText"
|
|
IsVisible="{Binding Label, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"
|
|
Text="{Binding Label}" />
|
|
</StackPanel>
|
|
|
|
<StackPanel
|
|
Grid.Column="2"
|
|
HorizontalAlignment="Right"
|
|
VerticalAlignment="Center"
|
|
Orientation="Horizontal">
|
|
|
|
<TextBlock
|
|
VerticalAlignment="Center"
|
|
Classes="SmallText"
|
|
Text="{Binding Free, Converter={StaticResource FormatSizeConverter}, ConverterParameter=0}" />
|
|
|
|
<TextBlock
|
|
VerticalAlignment="Center"
|
|
Classes="SmallText"
|
|
Text=" / " />
|
|
|
|
<TextBlock
|
|
VerticalAlignment="Center"
|
|
Classes="SmallText"
|
|
Text="{Binding Size, Converter={StaticResource FormatSizeConverter}, ConverterParameter=0}" />
|
|
</StackPanel>
|
|
|
|
<ProgressBar
|
|
Grid.Row="1"
|
|
Grid.Column="1"
|
|
Grid.ColumnSpan="2"
|
|
MinWidth="100"
|
|
Margin="5,0,0,0"
|
|
HorizontalAlignment="Stretch"
|
|
Maximum="100"
|
|
Value="{Binding UsedPercentage}" />
|
|
</Grid>
|
|
</Grid>
|
|
</DataTemplate>
|
|
</ItemsRepeater.ItemTemplate>
|
|
</ItemsRepeater>
|
|
</Grid>
|
|
</Border>
|
|
|
|
<Border
|
|
Grid.Row="1"
|
|
Margin="10"
|
|
Padding="0,10"
|
|
Background="{DynamicResource ContainerBackgroundBrush}"
|
|
CornerRadius="10">
|
|
<Grid RowDefinitions="Auto,Auto">
|
|
|
|
<TextBlock
|
|
Margin="10,0,10,10"
|
|
Text="Places" />
|
|
|
|
<ItemsRepeater
|
|
Grid.Row="1"
|
|
Items="{Binding AppState.Places}">
|
|
<ItemsRepeater.ItemTemplate>
|
|
<DataTemplate x:DataType="vm:PlaceInfo">
|
|
<Grid
|
|
Classes="SidebarContainerPresenter"
|
|
Cursor="Hand"
|
|
PointerPressed="OnHasContainerPointerPressed">
|
|
<StackPanel
|
|
Margin="10,5"
|
|
HorizontalAlignment="Stretch"
|
|
Orientation="Horizontal">
|
|
<Image
|
|
Width="20"
|
|
Height="20"
|
|
VerticalAlignment="Center"
|
|
Source="{Binding Container, Converter={StaticResource ItemToImageConverter}}" />
|
|
|
|
<TextBlock
|
|
Margin="5,0,0,0"
|
|
VerticalAlignment="Center"
|
|
Text="{Binding DisplayName}" />
|
|
</StackPanel>
|
|
</Grid>
|
|
</DataTemplate>
|
|
</ItemsRepeater.ItemTemplate>
|
|
</ItemsRepeater>
|
|
</Grid>
|
|
</Border>
|
|
|
|
<!--Border Grid.Row="2" CornerRadius="10" Background="{DynamicResource ContainerBackgroundBrush}" Padding="0,10" Margin="10">
|
|
<Grid RowDefinitions="Auto,Auto">
|
|
|
|
<TextBlock
|
|
Margin="10,0,10,10"
|
|
Text="Favorites" />
|
|
|
|
<ItemsRepeater
|
|
Grid.Row="1"
|
|
Items="{Binding AppState.FavoriteElements}">
|
|
<ItemsRepeater.ItemTemplate>
|
|
<DataTemplate>
|
|
<Grid Classes="SidebarContainerPresenter" PointerPressed="OnHasContainerPointerPressed" Cursor="Hand">
|
|
<StackPanel Orientation="Horizontal" Margin="10,5" HorizontalAlignment="Stretch">
|
|
<Image
|
|
Width="20"
|
|
Height="20"
|
|
VerticalAlignment="Center"
|
|
Source="{Binding Converter={StaticResource ItemToImageConverter}}" />
|
|
|
|
<TextBlock
|
|
Margin="5,0,0,0"
|
|
VerticalAlignment="Center"
|
|
Text="{Binding Name}" />
|
|
</StackPanel>
|
|
</Grid>
|
|
</DataTemplate>
|
|
</ItemsRepeater.ItemTemplate>
|
|
</ItemsRepeater>
|
|
</Grid>
|
|
</Border>
|
|
|
|
<Border Grid.Row="3" CornerRadius="10" Background="{DynamicResource ContainerBackgroundBrush}" Padding="0,10" Margin="10">
|
|
<Grid RowDefinitions="Auto,Auto">
|
|
|
|
<TextBlock
|
|
Margin="10,0,10,10"
|
|
Text="History" />
|
|
|
|
<ItemsRepeater
|
|
Grid.Row="1"
|
|
Items="{Binding AppState.SelectedTab.History}">
|
|
<ItemsRepeater.ItemTemplate>
|
|
<DataTemplate>
|
|
<Grid Classes="SidebarContainerPresenter" PointerPressed="OnHasContainerPointerPressed" Cursor="Hand">
|
|
<StackPanel Orientation="Horizontal" Margin="10,5" HorizontalAlignment="Stretch">
|
|
<Image
|
|
Width="20"
|
|
Height="20"
|
|
VerticalAlignment="Center"
|
|
Source="{Binding Container,Converter={StaticResource ItemToImageConverter}}" />
|
|
|
|
<TextBlock
|
|
Margin="5,0,0,0"
|
|
VerticalAlignment="Center"
|
|
Text="{Binding Name}" />
|
|
</StackPanel>
|
|
</Grid>
|
|
</DataTemplate>
|
|
</ItemsRepeater.ItemTemplate>
|
|
</ItemsRepeater>
|
|
</Grid>
|
|
</Border-->
|
|
|
|
</Grid>
|
|
|
|
<Grid
|
|
Grid.Row="1"
|
|
Grid.Column="1"
|
|
RowDefinitions="Auto,40,*,Auto">
|
|
|
|
<Grid>
|
|
<ItemsControl Items="{Binding AppState.TimelineViewModel.ParallelCommandsGroups.Collection}">
|
|
<ItemsControl.ItemsPanel>
|
|
<ItemsPanelTemplate>
|
|
<StackPanel Orientation="Horizontal" />
|
|
</ItemsPanelTemplate>
|
|
</ItemsControl.ItemsPanel>
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate>
|
|
<Border
|
|
MaxHeight="200"
|
|
Margin="0,0,10,0"
|
|
Padding="5"
|
|
Background="{DynamicResource ContainerBackgroundColor}"
|
|
CornerRadius="10">
|
|
<ScrollViewer>
|
|
<ItemsControl Items="{Binding Commands.Collection}">
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate>
|
|
<Border
|
|
BorderThickness="1"
|
|
Classes.SelectedTimelineCommand="{Binding IsSelected}">
|
|
<StackPanel>
|
|
<TextBlock Text="{Binding DisplayLabel^}" />
|
|
<ProgressBar
|
|
Margin="0,5,0,0"
|
|
Maximum="100"
|
|
Value="{Binding TotalProgress^}" />
|
|
</StackPanel>
|
|
</Border>
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
</ScrollViewer>
|
|
</Border>
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
</Grid>
|
|
|
|
<ItemsControl
|
|
Grid.Row="1"
|
|
Items="{Binding AppState.Tabs}">
|
|
<ItemsControl.ItemsPanel>
|
|
<ItemsPanelTemplate>
|
|
<StackPanel Orientation="Horizontal" />
|
|
</ItemsPanelTemplate>
|
|
</ItemsControl.ItemsPanel>
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate>
|
|
<Grid RowDefinitions="Auto,1">
|
|
<StackPanel
|
|
Margin="20,0,20,0"
|
|
Orientation="Horizontal">
|
|
|
|
<TextBlock
|
|
VerticalAlignment="Center"
|
|
Text="{Binding TabNumber, StringFormat=({0})}" />
|
|
|
|
<TextBlock
|
|
Margin="5,0,0,0"
|
|
VerticalAlignment="Center"
|
|
Text="{Binding CurrentLocation^.Name, FallbackValue=Loading...}" />
|
|
</StackPanel>
|
|
|
|
<Rectangle
|
|
Grid.Row="1"
|
|
Fill="{DynamicResource ForegroundBrush}"
|
|
IsVisible="{Binding IsSelected^}" />
|
|
</Grid>
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
|
|
<Grid
|
|
Grid.Row="2"
|
|
Margin="20,0,0,0">
|
|
<Grid ColumnDefinitions="15*,10,40*,10,45*">
|
|
|
|
<ListBox
|
|
x:CompileBindings="False"
|
|
AutoScrollToSelectedItem="True"
|
|
Classes="ContentListView"
|
|
IsTabStop="True"
|
|
Items="{Binding AppState.SelectedTab^.ParentsChildrenCollection.Collection}"
|
|
ScrollViewer.HorizontalScrollBarVisibility="Hidden"
|
|
ScrollViewer.VerticalScrollBarVisibility="Visible">
|
|
<ListBox.ItemTemplate>
|
|
<DataTemplate x:DataType="corevm:IItemViewModel">
|
|
<local:ItemView
|
|
HorizontalAlignment="Stretch"
|
|
HorizontalContentAlignment="Stretch"
|
|
ShowAttributes="False" />
|
|
</DataTemplate>
|
|
</ListBox.ItemTemplate>
|
|
</ListBox>
|
|
|
|
<Rectangle
|
|
Grid.Column="1"
|
|
Width="1"
|
|
Margin="0,10,0,10"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Stretch"
|
|
Fill="{DynamicResource ContentSeparatorBrush}" />
|
|
|
|
<Grid
|
|
Grid.Column="2"
|
|
RowDefinitions="Auto,*">
|
|
<Grid IsVisible="{Binding AppState.SelectedTab^.CurrentLocation^.IsLoading^, FallbackValue=False}">
|
|
<Image
|
|
Width="40"
|
|
Height="40"
|
|
Classes="LoadingAnimation"
|
|
Source="{SvgImage /Assets/loading.svg}" />
|
|
</Grid>
|
|
<ListBox
|
|
x:Name="CurrentItems"
|
|
Grid.Row="1"
|
|
AutoScrollToSelectedItem="True"
|
|
Classes="ContentListView"
|
|
IsTabStop="True"
|
|
Items="{Binding AppState.SelectedTab^.CurrentItemsCollection.Collection}"
|
|
ScrollViewer.HorizontalScrollBarVisibility="Hidden"
|
|
ScrollViewer.VerticalScrollBarVisibility="Visible"
|
|
SelectedItem="{Binding AppState.SelectedTab^.CurrentSelectedItem^}">
|
|
<ListBox.ItemTemplate>
|
|
<DataTemplate x:DataType="corevm:IItemViewModel">
|
|
<local:ItemView
|
|
HorizontalAlignment="Stretch"
|
|
HorizontalContentAlignment="Stretch" />
|
|
</DataTemplate>
|
|
</ListBox.ItemTemplate>
|
|
</ListBox>
|
|
|
|
<TextBlock
|
|
x:Name="CurrentEmpty"
|
|
Grid.Row="1"
|
|
Margin="10"
|
|
HorizontalAlignment="Center"
|
|
x:CompileBindings="False"
|
|
FontWeight="Bold"
|
|
Foreground="{DynamicResource ErrorBrush}"
|
|
IsVisible="{Binding AppState.SelectedTab^.CurrentItemsCollection.Collection.Count, Converter={StaticResource EqualityConverter}, ConverterParameter=0}">
|
|
Empty
|
|
</TextBlock>
|
|
</Grid>
|
|
|
|
<Rectangle
|
|
Grid.Column="3"
|
|
Width="1"
|
|
Margin="0,10,0,10"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Stretch"
|
|
Fill="{DynamicResource ContentSeparatorBrush}" />
|
|
|
|
<Grid Grid.Column="4">
|
|
<Grid IsVisible="{Binding ItemPreviewService.ItemPreview^, Converter={x:Static ObjectConverters.IsNull}}">
|
|
<Grid IsVisible="{Binding AppState.SelectedTab^.SelectedsChildrenCollection.Collection, Converter={x:Static ObjectConverters.IsNotNull}, FallbackValue=False}">
|
|
<ListBox
|
|
x:Name="ChildItems"
|
|
x:CompileBindings="False"
|
|
AutoScrollToSelectedItem="True"
|
|
Classes="ContentListView"
|
|
IsVisible="{Binding AppState.SelectedTab^.SelectedsChildrenCollection.Collection.Count, Converter={StaticResource NotEqualsConverter}, ConverterParameter=0}"
|
|
Items="{Binding AppState.SelectedTab^.SelectedsChildrenCollection.Collection}">
|
|
<ListBox.ItemTemplate>
|
|
<DataTemplate x:DataType="corevm:IItemViewModel">
|
|
<local:ItemView />
|
|
</DataTemplate>
|
|
</ListBox.ItemTemplate>
|
|
</ListBox>
|
|
|
|
<TextBlock
|
|
x:Name="ChildEmpty"
|
|
Margin="10"
|
|
HorizontalAlignment="Center"
|
|
x:CompileBindings="False"
|
|
FontWeight="Bold"
|
|
Foreground="{DynamicResource ErrorBrush}"
|
|
IsVisible="{Binding AppState.SelectedTab^.SelectedsChildrenCollection.Collection.Count, Converter={StaticResource EqualityConverter}, ConverterParameter=0}">
|
|
Empty
|
|
</TextBlock>
|
|
</Grid>
|
|
|
|
<Grid
|
|
IsVisible="{Binding AppState.SelectedTab^.SelectedsChildrenCollection, Converter={x:Static ObjectConverters.IsNull}, ConverterParameter=0, FallbackValue=False}"
|
|
RowDefinitions="Auto, Auto">
|
|
<TextBlock
|
|
Margin="0,0,0,10"
|
|
HorizontalAlignment="Center"
|
|
Foreground="{DynamicResource ErrorBrush}"
|
|
Text="There were some errors while opening container."
|
|
TextWrapping="Wrap" />
|
|
|
|
<ItemsRepeater
|
|
Grid.Row="1"
|
|
Items="{Binding AppState.SelectedTab^.CurrentSelectedItem^.BaseItem.Exceptions^}">
|
|
<ItemsRepeater.ItemTemplate>
|
|
<DataTemplate>
|
|
<TextBlock
|
|
Margin="5,0,5,10"
|
|
Text="{Binding Converter={StaticResource ExceptionToStringConverter}}" />
|
|
</DataTemplate>
|
|
</ItemsRepeater.ItemTemplate>
|
|
</ItemsRepeater>
|
|
</Grid>
|
|
</Grid>
|
|
<Grid IsVisible="{Binding ItemPreviewService.ItemPreview^, Converter={x:Static ObjectConverters.IsNotNull}}">
|
|
<TextBlock
|
|
HorizontalAlignment="Center"
|
|
IsVisible="{Binding ItemPreviewService.ItemPreview^.Mode, Converter={StaticResource EqualityConverter}, ConverterParameter={x:Static appCoreModels:ItemPreviewMode.Unknown}, FallbackValue={x:Static appCoreModels:ItemPreviewMode.Unknown}}"
|
|
Text="Don't know how to preview this item." />
|
|
<TextBlock
|
|
HorizontalAlignment="Center"
|
|
IsVisible="{Binding ItemPreviewService.ItemPreview^.Mode, Converter={StaticResource EqualityConverter}, ConverterParameter={x:Static appCoreModels:ItemPreviewMode.Empty}, FallbackValue={x:Static appCoreModels:ItemPreviewMode.Unknown}}"
|
|
Text="Empty" />
|
|
<ScrollViewer IsVisible="{Binding ItemPreviewService.ItemPreview^.Mode, Converter={StaticResource EqualityConverter}, ConverterParameter={x:Static appCoreModels:ItemPreviewMode.Text}, FallbackValue={x:Static appCoreModels:ItemPreviewMode.Unknown}}">
|
|
<TextBox
|
|
x:CompileBindings="False"
|
|
IsReadOnly="True"
|
|
Text="{Binding ItemPreviewService.ItemPreview^.TextContent}" />
|
|
</ScrollViewer>
|
|
</Grid>
|
|
</Grid>
|
|
</Grid>
|
|
|
|
<ItemsRepeater
|
|
Margin="0,0,0,20"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Top"
|
|
IsVisible="{Binding AppState.PopupTexts.Count, Converter={StaticResource NotEqualsConverter}, ConverterParameter=0}"
|
|
Items="{Binding AppState.PopupTexts}">
|
|
<ItemsRepeater.Styles>
|
|
<Style Selector="TextBlock">
|
|
<Style.Animations>
|
|
<Animation Duration="0:0:1">
|
|
<KeyFrame Cue="0%">
|
|
<Setter Property="Opacity" Value="0.0" />
|
|
</KeyFrame>
|
|
<KeyFrame Cue="100%">
|
|
<Setter Property="Opacity" Value="1.0" />
|
|
</KeyFrame>
|
|
</Animation>
|
|
</Style.Animations>
|
|
</Style>
|
|
</ItemsRepeater.Styles>
|
|
<ItemsRepeater.ItemTemplate>
|
|
<DataTemplate x:DataType="x:String">
|
|
<Border
|
|
Margin="5"
|
|
Padding="5"
|
|
Background="{DynamicResource ContainerGradientBackgroundBrush}">
|
|
<TextBlock
|
|
HorizontalAlignment="Center"
|
|
Foreground="{DynamicResource AccentComplementBrush}"
|
|
Text="{Binding}" />
|
|
</Border>
|
|
</DataTemplate>
|
|
</ItemsRepeater.ItemTemplate>
|
|
</ItemsRepeater>
|
|
</Grid>
|
|
|
|
<Grid Grid.Row="3">
|
|
<Grid
|
|
IsVisible="{Binding AppState.ViewMode^, Converter={StaticResource EqualityConverter}, ConverterParameter=RapidTravel}"
|
|
RowDefinitions="1,Auto">
|
|
|
|
<Rectangle
|
|
Height="1"
|
|
Margin="10,0"
|
|
HorizontalAlignment="Stretch"
|
|
VerticalAlignment="Center"
|
|
Fill="{DynamicResource ContentSeparatorBrush}" />
|
|
|
|
<StackPanel
|
|
Grid.Row="1"
|
|
Margin="30,10,10,10"
|
|
Orientation="Horizontal">
|
|
|
|
<TextBlock
|
|
Margin="0,0,30,0"
|
|
Text="Rapid travel mode" />
|
|
|
|
<TextBlock Text="Filter " />
|
|
|
|
<TextBlock Text="{Binding AppState.RapidTravelText}" />
|
|
</StackPanel>
|
|
</Grid>
|
|
|
|
<Grid IsVisible="{Binding AppState.PossibleCommands.Count, Converter={StaticResource NotEqualsConverter}, ConverterParameter=0}">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="1" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<Rectangle
|
|
Height="1"
|
|
Margin="10,0"
|
|
HorizontalAlignment="Stretch"
|
|
VerticalAlignment="Center"
|
|
Fill="{DynamicResource ContentSeparatorBrush}" />
|
|
|
|
<ItemsRepeater
|
|
Grid.Row="1"
|
|
Items="{Binding AppState.PossibleCommands}">
|
|
<ItemsRepeater.ItemTemplate>
|
|
<DataTemplate x:DataType="config:CommandBindingConfiguration">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="200" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<TextBlock Text="{Binding KeysDisplayText}" />
|
|
<TextBlock
|
|
Grid.Column="1"
|
|
Text="{Binding Command, Converter={StaticResource CommandToCommandNameConverter}}" />
|
|
</Grid>
|
|
</DataTemplate>
|
|
</ItemsRepeater.ItemTemplate>
|
|
</ItemsRepeater>
|
|
</Grid>
|
|
</Grid>
|
|
</Grid>
|
|
</Grid>
|
|
|
|
<Border
|
|
HorizontalAlignment="Stretch"
|
|
VerticalAlignment="Stretch"
|
|
Background="{DynamicResource BarelyTransparentBackgroundColor}"
|
|
IsVisible="{Binding DialogService.ReadInput^, Converter={x:Static ObjectConverters.IsNotNull}}">
|
|
<Border
|
|
Padding="20"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Background="{DynamicResource ContainerBackgroundBrush}">
|
|
<Grid RowDefinitions="Auto,Auto">
|
|
|
|
<ItemsControl
|
|
x:Name="InputList"
|
|
Items="{Binding DialogService.ReadInput^.Inputs}">
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate>
|
|
<Grid
|
|
x:Name="ItemRoot"
|
|
MinWidth="500"
|
|
Margin="10,5"
|
|
ColumnDefinitions="250,*">
|
|
<TextBlock
|
|
HorizontalAlignment="Left"
|
|
VerticalAlignment="Top"
|
|
Text="{Binding Label}" />
|
|
<Grid Grid.Column="1">
|
|
<TextBox
|
|
VerticalAlignment="Top"
|
|
x:DataType="interactions:TextInputElement"
|
|
IsVisible="{Binding Type, Converter={StaticResource EqualityConverter}, ConverterParameter={x:Static interactions:InputType.Text}}"
|
|
Text="{Binding Value, Mode=TwoWay}" />
|
|
<TextBox
|
|
VerticalAlignment="Top"
|
|
x:DataType="interactions:PasswordInputElement"
|
|
IsVisible="{Binding Type, Converter={StaticResource EqualityConverter}, ConverterParameter={x:Static interactions:InputType.Password}}"
|
|
PasswordChar="{Binding PasswordChar}"
|
|
Text="{Binding Value, Mode=TwoWay}" />
|
|
<ListBox
|
|
x:DataType="interactions:IOptionsInputElement"
|
|
Classes="RadioButtonListBox"
|
|
IsVisible="{Binding Type, Converter={StaticResource EqualityConverter}, ConverterParameter={x:Static interactions:InputType.Options}}"
|
|
Items="{Binding Options}"
|
|
SelectedItem="{Binding Value}" />
|
|
</Grid>
|
|
</Grid>
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
<StackPanel
|
|
DataContext="{Binding DialogService.ReadInput^}"
|
|
Grid.Row="1"
|
|
Margin="0,10,0,0"
|
|
Orientation="Horizontal">
|
|
<Button
|
|
Width="80"
|
|
HorizontalContentAlignment="Center"
|
|
Command="{Binding ProcessCommand}"
|
|
Content="Ok" />
|
|
<Button
|
|
Width="80"
|
|
Margin="10,0,0,0"
|
|
HorizontalContentAlignment="Center"
|
|
Command="{Binding CancelCommand}"
|
|
Content="Cancel" />
|
|
</StackPanel>
|
|
</Grid>
|
|
</Border>
|
|
</Border>
|
|
|
|
<Border
|
|
DataContext="{Binding DialogService.LastMessageBox^}"
|
|
HorizontalAlignment="Stretch"
|
|
VerticalAlignment="Stretch"
|
|
Background="{DynamicResource BarelyTransparentBackgroundColor}"
|
|
IsVisible="{Binding Converter={x:Static ObjectConverters.IsNotNull}, FallbackValue=False}">
|
|
<Border
|
|
Padding="20"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Background="{DynamicResource ContainerBackgroundBrush}">
|
|
<Grid RowDefinitions="Auto,Auto">
|
|
|
|
<TextBlock Text="{Binding Text}" />
|
|
<StackPanel
|
|
Grid.Row="1"
|
|
Margin="0,10,0,0"
|
|
Orientation="Horizontal">
|
|
<Button
|
|
Width="80"
|
|
HorizontalContentAlignment="Center"
|
|
Command="{Binding OkCommand}"
|
|
Content="Yes" />
|
|
<Button
|
|
Width="80"
|
|
Margin="10,0,0,0"
|
|
HorizontalContentAlignment="Center"
|
|
Command="{Binding CancelCommand}"
|
|
Content="No" />
|
|
</StackPanel>
|
|
</Grid>
|
|
</Border>
|
|
</Border>
|
|
|
|
<Border
|
|
DataContext="{Binding FrequencyNavigationService.CurrentModal}"
|
|
Margin="100"
|
|
HorizontalAlignment="Stretch"
|
|
VerticalAlignment="Stretch"
|
|
Background="{DynamicResource BarelyTransparentBackgroundColor}"
|
|
IsVisible="{Binding ShowWindow^, FallbackValue=False}">
|
|
<local:FrequencyNavigation />
|
|
</Border>
|
|
</Grid>
|
|
|
|
<Grid IsVisible="{Binding Loading}">
|
|
<StackPanel
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center">
|
|
<Image
|
|
Width="128"
|
|
Height="128"
|
|
Source="/Assets/filetime.ico" />
|
|
<TextBlock
|
|
Margin="50"
|
|
HorizontalAlignment="Center"
|
|
Text="Loading..." />
|
|
</StackPanel>
|
|
</Grid>
|
|
</Grid>
|
|
</Window> |