public void Configure(IChromelyConfiguration config) { try { if (config == null) { return; } if (startUrl != null) { config.StartUrl = startUrl.GetStartUrl(); } config.WindowState = GetWindowState(windowState); config.LoadCefBinariesIfNotFound = loadCefBinariesIfNotFound; config.SilentCefBinariesLoading = silentCefBinariesLoading; config.WindowLeft = windowLeft; config.WindowTop = windowTop; config.WindowWidth = windowWidth; config.WindowHeight = windowHeight; config.WindowNoResize = windowNoResize; config.WindowNoMinMaxBoxes = windowNoMinMaxBoxes; config.WindowFrameless = windowFrameless; config.WindowCenterScreen = windowCenterScreen; config.WindowKioskMode = windowKioskMode; config.WindowTitle = windowTitle; config.WindowIconFile = windowIconFile; if (windowCustomCreation != null) { config.WindowCustomStyle = windowCustomCreation.style; config.UseWindowCustomStyle = windowCustomCreation.useCustomtyle; } config.AppExeLocation = AppDomain.CurrentDomain.BaseDirectory; config.DebuggingMode = debuggingMode; config.ControllerAssemblies = GetAssemblyInfos(controllerAssemblies); config.CommandLineOptions = commandLineOptions; config.ExtensionData = ExtensionData; if (urlSchemes != null) { config.UrlSchemes = UrlSchemeLocal.GetHandleCollections(urlSchemes); } if (commandLineArgs != null) { config.CommandLineArgs = new List <Tuple <string, string> >(); foreach (var item in commandLineArgs) { config.CommandLineArgs.Add(new Tuple <string, string>(item.name, item.value)); } } if (customSettings != null) { config.CustomSettings = CustomSettingLocal.GetSettings(customSettings); } } catch (Exception exception) { Logger.Instance.Log.Error(exception); } }
public void Configure(IChromelyConfiguration config) { try { if (config == null) { return; } config.AppName = appName; if (startUrl != null) { config.StartUrl = startUrl.GetStartUrl(); } config.CefDownloadOptions = new CefDownloadOptions(loadCefBinariesIfNotFound, silentCefBinariesLoading); config.WindowOptions.WindowState = GetWindowState(windowState); config.WindowOptions.Position = new WindowPosition(windowLeft, windowTop); config.WindowOptions.Size = new WindowSize(windowWidth, windowHeight); config.WindowOptions.DisableResizing = windowNoResize; config.WindowOptions.DisableMinMaximizeControls = windowNoMinMaxBoxes; config.WindowOptions.WindowFrameless = windowFrameless; config.WindowOptions.StartCentered = windowCenterScreen; config.WindowOptions.KioskMode = windowKioskMode; config.WindowOptions.Title = windowTitle; config.WindowOptions.RelativePathToIconFile = windowIconFile; if (windowCustomCreation != null) { config.WindowOptions.CustomStyle = new WindowCustomStyle(windowCustomCreation.windowStyles, windowCustomCreation.windowExStyles); config.WindowOptions.UseCustomStyle = windowCustomCreation.useCustomtyle; } config.AppExeLocation = AppDomain.CurrentDomain.BaseDirectory; config.DebuggingMode = debuggingMode; config.ControllerAssemblies = GetAssemblyInfos(controllerAssemblies); config.CommandLineOptions = commandLineOptions; config.ExtensionData = ExtensionData; if (urlSchemes != null) { config.UrlSchemes = UrlSchemeLocal.GetHandleCollections(urlSchemes); } if (commandLineArgs != null) { config.CommandLineArgs = new Dictionary <string, string>(); foreach (var item in commandLineArgs) { config.CommandLineArgs.Add(item.name, item.value); } } if (customSettings != null) { config.CustomSettings = CustomSettingLocal.GetSettings(customSettings); } } catch (Exception exception) { Logger.Instance.Log.Error(exception); } }