├── angular-react-vue ├── EdgeSharp.React.Sample │ ├── reactapp │ │ ├── src │ │ │ ├── index.css │ │ │ ├── index.html │ │ │ ├── index.js │ │ │ └── components │ │ │ │ └── Home.js │ │ ├── .babelrc │ │ ├── dist │ │ │ ├── index.html │ │ │ └── main.js.LICENSE.txt │ │ ├── package.json │ │ └── webpack.config.js │ ├── MvcMovie.db │ ├── edgesharp.ico │ ├── SampleWindow.cs │ ├── SampleConfig.cs │ └── Program.cs ├── EdgeSharp.Angular.Sample │ ├── angularapp │ │ ├── src │ │ │ ├── assets │ │ │ │ ├── .gitkeep │ │ │ │ └── img │ │ │ │ │ └── favicon.ico │ │ │ ├── app │ │ │ │ ├── app.component.css │ │ │ │ ├── components │ │ │ │ │ ├── home │ │ │ │ │ │ ├── home.component.css │ │ │ │ │ │ ├── home.component.spec.ts │ │ │ │ │ │ ├── home.component.ts │ │ │ │ │ │ └── home.component.html │ │ │ │ │ └── tmdbmovies │ │ │ │ │ │ ├── tmdb-movies.component.css │ │ │ │ │ │ └── tmdb-movies.component.spec.ts │ │ │ │ ├── services │ │ │ │ │ ├── service.config.ts │ │ │ │ │ ├── action.controller.client.service.spec.ts │ │ │ │ │ └── action.controller.client.service.ts │ │ │ │ ├── app-routing.module.ts │ │ │ │ ├── app.component.ts │ │ │ │ ├── app.module.ts │ │ │ │ └── app.component.spec.ts │ │ │ ├── environments │ │ │ │ ├── environment.prod.ts │ │ │ │ └── environment.ts │ │ │ ├── styles.css │ │ │ ├── index.html │ │ │ ├── main.ts │ │ │ └── test.ts │ │ ├── .editorconfig │ │ ├── tsconfig.app.json │ │ ├── tsconfig.spec.json │ │ ├── .browserslistrc │ │ ├── .gitignore │ │ ├── tsconfig.json │ │ ├── README.md │ │ ├── package.json │ │ └── karma.conf.js │ ├── MvcMovie.db │ ├── edgesharp.ico │ ├── SampleWindow.cs │ ├── SampleConfig.cs │ └── Program.cs ├── EdgeSharp.Vue.Sample │ ├── vueapp │ │ ├── babel.config.js │ │ ├── public │ │ │ ├── favicon.ico │ │ │ └── index.html │ │ ├── src │ │ │ ├── assets │ │ │ │ └── logo.png │ │ │ ├── main.js │ │ │ ├── router │ │ │ │ └── index.js │ │ │ └── components │ │ │ │ └── Home.vue │ │ ├── .gitignore │ │ ├── README.md │ │ └── package.json │ ├── MvcMovie.db │ ├── edgesharp.ico │ ├── SampleWindow.cs │ ├── SampleConfig.cs │ └── Program.cs └── EdgeSharp.Shared │ ├── Models │ ├── ErrorViewModel.cs │ ├── Info.cs │ ├── MoviesViewModel.cs │ ├── Movie.cs │ └── TmdMovie.cs │ ├── Data │ └── MovieContext.cs │ ├── EdgeSharp.Shared.csproj │ └── ActionControllers │ └── HomeActionController.cs ├── README.md ├── win-32 ├── EdgeSharp.Razor.Sample │ ├── Views │ │ ├── _ViewStart.cshtml │ │ ├── _ViewImports.cshtml │ │ ├── Shared │ │ │ ├── _ValidationScriptsPartial.cshtml │ │ │ └── Error.cshtml │ │ ├── Home │ │ │ └── Index.cshtml │ │ └── Movies │ │ │ ├── Details.cshtml │ │ │ └── Delete.cshtml │ ├── MvcMovie.db │ ├── edgesharp.ico │ ├── assets │ │ ├── favicon.ico │ │ ├── img │ │ │ └── edgesharp.png │ │ ├── jquery-validation-unobtrusive │ │ │ └── LICENSE.txt │ │ └── jquery-validation │ │ │ └── LICENSE.md │ ├── Models │ │ └── MovieGenreViewModel.cs │ ├── Program.cs │ ├── SampleWindow.cs │ ├── SampleConfig.cs │ ├── Controllers │ │ └── HomeController.cs │ └── EdgeSharp.Razor.Sample.csproj ├── EdgeSharp.Sample │ ├── MvcMovie.db │ ├── edgesharp.ico │ ├── app │ │ ├── favicon.ico │ │ ├── pages │ │ │ ├── error.html │ │ │ ├── moviedetails.js │ │ │ ├── moviecreate.js │ │ │ ├── moviedetails.html │ │ │ ├── home.html │ │ │ ├── moviedelete.html │ │ │ ├── movies.html │ │ │ ├── moviedelete.js │ │ │ ├── home.js │ │ │ └── movieedit.js │ │ ├── jquery-validation-unobtrusive │ │ │ └── LICENSE.txt │ │ └── jquery-validation │ │ │ └── LICENSE.md │ ├── SampleWindow.cs │ ├── Program.cs │ └── SampleConfig.cs └── EdgeSharp.Shared │ ├── Models │ ├── ErrorViewModel.cs │ ├── Info.cs │ ├── MoviesViewModel.cs │ ├── Movie.cs │ └── TmdMovie.cs │ ├── Data │ └── MovieContext.cs │ ├── EdgeSharp.Shared.csproj │ └── ActionControllers │ └── HomeActionController.cs ├── wpf ├── EdgeSharp.Wpf.RazorPages.Sample │ ├── Pages │ │ ├── _ViewStart.cshtml │ │ ├── _ViewImports.cshtml │ │ ├── Shared │ │ │ └── _ValidationScriptsPartial.cshtml │ │ ├── Error.cshtml.cs │ │ ├── Error.cshtml │ │ ├── Index.cshtml.cs │ │ ├── Movies │ │ │ ├── Details.cshtml.cs │ │ │ ├── Create.cshtml.cs │ │ │ ├── Delete.cshtml.cs │ │ │ ├── Details.cshtml │ │ │ ├── Delete.cshtml │ │ │ └── Edit.cshtml.cs │ │ └── Index.cshtml │ ├── Program.cs │ ├── MvcMovie.db │ ├── edgesharp.ico │ ├── assets │ │ ├── favicon.ico │ │ ├── img │ │ │ └── edgesharp.png │ │ ├── jquery-validation-unobtrusive │ │ │ └── LICENSE.txt │ │ └── jquery-validation │ │ │ └── LICENSE.md │ ├── MainWindow.xaml.cs │ ├── App.xaml │ ├── AssemblyInfo.cs │ ├── SampleWindow.cs │ ├── MainWindow.xaml │ ├── App.xaml.cs │ ├── SampleWebView2Control.cs │ ├── SampleConfig.cs │ └── EdgeSharp.Wpf.RazorPages.Sample.csproj ├── EdgeSharp.Wpf.Sample │ ├── MvcMovie.db │ ├── edgesharp.ico │ ├── app │ │ ├── favicon.ico │ │ ├── pages │ │ │ ├── error.html │ │ │ ├── moviedetails.js │ │ │ ├── moviecreate.js │ │ │ ├── moviedetails.html │ │ │ ├── home.html │ │ │ ├── moviedelete.html │ │ │ ├── movies.html │ │ │ ├── moviedelete.js │ │ │ ├── home.js │ │ │ └── movieedit.js │ │ ├── jquery-validation-unobtrusive │ │ │ └── LICENSE.txt │ │ └── jquery-validation │ │ │ └── LICENSE.md │ ├── MainWindow.xaml.cs │ ├── App.xaml │ ├── AssemblyInfo.cs │ ├── SampleWindow.cs │ ├── App.xaml.cs │ ├── Startup.cs │ ├── SampleWebView2Control.cs │ ├── MainWindow.xaml │ └── SampleConfig.cs └── EdgeSharp.Shared │ ├── Models │ ├── ErrorViewModel.cs │ ├── Info.cs │ ├── MoviesViewModel.cs │ ├── Movie.cs │ └── TmdMovie.cs │ ├── Data │ └── MovieContext.cs │ ├── EdgeSharp.Shared.csproj │ └── ActionControllers │ └── HomeActionController.cs ├── winform ├── EdgeSharp.WinForms.Razor.Sample │ ├── Views │ │ ├── _ViewStart.cshtml │ │ ├── _ViewImports.cshtml │ │ ├── Shared │ │ │ ├── _ValidationScriptsPartial.cshtml │ │ │ └── Error.cshtml │ │ ├── Home │ │ │ └── Index.cshtml │ │ └── Movies │ │ │ ├── Details.cshtml │ │ │ └── Delete.cshtml │ ├── MvcMovie.db │ ├── edgesharp.ico │ ├── assets │ │ ├── favicon.ico │ │ ├── img │ │ │ └── edgesharp.png │ │ ├── jquery-validation-unobtrusive │ │ │ └── LICENSE.txt │ │ └── jquery-validation │ │ │ └── LICENSE.md │ ├── Form1.cs │ ├── Models │ │ └── MovieGenreViewModel.cs │ ├── Helper.cs │ ├── SampleBrowserForm.cs │ ├── Program.cs │ ├── SampleWebView2Control.cs │ ├── Controllers │ │ └── HomeController.cs │ ├── SampleConfig.cs │ └── EdgeSharp.WinForms.Razor.Sample.csproj ├── EdgeSharp.WinForms.Sample │ ├── MvcMovie.db │ ├── edgesharp.ico │ ├── app │ │ ├── favicon.ico │ │ ├── pages │ │ │ ├── error.html │ │ │ ├── moviedetails.js │ │ │ ├── moviecreate.js │ │ │ ├── moviedetails.html │ │ │ ├── home.html │ │ │ ├── moviedelete.html │ │ │ ├── movies.html │ │ │ ├── moviedelete.js │ │ │ ├── home.js │ │ │ └── movieedit.js │ │ ├── jquery-validation-unobtrusive │ │ │ └── LICENSE.txt │ │ └── jquery-validation │ │ │ └── LICENSE.md │ ├── Form1.cs │ ├── Helper.cs │ ├── SampleBrowserForm.cs │ ├── Program.cs │ ├── SampleWebView2Control.cs │ ├── Startup.cs │ └── SampleConfig.cs └── EdgeSharp.Shared │ ├── Models │ ├── ErrorViewModel.cs │ ├── Info.cs │ ├── MoviesViewModel.cs │ ├── Movie.cs │ └── TmdMovie.cs │ ├── Data │ └── MovieContext.cs │ ├── EdgeSharp.Shared.csproj │ └── ActionControllers │ └── HomeActionController.cs └── LICENSE /angular-react-vue/EdgeSharp.React.Sample/reactapp/src/index.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /angular-react-vue/EdgeSharp.Angular.Sample/angularapp/src/assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /angular-react-vue/EdgeSharp.Angular.Sample/angularapp/src/app/app.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # EdgeSharp.Samples 2 | Samples of how EdgeSharp libraries can be used 3 | -------------------------------------------------------------------------------- /angular-react-vue/EdgeSharp.Angular.Sample/angularapp/src/app/components/home/home.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /win-32/EdgeSharp.Razor.Sample/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /wpf/EdgeSharp.Wpf.RazorPages.Sample/Pages/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /winform/EdgeSharp.WinForms.Razor.Sample/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /angular-react-vue/EdgeSharp.Angular.Sample/angularapp/src/app/components/tmdbmovies/tmdb-movies.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /win-32/EdgeSharp.Sample/MvcMovie.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webview2/EdgeSharp.Samples/HEAD/win-32/EdgeSharp.Sample/MvcMovie.db -------------------------------------------------------------------------------- /win-32/EdgeSharp.Sample/edgesharp.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webview2/EdgeSharp.Samples/HEAD/win-32/EdgeSharp.Sample/edgesharp.ico -------------------------------------------------------------------------------- /wpf/EdgeSharp.Wpf.Sample/MvcMovie.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webview2/EdgeSharp.Samples/HEAD/wpf/EdgeSharp.Wpf.Sample/MvcMovie.db -------------------------------------------------------------------------------- /wpf/EdgeSharp.Wpf.Sample/edgesharp.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webview2/EdgeSharp.Samples/HEAD/wpf/EdgeSharp.Wpf.Sample/edgesharp.ico -------------------------------------------------------------------------------- /win-32/EdgeSharp.Sample/app/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webview2/EdgeSharp.Samples/HEAD/win-32/EdgeSharp.Sample/app/favicon.ico -------------------------------------------------------------------------------- /wpf/EdgeSharp.Wpf.Sample/app/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webview2/EdgeSharp.Samples/HEAD/wpf/EdgeSharp.Wpf.Sample/app/favicon.ico -------------------------------------------------------------------------------- /win-32/EdgeSharp.Razor.Sample/MvcMovie.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webview2/EdgeSharp.Samples/HEAD/win-32/EdgeSharp.Razor.Sample/MvcMovie.db -------------------------------------------------------------------------------- /win-32/EdgeSharp.Razor.Sample/edgesharp.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webview2/EdgeSharp.Samples/HEAD/win-32/EdgeSharp.Razor.Sample/edgesharp.ico -------------------------------------------------------------------------------- /angular-react-vue/EdgeSharp.Angular.Sample/angularapp/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /angular-react-vue/EdgeSharp.Angular.Sample/angularapp/src/styles.css: -------------------------------------------------------------------------------- 1 | /* You can add global styles to this file, and also import other style files */ 2 | -------------------------------------------------------------------------------- /win-32/EdgeSharp.Sample/app/pages/error.html: -------------------------------------------------------------------------------- 1 |
2 |

404

3 |

Page not found.

4 |
-------------------------------------------------------------------------------- /winform/EdgeSharp.WinForms.Sample/MvcMovie.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webview2/EdgeSharp.Samples/HEAD/winform/EdgeSharp.WinForms.Sample/MvcMovie.db -------------------------------------------------------------------------------- /wpf/EdgeSharp.Wpf.RazorPages.Sample/Program.cs: -------------------------------------------------------------------------------- 1 | namespace EdgeSharp.Wpf.RazorPages.Sample 2 | { 3 | internal class Program 4 | { 5 | } 6 | } -------------------------------------------------------------------------------- /wpf/EdgeSharp.Wpf.Sample/app/pages/error.html: -------------------------------------------------------------------------------- 1 |
2 |

404

3 |

Page not found.

4 |
-------------------------------------------------------------------------------- /angular-react-vue/EdgeSharp.Vue.Sample/vueapp/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | '@vue/cli-plugin-babel/preset' 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /win-32/EdgeSharp.Razor.Sample/assets/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webview2/EdgeSharp.Samples/HEAD/win-32/EdgeSharp.Razor.Sample/assets/favicon.ico -------------------------------------------------------------------------------- /winform/EdgeSharp.WinForms.Sample/edgesharp.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webview2/EdgeSharp.Samples/HEAD/winform/EdgeSharp.WinForms.Sample/edgesharp.ico -------------------------------------------------------------------------------- /wpf/EdgeSharp.Wpf.RazorPages.Sample/MvcMovie.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webview2/EdgeSharp.Samples/HEAD/wpf/EdgeSharp.Wpf.RazorPages.Sample/MvcMovie.db -------------------------------------------------------------------------------- /angular-react-vue/EdgeSharp.Vue.Sample/MvcMovie.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webview2/EdgeSharp.Samples/HEAD/angular-react-vue/EdgeSharp.Vue.Sample/MvcMovie.db -------------------------------------------------------------------------------- /winform/EdgeSharp.WinForms.Sample/app/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webview2/EdgeSharp.Samples/HEAD/winform/EdgeSharp.WinForms.Sample/app/favicon.ico -------------------------------------------------------------------------------- /winform/EdgeSharp.WinForms.Sample/app/pages/error.html: -------------------------------------------------------------------------------- 1 |
2 |

404

3 |

Page not found.

