Skip to content

Commit

Permalink
v1.5.1.8
Browse files Browse the repository at this point in the history
  • Loading branch information
RevoLand committed Jun 27, 2019
1 parent 5c6cc73 commit e3468a3
Show file tree
Hide file tree
Showing 15 changed files with 191 additions and 1,074 deletions.
Binary file modified Binaries/Steam Library Manager.exe
Binary file not shown.
2 changes: 1 addition & 1 deletion Binaries/Version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.5.1.6|Minor fixes
1.5.1.8|Improvements
4 changes: 2 additions & 2 deletions Binaries/Version.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<item>
<version>1.5.1.7</version>
<url>http://github.com/RevoLand/Steam-Library-Manager/releases/download/v1.5.1.7/Steam.Library.Manager.zip</url>
<version>1.5.1.8</version>
<url>http://github.com/RevoLand/Steam-Library-Manager/releases/download/v1.5.1.8/Steam.Library.Manager.zip</url>
<changelog>https://github.com/RevoLand/Steam-Library-Manager/releases</changelog>
<mandatory>false</mandatory>
</item>
10 changes: 5 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,23 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).

## [Unreleased]

## [1.5.1.8] - 2019-06-21
## [1.5.1.8] - 2019-06-27

### Added

- Auto clear completed tasks
- Ability to Ignore Junks (Library Cleaner Items)
- Ability to Ignore Junks (in Library Cleaner)
- Compact Status Detection On/Off switch (default off for better performance)

### Changed

