Skip to content
This repository was archived by the owner on Feb 10, 2025. It is now read-only.
Open

Mhar #10

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions BackupNow/BackupNow.Model/AppSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public class BackupItem
public string Source { get; set; }
public string Destination { get; set; }
public bool Enabled { get; set; } = true;
public bool IsYearFolder { get; set; }
}

public class AppSettings
Expand Down
7 changes: 6 additions & 1 deletion BackupNow/BackupNow.Model/Item.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@ public class Item
public string SourcePath { get; set; }
public string SourceFilePath { get; set; }
public string DestinationPath { get; set; }
public long NewSize { get; set; }
public long NewChange { get; set; }
public int Progress { get; set; }

public override string ToString()
{
return "Source: " + SourcePath + " Destination: " + DestinationPath;
}
}
}
10 changes: 6 additions & 4 deletions BackupNow/BackupNow/BackupNow.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,13 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Autofac" Version="6.4.0" />
<PackageReference Include="Autofac" Version="7.0.0" />
<PackageReference Include="DotNetZip" Version="1.16.0" />
<PackageReference Include="MaterialDesignThemes" Version="4.5.0" />
<PackageReference Include="ModernWpfUI" Version="0.9.5" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="MaterialDesignThemes" Version="4.8.0" />
<PackageReference Include="Microsoft.ApplicationInsights" Version="2.21.0" />
<PackageReference Include="ModernWpfUI" Version="0.9.6" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Pri.LongPath" Version="2.0.53" />
<PackageReference Include="Prism.Core" Version="8.1.97" />
</ItemGroup>

Expand Down
20 changes: 15 additions & 5 deletions BackupNow/BackupNow/ControlPages/ScanPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@
Height="30"
Width="30"
Margin="0,0,10,0"/>
<Label Content="{Binding Message1}" FontSize="25" FontWeight="SemiBold" />
<Label Content="{Binding Message1}" FontSize="25" FontWeight="SemiBold" />
</ui:SimpleStackPanel>

<!--<Label Content="awefwe" FontSize="13" />-->
<TextBlock Text="{Binding ProgressMessage}" FontSize="13" TextTrimming="CharacterEllipsis" />
<TextBlock Text="{Binding ProgressMessage}" ToolTip="{Binding ProgressMessage}" FontSize="13" TextTrimming="CharacterEllipsis" />
</ui:SimpleStackPanel>

<Grid Grid.Row="2">
Expand All @@ -78,15 +78,25 @@
CanUserSortColumns="False"
CanUserReorderColumns="False">
<DataGrid.Columns>
<DataGridTextColumn IsReadOnly="True" Header="Name" Binding="{Binding FileName}" />
<!--<DataGridTextColumn IsReadOnly="True" Header="Name" Binding="{Binding FileName}" />-->
<DataGridTemplateColumn IsReadOnly="True" Header="Name">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<Border Padding="0,10" VerticalAlignment="Center" ToolTip="{Binding Path=SourcePath}" Background="Transparent">
<TextBlock Text="{Binding Path=FileName}" VerticalAlignment="Center" Margin="10,0"/>
</Border>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTemplateColumn Header="Progress" Width="*">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<ProgressBar Value="{Binding Progress}" Minimum="0" Maximum="100" Margin="10,0" />
<Border Padding="0,15" ToolTip="{Binding Path=DestinationPath}" Background="Transparent">
<ProgressBar Value="{Binding Progress}" Margin="10,0" Minimum="0" Maximum="100" VerticalAlignment="Center"/>
</Border>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>

<DataGridTemplateColumn Header="%" Width="60">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
Expand Down
5 changes: 5 additions & 0 deletions BackupNow/BackupNow/ControlPages/ScanPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,10 @@ public ScanPage()
InitializeComponent();
DataContext = Bootstrapper.Container.Resolve<ScanViewModel>();
}

private void DataGridTextColumn_Opened(object sender, System.Windows.RoutedEventArgs e)
{

}
}
}
Loading