Skip to content
Open
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
4 changes: 2 additions & 2 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
image: Visual Studio 2017
version: 1.0.20-{build}
image: Visual Studio 2022
version: 1.0.21-{build}
environment:
global:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
bin
obj
/.vs
/*.user
19 changes: 16 additions & 3 deletions BuildAllReleaseVersions.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
SET BUILDTOOL=c:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe
%BUILDTOOL% CSMatIO.sln /p:Configuration=Release /p:TargetFrameworkVersion=v2.0
%BUILDTOOL% CSMatIO.sln /p:Configuration=Release /p:TargetFrameworkVersion=v4.0
SET BUILDTOOL="C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\MSBuild.exe"

REM Restore NuGet packages first
dotnet restore src\csmatio.csproj

REM Build for specific framework targets
dotnet build src\csmatio.csproj -c Release -f netstandard2.0
dotnet build src\csmatio.csproj -c Release -f netstandard2.1
dotnet build src\csmatio.csproj -c Release -f net6.0
dotnet build src\csmatio.csproj -c Release -f net8.0

REM Create NuGet package with all frameworks
dotnet pack src\csmatio.csproj -c Release --no-build

echo Press any key to continue...
pause > nul
25 changes: 17 additions & 8 deletions CSMatIO.sln
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.21005.1
# Visual Studio Version 17
VisualStudioVersion = 17.12.35728.132
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csmatio", "src\csmatio.csproj", "{D6EB17BF-9074-484F-9950-E06169A3C39D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSMatIOTest", "demo\CSMatIOTest.csproj", "{C5C58FCB-2DDA-4472-ACED-0C97FE09F7C1}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "csmatio.test", "test\csmatio.test.csproj", "{1425535D-7FE0-417E-8B2A-837F498B4792}"
ProjectSection(ProjectDependencies) = postProject
{D6EB17BF-9074-484F-9950-E06169A3C39D} = {D6EB17BF-9074-484F-9950-E06169A3C39D}
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "test", "test\test.csproj", "{30C632C4-5F79-4893-84E9-CA4CE498846C}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CsMatIoTestExampleWpf", "demo-wpf\CsMatIoTestExampleWpf.csproj", "{A5A2B6A5-2F80-44BA-8852-562D5048C019}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CsMatIoTestExampleForms", "demo-forms\CsMatIoTestExampleForms.csproj", "{C5C58FCB-2DDA-4472-ACED-0C97FE09F7C1}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -19,14 +24,18 @@ Global
{D6EB17BF-9074-484F-9950-E06169A3C39D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D6EB17BF-9074-484F-9950-E06169A3C39D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D6EB17BF-9074-484F-9950-E06169A3C39D}.Release|Any CPU.Build.0 = Release|Any CPU
{1425535D-7FE0-417E-8B2A-837F498B4792}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1425535D-7FE0-417E-8B2A-837F498B4792}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1425535D-7FE0-417E-8B2A-837F498B4792}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1425535D-7FE0-417E-8B2A-837F498B4792}.Release|Any CPU.Build.0 = Release|Any CPU
{A5A2B6A5-2F80-44BA-8852-562D5048C019}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A5A2B6A5-2F80-44BA-8852-562D5048C019}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A5A2B6A5-2F80-44BA-8852-562D5048C019}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A5A2B6A5-2F80-44BA-8852-562D5048C019}.Release|Any CPU.Build.0 = Release|Any CPU
{C5C58FCB-2DDA-4472-ACED-0C97FE09F7C1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C5C58FCB-2DDA-4472-ACED-0C97FE09F7C1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C5C58FCB-2DDA-4472-ACED-0C97FE09F7C1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C5C58FCB-2DDA-4472-ACED-0C97FE09F7C1}.Release|Any CPU.Build.0 = Release|Any CPU
{30C632C4-5F79-4893-84E9-CA4CE498846C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{30C632C4-5F79-4893-84E9-CA4CE498846C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{30C632C4-5F79-4893-84E9-CA4CE498846C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{30C632C4-5F79-4893-84E9-CA4CE498846C}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
163 changes: 82 additions & 81 deletions demo/CSMatIOTest.csproj → demo-forms/CsMatIoTestExampleForms.csproj
Original file line number Diff line number Diff line change
@@ -1,81 +1,82 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="12.0">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{C5C58FCB-2DDA-4472-ACED-0C97FE09F7C1}</ProjectGuid>
<OutputType>WinExe</OutputType>
<OutputPath>bin\</OutputPath>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>CSMatIOTest</RootNamespace>
<AssemblyName>CSMatIOTest</AssemblyName>
<TargetFrameworkVersion Condition=" '$(TargetFrameworkVersion)' == '' ">v4.7.1</TargetFrameworkVersion>
<DefineTrace>true</DefineTrace>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DefineConstants>NET40</DefineConstants>
<DefineDebug>true</DefineDebug>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DefineConstants>NET40</DefineConstants>
<DefineDebug>false</DefineDebug>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Main.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Main.Designer.cs">
<DependentUpon>Main.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Main.resx">
<SubType>Designer</SubType>
<DependentUpon>Main.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="app.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\src\csmatio.csproj">
<Project>{D6EB17BF-9074-484F-9950-E06169A3C39D}</Project>
<Name>csmatio</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
</Project>
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="12.0">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{C5C58FCB-2DDA-4472-ACED-0C97FE09F7C1}</ProjectGuid>
<OutputType>WinExe</OutputType>
<OutputPath>bin\</OutputPath>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>CSMatIOTest</RootNamespace>
<AssemblyName>CSMatIOTest</AssemblyName>
<TargetFrameworkVersion Condition=" '$(TargetFrameworkVersion)' == '' ">v4.7.1</TargetFrameworkVersion>
<DefineTrace>true</DefineTrace>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DefineConstants>NET40</DefineConstants>
<DefineDebug>true</DefineDebug>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DefineConstants>NET40</DefineConstants>
<DefineDebug>false</DefineDebug>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Main.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Main.Designer.cs">
<DependentUpon>Main.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Main.resx">
<SubType>Designer</SubType>
<DependentUpon>Main.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="app.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\src\csmatio.csproj">
<Project>{D6EB17BF-9074-484F-9950-E06169A3C39D}</Project>
<Name>csmatio</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
</Project>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
35 changes: 35 additions & 0 deletions demo-forms/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# CSMatIO WPF Demo Application

This is a .NET 8.0 WPF demo application for the CSMatIO library, which provides functionality for reading and writing MATLAB MAT-files in C#.

## Features

- Read MAT-files and display their contents
- Create MAT-files with various data types:
- Cell arrays
- Structures
- Character arrays
- Sparse arrays
- Numeric arrays (Double, Single, Int8, UInt8, Int16, UInt16, Int32, UInt32, Int64, UInt64)
- Imaginary matrices

## Requirements

- .NET 8.0 SDK or later
- Windows operating system

## Building and Running

1. Open the solution in Visual Studio 2022 or later
2. Build the solution
3. Run the CSMatIOTestWPF project

## Usage

1. To read a MAT-file, click the "Read MAT-File" button and select a file
2. To create a MAT-file:
- Select the data types you want to include
- Click the "Create MAT-File" button
- Choose a location to save the file

The output window will display information about the operations performed.
File renamed without changes.
82 changes: 82 additions & 0 deletions demo-froms/CsMatIoTestExampleForms.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="12.0">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{C5C58FCB-2DDA-4472-ACED-0C97FE09F7C1}</ProjectGuid>
<OutputType>WinExe</OutputType>
<OutputPath>bin\</OutputPath>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>CSMatIOTest</RootNamespace>
<AssemblyName>CSMatIOTest</AssemblyName>
<TargetFrameworkVersion Condition=" '$(TargetFrameworkVersion)' == '' ">v4.7.1</TargetFrameworkVersion>
<DefineTrace>true</DefineTrace>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DefineConstants>NET40</DefineConstants>
<DefineDebug>true</DefineDebug>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DefineConstants>NET40</DefineConstants>
<DefineDebug>false</DefineDebug>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Main.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Main.Designer.cs">
<DependentUpon>Main.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Main.resx">
<SubType>Designer</SubType>
<DependentUpon>Main.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="app.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\src\csmatio.csproj">
<Project>{D6EB17BF-9074-484F-9950-E06169A3C39D}</Project>
<Name>csmatio</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
</Project>
9 changes: 9 additions & 0 deletions demo-wpf/App.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Application x:Class="CSMatIOTest.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:CSMatIOTest"
StartupUri="MainWindow.xaml">
<Application.Resources>

</Application.Resources>
</Application>
11 changes: 11 additions & 0 deletions demo-wpf/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using System.Windows;

namespace CSMatIOTest
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
}
}
Loading