Files
ReSync/MainWindow.xaml
2025-10-26 14:16:27 +01:00

139 lines
7.8 KiB
XML

<Window x:Class="ReSync.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:ReSync"
mc:Ignorable="d"
Title="MainWindow" Height="550" Width="800">
<Border Margin="5" BorderBrush="Black" BorderThickness="3" CornerRadius="5">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Image Grid.Row="0" Grid.Column="0" Height="80" HorizontalAlignment="Left" Source="pack://application:,,,/Resources/logo.png"/>
<StackPanel Grid.Row="0" Grid.Column="1" Orientation="Horizontal">
<Button Style="{StaticResource ToolbarButton}" Click="Scan_Phone_Click">
<StackPanel>
<Image Source="pack://application:,,,/Resources/phone.png" Width="35"/>
<TextBlock Text="Scan Phone"/>
</StackPanel>
</Button>
<Button Style="{StaticResource ToolbarButton}" Click="Sync_Files_Click">
<StackPanel>
<Image Source="pack://application:,,,/Resources/sync.png" Width="35"/>
<TextBlock Text="Sync Now"/>
</StackPanel>
</Button>
<Button Style="{StaticResource ToolbarButton}" Click="Settings_Click">
<StackPanel>
<Image Source="pack://application:,,,/Resources/settings.png" Width="35"/>
<TextBlock Text="Settings"/>
</StackPanel>
</Button>
<Button Style="{StaticResource ToolbarButton}" Click="Database_Click">
<StackPanel>
<Image Source="pack://application:,,,/Resources/database.png" Width="35"/>
<TextBlock Text="Database"/>
</StackPanel>
</Button>
<Button Style="{StaticResource ToolbarButton}" Click="Duplicates_Click">
<StackPanel>
<Image Source="pack://application:,,,/Resources/duplicates.png" Width="35"/>
<TextBlock Text="Duplicates"/>
</StackPanel>
</Button>
<Button Style="{StaticResource ToolbarButton}" Click="Logs_Click">
<StackPanel>
<Image Source="pack://application:,,,/Resources/logs.png" Width="35"/>
<TextBlock Text="Logs"/>
</StackPanel>
</Button>
</StackPanel><!-- Toolbar End -->
<Border BorderBrush="Black" BorderThickness="1.5" Grid.ColumnSpan="2" Grid.Row="1"/>
<StackPanel Grid.Row="2" Grid.ColumnSpan="2" Orientation="Horizontal">
<StackPanel>
<TextBlock Text="Folders" Style="{StaticResource HeadingText}"/>
<StackPanel Orientation="Horizontal">
<Image Source="pack://application:,,,/Resources/phone.png" Width="32" Height="32"/>
<StackPanel>
<TextBlock Text="Phone:"/>
<ComboBox Width="180" ItemsSource="{Binding DevicesNameList}" SelectedItem="{Binding SelectedDevice, Mode=TwoWay}" Height="35" Margin="5,0,5,0"/>
</StackPanel>
<Button Content="Refresh" Click="Refresh_Phone_Click" Height="40" Width="68"/>
</StackPanel>
<StackPanel Orientation="Horizontal">
<Image Source="pack://application:,,,/Resources/folder.png" Width="32" Height="32"/>
<StackPanel Height="66.28">
<TextBlock Text="Backup Folder:"/>
<TextBlock Text="{Binding BackupFolderPath}" Style="{StaticResource FolderPathText}"/>
</StackPanel>
<Button Content="Change" Click="Change_Backup_Click" Height="40" Width="68"/>
</StackPanel>
<StackPanel Orientation="Horizontal">
<Image Source="pack://application:,,,/Resources/folder.png" Width="32" Height="32"/>
<StackPanel Height="66.28">
<TextBlock Text="Encoded Output Folder:"/>
<TextBlock Text="{Binding EncodedOutputFolderPath}" Style="{StaticResource FolderPathText}"/>
</StackPanel>
<Button Content="Change" Click="Change_Encoded_Click" Height="40" Width="68"/>
</StackPanel>
<Button Content="Rescan Folder" Click="Rescan_Click"/>
</StackPanel>
<Border BorderThickness="1.5" BorderBrush="Black" />
<StackPanel>
<TextBlock Text="Status" Style="{StaticResource HeadingText}"/>
<StackPanel Orientation="Horizontal" Style="{StaticResource StatusElement}">
<TextBlock Text="Phone connected:"/>
<TextBlock Text="{Binding PhoneConnected}"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Style="{StaticResource StatusElement}">
<TextBlock Text="New Files:"/>
<TextBlock Text="None" />
</StackPanel>
<StackPanel Orientation="Horizontal" Style="{StaticResource StatusElement}">
<TextBlock Text="Backups Pending:"/>
<TextBlock Text="None" />
</StackPanel>
<StackPanel Orientation="Horizontal" Style="{StaticResource StatusElement}">
<TextBlock Text="Encodings Pending:"/>
<TextBlock Text="None" />
</StackPanel>
<StackPanel Orientation="Horizontal" Style="{StaticResource StatusElement}">
<TextBlock Text="Last Sync:"/>
<TextBlock Text="Never" />
</StackPanel>
<StackPanel Orientation="Horizontal" Style="{StaticResource StatusElement}">
<TextBlock Text="DB Entries:"/>
<TextBlock Text="None" />
</StackPanel>
<Button Click="Start_Click">
<StackPanel Orientation="Horizontal">
<ProgressBar Width="150" Height="15" Margin="5" Value="0" Maximum="100"/>
<TextBlock Text="Start Sync" Margin="5"/>
</StackPanel>
</Button>
</StackPanel>
</StackPanel>
<Border BorderBrush="Black" BorderThickness="1.5" Grid.Row="3" Grid.ColumnSpan="2"/>
<Grid Grid.Row="4" Grid.ColumnSpan="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="Idle"/>
<Button Content="Pause / Stop" Click="Stop_Click" Margin="5"/>
</Grid>
</Grid>
</Border>
</Window>