MyGit

v5.0.0

chromelyapps/Chromely

版本发布时间: 2020-02-23 21:59:27

chromelyapps/Chromely最新发布版本:v5.1(2020-10-26 19:05:59)

Chromely v5: A true cross-platform solution.

Chromely has been migrated to .NET Core 3 and now natively supports Windows, Linux and MacOS.

Please see our new and improved Wiki for additional information about Chromely.

Overview

Projects Structure

All projects are now .NET Standard 2.0

New Features

Fixes

Deprecation & Discontinued

Quick migration Guide

This guide provides an introduction to Chromely 5 and a set of guidelines to migrate from v4.x to v5.x.

Important upgrade information

Please see our new and improved Wiki and Demo Projects for additional information on how to create a new project.

Setting up a Chromely application

Chromely v4 (before)

class Program
{
   static int Main(string[] args)
   {
      var startUrl = "https://google.com";

      var config = ChromelyConfiguration
                      .Create()
                      .WithHostMode(WindowState.Normal, true)
                      .WithHostTitle("chromely")
                      .WithHostIconFile("chromely.ico")
                      .WitAppArgs(args)
                      .WithHostSize(1000, 600)
                      .WithStartUrl(startUrl);

      using (var window = ChromelyWindow.Create(config))
      {
         return window.Run(args);
      }
  }
}

Chromely v5 (now)

class Program
{
   static int Main(string[] args)
   {
            AppBuilder
                .Create()
                .UseApp<DemoChromelyApp>()
                .Build()
                .Run(args);
  }
}

Configuring a Chromely application

By default Chromely comes with its own default configuration. There are a few ways how you can configure Chromely. The example below overwrites the Default Configuration, this is the easiest way to configure Chromely.

Please see the wiki article about Configuration for other solutions on how to configure Chromely.

using Chromely.Core;
using Chromely.Core.Configuration;

namespace My_Chromely_App
{
    class Program
    {
        static void Main(string[] args)
        {
            // create a configuration with OS-specific defaults
            var config = DefaultConfiguration.CreateForRuntimePlatform();

            // your configuration
            config.StartUrl = "https://chromely.net/";
            config.WindowOptions.Title = "My Awesome Chromely App!";
            //..

            // application builder
            AppBuilder
            .Create()
            .UseApp<DemoChromelyApp>()
            .UseConfiguration<IChromelyConfiguration>(config)
            .Build()
            .Run(args);
        }
    }
}

As you can see from the example above, some settings have been regrouped. This makes it easier to find specific settings. E.g. WindowsSettings or CefDownloadOptions.

相关地址:原始地址 下载(tar) 下载(zip)

查看:2020-02-23发行的版本