4 |
-------------------------------------------------------------------------------- /wpf/EdgeSharp.Wpf.RazorPages.Sample/edgesharp.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webview2/EdgeSharp.Samples/HEAD/wpf/EdgeSharp.Wpf.RazorPages.Sample/edgesharp.ico -------------------------------------------------------------------------------- /angular-react-vue/EdgeSharp.React.Sample/MvcMovie.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webview2/EdgeSharp.Samples/HEAD/angular-react-vue/EdgeSharp.React.Sample/MvcMovie.db -------------------------------------------------------------------------------- /angular-react-vue/EdgeSharp.Vue.Sample/edgesharp.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webview2/EdgeSharp.Samples/HEAD/angular-react-vue/EdgeSharp.Vue.Sample/edgesharp.ico -------------------------------------------------------------------------------- /winform/EdgeSharp.WinForms.Razor.Sample/MvcMovie.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webview2/EdgeSharp.Samples/HEAD/winform/EdgeSharp.WinForms.Razor.Sample/MvcMovie.db -------------------------------------------------------------------------------- /winform/EdgeSharp.WinForms.Razor.Sample/edgesharp.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webview2/EdgeSharp.Samples/HEAD/winform/EdgeSharp.WinForms.Razor.Sample/edgesharp.ico -------------------------------------------------------------------------------- /angular-react-vue/EdgeSharp.Angular.Sample/MvcMovie.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webview2/EdgeSharp.Samples/HEAD/angular-react-vue/EdgeSharp.Angular.Sample/MvcMovie.db -------------------------------------------------------------------------------- /angular-react-vue/EdgeSharp.React.Sample/edgesharp.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webview2/EdgeSharp.Samples/HEAD/angular-react-vue/EdgeSharp.React.Sample/edgesharp.ico -------------------------------------------------------------------------------- /win-32/EdgeSharp.Razor.Sample/assets/img/edgesharp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webview2/EdgeSharp.Samples/HEAD/win-32/EdgeSharp.Razor.Sample/assets/img/edgesharp.png -------------------------------------------------------------------------------- /wpf/EdgeSharp.Wpf.RazorPages.Sample/assets/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webview2/EdgeSharp.Samples/HEAD/wpf/EdgeSharp.Wpf.RazorPages.Sample/assets/favicon.ico -------------------------------------------------------------------------------- /angular-react-vue/EdgeSharp.Angular.Sample/edgesharp.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webview2/EdgeSharp.Samples/HEAD/angular-react-vue/EdgeSharp.Angular.Sample/edgesharp.ico -------------------------------------------------------------------------------- /win-32/EdgeSharp.Razor.Sample/Views/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using EdgeSharp.Shared 2 | @using EdgeSharp.Shared.Models 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | -------------------------------------------------------------------------------- /winform/EdgeSharp.WinForms.Razor.Sample/assets/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webview2/EdgeSharp.Samples/HEAD/winform/EdgeSharp.WinForms.Razor.Sample/assets/favicon.ico -------------------------------------------------------------------------------- /wpf/EdgeSharp.Wpf.RazorPages.Sample/assets/img/edgesharp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webview2/EdgeSharp.Samples/HEAD/wpf/EdgeSharp.Wpf.RazorPages.Sample/assets/img/edgesharp.png -------------------------------------------------------------------------------- /angular-react-vue/EdgeSharp.Vue.Sample/vueapp/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webview2/EdgeSharp.Samples/HEAD/angular-react-vue/EdgeSharp.Vue.Sample/vueapp/public/favicon.ico -------------------------------------------------------------------------------- /angular-react-vue/EdgeSharp.Vue.Sample/vueapp/src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webview2/EdgeSharp.Samples/HEAD/angular-react-vue/EdgeSharp.Vue.Sample/vueapp/src/assets/logo.png -------------------------------------------------------------------------------- /winform/EdgeSharp.WinForms.Razor.Sample/assets/img/edgesharp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webview2/EdgeSharp.Samples/HEAD/winform/EdgeSharp.WinForms.Razor.Sample/assets/img/edgesharp.png -------------------------------------------------------------------------------- /wpf/EdgeSharp.Wpf.RazorPages.Sample/Pages/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using EdgeSharp.Wpf.RazorPages.Sample 2 | @namespace EdgeSharp.Wpf.RazorPages.Sample.Pages 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | -------------------------------------------------------------------------------- /angular-react-vue/EdgeSharp.Angular.Sample/angularapp/src/assets/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/webview2/EdgeSharp.Samples/HEAD/angular-react-vue/EdgeSharp.Angular.Sample/angularapp/src/assets/img/favicon.ico -------------------------------------------------------------------------------- /angular-react-vue/EdgeSharp.Angular.Sample/angularapp/src/app/services/service.config.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | 3 | Injectable() 4 | export class ServiceConfig{ 5 | public ipcoption = 'hostobject'; 6 | } -------------------------------------------------------------------------------- /angular-react-vue/EdgeSharp.React.Sample/reactapp/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "sourceType": "unambiguous", 3 | "presets": ["@babel/preset-env", "@babel/preset-react"], 4 | "plugins": [ 5 | ["@babel/transform-runtime"] 6 | ] 7 | } -------------------------------------------------------------------------------- /angular-react-vue/EdgeSharp.Vue.Sample/vueapp/src/main.js: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue' 2 | import App from './App.vue' 3 | import router from './router' 4 | 5 | window.$ipcoption = 'hostobject'; 6 | 7 | createApp(App).use(router).mount('#app') -------------------------------------------------------------------------------- /winform/EdgeSharp.WinForms.Razor.Sample/Views/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using EdgeSharp.Shared.Models 2 | @using EdgeSharp.WinForms.Razor.Sample 3 | @using EdgeSharp.WinForms.Razor.Sample.Models 4 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 5 | -------------------------------------------------------------------------------- /win-32/EdgeSharp.Razor.Sample/Views/Shared/_ValidationScriptsPartial.cshtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /winform/EdgeSharp.WinForms.Razor.Sample/Views/Shared/_ValidationScriptsPartial.cshtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /wpf/EdgeSharp.Wpf.RazorPages.Sample/Pages/Shared/_ValidationScriptsPartial.cshtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /wpf/EdgeSharp.Shared/Models/ErrorViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace EdgeSharp.Shared.Models 2 | { 3 | public class ErrorViewModel 4 | { 5 | public string RequestId { get; set; } 6 | 7 | public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /win-32/EdgeSharp.Shared/Models/ErrorViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace EdgeSharp.Shared.Models 2 | { 3 | public class ErrorViewModel 4 | { 5 | public string RequestId { get; set; } 6 | 7 | public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /winform/EdgeSharp.Shared/Models/ErrorViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace EdgeSharp.Shared.Models 2 | { 3 | public class ErrorViewModel 4 | { 5 | public string RequestId { get; set; } 6 | 7 | public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /winform/EdgeSharp.WinForms.Sample/Form1.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Forms; 2 | 3 | namespace EdgeSharp.WinForms.Sample 4 | { 5 | public partial class Form1 : Form 6 | { 7 | public Form1() 8 | { 9 | InitializeComponent(); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /angular-react-vue/EdgeSharp.Shared/Models/ErrorViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace EdgeSharp.Shared.Models 2 | { 3 | public class ErrorViewModel 4 | { 5 | public string RequestId { get; set; } 6 | 7 | public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /winform/EdgeSharp.WinForms.Razor.Sample/Form1.cs: -------------------------------------------------------------------------------- 1 | using System.Windows.Forms; 2 | 3 | namespace EdgeSharp.WinForms.Razor.Sample 4 | { 5 | public partial class Form1 : Form 6 | { 7 | public Form1() 8 | { 9 | InitializeComponent(); 10 | } 11 | 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /angular-react-vue/EdgeSharp.React.Sample/reactapp/dist/index.html: -------------------------------------------------------------------------------- 1 | EdgeSharp React Demo
-------------------------------------------------------------------------------- /angular-react-vue/EdgeSharp.Vue.Sample/vueapp/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | 6 | # local env files 7 | .env.local 8 | .env.*.local 9 | 10 | # Log files 11 | npm-debug.log* 12 | yarn-debug.log* 13 | yarn-error.log* 14 | pnpm-debug.log* 15 | 16 | # Editor directories and files 17 | .idea 18 | .vscode 19 | *.suo 20 | *.ntvs* 21 | *.njsproj 22 | *.sln 23 | *.sw? 24 | -------------------------------------------------------------------------------- /wpf/EdgeSharp.Shared/Models/Info.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace EdgeSharp.Shared.Models 4 | { 5 | public class Info 6 | { 7 | [Display(Name = "SDK Version")] 8 | public string SdkVersion { get; set; } 9 | 10 | [Display(Name = "Runtime Version")] 11 | public string RuntimeVersion { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /wpf/EdgeSharp.Wpf.Sample/MainWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | 3 | namespace EdgeSharp.Wpf.Sample 4 | { 5 | /// 6 | /// Interaction logic for MainWindow.xaml 7 | /// 8 | public partial class MainWindow : Window 9 | { 10 | public MainWindow() 11 | { 12 | InitializeComponent(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /win-32/EdgeSharp.Shared/Models/Info.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace EdgeSharp.Shared.Models 4 | { 5 | public class Info 6 | { 7 | [Display(Name = "SDK Version")] 8 | public string SdkVersion { get; set; } 9 | 10 | [Display(Name = "Runtime Version")] 11 | public string RuntimeVersion { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /winform/EdgeSharp.Shared/Models/Info.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace EdgeSharp.Shared.Models 4 | { 5 | public class Info 6 | { 7 | [Display(Name = "SDK Version")] 8 | public string SdkVersion { get; set; } 9 | 10 | [Display(Name = "Runtime Version")] 11 | public string RuntimeVersion { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /wpf/EdgeSharp.Wpf.Sample/App.xaml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /angular-react-vue/EdgeSharp.Angular.Sample/angularapp/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Angularapp 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /angular-react-vue/EdgeSharp.Shared/Models/Info.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | 3 | namespace EdgeSharp.Shared.Models 4 | { 5 | public class Info 6 | { 7 | [Display(Name = "SDK Version")] 8 | public string SdkVersion { get; set; } 9 | 10 | [Display(Name = "Runtime Version")] 11 | public string RuntimeVersion { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /wpf/EdgeSharp.Shared/Models/MoviesViewModel.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace EdgeSharp.Shared.Models 4 | { 5 | public class MoviesViewModel 6 | { 7 | public List Movies { get; set; } 8 | public List Genres { get; set; } 9 | public string MovieGenre { get; set; } 10 | public string SearchString { get; set; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /angular-react-vue/EdgeSharp.Angular.Sample/angularapp/.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see https://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.ts] 12 | quote_type = single 13 | 14 | [*.md] 15 | max_line_length = off 16 | trim_trailing_whitespace = false 17 | -------------------------------------------------------------------------------- /win-32/EdgeSharp.Shared/Models/MoviesViewModel.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace EdgeSharp.Shared.Models 4 | { 5 | public class MoviesViewModel 6 | { 7 | public List Movies { get; set; } 8 | public List Genres { get; set; } 9 | public string MovieGenre { get; set; } 10 | public string SearchString { get; set; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /winform/EdgeSharp.Shared/Models/MoviesViewModel.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace EdgeSharp.Shared.Models 4 | { 5 | public class MoviesViewModel 6 | { 7 | public List Movies { get; set; } 8 | public List Genres { get; set; } 9 | public string MovieGenre { get; set; } 10 | public string SearchString { get; set; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /wpf/EdgeSharp.Wpf.RazorPages.Sample/MainWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | 3 | namespace EdgeSharp.Wpf.RazorPages.Sample 4 | { 5 | /// 6 | /// Interaction logic for MainWindow.xaml 7 | /// 8 | public partial class MainWindow : Window 9 | { 10 | public MainWindow() 11 | { 12 | InitializeComponent(); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /angular-react-vue/EdgeSharp.Shared/Models/MoviesViewModel.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace EdgeSharp.Shared.Models 4 | { 5 | public class MoviesViewModel 6 | { 7 | public List Movies { get; set; } 8 | public List Genres { get; set; } 9 | public string MovieGenre { get; set; } 10 | public string SearchString { get; set; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /angular-react-vue/EdgeSharp.Angular.Sample/angularapp/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */ 2 | { 3 | "extends": "./tsconfig.json", 4 | "compilerOptions": { 5 | "outDir": "./out-tsc/app", 6 | "types": [] 7 | }, 8 | "files": [ 9 | "src/main.ts", 10 | "src/polyfills.ts" 11 | ], 12 | "include": [ 13 | "src/**/*.d.ts" 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /wpf/EdgeSharp.Wpf.RazorPages.Sample/App.xaml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /win-32/EdgeSharp.Shared/Data/MovieContext.cs: -------------------------------------------------------------------------------- 1 | using EdgeSharp.Shared.Models; 2 | using Microsoft.EntityFrameworkCore; 3 | 4 | namespace EdgeSharp.Shared.Data 5 | { 6 | public class MovieContext : DbContext 7 | { 8 | protected override void OnConfiguring(DbContextOptionsBuilder options) 9 | => options.UseSqlite("Data Source=MvcMovie.db"); 10 | 11 | public DbSet Movie { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /wpf/EdgeSharp.Shared/Data/MovieContext.cs: -------------------------------------------------------------------------------- 1 | using EdgeSharp.Shared.Models; 2 | using Microsoft.EntityFrameworkCore; 3 | 4 | namespace EdgeSharp.Shared.Data 5 | { 6 | public class MovieContext : DbContext 7 | { 8 | protected override void OnConfiguring(DbContextOptionsBuilder options) 9 | => options.UseSqlite("Data Source=MvcMovie.db"); 10 | 11 | public DbSet Movie { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /winform/EdgeSharp.Shared/Data/MovieContext.cs: -------------------------------------------------------------------------------- 1 | using EdgeSharp.Shared.Models; 2 | using Microsoft.EntityFrameworkCore; 3 | 4 | namespace EdgeSharp.Shared.Data 5 | { 6 | public class MovieContext : DbContext 7 | { 8 | protected override void OnConfiguring(DbContextOptionsBuilder options) 9 | => options.UseSqlite("Data Source=MvcMovie.db"); 10 | 11 | public DbSet Movie { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /angular-react-vue/EdgeSharp.React.Sample/reactapp/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | EdgeSharp React Demo 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /angular-react-vue/EdgeSharp.Shared/Data/MovieContext.cs: -------------------------------------------------------------------------------- 1 | using EdgeSharp.Shared.Models; 2 | using Microsoft.EntityFrameworkCore; 3 | 4 | namespace EdgeSharp.Shared.Data 5 | { 6 | public class MovieContext : DbContext 7 | { 8 | protected override void OnConfiguring(DbContextOptionsBuilder options) 9 | => options.UseSqlite("Data Source=MvcMovie.db"); 10 | 11 | public DbSet Movie { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /angular-react-vue/EdgeSharp.Angular.Sample/angularapp/src/main.ts: -------------------------------------------------------------------------------- 1 | import { enableProdMode } from '@angular/core'; 2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 3 | 4 | import { AppModule } from './app/app.module'; 5 | import { environment } from './environments/environment'; 6 | 7 | if (environment.production) { 8 | enableProdMode(); 9 | } 10 | 11 | platformBrowserDynamic().bootstrapModule(AppModule) 12 | .catch(err => console.error(err)); 13 | -------------------------------------------------------------------------------- /angular-react-vue/EdgeSharp.Angular.Sample/angularapp/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */ 2 | { 3 | "extends": "./tsconfig.json", 4 | "compilerOptions": { 5 | "outDir": "./out-tsc/spec", 6 | "types": [ 7 | "jasmine" 8 | ] 9 | }, 10 | "files": [ 11 | "src/test.ts", 12 | "src/polyfills.ts" 13 | ], 14 | "include": [ 15 | "src/**/*.spec.ts", 16 | "src/**/*.d.ts" 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /angular-react-vue/EdgeSharp.Vue.Sample/vueapp/README.md: -------------------------------------------------------------------------------- 1 | # vueapp 2 | 3 | ## Project setup 4 | ``` 5 | npm install 6 | ``` 7 | 8 | ### Compiles and hot-reloads for development 9 | ``` 10 | npm run serve 11 | ``` 12 | 13 | ### Compiles and minifies for production 14 | ``` 15 | npm run build 16 | ``` 17 | 18 | ### Lints and fixes files 19 | ``` 20 | npm run lint 21 | ``` 22 | 23 | ### Customize configuration 24 | See [Configuration Reference](https://cli.vuejs.org/config/). 25 | -------------------------------------------------------------------------------- /winform/EdgeSharp.WinForms.Razor.Sample/Models/MovieGenreViewModel.cs: -------------------------------------------------------------------------------- 1 | using EdgeSharp.Shared.Models; 2 | using Microsoft.AspNetCore.Mvc.Rendering; 3 | using System.Collections.Generic; 4 | 5 | namespace EdgeSharp.WinForms.Razor.Sample.Models 6 | { 7 | public class MovieGenreViewModel 8 | { 9 | public List Movies { get; set; } 10 | public SelectList Genres { get; set; } 11 | public string MovieGenre { get; set; } 12 | public string SearchString { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /angular-react-vue/EdgeSharp.React.Sample/reactapp/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom' 3 | import "./assets/css/bootstrap.min.css"; 4 | import "./assets/css/prism-okaidia.css"; 5 | import "./assets/js/jquery.min.js"; 6 | import "./assets/js/bootstrap.bundle.min.js"; 7 | import "./assets/js/jquery.min.js"; 8 | import "./assets/js/prism.js"; 9 | 10 | import App from './App' 11 | 12 | window.$ipcoption = 'hostobject'; 13 | 14 | ReactDOM.render( 15 | , 16 | document.getElementById('root') 17 | ); -------------------------------------------------------------------------------- /angular-react-vue/EdgeSharp.Angular.Sample/angularapp/src/app/services/action.controller.client.service.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | 3 | import { ActionClientService } from './action.controller.client.service'; 4 | 5 | describe('ActionClientService', () => { 6 | let service: ActionClientService; 7 | 8 | beforeEach(() => { 9 | TestBed.configureTestingModule({}); 10 | service = TestBed.inject(ActionClientService); 11 | }); 12 | 13 | it('should be created', () => { 14 | expect(service).toBeTruthy(); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /winform/EdgeSharp.WinForms.Sample/Helper.cs: -------------------------------------------------------------------------------- 1 | using System.Drawing; 2 | using System.Windows.Forms; 3 | 4 | namespace EdgeSharp.WinForms.Sample 5 | { 6 | public static class Helper 7 | { 8 | public static void SetAppIcon(this Form form) 9 | { 10 | var executable = System.Reflection.Assembly.GetExecutingAssembly(); 11 | var iconStream = executable.GetManifestResourceStream("EdgeSharp.WinForms.Sample.edgesharp.ico"); 12 | if (iconStream != null) 13 | { 14 | form.Icon = new Icon(iconStream); 15 | } 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /win-32/EdgeSharp.Razor.Sample/Models/MovieGenreViewModel.cs: -------------------------------------------------------------------------------- 1 | using EdgeSharp.Shared.Models; 2 | using Microsoft.AspNetCore.Mvc; 3 | using Microsoft.AspNetCore.Mvc.Rendering; 4 | using System.Collections.Generic; 5 | 6 | namespace EdgeSharp.Razor.Sample.Models 7 | { 8 | public class MovieGenreViewModel 9 | { 10 | public List Movies { get; set; } 11 | public SelectList Genres { get; set; } 12 | [BindProperty(SupportsGet = true)] 13 | public string MovieGenre { get; set; } 14 | [BindProperty(SupportsGet = true)] 15 | public string SearchString { get; set; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /winform/EdgeSharp.WinForms.Razor.Sample/Helper.cs: -------------------------------------------------------------------------------- 1 | using System.Drawing; 2 | using System.Windows.Forms; 3 | 4 | namespace EdgeSharp.WinForms.Razor.Sample 5 | { 6 | public static class Helper 7 | { 8 | public static void SetAppIcon(this Form form) 9 | { 10 | var executable = System.Reflection.Assembly.GetExecutingAssembly(); 11 | var iconStream = executable.GetManifestResourceStream("EdgeSharp.WinForms.Razor.Sample.edgesharp.ico"); 12 | if (iconStream != null) 13 | { 14 | form.Icon = new Icon(iconStream); 15 | } 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /wpf/EdgeSharp.Wpf.Sample/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | 3 | [assembly: ThemeInfo( 4 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located 5 | //(used if a resource is not found in the page, 6 | // or application resource dictionaries) 7 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located 8 | //(used if a resource is not found in the page, 9 | // app, or any theme specific resource dictionaries) 10 | )] 11 | -------------------------------------------------------------------------------- /wpf/EdgeSharp.Wpf.RazorPages.Sample/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | 3 | [assembly: ThemeInfo( 4 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located 5 | //(used if a resource is not found in the page, 6 | // or application resource dictionaries) 7 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located 8 | //(used if a resource is not found in the page, 9 | // app, or any theme specific resource dictionaries) 10 | )] 11 | -------------------------------------------------------------------------------- /win-32/EdgeSharp.Sample/app/jquery-validation-unobtrusive/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) .NET Foundation. All rights reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | these files except in compliance with the License. You may obtain a copy of the 5 | License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software distributed 10 | under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | specific language governing permissions and limitations under the License. 13 | -------------------------------------------------------------------------------- /wpf/EdgeSharp.Wpf.Sample/app/jquery-validation-unobtrusive/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) .NET Foundation. All rights reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | these files except in compliance with the License. You may obtain a copy of the 5 | License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software distributed 10 | under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | specific language governing permissions and limitations under the License. 13 | -------------------------------------------------------------------------------- /win-32/EdgeSharp.Sample/SampleWindow.cs: -------------------------------------------------------------------------------- 1 | using EdgeSharp.Browser; 2 | using Microsoft.Web.WebView2.Core; 3 | using System; 4 | 5 | namespace EdgeSharp.Sample 6 | { 7 | public class SampleWindow : BrowserWindow 8 | { 9 | protected override void OnInitializationCompleted(object sender, CoreWebView2InitializationCompletedEventArgs e) 10 | { 11 | base.OnInitializationCompleted(sender, e); 12 | CoreWebView2.NavigationCompleted += CoreWebView2_NavigationCompleted; 13 | } 14 | 15 | private void CoreWebView2_NavigationCompleted(object sender, CoreWebView2NavigationCompletedEventArgs e) 16 | { 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /win-32/EdgeSharp.Razor.Sample/assets/jquery-validation-unobtrusive/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) .NET Foundation. All rights reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | these files except in compliance with the License. You may obtain a copy of the 5 | License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software distributed 10 | under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | specific language governing permissions and limitations under the License. 13 | -------------------------------------------------------------------------------- /winform/EdgeSharp.WinForms.Sample/app/jquery-validation-unobtrusive/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) .NET Foundation. All rights reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | these files except in compliance with the License. You may obtain a copy of the 5 | License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software distributed 10 | under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | specific language governing permissions and limitations under the License. 13 | -------------------------------------------------------------------------------- /win-32/EdgeSharp.Razor.Sample/Program.cs: -------------------------------------------------------------------------------- 1 | using EdgeSharp.Core.Owin; 2 | using System; 3 | 4 | namespace EdgeSharp.Razor.Sample 5 | { 6 | public class Program 7 | { 8 | /// Main entry-point for this application. 9 | /// The arguments to pass in. 10 | [STAThread] 11 | public static void Main(string[] args) 12 | { 13 | OwinAppBuilder 14 | .Create(args) 15 | .UseConfig() 16 | .UseWindow() 17 | .UseApp() 18 | .Build() 19 | .Run(); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /win-32/EdgeSharp.Razor.Sample/SampleWindow.cs: -------------------------------------------------------------------------------- 1 | using EdgeSharp.Browser; 2 | using Microsoft.Web.WebView2.Core; 3 | using System; 4 | 5 | namespace EdgeSharp.Razor.Sample 6 | { 7 | public class SampleWindow : BrowserWindow 8 | { 9 | protected override void OnInitializationCompleted(object sender, CoreWebView2InitializationCompletedEventArgs e) 10 | { 11 | base.OnInitializationCompleted(sender, e); 12 | CoreWebView2.NavigationCompleted += CoreWebView2_NavigationCompleted; 13 | } 14 | 15 | private void CoreWebView2_NavigationCompleted(object sender, CoreWebView2NavigationCompletedEventArgs e) 16 | { 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /wpf/EdgeSharp.Wpf.RazorPages.Sample/assets/jquery-validation-unobtrusive/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) .NET Foundation. All rights reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | these files except in compliance with the License. You may obtain a copy of the 5 | License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software distributed 10 | under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | specific language governing permissions and limitations under the License. 13 | -------------------------------------------------------------------------------- /winform/EdgeSharp.WinForms.Razor.Sample/assets/jquery-validation-unobtrusive/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) .NET Foundation. All rights reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | these files except in compliance with the License. You may obtain a copy of the 5 | License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software distributed 10 | under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | specific language governing permissions and limitations under the License. 13 | -------------------------------------------------------------------------------- /angular-react-vue/EdgeSharp.Vue.Sample/SampleWindow.cs: -------------------------------------------------------------------------------- 1 | using EdgeSharp.Browser; 2 | using Microsoft.Web.WebView2.Core; 3 | using System; 4 | 5 | namespace EdgeSharp.Vue.Sample 6 | { 7 | public class SampleWindow : BrowserWindow 8 | { 9 | protected override void OnInitializationCompleted(object sender, CoreWebView2InitializationCompletedEventArgs e) 10 | { 11 | base.OnInitializationCompleted(sender, e); 12 | CoreWebView2.NavigationCompleted += CoreWebView2_NavigationCompleted; 13 | } 14 | 15 | private void CoreWebView2_NavigationCompleted(object sender, CoreWebView2NavigationCompletedEventArgs e) 16 | { 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /angular-react-vue/EdgeSharp.Angular.Sample/SampleWindow.cs: -------------------------------------------------------------------------------- 1 | using EdgeSharp.Browser; 2 | using Microsoft.Web.WebView2.Core; 3 | using System; 4 | 5 | namespace EdgeSharp.Angular.Sample 6 | { 7 | public class SampleWindow : BrowserWindow 8 | { 9 | protected override void OnInitializationCompleted(object sender, CoreWebView2InitializationCompletedEventArgs e) 10 | { 11 | base.OnInitializationCompleted(sender, e); 12 | CoreWebView2.NavigationCompleted += CoreWebView2_NavigationCompleted; 13 | } 14 | 15 | private void CoreWebView2_NavigationCompleted(object sender, CoreWebView2NavigationCompletedEventArgs e) 16 | { 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /angular-react-vue/EdgeSharp.Angular.Sample/angularapp/src/app/app-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { RouterModule, Routes } from '@angular/router'; 3 | 4 | import { HomeComponent } from './components/home/home.component'; 5 | import { TmdbMoviesComponent } from './components/tmdbmovies/tmdb-movies.component'; 6 | 7 | const routes: Routes = [ 8 | { path: '', redirectTo: 'home', pathMatch: 'full' }, 9 | { path: 'home', component: HomeComponent }, 10 | { path: 'tmdbmovies', component: TmdbMoviesComponent} 11 | ]; 12 | 13 | @NgModule({ 14 | imports: [RouterModule.forRoot(routes)], 15 | exports: [RouterModule] 16 | }) 17 | export class AppRoutingModule { } 18 | 19 | 20 | -------------------------------------------------------------------------------- /angular-react-vue/EdgeSharp.React.Sample/SampleWindow.cs: -------------------------------------------------------------------------------- 1 | using EdgeSharp.Browser; 2 | using Microsoft.Web.WebView2.Core; 3 | using System; 4 | 5 | namespace EdgeSharp.React.Sample 6 | { 7 | public class SampleWindow : BrowserWindow 8 | { 9 | protected override void OnInitializationCompleted(object sender, CoreWebView2InitializationCompletedEventArgs e) 10 | { 11 | base.OnInitializationCompleted(sender, e); 12 | CoreWebView2.NavigationCompleted += CoreWebView2_NavigationCompleted; 13 | } 14 | 15 | private void CoreWebView2_NavigationCompleted(object sender, CoreWebView2NavigationCompletedEventArgs e) 16 | { 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /angular-react-vue/EdgeSharp.Vue.Sample/vueapp/src/router/index.js: -------------------------------------------------------------------------------- 1 | import { createWebHistory, createRouter } from "vue-router"; 2 | import Home from "@/components/Home.vue"; 3 | import TmdbMovies from "@/components/TmdbMovies.vue"; 4 | 5 | const routes = [ 6 | { 7 | path: '/', 8 | redirect: '/home' 9 | }, 10 | { 11 | path: "/home", 12 | name: "Home", 13 | component: Home, 14 | }, 15 | { 16 | path: "/tmdbmovies", 17 | name: "Tmdb Movies", 18 | component: TmdbMovies, 19 | }, 20 | { 21 | path: '/:pathMatch(.*)*', 22 | component: Home 23 | } 24 | ]; 25 | 26 | const router = createRouter({ 27 | history: createWebHistory(), 28 | routes, 29 | }); 30 | 31 | export default router; -------------------------------------------------------------------------------- /angular-react-vue/EdgeSharp.Angular.Sample/angularapp/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | import { ServiceConfig } from './services/service.config'; 3 | 4 | @Component({ 5 | selector: 'app-root', 6 | templateUrl: './app.component.html', 7 | styleUrls: ['./app.component.css'] 8 | }) 9 | export class AppComponent { 10 | 11 | _ipcoption: string = ''; 12 | 13 | constructor(private _serviceConfig: ServiceConfig) { 14 | } 15 | 16 | public changeIpcOption(ipcOption: string) { 17 | this._serviceConfig.ipcoption = ipcOption; 18 | this._ipcoption = this._serviceConfig.ipcoption; 19 | } 20 | 21 | ngOnInit(): void { 22 | this._ipcoption = this._serviceConfig.ipcoption; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /angular-react-vue/EdgeSharp.Angular.Sample/angularapp/src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | // This file can be replaced during build by using the `fileReplacements` array. 2 | // `ng build` replaces `environment.ts` with `environment.prod.ts`. 3 | // The list of file replacements can be found in `angular.json`. 4 | 5 | export const environment = { 6 | production: false 7 | }; 8 | 9 | /* 10 | * For easier debugging in development mode, you can import the following file 11 | * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`. 12 | * 13 | * This import should be commented out in production mode because it will have a negative impact 14 | * on performance if an error is thrown. 15 | */ 16 | // import 'zone.js/plugins/zone-error'; // Included with Angular CLI. 17 | -------------------------------------------------------------------------------- /angular-react-vue/EdgeSharp.Angular.Sample/angularapp/src/app/components/home/home.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { HomeComponent } from './home.component'; 4 | 5 | describe('HomeComponent', () => { 6 | let component: HomeComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | await TestBed.configureTestingModule({ 11 | declarations: [ HomeComponent ] 12 | }) 13 | .compileComponents(); 14 | }); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(HomeComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /wpf/EdgeSharp.Wpf.Sample/SampleWindow.cs: -------------------------------------------------------------------------------- 1 | using EdgeSharp.Core; 2 | using System.ComponentModel; 3 | 4 | namespace EdgeSharp.Wpf.Sample 5 | { 6 | public class SampleWindow : BrowserWindow 7 | { 8 | private AppBuilder _appBuilder; 9 | 10 | public SampleWindow() 11 | { 12 | Width = 1200; 13 | Height = 900; 14 | 15 | //_appBuilder = new AppBuilder(); 16 | } 17 | 18 | protected override void Bootstrap() 19 | { 20 | //ServiceLocator.Bootstrap(_appBuilder); 21 | //base.Bootstrap(); 22 | } 23 | 24 | protected override void OnClosing(CancelEventArgs e) 25 | { 26 | //_appBuilder?.Stop(); 27 | base.OnClosing(e); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /angular-react-vue/EdgeSharp.Angular.Sample/angularapp/.browserslistrc: -------------------------------------------------------------------------------- 1 | # This file is used by the build system to adjust CSS and JS output to support the specified browsers below. 2 | # For additional information regarding the format and rule options, please see: 3 | # https://github.com/browserslist/browserslist#queries 4 | 5 | # For the full list of supported browsers by the Angular framework, please see: 6 | # https://angular.io/guide/browser-support 7 | 8 | # You can see what browsers were selected by your queries by running: 9 | # npx browserslist 10 | 11 | last 1 Chrome version 12 | last 1 Firefox version 13 | last 2 Edge major versions 14 | last 2 Safari major versions 15 | last 2 iOS major versions 16 | Firefox ESR 17 | not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line. 18 | -------------------------------------------------------------------------------- /wpf/EdgeSharp.Wpf.RazorPages.Sample/SampleWindow.cs: -------------------------------------------------------------------------------- 1 | using EdgeSharp.Core; 2 | using System.ComponentModel; 3 | 4 | namespace EdgeSharp.Wpf.RazorPages.Sample 5 | { 6 | public class SampleWindow : BrowserWindow 7 | { 8 | private AppBuilder _appBuilder; 9 | 10 | public SampleWindow() 11 | { 12 | Width = 1200; 13 | Height = 900; 14 | 15 | //_appBuilder = new AppBuilder(); 16 | } 17 | 18 | protected override void Bootstrap() 19 | { 20 | //ServiceLocator.Bootstrap(_appBuilder); 21 | //base.Bootstrap(); 22 | } 23 | 24 | protected override void OnClosing(CancelEventArgs e) 25 | { 26 | //_appBuilder?.Stop(); 27 | base.OnClosing(e); 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /angular-react-vue/EdgeSharp.Angular.Sample/angularapp/.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | /dist 5 | /tmp 6 | /out-tsc 7 | # Only exists if Bazel was run 8 | /bazel-out 9 | 10 | # dependencies 11 | /node_modules 12 | 13 | # profiling files 14 | chrome-profiler-events*.json 15 | 16 | # IDEs and editors 17 | /.idea 18 | .project 19 | .classpath 20 | .c9/ 21 | *.launch 22 | .settings/ 23 | *.sublime-workspace 24 | 25 | # IDE - VSCode 26 | .vscode/* 27 | !.vscode/settings.json 28 | !.vscode/tasks.json 29 | !.vscode/launch.json 30 | !.vscode/extensions.json 31 | .history/* 32 | 33 | # misc 34 | /.sass-cache 35 | /connect.lock 36 | /coverage 37 | /libpeerconnection.log 38 | npm-debug.log 39 | yarn-error.log 40 | testem.log 41 | /typings 42 | 43 | # System Files 44 | .DS_Store 45 | Thumbs.db 46 | -------------------------------------------------------------------------------- /angular-react-vue/EdgeSharp.Angular.Sample/angularapp/src/app/components/tmdbmovies/tmdb-movies.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { ComponentFixture, TestBed } from '@angular/core/testing'; 2 | 3 | import { TmdbMoviesComponent } from './tmdb-movies.component'; 4 | 5 | describe('TmdbMoviesComponent', () => { 6 | let component: TmdbMoviesComponent; 7 | let fixture: ComponentFixture; 8 | 9 | beforeEach(async () => { 10 | await TestBed.configureTestingModule({ 11 | declarations: [ TmdbMoviesComponent ] 12 | }) 13 | .compileComponents(); 14 | }); 15 | 16 | beforeEach(() => { 17 | fixture = TestBed.createComponent(TmdbMoviesComponent); 18 | component = fixture.componentInstance; 19 | fixture.detectChanges(); 20 | }); 21 | 22 | it('should create', () => { 23 | expect(component).toBeTruthy(); 24 | }); 25 | }); 26 | -------------------------------------------------------------------------------- /winform/EdgeSharp.WinForms.Sample/SampleBrowserForm.cs: -------------------------------------------------------------------------------- 1 | using EdgeSharp.Core; 2 | using System.ComponentModel; 3 | 4 | namespace EdgeSharp.WinForms.Sample 5 | { 6 | public class SampleBrowserForm : BrowserForm 7 | { 8 | private AppBuilder _appBuilder; 9 | 10 | public SampleBrowserForm() 11 | { 12 | Width = 1200; 13 | Height = 900; 14 | this.SetAppIcon(); 15 | } 16 | 17 | protected override void Bootstrap() 18 | { 19 | //_appBuilder = new AppBuilder(); 20 | //ServiceLocator.Bootstrap(_appBuilder); 21 | //base.Bootstrap(); 22 | } 23 | 24 | protected override void OnClosing(CancelEventArgs e) 25 | { 26 | //_appBuilder?.Stop(); 27 | base.OnClosing(e); 28 | } 29 | } 30 | } 31 | 32 | -------------------------------------------------------------------------------- /wpf/EdgeSharp.Wpf.Sample/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using EdgeSharp.Core; 2 | using System.Windows; 3 | 4 | namespace EdgeSharp.Wpf.Sample 5 | { 6 | /// 7 | /// Interaction logic for App.xaml 8 | /// 9 | public partial class App : Application 10 | { 11 | private AppBuilder _appBuilder; 12 | protected override void OnStartup(StartupEventArgs e) 13 | { 14 | _appBuilder = new AppBuilder(); 15 | ServiceLocator.Bootstrap(_appBuilder); 16 | 17 | // MainWindow mainWindow = new MainWindow(); 18 | SampleWindow mainWindow = new SampleWindow(); 19 | mainWindow.Show(); 20 | } 21 | 22 | protected override void OnExit(ExitEventArgs e) 23 | { 24 | _appBuilder?.Stop(); 25 | base.OnExit(e); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /winform/EdgeSharp.WinForms.Razor.Sample/SampleBrowserForm.cs: -------------------------------------------------------------------------------- 1 | using EdgeSharp.Core; 2 | using System.ComponentModel; 3 | 4 | namespace EdgeSharp.WinForms.Razor.Sample 5 | { 6 | public class SampleBrowserForm : BrowserForm 7 | { 8 | private AppBuilder _appBuilder; 9 | 10 | public SampleBrowserForm() 11 | { 12 | Width = 1200; 13 | Height = 900; 14 | this.SetAppIcon(); 15 | } 16 | 17 | protected override void Bootstrap() 18 | { 19 | //_appBuilder = new AppBuilder(); 20 | //ServiceLocator.Bootstrap(_appBuilder); 21 | //base.Bootstrap(); 22 | } 23 | 24 | protected override void OnClosing(CancelEventArgs e) 25 | { 26 | //_appBuilder?.Stop(); 27 | base.OnClosing(e); 28 | } 29 | } 30 | } 31 | 32 | -------------------------------------------------------------------------------- /wpf/EdgeSharp.Wpf.RazorPages.Sample/Pages/Error.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System.Diagnostics; 2 | using Microsoft.AspNetCore.Mvc; 3 | using Microsoft.AspNetCore.Mvc.RazorPages; 4 | using Microsoft.Extensions.Logging; 5 | 6 | namespace EdgeSharp.Wpf.RazorPages.Sample.Pages 7 | { 8 | [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] 9 | public class ErrorModel : PageModel 10 | { 11 | public string RequestId { get; set; } 12 | 13 | public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); 14 | 15 | private readonly ILogger _logger; 16 | 17 | public ErrorModel(ILogger logger) 18 | { 19 | _logger = logger; 20 | } 21 | 22 | public void OnGet() 23 | { 24 | RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier; 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /angular-react-vue/EdgeSharp.Angular.Sample/angularapp/src/test.ts: -------------------------------------------------------------------------------- 1 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files 2 | 3 | import 'zone.js/testing'; 4 | import { getTestBed } from '@angular/core/testing'; 5 | import { 6 | BrowserDynamicTestingModule, 7 | platformBrowserDynamicTesting 8 | } from '@angular/platform-browser-dynamic/testing'; 9 | 10 | declare const require: { 11 | context(path: string, deep?: boolean, filter?: RegExp): { 12 | keys(): string[]; 13 | (id: string): T; 14 | }; 15 | }; 16 | 17 | // First, initialize the Angular testing environment. 18 | getTestBed().initTestEnvironment( 19 | BrowserDynamicTestingModule, 20 | platformBrowserDynamicTesting() 21 | ); 22 | // Then we find all the tests. 23 | const context = require.context('./', true, /\.spec\.ts$/); 24 | // And load the modules. 25 | context.keys().map(context); 26 | -------------------------------------------------------------------------------- /wpf/EdgeSharp.Wpf.RazorPages.Sample/MainWindow.xaml: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /wpf/EdgeSharp.Wpf.RazorPages.Sample/App.xaml.cs: -------------------------------------------------------------------------------- 1 | using EdgeSharp.Core; 2 | using System.Windows; 3 | 4 | namespace EdgeSharp.Wpf.RazorPages.Sample 5 | { 6 | /// 7 | /// Interaction logic for App.xaml 8 | /// 9 | public partial class App : Application 10 | { 11 | private OwinAppBuilder _owinAppBuilder; 12 | protected override void OnStartup(StartupEventArgs e) 13 | { 14 | _owinAppBuilder = new OwinAppBuilder(); 15 | ServiceLocator.Bootstrap(_owinAppBuilder); 16 | 17 | //MainWindow mainWindow = new MainWindow(); 18 | SampleWindow mainWindow = new SampleWindow(); 19 | mainWindow.Show(); 20 | } 21 | 22 | protected override void OnExit(ExitEventArgs e) 23 | { 24 | _owinAppBuilder?.Stop(); 25 | 26 | base.OnExit(e); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /angular-react-vue/EdgeSharp.Angular.Sample/angularapp/tsconfig.json: -------------------------------------------------------------------------------- 1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */ 2 | { 3 | "compileOnSave": false, 4 | "compilerOptions": { 5 | "baseUrl": "./", 6 | "outDir": "./dist/out-tsc", 7 | "forceConsistentCasingInFileNames": true, 8 | "strict": true, 9 | "noImplicitReturns": true, 10 | "noFallthroughCasesInSwitch": true, 11 | "sourceMap": true, 12 | "declaration": false, 13 | "downlevelIteration": true, 14 | "experimentalDecorators": true, 15 | "moduleResolution": "node", 16 | "importHelpers": true, 17 | "target": "es2017", 18 | "module": "es2020", 19 | "lib": [ 20 | "es2018", 21 | "dom" 22 | ] 23 | }, 24 | "angularCompilerOptions": { 25 | "enableI18nLegacyMessageIdFormat": false, 26 | "strictInjectionParameters": true, 27 | "strictInputAccessModifiers": true, 28 | "strictTemplates": true 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /winform/EdgeSharp.WinForms.Sample/Program.cs: -------------------------------------------------------------------------------- 1 | using EdgeSharp.Core; 2 | using System; 3 | using System.Windows.Forms; 4 | 5 | namespace EdgeSharp.WinForms.Sample 6 | { 7 | static class Program 8 | { 9 | /// 10 | /// The main entry point for the application. 11 | /// 12 | [STAThread] 13 | static void Main() 14 | { 15 | Application.SetHighDpiMode(HighDpiMode.SystemAware); 16 | Application.EnableVisualStyles(); 17 | Application.SetCompatibleTextRenderingDefault(false); 18 | 19 | var appBuilder = new AppBuilder(); 20 | ServiceLocator.Bootstrap(appBuilder); 21 | 22 | var bowserForm = (BrowserForm)ServiceLocator.Current.GetInstance(); 23 | Application.Run(bowserForm); 24 | 25 | // Application.Run(new Form1()); 26 | 27 | appBuilder?.Stop(); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /win-32/EdgeSharp.Sample/app/pages/moviedetails.js: -------------------------------------------------------------------------------- 1 | async function loadMovie() { 2 | try { 3 | var query = ''; 4 | if (tempData.urlQueryPart !== null) { 5 | query = tempData.urlQueryPart; 6 | tempData.urlQueryPart = null; 7 | } 8 | 9 | let remObject = await window.chrome.webview.hostObjects.execute; 10 | let result = await remObject.Send('/moviedetails/get' + query, null); 11 | 12 | if (result !== null) { 13 | var jsonData = JSON.parse(result); 14 | document.getElementById("detTitle").innerHTML = jsonData.Title; 15 | document.getElementById("detReleaseDate").innerHTML = jsonData.ReleaseDate; 16 | document.getElementById("detGenre").innerHTML = jsonData.Genre; 17 | document.getElementById("detPrice").innerHTML = jsonData.Price; 18 | } 19 | 20 | } catch (err) { 21 | console.error(error); 22 | } 23 | } 24 | 25 | loadMovie(); 26 | -------------------------------------------------------------------------------- /wpf/EdgeSharp.Wpf.Sample/app/pages/moviedetails.js: -------------------------------------------------------------------------------- 1 | async function loadMovie() { 2 | try { 3 | var query = ''; 4 | if (tempData.urlQueryPart !== null) { 5 | query = tempData.urlQueryPart; 6 | tempData.urlQueryPart = null; 7 | } 8 | 9 | let remObject = await window.chrome.webview.hostObjects.execute; 10 | let result = await remObject.Send('/moviedetails/get' + query, null); 11 | 12 | if (result !== null) { 13 | var jsonData = JSON.parse(result); 14 | document.getElementById("detTitle").innerHTML = jsonData.Title; 15 | document.getElementById("detReleaseDate").innerHTML = jsonData.ReleaseDate; 16 | document.getElementById("detGenre").innerHTML = jsonData.Genre; 17 | document.getElementById("detPrice").innerHTML = jsonData.Price; 18 | } 19 | 20 | } catch (err) { 21 | console.error(error); 22 | } 23 | } 24 | 25 | loadMovie(); 26 | -------------------------------------------------------------------------------- /win-32/EdgeSharp.Sample/app/pages/moviecreate.js: -------------------------------------------------------------------------------- 1 | async function createMovie() { 2 | try { 3 | var movie = {}; 4 | movie.Title = document.getElementById("createTitle").value; 5 | movie.Rating = document.getElementById("createRating").value; 6 | movie.ReleaseDate = document.getElementById("createReleaseDate").valueAsDate; 7 | movie.Genre = document.getElementById("createGenre").value; 8 | var price = document.getElementById("createPrice").value; 9 | movie.Price = parseFloat(price); 10 | 11 | var request = {}; 12 | request.movie = movie; 13 | 14 | let remObject = await window.chrome.webview.hostObjects.execute; 15 | let result = await remObject.Send('/moviecreate/post', JSON.stringify(request)); 16 | 17 | if (result === true || result === 'true') { 18 | navigateTo('/movies'); 19 | } 20 | 21 | } catch (err) { 22 | console.error(error); 23 | } 24 | } 25 | 26 | 27 | -------------------------------------------------------------------------------- /winform/EdgeSharp.WinForms.Razor.Sample/Program.cs: -------------------------------------------------------------------------------- 1 | using EdgeSharp.Core; 2 | using System; 3 | using System.Windows.Forms; 4 | 5 | namespace EdgeSharp.WinForms.Razor.Sample 6 | { 7 | static class Program 8 | { 9 | /// 10 | /// The main entry point for the application. 11 | /// 12 | [STAThread] 13 | static void Main() 14 | { 15 | Application.SetHighDpiMode(HighDpiMode.SystemAware); 16 | Application.EnableVisualStyles(); 17 | Application.SetCompatibleTextRenderingDefault(false); 18 | 19 | var appBuilder = new OwinAppBuilder(); 20 | ServiceLocator.Bootstrap(appBuilder); 21 | 22 | var bowserForm = (BrowserForm)ServiceLocator.Current.GetInstance(); 23 | Application.Run(bowserForm); 24 | 25 | //Application.Run(new Form1()); 26 | 27 | appBuilder?.Stop(); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /winform/EdgeSharp.WinForms.Sample/app/pages/moviedetails.js: -------------------------------------------------------------------------------- 1 | async function loadMovie() { 2 | try { 3 | var query = ''; 4 | if (tempData.urlQueryPart !== null) { 5 | query = tempData.urlQueryPart; 6 | tempData.urlQueryPart = null; 7 | } 8 | 9 | let remObject = await window.chrome.webview.hostObjects.execute; 10 | let result = await remObject.Send('/moviedetails/get' + query, null); 11 | 12 | if (result !== null) { 13 | var jsonData = JSON.parse(result); 14 | document.getElementById("detTitle").innerHTML = jsonData.Title; 15 | document.getElementById("detReleaseDate").innerHTML = jsonData.ReleaseDate; 16 | document.getElementById("detGenre").innerHTML = jsonData.Genre; 17 | document.getElementById("detPrice").innerHTML = jsonData.Price; 18 | } 19 | 20 | } catch (err) { 21 | console.error(error); 22 | } 23 | } 24 | 25 | loadMovie(); 26 | -------------------------------------------------------------------------------- /wpf/EdgeSharp.Wpf.Sample/app/pages/moviecreate.js: -------------------------------------------------------------------------------- 1 | async function createMovie() { 2 | try { 3 | var movie = {}; 4 | movie.Title = document.getElementById("createTitle").value; 5 | movie.Rating = document.getElementById("createRating").value; 6 | movie.ReleaseDate = document.getElementById("createReleaseDate").valueAsDate; 7 | movie.Genre = document.getElementById("createGenre").value; 8 | var price = document.getElementById("createPrice").value; 9 | movie.Price = parseFloat(price); 10 | 11 | var request = {}; 12 | request.movie = movie; 13 | 14 | let remObject = await window.chrome.webview.hostObjects.execute; 15 | let result = await remObject.Send('/moviecreate/post', JSON.stringify(request)); 16 | 17 | if (result === true || result === 'true') { 18 | navigateTo('/movies'); 19 | } 20 | 21 | } catch (err) { 22 | console.error(error); 23 | } 24 | } 25 | 26 | 27 | -------------------------------------------------------------------------------- /angular-react-vue/EdgeSharp.Angular.Sample/angularapp/src/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { BrowserModule } from '@angular/platform-browser'; 3 | import { FormsModule } from '@angular/forms'; 4 | 5 | import { AppRoutingModule } from './app-routing.module'; 6 | import { AppComponent } from './app.component'; 7 | import { HomeComponent } from './components/home/home.component'; 8 | import { TmdbMoviesComponent } from './components/tmdbmovies/tmdb-movies.component'; 9 | import { ServiceConfig } from './services/service.config'; 10 | import { ActionClientService } from './services/action.controller.client.service'; 11 | 12 | @NgModule({ 13 | declarations: [ 14 | AppComponent, 15 | HomeComponent, 16 | TmdbMoviesComponent 17 | ], 18 | imports: [ 19 | BrowserModule, 20 | FormsModule, 21 | AppRoutingModule 22 | ], 23 | providers: [ServiceConfig, ActionClientService], 24 | bootstrap: [AppComponent] 25 | }) 26 | export class AppModule { } 27 | -------------------------------------------------------------------------------- /winform/EdgeSharp.WinForms.Sample/app/pages/moviecreate.js: -------------------------------------------------------------------------------- 1 | async function createMovie() { 2 | try { 3 | var movie = {}; 4 | movie.Title = document.getElementById("createTitle").value; 5 | movie.Rating = document.getElementById("createRating").value; 6 | movie.ReleaseDate = document.getElementById("createReleaseDate").valueAsDate; 7 | movie.Genre = document.getElementById("createGenre").value; 8 | var price = document.getElementById("createPrice").value; 9 | movie.Price = parseFloat(price); 10 | 11 | var request = {}; 12 | request.movie = movie; 13 | 14 | let remObject = await window.chrome.webview.hostObjects.execute; 15 | let result = await remObject.Send('/moviecreate/post', JSON.stringify(request)); 16 | 17 | if (result === true || result === 'true') { 18 | navigateTo('/movies'); 19 | } 20 | 21 | } catch (err) { 22 | console.error(error); 23 | } 24 | } 25 | 26 | 27 | -------------------------------------------------------------------------------- /wpf/EdgeSharp.Shared/EdgeSharp.Shared.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net5.0 5 | AnyCPU 6 | true 7 | embedded 8 | true 9 | true 10 | true 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /angular-react-vue/EdgeSharp.React.Sample/reactapp/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "reactapp", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "build": "webpack --mode production", 8 | "start": "webpack serve --mode development" 9 | }, 10 | "keywords": [], 11 | "author": "", 12 | "license": "ISC", 13 | "dependencies": { 14 | "@babel/runtime": "^7.14.6", 15 | "axios": "^0.21.1", 16 | "jquery": "^3.6.0", 17 | "popper.js": "^1.16.1", 18 | "react": "^17.0.2", 19 | "react-dom": "^17.0.2", 20 | "react-router-dom": "^5.2.0", 21 | "react-scripts": "^4.0.3" 22 | }, 23 | "devDependencies": { 24 | "@babel/core": "^7.14.6", 25 | "@babel/plugin-transform-runtime": "^7.14.5", 26 | "@babel/preset-env": "^7.14.7", 27 | "@babel/preset-react": "^7.14.5", 28 | "babel-loader": "^8.2.2", 29 | "html-webpack-plugin": "^5.3.2", 30 | "webpack": "^5.40.0", 31 | "webpack-cli": "^4.7.2" 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /win-32/EdgeSharp.Shared/EdgeSharp.Shared.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net5.0 5 | AnyCPU 6 | true 7 | embedded 8 | true 9 | true 10 | true 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /wpf/EdgeSharp.Wpf.RazorPages.Sample/Pages/Error.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model ErrorModel 3 | @{ 4 | ViewData["Title"] = "Error"; 5 | } 6 | 7 |

