diff --git a/SuperMemoAssistant.sln b/SuperMemoAssistant.sln index 7c6cada..799970c 100644 --- a/SuperMemoAssistant.sln +++ b/SuperMemoAssistant.sln @@ -108,224 +108,146 @@ Global src\Core\SuperMemoAssistant.PluginHost.Shared\SuperMemoAssistant.PluginHost.Shared.projitems*{fe47a14f-9157-4917-82fb-7861a57b1822}*SharedItemsImports = 13 EndGlobalSection GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU Debug|x86 = Debug|x86 - Debug-InProd|Any CPU = Debug-InProd|Any CPU Debug-InProd|x86 = Debug-InProd|x86 - Release|Any CPU = Release|Any CPU Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {C57D9489-0A27-4B18-818C-7CBB379ACFD8}.Debug|Any CPU.ActiveCfg = Debug|x86 {C57D9489-0A27-4B18-818C-7CBB379ACFD8}.Debug|x86.ActiveCfg = Debug|x86 {C57D9489-0A27-4B18-818C-7CBB379ACFD8}.Debug|x86.Build.0 = Debug|x86 - {C57D9489-0A27-4B18-818C-7CBB379ACFD8}.Debug-InProd|Any CPU.ActiveCfg = Debug-InProd|x86 {C57D9489-0A27-4B18-818C-7CBB379ACFD8}.Debug-InProd|x86.ActiveCfg = Debug-InProd|x86 {C57D9489-0A27-4B18-818C-7CBB379ACFD8}.Debug-InProd|x86.Build.0 = Debug-InProd|x86 - {C57D9489-0A27-4B18-818C-7CBB379ACFD8}.Release|Any CPU.ActiveCfg = Release|x86 {C57D9489-0A27-4B18-818C-7CBB379ACFD8}.Release|x86.ActiveCfg = Release|x86 {C57D9489-0A27-4B18-818C-7CBB379ACFD8}.Release|x86.Build.0 = Release|x86 - {7550628D-0630-4A42-B0B7-55D26F981365}.Debug|Any CPU.ActiveCfg = Debug|x86 {7550628D-0630-4A42-B0B7-55D26F981365}.Debug|x86.ActiveCfg = Debug|x86 {7550628D-0630-4A42-B0B7-55D26F981365}.Debug|x86.Build.0 = Debug|x86 - {7550628D-0630-4A42-B0B7-55D26F981365}.Debug-InProd|Any CPU.ActiveCfg = Debug-InProd|x86 {7550628D-0630-4A42-B0B7-55D26F981365}.Debug-InProd|x86.ActiveCfg = Debug-InProd|x86 {7550628D-0630-4A42-B0B7-55D26F981365}.Debug-InProd|x86.Build.0 = Debug-InProd|x86 - {7550628D-0630-4A42-B0B7-55D26F981365}.Release|Any CPU.ActiveCfg = Release|x86 {7550628D-0630-4A42-B0B7-55D26F981365}.Release|x86.ActiveCfg = Release|x86 {7550628D-0630-4A42-B0B7-55D26F981365}.Release|x86.Build.0 = Release|x86 - {FD0E1BE8-BED3-4AB0-A9C8-022A2DBC8450}.Debug|Any CPU.ActiveCfg = Debug|x86 {FD0E1BE8-BED3-4AB0-A9C8-022A2DBC8450}.Debug|x86.ActiveCfg = Debug|x86 {FD0E1BE8-BED3-4AB0-A9C8-022A2DBC8450}.Debug|x86.Build.0 = Debug|x86 - {FD0E1BE8-BED3-4AB0-A9C8-022A2DBC8450}.Debug-InProd|Any CPU.ActiveCfg = Debug-InProd|x86 {FD0E1BE8-BED3-4AB0-A9C8-022A2DBC8450}.Debug-InProd|x86.ActiveCfg = Debug-InProd|x86 {FD0E1BE8-BED3-4AB0-A9C8-022A2DBC8450}.Debug-InProd|x86.Build.0 = Debug-InProd|x86 - {FD0E1BE8-BED3-4AB0-A9C8-022A2DBC8450}.Release|Any CPU.ActiveCfg = Release|x86 {FD0E1BE8-BED3-4AB0-A9C8-022A2DBC8450}.Release|x86.ActiveCfg = Release|x86 {FD0E1BE8-BED3-4AB0-A9C8-022A2DBC8450}.Release|x86.Build.0 = Release|x86 - {D5086D5E-84A6-4C0D-B6F2-D1B82C5FB487}.Debug|Any CPU.ActiveCfg = Debug|x86 {D5086D5E-84A6-4C0D-B6F2-D1B82C5FB487}.Debug|x86.ActiveCfg = Debug|x86 {D5086D5E-84A6-4C0D-B6F2-D1B82C5FB487}.Debug|x86.Build.0 = Debug|x86 - {D5086D5E-84A6-4C0D-B6F2-D1B82C5FB487}.Debug-InProd|Any CPU.ActiveCfg = Debug-InProd|x86 {D5086D5E-84A6-4C0D-B6F2-D1B82C5FB487}.Debug-InProd|x86.ActiveCfg = Debug-InProd|x86 {D5086D5E-84A6-4C0D-B6F2-D1B82C5FB487}.Debug-InProd|x86.Build.0 = Debug-InProd|x86 - {D5086D5E-84A6-4C0D-B6F2-D1B82C5FB487}.Release|Any CPU.ActiveCfg = Release|x86 {D5086D5E-84A6-4C0D-B6F2-D1B82C5FB487}.Release|x86.ActiveCfg = Release|x86 {D5086D5E-84A6-4C0D-B6F2-D1B82C5FB487}.Release|x86.Build.0 = Release|x86 - {CD2988DA-B610-40AD-995A-AA5A28FBBBFE}.Debug|Any CPU.ActiveCfg = Debug|x86 {CD2988DA-B610-40AD-995A-AA5A28FBBBFE}.Debug|x86.ActiveCfg = Debug|x86 {CD2988DA-B610-40AD-995A-AA5A28FBBBFE}.Debug|x86.Build.0 = Debug|x86 - {CD2988DA-B610-40AD-995A-AA5A28FBBBFE}.Debug-InProd|Any CPU.ActiveCfg = Debug-InProd|x86 {CD2988DA-B610-40AD-995A-AA5A28FBBBFE}.Debug-InProd|x86.ActiveCfg = Debug-InProd|x86 {CD2988DA-B610-40AD-995A-AA5A28FBBBFE}.Debug-InProd|x86.Build.0 = Debug-InProd|x86 - {CD2988DA-B610-40AD-995A-AA5A28FBBBFE}.Release|Any CPU.ActiveCfg = Release|x86 {CD2988DA-B610-40AD-995A-AA5A28FBBBFE}.Release|x86.ActiveCfg = Release|x86 {CD2988DA-B610-40AD-995A-AA5A28FBBBFE}.Release|x86.Build.0 = Release|x86 - {FAECF9BB-9FD5-4FB1-A3A8-9F7CAA57A1FE}.Debug|Any CPU.ActiveCfg = Debug|x86 {FAECF9BB-9FD5-4FB1-A3A8-9F7CAA57A1FE}.Debug|x86.ActiveCfg = Debug|x86 {FAECF9BB-9FD5-4FB1-A3A8-9F7CAA57A1FE}.Debug|x86.Build.0 = Debug|x86 - {FAECF9BB-9FD5-4FB1-A3A8-9F7CAA57A1FE}.Debug-InProd|Any CPU.ActiveCfg = Debug-InProd|x86 {FAECF9BB-9FD5-4FB1-A3A8-9F7CAA57A1FE}.Debug-InProd|x86.ActiveCfg = Debug-InProd|x86 {FAECF9BB-9FD5-4FB1-A3A8-9F7CAA57A1FE}.Debug-InProd|x86.Build.0 = Debug-InProd|x86 - {FAECF9BB-9FD5-4FB1-A3A8-9F7CAA57A1FE}.Release|Any CPU.ActiveCfg = Release|x86 {FAECF9BB-9FD5-4FB1-A3A8-9F7CAA57A1FE}.Release|x86.ActiveCfg = Release|x86 {FAECF9BB-9FD5-4FB1-A3A8-9F7CAA57A1FE}.Release|x86.Build.0 = Release|x86 - {677647E4-F052-41D0-915A-AD76DA72463E}.Debug|Any CPU.ActiveCfg = Debug|x86 {677647E4-F052-41D0-915A-AD76DA72463E}.Debug|x86.ActiveCfg = Debug|x86 {677647E4-F052-41D0-915A-AD76DA72463E}.Debug|x86.Build.0 = Debug|x86 - {677647E4-F052-41D0-915A-AD76DA72463E}.Debug-InProd|Any CPU.ActiveCfg = Debug-InProd|x86 {677647E4-F052-41D0-915A-AD76DA72463E}.Debug-InProd|x86.ActiveCfg = Debug-InProd|x86 {677647E4-F052-41D0-915A-AD76DA72463E}.Debug-InProd|x86.Build.0 = Debug-InProd|x86 - {677647E4-F052-41D0-915A-AD76DA72463E}.Release|Any CPU.ActiveCfg = Release|x86 {677647E4-F052-41D0-915A-AD76DA72463E}.Release|x86.ActiveCfg = Release|x86 {677647E4-F052-41D0-915A-AD76DA72463E}.Release|x86.Build.0 = Release|x86 - {2E3DF5C2-8A38-4A03-86D7-8D463C917E47}.Debug|Any CPU.ActiveCfg = Debug|x86 {2E3DF5C2-8A38-4A03-86D7-8D463C917E47}.Debug|x86.ActiveCfg = Debug|x86 {2E3DF5C2-8A38-4A03-86D7-8D463C917E47}.Debug|x86.Build.0 = Debug|x86 - {2E3DF5C2-8A38-4A03-86D7-8D463C917E47}.Debug-InProd|Any CPU.ActiveCfg = Release|x86 - {2E3DF5C2-8A38-4A03-86D7-8D463C917E47}.Debug-InProd|Any CPU.Build.0 = Release|x86 {2E3DF5C2-8A38-4A03-86D7-8D463C917E47}.Debug-InProd|x86.ActiveCfg = Debug|x86 - {2E3DF5C2-8A38-4A03-86D7-8D463C917E47}.Release|Any CPU.ActiveCfg = Release|x86 {2E3DF5C2-8A38-4A03-86D7-8D463C917E47}.Release|x86.ActiveCfg = Release|x86 {2E3DF5C2-8A38-4A03-86D7-8D463C917E47}.Release|x86.Build.0 = Release|x86 - {88E22B47-FCF2-489F-B70F-EB0925E8AF87}.Debug|Any CPU.ActiveCfg = Debug|x86 {88E22B47-FCF2-489F-B70F-EB0925E8AF87}.Debug|x86.ActiveCfg = Debug|x86 {88E22B47-FCF2-489F-B70F-EB0925E8AF87}.Debug|x86.Build.0 = Debug|x86 - {88E22B47-FCF2-489F-B70F-EB0925E8AF87}.Debug-InProd|Any CPU.ActiveCfg = Debug-InProd|x86 {88E22B47-FCF2-489F-B70F-EB0925E8AF87}.Debug-InProd|x86.ActiveCfg = Debug-InProd|x86 {88E22B47-FCF2-489F-B70F-EB0925E8AF87}.Debug-InProd|x86.Build.0 = Debug-InProd|x86 - {88E22B47-FCF2-489F-B70F-EB0925E8AF87}.Release|Any CPU.ActiveCfg = Release|x86 {88E22B47-FCF2-489F-B70F-EB0925E8AF87}.Release|x86.ActiveCfg = Release|x86 {88E22B47-FCF2-489F-B70F-EB0925E8AF87}.Release|x86.Build.0 = Release|x86 - {F8BB6993-25DF-4173-BB3D-ACEE15C5A2B9}.Debug|Any CPU.ActiveCfg = Debug|x86 {F8BB6993-25DF-4173-BB3D-ACEE15C5A2B9}.Debug|x86.ActiveCfg = Debug|x86 {F8BB6993-25DF-4173-BB3D-ACEE15C5A2B9}.Debug|x86.Build.0 = Debug|x86 - {F8BB6993-25DF-4173-BB3D-ACEE15C5A2B9}.Debug-InProd|Any CPU.ActiveCfg = Debug-InProd|x86 {F8BB6993-25DF-4173-BB3D-ACEE15C5A2B9}.Debug-InProd|x86.ActiveCfg = Debug-InProd|x86 {F8BB6993-25DF-4173-BB3D-ACEE15C5A2B9}.Debug-InProd|x86.Build.0 = Debug-InProd|x86 - {F8BB6993-25DF-4173-BB3D-ACEE15C5A2B9}.Release|Any CPU.ActiveCfg = Release|x86 {F8BB6993-25DF-4173-BB3D-ACEE15C5A2B9}.Release|x86.ActiveCfg = Release|x86 {F8BB6993-25DF-4173-BB3D-ACEE15C5A2B9}.Release|x86.Build.0 = Release|x86 - {FFFE85EF-4719-4F7F-AB5F-A63D2E184BD2}.Debug|Any CPU.ActiveCfg = Debug|Win32 {FFFE85EF-4719-4F7F-AB5F-A63D2E184BD2}.Debug|x86.ActiveCfg = Release|Win32 {FFFE85EF-4719-4F7F-AB5F-A63D2E184BD2}.Debug|x86.Build.0 = Release|Win32 - {FFFE85EF-4719-4F7F-AB5F-A63D2E184BD2}.Debug-InProd|Any CPU.ActiveCfg = Debug-InProd|Win32 {FFFE85EF-4719-4F7F-AB5F-A63D2E184BD2}.Debug-InProd|x86.ActiveCfg = Release|Win32 {FFFE85EF-4719-4F7F-AB5F-A63D2E184BD2}.Debug-InProd|x86.Build.0 = Release|Win32 - {FFFE85EF-4719-4F7F-AB5F-A63D2E184BD2}.Release|Any CPU.ActiveCfg = Release|Win32 {FFFE85EF-4719-4F7F-AB5F-A63D2E184BD2}.Release|x86.ActiveCfg = Release|Win32 {FFFE85EF-4719-4F7F-AB5F-A63D2E184BD2}.Release|x86.Build.0 = Release|Win32 - {501257D3-F788-4A5D-B990-16C01FF71926}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {501257D3-F788-4A5D-B990-16C01FF71926}.Debug|Any CPU.Build.0 = Debug|Any CPU {501257D3-F788-4A5D-B990-16C01FF71926}.Debug|x86.ActiveCfg = Debug|x86 {501257D3-F788-4A5D-B990-16C01FF71926}.Debug|x86.Build.0 = Debug|x86 - {501257D3-F788-4A5D-B990-16C01FF71926}.Debug-InProd|Any CPU.ActiveCfg = Debug-InProd|Any CPU - {501257D3-F788-4A5D-B990-16C01FF71926}.Debug-InProd|Any CPU.Build.0 = Debug-InProd|Any CPU {501257D3-F788-4A5D-B990-16C01FF71926}.Debug-InProd|x86.ActiveCfg = Debug-InProd|x86 {501257D3-F788-4A5D-B990-16C01FF71926}.Debug-InProd|x86.Build.0 = Debug-InProd|x86 - {501257D3-F788-4A5D-B990-16C01FF71926}.Release|Any CPU.ActiveCfg = Release|Any CPU - {501257D3-F788-4A5D-B990-16C01FF71926}.Release|Any CPU.Build.0 = Release|Any CPU {501257D3-F788-4A5D-B990-16C01FF71926}.Release|x86.ActiveCfg = Release|x86 {501257D3-F788-4A5D-B990-16C01FF71926}.Release|x86.Build.0 = Release|x86 - {C76CFA78-F820-4F05-9429-4A3A3C9C1414}.Debug|Any CPU.ActiveCfg = Debug|x86 {C76CFA78-F820-4F05-9429-4A3A3C9C1414}.Debug|x86.ActiveCfg = Debug|x86 {C76CFA78-F820-4F05-9429-4A3A3C9C1414}.Debug|x86.Build.0 = Debug|x86 - {C76CFA78-F820-4F05-9429-4A3A3C9C1414}.Debug-InProd|Any CPU.ActiveCfg = Debug-InProd|x86 {C76CFA78-F820-4F05-9429-4A3A3C9C1414}.Debug-InProd|x86.ActiveCfg = Debug-InProd|x86 {C76CFA78-F820-4F05-9429-4A3A3C9C1414}.Debug-InProd|x86.Build.0 = Debug-InProd|x86 - {C76CFA78-F820-4F05-9429-4A3A3C9C1414}.Release|Any CPU.ActiveCfg = Release|x86 {C76CFA78-F820-4F05-9429-4A3A3C9C1414}.Release|x86.ActiveCfg = Release|x86 {C76CFA78-F820-4F05-9429-4A3A3C9C1414}.Release|x86.Build.0 = Release|x86 - {AA97C5AA-CA1A-4988-AE2E-E5A292B63C12}.Debug|Any CPU.ActiveCfg = Debug|x86 {AA97C5AA-CA1A-4988-AE2E-E5A292B63C12}.Debug|x86.ActiveCfg = Debug|x86 {AA97C5AA-CA1A-4988-AE2E-E5A292B63C12}.Debug|x86.Build.0 = Debug|x86 - {AA97C5AA-CA1A-4988-AE2E-E5A292B63C12}.Debug-InProd|Any CPU.ActiveCfg = Debug-InProd|x86 {AA97C5AA-CA1A-4988-AE2E-E5A292B63C12}.Debug-InProd|x86.ActiveCfg = Debug-InProd|x86 {AA97C5AA-CA1A-4988-AE2E-E5A292B63C12}.Debug-InProd|x86.Build.0 = Debug-InProd|x86 - {AA97C5AA-CA1A-4988-AE2E-E5A292B63C12}.Release|Any CPU.ActiveCfg = Release|x86 {AA97C5AA-CA1A-4988-AE2E-E5A292B63C12}.Release|x86.ActiveCfg = Release|x86 {AA97C5AA-CA1A-4988-AE2E-E5A292B63C12}.Release|x86.Build.0 = Release|x86 - {CC5B9485-9EF1-4133-9242-719D263700AE}.Debug|Any CPU.ActiveCfg = Debug|x86 {CC5B9485-9EF1-4133-9242-719D263700AE}.Debug|x86.ActiveCfg = Debug|x86 {CC5B9485-9EF1-4133-9242-719D263700AE}.Debug|x86.Build.0 = Debug|x86 - {CC5B9485-9EF1-4133-9242-719D263700AE}.Debug-InProd|Any CPU.ActiveCfg = Debug-InProd|x86 {CC5B9485-9EF1-4133-9242-719D263700AE}.Debug-InProd|x86.ActiveCfg = Debug-InProd|x86 {CC5B9485-9EF1-4133-9242-719D263700AE}.Debug-InProd|x86.Build.0 = Debug-InProd|x86 - {CC5B9485-9EF1-4133-9242-719D263700AE}.Release|Any CPU.ActiveCfg = Release|x86 {CC5B9485-9EF1-4133-9242-719D263700AE}.Release|x86.ActiveCfg = Release|x86 {CC5B9485-9EF1-4133-9242-719D263700AE}.Release|x86.Build.0 = Release|x86 - {149C5A9B-0588-41B9-8F77-C5D17A1CDFBE}.Debug|Any CPU.ActiveCfg = Debug|x86 {149C5A9B-0588-41B9-8F77-C5D17A1CDFBE}.Debug|x86.ActiveCfg = Debug|x86 {149C5A9B-0588-41B9-8F77-C5D17A1CDFBE}.Debug|x86.Build.0 = Debug|x86 - {149C5A9B-0588-41B9-8F77-C5D17A1CDFBE}.Debug-InProd|Any CPU.ActiveCfg = Debug-InProd|x86 {149C5A9B-0588-41B9-8F77-C5D17A1CDFBE}.Debug-InProd|x86.ActiveCfg = Debug-InProd|x86 {149C5A9B-0588-41B9-8F77-C5D17A1CDFBE}.Debug-InProd|x86.Build.0 = Debug-InProd|x86 - {149C5A9B-0588-41B9-8F77-C5D17A1CDFBE}.Release|Any CPU.ActiveCfg = Release|x86 {149C5A9B-0588-41B9-8F77-C5D17A1CDFBE}.Release|x86.ActiveCfg = Release|x86 {149C5A9B-0588-41B9-8F77-C5D17A1CDFBE}.Release|x86.Build.0 = Release|x86 - {380A4F46-413D-49B4-884F-21C7683F093C}.Debug|Any CPU.ActiveCfg = Debug|x86 {380A4F46-413D-49B4-884F-21C7683F093C}.Debug|x86.ActiveCfg = Debug|x86 {380A4F46-413D-49B4-884F-21C7683F093C}.Debug|x86.Build.0 = Debug|x86 - {380A4F46-413D-49B4-884F-21C7683F093C}.Debug-InProd|Any CPU.ActiveCfg = Debug-InProd|x86 {380A4F46-413D-49B4-884F-21C7683F093C}.Debug-InProd|x86.ActiveCfg = Debug-InProd|x86 {380A4F46-413D-49B4-884F-21C7683F093C}.Debug-InProd|x86.Build.0 = Debug-InProd|x86 - {380A4F46-413D-49B4-884F-21C7683F093C}.Release|Any CPU.ActiveCfg = Release|x86 {380A4F46-413D-49B4-884F-21C7683F093C}.Release|x86.ActiveCfg = Release|x86 {380A4F46-413D-49B4-884F-21C7683F093C}.Release|x86.Build.0 = Release|x86 - {7F7B4A1F-01E1-440E-89DB-08F7D1D5A128}.Debug|Any CPU.ActiveCfg = Debug|x86 {7F7B4A1F-01E1-440E-89DB-08F7D1D5A128}.Debug|x86.ActiveCfg = Debug|x86 {7F7B4A1F-01E1-440E-89DB-08F7D1D5A128}.Debug|x86.Build.0 = Debug|x86 - {7F7B4A1F-01E1-440E-89DB-08F7D1D5A128}.Debug-InProd|Any CPU.ActiveCfg = Debug-InProd|x86 {7F7B4A1F-01E1-440E-89DB-08F7D1D5A128}.Debug-InProd|x86.ActiveCfg = Debug-InProd|x86 {7F7B4A1F-01E1-440E-89DB-08F7D1D5A128}.Debug-InProd|x86.Build.0 = Debug-InProd|x86 - {7F7B4A1F-01E1-440E-89DB-08F7D1D5A128}.Release|Any CPU.ActiveCfg = Release|x86 {7F7B4A1F-01E1-440E-89DB-08F7D1D5A128}.Release|x86.ActiveCfg = Release|x86 {7F7B4A1F-01E1-440E-89DB-08F7D1D5A128}.Release|x86.Build.0 = Release|x86 - {F8BB6993-B610-40AD-995A-AA5A28FBBBFE}.Debug|Any CPU.ActiveCfg = Debug|x86 {F8BB6993-B610-40AD-995A-AA5A28FBBBFE}.Debug|x86.ActiveCfg = Debug|x86 {F8BB6993-B610-40AD-995A-AA5A28FBBBFE}.Debug|x86.Build.0 = Debug|x86 - {F8BB6993-B610-40AD-995A-AA5A28FBBBFE}.Debug-InProd|Any CPU.ActiveCfg = Debug-InProd|x86 {F8BB6993-B610-40AD-995A-AA5A28FBBBFE}.Debug-InProd|x86.ActiveCfg = Debug-InProd|x86 {F8BB6993-B610-40AD-995A-AA5A28FBBBFE}.Debug-InProd|x86.Build.0 = Debug-InProd|x86 - {F8BB6993-B610-40AD-995A-AA5A28FBBBFE}.Release|Any CPU.ActiveCfg = Release|x86 {F8BB6993-B610-40AD-995A-AA5A28FBBBFE}.Release|x86.ActiveCfg = Release|x86 {F8BB6993-B610-40AD-995A-AA5A28FBBBFE}.Release|x86.Build.0 = Release|x86 - {A95DA3C0-54C5-4BB9-84CB-E8B69E712A62}.Debug|Any CPU.ActiveCfg = Debug|x86 {A95DA3C0-54C5-4BB9-84CB-E8B69E712A62}.Debug|x86.ActiveCfg = Debug|x86 {A95DA3C0-54C5-4BB9-84CB-E8B69E712A62}.Debug|x86.Build.0 = Debug|x86 - {A95DA3C0-54C5-4BB9-84CB-E8B69E712A62}.Debug-InProd|Any CPU.ActiveCfg = Debug-InProd|x86 {A95DA3C0-54C5-4BB9-84CB-E8B69E712A62}.Debug-InProd|x86.ActiveCfg = Debug-InProd|x86 {A95DA3C0-54C5-4BB9-84CB-E8B69E712A62}.Debug-InProd|x86.Build.0 = Debug-InProd|x86 - {A95DA3C0-54C5-4BB9-84CB-E8B69E712A62}.Release|Any CPU.ActiveCfg = Release|x86 {A95DA3C0-54C5-4BB9-84CB-E8B69E712A62}.Release|x86.ActiveCfg = Release|x86 {A95DA3C0-54C5-4BB9-84CB-E8B69E712A62}.Release|x86.Build.0 = Release|x86 - {CD1238DA-B610-40AD-995A-AA5A28FBBBFE}.Debug|Any CPU.ActiveCfg = Debug|x86 {CD1238DA-B610-40AD-995A-AA5A28FBBBFE}.Debug|x86.ActiveCfg = Debug|x86 {CD1238DA-B610-40AD-995A-AA5A28FBBBFE}.Debug|x86.Build.0 = Debug|x86 - {CD1238DA-B610-40AD-995A-AA5A28FBBBFE}.Debug-InProd|Any CPU.ActiveCfg = Debug-InProd|x86 {CD1238DA-B610-40AD-995A-AA5A28FBBBFE}.Debug-InProd|x86.ActiveCfg = Debug-InProd|x86 {CD1238DA-B610-40AD-995A-AA5A28FBBBFE}.Debug-InProd|x86.Build.0 = Debug-InProd|x86 - {CD1238DA-B610-40AD-995A-AA5A28FBBBFE}.Release|Any CPU.ActiveCfg = Release|x86 {CD1238DA-B610-40AD-995A-AA5A28FBBBFE}.Release|x86.ActiveCfg = Release|x86 {CD1238DA-B610-40AD-995A-AA5A28FBBBFE}.Release|x86.Build.0 = Release|x86 - {390A9FF0-4B34-4869-AF15-7EF7960D5D56}.Debug|Any CPU.ActiveCfg = Debug|x86 {390A9FF0-4B34-4869-AF15-7EF7960D5D56}.Debug|x86.ActiveCfg = Debug|x86 {390A9FF0-4B34-4869-AF15-7EF7960D5D56}.Debug|x86.Build.0 = Debug|x86 - {390A9FF0-4B34-4869-AF15-7EF7960D5D56}.Debug-InProd|Any CPU.ActiveCfg = Release|x86 - {390A9FF0-4B34-4869-AF15-7EF7960D5D56}.Debug-InProd|Any CPU.Build.0 = Release|x86 {390A9FF0-4B34-4869-AF15-7EF7960D5D56}.Debug-InProd|x86.ActiveCfg = Debug|x86 {390A9FF0-4B34-4869-AF15-7EF7960D5D56}.Debug-InProd|x86.Build.0 = Debug|x86 - {390A9FF0-4B34-4869-AF15-7EF7960D5D56}.Release|Any CPU.ActiveCfg = Release|x86 {390A9FF0-4B34-4869-AF15-7EF7960D5D56}.Release|x86.ActiveCfg = Release|x86 {390A9FF0-4B34-4869-AF15-7EF7960D5D56}.Release|x86.Build.0 = Release|x86 - {1B4B5809-4108-4C73-B3FB-3A7609D97704}.Debug|Any CPU.ActiveCfg = Debug|x86 {1B4B5809-4108-4C73-B3FB-3A7609D97704}.Debug|x86.ActiveCfg = Debug|x86 {1B4B5809-4108-4C73-B3FB-3A7609D97704}.Debug|x86.Build.0 = Debug|x86 - {1B4B5809-4108-4C73-B3FB-3A7609D97704}.Debug-InProd|Any CPU.ActiveCfg = Release|x86 - {1B4B5809-4108-4C73-B3FB-3A7609D97704}.Debug-InProd|Any CPU.Build.0 = Release|x86 {1B4B5809-4108-4C73-B3FB-3A7609D97704}.Debug-InProd|x86.ActiveCfg = Debug|x86 {1B4B5809-4108-4C73-B3FB-3A7609D97704}.Debug-InProd|x86.Build.0 = Debug|x86 - {1B4B5809-4108-4C73-B3FB-3A7609D97704}.Release|Any CPU.ActiveCfg = Release|x86 {1B4B5809-4108-4C73-B3FB-3A7609D97704}.Release|x86.ActiveCfg = Release|x86 {1B4B5809-4108-4C73-B3FB-3A7609D97704}.Release|x86.Build.0 = Release|x86 EndGlobalSection @@ -364,15 +286,4 @@ Global GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {AF31D6F5-6E93-461B-8C5F-348439D19C6D} EndGlobalSection - GlobalSection(AutomaticVersions) = postSolution - UpdateAssemblyVersion = True - UpdateAssemblyFileVersion = True - UpdateAssemblyInfoVersion = True - AssemblyVersionSettings = IncrementOnDemand.IncrementOnDemand.IncrementOnDemand.IncrementWithResetOnIncrease - AssemblyFileVersionSettings = IncrementOnDemand.IncrementOnDemand.IncrementOnDemand.IncrementWithResetOnIncrease - AssemblyInfoVersionSettings = IncrementOnDemand.IncrementOnDemand.IncrementOnDemand.None - UpdatePackageVersion = False - AssemblyInfoVersionType = SettingsVersion - InheritWinAppVersionFrom = None - EndGlobalSection EndGlobal diff --git a/SuperMemoAssistant.sln.DotSettings b/SuperMemoAssistant.sln.DotSettings index 6344117..196e9fa 100644 --- a/SuperMemoAssistant.sln.DotSettings +++ b/SuperMemoAssistant.sln.DotSettings @@ -752,4 +752,5 @@ public static $name$ Instance { get; } = new $name$(); True True True + True True \ No newline at end of file diff --git a/src/AppHosts/SuperMemoAssistant/App.xaml.cs b/src/AppHosts/SuperMemoAssistant/App.xaml.cs index 7adbf8a..18978f9 100644 --- a/src/AppHosts/SuperMemoAssistant/App.xaml.cs +++ b/src/AppHosts/SuperMemoAssistant/App.xaml.cs @@ -21,8 +21,7 @@ // DEALINGS IN THE SOFTWARE. // // -// Created On: 2020/01/22 09:58 -// Modified On: 2020/01/22 17:31 +// Modified On: 2020/02/03 16:41 // Modified By: Alexis #endregion @@ -36,14 +35,17 @@ using System.Windows; using Anotar.Serilog; using CommandLine; -using Forge.Forms; using Hardcodet.Wpf.TaskbarNotification; +using SuperMemoAssistant.Exceptions; using SuperMemoAssistant.Interop; using SuperMemoAssistant.Interop.SuperMemo.Core; using SuperMemoAssistant.PluginHost; +using SuperMemoAssistant.Services.UI.Extensions; +using SuperMemoAssistant.SMA.Configs; using SuperMemoAssistant.SMA.Utils; using SuperMemoAssistant.Sys.IO; using SuperMemoAssistant.Sys.IO.Devices; +using SuperMemoFinderUtil = SuperMemoAssistant.SMA.Utils.SuperMemoFinder; namespace SuperMemoAssistant { @@ -65,8 +67,10 @@ protected override void OnExit(ExitEventArgs e) { _taskbarIcon?.Dispose(); - SuperMemoAssistant.SMA.Core.Logger?.Shutdown(); + SMA.Core.Logger?.Shutdown(); +#pragma warning disable CS0436 // Type conflicts with imported type ModuleInitializer.SentryInstance?.Dispose(); +#pragma warning restore CS0436 // Type conflicts with imported type base.OnExit(e); } @@ -85,27 +89,54 @@ private async void Application_Startup(object o, await LoadApp(parsed.Value); else - Environment.Exit(HostConst.ExitParameters); + Shutdown(HostConst.ExitParameters); } private async Task LoadApp(SMAParameters args) { _taskbarIcon = (TaskbarIcon)FindResource("TbIcon"); + // + // Make sure assemblies are available, and SMA is installed in "%AppData%\SuperMemoAssistant" if (CheckAssemblies(out var errMsg) == false || CheckSMALocation(out errMsg) == false) { LogTo.Warning(errMsg); - await Show.Window().For(new Alert(errMsg, "Error")); + await errMsg.ErrorMsgBox(); - Shutdown(); + Shutdown(1); return; } + // + // Load system configs + if (await LoadConfigs(out var nativeDataCfg, out var startupCfg) == false) + return; + + // + // Make sure SuperMemo exe path is correct. Prompt user to input the path otherwise. + if (ShouldFindSuperMemo(startupCfg, nativeDataCfg)) + { + var smFinder = new SuperMemoFinder(nativeDataCfg, startupCfg); + smFinder.ShowDialog(); + + if (smFinder.DialogResult == null || smFinder.DialogResult == false) + { + LogTo.Warning("No valid SM executable file path defined. SMA cannot run."); + + Shutdown(1); + return; + } + } + + // + // (Optional) Start the debug Key logger (logs key strokes with modifiers, e.g. ctrl, alt, ..) if (args.KeyLogger) - SuperMemoAssistant.SMA.Core.KeyboardHotKey.MainCallback = LogHotKeys; + SMA.Core.KeyboardHotKey.MainCallback = LogHotKeys; + // + // Determine which collection to open SMCollection smCollection = null; - var selectionWdw = new CollectionSelectionWindow(); + var selectionWdw = new CollectionSelectionWindow(startupCfg); // Try to open command line collection, if one was passed if (args.CollectionKnoPath != null && selectionWdw.ValidateSuperMemoPath()) @@ -124,18 +155,15 @@ private async Task LoadApp(SMAParameters args) smCollection = selectionWdw.Collection; } - // If a collection was selected, start SMA + // + // If a collection was defined, start SMA if (smCollection != null) { - SuperMemoAssistant.SMA.Core.SMA.OnSMStoppedEvent += Instance_OnSMStoppedEvent; + SMA.Core.SMA.OnSMStoppedEvent += Instance_OnSMStoppedEvent; - if (await SuperMemoAssistant.SMA.Core.SMA.Start(smCollection).ConfigureAwait(true) == false) + if (await SMA.Core.SMA.Start(nativeDataCfg, startupCfg, smCollection).ConfigureAwait(true) == false) { - await Show.Window().For( - new Alert( - $"SMA failed to start. Please check the logs in '{SMAFileSystem.LogDir.FullPath}' for details.", - "Error") - ); + await $"SMA failed to start. Please check the logs in '{SMAFileSystem.LogDir.FullPath}' for details.".ErrorMsgBox(); Shutdown(); } } @@ -151,6 +179,16 @@ private Task Instance_OnSMStoppedEvent(object sender, return Dispatcher.InvokeAsync(Shutdown).Task; } + private bool ShouldFindSuperMemo(StartupCfg startupCfg, NativeDataCfg nativeDataCfg) + { + return string.IsNullOrWhiteSpace(startupCfg.SMBinPath) + || SuperMemoFinderUtil.CheckSuperMemoExecutable( + nativeDataCfg, + startupCfg.SMBinPath, + out _, + out _) == false; + } + private bool CheckSMALocation(out string error) { var smaExeFile = new FilePath(Assembly.GetExecutingAssembly().Location); @@ -179,6 +217,50 @@ private void LogHotKeys(HotKey hk) LogTo.Debug($"Key pressed: {hk}"); } + private Task LoadConfigs(out NativeDataCfg nativeDataCfg, out StartupCfg startupCfg) + { + nativeDataCfg = LoadNativeDataConfig().Result; + startupCfg = LoadStartupConfig().Result; + + if (nativeDataCfg == null || startupCfg == null) + { + Shutdown(1); + return Task.FromResult(false); + } + + return Task.FromResult(true); + } + + private async Task LoadStartupConfig() + { + try + { + return await SMA.Core.Configuration.Load() + .ConfigureAwait(false) ?? new StartupCfg(); + } + catch (SMAException) + { + await "Failed to open StartupCfg.json. Make sure file is unlocked and try again.".ErrorMsgBox(); + + return null; + } + } + + private async Task LoadNativeDataConfig() + { + try + { + return await SMA.Core.Configuration.Load(SMAFileSystem.AppRootDir) + .ConfigureAwait(false); + } + catch (SMAException) + { + await "Failed to load native data config file.".ErrorMsgBox(); + + return null; + } + } + #endregion } } diff --git a/src/AppHosts/SuperMemoAssistant/CollectionSelectionWindow.xaml b/src/AppHosts/SuperMemoAssistant/CollectionSelectionWindow.xaml index 822156c..c84673b 100644 --- a/src/AppHosts/SuperMemoAssistant/CollectionSelectionWindow.xaml +++ b/src/AppHosts/SuperMemoAssistant/CollectionSelectionWindow.xaml @@ -23,7 +23,6 @@ KeyDown="Window_KeyDown"> - @@ -72,6 +71,23 @@ + + + diff --git a/src/AppHosts/SuperMemoAssistant/CollectionSelectionWindow.xaml.cs b/src/AppHosts/SuperMemoAssistant/CollectionSelectionWindow.xaml.cs index ddf7923..77982a3 100644 --- a/src/AppHosts/SuperMemoAssistant/CollectionSelectionWindow.xaml.cs +++ b/src/AppHosts/SuperMemoAssistant/CollectionSelectionWindow.xaml.cs @@ -39,7 +39,6 @@ using Forge.Forms; using MahApps.Metro.Controls; using Microsoft.Win32; -using SuperMemoAssistant.Exceptions; using SuperMemoAssistant.Extensions; using SuperMemoAssistant.Interop.SuperMemo.Core; using SuperMemoAssistant.SMA.Configs; @@ -53,7 +52,7 @@ public partial class CollectionSelectionWindow : MetroWindow { #region Properties & Fields - Non-Public - private readonly StartupCfg _config; + private readonly StartupCfg _startupCfg; #endregion @@ -62,21 +61,10 @@ public partial class CollectionSelectionWindow : MetroWindow #region Constructors - public CollectionSelectionWindow() + public CollectionSelectionWindow(StartupCfg startupCfg) { - try - { - _config = SuperMemoAssistant.SMA.Core.Configuration.Load().Result ?? new StartupCfg(); - } - catch (SMAException) - { - Forge.Forms.Show.Window().For(new Alert("Failed to open StartupCfg.json. Make sure file is unlocked and try again.", "Error")); - - Environment.Exit(1); - return; - } - - SavedCollections = _config.Collections; + _startupCfg = startupCfg; + SavedCollections = startupCfg.Collections; InitializeComponent(); @@ -107,11 +95,11 @@ public CollectionSelectionWindow() public bool ValidateSuperMemoPath() { - if (new FilePath(_config.SMBinPath).Exists() == false) + if (new FilePath(_startupCfg.SMBinPath).Exists() == false) { Forge.Forms.Show.Window().For( new Alert( - $"Invalid file path for sm executable file: '{_config.SMBinPath}' could not be found.", + $"Invalid file path for sm executable file: '{_startupCfg.SMBinPath}' could not be found.", "Error") ); return false; @@ -162,7 +150,7 @@ private void DeleteCollection(SMCollection collection) private void SaveConfig() { - SuperMemoAssistant.SMA.Core.Configuration.Save(_config).Wait(); + SuperMemoAssistant.SMA.Core.Configuration.Save(_startupCfg).Wait(); } private void OpenSelectedCollection() @@ -205,13 +193,13 @@ private void btnBrowse_Click(object sender, if (filePath != null) { var newCollection = CreateCollection(filePath); - var duplicate = _config.Collections.FirstOrDefault(c => c == newCollection); + var duplicate = _startupCfg.Collections.FirstOrDefault(c => c == newCollection); if (duplicate != null) duplicate.LastOpen = DateTime.Now; else - _config.Collections.Add(newCollection); + _startupCfg.Collections.Add(newCollection); SaveConfig(); @@ -220,6 +208,11 @@ private void btnBrowse_Click(object sender, } } + private void ListBoxItem_MouseDoubleClick(object sender, MouseButtonEventArgs e) + { + OpenSelectedCollection(); + } + private void btnOpen_Click(object sender, RoutedEventArgs e) { @@ -229,7 +222,7 @@ private void btnOpen_Click(object sender, private void BtnOptions_Click(object sender, RoutedEventArgs e) { - Forge.Forms.Show.Window().For(_config).Wait(); + Forge.Forms.Show.Window().For(_startupCfg).Wait(); SaveConfig(); } @@ -251,11 +244,6 @@ private void CollectionSelectionWindow_Loaded(object sender, lbCollections.SelectFirstItem(); } - private void ListBoxItem_MouseDoubleClick(object sender, MouseButtonEventArgs e) - { - OpenSelectedCollection(); - } - #endregion } } diff --git a/src/AppHosts/SuperMemoAssistant/FodyWeavers.xml b/src/AppHosts/SuperMemoAssistant/FodyWeavers.xml index 76dcf1e..3473f82 100644 --- a/src/AppHosts/SuperMemoAssistant/FodyWeavers.xml +++ b/src/AppHosts/SuperMemoAssistant/FodyWeavers.xml @@ -2,4 +2,5 @@ + \ No newline at end of file diff --git a/src/AppHosts/SuperMemoAssistant/FodyWeavers.xsd b/src/AppHosts/SuperMemoAssistant/FodyWeavers.xsd index 8b42339..0f2523c 100644 --- a/src/AppHosts/SuperMemoAssistant/FodyWeavers.xsd +++ b/src/AppHosts/SuperMemoAssistant/FodyWeavers.xsd @@ -4,6 +4,35 @@ + + + + + Used to control if the On_PropertyName_Changed feature is enabled. + + + + + Used to change the name of the method that fires the notify event. This is a string that accepts multiple values in a comma separated form. + + + + + Used to control if equality checks should be inserted. If false, equality checking will be disabled for the project. + + + + + Used to control if equality checks should use the Equals method resolved from the base class. + + + + + Used to control if equality checks should use the static Equals method resolved from the base class. + + + + diff --git a/src/AppHosts/SuperMemoAssistant/Properties/AssemblyInfo.cs b/src/AppHosts/SuperMemoAssistant/Properties/AssemblyInfo.cs index 2b6d1ea..0ea43f1 100644 --- a/src/AppHosts/SuperMemoAssistant/Properties/AssemblyInfo.cs +++ b/src/AppHosts/SuperMemoAssistant/Properties/AssemblyInfo.cs @@ -81,7 +81,7 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2.0.2.17")] -[assembly: AssemblyFileVersion("2.0.2.17")] +[assembly: AssemblyVersion("2.0.2.67")] +[assembly: AssemblyFileVersion("2.0.2.67")] [assembly: AssemblyInformationalVersion("2.0.2")] diff --git a/src/AppHosts/SuperMemoAssistant/SMATaskbarIcon.cs b/src/AppHosts/SuperMemoAssistant/SMATaskbarIcon.cs index b5e7e65..8297abb 100644 --- a/src/AppHosts/SuperMemoAssistant/SMATaskbarIcon.cs +++ b/src/AppHosts/SuperMemoAssistant/SMATaskbarIcon.cs @@ -134,7 +134,7 @@ private void PreviewTrayContextMenuOpen(object sender, .ToList(); // ReSharper disable once PossibleNullReferenceException - while (tbIcon.ContextMenu.Items.Count > 0 && ((Control)tbIcon.ContextMenu.Items.GetItemAt(0)).Tag.Equals(MenuPluginTag)) + while (tbIcon.ContextMenu.Items.Count > 0 && MenuPluginTag.Equals(((Control)tbIcon.ContextMenu.Items.GetItemAt(0)).Tag)) tbIcon.ContextMenu.Items.RemoveAt(0); if (runningPlugins.Any()) diff --git a/src/AppHosts/SuperMemoAssistant/SuperMemoAssistant.csproj b/src/AppHosts/SuperMemoAssistant/SuperMemoAssistant.csproj index 07bc1cf..a1e372a 100644 --- a/src/AppHosts/SuperMemoAssistant/SuperMemoAssistant.csproj +++ b/src/AppHosts/SuperMemoAssistant/SuperMemoAssistant.csproj @@ -1,5 +1,6 @@  + @@ -93,6 +94,12 @@ ..\..\..\packages\MahApps.Metro.1.6.5\lib\net47\MahApps.Metro.dll + + ..\..\..\packages\Markdig.0.18.0\lib\net40\Markdig.dll + + + ..\..\..\packages\Markdig.Wpf.0.3.1\lib\net452\Markdig.Wpf.dll + ..\..\..\packages\MaterialDesignColors.1.1.3\lib\net45\MaterialDesignColors.dll @@ -109,17 +116,20 @@ ..\..\..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll - - ..\..\..\packages\Sentry.1.2.0\lib\net461\Sentry.dll + + ..\..\..\packages\PropertyChanged.Fody.3.2.5\lib\net40\PropertyChanged.dll + + + ..\..\..\packages\Sentry.2.0.1\lib\net461\Sentry.dll - - ..\..\..\packages\Sentry.PlatformAbstractions.1.0.0\lib\net471\Sentry.PlatformAbstractions.dll + + ..\..\..\packages\Sentry.PlatformAbstractions.1.1.0\lib\net471\Sentry.PlatformAbstractions.dll - - ..\..\..\packages\Sentry.Protocol.1.0.6\lib\net46\Sentry.Protocol.dll + + ..\..\..\packages\Sentry.Protocol.2.0.0\lib\net46\Sentry.Protocol.dll - - ..\..\..\packages\Sentry.Serilog.1.2.0\lib\net461\Sentry.Serilog.dll + + ..\..\..\packages\Sentry.Serilog.2.0.1\lib\net461\Sentry.Serilog.dll ..\..\..\packages\Serilog.2.9.0\lib\net46\Serilog.dll @@ -164,6 +174,10 @@ + + + SuperMemoFinder.xaml + Designer MSBuild:Compile @@ -180,6 +194,10 @@ XamlIntelliSenseFileGenerator SMATaskbarIcon.cs + + Designer + MSBuild:Compile + @@ -218,10 +236,18 @@ {7550628d-0630-4a42-b0b7-55d26f981365} SuperMemoAssistant.Core + + {CC5B9485-9EF1-4133-9242-719D263700AE} + SuperMemoAssistant.Hooks.Common + {fd0e1be8-bed3-4ab0-a9c8-022a2dbc8450} SuperMemoAssistant.Interop + + {7F7B4A1F-01E1-440E-89DB-08F7D1D5A128} + SuperMemoAssistant.Services.UI + @@ -243,7 +269,8 @@ - + + - + \ No newline at end of file diff --git a/src/AppHosts/SuperMemoAssistant/SuperMemoFinder.SuperMemoFilePath.cs b/src/AppHosts/SuperMemoAssistant/SuperMemoFinder.SuperMemoFilePath.cs new file mode 100644 index 0000000..3fb85d4 --- /dev/null +++ b/src/AppHosts/SuperMemoAssistant/SuperMemoFinder.SuperMemoFilePath.cs @@ -0,0 +1,127 @@ +#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/02/03 16:21 +// Modified By: Alexis + +#endregion + + + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.ComponentModel; +using SuperMemoAssistant.Exceptions; +using SuperMemoAssistant.SMA.Configs; +using SuperMemoAssistant.Sys.IO; + +namespace SuperMemoAssistant +{ + public partial class SuperMemoFinder + { + public class SuperMemoFilePath : INotifyDataErrorInfo + { + #region Properties & Fields - Non-Public + + private readonly SMAException _ex; + + #endregion + + + + + #region Constructors + + public SuperMemoFilePath(FilePath filePath, NativeDataCfg nativeDataCfg) + { + FilePath = filePath; + + HasErrors = SMA.Utils.SuperMemoFinder.CheckSuperMemoExecutable(nativeDataCfg, filePath, out _, out var ex) == false; + _ex = ex; + } + + #endregion + + + + + #region Properties & Fields - Public + + public FilePath FilePath { get; } + + #endregion + + + + + #region Properties Impl - Public + + /// + public bool HasErrors { get; } + + #endregion + + + + + #region Methods Impl + + public override string ToString() + { + return FilePath.FullPathWin; + } + + /// + public IEnumerable GetErrors(string propertyName) + { + return new List { _ex.Message }; + } + + #endregion + + + + + #region Methods + + public static implicit operator string(SuperMemoFilePath smFilePath) + { + return smFilePath.ToString(); + } + + #endregion + + + + + #region Events + + /// + public event EventHandler ErrorsChanged; + + #endregion + } + } +} diff --git a/src/AppHosts/SuperMemoAssistant/SuperMemoFinder.xaml b/src/AppHosts/SuperMemoAssistant/SuperMemoFinder.xaml new file mode 100644 index 0000000..08ec66c --- /dev/null +++ b/src/AppHosts/SuperMemoAssistant/SuperMemoFinder.xaml @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + + +