/// <summary>
        /// <para>Initializes a new instance of the <see cref="WinFormsSampleApplicationContext"/> class.</para>
        /// <para><see cref="EntApiClient.Initialize"/> is called here for initializing <see cref="EntApiClient"/>.
        /// This method must be called once before using <see cref="EntApiClient"/> in the application.</para>
        /// </summary>
        /// <param name="resolverArgs">Arguments for customizing how CefSharp / cef resources are searched,
        /// or <c>null</c> for default behavior.</param>
        internal WinFormsSampleApplicationContext(CefSharpResolverArgs resolverArgs)
        {
            Application.ApplicationExit += Application_ApplicationExit;

            // Application-wide static initialization of EntClient
            WinForms.EntClient.Initialize(resolverArgs);

            mainForm             = new MainForm();
            mainForm.FormClosed += MainForm_FormClosed;
            mainForm.Show();
        }
Пример #2
0
 /// <summary>
 /// <para>Executes initialization necessary for using <see cref="EntClient"/> in an application.
 /// This method (any overload of this method) must be called once during application lifecycle,
 /// before using <see cref="EntClient"/> for the first time.</para>
 /// <para><see cref="EntClient"/> uses <see cref="https://github.com/cefsharp/CefSharp"/> for displaying
 /// an embedded browser window for operations that require displaying server-side user interface,
 /// especially a sign-on window. <see cref="EntClient"/> supports using <c>AnyCPU</c> as target architecture,
 /// and with <c>CefSharp</c> this means that loading unmanaged CefSharp resources is required. This
 /// method assumes that the required CefSharp dependencies can be found under <c>x84</c> or <c>x64</c>
 /// subdirectories.</para>
 /// </summary>
 /// <param name="cefSettings">CefSharp initialization parameters. In many cases it is sufficient to
 /// pass an empty instance. Must not be <c>null</c>.</param>
 /// <param name="resolverArgs">Arguments for customizing how CefSharp / cef resources are searched,
 /// or <c>null</c> for default behavior.</param>
 public static void Initialize(CefSettings cefSettings, CefSharpResolverArgs resolverArgs = null)
 {
     BaseDesktopClient <EntClient> .Initialize(cefSettings, resolverArgs);
 }
Пример #3
0
        /// <summary>
        /// <para>Executes initialization necessary for using <see cref="EntClient"/> in an application.
        /// This method (any overload of this method) must be called once during application lifecycle,
        /// before using <see cref="EntClient"/> for the first time. This overload executes initialization
        /// with a default <see cref="CefSettings"/> object.</para>
        /// <para><see cref="EntClient"/> uses <see cref="https://github.com/cefsharp/CefSharp"/> for displaying
        /// an embedded browser window for operations that require displaying server-side user interface,
        /// especially a sign-on window. <see cref="EntClient"/> supports using <c>AnyCPU</c> as target architecture,
        /// and with <c>CefSharp</c> this means that loading unmanaged CefSharp resources is required. This
        /// method assumes that the required CefSharp dependencies can be found under <c>x84</c> or <c>x64</c>
        /// subdirectories.</para>
        /// </summary>
        /// <param name="resolverArgs">Arguments for customizing how CefSharp / cef resources are searched,
        /// or <c>null</c> for default behavior.</param>
        public static void Initialize(CefSharpResolverArgs resolverArgs = null)
        {
            var cefSettings = BuildDefaultCefSettings();

            Initialize(cefSettings, resolverArgs);
        }
 /// <summary>
 /// <para>Executes initialization necessary for using <see cref="BaseDesktopClient{C}"/> in an application.
 /// This method (any overload of this method) must be called once during application lifecycle,
 /// before using <see cref="EntClient"/> for the first time.</para>
 /// <para><see cref="EntClient"/> uses <see cref="https://github.com/cefsharp/CefSharp"/> for displaying
 /// an embedded browser window for operations that require displaying server-side user interface,
 /// especially a sign-on window. <see cref="EntClient"/> supports using <c>AnyCPU</c> as target architecture,
 /// and with <c>CefSharp</c> this means that loading unmanaged CefSharp resources is required. This
 /// method assumes that the required CefSharp dependencies can be found under <c>x84</c> or <c>x64</c>
 /// subdirectories.</para>
 /// </summary>
 /// <param name="cefSettings">CefSharp initialization parameters. In many cases it is sufficient to
 /// pass an empty instance of a derived class suitable for the use case. Must not be <c>null</c>.</param>
 /// <param name="resolverArgs">Arguments for customizing how CefSharp / cef resources are searched,
 /// or <c>null</c> for default behavior.</param>
 public static void Initialize(CefSettingsBase cefSettings, CefSharpResolverArgs resolverArgs = null)
 {
     CefSharpUtil.InitializeCefSharp(cefSettings, resolverArgs);
     cefSharpInitialized = true;
 }