GithubHelp home page GithubHelp logo

ljl02521 / nanui Goto Github PK

View Code? Open in Web Editor NEW

This project forked from xuanchenlin/nanui

0.0 0.0 0.0 73.22 MB

NanUI is an open source .NET project for .NET developers who want to create desktop applications with HTML, CSS and JavaScript.

Home Page: https://github.com/Xuanchenlin/NanUI

License: MIT License

JavaScript 0.35% C# 99.62% HTML 0.03%

nanui's Introduction

The WinFormium Project
(A.K.A. NanUI)

Easily build powerful WinForm applications with HTML, CSS and JavaScript.

WinFormium

点击[此处]切换到简体中文仓库首页。

GitHub Nuget Nuget

NanUI has always been in the testing stage. After 9 years, it is time to release the official v1.0 version of NanUI! When version 1.0 is released, the new name of the project will be officially launched - WinFormium

📢 致谢

感谢各位朋友近期对 NanUI 项目的关注,能引起共鸣和关注我感到非常荣幸。但是恳请大家别再打钱,这样我压力好大,各位的好意林某已心领了。

在此也祝福那些和我一样人到中年还对编程依然饱有热情的朋友们,生活纵然不易,希望任怀初心!

⭐ About

WinFormium is a open source framework on .NET platform for creating user interface of WinForm Applicaitons using HTML5, CSS3, and JavaScript. It is based on the Xilium.CefGlue project, which is a .NET wrapper around the Chromium Embedded Framework.

If you are looking for a framework for creating a WinForm application with a modern user interface, WinFormium is a good choice. you can use HTML, CSS, and JavaScript to create a user interface, and use C# to write the business logic of the application.

Please give WinFormium project a star⭐ if you like it.

If this project helps, please consider funding it.

Donate

🖥️ Requirements

For Development

  • .NET Framework 4.6.2 or higher / .NET 6.0 or higher
  • Visual Studio 2019 or higher (VS2022 is recommended)

For Deployment

  • Microsoft Windows 7 Service Pack 1 or higher
  • .Net Framework 4.6.2 or higher
  • .NET 6.0 for Windows 7 and higher.
  • .NET 7.0/8.0 for Windows 10 and higher.

This is a Windows Only framework, it can not run on Linux or Mac OS.

The minimum supported Windows is Windows 7 Service Pack 1, and some features (such as DirectComposition Offscreen Rendering) are not supported on Windows 7.

🧰 Getting Started

Create a simple WinFormium Application by following the steps below:

1. Create a WinForm Application by default template.

2. Install WinFormium NuGet Package

Open the NuGet Package Manager to install or use NuGet Package Manager Console, and run the following command to install WinFormium nuget package:

PM> Install-Package NetDimension.NanUI

Install the dependencies of Chromium Embedded Framework that WinFormium depends on:

PM> Install-Package NetDimension.NanUI.Runtime

3. A basic WinFormium application requires the following code:

Modify the code in the Program.cs file as follows:

using WinFormium;

class Program
{
    [STAThread]
    static void Main(string[] args)
    {
        var builder = WinFormiumApp.CreateBuilder();

        builder.UseWinFormiumApp<MyApp>();

        var app = builder.Build();

        app.Run();
    }
}

Create a class implements WinFormiumStartup for configuring the application:

using WinFormium;

class MyAPP : WinFormiumStartup
{
    protected override MainWindowCreationAction? UseMainWindow(MainWindowOptions opts)
    {
        // Configure the main window of this application
        return opts.UseMainFormium<MyWindow>();
    }

    protected override void WinFormiumMain(string[] args)
    {
        // The codes in Main function should be here, this function only runs in Main process. So it can prevent the codes in Main process running in sub-processes.
        ApplicationConfiguration.Initialize();
    }

    protected override void ConfigurationChromiumEmbedded(ChromiumEnvironmentBuiler cef)
    {
        // Configure the Chromium Embedded Framework here
    }

    protected override void ConfigureServices(IServiceCollection services)
    {
        // Configure the services of this application here
    }
}

Create a class implements Formium for configuring the main window of the application:

using WinFormium;
using WinFormium.Forms;

class MyWindow : Formium
{
    public MyWindow()
    {
        Url = "https://www.google.com";
    }

    protected override FormStyle ConfigureWindowStyle(WindowStyleBuilder builder)
    {
        // Configure the style of the window here or leave it blank to use the default style

        var style = builder.UseSystemForm();

        style.TitleBar = false;

        style.DefaultAppTitle = "My first WinFomrim app";

        return style;
    }
}

4. Build and run your WinFormium application

📖 Documentation

For more info please see - Documentation or Wiki

🤖 Demos

🔗 Third-Party References & Tools

🏆 Inspirations

I was inspired by the following songs and albums when creating this version of WinFormium.

  • Strandels - Chance Of Rain
  • One Direction - What a Feeling (Made In The A.M.)
  • Thomas Rhett - VHS (Center Point Road)
  • Sammy Kershaw - She Don't Know She's Beautiful (Haunted Heart)
  • Chrissy Steele - Two Bodies (Magnet To Steele)
  • Halestorm - I Like It Heavy (Into the Wild Life)
  • Joan Jett & The Blackhearts - I Hate Myself for Loving You (Up Your Alley)

nanui's People

Contributors

xuanchenlin avatar dependabot[bot] avatar aleks-ivanov avatar bronts avatar eltociear avatar kulov avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.