Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small adjustments to ArchivingViewModel interfaces #1341

Merged
merged 6 commits into from
Aug 23, 2024
Merged
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
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
### Changed

- [SIL.Windows.Forms.Archiving] Split SIL.Archiving, moving Winforms portions (including dependency on L10nSharp) to SIL.Windows.Forms.Archiving.
- [SIL.Archiving] Changed IMDIArchivingDlgViewModel.ArchivingPackage to return an IMDIPackage (instead of an IArchivingPackage).
- [SIL.Archiving] Required ArchivingDlgViewModel implementations to implement IDisposable.
- [SIL.Archiving] Made protected members in ArchivingDlgViewModel private, adding protected accessors as needed.
- [SIL.Archiving] In ArchivingDlgViewModel, renamed DisplayMessageEventHandler to MessageEventHandler, OnDisplayMessage to OnReportMessage, DisplayErrorEventHandler to ErrorEventHandler, and OnDisplayError to OnError.
- [SIL.Archiving] Changed signature of ArchivingDlgViewModel.OverrideDisplayInitialSummary to include a CancellationToken.
- [SIL.Archiving] Made ArchivingDlgViewModel.ArchiveType property public and changed it from a string to Standard (new enum).
- [SIL.Archiving] Changed signature of setFilesToArchive delegate in ArchivingDlgViewModel's protected constructor.
- [SIL.Archiving] Changed return type of ArchivingDlgViewModel.Initialize (to make it async) and added two parameters.
- [SIL.Archiving] Changed ArchivingDlgViewModel.DisplayMessage from public to protected.
- [SIL.Archiving] Changed the signature of protected methods in ArchivingDlgViewModel: LaunchArchivingProgram, GetFileExcludedMsg.
- [SIL.Archiving] Changed the signature of the public method ArchivingDlgViewModel.CreatePackage.
- [SIL.Archiving] Changed underlying type of public enums VernacularMaterialsType and SilDomain from ulong to long.
Expand Down
3 changes: 2 additions & 1 deletion SIL.Archiving/ArchivingDlgViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,8 @@ protected void DisplayMessage(StringId msgId, MessageType type, params object[]
}

/// ------------------------------------------------------------------------------------
protected void DisplayMessage(string msg, MessageType type)
[PublicAPI]
public void DisplayMessage(string msg, MessageType type)
{
OnReportMessage?.Invoke(msg, type);
}
Expand Down
2 changes: 1 addition & 1 deletion SIL.Archiving/IMDI/IMDIArchivingDlgViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ public IArchivingSession AddSession(string sessionId)
return session;
}

public IArchivingPackage ArchivingPackage => _imdiData;
public IMDIPackage ArchivingPackage => _imdiData;

/// <summary></summary>
public new string PathToProgramToLaunch
Expand Down
13 changes: 13 additions & 0 deletions SIL.Windows.Forms.Keyboarding.Tests/App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" /></startup>
<system.windows.forms jitDebugging="true" />
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Memory" culture="neutral" publicKeyToken="cc7b13ffcd2ddd51" />
<bindingRedirect oldVersion="0.0.0.0-4.5.5.0" newVersion="4.5.5.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="L10NSharp" Version="7.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
<PackageReference Include="ibusdotnet" Version="2.0.3" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
Expand All @@ -15,6 +16,7 @@
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="NUnit3TestAdapter" Version="4.3.2" PrivateAssets="All" />
<PackageReference Include="RhinoMocks" Version="3.6.1" />
<PackageReference Include="System.Memory" Version="4.5.5" />
</ItemGroup>

<ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions SIL.Windows.Forms.Tests/SIL.Windows.Forms.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="L10NSharp" Version="7.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
<PackageReference Include="Moq" Version="4.18.2" />
Expand Down
3 changes: 1 addition & 2 deletions TestApps/ArchivingTestApp/ArchivingTestApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFrameworks>net8.0-windows</TargetFrameworks>
<Nullable>enable</Nullable>
<SignAssembly>false</SignAssembly>
<IsPackable>false</IsPackable>
Expand All @@ -13,7 +12,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="L10NSharp" Version="8.0.0-beta0005" />
<PackageReference Include="L10NSharp" Version="7.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion TestApps/ArchivingTestApp/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ private void m_btnIMDI_Click(object sender, EventArgs e)
foreach (var file in (from ListViewItem item in @group.Items select item.Text))
{
session.AddFile(new ArchivingFile(file));
session.AddFileAccess(file, (ArchivingPackage)model.ArchivingPackage);
session.AddFileAccess(file, model.ArchivingPackage);
}

session.Genre = "Dance";
Expand Down