- UI Improvements:
- Tooltips
- Tooltips (Translation keys for tooltips will be added later.)
- Library Cleaner: Reason why junk
- Library type logo in library panel
- Replace "Create Library" button with "Create Library / Remove Library / Refresh Library" buttons
- Loading of Origin header images (Load from/save as "appid".jpg rather than a complicated store page id or whatsoever)
- Updated translations ([Crowdin](https://crowdin.com/project/steam-library-manager) for translation)

## [1.5.1.7] - 2019-05-31

Expand Down
2 changes: 1 addition & 1 deletion Source/Steam Library Manager/Definitions/SLM.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace Steam_Library_Manager.Definitions
{
// Definitions about Steam Library Manager (SLM)
// Definitions related to Steam Library Manager (SLM)
public static class SLM
{
public static Library CurrentSelectedLibrary;
Expand Down
31 changes: 13 additions & 18 deletions Source/Steam Library Manager/Forms/AppView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@
<ContextMenu ItemsSource="{Binding ContextMenuElements}" BorderThickness="0" />
</Grid.ContextMenu>
<!-- App Header Image -->
<CachedImage:Image HorizontalAlignment="Left" Margin="2" Stretch="Fill" ImageUrl="{Binding GameHeaderImage}" Tag="slm">
<CachedImage:Image HorizontalAlignment="Left" Margin="2" Stretch="Fill" ImageUrl="{Binding GameHeaderImage}">
<CachedImage:Image.Effect>
<DropShadowEffect Direction="130" ShadowDepth="1" BlurRadius="3" />
</CachedImage:Image.Effect>
<CachedImage:Image.Style>
<Style TargetType="CachedImage:Image">
<Setter Property="Width" Value="230px"></Setter>
<Setter Property="Height" Value="107px"></Setter>
<Setter Property="Width" Value="230px" />
<Setter Property="Height" Value="107px" />
<Style.Triggers>
<DataTrigger Binding="{Binding Library.Type}" Value="Origin">
<Setter Property="Tag" Value="origin"></Setter>
<Setter Property="Width" Value="116px"></Setter>
<Setter Property="Height" Value="163px"></Setter>
<Setter Property="Tag" Value="origin" />
<Setter Property="Width" Value="116px" />
<Setter Property="Height" Value="163px" />
</DataTrigger>
</Style.Triggers>
</Style>
Expand All @@ -40,14 +40,15 @@
<Grid>
<Grid.Style>
<Style TargetType="Grid">
<Setter Property="Margin" Value="240, 0, 0, 0"></Setter>
<Setter Property="Margin" Value="240, 0, 0, 0" />
<Style.Triggers>
<DataTrigger Binding="{Binding Library.Type}" Value="Origin">
<Setter Property="Margin" Value="125, 0, 0, 0"></Setter>
<Setter Property="Margin" Value="125, 0, 0, 0" />
</DataTrigger>
</Style.Triggers>
</Style>
</Grid.Style>

<!-- App Name -->
<TextBlock Text="{Binding AppName}" TextWrapping="Wrap" FontSize="14" />

Expand Down Expand Up @@ -142,18 +143,12 @@
<ContentControl.Style>
<Style TargetType="{x:Type ContentControl}">
<Style.Triggers>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{SLM:SettingBinding LibraryStyle}" Value="Grid" />
</MultiDataTrigger.Conditions>
<DataTrigger Binding="{SLM:SettingBinding LibraryStyle}" Value="Grid">
<Setter Property="ContentTemplate" Value="{StaticResource GridView}" />
</MultiDataTrigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{SLM:SettingBinding LibraryStyle}" Value="Listview" />
</MultiDataTrigger.Conditions>
</DataTrigger>
<DataTrigger Binding="{SLM:SettingBinding LibraryStyle}" Value="Listview">
<Setter Property="ContentTemplate" Value="{StaticResource ListView}" />
</MultiDataTrigger>
</DataTrigger>
</Style.Triggers>
</Style>
</ContentControl.Style>
Expand Down
68 changes: 33 additions & 35 deletions Source/Steam Library Manager/Forms/LibraryView.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,13 @@ private async void LibraryGrid_Drop(object sender, DragEventArgs e)
{
try
{
var Library = ((Grid)sender).DataContext as Definitions.Library;

if (Main.FormAccessor.AppView.AppPanel.SelectedItems.Count == 0 || Library == null)
if (Main.FormAccessor.AppView.AppPanel.SelectedItems.Count == 0 || !(((Grid)sender).DataContext is Definitions.Library library))
{
return;
}

Library.DirectoryInfo.Refresh();
if (!Library.DirectoryInfo.Exists)
library.DirectoryInfo.Refresh();
if (!library.DirectoryInfo.Exists)
{
return;
}
Expand All @@ -45,43 +43,43 @@ private async void LibraryGrid_Drop(object sender, DragEventArgs e)
}
else
{
if (Library == App.Library || Library.Type == Definitions.Enums.LibraryType.Origin)
if (library == App.Library || library.Type == Definitions.Enums.LibraryType.Origin)
{
continue;
}

if (Functions.TaskManager.TaskList.Count(x => x.App == App && x.TargetLibrary == Library && !x.Completed) == 0)
if (Functions.TaskManager.TaskList.Count(x => x.App == App && x.TargetLibrary == library && !x.Completed) == 0)
{
Functions.TaskManager.AddTask(new Definitions.List.TaskInfo
{
App = App,
TargetLibrary = Library,
TargetLibrary = library,
TaskType = Definitions.Enums.TaskType.Copy
});
}
else
{
await Main.FormAccessor.ShowMessageAsync(Functions.SLM.Translate(nameof(Properties.Resources.TaskManager_AlreadyTasked)), Framework.StringFormat.Format(Functions.SLM.Translate(nameof(Properties.Resources.TaskManager_AlreadyTaskedMessage)), new { App.AppName, LibraryFullPath = Library.DirectoryInfo.FullName })).ConfigureAwait(false);
await Main.FormAccessor.ShowMessageAsync(Functions.SLM.Translate(nameof(Properties.Resources.TaskManager_AlreadyTasked)), Framework.StringFormat.Format(Functions.SLM.Translate(nameof(Properties.Resources.TaskManager_AlreadyTaskedMessage)), new { App.AppName, LibraryFullPath = library.DirectoryInfo.FullName })).ConfigureAwait(false);
}
}
}
else if (App is Definitions.OriginAppInfo)
{
if (Library == App.Library || Library.Type != Definitions.Enums.LibraryType.Origin)
if (library == App.Library || library.Type != Definitions.Enums.LibraryType.Origin)
continue;

if (Functions.TaskManager.TaskList.Count(x => x.App == App && x.TargetLibrary == Library && !x.Completed) == 0)
if (Functions.TaskManager.TaskList.Count(x => x.App == App && x.TargetLibrary == library && !x.Completed) == 0)
{
Functions.TaskManager.AddTask(new Definitions.List.TaskInfo
{
App = App,
TargetLibrary = Library,
TargetLibrary = library,
TaskType = Definitions.Enums.TaskType.Copy
});
}
else
{
await Main.FormAccessor.ShowMessageAsync(Functions.SLM.Translate(nameof(Properties.Resources.TaskManager_AlreadyTasked)), Framework.StringFormat.Format(Functions.SLM.Translate(nameof(Properties.Resources.TaskManager_AlreadyTaskedMessage)), new { App.AppName, LibraryFullPath = Library.DirectoryInfo.FullName })).ConfigureAwait(false);
await Main.FormAccessor.ShowMessageAsync(Functions.SLM.Translate(nameof(Properties.Resources.TaskManager_AlreadyTasked)), Framework.StringFormat.Format(Functions.SLM.Translate(nameof(Properties.Resources.TaskManager_AlreadyTaskedMessage)), new { App.AppName, LibraryFullPath = library.DirectoryInfo.FullName })).ConfigureAwait(false);
}
}
}
Expand All @@ -101,20 +99,20 @@ private async void LibraryPanel_Drop(object sender, DragEventArgs e)
{
try
{
var DroppedItems = (string[])e.Data.GetData(DataFormats.FileDrop, false);
var droppedItems = (string[])e.Data.GetData(DataFormats.FileDrop, false);

if (DroppedItems == null)
if (droppedItems == null)
{
return;
}

foreach (var DroppedItem in DroppedItems)
foreach (var droppedItem in droppedItems)
{
var Info = new DirectoryInfo(DroppedItem);
var info = new DirectoryInfo(droppedItem);

if ((Info.Attributes & FileAttributes.Directory) != 0)
if ((info.Attributes & FileAttributes.Directory) != 0)
{
await CreateLibraryAsync(Info.FullName).ConfigureAwait(false);
await CreateLibraryAsync(info.FullName).ConfigureAwait(false);
}
}
}
Expand All @@ -124,25 +122,25 @@ private async void LibraryPanel_Drop(object sender, DragEventArgs e)
}
}

private async System.Threading.Tasks.Task CreateLibraryAsync(string LibraryPath)
private async System.Threading.Tasks.Task CreateLibraryAsync(string libraryPath)
{
var LibraryDialog = await Main.FormAccessor.ShowMessageAsync(Functions.SLM.Translate(nameof(Properties.Resources.CreateLibraryDialog)), Framework.StringFormat.Format(Functions.SLM.Translate(nameof(Properties.Resources.CreateLibraryDialogMessage)), new { LibraryPath }), MessageDialogStyle.AffirmativeAndNegativeAndDoubleAuxiliary, new MetroDialogSettings
var libraryDialog = await Main.FormAccessor.ShowMessageAsync(Functions.SLM.Translate(nameof(Properties.Resources.CreateLibraryDialog)), Framework.StringFormat.Format(Functions.SLM.Translate(nameof(Properties.Resources.CreateLibraryDialogMessage)), new { LibraryPath = libraryPath }), MessageDialogStyle.AffirmativeAndNegativeAndDoubleAuxiliary, new MetroDialogSettings
{
AffirmativeButtonText = Functions.SLM.Translate(nameof(Properties.Resources.Forms_Steam)),
NegativeButtonText = Functions.SLM.Translate(nameof(Properties.Resources.Forms_SLM)),
FirstAuxiliaryButtonText = Functions.SLM.Translate(nameof(Properties.Resources.Forms_Origin)),
SecondAuxiliaryButtonText = Functions.SLM.Translate(nameof(Properties.Resources.Forms_Cancel))
}).ConfigureAwait(false);

switch (LibraryDialog)
switch (libraryDialog)
{
// Steam
case MessageDialogResult.Affirmative:
if (!Functions.Steam.Library.IsLibraryExists(LibraryPath))
if (!Functions.Steam.Library.IsLibraryExists(libraryPath))
{
if (Directory.GetDirectoryRoot(LibraryPath) != LibraryPath)
if (Directory.GetDirectoryRoot(libraryPath) != libraryPath)
{
Functions.Steam.Library.CreateNew(LibraryPath, false);
Functions.Steam.Library.CreateNew(libraryPath, false);
}
else
{
Expand All @@ -151,16 +149,16 @@ private async System.Threading.Tasks.Task CreateLibraryAsync(string LibraryPath)
}
else
{
await Main.FormAccessor.ShowMessageAsync(Functions.SLM.Translate(nameof(Properties.Resources.CreateLibrary_Exists)), Framework.StringFormat.Format(Functions.SLM.Translate(nameof(Properties.Resources.CreateLibrary_ExistsMessage)), new { LibraryPath })).ConfigureAwait(false);
await Main.FormAccessor.ShowMessageAsync(Functions.SLM.Translate(nameof(Properties.Resources.CreateLibrary_Exists)), Framework.StringFormat.Format(Functions.SLM.Translate(nameof(Properties.Resources.CreateLibrary_ExistsMessage)), new { LibraryPath = libraryPath })).ConfigureAwait(false);
}
break;
// SLM
case MessageDialogResult.Negative:
if (!Functions.SLM.Library.IsLibraryExists(LibraryPath))
if (!Functions.SLM.Library.IsLibraryExists(libraryPath))
{
if (Directory.GetDirectoryRoot(LibraryPath) != LibraryPath)
if (Directory.GetDirectoryRoot(libraryPath) != libraryPath)
{
Functions.SLM.Library.AddNewAsync(LibraryPath);
Functions.SLM.Library.AddNewAsync(libraryPath);
}
else
{
Expand All @@ -169,16 +167,16 @@ private async System.Threading.Tasks.Task CreateLibraryAsync(string LibraryPath)
}
else
{
await Main.FormAccessor.ShowMessageAsync(Functions.SLM.Translate(nameof(Properties.Resources.CreateLibrary_Exists)), Framework.StringFormat.Format(Functions.SLM.Translate(nameof(Properties.Resources.CreateLibrary_ExistsMessage)), new { LibraryPath })).ConfigureAwait(false);
await Main.FormAccessor.ShowMessageAsync(Functions.SLM.Translate(nameof(Properties.Resources.CreateLibrary_Exists)), Framework.StringFormat.Format(Functions.SLM.Translate(nameof(Properties.Resources.CreateLibrary_ExistsMessage)), new { LibraryPath = libraryPath })).ConfigureAwait(false);
}
break;
// Origin
case MessageDialogResult.FirstAuxiliary:
if (!Functions.Origin.IsLibraryExists(LibraryPath))
if (!Functions.Origin.IsLibraryExists(libraryPath))
{
if (Directory.GetDirectoryRoot(LibraryPath) != LibraryPath)
if (Directory.GetDirectoryRoot(libraryPath) != libraryPath)
{
Functions.Origin.AddNewAsync(LibraryPath);
Functions.Origin.AddNewAsync(libraryPath);
}
else
{
Expand All @@ -187,7 +185,7 @@ private async System.Threading.Tasks.Task CreateLibraryAsync(string LibraryPath)
}
else
{
await Main.FormAccessor.ShowMessageAsync(Functions.SLM.Translate(nameof(Properties.Resources.CreateLibrary_Exists)), Framework.StringFormat.Format(Functions.SLM.Translate(nameof(Properties.Resources.CreateLibrary_ExistsMessage)), new { LibraryPath })).ConfigureAwait(false);
await Main.FormAccessor.ShowMessageAsync(Functions.SLM.Translate(nameof(Properties.Resources.CreateLibrary_Exists)), Framework.StringFormat.Format(Functions.SLM.Translate(nameof(Properties.Resources.CreateLibrary_ExistsMessage)), new { LibraryPath = libraryPath })).ConfigureAwait(false);
}
break;
}
Expand All @@ -209,7 +207,7 @@ private void LibraryGrid_MouseDown(object sender, SelectionChangedEventArgs e)
Functions.SLM.Library.UpdateLibrary(Definitions.SLM.CurrentSelectedLibrary);
}

// Update games list from current selection
// Update app panel with selected library
Functions.App.UpdateAppPanel(Definitions.SLM.CurrentSelectedLibrary);
}
catch (Exception ex)
Expand Down
Loading

0 comments on commit e3468a3

Please sign in to comment.