-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added Notification + Option to restart on plugin crash - Added plugin labels #133 - Added ToolTips to UI icons #130 - Added install destination folder in confirmation popup message #129 (Squirrel.Windows) - Added cancel button + reset in Collection Selection #117 - Added a setup step to import collections from supermemo.ini #73 - Added CfgBase with reset on cancel - Added automatic version configuration - Added more documentation - Several other minor updates
- Loading branch information
Showing
59 changed files
with
2,224 additions
and
148 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule PluginManager
updated
5 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
84 changes: 84 additions & 0 deletions
84
src/AppHosts/SuperMemoAssistant/Setup/Models/SMImportCollection.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
#region License & Metadata | ||
|
||
// The MIT License (MIT) | ||
// | ||
// Permission is hereby granted, free of charge, to any person obtaining a | ||
// copy of this software and associated documentation files (the "Software"), | ||
// to deal in the Software without restriction, including without limitation | ||
// the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
// and/or sell copies of the Software, and to permit persons to whom the | ||
// Software is furnished to do so, subject to the following conditions: | ||
// | ||
// The above copyright notice and this permission notice shall be included in | ||
// all copies or substantial portions of the Software. | ||
// | ||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||
// DEALINGS IN THE SOFTWARE. | ||
// | ||
// | ||
// Modified On: 2020/03/12 23:11 | ||
// Modified By: Alexis | ||
|
||
#endregion | ||
|
||
|
||
|
||
|
||
using System.ComponentModel; | ||
using System.IO; | ||
|
||
namespace SuperMemoAssistant.Setup.Models | ||
{ | ||
/// <summary>A container for the importable collections</summary> | ||
public class SMImportCollection : INotifyPropertyChanged | ||
{ | ||
#region Constructors | ||
|
||
public SMImportCollection(string collectionPath) | ||
{ | ||
Name = Path.GetFileName(collectionPath); | ||
CollectionPath = collectionPath; | ||
} | ||
|
||
#endregion | ||
|
||
|
||
|
||
|
||
#region Properties & Fields - Public | ||
|
||
public bool IsChecked { get; set; } = true; | ||
|
||
public bool IsEnabled { get; set; } = true; | ||
|
||
public string Name { get; set; } | ||
|
||
public string CollectionPath { get; set; } | ||
|
||
#endregion | ||
|
||
|
||
|
||
|
||
#region Methods | ||
|
||
public string GetKnoFilePath() => CollectionPath + ".kno"; | ||
|
||
#endregion | ||
|
||
|
||
|
||
|
||
#region Events | ||
|
||
/// <inheritdoc /> | ||
public event PropertyChangedEventHandler PropertyChanged; | ||
|
||
#endregion | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 65 additions & 0 deletions
65
src/AppHosts/SuperMemoAssistant/Setup/Screens/ImportCollections.xaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<setup:SMASetupScreenBase x:Class="SuperMemoAssistant.Setup.Screens.ImportCollections" | ||
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:setup="clr-namespace:SuperMemoAssistant.Setup" | ||
xmlns:models="clr-namespace:SuperMemoAssistant.Setup.Models" | ||
mc:Ignorable="d" | ||
DataContext="{Binding RelativeSource={RelativeSource Self}}"> | ||
<Grid> | ||
|
||
|
||
<ListBox Name="lbCollections" | ||
Grid.Row="0" | ||
HorizontalContentAlignment="Stretch" | ||
ItemsSource="{Binding Collections}" | ||
Grid.IsSharedSizeScope="True"> | ||
<ListBox.ItemTemplate> | ||
<DataTemplate DataType="{x:Type models:SMImportCollection}"> | ||
<Grid Margin="4"> | ||
<Grid.ColumnDefinitions> | ||
<ColumnDefinition Width="auto" /> | ||
<ColumnDefinition Width="auto" SharedSizeGroup="Name" /> | ||
<ColumnDefinition Width="5*" /> | ||
</Grid.ColumnDefinitions> | ||
|
||
<CheckBox Grid.Column="0" Margin="0 0 8 0" VerticalAlignment="Center" FontSize="14" | ||
IsEnabled="{Binding IsEnabled}" IsChecked="{Binding IsChecked}" /> | ||
<TextBlock Grid.Column="1" Margin="0 0 16 0" VerticalAlignment="Center" FontSize="14" Text="{Binding Name}" /> | ||
<TextBlock Grid.Column="2" Margin="0" VerticalAlignment="Center" FontSize="14" | ||
Text="{Binding CollectionPath}" /> | ||
</Grid> | ||
</DataTemplate> | ||
</ListBox.ItemTemplate> | ||
|
||
<ListBox.ItemContainerStyle> | ||
<Style TargetType="{x:Type ListBoxItem}"> | ||
<EventSetter Event="MouseDoubleClick" Handler="ListBoxItem_MouseDoubleClick" /> | ||
</Style> | ||
</ListBox.ItemContainerStyle> | ||
|
||
<ListBox.Style> | ||
<Style TargetType="{x:Type ListBox}"> | ||
<Style.Triggers> | ||
<!-- ReSharper disable once Xaml.BindingWithContextNotResolved --> | ||
<DataTrigger Binding="{Binding RelativeSource={x:Static RelativeSource.Self}, Path=Items.Count}" | ||
Value="0"> | ||
<Setter Property="Template"> | ||
<Setter.Value> | ||
<ControlTemplate> | ||
<TextBlock HorizontalAlignment="Center" | ||
VerticalAlignment="Center"> | ||
You don't appear to have created any collection in SuperMemo yet :-( | ||
</TextBlock> | ||
</ControlTemplate> | ||
</Setter.Value> | ||
</Setter> | ||
</DataTrigger> | ||
</Style.Triggers> | ||
</Style> | ||
</ListBox.Style> | ||
</ListBox> | ||
|
||
</Grid> | ||
</setup:SMASetupScreenBase> |
Oops, something went wrong.