diff options
Diffstat (limited to 'Microbit.Kernel')
| -rw-r--r-- | Microbit.Kernel/BootChecker.cs (renamed from Microbit.Kernel/Class1.cs) | 4 | ||||
| -rw-r--r-- | Microbit.Kernel/MicroFS.cs | 53 | ||||
| -rw-r--r-- | Microbit.Kernel/Microbit.Kernel.csproj | 44 | ||||
| -rw-r--r-- | Microbit.Kernel/app.config | 11 | ||||
| -rw-r--r-- | Microbit.Kernel/packages.config | 6 |
5 files changed, 99 insertions, 19 deletions
diff --git a/Microbit.Kernel/Class1.cs b/Microbit.Kernel/BootChecker.cs index f9716d9..eb4fd2b 100644 --- a/Microbit.Kernel/Class1.cs +++ b/Microbit.Kernel/BootChecker.cs @@ -18,6 +18,8 @@ * ****************************************************************************/ using System; +using System.IO; +using Newtonsoft.Json; using System.Collections.Generic; using System.Linq; using System.Text; @@ -25,7 +27,7 @@ using System.Threading.Tasks; namespace Microbit.Kernel { - public class Class1 + public class BootChecker { } } diff --git a/Microbit.Kernel/MicroFS.cs b/Microbit.Kernel/MicroFS.cs new file mode 100644 index 0000000..44970b1 --- /dev/null +++ b/Microbit.Kernel/MicroFS.cs @@ -0,0 +1,53 @@ +/*********************************************************************** + * + * Microbits + * Copyright (C) 2019 Alee14 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <https://www.gnu.org/licenses/>. + * + ****************************************************************************/ +using System; +using System.IO; +using Newtonsoft.Json; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Microbit.Kernel +{ + public class MicroFS + { + public static string MicrobitFolder + { + get + { + return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "Microbit"); + } + } + public static string SystemFolder + { + get + { + return Path.Combine(MicrobitFolder, "System"); + + } + } + public static void CreateSystemFiles() + { + Directory.CreateDirectory(MicrobitFolder); + Directory.CreateDirectory(SystemFolder); + } + } +} diff --git a/Microbit.Kernel/Microbit.Kernel.csproj b/Microbit.Kernel/Microbit.Kernel.csproj index 0f5522a..71a8593 100644 --- a/Microbit.Kernel/Microbit.Kernel.csproj +++ b/Microbit.Kernel/Microbit.Kernel.csproj @@ -1,10 +1,10 @@ -<?xml version="1.0" encoding="utf-8"?> +<?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ProjectGuid>1a1e1ee8-d7fc-4138-93dc-59aae17bf4fd</ProjectGuid> + <ProjectGuid>{1A1E1EE8-D7FC-4138-93DC-59AAE17BF4FD}</ProjectGuid> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>Microbit.Kernel</RootNamespace> @@ -31,24 +31,32 @@ <WarningLevel>4</WarningLevel> </PropertyGroup> <ItemGroup> - <Reference Include="System"/> - - <Reference Include="System.Core"/> - <Reference Include="System.Xml.Linq"/> - <Reference Include="System.Data.DataSetExtensions"/> - - - <Reference Include="Microsoft.CSharp"/> - - <Reference Include="System.Data"/> - - <Reference Include="System.Net.Http"/> - - <Reference Include="System.Xml"/> + <Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> + <HintPath>..\packages\Newtonsoft.Json.12.0.1\lib\net45\Newtonsoft.Json.dll</HintPath> + </Reference> + <Reference Include="System" /> + <Reference Include="System.Collections.Immutable, Version=1.2.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> + <HintPath>..\packages\System.Collections.Immutable.1.5.0\lib\portable-net45+win8+wp8+wpa81\System.Collections.Immutable.dll</HintPath> + </Reference> + <Reference Include="System.Core" /> + <Reference Include="System.Interactive.Async, Version=3.2.0.0, Culture=neutral, PublicKeyToken=94bc3704cddfc263, processorArchitecture=MSIL"> + <HintPath>..\packages\System.Interactive.Async.3.2.0\lib\net45\System.Interactive.Async.dll</HintPath> + </Reference> + <Reference Include="System.Xml.Linq" /> + <Reference Include="System.Data.DataSetExtensions" /> + <Reference Include="Microsoft.CSharp" /> + <Reference Include="System.Data" /> + <Reference Include="System.Net.Http" /> + <Reference Include="System.Xml" /> </ItemGroup> <ItemGroup> - <Compile Include="Class1.cs" /> + <Compile Include="BootChecker.cs" /> + <Compile Include="MicroFS.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> </ItemGroup> + <ItemGroup> + <None Include="app.config" /> + <None Include="packages.config" /> + </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> - </Project> +</Project>
\ No newline at end of file diff --git a/Microbit.Kernel/app.config b/Microbit.Kernel/app.config new file mode 100644 index 0000000..e936cc1 --- /dev/null +++ b/Microbit.Kernel/app.config @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="utf-8"?> +<configuration> + <runtime> + <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> + <dependentAssembly> + <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" /> + </dependentAssembly> + </assemblyBinding> + </runtime> +</configuration>
\ No newline at end of file diff --git a/Microbit.Kernel/packages.config b/Microbit.Kernel/packages.config new file mode 100644 index 0000000..1a5a8cb --- /dev/null +++ b/Microbit.Kernel/packages.config @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="utf-8"?> +<packages> + <package id="Newtonsoft.Json" version="12.0.1" targetFramework="net45" /> + <package id="System.Collections.Immutable" version="1.5.0" targetFramework="net45" /> + <package id="System.Interactive.Async" version="3.2.0" targetFramework="net45" /> +</packages>
\ No newline at end of file |