Error.

8 |

An error occurred while processing your request.

9 | 10 | @if (Model.ShowRequestId) 11 | { 12 |

13 | Request ID: @Model.RequestId 14 |

15 | } 16 | 17 |

Development Mode

18 |

19 | Swapping to the Development environment displays detailed information about the error that occurred. 20 |

21 |

22 | The Development environment shouldn't be enabled for deployed applications. 23 | It can result in displaying sensitive information from exceptions to end users. 24 | For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development 25 | and restarting the app. 26 |

27 | -------------------------------------------------------------------------------- /winform/EdgeSharp.Shared/EdgeSharp.Shared.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net5.0 5 | AnyCPU 6 | true 7 | embedded 8 | true 9 | true 10 | true 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /winform/EdgeSharp.WinForms.Razor.Sample/Views/Shared/Error.cshtml: -------------------------------------------------------------------------------- 1 | @model ErrorViewModel 2 | @{ 3 | ViewData["Title"] = "Error"; 4 | } 5 | 6 |

Error.

7 |

An error occurred while processing your request.

8 | 9 | @if (Model.ShowRequestId) 10 | { 11 |

12 | Request ID: @Model.RequestId 13 |

14 | } 15 | 16 |

Development Mode

17 |

18 | Swapping to Development environment will display more detailed information about the error that occurred. 19 |

