Exemple #1
0
        public void Configure(DesktopApplicationBuilder app)
        {
            app.AddComponent <App>("app");

            var userconfig = app.Services.GetService <UserConfiguration>();

            userconfig.Load();
            if (userconfig.StartNginxOnBoot)
            {
                NginxService.Start();
            }

            var nconfigGenerator = app.Services.GetService <NConfigGenerator>();

            nconfigGenerator.ModifyPatched += (s, e) =>
            {
                NginxService.Reload();
            };
            var mapsservice = app.Services.GetService <MapsService>();

            mapsservice.Updated += (s, e) =>
            {
                nconfigGenerator.Apply(mapsservice
                                       .GetList()
                                       .Where(o => o.Enabled)
                                       .ToArray());
            };

            mapsservice.Load();
        }
Exemple #2
0
        public void Configure(DesktopApplicationBuilder app, WebWindows.WebWindow window)
        {
            var executingDir = Path.GetDirectoryName(System.Reflection.Assembly.GetEntryAssembly().Location);

            window.SetIconFile(Path.Combine(executingDir, "wwwroot/favicon.ico"));

            app.AddComponent <App>("app");
        }
Exemple #3
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(DesktopApplicationBuilder app)
        {
            app.AddComponent <App>("app");

            WebWindow webWindow = app.Services.GetService <WebWindow>();

            webWindow.Width  = 750;
            webWindow.Height = 760;
        }
Exemple #4
0
        public static DesktopApplicationBuilder ConfigureLogging(this DesktopApplicationBuilder builder)
        {
            // builder.Logging.AddConfiguration(builder.Configuration.GetSection("Logging"));
            // builder.Logging.Configure(options =>
            //     options.ActivityTrackingOptions = ActivityTrackingOptions.ParentId
            //                                     | ActivityTrackingOptions.SpanId
            //                                     | ActivityTrackingOptions.TraceId);

            return(builder);
        }
Exemple #5
0
 public void Configure(DesktopApplicationBuilder app)
 {
     app.AddComponent <App>("app");
 }
Exemple #6
0
 public void Configure(DesktopApplicationBuilder app)
 {
     app.AddComponent <DashboardView>("app");
 }
 public void Configure(DesktopApplicationBuilder app)
 {
     app.AddComponent <MessengerView>("app");
 }
Exemple #8
0
 // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
 public void Configure(DesktopApplicationBuilder app)
 => ConfigureWebWindow <Web.BlazorClient.App>(app, "app");
Exemple #9
0
 public static DesktopApplicationBuilder ConfigureOptions(this DesktopApplicationBuilder builder)
 {
     //Console.WriteLine(builder.Configuration.Build().GetDebugView());
     return(builder);
 }
Exemple #10
0
 public void Configure(DesktopApplicationBuilder app)
 {
     Console.WriteLine("Adding app component");
     app.AddComponent <App>("app");
 }
Exemple #11
0
 // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
 public void Configure(DesktopApplicationBuilder app)
 => ConfigureWebWindow <App>(app, "app");