Skip to content

Commit

Permalink
Add files
Browse files Browse the repository at this point in the history
  • Loading branch information
0xDC00 committed Aug 28, 2022
1 parent 0a7e9b3 commit 2741f70
Show file tree
Hide file tree
Showing 420 changed files with 86,742 additions and 2 deletions.
13 changes: 13 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# These are supported funding model platforms

github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: 0xdc00
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.vs/
bin/
obj/
PublishProfiles/
*.user
launchSettings.json
11 changes: 11 additions & 0 deletions EvRw/App.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<Router AppAssembly="@typeof(Program).Assembly"> @*PreferExactMatches="@true"*@
<Found Context="routeData">
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" />
<FocusOnNavigate RouteData="@routeData" Selector="h1" />
</Found>
<NotFound>
<LayoutView Layout="@typeof(MainLayout)">
<p role="alert">Sorry, there's nothing at this address.</p>
</LayoutView>
</NotFound>
</Router>
89 changes: 89 additions & 0 deletions EvRw/EvRw.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">

<PropertyGroup>
<!-- 9, 10 vs preview -->
<TargetFramework>net6.0</TargetFramework>
<LangVersion>10</LangVersion>
<!--<Nullable>enable</Nullable>-->
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
<ProduceReferenceAssembly>false</ProduceReferenceAssembly>
<!--<StaticWebAssetBasePath>FirstApp</StaticWebAssetBasePath>-->
<!-- CS0105 -->
<NoWarn>CS0105</NoWarn>
</PropertyGroup>

<PropertyGroup>
<!--<BlazorEnableCompression>true</BlazorEnableCompression>-->
<!--<BlazorWebAssemblyI18NAssemblies>none</BlazorWebAssemblyI18NAssemblies>-->
<!-- https://docs.microsoft.com/en-us/aspnet/core/blazor/webassembly-performance-best-practices?view=aspnetcore-5.0#disable-unused-features -->
<!-- https://dev.to/j_sakamoto/workaround-how-to-resolve-local-time-zone-on-blazor-spa-v05x-foi -->
<BlazorEnableTimeZoneSupport>false</BlazorEnableTimeZoneSupport><!--<InvariantGlobalization>true</InvariantGlobalization>--> <!-- preview7 error -->

<!--<TrimmerRemoveSymbols>true</TrimmerRemoveSymbols>
<DebuggerSupport>false</DebuggerSupport>
<EnableUnsafeBinaryFormatterSerialization>false</EnableUnsafeBinaryFormatterSerialization>
<EnableUnsafeUTF7Encoding>false</EnableUnsafeUTF7Encoding>
<HttpActivityPropagationSupport>false</HttpActivityPropagationSupport>-->

<!-- https://docs.microsoft.com/en-us/dotnet/core/whats-new/dotnet-core-3-0#tiered-compilation --><!--
<PublishTrimmed>true</PublishTrimmed>
--><!-- disable Quick JIT is enabled and creates fully optimized code --><!--
<TieredCompilationQuickJit>false</TieredCompilationQuickJit>
--><!-- disable TC completely, use this MSBuild property --><!--
<TieredCompilation>false</TieredCompilation>
<BlazorWebAssemblyEnableLinking>false</BlazorWebAssemblyEnableLinking>-->
<!--<RunAOTCompilation>true</RunAOTCompilation>-->

<!-- https://docs.microsoft.com/en-us/dotnet/core/deploying/prepare-libraries-for-trimming -->
<!-- [AssemblyMetadata("IsTrimmable", "True")] .NET6, copyused (asm) vs link (type) -->
<!-- https://docs.microsoft.com/en-us/dotnet/core/deploying/trimming-options -->
<!-- https://docs.microsoft.com/en-us/dotnet/core/whats-new/dotnet-core-3-0#assembly-linking -->
<!-- https://github.com/mono/linker/blob/main/docs/design/trimmed-assemblies.md -->
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)'!='DEBUG'">
<!-- Bug in .Net 6 Preview 7 - this should not be non-debug only. https://github.com/dotnet/runtime/issues/55750 -->
<InvariantGlobalization>true</InvariantGlobalization>
<!--<RunAOTCompilation>true</RunAOTCompilation>-->
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>

<ItemGroup>
<Compile Remove="wwwroot\sample-data\**" />
<Content Remove="wwwroot\sample-data\**" />
<EmbeddedResource Remove="wwwroot\sample-data\**" />
<None Remove="wwwroot\sample-data\**" />
</ItemGroup>

<ItemGroup>
<Content Remove="Pages\Counter.razor" />
<Content Remove="Pages\FetchData.razor" />
<Content Remove="Shared\NavMenu.razor" />
<Content Remove="Shared\SurveyPrompt.razor" />
</ItemGroup>

<ItemGroup>
<None Remove="Shared\NavMenu.razor.css" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="6.0.8" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="6.0.8" PrivateAssets="all" />
<PackageReference Include="Microsoft.Net.Compilers.Toolset" Version="4.2.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\ExR.Format\ExR.Format.BLAZOR.csproj" />
</ItemGroup>
</Project>

