diff --git a/MewExplorer/App.xaml b/MewExplorer/App.xaml deleted file mode 100644 index eba1b07..0000000 --- a/MewExplorer/App.xaml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - #512bdf - White - - - - - - - - \ No newline at end of file diff --git a/MewExplorer/App.xaml.cs b/MewExplorer/App.xaml.cs deleted file mode 100644 index 42f7b60..0000000 --- a/MewExplorer/App.xaml.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace MewExplorer; - -public partial class App : Application { - public App() { - InitializeComponent(); - - MainPage = new MainPage(); - } -} diff --git a/MewExplorer/Main.razor b/MewExplorer/Main.razor deleted file mode 100644 index 8d4cb6f..0000000 --- a/MewExplorer/Main.razor +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - -

Sorry, there's nothing at this address.

-
-
-
diff --git a/MewExplorer/MainPage.xaml b/MewExplorer/MainPage.xaml deleted file mode 100644 index fc365d0..0000000 --- a/MewExplorer/MainPage.xaml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - diff --git a/MewExplorer/MainPage.xaml.cs b/MewExplorer/MainPage.xaml.cs deleted file mode 100644 index 0aa8fd8..0000000 --- a/MewExplorer/MainPage.xaml.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace MewExplorer; - -public partial class MainPage : ContentPage { - public MainPage() { - InitializeComponent(); - } -} diff --git a/MewExplorer/MauiProgram.cs b/MewExplorer/MauiProgram.cs deleted file mode 100644 index 2d13104..0000000 --- a/MewExplorer/MauiProgram.cs +++ /dev/null @@ -1,22 +0,0 @@ -using Microsoft.Extensions.Logging; - -namespace MewExplorer; -public static class MauiProgram { - public static MauiApp CreateMauiApp() { - var builder = MauiApp.CreateBuilder(); - builder - .UseMauiApp() - .ConfigureFonts(fonts => { - fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular"); - }); - - builder.Services.AddMauiBlazorWebView(); - - #if DEBUG - builder.Services.AddBlazorWebViewDeveloperTools(); - builder.Logging.AddDebug(); - #endif - - return builder.Build(); - } -} diff --git a/MewExplorer/MewExplorer.csproj b/MewExplorer/MewExplorer.csproj deleted file mode 100644 index f521920..0000000 --- a/MewExplorer/MewExplorer.csproj +++ /dev/null @@ -1,56 +0,0 @@ - - - - - false - false - - net7.0-android; - $(TargetFrameworks);net7.0-windows10.0.19041.0 - Exe - MewExplorer - true - true - enable - false - - - MewExplorer - - - com.companyname.mewexplorer - 5DD46388-985C-4BE2-94EF-3BFE6B5A280B - - - 1.0 - 1 - - 24.0 - 10.0.17763.0 - 10.0.17763.0 - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/MewExplorer/Pages/Index.razor b/MewExplorer/Pages/Index.razor deleted file mode 100644 index a351049..0000000 --- a/MewExplorer/Pages/Index.razor +++ /dev/null @@ -1,31 +0,0 @@ -@page "/" - -
- -
- -
- - Plc Overview - FPX-H C30T - -
- 192.168.0.1 -
- -
- -
- - Plc Overview - Text - -
- -
- -
- -
- -
\ No newline at end of file diff --git a/MewExplorer/Pages/Index.razor.css b/MewExplorer/Pages/Index.razor.css deleted file mode 100644 index 3a4f079..0000000 --- a/MewExplorer/Pages/Index.razor.css +++ /dev/null @@ -1,48 +0,0 @@ -.index-main { - - display: flex; - flex-direction: column; - flex: 1; - align-items: stretch; - justify-content: stretch; - height: 100%; - -} - -.plc-header { - - background: var(--dark-2); - display: flex; - flex-direction: row; - flex-basis: 30%; - - color: white; - -} - -.plc-header-left { - display: flex; - flex-direction: column; - flex-basis: 50%; - padding: 1em; -} - -.plc-header-left > span:nth-child(1) { - - font-size: 1em; - -} - -.plc-header-left > span:nth-child(2) { - - font-size: 2em; - -} - -.plc-header-right { - - display: flex; - flex-direction: column; - padding: 1em; - -} diff --git a/MewExplorer/Platforms/Android/AndroidManifest.xml b/MewExplorer/Platforms/Android/AndroidManifest.xml deleted file mode 100644 index dbf9e7e..0000000 --- a/MewExplorer/Platforms/Android/AndroidManifest.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/MewExplorer/Platforms/Android/MainActivity.cs b/MewExplorer/Platforms/Android/MainActivity.cs deleted file mode 100644 index 7e7bca8..0000000 --- a/MewExplorer/Platforms/Android/MainActivity.cs +++ /dev/null @@ -1,8 +0,0 @@ -using Android.App; -using Android.Content.PM; -using Android.OS; - -namespace MewExplorer; -[Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)] -public class MainActivity : MauiAppCompatActivity { -} diff --git a/MewExplorer/Platforms/Android/MainApplication.cs b/MewExplorer/Platforms/Android/MainApplication.cs deleted file mode 100644 index 18a3a2c..0000000 --- a/MewExplorer/Platforms/Android/MainApplication.cs +++ /dev/null @@ -1,12 +0,0 @@ -using Android.App; -using Android.Runtime; - -namespace MewExplorer; -[Application] -public class MainApplication : MauiApplication { - public MainApplication(IntPtr handle, JniHandleOwnership ownership) - : base(handle, ownership) { - } - - protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); -} diff --git a/MewExplorer/Platforms/Android/Resources/values/colors.xml b/MewExplorer/Platforms/Android/Resources/values/colors.xml deleted file mode 100644 index c04d749..0000000 --- a/MewExplorer/Platforms/Android/Resources/values/colors.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - #512BD4 - #2B0B98 - #2B0B98 - \ No newline at end of file diff --git a/MewExplorer/Platforms/Windows/App.xaml b/MewExplorer/Platforms/Windows/App.xaml deleted file mode 100644 index 6d32a5b..0000000 --- a/MewExplorer/Platforms/Windows/App.xaml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - #201C21 - #201C21 - #FFF - #FFF - - - - diff --git a/MewExplorer/Platforms/Windows/App.xaml.cs b/MewExplorer/Platforms/Windows/App.xaml.cs deleted file mode 100644 index 5f4e8dc..0000000 --- a/MewExplorer/Platforms/Windows/App.xaml.cs +++ /dev/null @@ -1,21 +0,0 @@ -using Microsoft.UI.Xaml; - -// To learn more about WinUI, the WinUI project structure, -// and more about our project templates, see: http://aka.ms/winui-project-info. - -namespace MewExplorer.WinUI; -/// -/// Provides application-specific behavior to supplement the default Application class. -/// -public partial class App : MauiWinUIApplication { - /// - /// Initializes the singleton application object. This is the first line of authored code - /// executed, and as such is the logical equivalent of main() or WinMain(). - /// - public App() { - this.InitializeComponent(); - } - - protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); -} - diff --git a/MewExplorer/Platforms/Windows/Package.appxmanifest b/MewExplorer/Platforms/Windows/Package.appxmanifest deleted file mode 100644 index 7125b1b..0000000 --- a/MewExplorer/Platforms/Windows/Package.appxmanifest +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - $placeholder$ - User Name - $placeholder$.png - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/MewExplorer/Platforms/Windows/app.manifest b/MewExplorer/Platforms/Windows/app.manifest deleted file mode 100644 index 6abc802..0000000 --- a/MewExplorer/Platforms/Windows/app.manifest +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - true/PM - PerMonitorV2, PerMonitor - - - diff --git a/MewExplorer/Properties/launchSettings.json b/MewExplorer/Properties/launchSettings.json deleted file mode 100644 index edf8aad..0000000 --- a/MewExplorer/Properties/launchSettings.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "profiles": { - "Windows Machine": { - "commandName": "MsixPackage", - "nativeDebugging": false - } - } -} \ No newline at end of file diff --git a/MewExplorer/Resources/AppIcon/appicon.svg b/MewExplorer/Resources/AppIcon/appicon.svg deleted file mode 100644 index 9d63b65..0000000 --- a/MewExplorer/Resources/AppIcon/appicon.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/MewExplorer/Resources/AppIcon/appiconfg.svg b/MewExplorer/Resources/AppIcon/appiconfg.svg deleted file mode 100644 index 21dfb25..0000000 --- a/MewExplorer/Resources/AppIcon/appiconfg.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/MewExplorer/Resources/Fonts/OpenSans-Regular.ttf b/MewExplorer/Resources/Fonts/OpenSans-Regular.ttf deleted file mode 100644 index 293a1cd..0000000 Binary files a/MewExplorer/Resources/Fonts/OpenSans-Regular.ttf and /dev/null differ diff --git a/MewExplorer/Resources/Images/dotnet_bot.svg b/MewExplorer/Resources/Images/dotnet_bot.svg deleted file mode 100644 index abfaff2..0000000 --- a/MewExplorer/Resources/Images/dotnet_bot.svg +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/MewExplorer/Resources/Raw/AboutAssets.txt b/MewExplorer/Resources/Raw/AboutAssets.txt deleted file mode 100644 index 531df33..0000000 --- a/MewExplorer/Resources/Raw/AboutAssets.txt +++ /dev/null @@ -1,15 +0,0 @@ -Any raw assets you want to be deployed with your application can be placed in -this directory (and child directories). Deployment of the asset to your application -is automatically handled by the following `MauiAsset` Build Action within your `.csproj`. - - - -These files will be deployed with you package and will be accessible using Essentials: - - async Task LoadMauiAsset() - { - using var stream = await FileSystem.OpenAppPackageFileAsync("AboutAssets.txt"); - using var reader = new StreamReader(stream); - - var contents = reader.ReadToEnd(); - } diff --git a/MewExplorer/Resources/Splash/splash.svg b/MewExplorer/Resources/Splash/splash.svg deleted file mode 100644 index 21dfb25..0000000 --- a/MewExplorer/Resources/Splash/splash.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/MewExplorer/Shared/MainLayout.razor b/MewExplorer/Shared/MainLayout.razor deleted file mode 100644 index 8593ecd..0000000 --- a/MewExplorer/Shared/MainLayout.razor +++ /dev/null @@ -1,21 +0,0 @@ -@inherits LayoutComponentBase - -
- -
- - - -
-
- @Body -
-
- -
- - - -
diff --git a/MewExplorer/Shared/MainLayout.razor.css b/MewExplorer/Shared/MainLayout.razor.css deleted file mode 100644 index 61e35f4..0000000 --- a/MewExplorer/Shared/MainLayout.razor.css +++ /dev/null @@ -1,40 +0,0 @@ -.page { - - background: var(--dark-3); - position: relative; - height: 100vh; - display: flex; - flex: 1; - flex-direction: column; - align-items: stretch; - justify-content: stretch; - -} - -.hor-layout { - - display: flex; - flex-direction: row; - flex: 1; - -} - -main { - - flex: 1; - display: flex; - -} - -main article { - - flex: 1; - -} - -.sidebar { - - background: var(--dark-1); - flex-basis: 25%; - -} \ No newline at end of file diff --git a/MewExplorer/Shared/NavMenu.razor b/MewExplorer/Shared/NavMenu.razor deleted file mode 100644 index 700dffe..0000000 --- a/MewExplorer/Shared/NavMenu.razor +++ /dev/null @@ -1,24 +0,0 @@ -
- MewExplorer -
- -
- -
- -@code { - private bool collapseNavMenu = true; - - private string NavMenuCssClass => collapseNavMenu ? "collapse" : null; - - private void ToggleNavMenu() - { - collapseNavMenu = !collapseNavMenu; - } -} diff --git a/MewExplorer/Shared/NavMenu.razor.css b/MewExplorer/Shared/NavMenu.razor.css deleted file mode 100644 index a5b8bd3..0000000 --- a/MewExplorer/Shared/NavMenu.razor.css +++ /dev/null @@ -1,44 +0,0 @@ -.app-name-header { - - margin: 2em; - color: white; - -} - -.navbar-brand { - font-size: 1.1rem; -} - -.oi { - margin: 1em; - width: 2rem; - font-size: 1.1rem; - vertical-align: text-top; - top: -2px; -} - -.nav-item { - - font-size: 0.9rem; - padding: 2em; - -} - -.nav-item ::deep a { - color: #d7d7d7; - border-radius: 4px; - height: 3rem; - display: flex; - align-items: center; - line-height: 3rem; -} - -.nav-item ::deep a.active { - background-color: rgba(255,255,255,0.25); - color: white; -} - -.nav-item ::deep a:hover { - background-color: rgba(255,255,255,0.1); - color: white; -} \ No newline at end of file diff --git a/MewExplorer/Shared/PlcStatus.razor b/MewExplorer/Shared/PlcStatus.razor deleted file mode 100644 index 813e7bc..0000000 --- a/MewExplorer/Shared/PlcStatus.razor +++ /dev/null @@ -1,6 +0,0 @@ -

PlcStatus

- -@code { - - -} \ No newline at end of file diff --git a/MewExplorer/Shared/PlcStatus.razor.css b/MewExplorer/Shared/PlcStatus.razor.css deleted file mode 100644 index 8b13789..0000000 --- a/MewExplorer/Shared/PlcStatus.razor.css +++ /dev/null @@ -1 +0,0 @@ - diff --git a/MewExplorer/Shared/PlcStatusBar.razor b/MewExplorer/Shared/PlcStatusBar.razor deleted file mode 100644 index 1177caf..0000000 --- a/MewExplorer/Shared/PlcStatusBar.razor +++ /dev/null @@ -1,7 +0,0 @@ -
- Stat bar -
- -@code { - -} diff --git a/MewExplorer/Shared/PlcStatusBar.razor.css b/MewExplorer/Shared/PlcStatusBar.razor.css deleted file mode 100644 index ca66444..0000000 --- a/MewExplorer/Shared/PlcStatusBar.razor.css +++ /dev/null @@ -1,10 +0,0 @@ -.plc-stat-bar { - color: white; - background: var(--vibrant-dark); - display: flex; - flex-direction: row; - flex-basis: 1.5em; - align-items: center; - padding-left: .5em; - font-size: 1rem; -} diff --git a/MewExplorer/Shared/SurveyPrompt.razor b/MewExplorer/Shared/SurveyPrompt.razor deleted file mode 100644 index fc67435..0000000 --- a/MewExplorer/Shared/SurveyPrompt.razor +++ /dev/null @@ -1,16 +0,0 @@ -
- - @Title - - - Please take our - brief survey - - and tell us what you think. -
- -@code { - // Demonstrates how a parent component can supply parameters - [Parameter] - public string Title { get; set; } -} diff --git a/MewExplorer/_Imports.razor b/MewExplorer/_Imports.razor deleted file mode 100644 index a7075a3..0000000 --- a/MewExplorer/_Imports.razor +++ /dev/null @@ -1,8 +0,0 @@ -@using System.Net.Http -@using Microsoft.AspNetCore.Components.Forms -@using Microsoft.AspNetCore.Components.Routing -@using Microsoft.AspNetCore.Components.Web -@using Microsoft.AspNetCore.Components.Web.Virtualization -@using Microsoft.JSInterop -@using MewExplorer -@using MewExplorer.Shared diff --git a/MewExplorer/wwwroot/css/app.css b/MewExplorer/wwwroot/css/app.css deleted file mode 100644 index c2feb37..0000000 --- a/MewExplorer/wwwroot/css/app.css +++ /dev/null @@ -1,94 +0,0 @@ -@import url('open-iconic/font/css/open-iconic-bootstrap.min.css'); - -:root { - --vibrant-dark: #00CC14; - --vibrant-light: #5CFF6C; - --dark-1: #201C21; - --dark-2: #2B262C; - --dark-3: #352F37; - --light-1: #EFF2EF; -} - -html, body { - font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; - margin: 0; -} - -h1:focus { - outline: none; -} - -a, .btn-link { - color: #0071c1; -} - -.btn-primary { - color: #fff; - background-color: #1b6ec2; - border-color: #1861ac; -} - -.content { - padding-top: 1.1rem; -} - -.valid.modified:not([type=checkbox]) { - outline: 1px solid #26b050; -} - -.invalid { - outline: 1px solid red; -} - -.validation-message { - color: red; -} - -#blazor-error-ui { - background: lightyellow; - bottom: 0; - box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2); - display: none; - left: 0; - padding: 0.6rem 1.25rem 0.7rem 1.25rem; - position: fixed; - width: 100%; - z-index: 1000; -} - -#blazor-error-ui .dismiss { - cursor: pointer; - position: absolute; - right: 0.75rem; - top: 0.5rem; -} - -.blazor-error-boundary { - background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121; - padding: 1rem 1rem 1rem 3.7rem; - color: white; -} - -.blazor-error-boundary::after { - content: "An error has occurred." -} - -.status-bar-safe-area { - display: none; -} - -@supports (-webkit-touch-callout: none) { - .status-bar-safe-area { - display: flex; - position: sticky; - top: 0; - height: env(safe-area-inset-top); - background-color: #f7f7f7; - width: 100%; - z-index: 1; - } - - .flex-column, .navbar-brand { - padding-left: env(safe-area-inset-left); - } -} diff --git a/MewExplorer/wwwroot/css/open-iconic/FONT-LICENSE b/MewExplorer/wwwroot/css/open-iconic/FONT-LICENSE deleted file mode 100644 index a1dc03f..0000000 --- a/MewExplorer/wwwroot/css/open-iconic/FONT-LICENSE +++ /dev/null @@ -1,86 +0,0 @@ -SIL OPEN FONT LICENSE Version 1.1 - -Copyright (c) 2014 Waybury - -PREAMBLE -The goals of the Open Font License (OFL) are to stimulate worldwide -development of collaborative font projects, to support the font creation -efforts of academic and linguistic communities, and to provide a free and -open framework in which fonts may be shared and improved in partnership -with others. - -The OFL allows the licensed fonts to be used, studied, modified and -redistributed freely as long as they are not sold by themselves. The -fonts, including any derivative works, can be bundled, embedded, -redistributed and/or sold with any software provided that any reserved -names are not used by derivative works. The fonts and derivatives, -however, cannot be released under any other type of license. The -requirement for fonts to remain under this license does not apply -to any document created using the fonts or their derivatives. - -DEFINITIONS -"Font Software" refers to the set of files released by the Copyright -Holder(s) under this license and clearly marked as such. This may -include source files, build scripts and documentation. - -"Reserved Font Name" refers to any names specified as such after the -copyright statement(s). - -"Original Version" refers to the collection of Font Software components as -distributed by the Copyright Holder(s). - -"Modified Version" refers to any derivative made by adding to, deleting, -or substituting -- in part or in whole -- any of the components of the -Original Version, by changing formats or by porting the Font Software to a -new environment. - -"Author" refers to any designer, engineer, programmer, technical -writer or other person who contributed to the Font Software. - -PERMISSION & CONDITIONS -Permission is hereby granted, free of charge, to any person obtaining -a copy of the Font Software, to use, study, copy, merge, embed, modify, -redistribute, and sell modified and unmodified copies of the Font -Software, subject to the following conditions: - -1) Neither the Font Software nor any of its individual components, -in Original or Modified Versions, may be sold by itself. - -2) Original or Modified Versions of the Font Software may be bundled, -redistributed and/or sold with any software, provided that each copy -contains the above copyright notice and this license. These can be -included either as stand-alone text files, human-readable headers or -in the appropriate machine-readable metadata fields within text or -binary files as long as those fields can be easily viewed by the user. - -3) No Modified Version of the Font Software may use the Reserved Font -Name(s) unless explicit written permission is granted by the corresponding -Copyright Holder. This restriction only applies to the primary font name as -presented to the users. - -4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font -Software shall not be used to promote, endorse or advertise any -Modified Version, except to acknowledge the contribution(s) of the -Copyright Holder(s) and the Author(s) or with their explicit written -permission. - -5) The Font Software, modified or unmodified, in part or in whole, -must be distributed entirely under this license, and must not be -distributed under any other license. The requirement for fonts to -remain under this license does not apply to any document created -using the Font Software. - -TERMINATION -This license becomes null and void if any of the above conditions are -not met. - -DISCLAIMER -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE -COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM -OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/MewExplorer/wwwroot/css/open-iconic/ICON-LICENSE b/MewExplorer/wwwroot/css/open-iconic/ICON-LICENSE deleted file mode 100644 index 2199f4a..0000000 --- a/MewExplorer/wwwroot/css/open-iconic/ICON-LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014 Waybury - -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. \ No newline at end of file diff --git a/MewExplorer/wwwroot/css/open-iconic/README.md b/MewExplorer/wwwroot/css/open-iconic/README.md deleted file mode 100644 index 5ac0c17..0000000 --- a/MewExplorer/wwwroot/css/open-iconic/README.md +++ /dev/null @@ -1,114 +0,0 @@ -[Open Iconic v1.1.1](https://github.com/iconic/open-iconic) -=========== - -### Open Iconic is the open source sibling of [Iconic](https://github.com/iconic/open-iconic). It is a hyper-legible collection of 223 icons with a tiny footprint—ready to use with Bootstrap and Foundation. [View the collection](https://github.com/iconic/open-iconic) - - - -## What's in Open Iconic? - -* 223 icons designed to be legible down to 8 pixels -* Super-light SVG files - 61.8 for the entire set -* SVG sprite—the modern replacement for icon fonts -* Webfont (EOT, OTF, SVG, TTF, WOFF), PNG and WebP formats -* Webfont stylesheets (including versions for Bootstrap and Foundation) in CSS, LESS, SCSS and Stylus formats -* PNG and WebP raster images in 8px, 16px, 24px, 32px, 48px and 64px. - - -## Getting Started - -#### For code samples and everything else you need to get started with Open Iconic, check out our [Icons](https://github.com/iconic/open-iconic) and [Reference](https://github.com/iconic/open-iconic) sections. - -### General Usage - -#### Using Open Iconic's SVGs - -We like SVGs and we think they're the way to display icons on the web. Since Open Iconic are just basic SVGs, we suggest you display them like you would any other image (don't forget the `alt` attribute). - -``` -icon name -``` - -#### Using Open Iconic's SVG Sprite - -Open Iconic also comes in a SVG sprite which allows you to display all the icons in the set with a single request. It's like an icon font, without being a hack. - -Adding an icon from an SVG sprite is a little different than what you're used to, but it's still a piece of cake. *Tip: To make your icons easily style able, we suggest adding a general class to the* `` *tag and a unique class name for each different icon in the* `` *tag.* - -``` - - - -``` - -Sizing icons only needs basic CSS. All the icons are in a square format, so just set the `` tag with equal width and height dimensions. - -``` -.icon { - width: 16px; - height: 16px; -} -``` - -Coloring icons is even easier. All you need to do is set the `fill` rule on the `` tag. - -``` -.icon-account-login { - fill: #f00; -} -``` - -To learn more about SVG Sprites, read [Chris Coyier's guide](http://css-tricks.com/svg-sprites-use-better-icon-fonts/). - -#### Using Open Iconic's Icon Font... - - -##### …with Bootstrap - -You can find our Bootstrap stylesheets in `font/css/open-iconic-bootstrap.{css, less, scss, styl}` - - -``` - -``` - - -``` - -``` - -##### …with Foundation - -You can find our Foundation stylesheets in `font/css/open-iconic-foundation.{css, less, scss, styl}` - -``` - -``` - - -``` - -``` - -##### …on its own - -You can find our default stylesheets in `font/css/open-iconic.{css, less, scss, styl}` - -``` - -``` - -``` - -``` - - -## License - -### Icons - -All code (including SVG markup) is under the [MIT License](http://opensource.org/licenses/MIT). - -### Fonts - -All fonts are under the [SIL Licensed](http://scripts.sil.org/cms/scripts/page.php?item_id=OFL_web). diff --git a/MewExplorer/wwwroot/css/open-iconic/font/css/open-iconic-bootstrap.min.css b/MewExplorer/wwwroot/css/open-iconic/font/css/open-iconic-bootstrap.min.css deleted file mode 100644 index 4664f2e..0000000 --- a/MewExplorer/wwwroot/css/open-iconic/font/css/open-iconic-bootstrap.min.css +++ /dev/null @@ -1 +0,0 @@ -@font-face{font-family:Icons;src:url(../fonts/open-iconic.eot);src:url(../fonts/open-iconic.eot?#iconic-sm) format('embedded-opentype'),url(../fonts/open-iconic.woff) format('woff'),url(../fonts/open-iconic.ttf) format('truetype'),url(../fonts/open-iconic.otf) format('opentype'),url(../fonts/open-iconic.svg#iconic-sm) format('svg');font-weight:400;font-style:normal}.oi{position:relative;top:1px;display:inline-block;speak:none;font-family:Icons;font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.oi:empty:before{width:1em;text-align:center;box-sizing:content-box}.oi.oi-align-center:before{text-align:center}.oi.oi-align-left:before{text-align:left}.oi.oi-align-right:before{text-align:right}.oi.oi-flip-horizontal:before{-webkit-transform:scale(-1,1);-ms-transform:scale(-1,1);transform:scale(-1,1)}.oi.oi-flip-vertical:before{-webkit-transform:scale(1,-1);-ms-transform:scale(-1,1);transform:scale(1,-1)}.oi.oi-flip-horizontal-vertical:before{-webkit-transform:scale(-1,-1);-ms-transform:scale(-1,1);transform:scale(-1,-1)}.oi-account-login:before{content:'\e000'}.oi-account-logout:before{content:'\e001'}.oi-action-redo:before{content:'\e002'}.oi-action-undo:before{content:'\e003'}.oi-align-center:before{content:'\e004'}.oi-align-left:before{content:'\e005'}.oi-align-right:before{content:'\e006'}.oi-aperture:before{content:'\e007'}.oi-arrow-bottom:before{content:'\e008'}.oi-arrow-circle-bottom:before{content:'\e009'}.oi-arrow-circle-left:before{content:'\e00a'}.oi-arrow-circle-right:before{content:'\e00b'}.oi-arrow-circle-top:before{content:'\e00c'}.oi-arrow-left:before{content:'\e00d'}.oi-arrow-right:before{content:'\e00e'}.oi-arrow-thick-bottom:before{content:'\e00f'}.oi-arrow-thick-left:before{content:'\e010'}.oi-arrow-thick-right:before{content:'\e011'}.oi-arrow-thick-top:before{content:'\e012'}.oi-arrow-top:before{content:'\e013'}.oi-audio-spectrum:before{content:'\e014'}.oi-audio:before{content:'\e015'}.oi-badge:before{content:'\e016'}.oi-ban:before{content:'\e017'}.oi-bar-chart:before{content:'\e018'}.oi-basket:before{content:'\e019'}.oi-battery-empty:before{content:'\e01a'}.oi-battery-full:before{content:'\e01b'}.oi-beaker:before{content:'\e01c'}.oi-bell:before{content:'\e01d'}.oi-bluetooth:before{content:'\e01e'}.oi-bold:before{content:'\e01f'}.oi-bolt:before{content:'\e020'}.oi-book:before{content:'\e021'}.oi-bookmark:before{content:'\e022'}.oi-box:before{content:'\e023'}.oi-briefcase:before{content:'\e024'}.oi-british-pound:before{content:'\e025'}.oi-browser:before{content:'\e026'}.oi-brush:before{content:'\e027'}.oi-bug:before{content:'\e028'}.oi-bullhorn:before{content:'\e029'}.oi-calculator:before{content:'\e02a'}.oi-calendar:before{content:'\e02b'}.oi-camera-slr:before{content:'\e02c'}.oi-caret-bottom:before{content:'\e02d'}.oi-caret-left:before{content:'\e02e'}.oi-caret-right:before{content:'\e02f'}.oi-caret-top:before{content:'\e030'}.oi-cart:before{content:'\e031'}.oi-chat:before{content:'\e032'}.oi-check:before{content:'\e033'}.oi-chevron-bottom:before{content:'\e034'}.oi-chevron-left:before{content:'\e035'}.oi-chevron-right:before{content:'\e036'}.oi-chevron-top:before{content:'\e037'}.oi-circle-check:before{content:'\e038'}.oi-circle-x:before{content:'\e039'}.oi-clipboard:before{content:'\e03a'}.oi-clock:before{content:'\e03b'}.oi-cloud-download:before{content:'\e03c'}.oi-cloud-upload:before{content:'\e03d'}.oi-cloud:before{content:'\e03e'}.oi-cloudy:before{content:'\e03f'}.oi-code:before{content:'\e040'}.oi-cog:before{content:'\e041'}.oi-collapse-down:before{content:'\e042'}.oi-collapse-left:before{content:'\e043'}.oi-collapse-right:before{content:'\e044'}.oi-collapse-up:before{content:'\e045'}.oi-command:before{content:'\e046'}.oi-comment-square:before{content:'\e047'}.oi-compass:before{content:'\e048'}.oi-contrast:before{content:'\e049'}.oi-copywriting:before{content:'\e04a'}.oi-credit-card:before{content:'\e04b'}.oi-crop:before{content:'\e04c'}.oi-dashboard:before{content:'\e04d'}.oi-data-transfer-download:before{content:'\e04e'}.oi-data-transfer-upload:before{content:'\e04f'}.oi-delete:before{content:'\e050'}.oi-dial:before{content:'\e051'}.oi-document:before{content:'\e052'}.oi-dollar:before{content:'\e053'}.oi-double-quote-sans-left:before{content:'\e054'}.oi-double-quote-sans-right:before{content:'\e055'}.oi-double-quote-serif-left:before{content:'\e056'}.oi-double-quote-serif-right:before{content:'\e057'}.oi-droplet:before{content:'\e058'}.oi-eject:before{content:'\e059'}.oi-elevator:before{content:'\e05a'}.oi-ellipses:before{content:'\e05b'}.oi-envelope-closed:before{content:'\e05c'}.oi-envelope-open:before{content:'\e05d'}.oi-euro:before{content:'\e05e'}.oi-excerpt:before{content:'\e05f'}.oi-expand-down:before{content:'\e060'}.oi-expand-left:before{content:'\e061'}.oi-expand-right:before{content:'\e062'}.oi-expand-up:before{content:'\e063'}.oi-external-link:before{content:'\e064'}.oi-eye:before{content:'\e065'}.oi-eyedropper:before{content:'\e066'}.oi-file:before{content:'\e067'}.oi-fire:before{content:'\e068'}.oi-flag:before{content:'\e069'}.oi-flash:before{content:'\e06a'}.oi-folder:before{content:'\e06b'}.oi-fork:before{content:'\e06c'}.oi-fullscreen-enter:before{content:'\e06d'}.oi-fullscreen-exit:before{content:'\e06e'}.oi-globe:before{content:'\e06f'}.oi-graph:before{content:'\e070'}.oi-grid-four-up:before{content:'\e071'}.oi-grid-three-up:before{content:'\e072'}.oi-grid-two-up:before{content:'\e073'}.oi-hard-drive:before{content:'\e074'}.oi-header:before{content:'\e075'}.oi-headphones:before{content:'\e076'}.oi-heart:before{content:'\e077'}.oi-home:before{content:'\e078'}.oi-image:before{content:'\e079'}.oi-inbox:before{content:'\e07a'}.oi-infinity:before{content:'\e07b'}.oi-info:before{content:'\e07c'}.oi-italic:before{content:'\e07d'}.oi-justify-center:before{content:'\e07e'}.oi-justify-left:before{content:'\e07f'}.oi-justify-right:before{content:'\e080'}.oi-key:before{content:'\e081'}.oi-laptop:before{content:'\e082'}.oi-layers:before{content:'\e083'}.oi-lightbulb:before{content:'\e084'}.oi-link-broken:before{content:'\e085'}.oi-link-intact:before{content:'\e086'}.oi-list-rich:before{content:'\e087'}.oi-list:before{content:'\e088'}.oi-location:before{content:'\e089'}.oi-lock-locked:before{content:'\e08a'}.oi-lock-unlocked:before{content:'\e08b'}.oi-loop-circular:before{content:'\e08c'}.oi-loop-square:before{content:'\e08d'}.oi-loop:before{content:'\e08e'}.oi-magnifying-glass:before{content:'\e08f'}.oi-map-marker:before{content:'\e090'}.oi-map:before{content:'\e091'}.oi-media-pause:before{content:'\e092'}.oi-media-play:before{content:'\e093'}.oi-media-record:before{content:'\e094'}.oi-media-skip-backward:before{content:'\e095'}.oi-media-skip-forward:before{content:'\e096'}.oi-media-step-backward:before{content:'\e097'}.oi-media-step-forward:before{content:'\e098'}.oi-media-stop:before{content:'\e099'}.oi-medical-cross:before{content:'\e09a'}.oi-menu:before{content:'\e09b'}.oi-microphone:before{content:'\e09c'}.oi-minus:before{content:'\e09d'}.oi-monitor:before{content:'\e09e'}.oi-moon:before{content:'\e09f'}.oi-move:before{content:'\e0a0'}.oi-musical-note:before{content:'\e0a1'}.oi-paperclip:before{content:'\e0a2'}.oi-pencil:before{content:'\e0a3'}.oi-people:before{content:'\e0a4'}.oi-person:before{content:'\e0a5'}.oi-phone:before{content:'\e0a6'}.oi-pie-chart:before{content:'\e0a7'}.oi-pin:before{content:'\e0a8'}.oi-play-circle:before{content:'\e0a9'}.oi-plus:before{content:'\e0aa'}.oi-power-standby:before{content:'\e0ab'}.oi-print:before{content:'\e0ac'}.oi-project:before{content:'\e0ad'}.oi-pulse:before{content:'\e0ae'}.oi-puzzle-piece:before{content:'\e0af'}.oi-question-mark:before{content:'\e0b0'}.oi-rain:before{content:'\e0b1'}.oi-random:before{content:'\e0b2'}.oi-reload:before{content:'\e0b3'}.oi-resize-both:before{content:'\e0b4'}.oi-resize-height:before{content:'\e0b5'}.oi-resize-width:before{content:'\e0b6'}.oi-rss-alt:before{content:'\e0b7'}.oi-rss:before{content:'\e0b8'}.oi-script:before{content:'\e0b9'}.oi-share-boxed:before{content:'\e0ba'}.oi-share:before{content:'\e0bb'}.oi-shield:before{content:'\e0bc'}.oi-signal:before{content:'\e0bd'}.oi-signpost:before{content:'\e0be'}.oi-sort-ascending:before{content:'\e0bf'}.oi-sort-descending:before{content:'\e0c0'}.oi-spreadsheet:before{content:'\e0c1'}.oi-star:before{content:'\e0c2'}.oi-sun:before{content:'\e0c3'}.oi-tablet:before{content:'\e0c4'}.oi-tag:before{content:'\e0c5'}.oi-tags:before{content:'\e0c6'}.oi-target:before{content:'\e0c7'}.oi-task:before{content:'\e0c8'}.oi-terminal:before{content:'\e0c9'}.oi-text:before{content:'\e0ca'}.oi-thumb-down:before{content:'\e0cb'}.oi-thumb-up:before{content:'\e0cc'}.oi-timer:before{content:'\e0cd'}.oi-transfer:before{content:'\e0ce'}.oi-trash:before{content:'\e0cf'}.oi-underline:before{content:'\e0d0'}.oi-vertical-align-bottom:before{content:'\e0d1'}.oi-vertical-align-center:before{content:'\e0d2'}.oi-vertical-align-top:before{content:'\e0d3'}.oi-video:before{content:'\e0d4'}.oi-volume-high:before{content:'\e0d5'}.oi-volume-low:before{content:'\e0d6'}.oi-volume-off:before{content:'\e0d7'}.oi-warning:before{content:'\e0d8'}.oi-wifi:before{content:'\e0d9'}.oi-wrench:before{content:'\e0da'}.oi-x:before{content:'\e0db'}.oi-yen:before{content:'\e0dc'}.oi-zoom-in:before{content:'\e0dd'}.oi-zoom-out:before{content:'\e0de'} \ No newline at end of file diff --git a/MewExplorer/wwwroot/css/open-iconic/font/fonts/open-iconic.eot b/MewExplorer/wwwroot/css/open-iconic/font/fonts/open-iconic.eot deleted file mode 100644 index f98177d..0000000 Binary files a/MewExplorer/wwwroot/css/open-iconic/font/fonts/open-iconic.eot and /dev/null differ diff --git a/MewExplorer/wwwroot/css/open-iconic/font/fonts/open-iconic.otf b/MewExplorer/wwwroot/css/open-iconic/font/fonts/open-iconic.otf deleted file mode 100644 index f6bd684..0000000 Binary files a/MewExplorer/wwwroot/css/open-iconic/font/fonts/open-iconic.otf and /dev/null differ diff --git a/MewExplorer/wwwroot/css/open-iconic/font/fonts/open-iconic.svg b/MewExplorer/wwwroot/css/open-iconic/font/fonts/open-iconic.svg deleted file mode 100644 index 32b2c4e..0000000 --- a/MewExplorer/wwwroot/css/open-iconic/font/fonts/open-iconic.svg +++ /dev/null @@ -1,543 +0,0 @@ - - - - - -Created by FontForge 20120731 at Tue Jul 1 20:39:22 2014 - By P.J. Onori -Created by P.J. Onori with FontForge 2.0 (http://fontforge.sf.net) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/MewExplorer/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf b/MewExplorer/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf deleted file mode 100644 index a894b68..0000000 Binary files a/MewExplorer/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf and /dev/null differ diff --git a/MewExplorer/wwwroot/css/open-iconic/font/fonts/open-iconic.woff b/MewExplorer/wwwroot/css/open-iconic/font/fonts/open-iconic.woff deleted file mode 100644 index f930998..0000000 Binary files a/MewExplorer/wwwroot/css/open-iconic/font/fonts/open-iconic.woff and /dev/null differ diff --git a/MewExplorer/wwwroot/favicon.ico b/MewExplorer/wwwroot/favicon.ico deleted file mode 100644 index 63e859b..0000000 Binary files a/MewExplorer/wwwroot/favicon.ico and /dev/null differ diff --git a/MewExplorer/wwwroot/index.html b/MewExplorer/wwwroot/index.html deleted file mode 100644 index 661a6ad..0000000 --- a/MewExplorer/wwwroot/index.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - MewExplorer - - - - - - - - -
- -
Loading...
- -
- An unhandled error has occurred. - Reload - 🗙 -
- - - - - - \ No newline at end of file diff --git a/MewTerminal/Commands/CommandLineExcecuteable.cs b/MewTerminal/Commands/CommandLineExcecuteable.cs index 977b438..bd044f0 100644 --- a/MewTerminal/Commands/CommandLineExcecuteable.cs +++ b/MewTerminal/Commands/CommandLineExcecuteable.cs @@ -13,27 +13,6 @@ public abstract class CommandLineExcecuteable { [Option('v', "verbosity", HelpText = "Sets the Loglevel verbosity", Default = LogLevel.None)] public LogLevel LogLevel { get; set; } = LogLevel.None; - [Usage] - public static IEnumerable Examples { - get { - return new List() { - new Example( - helpText: "Sanning from adapter with ip 127.0.0.1 and logging all critical messages", - formatStyle: UnparserSet, - sample: new ScanCommand { - IPSource = "127.0.0.1", - LogLevel = LogLevel.Critical, - }), - new Example( - helpText: "Scanning from all adapters and logging only errors", - formatStyle: UnparserSet, - sample: new ScanCommand { - LogLevel = LogLevel.Error, - }), - }; - } - } - public virtual void Run() { } public virtual Task RunAsync () => Task.CompletedTask; diff --git a/MewTerminal/Commands/ListSupportCommand.cs b/MewTerminal/Commands/ListSupportCommand.cs new file mode 100644 index 0000000..c69aec8 --- /dev/null +++ b/MewTerminal/Commands/ListSupportCommand.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using CommandLine; +using MewtocolNet; +using MewtocolNet.ComCassette; +using MewtocolNet.Logging; +using Spectre.Console; + +namespace MewTerminal.Commands; + +[Verb("support-list", HelpText = "Lists all supported PLC types")] +internal class ListSupportCommand : CommandLineExcecuteable { + + public override void Run () { + + var plcs = Enum.GetValues().Cast(); + + var lst = new List(); + + foreach (var plcT in plcs) { + + var decomp = plcT.ToNameDecompose(); + + foreach (var name in decomp) + lst.Add(name); + + } + + AnsiConsole.Write(lst.ToTable()); + + } + +} \ No newline at end of file diff --git a/MewTerminal/Commands/OnlineCommands/GetRegisterCommand.cs b/MewTerminal/Commands/OnlineCommands/GetRegisterCommand.cs new file mode 100644 index 0000000..d7094f6 --- /dev/null +++ b/MewTerminal/Commands/OnlineCommands/GetRegisterCommand.cs @@ -0,0 +1,53 @@ +using System; +using System.Collections.Generic; +using CommandLine; +using MewtocolNet; +using MewtocolNet.ComCassette; +using MewtocolNet.Logging; +using MewtocolNet.RegisterBuilding; +using Spectre.Console; + +namespace MewTerminal.Commands.OnlineCommands; + +[Verb("rget", HelpText = "Gets the values of the given PLC registers")] +internal class GetRegisterCommand : OnlineCommand { + + [Value(0, MetaName = "registers", Default = "DT0", HelpText = "The registers to read formatted as (DT0:INT)")] + public IEnumerable Registers { get; set; } + + internal override async Task AfterSetup(IPlc plc) { + + var builder = RegBuilder.ForInterface(plc); + + foreach (var reg in Registers) { + + var split = reg.Split(":"); + + if (split.Length <= 1) { + throw new FormatException($"Register name was not formatted correctly: {reg}, missing :PlcVarType"); + } + + var mewtocolName = split[0]; + var mewtocolType = split[1]; + + if (Enum.TryParse(mewtocolType, out var parsedT)) { + + builder.FromPlcRegName(mewtocolName).AsPlcType(parsedT).Build(); + + } + + } + + await plc.ConnectAsync(); + + foreach (var reg in plc.GetAllRegisters()) { + + await reg.ReadAsync(); + + } + + AnsiConsole.Write(plc.GetAllRegisters().ToTable()); + + } + +} diff --git a/MewTerminal/Commands/OnlineCommands/OnlineCommand.cs b/MewTerminal/Commands/OnlineCommands/OnlineCommand.cs new file mode 100644 index 0000000..4f60c8f --- /dev/null +++ b/MewTerminal/Commands/OnlineCommands/OnlineCommand.cs @@ -0,0 +1,46 @@ +using CommandLine; +using MewtocolNet; +using Spectre.Console; + +namespace MewTerminal.Commands.OnlineCommands; + +internal class OnlineCommand : CommandLineExcecuteable { + + [Option('e', "ethernet", Default = "127.0.0.1:9094", HelpText = "Ethernet config")] + public string? EthernetStr { get; set; } + + [Option('s', "serial", Default = null, HelpText = "Serial port config")] + public string? SerialStr { get; set; } + + public override async Task RunAsync() { + + try { + + if (!string.IsNullOrEmpty(SerialStr)) { + + } else { + + var split = EthernetStr.Split(":"); + + string ip = split[0]; + int port = int.Parse(split[1]); + + using (var plc = Mewtocol.Ethernet(ip, port)) { + + await AfterSetup(plc); + + } + + } + + } catch (Exception ex) { + + AnsiConsole.WriteLine($"[red]{ex.Message.ToString()}[/]"); + + } + + } + + internal virtual async Task AfterSetup(IPlc plc) => throw new NotImplementedException(); + +} diff --git a/MewTerminal/Commands/OnlineCommands/SetRegisterCommand.cs b/MewTerminal/Commands/OnlineCommands/SetRegisterCommand.cs new file mode 100644 index 0000000..44a6077 --- /dev/null +++ b/MewTerminal/Commands/OnlineCommands/SetRegisterCommand.cs @@ -0,0 +1,64 @@ +using CommandLine; +using MewtocolNet; +using MewtocolNet.RegisterBuilding; +using MewtocolNet.Registers; +using Spectre.Console; + +namespace MewTerminal.Commands.OnlineCommands; + +[Verb("rset", HelpText = "Sets the values of the given PLC registers")] +internal class SetRegisterCommand : OnlineCommand { + + [Value(0, MetaName = "registers", Default = "DT0", HelpText = "The registers to write formatted as (DT0:INT:VALUE)")] + public IEnumerable Registers { get; set; } + + internal override async Task AfterSetup(IPlc plc) { + + var builder = RegBuilder.ForInterface(plc); + + var toWriteVals = new List(); + + foreach (var reg in Registers) { + + var split = reg.Split(":"); + + if (split.Length <= 2) { + throw new FormatException($"Register name was not formatted correctly: {reg}, missing :PlcVarType:Value"); + } + + var mewtocolName = split[0]; + var mewtocolType = split[1]; + var value = split[2]; + + if (Enum.TryParse(mewtocolType, out var parsedT)) { + + var built = builder.FromPlcRegName(mewtocolName).AsPlcType(parsedT).Build(); + + if(built is BoolRegister) toWriteVals.Add(bool.Parse(value)); + else if(built is NumberRegister) toWriteVals.Add(short.Parse(value)); + else if(built is NumberRegister) toWriteVals.Add(ushort.Parse(value)); + else if(built is NumberRegister) toWriteVals.Add(int.Parse(value)); + else if(built is NumberRegister) toWriteVals.Add(uint.Parse(value)); + else if(built is NumberRegister) toWriteVals.Add(float.Parse(value)); + else if(built is NumberRegister) toWriteVals.Add(TimeSpan.Parse(value)); + + } + + } + + await plc.ConnectAsync(); + + int i = 0; + foreach (var reg in plc.GetAllRegisters()) { + + await reg.WriteAsync(toWriteVals[i]); + + i++; + + } + + AnsiConsole.WriteLine("All registers written"); + + } + +} \ No newline at end of file diff --git a/MewTerminal/Helpers/Helpers.cs b/MewTerminal/Helpers/Helpers.cs index bc03a36..426f341 100644 --- a/MewTerminal/Helpers/Helpers.cs +++ b/MewTerminal/Helpers/Helpers.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; using System.Linq; using System.Text; +using System.Text.RegularExpressions; using System.Threading.Tasks; namespace MewTerminal; @@ -24,7 +25,7 @@ internal static class Helpers { foreach (var prop in props) { - if(isFirst) table.AddColumn(prop.Name); + if(isFirst) table.AddColumn(prop.Name.SplitCamelCase()); var propVal = prop.GetValue(item); @@ -34,6 +35,10 @@ internal static class Helpers { strVal = string.Join(" ", bArr.Select(x => x.ToString("X2"))); } + if (propVal is string[] sArr) { + strVal = string.Join(", ", sArr); + } + strVal = strVal.Replace("[", ""); strVal = strVal.Replace("]", ""); @@ -51,4 +56,10 @@ internal static class Helpers { } + private static string SplitCamelCase (this string str) { + + return Regex.Replace(Regex.Replace(str, @"(\P{Ll})(\P{Ll}\p{Ll})", "$1 $2"), @"(\p{Ll})(\P{Ll})", "$1 $2"); + + } + } diff --git a/MewTerminal/MewTerminal.csproj b/MewTerminal/MewTerminal.csproj index 417a0cf..b986271 100644 --- a/MewTerminal/MewTerminal.csproj +++ b/MewTerminal/MewTerminal.csproj @@ -6,6 +6,8 @@ enable enable true + app.manifest + IL2026,IL2027,IL2090 @@ -18,9 +20,12 @@ - + + mewcmd x64 win-x64 + true + partial True None False diff --git a/MewTerminal/Program.cs b/MewTerminal/Program.cs index 2de046c..f12e52a 100644 --- a/MewTerminal/Program.cs +++ b/MewTerminal/Program.cs @@ -3,6 +3,7 @@ using CommandLine.Text; using MewTerminal.Commands; using MewtocolNet.Logging; using Spectre.Console; +using System.Globalization; using System.Reflection; namespace MewTerminal; @@ -11,6 +12,11 @@ internal class Program { static void Main(string[] args) { + Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture; + Thread.CurrentThread.CurrentUICulture = CultureInfo.InvariantCulture; + + Console.OutputEncoding = System.Text.Encoding.UTF8; + Logger.OnNewLogMessage((dt, lv, msg) => { AnsiConsole.WriteLine($"{msg}"); diff --git a/MewTerminal/app.manifest b/MewTerminal/app.manifest new file mode 100644 index 0000000..5f7eccd --- /dev/null +++ b/MewTerminal/app.manifest @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/MewtocolNet.sln b/MewtocolNet.sln index 8a20ae2..a957c67 100644 --- a/MewtocolNet.sln +++ b/MewtocolNet.sln @@ -7,8 +7,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MewtocolNet", "MewtocolNet\ EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MewtocolTests", "MewtocolTests\MewtocolTests.csproj", "{C1BF3AB0-CDFE-4070-A759-C3B25A20ABE1}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MewExplorer", "MewExplorer\MewExplorer.csproj", "{F243F38A-76D3-4C38-BAE6-C61729479661}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DocBuilder", "DocBuilder\DocBuilder.csproj", "{50F2D23F-C875-4006-A0B6-7F5A181BC944}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MewTerminal", "MewTerminal\MewTerminal.csproj", "{D1E751C6-296F-4CF1-AE28-C6D4388C7CF1}" @@ -47,24 +45,6 @@ Global {C1BF3AB0-CDFE-4070-A759-C3B25A20ABE1}.Release|x64.Build.0 = Release|Any CPU {C1BF3AB0-CDFE-4070-A759-C3B25A20ABE1}.Release|x86.ActiveCfg = Release|Any CPU {C1BF3AB0-CDFE-4070-A759-C3B25A20ABE1}.Release|x86.Build.0 = Release|Any CPU - {F243F38A-76D3-4C38-BAE6-C61729479661}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {F243F38A-76D3-4C38-BAE6-C61729479661}.Debug|Any CPU.Build.0 = Debug|Any CPU - {F243F38A-76D3-4C38-BAE6-C61729479661}.Debug|Any CPU.Deploy.0 = Debug|Any CPU - {F243F38A-76D3-4C38-BAE6-C61729479661}.Debug|x64.ActiveCfg = Debug|Any CPU - {F243F38A-76D3-4C38-BAE6-C61729479661}.Debug|x64.Build.0 = Debug|Any CPU - {F243F38A-76D3-4C38-BAE6-C61729479661}.Debug|x64.Deploy.0 = Debug|Any CPU - {F243F38A-76D3-4C38-BAE6-C61729479661}.Debug|x86.ActiveCfg = Debug|Any CPU - {F243F38A-76D3-4C38-BAE6-C61729479661}.Debug|x86.Build.0 = Debug|Any CPU - {F243F38A-76D3-4C38-BAE6-C61729479661}.Debug|x86.Deploy.0 = Debug|Any CPU - {F243F38A-76D3-4C38-BAE6-C61729479661}.Release|Any CPU.ActiveCfg = Release|Any CPU - {F243F38A-76D3-4C38-BAE6-C61729479661}.Release|Any CPU.Build.0 = Release|Any CPU - {F243F38A-76D3-4C38-BAE6-C61729479661}.Release|Any CPU.Deploy.0 = Release|Any CPU - {F243F38A-76D3-4C38-BAE6-C61729479661}.Release|x64.ActiveCfg = Release|Any CPU - {F243F38A-76D3-4C38-BAE6-C61729479661}.Release|x64.Build.0 = Release|Any CPU - {F243F38A-76D3-4C38-BAE6-C61729479661}.Release|x64.Deploy.0 = Release|Any CPU - {F243F38A-76D3-4C38-BAE6-C61729479661}.Release|x86.ActiveCfg = Release|Any CPU - {F243F38A-76D3-4C38-BAE6-C61729479661}.Release|x86.Build.0 = Release|Any CPU - {F243F38A-76D3-4C38-BAE6-C61729479661}.Release|x86.Deploy.0 = Release|Any CPU {50F2D23F-C875-4006-A0B6-7F5A181BC944}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {50F2D23F-C875-4006-A0B6-7F5A181BC944}.Debug|Any CPU.Build.0 = Debug|Any CPU {50F2D23F-C875-4006-A0B6-7F5A181BC944}.Debug|x64.ActiveCfg = Debug|Any CPU diff --git a/MewtocolNet/Helpers/ParsedPlcName.cs b/MewtocolNet/Helpers/ParsedPlcName.cs index c1e9ea2..395cf08 100644 --- a/MewtocolNet/Helpers/ParsedPlcName.cs +++ b/MewtocolNet/Helpers/ParsedPlcName.cs @@ -56,7 +56,7 @@ namespace MewtocolNet { string additionalStr = match.Groups["additional"].Value; string[] subTypes = additionalStr.Split('_').Select(x => SanitizePlcEncodedString(x)).ToArray(); - string wholeName = $"{groupStr} {sizeFl:0.##}k{(subTypes.Length > 1 ? " " : "")}{string.Join(",", subTypes)}"; + string wholeName = $"{groupStr} {sizeFl:0.##}k{(subTypes.Length > 0 ? " " : "")}{string.Join(",", subTypes)}"; if (string.IsNullOrEmpty(subTypes[0])) subTypes = Array.Empty(); diff --git a/MewtocolNet/RegisterBuilding/RegBuilder.cs b/MewtocolNet/RegisterBuilding/RegBuilder.cs index 6994662..5e54978 100644 --- a/MewtocolNet/RegisterBuilding/RegBuilder.cs +++ b/MewtocolNet/RegisterBuilding/RegBuilder.cs @@ -29,14 +29,6 @@ namespace MewtocolNet.RegisterBuilding { } - public static RegBuilder ForInterface(IPlcSerial interf) { - - var rb = new RegBuilder(); - rb.forInterface = interf as MewtocolInterface; - return rb; - - } - public static RegBuilder Factory { get; private set; } = new RegBuilder();