20 |

21 | The Development environment shouldn't be enabled for deployed applications. 22 | It can result in displaying sensitive information from exceptions to end users. 23 | For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development 24 | and restarting the app. 25 |

26 | -------------------------------------------------------------------------------- /angular-react-vue/EdgeSharp.Shared/EdgeSharp.Shared.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net5.0 5 | AnyCPU 6 | true 7 | embedded 8 | true 9 | true 10 | true 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /win-32/EdgeSharp.Razor.Sample/Views/Shared/Error.cshtml: -------------------------------------------------------------------------------- 1 | @model EdgeSharp.Shared.Models.ErrorViewModel 2 | @{ 3 | ViewData["Title"] = "Error"; 4 | } 5 | 6 |

Error.

7 |

An error occurred while processing your request.

8 | 9 | @if (Model.ShowRequestId) 10 | { 11 |

12 | Request ID: @Model.RequestId 13 |

14 | } 15 | 16 |

Development Mode

17 |

18 | Swapping to Development environment will display more detailed information about the error that occurred. 19 |

20 |

21 | The Development environment shouldn't be enabled for deployed applications. 22 | It can result in displaying sensitive information from exceptions to end users. 23 | For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development 24 | and restarting the app. 25 |

26 | -------------------------------------------------------------------------------- /win-32/EdgeSharp.Razor.Sample/SampleConfig.cs: -------------------------------------------------------------------------------- 1 | using EdgeSharp.Core.Defaults; 2 | using EdgeSharp.Core.Infrastructure; 3 | using System; 4 | 5 | namespace EdgeSharp.Razor.Sample 6 | { 7 | internal class SampleConfig : Configuration 8 | { 9 | public SampleConfig() : base() 10 | { 11 | // var localResource = new UrlScheme("http", "app", null, UrlSchemeType.ResourceRequest); 12 | var hostToFolderscheme = new UrlScheme("http", "app", "app", UrlSchemeType.HostToFolder); 13 | 14 | // UrlSchemes.Add(localResource); 15 | UrlSchemes.Add(hostToFolderscheme); 16 | 17 | var appDirectory = AppDomain.CurrentDomain.BaseDirectory; 18 | //var initialUrl = Path.Combine(appDirectory, "app", "index.html"); 19 | var initialUrl = "https://edgesharp.owin.com/"; 20 | //var initialUrl = "https://edgesharp.test/"; 21 | StartUrl = initialUrl; 22 | 23 | // Make borderless 24 | // WindowOptions.Borderless = true; 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /wpf/EdgeSharp.Shared/Models/Movie.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.ComponentModel.DataAnnotations; 3 | using System.ComponentModel.DataAnnotations.Schema; 4 | 5 | namespace EdgeSharp.Shared.Models 6 | { 7 | public class Movie 8 | { 9 | public int Id { get; set; } 10 | 11 | [StringLength(60, MinimumLength = 3)] 12 | [Required] 13 | public string Title { get; set; } 14 | 15 | [Display(Name = "Release Date")] 16 | [DataType(DataType.Date)] 17 | public DateTime ReleaseDate { get; set; } 18 | 19 | [Range(1, 100)] 20 | [DataType(DataType.Currency)] 21 | [Column(TypeName = "decimal(18, 2)")] 22 | public decimal Price { get; set; } 23 | 24 | [RegularExpression(@"^[A-Z]+[a-zA-Z""'\s-]*$")] 25 | [Required] 26 | [StringLength(30)] 27 | public string Genre { get; set; } 28 | 29 | [RegularExpression(@"^[A-Z]+[a-zA-Z0-9""'\s-]*$")] 30 | [StringLength(5)] 31 | [Required] 32 | public string Rating { get; set; } 33 | } 34 | } -------------------------------------------------------------------------------- /win-32/EdgeSharp.Shared/Models/Movie.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.ComponentModel.DataAnnotations; 3 | using System.ComponentModel.DataAnnotations.Schema; 4 | 5 | namespace EdgeSharp.Shared.Models 6 | { 7 | public class Movie 8 | { 9 | public int Id { get; set; } 10 | 11 | [StringLength(60, MinimumLength = 3)] 12 | [Required] 13 | public string Title { get; set; } 14 | 15 | [Display(Name = "Release Date")] 16 | [DataType(DataType.Date)] 17 | public DateTime ReleaseDate { get; set; } 18 | 19 | [Range(1, 100)] 20 | [DataType(DataType.Currency)] 21 | [Column(TypeName = "decimal(18, 2)")] 22 | public decimal Price { get; set; } 23 | 24 | [RegularExpression(@"^[A-Z]+[a-zA-Z""'\s-]*$")] 25 | [Required] 26 | [StringLength(30)] 27 | public string Genre { get; set; } 28 | 29 | [RegularExpression(@"^[A-Z]+[a-zA-Z0-9""'\s-]*$")] 30 | [StringLength(5)] 31 | [Required] 32 | public string Rating { get; set; } 33 | } 34 | } -------------------------------------------------------------------------------- /winform/EdgeSharp.Shared/Models/Movie.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.ComponentModel.DataAnnotations; 3 | using System.ComponentModel.DataAnnotations.Schema; 4 | 5 | namespace EdgeSharp.Shared.Models 6 | { 7 | public class Movie 8 | { 9 | public int Id { get; set; } 10 | 11 | [StringLength(60, MinimumLength = 3)] 12 | [Required] 13 | public string Title { get; set; } 14 | 15 | [Display(Name = "Release Date")] 16 | [DataType(DataType.Date)] 17 | public DateTime ReleaseDate { get; set; } 18 | 19 | [Range(1, 100)] 20 | [DataType(DataType.Currency)] 21 | [Column(TypeName = "decimal(18, 2)")] 22 | public decimal Price { get; set; } 23 | 24 | [RegularExpression(@"^[A-Z]+[a-zA-Z""'\s-]*$")] 25 | [Required] 26 | [StringLength(30)] 27 | public string Genre { get; set; } 28 | 29 | [RegularExpression(@"^[A-Z]+[a-zA-Z0-9""'\s-]*$")] 30 | [StringLength(5)] 31 | [Required] 32 | public string Rating { get; set; } 33 | } 34 | } -------------------------------------------------------------------------------- /angular-react-vue/EdgeSharp.Angular.Sample/angularapp/src/app/components/home/home.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit, NgZone } from '@angular/core'; 2 | import { ActionClientService } from '../../services/action.controller.client.service'; 3 | 4 | @Component({ 5 | selector: 'app-home', 6 | templateUrl: './home.component.html', 7 | styleUrls: ['./home.component.css'] 8 | }) 9 | export class HomeComponent implements OnInit { 10 | 11 | _sdkVersion: string = ''; 12 | _runtimeVersion: string = ''; 13 | 14 | constructor(private _actionClientService: ActionClientService, 15 | private _zone: NgZone) { 16 | 17 | } 18 | 19 | public reload() { 20 | this._actionClientService.execute('http://edgesharp.com/reload'); 21 | return false; 22 | } 23 | 24 | ngOnInit(): void { 25 | this._actionClientService.get('http://edgesharp.com/info', (data: any) => { 26 | this._zone.run( 27 | () => { 28 | this._sdkVersion = data.sdk; 29 | this._runtimeVersion = data.runtime; 30 | }) 31 | }); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /angular-react-vue/EdgeSharp.Shared/Models/Movie.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.ComponentModel.DataAnnotations; 3 | using System.ComponentModel.DataAnnotations.Schema; 4 | 5 | namespace EdgeSharp.Shared.Models 6 | { 7 | public class Movie 8 | { 9 | public int Id { get; set; } 10 | 11 | [StringLength(60, MinimumLength = 3)] 12 | [Required] 13 | public string Title { get; set; } 14 | 15 | [Display(Name = "Release Date")] 16 | [DataType(DataType.Date)] 17 | public DateTime ReleaseDate { get; set; } 18 | 19 | [Range(1, 100)] 20 | [DataType(DataType.Currency)] 21 | [Column(TypeName = "decimal(18, 2)")] 22 | public decimal Price { get; set; } 23 | 24 | [RegularExpression(@"^[A-Z]+[a-zA-Z""'\s-]*$")] 25 | [Required] 26 | [StringLength(30)] 27 | public string Genre { get; set; } 28 | 29 | [RegularExpression(@"^[A-Z]+[a-zA-Z0-9""'\s-]*$")] 30 | [StringLength(5)] 31 | [Required] 32 | public string Rating { get; set; } 33 | } 34 | } -------------------------------------------------------------------------------- /wpf/EdgeSharp.Wpf.RazorPages.Sample/Pages/Index.cshtml.cs: -------------------------------------------------------------------------------- 1 | using EdgeSharp.Core.Configuration; 2 | using EdgeSharp.Core.Infrastructure; 3 | using Microsoft.AspNetCore.Mvc; 4 | using Microsoft.AspNetCore.Mvc.RazorPages; 5 | using Microsoft.Extensions.Logging; 6 | 7 | namespace EdgeSharp.Wpf.RazorPages.Sample.Pages 8 | { 9 | public class IndexModel : PageModel 10 | { 11 | [BindProperty(SupportsGet = true)] 12 | public string SdkVersion { get; set; } 13 | 14 | [BindProperty(SupportsGet = true)] 15 | public string RuntimeVersion { get; set; } 16 | 17 | private readonly IConfiguration _config; 18 | private readonly ILogger _logger; 19 | 20 | public IndexModel(IConfiguration config, ILogger logger) 21 | { 22 | _config = config; 23 | _logger = logger; 24 | } 25 | 26 | public void OnGet() 27 | { 28 | SdkVersion = _config.SdkVersion ?? VersionInfo.SdkVersion; 29 | RuntimeVersion = _config?.RuntimeVersion; 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /angular-react-vue/EdgeSharp.Angular.Sample/angularapp/src/app/components/home/home.component.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

EdgeSharp

4 |

Build .NET Win32/WinForms/WPF WebView2 HTML5 Desktop Apps

5 | 6 |
7 |
8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
WebView2 SDK Version: {{_sdkVersion}}
WebView2 Runtime Version: {{_runtimeVersion}}
19 |
20 |
21 |
22 |
23 | more info 24 |
25 |
26 |
-------------------------------------------------------------------------------- /win-32/EdgeSharp.Sample/app/pages/moviedetails.html: -------------------------------------------------------------------------------- 1 |
2 |

Details

3 | 4 |
5 |

Movie

6 |
7 |
8 |
9 | Title 10 |
11 |
12 |
13 |
14 | Release Date 15 |
16 |
17 |
18 |
19 | Genre 20 |
21 |
22 |
23 |
24 | Price 25 |
26 |
27 |
28 |
29 |
30 |
31 |

32 | Back to List 33 |

34 |
35 |
-------------------------------------------------------------------------------- /wpf/EdgeSharp.Wpf.Sample/app/pages/moviedetails.html: -------------------------------------------------------------------------------- 1 |
2 |

Details

3 | 4 |
5 |

Movie

6 |
7 |
8 |
9 | Title 10 |
11 |
12 |
13 |
14 | Release Date 15 |
16 |
17 |
18 |
19 | Genre 20 |
21 |
22 |
23 |
24 | Price 25 |
26 |
27 |
28 |
29 |
30 |
31 |

32 | Back to List 33 |

34 |
35 |
-------------------------------------------------------------------------------- /winform/EdgeSharp.WinForms.Sample/app/pages/moviedetails.html: -------------------------------------------------------------------------------- 1 |
2 |

Details

3 | 4 |
5 |

Movie

6 |
7 |
8 |
9 | Title 10 |
11 |
12 |
13 |
14 | Release Date 15 |
16 |
17 |
18 |
19 | Genre 20 |
21 |
22 |
23 |
24 | Price 25 |
26 |
27 |
28 |
29 |
30 |
31 |

32 | Back to List 33 |

34 |
35 |
-------------------------------------------------------------------------------- /angular-react-vue/EdgeSharp.Vue.Sample/vueapp/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | EdgeSharp Vue Demo 16 | 17 | 18 | 21 |
22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 edgesharp 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /angular-react-vue/EdgeSharp.Vue.Sample/vueapp/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vueapp", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "serve": "vue-cli-service serve", 7 | "build": "vue-cli-service build", 8 | "lint": "vue-cli-service lint" 9 | }, 10 | "dependencies": { 11 | "axios": "^0.21.1", 12 | "core-js": "^3.6.5", 13 | "vue": "^3.0.0", 14 | "vue-router": "^4.0.10" 15 | }, 16 | "devDependencies": { 17 | "@vue/cli-plugin-babel": "~4.5.0", 18 | "@vue/cli-plugin-eslint": "~4.5.0", 19 | "@vue/cli-service": "~4.5.0", 20 | "@vue/compiler-sfc": "^3.0.0", 21 | "babel-eslint": "^10.1.0", 22 | "eslint": "^6.7.2", 23 | "eslint-plugin-vue": "^7.0.0" 24 | }, 25 | "eslintConfig": { 26 | "root": true, 27 | "env": { 28 | "node": true 29 | }, 30 | "extends": [ 31 | "plugin:vue/vue3-essential", 32 | "eslint:recommended" 33 | ], 34 | "parserOptions": { 35 | "parser": "babel-eslint" 36 | }, 37 | "rules": {} 38 | }, 39 | "browserslist": [ 40 | "> 1%", 41 | "last 2 versions", 42 | "not dead" 43 | ] 44 | } 45 | -------------------------------------------------------------------------------- /wpf/EdgeSharp.Wpf.RazorPages.Sample/Pages/Movies/Details.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using EdgeSharp.Shared.Data; 3 | using EdgeSharp.Shared.Models; 4 | using Microsoft.AspNetCore.Mvc; 5 | using Microsoft.AspNetCore.Mvc.RazorPages; 6 | using Microsoft.EntityFrameworkCore; 7 | 8 | namespace EdgeSharp.Wpf.RazorPages.Sample.Pages.Movies 9 | { 10 | public class DetailsModel : PageModel 11 | { 12 | private readonly MovieContext _context; 13 | 14 | public DetailsModel(MovieContext context) 15 | { 16 | _context = context; 17 | } 18 | 19 | public Movie Movie { get; set; } 20 | 21 | #region snippet1 22 | public async Task OnGetAsync(int? id) 23 | { 24 | if (id == null) 25 | { 26 | return NotFound(); 27 | } 28 | 29 | Movie = await _context.Movie.FirstOrDefaultAsync(m => m.Id == id); 30 | 31 | if (Movie == null) 32 | { 33 | return NotFound(); 34 | } 35 | return Page(); 36 | } 37 | #endregion 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /wpf/EdgeSharp.Wpf.Sample/Startup.cs: -------------------------------------------------------------------------------- 1 | using EdgeSharp.Core.Configuration; 2 | using EdgeSharp.Shared.ActionControllers; 3 | using EdgeSharp.Shared.Data; 4 | using Microsoft.Extensions.DependencyInjection; 5 | using Microsoft.Extensions.Logging; 6 | using System; 7 | 8 | namespace EdgeSharp.Wpf.Sample 9 | { 10 | public class Startup : WpfStartup 11 | { 12 | public override void ConfigureServices(IServiceCollection services) 13 | { 14 | base.ConfigureServices(services); 15 | services.AddLogging(configure => configure.AddConsole()); 16 | services.AddLogging(configure => configure.AddFile("Logs/serilog-{Date}.txt", LogLevel.Information)); 17 | 18 | services.AddSingleton(); 19 | services.AddScoped(); 20 | 21 | RegisterActionControllerAssembly(services, typeof(MoviesActionController).Assembly); 22 | } 23 | 24 | public override void Initialize(IServiceProvider serviceProvider) 25 | { 26 | base.Initialize(serviceProvider); 27 | serviceProvider.InitializeDb(); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /wpf/EdgeSharp.Wpf.Sample/SampleWebView2Control.cs: -------------------------------------------------------------------------------- 1 | using EdgeSharp.Core; 2 | using Microsoft.Web.WebView2.Core; 3 | using System; 4 | 5 | namespace EdgeSharp.Wpf.Sample 6 | { 7 | public class SampleWebView2Control : WebView2Control 8 | { 9 | private AppBuilder _appBuilder; 10 | 11 | protected override void Bootstrap() 12 | { 13 | _appBuilder = new AppBuilder(); 14 | ServiceLocator.Bootstrap(_appBuilder); 15 | 16 | base.Bootstrap(); 17 | } 18 | 19 | protected override void OnInitializationCompleted(object sender, CoreWebView2InitializationCompletedEventArgs e) 20 | { 21 | base.OnInitializationCompleted(sender, e); 22 | CoreWebView2.NavigationCompleted += CoreWebView2_NavigationCompleted; 23 | } 24 | 25 | private void CoreWebView2_NavigationCompleted(object sender, CoreWebView2NavigationCompletedEventArgs e) 26 | { 27 | } 28 | 29 | protected override void Dispose(bool disposing) 30 | { 31 | _appBuilder?.Stop(); 32 | base.Dispose(disposing); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /winform/EdgeSharp.WinForms.Sample/SampleWebView2Control.cs: -------------------------------------------------------------------------------- 1 | using EdgeSharp.Core; 2 | using Microsoft.Web.WebView2.Core; 3 | using System; 4 | 5 | namespace EdgeSharp.WinForms.Sample 6 | { 7 | public class SampleWebView2Control : WebView2Control 8 | { 9 | private AppBuilder _appBuilder; 10 | 11 | protected override void Bootstrap() 12 | { 13 | //_appBuilder = new AppBuilder(); 14 | //ServiceLocator.Bootstrap(_appBuilder); 15 | base.Bootstrap(); 16 | } 17 | 18 | protected override void OnInitializationCompleted(object sender, CoreWebView2InitializationCompletedEventArgs e) 19 | { 20 | base.OnInitializationCompleted(sender, e); 21 | CoreWebView2.NavigationCompleted += CoreWebView2_NavigationCompleted; 22 | } 23 | 24 | private void CoreWebView2_NavigationCompleted(object sender, CoreWebView2NavigationCompletedEventArgs e) 25 | { 26 | } 27 | 28 | protected override void Dispose(bool disposing) 29 | { 30 | //_appBuilder?.Stop(); 31 | base.Dispose(disposing); 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /wpf/EdgeSharp.Wpf.RazorPages.Sample/SampleWebView2Control.cs: -------------------------------------------------------------------------------- 1 | using EdgeSharp.Core; 2 | using Microsoft.Web.WebView2.Core; 3 | using System; 4 | 5 | namespace EdgeSharp.Wpf.RazorPages.Sample 6 | { 7 | public class SampleWebView2Control : WebView2Control 8 | { 9 | private AppBuilder _appBuilder; 10 | 11 | protected override void Bootstrap() 12 | { 13 | _appBuilder = new AppBuilder(); 14 | ServiceLocator.Bootstrap(_appBuilder); 15 | 16 | base.Bootstrap(); 17 | } 18 | 19 | protected override void OnInitializationCompleted(object sender, CoreWebView2InitializationCompletedEventArgs e) 20 | { 21 | base.OnInitializationCompleted(sender, e); 22 | CoreWebView2.NavigationCompleted += CoreWebView2_NavigationCompleted; 23 | } 24 | 25 | private void CoreWebView2_NavigationCompleted(object sender, CoreWebView2NavigationCompletedEventArgs e) 26 | { 27 | } 28 | 29 | protected override void Dispose(bool disposing) 30 | { 31 | _appBuilder?.Stop(); 32 | base.Dispose(disposing); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /win-32/EdgeSharp.Sample/app/pages/home.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

EdgeSharp

4 |

Build .NET Win32/WinForms/WPF WebView2 HTML5 Desktop Apps

5 | 6 |
7 |
8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
WebView2 SDK Version:
WebView2 Runtime Version:
19 |
20 |
21 |
22 |
23 | more info 24 |
25 |
26 |
-------------------------------------------------------------------------------- /winform/EdgeSharp.WinForms.Razor.Sample/SampleWebView2Control.cs: -------------------------------------------------------------------------------- 1 | using EdgeSharp.Core; 2 | using Microsoft.Web.WebView2.Core; 3 | using System; 4 | 5 | namespace EdgeSharp.WinForms.Razor.Sample 6 | { 7 | public class SampleWebView2Control : WebView2Control 8 | { 9 | private AppBuilder _appBuilder; 10 | 11 | protected override void Bootstrap() 12 | { 13 | //_appBuilder = new AppBuilder(); 14 | //ServiceLocator.Bootstrap(_appBuilder); 15 | base.Bootstrap(); 16 | } 17 | 18 | protected override void OnInitializationCompleted(object sender, CoreWebView2InitializationCompletedEventArgs e) 19 | { 20 | base.OnInitializationCompleted(sender, e); 21 | CoreWebView2.NavigationCompleted += CoreWebView2_NavigationCompleted; 22 | } 23 | 24 | private void CoreWebView2_NavigationCompleted(object sender, CoreWebView2NavigationCompletedEventArgs e) 25 | { 26 | } 27 | 28 | protected override void Dispose(bool disposing) 29 | { 30 | //_appBuilder?.Stop(); 31 | base.Dispose(disposing); 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /wpf/EdgeSharp.Wpf.Sample/app/pages/home.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

EdgeSharp

4 |

Build .NET Win32/WinForms/WPF WebView2 HTML5 Desktop Apps

5 | 6 |
7 |
8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
WebView2 SDK Version:
WebView2 Runtime Version:
19 |
20 |
21 |
22 |
23 | more info 24 |
25 |
26 |
-------------------------------------------------------------------------------- /winform/EdgeSharp.WinForms.Sample/app/pages/home.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

EdgeSharp

4 |

Build .NET Win32/WinForms/WPF WebView2 HTML5 Desktop Apps

5 | 6 |
7 |
8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
WebView2 SDK Version:
WebView2 Runtime Version:
19 |
20 |
21 |
22 |
23 | more info 24 |
25 |
26 |
-------------------------------------------------------------------------------- /angular-react-vue/EdgeSharp.Angular.Sample/angularapp/README.md: -------------------------------------------------------------------------------- 1 | # Angularapp 2 | 3 | This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 12.0.5. 4 | 5 | ## Development server 6 | 7 | Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files. 8 | 9 | ## Code scaffolding 10 | 11 | Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`. 12 | 13 | ## Build 14 | 15 | Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. 16 | 17 | ## Running unit tests 18 | 19 | Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io). 20 | 21 | ## Running end-to-end tests 22 | 23 | Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities. 24 | 25 | ## Further help 26 | 27 | To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page. 28 | -------------------------------------------------------------------------------- /win-32/EdgeSharp.Sample/app/jquery-validation/LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | ===================== 3 | 4 | Copyright Jörn Zaefferer 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /wpf/EdgeSharp.Wpf.Sample/app/jquery-validation/LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | ===================== 3 | 4 | Copyright Jörn Zaefferer 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /angular-react-vue/EdgeSharp.React.Sample/reactapp/webpack.config.js: -------------------------------------------------------------------------------- 1 | const path = require("path"); 2 | const HtmlWebPackPlugin = require("html-webpack-plugin"); 3 | 4 | module.exports = { 5 | entry: "/src/index.js", 6 | output: { 7 | path: path.resolve(__dirname, "dist"), 8 | }, 9 | devServer: { 10 | publicPath: "/", 11 | contentBase: "./dist", 12 | hot: true, 13 | open: true, 14 | watchOptions: { 15 | ignored: /node_modules/, 16 | poll: 1000, 17 | }, 18 | port: 9000, 19 | historyApiFallback: true, 20 | }, 21 | module: { 22 | rules: [ 23 | { 24 | test: /\.(js|jsx)$/, 25 | exclude: /node_modules/, 26 | use: { 27 | loader: "babel-loader", 28 | options: { 29 | presets: ["@babel/preset-env", "@babel/preset-react"], 30 | plugins: ['@babel/plugin-transform-runtime'] 31 | }, 32 | }, 33 | }, 34 | { 35 | test: /\.css$/, 36 | include: path.resolve(__dirname, "src"), 37 | use: ["style-loader", "css-loader"], 38 | }, 39 | ], 40 | }, 41 | plugins: [ 42 | new HtmlWebPackPlugin({ 43 | template: "./src/index.html", 44 | }), 45 | ], 46 | }; -------------------------------------------------------------------------------- /win-32/EdgeSharp.Razor.Sample/assets/jquery-validation/LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | ===================== 3 | 4 | Copyright Jörn Zaefferer 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /winform/EdgeSharp.WinForms.Sample/app/jquery-validation/LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | ===================== 3 | 4 | Copyright Jörn Zaefferer 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /wpf/EdgeSharp.Wpf.RazorPages.Sample/assets/jquery-validation/LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | ===================== 3 | 4 | Copyright Jörn Zaefferer 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /winform/EdgeSharp.WinForms.Razor.Sample/assets/jquery-validation/LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | ===================== 3 | 4 | Copyright Jörn Zaefferer 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /wpf/EdgeSharp.Wpf.Sample/MainWindow.xaml: -------------------------------------------------------------------------------- 1 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /winform/EdgeSharp.WinForms.Razor.Sample/Views/Home/Index.cshtml: -------------------------------------------------------------------------------- 1 | @{ ViewData["Title"] = "Home Page"; } 2 | 3 |
4 |
5 |

EdgeSharp

6 |

Build .NET Win32/WinForms/WPF WebView2 HTML5 Desktop Apps

7 | 8 |
9 |
10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
WebView2 SDK Version: @Model.SdkVersion
WebView2 Runtime Version: @Model.RuntimeVersion
21 |
22 |
23 |
24 |
25 | more info 26 |
27 |
28 |
-------------------------------------------------------------------------------- /angular-react-vue/EdgeSharp.Angular.Sample/angularapp/src/app/app.component.spec.ts: -------------------------------------------------------------------------------- 1 | import { TestBed } from '@angular/core/testing'; 2 | import { RouterTestingModule } from '@angular/router/testing'; 3 | import { AppComponent } from './app.component'; 4 | 5 | describe('AppComponent', () => { 6 | beforeEach(async () => { 7 | await TestBed.configureTestingModule({ 8 | imports: [ 9 | RouterTestingModule 10 | ], 11 | declarations: [ 12 | AppComponent 13 | ], 14 | }).compileComponents(); 15 | }); 16 | 17 | it('should create the app', () => { 18 | const fixture = TestBed.createComponent(AppComponent); 19 | const app = fixture.componentInstance; 20 | expect(app).toBeTruthy(); 21 | }); 22 | 23 | it(`should have as title 'angularapp'`, () => { 24 | const fixture = TestBed.createComponent(AppComponent); 25 | const app = fixture.componentInstance; 26 | expect(app.title).toEqual('angularapp'); 27 | }); 28 | 29 | it('should render title', () => { 30 | const fixture = TestBed.createComponent(AppComponent); 31 | fixture.detectChanges(); 32 | const compiled = fixture.nativeElement; 33 | expect(compiled.querySelector('.content span').textContent).toContain('angularapp app is running!'); 34 | }); 35 | }); 36 | -------------------------------------------------------------------------------- /winform/EdgeSharp.WinForms.Sample/Startup.cs: -------------------------------------------------------------------------------- 1 | using EdgeSharp.Core; 2 | using EdgeSharp.Core.Configuration; 3 | using EdgeSharp.Shared.ActionControllers; 4 | using EdgeSharp.Shared.Data; 5 | using Microsoft.Extensions.DependencyInjection; 6 | using Microsoft.Extensions.Logging; 7 | using System; 8 | 9 | namespace EdgeSharp.WinForms.Sample 10 | { 11 | public class Startup : WinFormsStartup 12 | { 13 | public override void ConfigureServices(IServiceCollection services) 14 | { 15 | base.ConfigureServices(services); 16 | services.AddLogging(configure => configure.AddConsole()); 17 | services.AddLogging(configure => configure.AddFile("Logs/serilog-{Date}.txt", LogLevel.Information)); 18 | 19 | services.AddSingleton(); 20 | services.AddScoped(); 21 | services.AddSingleton(); 22 | 23 | RegisterActionControllerAssembly(services, typeof(MoviesActionController).Assembly); 24 | } 25 | 26 | public override void Initialize(IServiceProvider serviceProvider) 27 | { 28 | base.Initialize(serviceProvider); 29 | serviceProvider.InitializeDb(); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /wpf/EdgeSharp.Wpf.RazorPages.Sample/Pages/Index.cshtml: -------------------------------------------------------------------------------- 1 | @page 2 | @model IndexModel 3 | @{ 4 | ViewData["Title"] = "Home page"; 5 | } 6 | 7 |
8 |
9 |

EdgeSharp

10 |

Build .NET Win32/WinForms/WPF WebView2 HTML5 Desktop Apps

11 | 12 |
13 |
14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 |
WebView2 SDK Version: @Model.SdkVersion
WebView2 Runtime Version: @Model.RuntimeVersion
25 |
26 |
27 |
28 |
29 | more info 30 |
31 |
32 |
-------------------------------------------------------------------------------- /angular-react-vue/EdgeSharp.Angular.Sample/angularapp/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "angularapp", 3 | "version": "0.0.0", 4 | "scripts": { 5 | "ng": "ng", 6 | "start": "ng serve", 7 | "build": "ng build", 8 | "watch": "ng build --watch --configuration development", 9 | "test": "ng test" 10 | }, 11 | "private": true, 12 | "dependencies": { 13 | "@angular/animations": "~12.0.5", 14 | "@angular/common": "~12.0.5", 15 | "@angular/compiler": "~12.0.5", 16 | "@angular/core": "~12.0.5", 17 | "@angular/forms": "~12.0.5", 18 | "@angular/platform-browser": "~12.0.5", 19 | "@angular/platform-browser-dynamic": "~12.0.5", 20 | "@angular/router": "~12.0.5", 21 | "axios": "^0.21.1", 22 | "rxjs": "~6.6.0", 23 | "tslib": "^2.1.0", 24 | "zone.js": "~0.11.4" 25 | }, 26 | "devDependencies": { 27 | "@angular-devkit/build-angular": "~12.0.5", 28 | "@angular/cli": "~12.0.5", 29 | "@angular/compiler-cli": "~12.0.5", 30 | "@types/jasmine": "~3.6.0", 31 | "@types/node": "^12.11.1", 32 | "jasmine-core": "~3.7.0", 33 | "karma": "~6.3.0", 34 | "karma-chrome-launcher": "~3.1.0", 35 | "karma-coverage": "~2.0.3", 36 | "karma-jasmine": "~4.0.0", 37 | "karma-jasmine-html-reporter": "^1.5.0", 38 | "typescript": "~4.2.3" 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /win-32/EdgeSharp.Razor.Sample/Views/Home/Index.cshtml: -------------------------------------------------------------------------------- 1 | @model EdgeSharp.Shared.Models.Info 2 | 3 | @{ 4 | ViewData["Title"] = "Home Page"; 5 | } 6 | 7 |
8 |
9 |

EdgeSharp

10 |

Build .NET Win32/WinForms/WPF WebView2 HTML5 Desktop Apps

11 | 12 |
13 |
14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 |
WebView2 SDK Version: @Model.SdkVersion
WebView2 Runtime Version: @Model.RuntimeVersion
25 |
26 |
27 |
28 |
29 | more info 30 |
31 |
32 |
-------------------------------------------------------------------------------- /win-32/EdgeSharp.Shared/ActionControllers/HomeActionController.cs: -------------------------------------------------------------------------------- 1 | using EdgeSharp.Core; 2 | using EdgeSharp.Core.Configuration; 3 | using EdgeSharp.Core.Infrastructure; 4 | using EdgeSharp.Core.Network; 5 | using EdgeSharp.Shared.Models; 6 | 7 | namespace EdgeSharp.Shared.ActionControllers 8 | { 9 | [ActionController(Name = "HomeActionController", Description = "Home controller")] 10 | public class HomeActionController : ActionController 11 | { 12 | private readonly IConfiguration _config; 13 | 14 | public HomeActionController(IConfiguration config) 15 | { 16 | _config = config; 17 | } 18 | 19 | [ActionRoute(Path = "/info")] 20 | public Info GetInfo() 21 | { 22 | return new Info 23 | { 24 | SdkVersion = _config.SdkVersion ?? VersionInfo.SdkVersion, 25 | RuntimeVersion = _config?.RuntimeVersion 26 | }; 27 | } 28 | 29 | [ActionRoute(Path = "/reload")] 30 | public void Reload() 31 | { 32 | Dispatcher.Browser.Execute(DisapatcherExecuteType.Reload); 33 | } 34 | 35 | [ActionRoute(Path = "/exit")] 36 | public void Exit() 37 | { 38 | Dispatcher.Browser.Execute(DisapatcherExecuteType.Exit); 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /winform/EdgeSharp.Shared/ActionControllers/HomeActionController.cs: -------------------------------------------------------------------------------- 1 | using EdgeSharp.Core; 2 | using EdgeSharp.Core.Configuration; 3 | using EdgeSharp.Core.Infrastructure; 4 | using EdgeSharp.Core.Network; 5 | using EdgeSharp.Shared.Models; 6 | 7 | namespace EdgeSharp.Shared.ActionControllers 8 | { 9 | [ActionController(Name = "HomeActionController", Description = "Home controller")] 10 | public class HomeActionController : ActionController 11 | { 12 | private readonly IConfiguration _config; 13 | 14 | public HomeActionController(IConfiguration config) 15 | { 16 | _config = config; 17 | } 18 | 19 | [ActionRoute(Path = "/info")] 20 | public Info GetInfo() 21 | { 22 | return new Info 23 | { 24 | SdkVersion = _config.SdkVersion ?? VersionInfo.SdkVersion, 25 | RuntimeVersion = _config?.RuntimeVersion 26 | }; 27 | } 28 | 29 | [ActionRoute(Path = "/reload")] 30 | public void Reload() 31 | { 32 | Dispatcher.Browser.Execute(DisapatcherExecuteType.Reload); 33 | } 34 | 35 | [ActionRoute(Path = "/exit")] 36 | public void Exit() 37 | { 38 | Dispatcher.Browser.Execute(DisapatcherExecuteType.Exit); 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /wpf/EdgeSharp.Shared/ActionControllers/HomeActionController.cs: -------------------------------------------------------------------------------- 1 | using EdgeSharp.Core; 2 | using EdgeSharp.Core.Configuration; 3 | using EdgeSharp.Core.Infrastructure; 4 | using EdgeSharp.Core.Network; 5 | using EdgeSharp.Shared.Models; 6 | 7 | namespace EdgeSharp.Shared.ActionControllers 8 | { 9 | [ActionController(Name = "HomeActionController", Description = "Home controller")] 10 | public class HomeActionController : ActionController 11 | { 12 | private readonly IConfiguration _config; 13 | 14 | public HomeActionController(IConfiguration config) 15 | { 16 | _config = config; 17 | } 18 | 19 | [ActionRoute(Path = "/info")] 20 | public Info GetInfo() 21 | { 22 | return new Info 23 | { 24 | SdkVersion = _config.SdkVersion ?? VersionInfo.SdkVersion, 25 | RuntimeVersion = _config?.RuntimeVersion 26 | }; 27 | } 28 | 29 | [ActionRoute(Path = "/reload")] 30 | public void Reload() 31 | { 32 | Dispatcher.Browser.Execute(DisapatcherExecuteType.Reload); 33 | } 34 | 35 | [ActionRoute(Path = "/exit")] 36 | public void Exit() 37 | { 38 | Dispatcher.Browser.Execute(DisapatcherExecuteType.Exit); 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /win-32/EdgeSharp.Razor.Sample/Controllers/HomeController.cs: -------------------------------------------------------------------------------- 1 | using System.Diagnostics; 2 | using EdgeSharp.Core.Configuration; 3 | using EdgeSharp.Core.Infrastructure; 4 | using EdgeSharp.Shared.Models; 5 | using Microsoft.AspNetCore.Mvc; 6 | using Microsoft.Extensions.Logging; 7 | 8 | namespace EdgeSharp.Razor.Sample.Controllers 9 | { 10 | public class HomeController : Controller 11 | { 12 | private readonly IConfiguration _config; 13 | private readonly ILogger _logger; 14 | 15 | public HomeController(IConfiguration config, ILogger logger) 16 | { 17 | _config = config; 18 | _logger = logger; 19 | } 20 | 21 | public IActionResult Index() 22 | { 23 | var info = new Info 24 | { 25 | SdkVersion = _config.SdkVersion ?? VersionInfo.SdkVersion, 26 | RuntimeVersion = _config?.RuntimeVersion 27 | }; 28 | 29 | return View(info); 30 | } 31 | 32 | [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] 33 | public IActionResult Error() 34 | { 35 | return View(new Shared.Models.ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier }); 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /angular-react-vue/EdgeSharp.Shared/ActionControllers/HomeActionController.cs: -------------------------------------------------------------------------------- 1 | using EdgeSharp.Core; 2 | using EdgeSharp.Core.Configuration; 3 | using EdgeSharp.Core.Infrastructure; 4 | using EdgeSharp.Core.Network; 5 | using EdgeSharp.Shared.Models; 6 | 7 | namespace EdgeSharp.Shared.ActionControllers 8 | { 9 | [ActionController(Name = "HomeActionController", Description = "Home controller")] 10 | public class HomeActionController : ActionController 11 | { 12 | private readonly IConfiguration _config; 13 | 14 | public HomeActionController(IConfiguration config) 15 | { 16 | _config = config; 17 | } 18 | 19 | [ActionRoute(Path = "/info")] 20 | public Info GetInfo() 21 | { 22 | return new Info 23 | { 24 | SdkVersion = _config.SdkVersion ?? VersionInfo.SdkVersion, 25 | RuntimeVersion = _config?.RuntimeVersion 26 | }; 27 | } 28 | 29 | [ActionRoute(Path = "/reload")] 30 | public void Reload() 31 | { 32 | Dispatcher.Browser.Execute(DisapatcherExecuteType.Reload); 33 | } 34 | 35 | [ActionRoute(Path = "/exit")] 36 | public void Exit() 37 | { 38 | Dispatcher.Browser.Execute(DisapatcherExecuteType.Exit); 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /winform/EdgeSharp.WinForms.Razor.Sample/Controllers/HomeController.cs: -------------------------------------------------------------------------------- 1 | using System.Diagnostics; 2 | using EdgeSharp.Core.Configuration; 3 | using EdgeSharp.Core.Infrastructure; 4 | using EdgeSharp.Shared.Models; 5 | using Microsoft.AspNetCore.Mvc; 6 | using Microsoft.Extensions.Logging; 7 | 8 | namespace EdgeSharp.WinForms.Razor.Sample.Controllers 9 | { 10 | public class HomeController : Controller 11 | { 12 | private readonly IConfiguration _config; 13 | private readonly ILogger _logger; 14 | 15 | public HomeController(IConfiguration config, ILogger logger) 16 | { 17 | _config = config; 18 | _logger = logger; 19 | } 20 | 21 | public IActionResult Index() 22 | { 23 | var info = new Info 24 | { 25 | SdkVersion = _config.SdkVersion ?? VersionInfo.SdkVersion, 26 | RuntimeVersion = _config?.RuntimeVersion 27 | }; 28 | 29 | return View(info); 30 | } 31 | 32 | [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] 33 | public IActionResult Error() 34 | { 35 | return View(new Shared.Models.ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier }); 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /angular-react-vue/EdgeSharp.Vue.Sample/SampleConfig.cs: -------------------------------------------------------------------------------- 1 | using EdgeSharp.Core.Defaults; 2 | using EdgeSharp.Core.Infrastructure; 3 | using System; 4 | 5 | namespace EdgeSharp.Vue.Sample 6 | { 7 | internal class SampleConfig : Configuration 8 | { 9 | public SampleConfig() : base() 10 | { 11 | // var localResource = new UrlScheme("http", "app", null, UrlSchemeType.ResourceRequest); 12 | var hostToFolderscheme = new UrlScheme("http", "dist", "dist", UrlSchemeType.HostToFolder); 13 | var requestScheme1 = new UrlScheme("https://github.com/edgeSharp/EdgeSharp", true, UrlSchemeType.ExternalBrowser); 14 | var requestScheme2 = new UrlScheme("https://www.youtube.com/watch?v=-ri7TmPeqLc", true, UrlSchemeType.Blocked); 15 | 16 | // UrlSchemes.Add(localResource); 17 | UrlSchemes.Add(hostToFolderscheme); 18 | UrlSchemes.Add(requestScheme1); 19 | UrlSchemes.Add(requestScheme2); 20 | 21 | var appDirectory = AppDomain.CurrentDomain.BaseDirectory; 22 | //var initialUrl = Path.Combine(appDirectory, "dist", "index.html"); 23 | // var initialUrl = "https://www.bing.com/"; 24 | var initialUrl = "http://dist/index.html"; 25 | StartUrl = initialUrl; 26 | 27 | // Make borderless 28 | // WindowOptions.Borderless = true; 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /angular-react-vue/EdgeSharp.Angular.Sample/SampleConfig.cs: -------------------------------------------------------------------------------- 1 | using EdgeSharp.Core.Defaults; 2 | using EdgeSharp.Core.Infrastructure; 3 | using System; 4 | 5 | namespace EdgeSharp.Angular.Sample 6 | { 7 | internal class SampleConfig : Configuration 8 | { 9 | public SampleConfig() : base() 10 | { 11 | // var localResource = new UrlScheme("http", "app", null, UrlSchemeType.ResourceRequest); 12 | var hostToFolderscheme = new UrlScheme("http", "dist", "dist", UrlSchemeType.HostToFolder); 13 | var requestScheme1 = new UrlScheme("https://github.com/edgeSharp/EdgeSharp", true, UrlSchemeType.ExternalBrowser); 14 | var requestScheme2 = new UrlScheme("https://www.youtube.com/watch?v=-ri7TmPeqLc", true, UrlSchemeType.Blocked); 15 | 16 | // UrlSchemes.Add(localResource); 17 | UrlSchemes.Add(hostToFolderscheme); 18 | UrlSchemes.Add(requestScheme1); 19 | UrlSchemes.Add(requestScheme2); 20 | 21 | var appDirectory = AppDomain.CurrentDomain.BaseDirectory; 22 | //var initialUrl = Path.Combine(appDirectory, "dist", "index.html"); 23 | // var initialUrl = "https://www.bing.com/"; 24 | var initialUrl = "http://dist/index.html"; 25 | StartUrl = initialUrl; 26 | 27 | // Make borderless 28 | WindowOptions.Borderless = true; 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /angular-react-vue/EdgeSharp.React.Sample/SampleConfig.cs: -------------------------------------------------------------------------------- 1 | using EdgeSharp.Core.Defaults; 2 | using EdgeSharp.Core.Infrastructure; 3 | using System; 4 | 5 | namespace EdgeSharp.React.Sample 6 | { 7 | internal class SampleConfig : Configuration 8 | { 9 | public SampleConfig() : base() 10 | { 11 | // var localResource = new UrlScheme("http", "app", null, UrlSchemeType.ResourceRequest); 12 | var hostToFolderscheme = new UrlScheme("http", "dist", "dist", UrlSchemeType.HostToFolder); 13 | var requestScheme1 = new UrlScheme("https://github.com/edgeSharp/EdgeSharp", true, UrlSchemeType.ExternalBrowser); 14 | var requestScheme2 = new UrlScheme("https://www.youtube.com/watch?v=-ri7TmPeqLc", true, UrlSchemeType.Blocked); 15 | 16 | // UrlSchemes.Add(localResource); 17 | UrlSchemes.Add(hostToFolderscheme); 18 | UrlSchemes.Add(requestScheme1); 19 | UrlSchemes.Add(requestScheme2); 20 | 21 | var appDirectory = AppDomain.CurrentDomain.BaseDirectory; 22 | //var initialUrl = Path.Combine(appDirectory, "dist", "index.html"); 23 | // var initialUrl = "https://www.bing.com/"; 24 | var initialUrl = "http://dist/index.html"; 25 | StartUrl = initialUrl; 26 | 27 | // Make borderless 28 | //WindowOptions.Borderless = true; 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /win-32/EdgeSharp.Sample/Program.cs: -------------------------------------------------------------------------------- 1 | using EdgeSharp.Shared.ActionControllers; 2 | using EdgeSharp.Shared.Data; 3 | using Microsoft.Extensions.DependencyInjection; 4 | using Microsoft.Extensions.Logging; 5 | using System; 6 | 7 | namespace EdgeSharp.Sample 8 | { 9 | class Program 10 | { 11 | [STAThread] 12 | static void Main(string[] args) 13 | { 14 | AppBuilder 15 | .Create() 16 | .UseConfig() 17 | .UseWindow() 18 | .UseApp() 19 | .Build() 20 | .Run(args); 21 | } 22 | } 23 | 24 | public class SampleApp : EdgeSharpApp 25 | { 26 | public override void ConfigureServices(IServiceCollection services) 27 | { 28 | base.ConfigureServices(services); 29 | services.AddLogging(configure => configure.AddConsole()); 30 | services.AddLogging(configure => configure.AddFile("Logs/serilog-{Date}.txt", LogLevel.Information)); 31 | 32 | services.AddScoped(); 33 | 34 | RegisterActionControllerAssembly(services, typeof(MoviesActionController).Assembly); 35 | } 36 | 37 | public override void Initialize(IServiceProvider serviceProvider) 38 | { 39 | base.Initialize(serviceProvider); 40 | serviceProvider.InitializeDb(); 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /wpf/EdgeSharp.Wpf.RazorPages.Sample/Pages/Movies/Create.cshtml.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Mvc; 2 | using Microsoft.AspNetCore.Mvc.RazorPages; 3 | using System.Threading.Tasks; 4 | using EdgeSharp.Shared.Data; 5 | using EdgeSharp.Shared.Models; 6 | 7 | namespace EdgeSharp.Wpf.RazorPages.Sample.Pages.Movies 8 | { 9 | public class CreateModel : PageModel 10 | { 11 | private readonly MovieContext _context; 12 | 13 | public CreateModel(MovieContext context) 14 | { 15 | _context = context; 16 | } 17 | 18 | public IActionResult OnGet() 19 | { 20 | //Movie = new Movie 21 | //{ 22 | // Genre = "Action", 23 | // Price = 1.99m, 24 | // ReleaseDate = DateTime.Now, 25 | // Title = "Conan" 26 | // , Rating = "R" 27 | //}; 28 | return Page(); 29 | } 30 | 31 | [BindProperty] 32 | public Movie Movie { get; set; } 33 | 34 | #region snippet 35 | public async Task OnPostAsync() 36 | { 37 | if (!ModelState.IsValid) 38 | { 39 | return Page(); 40 | } 41 | 42 | _context.Movie.Add(Movie); 43 | await _context.SaveChangesAsync(); 44 | 45 | return RedirectToPage("./Index"); 46 | } 47 | #endregion 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /angular-react-vue/EdgeSharp.Angular.Sample/Program.cs: -------------------------------------------------------------------------------- 1 | using EdgeSharp.Shared.ActionControllers; 2 | using EdgeSharp.Shared.Data; 3 | using Microsoft.Extensions.DependencyInjection; 4 | using Microsoft.Extensions.Logging; 5 | using System; 6 | 7 | namespace EdgeSharp.Angular.Sample 8 | { 9 | class Program 10 | { 11 | [STAThread] 12 | static void Main(string[] args) 13 | { 14 | AppBuilder 15 | .Create() 16 | .UseConfig() 17 | .UseWindow() 18 | .UseApp() 19 | .Build() 20 | .Run(args); 21 | } 22 | } 23 | 24 | public class DemoApp : EdgeSharpApp 25 | { 26 | public override void ConfigureServices(IServiceCollection services) 27 | { 28 | base.ConfigureServices(services); 29 | services.AddLogging(configure => configure.AddConsole()); 30 | services.AddLogging(configure => configure.AddFile("Logs/serilog-{Date}.txt", LogLevel.Information)); 31 | 32 | services.AddScoped(); 33 | 34 | RegisterActionControllerAssembly(services, typeof(MoviesActionController).Assembly); 35 | } 36 | 37 | public override void Initialize(IServiceProvider serviceProvider) 38 | { 39 | base.Initialize(serviceProvider); 40 | serviceProvider.InitializeDb(); 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /angular-react-vue/EdgeSharp.React.Sample/Program.cs: -------------------------------------------------------------------------------- 1 | using EdgeSharp.Shared.ActionControllers; 2 | using EdgeSharp.Shared.Data; 3 | using Microsoft.Extensions.DependencyInjection; 4 | using Microsoft.Extensions.Logging; 5 | using System; 6 | 7 | namespace EdgeSharp.React.Sample 8 | { 9 | class Program 10 | { 11 | [STAThread] 12 | static void Main(string[] args) 13 | { 14 | AppBuilder 15 | .Create() 16 | .UseConfig() 17 | .UseWindow() 18 | .UseApp() 19 | .Build() 20 | .Run(args); 21 | } 22 | } 23 | 24 | public class SampleApp : EdgeSharpApp 25 | { 26 | public override void ConfigureServices(IServiceCollection services) 27 | { 28 | base.ConfigureServices(services); 29 | services.AddLogging(configure => configure.AddConsole()); 30 | services.AddLogging(configure => configure.AddFile("Logs/serilog-{Date}.txt", LogLevel.Information)); 31 | 32 | services.AddScoped(); 33 | 34 | RegisterActionControllerAssembly(services, typeof(MoviesActionController).Assembly); 35 | } 36 | 37 | public override void Initialize(IServiceProvider serviceProvider) 38 | { 39 | base.Initialize(serviceProvider); 40 | serviceProvider.InitializeDb(); 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /angular-react-vue/EdgeSharp.Vue.Sample/Program.cs: -------------------------------------------------------------------------------- 1 | using EdgeSharp.Shared.ActionControllers; 2 | using EdgeSharp.Shared.Data; 3 | using Microsoft.Extensions.DependencyInjection; 4 | using Microsoft.Extensions.Logging; 5 | using System; 6 | 7 | namespace EdgeSharp.Vue.Sample 8 | { 9 | class Program 10 | { 11 | [STAThread] 12 | static void Main(string[] args) 13 | { 14 | AppBuilder 15 | .Create() 16 | .UseConfig() 17 | .UseWindow() 18 | .UseApp() 19 | .Build() 20 | .Run(args); 21 | } 22 | } 23 | 24 | public class SampleApp : EdgeSharpApp 25 | { 26 | public override void ConfigureServices(IServiceCollection services) 27 | { 28 | base.ConfigureServices(services); 29 | services.AddLogging(configure => configure.AddConsole()); 30 | services.AddLogging(configure => configure.AddFile("Logs/serilog-{Date}.txt", LogLevel.Information)); 31 | 32 | services.AddScoped(); 33 | 34 | RegisterActionControllerAssembly(services, typeof(MoviesActionController).Assembly); 35 | } 36 | 37 | public override void Initialize(IServiceProvider serviceProvider) 38 | { 39 | base.Initialize(serviceProvider); 40 | serviceProvider.InitializeDb(); 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /win-32/EdgeSharp.Sample/app/pages/moviedelete.html: -------------------------------------------------------------------------------- 1 |
2 |

Delete

3 | 4 |

Are you sure you want to delete this?

5 |
6 |

Movie

7 |
8 |
9 |
10 | Title 11 |
12 |
13 |
14 |
15 | Release Date 16 |
17 |
18 |
19 |
20 | Genre 21 |
22 |
23 |
24 |
25 | Price 26 |
27 |
28 |
29 |
30 |
31 | 32 | 33 | 34 |
35 |
36 |

37 | | 38 | Back to List 39 |

40 |
41 |
42 |
-------------------------------------------------------------------------------- /wpf/EdgeSharp.Wpf.Sample/app/pages/moviedelete.html: -------------------------------------------------------------------------------- 1 |
2 |

Delete

3 | 4 |

Are you sure you want to delete this?

5 |
6 |

Movie

7 |
8 |
9 |
10 | Title 11 |
12 |
13 |
14 |
15 | Release Date 16 |
17 |
18 |
19 |
20 | Genre 21 |
22 |
23 |
24 |
25 | Price 26 |
27 |
28 |
29 |
30 |
31 | 32 | 33 | 34 |
35 |
36 |

37 | | 38 | Back to List 39 |

40 |
41 |
42 |
-------------------------------------------------------------------------------- /winform/EdgeSharp.WinForms.Sample/app/pages/moviedelete.html: -------------------------------------------------------------------------------- 1 |
2 |

Delete

3 | 4 |

Are you sure you want to delete this?

5 |
6 |

Movie

7 |
8 |
9 |
10 | Title 11 |
12 |
13 |
14 |
15 | Release Date 16 |
17 |
18 |
19 |
20 | Genre 21 |
22 |
23 |
24 |
25 | Price 26 |
27 |
28 |
29 |
30 |
31 | 32 | 33 | 34 |
35 |
36 |

37 | | 38 | Back to List 39 |

40 |
41 |
42 |
-------------------------------------------------------------------------------- /win-32/EdgeSharp.Sample/SampleConfig.cs: -------------------------------------------------------------------------------- 1 | using EdgeSharp.Core.Defaults; 2 | using EdgeSharp.Core.Infrastructure; 3 | using System; 4 | 5 | namespace EdgeSharp.Sample 6 | { 7 | internal class SampleConfig : Configuration 8 | { 9 | public SampleConfig() : base() 10 | { 11 | // var localResource = new UrlScheme("http", "app", null, UrlSchemeType.ResourceRequest); 12 | var hostToFolderscheme = new UrlScheme("http", "app", "app", UrlSchemeType.HostToFolder); 13 | var requestScheme1 = new UrlScheme("https://github.com/edgeSharp/EdgeSharp", true, UrlSchemeType.ExternalBrowser); 14 | var requestScheme2 = new UrlScheme("https://www.youtube.com/watch?v=-ri7TmPeqLc", true, UrlSchemeType.Blocked); 15 | 16 | // UrlSchemes.Add(localResource); 17 | UrlSchemes.Add(hostToFolderscheme); 18 | UrlSchemes.Add(requestScheme1); 19 | UrlSchemes.Add(requestScheme2); 20 | 21 | var appDirectory = AppDomain.CurrentDomain.BaseDirectory; 22 | //var initialUrl = Path.Combine(appDirectory, "htf", "index.html"); 23 | //var initialUrl = Path.Combine(appDirectory, "app", "index.html"); 24 | // var initialUrl = "https://www.bing.com/"; 25 | var initialUrl = "http://app/index.html"; 26 | // var initialUrl = "http://htf/index.html"; 27 | StartUrl = initialUrl; 28 | 29 | // Make borderless 30 | // WindowOptions.Borderless = true; 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /winform/EdgeSharp.WinForms.Sample/SampleConfig.cs: -------------------------------------------------------------------------------- 1 | using EdgeSharp.Core.Defaults; 2 | using EdgeSharp.Core.Infrastructure; 3 | using System; 4 | 5 | namespace EdgeSharp.WinForms.Sample 6 | { 7 | internal class SampleConfig : Configuration 8 | { 9 | public SampleConfig() : base() 10 | { 11 | // var localResource = new UrlScheme("http", "app", null, UrlSchemeType.ResourceRequest); 12 | var hostToFolderscheme = new UrlScheme("http", "app", "app", UrlSchemeType.HostToFolder); 13 | var requestScheme1 = new UrlScheme("https://github.com/edgesharp/EdgeSharp", true, UrlSchemeType.ExternalBrowser); 14 | var requestScheme2 = new UrlScheme("https://www.youtube.com/watch?v=-ri7TmPeqLc", true, UrlSchemeType.Blocked); 15 | 16 | // UrlSchemes.Add(localResource); 17 | UrlSchemes.Add(hostToFolderscheme); 18 | UrlSchemes.Add(requestScheme1); 19 | UrlSchemes.Add(requestScheme2); 20 | 21 | var appDirectory = AppDomain.CurrentDomain.BaseDirectory; 22 | //var initialUrl = Path.Combine(appDirectory, "htf", "index.html"); 23 | //var initialUrl = Path.Combine(appDirectory, "app", "index.html"); 24 | // var initialUrl = "https://www.bing.com/"; 25 | var initialUrl = "http://app/index.html"; 26 | // var initialUrl = "http://htf/index.html"; 27 | StartUrl = initialUrl; 28 | 29 | // Make borderless 30 | // WindowOptions.Borderless = true; 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /win-32/EdgeSharp.Sample/app/pages/movies.html: -------------------------------------------------------------------------------- 1 |
2 |

3 | Create New 4 |

5 | 6 |
7 |
8 | 14 |
15 |
16 |
17 | 18 | 19 |
20 |
21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 |
TitleRelease DateGenrePricePriceRating
38 |
39 | -------------------------------------------------------------------------------- /wpf/EdgeSharp.Wpf.Sample/app/pages/movies.html: -------------------------------------------------------------------------------- 1 |
2 |

3 | Create New 4 |

5 | 6 |
7 |
8 | 14 |
15 |
16 |
17 | 18 | 19 |
20 |
21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 |
TitleRelease DateGenrePricePriceRating
38 |
39 | -------------------------------------------------------------------------------- /winform/EdgeSharp.WinForms.Sample/app/pages/movies.html: -------------------------------------------------------------------------------- 1 |
2 |

3 | Create New 4 |

5 | 6 |
7 |
8 | 14 |
15 |
16 |
17 | 18 | 19 |
20 |
21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 |
TitleRelease DateGenrePricePriceRating
38 |
39 | -------------------------------------------------------------------------------- /wpf/EdgeSharp.Wpf.RazorPages.Sample/SampleConfig.cs: -------------------------------------------------------------------------------- 1 | using EdgeSharp.Core.Defaults; 2 | using EdgeSharp.Core.Infrastructure; 3 | using System; 4 | 5 | namespace EdgeSharp.Wpf.RazorPages.Sample 6 | { 7 | internal class SampleConfig : Configuration 8 | { 9 | public SampleConfig() : base() 10 | { 11 | // var localResource = new UrlScheme("http", "app", null, UrlSchemeType.ResourceRequest); 12 | var hostToFolderscheme = new UrlScheme("http", "app", "app", UrlSchemeType.HostToFolder); 13 | var requestScheme1 = new UrlScheme("https://github.com/edgesharp/EdgeSharp", true, UrlSchemeType.ExternalBrowser); 14 | var requestScheme2 = new UrlScheme("https://www.youtube.com/watch?v=-ri7TmPeqLc", true, UrlSchemeType.Blocked); 15 | 16 | // UrlSchemes.Add(localResource); 17 | UrlSchemes.Add(hostToFolderscheme); 18 | UrlSchemes.Add(requestScheme1); 19 | UrlSchemes.Add(requestScheme2); 20 | 21 | var appDirectory = AppDomain.CurrentDomain.BaseDirectory; 22 | //var initialUrl = Path.Combine(appDirectory, "htf", "index.html"); 23 | //var initialUrl = Path.Combine(appDirectory, "app", "index.html"); 24 | // var initialUrl = "https://www.bing.com/"; 25 | // var initialUrl = "http://app/index.html"; 26 | // var initialUrl = "http://htf/index.html"; 27 | var initialUrl = "https://edgesharp.owin.com/"; 28 | StartUrl = initialUrl; 29 | 30 | // Make borderless 31 | // WindowOptions.Borderless = true; 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /wpf/EdgeSharp.Wpf.Sample/SampleConfig.cs: -------------------------------------------------------------------------------- 1 | using EdgeSharp.Core.Defaults; 2 | using EdgeSharp.Core.Infrastructure; 3 | using System; 4 | 5 | namespace EdgeSharp.Wpf.Sample 6 | { 7 | internal class SampleConfig : Configuration 8 | { 9 | public SampleConfig() : base() 10 | { 11 | // var localResource = new UrlScheme("http", "app", null, UrlSchemeType.ResourceRequest); 12 | var hostToFolderscheme = new UrlScheme("http", "app", "app", UrlSchemeType.HostToFolder); 13 | var requestScheme1 = new UrlScheme("https://github.com/edgesharp/EdgeSharp", true, UrlSchemeType.ExternalBrowser); 14 | var requestScheme2 = new UrlScheme("https://www.youtube.com/watch?v=-ri7TmPeqLc", true, UrlSchemeType.Blocked); 15 | 16 | // UrlSchemes.Add(localResource); 17 | UrlSchemes.Add(hostToFolderscheme); 18 | UrlSchemes.Add(requestScheme1); 19 | UrlSchemes.Add(requestScheme2); 20 | 21 | var appDirectory = AppDomain.CurrentDomain.BaseDirectory; 22 | //var initialUrl = Path.Combine(appDirectory, "htf", "index.html"); 23 | //var initialUrl = Path.Combine(appDirectory, "app", "index.html"); 24 | // var initialUrl = "https://www.bing.com/"; 25 | var initialUrl = "http://app/index.html"; 26 | // var initialUrl = "http://htf/index.html"; 27 | StartUrl = initialUrl; 28 | 29 | // this.WebView2CreationOptions.BrowserExecutableFolder = "runtime"; 30 | 31 | // Make borderless 32 | // WindowOptions.Borderless = true; 33 | } 34 | } 35 | } -------------------------------------------------------------------------------- /winform/EdgeSharp.WinForms.Razor.Sample/SampleConfig.cs: -------------------------------------------------------------------------------- 1 | using EdgeSharp.Core.Defaults; 2 | using EdgeSharp.Core.Infrastructure; 3 | using System; 4 | 5 | namespace EdgeSharp.WinForms.Razor.Sample 6 | { 7 | internal class SampleConfig : Configuration 8 | { 9 | public SampleConfig() : base() 10 | { 11 | // var localResource = new UrlScheme("http", "app", null, UrlSchemeType.ResourceRequest); 12 | var hostToFolderscheme = new UrlScheme("http", "app", "app", UrlSchemeType.HostToFolder); 13 | var requestScheme1 = new UrlScheme("https://github.com/edgesharp/EdgeSharp", true, UrlSchemeType.ExternalBrowser); 14 | var requestScheme2 = new UrlScheme("https://www.youtube.com/watch?v=-ri7TmPeqLc", true, UrlSchemeType.Blocked); 15 | 16 | // UrlSchemes.Add(localResource); 17 | UrlSchemes.Add(hostToFolderscheme); 18 | UrlSchemes.Add(requestScheme1); 19 | UrlSchemes.Add(requestScheme2); 20 | 21 | var appDirectory = AppDomain.CurrentDomain.BaseDirectory; 22 | //var initialUrl = Path.Combine(appDirectory, "htf", "index.html"); 23 | //var initialUrl = Path.Combine(appDirectory, "app", "index.html"); 24 | // var initialUrl = "https://www.bing.com/"; 25 | //var initialUrl = "http://app/index.html"; 26 | // var initialUrl = "http://htf/index.html"; 27 | var initialUrl = "https://edgesharp.owin.com/"; 28 | StartUrl = initialUrl; 29 | 30 | // Make borderless 31 | // WindowOptions.Borderless = true; 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /angular-react-vue/EdgeSharp.Angular.Sample/angularapp/src/app/services/action.controller.client.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | import { ServiceConfig } from './service.config'; 3 | 4 | declare var executeHostObject: any; 5 | declare var executePostMessage: any; 6 | declare var executeHttpClient: any; 7 | 8 | 9 | @Injectable({ 10 | providedIn: 'root' 11 | }) 12 | export class ActionClientService { 13 | 14 | constructor(private _serviceConfig: ServiceConfig) { 15 | } 16 | 17 | public execute(url: string) { 18 | this.executeLocal(url, null, null, null); 19 | } 20 | 21 | public get(url: string, callback: Function, onErrorCallback = null) { 22 | this.executeLocal(url, null, callback, onErrorCallback); 23 | } 24 | 25 | public post(url: string, request: any, callback: Function, onErrorCallback = null) { 26 | this.executeLocal(url, request, callback, onErrorCallback); 27 | } 28 | /* 29 | * There are 3 IPC options, developers can choose amongst the options. 30 | * 1. Host object 31 | * 2. HtttpClient - Ajax/XHR calls 32 | * 3. Post Message 33 | */ 34 | private executeLocal(url: string, request: any, callback: any, onErrorCallback: any) { 35 | 36 | if (this._serviceConfig.ipcoption === 'httpclient') { 37 | executeHttpClient(url, request, callback, onErrorCallback); 38 | } else if (this._serviceConfig.ipcoption === 'postmessage') { 39 | executePostMessage(url, request, callback, onErrorCallback); 40 | } else { 41 | executeHostObject(url, request, callback, onErrorCallback); 42 | } 43 | } 44 | } -------------------------------------------------------------------------------- /angular-react-vue/EdgeSharp.Vue.Sample/vueapp/src/components/Home.vue: -------------------------------------------------------------------------------- 1 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /win-32/EdgeSharp.Razor.Sample/Views/Movies/Details.cshtml: -------------------------------------------------------------------------------- 1 | @model EdgeSharp.Shared.Models.Movie 2 | 3 | @{ 4 | ViewData["Title"] = "Details"; 5 | } 6 | 7 |
8 | 9 |

Details

10 | 11 |
12 |

Movie

13 |
14 |
15 |
16 | @Html.DisplayNameFor(model => model.Title) 17 |
18 |
19 | @Html.DisplayFor(model => model.Title) 20 |
21 |
22 | @Html.DisplayNameFor(model => model.ReleaseDate) 23 |
24 |
25 | @Html.DisplayFor(model => model.ReleaseDate) 26 |
27 |
28 | @Html.DisplayNameFor(model => model.Genre) 29 |
30 |
31 | @Html.DisplayFor(model => model.Genre) 32 |
33 |
34 | @Html.DisplayNameFor(model => model.Price) 35 |
36 |
37 | @Html.DisplayFor(model => model.Price) 38 |
39 |
40 |
41 |
42 |

43 | Edit | 44 | Back to List 45 |

46 |
47 |
-------------------------------------------------------------------------------- /wpf/EdgeSharp.Wpf.RazorPages.Sample/Pages/Movies/Delete.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using EdgeSharp.Shared.Data; 3 | using EdgeSharp.Shared.Models; 4 | using Microsoft.AspNetCore.Mvc; 5 | using Microsoft.AspNetCore.Mvc.RazorPages; 6 | using Microsoft.EntityFrameworkCore; 7 | 8 | namespace EdgeSharp.Wpf.RazorPages.Sample.Pages.Movies 9 | { 10 | public class DeleteModel : PageModel 11 | { 12 | private readonly MovieContext _context; 13 | 14 | public DeleteModel(MovieContext context) 15 | { 16 | _context = context; 17 | } 18 | 19 | [BindProperty] 20 | public Movie Movie { get; set; } 21 | 22 | public async Task OnGetAsync(int? id) 23 | { 24 | if (id == null) 25 | { 26 | return NotFound(); 27 | } 28 | 29 | Movie = await _context.Movie.FirstOrDefaultAsync(m => m.Id == id); 30 | 31 | if (Movie == null) 32 | { 33 | return NotFound(); 34 | } 35 | return Page(); 36 | } 37 | 38 | public async Task OnPostAsync(int? id) 39 | { 40 | if (id == null) 41 | { 42 | return NotFound(); 43 | } 44 | 45 | Movie = await _context.Movie.FindAsync(id); 46 | 47 | if (Movie != null) 48 | { 49 | _context.Movie.Remove(Movie); 50 | await _context.SaveChangesAsync(); 51 | } 52 | 53 | return RedirectToPage("./Index"); 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /winform/EdgeSharp.WinForms.Razor.Sample/Views/Movies/Details.cshtml: -------------------------------------------------------------------------------- 1 | @model EdgeSharp.Shared.Models.Movie 2 | 3 | @{ 4 | ViewData["Title"] = "Details"; 5 | } 6 | 7 |
8 | 9 |

Details

10 | 11 |
12 |

Movie

13 |
14 |
15 |
16 | @Html.DisplayNameFor(model => model.Title) 17 |
18 |
19 | @Html.DisplayFor(model => model.Title) 20 |
21 |
22 | @Html.DisplayNameFor(model => model.ReleaseDate) 23 |
24 |
25 | @Html.DisplayFor(model => model.ReleaseDate) 26 |
27 |
28 | @Html.DisplayNameFor(model => model.Genre) 29 |
30 |
31 | @Html.DisplayFor(model => model.Genre) 32 |
33 |
34 | @Html.DisplayNameFor(model => model.Price) 35 |
36 |
37 | @Html.DisplayFor(model => model.Price) 38 |
39 |
40 |
41 |
42 |

43 | Edit | 44 | Back to List 45 |

46 |
47 |
-------------------------------------------------------------------------------- /win-32/EdgeSharp.Sample/app/pages/moviedelete.js: -------------------------------------------------------------------------------- 1 | async function loadMovie() { 2 | try { 3 | var query = ''; 4 | if (tempData.urlQueryPart !== null) { 5 | query = tempData.urlQueryPart; 6 | tempData.urlQueryPart = null; 7 | } 8 | 9 | let remObject = await window.chrome.webview.hostObjects.execute; 10 | let result = await remObject.Send('/moviedelete/get' + query, null); 11 | 12 | if (result !== null) { 13 | var jsonData = JSON.parse(result); 14 | document.getElementById("delId").value = jsonData.Id; 15 | document.getElementById("delTitle").innerHTML = jsonData.Title; 16 | document.getElementById("delReleaseDate").innerHTML = jsonData.ReleaseDate; 17 | document.getElementById("delGenre").innerHTML = jsonData.Genre; 18 | document.getElementById("delPrice").innerHTML = jsonData.Price; 19 | } 20 | 21 | } catch (err) { 22 | console.error(error); 23 | } 24 | } 25 | 26 | async function deleteMovie() { 27 | try { 28 | 29 | var idstr = document.getElementById("delId").value; 30 | var id = parseInt(idstr); 31 | 32 | var request = {}; 33 | request.id = id; 34 | 35 | let remObject = await window.chrome.webview.hostObjects.execute; 36 | let result = await remObject.Send('/moviedelete/confirmed', JSON.stringify(request)); 37 | 38 | if (result === true || result === 'true') { 39 | navigateTo('/movies'); 40 | } 41 | 42 | } catch (err) { 43 | console.error(error); 44 | } 45 | } 46 | 47 | loadMovie(); 48 | 49 | -------------------------------------------------------------------------------- /wpf/EdgeSharp.Wpf.Sample/app/pages/moviedelete.js: -------------------------------------------------------------------------------- 1 | async function loadMovie() { 2 | try { 3 | var query = ''; 4 | if (tempData.urlQueryPart !== null) { 5 | query = tempData.urlQueryPart; 6 | tempData.urlQueryPart = null; 7 | } 8 | 9 | let remObject = await window.chrome.webview.hostObjects.execute; 10 | let result = await remObject.Send('/moviedelete/get' + query, null); 11 | 12 | if (result !== null) { 13 | var jsonData = JSON.parse(result); 14 | document.getElementById("delId").value = jsonData.Id; 15 | document.getElementById("delTitle").innerHTML = jsonData.Title; 16 | document.getElementById("delReleaseDate").innerHTML = jsonData.ReleaseDate; 17 | document.getElementById("delGenre").innerHTML = jsonData.Genre; 18 | document.getElementById("delPrice").innerHTML = jsonData.Price; 19 | } 20 | 21 | } catch (err) { 22 | console.error(error); 23 | } 24 | } 25 | 26 | async function deleteMovie() { 27 | try { 28 | 29 | var idstr = document.getElementById("delId").value; 30 | var id = parseInt(idstr); 31 | 32 | var request = {}; 33 | request.id = id; 34 | 35 | let remObject = await window.chrome.webview.hostObjects.execute; 36 | let result = await remObject.Send('/moviedelete/confirmed', JSON.stringify(request)); 37 | 38 | if (result === true || result === 'true') { 39 | navigateTo('/movies'); 40 | } 41 | 42 | } catch (err) { 43 | console.error(error); 44 | } 45 | } 46 | 47 | loadMovie(); 48 | 49 | -------------------------------------------------------------------------------- /angular-react-vue/EdgeSharp.Angular.Sample/angularapp/karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration file, see link for more information 2 | // https://karma-runner.github.io/1.0/config/configuration-file.html 3 | 4 | module.exports = function (config) { 5 | config.set({ 6 | basePath: '', 7 | frameworks: ['jasmine', '@angular-devkit/build-angular'], 8 | plugins: [ 9 | require('karma-jasmine'), 10 | require('karma-chrome-launcher'), 11 | require('karma-jasmine-html-reporter'), 12 | require('karma-coverage'), 13 | require('@angular-devkit/build-angular/plugins/karma') 14 | ], 15 | client: { 16 | jasmine: { 17 | // you can add configuration options for Jasmine here 18 | // the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html 19 | // for example, you can disable the random execution with `random: false` 20 | // or set a specific seed with `seed: 4321` 21 | }, 22 | clearContext: false // leave Jasmine Spec Runner output visible in browser 23 | }, 24 | jasmineHtmlReporter: { 25 | suppressAll: true // removes the duplicated traces 26 | }, 27 | coverageReporter: { 28 | dir: require('path').join(__dirname, './coverage/angularapp'), 29 | subdir: '.', 30 | reporters: [ 31 | { type: 'html' }, 32 | { type: 'text-summary' } 33 | ] 34 | }, 35 | reporters: ['progress', 'kjhtml'], 36 | port: 9876, 37 | colors: true, 38 | logLevel: config.LOG_INFO, 39 | autoWatch: true, 40 | browsers: ['Chrome'], 41 | singleRun: false, 42 | restartOnFileChange: true 43 | }); 44 | }; 45 | -------------------------------------------------------------------------------- /winform/EdgeSharp.WinForms.Sample/app/pages/moviedelete.js: -------------------------------------------------------------------------------- 1 | async function loadMovie() { 2 | try { 3 | var query = ''; 4 | if (tempData.urlQueryPart !== null) { 5 | query = tempData.urlQueryPart; 6 | tempData.urlQueryPart = null; 7 | } 8 | 9 | let remObject = await window.chrome.webview.hostObjects.execute; 10 | let result = await remObject.Send('/moviedelete/get' + query, null); 11 | 12 | if (result !== null) { 13 | var jsonData = JSON.parse(result); 14 | document.getElementById("delId").value = jsonData.Id; 15 | document.getElementById("delTitle").innerHTML = jsonData.Title; 16 | document.getElementById("delReleaseDate").innerHTML = jsonData.ReleaseDate; 17 | document.getElementById("delGenre").innerHTML = jsonData.Genre; 18 | document.getElementById("delPrice").innerHTML = jsonData.Price; 19 | } 20 | 21 | } catch (err) { 22 | console.error(error); 23 | } 24 | } 25 | 26 | async function deleteMovie() { 27 | try { 28 | 29 | var idstr = document.getElementById("delId").value; 30 | var id = parseInt(idstr); 31 | 32 | var request = {}; 33 | request.id = id; 34 | 35 | let remObject = await window.chrome.webview.hostObjects.execute; 36 | let result = await remObject.Send('/moviedelete/confirmed', JSON.stringify(request)); 37 | 38 | if (result === true || result === 'true') { 39 | navigateTo('/movies'); 40 | } 41 | 42 | } catch (err) { 43 | console.error(error); 44 | } 45 | } 46 | 47 | loadMovie(); 48 | 49 | -------------------------------------------------------------------------------- /win-32/EdgeSharp.Sample/app/pages/home.js: -------------------------------------------------------------------------------- 1 | function getInfo_postMessage() { 2 | window.external.Execute('/info' ) 3 | .then(function (response) { 4 | var jsonData = JSON.parse(response); 5 | $('#sdkVersion').html(jsonData.sdk); 6 | $('#runtimeVersion').html(jsonData.runtime); 7 | }) 8 | .catch(function (error) { 9 | console.error(error); 10 | }); 11 | } 12 | 13 | function getInfo_httpClient() { 14 | axios.get('http://edgesharp.com/info') 15 | .then(response => { 16 | if (response.status == 200) { 17 | $('#sdkVersion').text(response.data.sdk); 18 | $('#runtimeVersion').text(response.data.runtime); 19 | } 20 | else { 21 | console.log(response); 22 | } 23 | }) 24 | .catch(error => { 25 | console.log(error) 26 | }); 27 | } 28 | 29 | 30 | async function getInfo_hostObject() { 31 | try { 32 | 33 | let remObject = await window.chrome.webview.hostObjects.execute; 34 | let result = await remObject.Send('/info', null); 35 | 36 | var jsonData = JSON.parse(result); 37 | $('#sdkVersion').html(jsonData.sdk); 38 | $('#runtimeVersion').html(jsonData.runtime); 39 | 40 | } catch (err) { 41 | console.error(err); 42 | } 43 | } 44 | 45 | function getInfo() { 46 | if (tempData.selectedIpcOption === 'httpclient') { 47 | getInfo_httpClient(); 48 | } else if (tempData.selectedIpcOption === 'postmessage') { 49 | getInfo_postMessage(); 50 | } else { 51 | getInfo_hostObject(); 52 | } 53 | } 54 | 55 | getInfo(); 56 | -------------------------------------------------------------------------------- /wpf/EdgeSharp.Wpf.Sample/app/pages/home.js: -------------------------------------------------------------------------------- 1 | function getInfo_postMessage() { 2 | window.external.Execute('/info' ) 3 | .then(function (response) { 4 | var jsonData = JSON.parse(response); 5 | $('#sdkVersion').html(jsonData.sdk); 6 | $('#runtimeVersion').html(jsonData.runtime); 7 | }) 8 | .catch(function (error) { 9 | console.error(error); 10 | }); 11 | } 12 | 13 | function getInfo_httpClient() { 14 | axios.get('http://edgesharp.com/info') 15 | .then(response => { 16 | if (response.status == 200) { 17 | $('#sdkVersion').text(response.data.sdk); 18 | $('#runtimeVersion').text(response.data.runtime); 19 | } 20 | else { 21 | console.log(response); 22 | } 23 | }) 24 | .catch(error => { 25 | console.log(error) 26 | }); 27 | } 28 | 29 | 30 | async function getInfo_hostObject() { 31 | try { 32 | 33 | let remObject = await window.chrome.webview.hostObjects.execute; 34 | let result = await remObject.Send('/info', null); 35 | 36 | var jsonData = JSON.parse(result); 37 | $('#sdkVersion').html(jsonData.sdk); 38 | $('#runtimeVersion').html(jsonData.runtime); 39 | 40 | } catch (err) { 41 | console.error(err); 42 | } 43 | } 44 | 45 | function getInfo() { 46 | if (tempData.selectedIpcOption === 'httpclient') { 47 | getInfo_httpClient(); 48 | } else if (tempData.selectedIpcOption === 'postmessage') { 49 | getInfo_postMessage(); 50 | } else { 51 | getInfo_hostObject(); 52 | } 53 | } 54 | 55 | getInfo(); 56 | -------------------------------------------------------------------------------- /winform/EdgeSharp.WinForms.Sample/app/pages/home.js: -------------------------------------------------------------------------------- 1 | function getInfo_postMessage() { 2 | window.external.Execute('/info' ) 3 | .then(function (response) { 4 | var jsonData = JSON.parse(response); 5 | $('#sdkVersion').html(jsonData.sdk); 6 | $('#runtimeVersion').html(jsonData.runtime); 7 | }) 8 | .catch(function (error) { 9 | console.error(error); 10 | }); 11 | } 12 | 13 | function getInfo_httpClient() { 14 | axios.get('http://edgesharp.com/info') 15 | .then(response => { 16 | if (response.status == 200) { 17 | $('#sdkVersion').text(response.data.sdk); 18 | $('#runtimeVersion').text(response.data.runtime); 19 | } 20 | else { 21 | console.log(response); 22 | } 23 | }) 24 | .catch(error => { 25 | console.log(error) 26 | }); 27 | } 28 | 29 | 30 | async function getInfo_hostObject() { 31 | try { 32 | 33 | let remObject = await window.chrome.webview.hostObjects.execute; 34 | let result = await remObject.Send('/info', null); 35 | 36 | var jsonData = JSON.parse(result); 37 | $('#sdkVersion').html(jsonData.sdk); 38 | $('#runtimeVersion').html(jsonData.runtime); 39 | 40 | } catch (err) { 41 | console.error(err); 42 | } 43 | } 44 | 45 | function getInfo() { 46 | if (tempData.selectedIpcOption === 'httpclient') { 47 | getInfo_httpClient(); 48 | } else if (tempData.selectedIpcOption === 'postmessage') { 49 | getInfo_postMessage(); 50 | } else { 51 | getInfo_hostObject(); 52 | } 53 | } 54 | 55 | getInfo(); 56 | -------------------------------------------------------------------------------- /wpf/EdgeSharp.Wpf.RazorPages.Sample/Pages/Movies/Details.cshtml: -------------------------------------------------------------------------------- 1 | @page "{id:int}" 2 | @model EdgeSharp.Wpf.RazorPages.Sample.Pages.Movies.DetailsModel 3 | 4 | @{ 5 | ViewData["Title"] = "Details"; 6 | } 7 | 8 |
9 | 10 |

Details

11 | 12 |
13 |

Movie

14 |
15 |
16 |
17 | @Html.DisplayNameFor(model => model.Movie.Title) 18 |
19 |
20 | @Html.DisplayFor(model => model.Movie.Title) 21 |
22 |
23 | @Html.DisplayNameFor(model => model.Movie.ReleaseDate) 24 |
25 |
26 | @Html.DisplayFor(model => model.Movie.ReleaseDate) 27 |
28 |
29 | @Html.DisplayNameFor(model => model.Movie.Genre) 30 |
31 |
32 | @Html.DisplayFor(model => model.Movie.Genre) 33 |
34 |
35 | @Html.DisplayNameFor(model => model.Movie.Price) 36 |
37 |
38 | @Html.DisplayFor(model => model.Movie.Price) 39 |
40 |
41 |
42 |
43 |

44 | Edit | 45 | Back to List 46 |

47 |
48 |
-------------------------------------------------------------------------------- /angular-react-vue/EdgeSharp.React.Sample/reactapp/dist/main.js.LICENSE.txt: -------------------------------------------------------------------------------- 1 | /* 2 | object-assign 3 | (c) Sindre Sorhus 4 | @license MIT 5 | */ 6 | 7 | /*! 8 | * Bootstrap v5.0.2 (https://getbootstrap.com/) 9 | * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) 10 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) 11 | */ 12 | 13 | /*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.org/license */ 14 | 15 | /** 16 | * Prism: Lightweight, robust, elegant syntax highlighting 17 | * 18 | * @license MIT 19 | * @author Lea Verou 20 | * @namespace 21 | * @public 22 | */ 23 | 24 | /** @license React v0.20.2 25 | * scheduler.production.min.js 26 | * 27 | * Copyright (c) Facebook, Inc. and its affiliates. 28 | * 29 | * This source code is licensed under the MIT license found in the 30 | * LICENSE file in the root directory of this source tree. 31 | */ 32 | 33 | /** @license React v16.13.1 34 | * react-is.production.min.js 35 | * 36 | * Copyright (c) Facebook, Inc. and its affiliates. 37 | * 38 | * This source code is licensed under the MIT license found in the 39 | * LICENSE file in the root directory of this source tree. 40 | */ 41 | 42 | /** @license React v17.0.2 43 | * react-dom.production.min.js 44 | * 45 | * Copyright (c) Facebook, Inc. and its affiliates. 46 | * 47 | * This source code is licensed under the MIT license found in the 48 | * LICENSE file in the root directory of this source tree. 49 | */ 50 | 51 | /** @license React v17.0.2 52 | * react.production.min.js 53 | * 54 | * Copyright (c) Facebook, Inc. and its affiliates. 55 | * 56 | * This source code is licensed under the MIT license found in the 57 | * LICENSE file in the root directory of this source tree. 58 | */ 59 | -------------------------------------------------------------------------------- /angular-react-vue/EdgeSharp.React.Sample/reactapp/src/components/Home.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { useState, useEffect } from 'react'; 3 | import { actionClientGet } from '../services/ActionControllerClientService.js'; 4 | 5 | export default function Home() { 6 | 7 | const [sdkVersion, setSdkVersion] = useState(''); 8 | const [runtimeVersion, setRuntimeVersion] = useState(''); 9 | 10 | const getInfoCallback = (res) => { 11 | setSdkVersion(res.sdk); 12 | setRuntimeVersion(res.runtime); 13 | }; 14 | 15 | const getInfo = () => { 16 | actionClientGet('http://edgesharp.com/info', getInfoCallback); 17 | }; 18 | 19 | useEffect(() => { 20 | getInfo(); 21 | }, []); 22 | 23 | return ( 24 |
25 |
26 |

EdgeSharp

27 |

Build .NET Win32/WinForms/WPF WebView2 HTML5 Desktop Apps

28 | 29 |
30 |
31 |
32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 |
WebView2 SDK Version: {sdkVersion}
WebView2 Runtime Version: {runtimeVersion}
42 |
43 |
44 |
45 |
46 | more info 47 |
48 |
49 |
50 | ); 51 | } -------------------------------------------------------------------------------- /win-32/EdgeSharp.Razor.Sample/Views/Movies/Delete.cshtml: -------------------------------------------------------------------------------- 1 | @model EdgeSharp.Shared.Models.Movie 2 | 3 | @{ 4 | ViewData["Title"] = "Delete"; 5 | } 6 | 7 |
8 | 9 |

Delete

10 | 11 |

Are you sure you want to delete this?

12 |
13 |

Movie

14 |
15 |
16 |
17 | @Html.DisplayNameFor(model => model.Title) 18 |
19 |
20 | @Html.DisplayFor(model => model.Title) 21 |
22 |
23 | @Html.DisplayNameFor(model => model.ReleaseDate) 24 |
25 |
26 | @Html.DisplayFor(model => model.ReleaseDate) 27 |
28 |
29 | @Html.DisplayNameFor(model => model.Genre) 30 |
31 |
32 | @Html.DisplayFor(model => model.Genre) 33 |
34 |
35 | @Html.DisplayNameFor(model => model.Price) 36 |
37 |
38 | @Html.DisplayFor(model => model.Price) 39 |
40 |
41 |
42 | 43 |
44 | 45 |
46 |
47 |

48 | | 49 | Back to List 50 |

51 |
52 |
53 |
54 |
55 | -------------------------------------------------------------------------------- /winform/EdgeSharp.WinForms.Razor.Sample/Views/Movies/Delete.cshtml: -------------------------------------------------------------------------------- 1 | @model EdgeSharp.Shared.Models.Movie 2 | 3 | @{ 4 | ViewData["Title"] = "Delete"; 5 | } 6 | 7 |
8 | 9 |

Delete

10 | 11 |

Are you sure you want to delete this?

12 |
13 |

Movie

14 |
15 |
16 |
17 | @Html.DisplayNameFor(model => model.Title) 18 |
19 |
20 | @Html.DisplayFor(model => model.Title) 21 |
22 |
23 | @Html.DisplayNameFor(model => model.ReleaseDate) 24 |
25 |
26 | @Html.DisplayFor(model => model.ReleaseDate) 27 |
28 |
29 | @Html.DisplayNameFor(model => model.Genre) 30 |
31 |
32 | @Html.DisplayFor(model => model.Genre) 33 |
34 |
35 | @Html.DisplayNameFor(model => model.Price) 36 |
37 |
38 | @Html.DisplayFor(model => model.Price) 39 |
40 |
41 |
42 | 43 |
44 | 45 |
46 |
47 |

48 | | 49 | Back to List 50 |

51 |
52 |
53 |
54 |
-------------------------------------------------------------------------------- /win-32/EdgeSharp.Shared/Models/TmdMovie.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace EdgeSharp.Shared.Models 8 | { 9 | public class TmdMoviesModel 10 | { 11 | public int page { get; set; } 12 | public int total_results { get; set; } 13 | public int total_pages { get; set; } 14 | public List results { get; set; } 15 | } 16 | 17 | public class Result 18 | { 19 | public double popularity { get; set; } 20 | public int vote_count { get; set; } 21 | public bool video { get; set; } 22 | public string poster_path { get; set; } 23 | public int id { get; set; } 24 | public bool adult { get; set; } 25 | public string backdrop_path { get; set; } 26 | public string original_language { get; set; } 27 | public string original_title { get; set; } 28 | public List genre_ids { get; set; } 29 | public string title { get; set; } 30 | public double vote_average { get; set; } 31 | public string overview { get; set; } 32 | private string _releaseDate; 33 | 34 | public string release_date 35 | { 36 | get 37 | { 38 | DateTime dateTime; 39 | if (DateTime.TryParse(_releaseDate, out dateTime)) 40 | { 41 | return string.Format("{0:dddd, MMMM d, yyyy}", dateTime); 42 | } 43 | 44 | return _releaseDate; 45 | } 46 | set 47 | { 48 | _releaseDate = value; 49 | } 50 | } 51 | } 52 | 53 | public class TmdMovie 54 | { 55 | public int id { get; set; } 56 | public string homepage { get; set; } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /winform/EdgeSharp.Shared/Models/TmdMovie.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace EdgeSharp.Shared.Models 8 | { 9 | public class TmdMoviesModel 10 | { 11 | public int page { get; set; } 12 | public int total_results { get; set; } 13 | public int total_pages { get; set; } 14 | public List results { get; set; } 15 | } 16 | 17 | public class Result 18 | { 19 | public double popularity { get; set; } 20 | public int vote_count { get; set; } 21 | public bool video { get; set; } 22 | public string poster_path { get; set; } 23 | public int id { get; set; } 24 | public bool adult { get; set; } 25 | public string backdrop_path { get; set; } 26 | public string original_language { get; set; } 27 | public string original_title { get; set; } 28 | public List genre_ids { get; set; } 29 | public string title { get; set; } 30 | public double vote_average { get; set; } 31 | public string overview { get; set; } 32 | private string _releaseDate; 33 | 34 | public string release_date 35 | { 36 | get 37 | { 38 | DateTime dateTime; 39 | if (DateTime.TryParse(_releaseDate, out dateTime)) 40 | { 41 | return string.Format("{0:dddd, MMMM d, yyyy}", dateTime); 42 | } 43 | 44 | return _releaseDate; 45 | } 46 | set 47 | { 48 | _releaseDate = value; 49 | } 50 | } 51 | } 52 | 53 | public class TmdMovie 54 | { 55 | public int id { get; set; } 56 | public string homepage { get; set; } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /wpf/EdgeSharp.Shared/Models/TmdMovie.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace EdgeSharp.Shared.Models 8 | { 9 | public class TmdMoviesModel 10 | { 11 | public int page { get; set; } 12 | public int total_results { get; set; } 13 | public int total_pages { get; set; } 14 | public List results { get; set; } 15 | } 16 | 17 | public class Result 18 | { 19 | public double popularity { get; set; } 20 | public int vote_count { get; set; } 21 | public bool video { get; set; } 22 | public string poster_path { get; set; } 23 | public int id { get; set; } 24 | public bool adult { get; set; } 25 | public string backdrop_path { get; set; } 26 | public string original_language { get; set; } 27 | public string original_title { get; set; } 28 | public List genre_ids { get; set; } 29 | public string title { get; set; } 30 | public double vote_average { get; set; } 31 | public string overview { get; set; } 32 | private string _releaseDate; 33 | 34 | public string release_date 35 | { 36 | get 37 | { 38 | DateTime dateTime; 39 | if (DateTime.TryParse(_releaseDate, out dateTime)) 40 | { 41 | return string.Format("{0:dddd, MMMM d, yyyy}", dateTime); 42 | } 43 | 44 | return _releaseDate; 45 | } 46 | set 47 | { 48 | _releaseDate = value; 49 | } 50 | } 51 | } 52 | 53 | public class TmdMovie 54 | { 55 | public int id { get; set; } 56 | public string homepage { get; set; } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /angular-react-vue/EdgeSharp.Shared/Models/TmdMovie.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace EdgeSharp.Shared.Models 8 | { 9 | public class TmdMoviesModel 10 | { 11 | public int page { get; set; } 12 | public int total_results { get; set; } 13 | public int total_pages { get; set; } 14 | public List results { get; set; } 15 | } 16 | 17 | public class Result 18 | { 19 | public double popularity { get; set; } 20 | public int vote_count { get; set; } 21 | public bool video { get; set; } 22 | public string poster_path { get; set; } 23 | public int id { get; set; } 24 | public bool adult { get; set; } 25 | public string backdrop_path { get; set; } 26 | public string original_language { get; set; } 27 | public string original_title { get; set; } 28 | public List genre_ids { get; set; } 29 | public string title { get; set; } 30 | public double vote_average { get; set; } 31 | public string overview { get; set; } 32 | private string _releaseDate; 33 | 34 | public string release_date 35 | { 36 | get 37 | { 38 | DateTime dateTime; 39 | if (DateTime.TryParse(_releaseDate, out dateTime)) 40 | { 41 | return string.Format("{0:dddd, MMMM d, yyyy}", dateTime); 42 | } 43 | 44 | return _releaseDate; 45 | } 46 | set 47 | { 48 | _releaseDate = value; 49 | } 50 | } 51 | } 52 | 53 | public class TmdMovie 54 | { 55 | public int id { get; set; } 56 | public string homepage { get; set; } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /wpf/EdgeSharp.Wpf.RazorPages.Sample/Pages/Movies/Delete.cshtml: -------------------------------------------------------------------------------- 1 | @page "{id:int}" 2 | @model EdgeSharp.Wpf.RazorPages.Sample.Pages.Movies.DeleteModel 3 | 4 | @{ 5 | ViewData["Title"] = "Delete"; 6 | } 7 | 8 |
9 | 10 |

Delete

11 | 12 |

Are you sure you want to delete this?

13 |
14 |

Movie

15 |
16 |
17 |
18 | @Html.DisplayNameFor(model => model.Movie.Title) 19 |
20 |
21 | @Html.DisplayFor(model => model.Movie.Title) 22 |
23 |
24 | @Html.DisplayNameFor(model => model.Movie.ReleaseDate) 25 |
26 |
27 | @Html.DisplayFor(model => model.Movie.ReleaseDate) 28 |
29 |
30 | @Html.DisplayNameFor(model => model.Movie.Genre) 31 |
32 |
33 | @Html.DisplayFor(model => model.Movie.Genre) 34 |
35 |
36 | @Html.DisplayNameFor(model => model.Movie.Price) 37 |
38 |
39 | @Html.DisplayFor(model => model.Movie.Price) 40 |
41 |
42 |
43 | 44 |
45 | 46 |
47 |
48 |

49 | | 50 | Back to List 51 |

52 |
53 |
54 |
55 |
> -------------------------------------------------------------------------------- /win-32/EdgeSharp.Razor.Sample/EdgeSharp.Razor.Sample.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | WinExe 5 | net5.0 6 | false 7 | true 8 | edgesharp.ico 9 | 10 | x64 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | PreserveNewest 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | Always 46 | 47 | 48 | PreserveNewest 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /wpf/EdgeSharp.Wpf.RazorPages.Sample/Pages/Movies/Edit.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using System.Threading.Tasks; 3 | using EdgeSharp.Shared.Data; 4 | using EdgeSharp.Shared.Models; 5 | using Microsoft.AspNetCore.Mvc; 6 | using Microsoft.AspNetCore.Mvc.RazorPages; 7 | using Microsoft.EntityFrameworkCore; 8 | 9 | namespace EdgeSharp.Wpf.RazorPages.Sample.Pages.Movies 10 | { 11 | public class EditModel : PageModel 12 | { 13 | private readonly MovieContext _context; 14 | 15 | public EditModel(MovieContext context) 16 | { 17 | _context = context; 18 | } 19 | 20 | [BindProperty] 21 | public Movie Movie { get; set; } 22 | 23 | public async Task OnGetAsync(int? id) 24 | { 25 | if (id == null) 26 | { 27 | return NotFound(); 28 | } 29 | 30 | Movie = await _context.Movie.FirstOrDefaultAsync(m => m.Id == id); 31 | 32 | if (Movie == null) 33 | { 34 | return NotFound(); 35 | } 36 | return Page(); 37 | } 38 | 39 | #region snippet 40 | public async Task OnPostAsync() 41 | { 42 | if (!ModelState.IsValid) 43 | { 44 | return Page(); 45 | } 46 | 47 | _context.Attach(Movie).State = EntityState.Modified; 48 | 49 | try 50 | { 51 | await _context.SaveChangesAsync(); 52 | } 53 | catch (DbUpdateConcurrencyException) 54 | { 55 | if (!MovieExists(Movie.Id)) 56 | { 57 | return NotFound(); 58 | } 59 | else 60 | { 61 | throw; 62 | } 63 | } 64 | 65 | return RedirectToPage("./Index"); 66 | } 67 | 68 | private bool MovieExists(int id) 69 | { 70 | return _context.Movie.Any(e => e.Id == id); 71 | } 72 | #endregion 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /wpf/EdgeSharp.Wpf.RazorPages.Sample/EdgeSharp.Wpf.RazorPages.Sample.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | WinExe 5 | net5.0-windows 6 | true 7 | false 8 | true 9 | edgesharp.ico 10 | x64 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | PreserveNewest 40 | 41 | 42 | 43 | 44 | 45 | Always 46 | 47 | 48 | PreserveNewest 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /win-32/EdgeSharp.Sample/app/pages/movieedit.js: -------------------------------------------------------------------------------- 1 | async function loadMovie() { 2 | try { 3 | var query = ''; 4 | if (tempData.urlQueryPart !== null) { 5 | query = tempData.urlQueryPart; 6 | tempData.urlQueryPart = null; 7 | } 8 | 9 | let remObject = await window.chrome.webview.hostObjects.execute; 10 | let result = await remObject.Send('/movieedit/get' + query, null); 11 | 12 | if (result !== null) { 13 | var jsonData = JSON.parse(result); 14 | document.getElementById("editId").value = jsonData.Id; 15 | document.getElementById("editTitle").value = jsonData.Title; 16 | document.getElementById("editRating").value = jsonData.Rating; 17 | document.getElementById("editReleaseDate").valueAsDate = new Date(jsonData.ReleaseDate); 18 | document.getElementById("editGenre").value = jsonData.Genre; 19 | document.getElementById("editPrice").value = jsonData.Price; 20 | } 21 | 22 | } catch (err) { 23 | console.error(error); 24 | } 25 | } 26 | 27 | async function saveMovie() { 28 | try { 29 | 30 | var idstr = document.getElementById("editId").value; 31 | var id = parseInt(idstr); 32 | 33 | var movie = {}; 34 | movie.Id = id; 35 | movie.Title = document.getElementById("editTitle").value; 36 | movie.Rating = document.getElementById("editRating").value; 37 | movie.ReleaseDate = document.getElementById("editReleaseDate").valueAsDate; 38 | movie.Genre = document.getElementById("editGenre").value; 39 | var priceStr = document.getElementById("editPrice").value; 40 | movie.Price = parseFloat(priceStr); 41 | 42 | var request = {}; 43 | request.id = id; 44 | request.movie = movie; 45 | 46 | let remObject = await window.chrome.webview.hostObjects.execute; 47 | let result = await remObject.Send('/movieedit/post', JSON.stringify(request)); 48 | 49 | if (result === true || result === 'true') { 50 | navigateTo('/movies'); 51 | } 52 | 53 | } catch (err) { 54 | console.error(error); 55 | } 56 | } 57 | 58 | loadMovie(); 59 | -------------------------------------------------------------------------------- /wpf/EdgeSharp.Wpf.Sample/app/pages/movieedit.js: -------------------------------------------------------------------------------- 1 | async function loadMovie() { 2 | try { 3 | var query = ''; 4 | if (tempData.urlQueryPart !== null) { 5 | query = tempData.urlQueryPart; 6 | tempData.urlQueryPart = null; 7 | } 8 | 9 | let remObject = await window.chrome.webview.hostObjects.execute; 10 | let result = await remObject.Send('/movieedit/get' + query, null); 11 | 12 | if (result !== null) { 13 | var jsonData = JSON.parse(result); 14 | document.getElementById("editId").value = jsonData.Id; 15 | document.getElementById("editTitle").value = jsonData.Title; 16 | document.getElementById("editRating").value = jsonData.Rating; 17 | document.getElementById("editReleaseDate").valueAsDate = new Date(jsonData.ReleaseDate); 18 | document.getElementById("editGenre").value = jsonData.Genre; 19 | document.getElementById("editPrice").value = jsonData.Price; 20 | } 21 | 22 | } catch (err) { 23 | console.error(error); 24 | } 25 | } 26 | 27 | async function saveMovie() { 28 | try { 29 | 30 | var idstr = document.getElementById("editId").value; 31 | var id = parseInt(idstr); 32 | 33 | var movie = {}; 34 | movie.Id = id; 35 | movie.Title = document.getElementById("editTitle").value; 36 | movie.Rating = document.getElementById("editRating").value; 37 | movie.ReleaseDate = document.getElementById("editReleaseDate").valueAsDate; 38 | movie.Genre = document.getElementById("editGenre").value; 39 | var priceStr = document.getElementById("editPrice").value; 40 | movie.Price = parseFloat(priceStr); 41 | 42 | var request = {}; 43 | request.id = id; 44 | request.movie = movie; 45 | 46 | let remObject = await window.chrome.webview.hostObjects.execute; 47 | let result = await remObject.Send('/movieedit/post', JSON.stringify(request)); 48 | 49 | if (result === true || result === 'true') { 50 | navigateTo('/movies'); 51 | } 52 | 53 | } catch (err) { 54 | console.error(error); 55 | } 56 | } 57 | 58 | loadMovie(); 59 | -------------------------------------------------------------------------------- /winform/EdgeSharp.WinForms.Sample/app/pages/movieedit.js: -------------------------------------------------------------------------------- 1 | async function loadMovie() { 2 | try { 3 | var query = ''; 4 | if (tempData.urlQueryPart !== null) { 5 | query = tempData.urlQueryPart; 6 | tempData.urlQueryPart = null; 7 | } 8 | 9 | let remObject = await window.chrome.webview.hostObjects.execute; 10 | let result = await remObject.Send('/movieedit/get' + query, null); 11 | 12 | if (result !== null) { 13 | var jsonData = JSON.parse(result); 14 | document.getElementById("editId").value = jsonData.Id; 15 | document.getElementById("editTitle").value = jsonData.Title; 16 | document.getElementById("editRating").value = jsonData.Rating; 17 | document.getElementById("editReleaseDate").valueAsDate = new Date(jsonData.ReleaseDate); 18 | document.getElementById("editGenre").value = jsonData.Genre; 19 | document.getElementById("editPrice").value = jsonData.Price; 20 | } 21 | 22 | } catch (err) { 23 | console.error(error); 24 | } 25 | } 26 | 27 | async function saveMovie() { 28 | try { 29 | 30 | var idstr = document.getElementById("editId").value; 31 | var id = parseInt(idstr); 32 | 33 | var movie = {}; 34 | movie.Id = id; 35 | movie.Title = document.getElementById("editTitle").value; 36 | movie.Rating = document.getElementById("editRating").value; 37 | movie.ReleaseDate = document.getElementById("editReleaseDate").valueAsDate; 38 | movie.Genre = document.getElementById("editGenre").value; 39 | var priceStr = document.getElementById("editPrice").value; 40 | movie.Price = parseFloat(priceStr); 41 | 42 | var request = {}; 43 | request.id = id; 44 | request.movie = movie; 45 | 46 | let remObject = await window.chrome.webview.hostObjects.execute; 47 | let result = await remObject.Send('/movieedit/post', JSON.stringify(request)); 48 | 49 | if (result === true || result === 'true') { 50 | navigateTo('/movies'); 51 | } 52 | 53 | } catch (err) { 54 | console.error(error); 55 | } 56 | } 57 | 58 | loadMovie(); 59 | -------------------------------------------------------------------------------- /winform/EdgeSharp.WinForms.Razor.Sample/EdgeSharp.WinForms.Razor.Sample.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | WinExe 5 | net5.0-windows 6 | true 7 | false 8 | true 9 | edgesharp.ico 10 | x64 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | PreserveNewest 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | Always 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | PreserveNewest 57 | 58 | 59 | 60 | 61 | --------------------------------------------------------------------------------