34 changes: 34 additions & 0 deletions EvRw/LinkerConfig.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
This file specifies which parts of the BCL or Blazor packages must not be
stripped by the IL Linker even if they aren't referenced by user code.
-->
<linker>
<assembly fullname="mscorlib">
<!--
Preserve the methods in WasmRuntime because its methods are called by
JavaScript client-side code to implement timers.
Fixes: https://github.com/dotnet/blazor/issues/239
-->
<type fullname="System.Threading.WasmRuntime" />
</assembly>
<assembly fullname="System.Core">
<!--
System.Linq.Expressions* is required by Json.NET and any
expression.Compile caller. The assembly isn't stripped.
-->
<type fullname="System.Linq.Expressions*" />
</assembly>
<!--
In this example, the app's entry point assembly is listed. The assembly
isn't stripped by the IL Linker.
-->
<!--<assembly fullname="EvRw" />-->
<assembly fullname="ExR.Format">
<type fullname="ExR.Format.*" />
<type fullname="ExR.Format.VN_PJAdv" />
</assembly>
<assembly fullname="ExR.FMT">
<type fullname="ExR.Format.*" />
</assembly>
</linker>
18 changes: 18 additions & 0 deletions EvRw/Pages/Counter.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
@page "/counter"
@inject HttpClient Http

<h1>Counter</h1>

<p>Current count: @currentCount</p>

<button class="btn btn-primary" @onclick="IncrementCount">Click me</button>

@code {
private int currentCount = 0;

private async Task IncrementCount()
{
currentCount++;
await Task.Delay(1);
}
}
55 changes: 55 additions & 0 deletions EvRw/Pages/FetchData.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
@page "/fetchdata"
@inject HttpClient Http

<h1>Weather forecast</h1>

<p>This component demonstrates fetching data from the server.</p>

@if (forecasts == null)
{
<p><em>Loading...</em></p>
}
else
{
<table class="table">
<thead>
<tr>
<th>Date</th>
<th>Temp. (C)</th>
<th>Temp. (F)</th>
<th>Summary</th>
</tr>
</thead>
<tbody>
@foreach (var forecast in forecasts)
{
<tr>
<td>@forecast.Date.ToShortDateString()</td>
<td>@forecast.TemperatureC</td>
<td>@forecast.TemperatureF</td>
<td>@forecast.Summary</td>
</tr>
}
</tbody>
</table>
}

@code {
private WeatherForecast[] forecasts;

protected override async Task OnInitializedAsync()
{
forecasts = await Http.GetFromJsonAsync<WeatherForecast[]>("sample-data/weather.json");
}

public class WeatherForecast
{
public DateTime Date { get; set; }

public int TemperatureC { get; set; }

public string Summary { get; set; }

public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
}
}
100 changes: 100 additions & 0 deletions EvRw/Pages/Index.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
@page "/"
@page "/readme"
@*@page "/?e={cmdE}"
@page "/?r={cmdR}"*@
@*@inject IJSRuntime JS*@
@inject NavigationManager _NavigationManager
@*<h1>Hello, world!</h1>
Welcome to your new app.
<SurveyPrompt Title="How is Blazor working for you?" />*@

@*@if (_navManager.Uri.EndsWith("/readme", StringComparison.OrdinalIgnoreCase))
{
}*@
@* !readMe => button HOME <=> readmepage *@
@if (lazyReadMe)
{
<div hidden="@(!readMe)">
<EvRw.Pages.ReadMe />
</div>
}

<div class="col-12 col-md-8 col-lg-5 m-auto" hidden="@(readMe)">
<h1 class="text-center">@(currentTitle)</h1>

@* dragdrop *@
<div class="form-group">
<div class="drag-drop-zone @dropClassInput">
<InputFile OnChange="OnInputFileChange"
@ondragenter="@(() => dropClassInput = "dropzone-drag")"
@ondragleave="@(() => dropClassInput = string.Empty)"
accept="@(isRepack ? ".zip,.csv,.xlsx" : "*")" />
@statusInput
</div>

<div class="form-group" hidden=@(!isRepack)>
<div class="drag-drop-zone @dropClassOutput">
<InputFile OnChange="OnOutputFileChange"
@ondragenter="@(() => dropClassOutput = "dropzone-drag")"
@ondragleave="@(() => dropClassOutput = string.Empty)" />
@statusOutput
</div>
</div>
</div>
@* dropdown *@
<div class="form-group">
<select class="selectpicker form-control"
@onchange="PluginSelectOnChange"
data-live-search="true"
data-style="border border-primary rounded"
data-size="10"
id="selectPlugin">
@foreach (var format in dictFomat)
{
<option value="@(format.Key)" data-tokens="@(format.Value.Dest)">@format.Value.Name</option>
}
</select>
</div>
@* toggle *@
<div class="form-group btn-group d-flex" role="group">
<label class="@(!isRepack ? "btn btn-primary btn-lg" : "btn btn-outline-primary btn-lg")" for="btnradio1">
Extract
<input type="radio" class="btn-check" id="btnradio1" name="btnradio" autocomplete="off" style="display: none;"
value="-e" checked="@(!isRepack)" @onchange="RadioValueActionOnChange">
</label>

<label class="@(isRepack ? "btn btn-primary btn-lg" : "btn btn-outline-primary btn-lg")" for="btnradio2">
Repack
<input type="radio" class="btn-check" id="btnradio2" name="btnradio" autocomplete="off" style="display: none;"
value="-r" checked="@(isRepack)" @onchange="RadioValueActionOnChange">
</label>
</div>

<hr />
<div class="form-group">
@* Button Run *@
<button type="button"
disabled=@(IsTaskRunning || inputStream == null)
class="btn btn-success btn-lg btn-block"
@onclick="StartProcess">
Run
</button>
@* Button download *@
<div hidden=@(!(_PackResult != null && _PackResult.Length > 0))>
<hr />
<button type="button"
class="btn btn-success btn-lg btn-block"
@onclick="StartDownload">
Download
</button>
</div>
</div>
@* terminal *@
<div class="form-group">
<div id="terminal"></div>
</div>
</div>

Loading

0 comments on commit 2741f70

Please sign in to comment.