• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

KSP-CKAN / CKAN / 15432034930

04 Jun 2025 02:19AM UTC coverage: 30.322% (+0.04%) from 30.28%
15432034930

Pull #4386

github

web-flow
Merge f8b59bcd0 into 4cf303cc8
Pull Request #4386: Mod list multi-select

4063 of 14340 branches covered (28.33%)

Branch coverage included in aggregate %.

55 of 170 new or added lines in 12 files covered. (32.35%)

59 existing lines in 5 files now uncovered.

13712 of 44281 relevant lines covered (30.97%)

0.63 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/GUI/Program.cs
1
using System;
2
using System.Linq;
3
using System.Windows.Forms;
4
#if NET5_0_OR_GREATER
5
using System.Runtime.Versioning;
6
#endif
7

8
namespace CKAN.GUI
9
{
10
    #if NET5_0_OR_GREATER
11
    [SupportedOSPlatform("windows")]
12
    #endif
13
    public static class GUI
14
    {
15
        /// <summary>
16
        /// The main entry point for the application.
17
        /// </summary>
18
        [STAThread]
19
        public static void Main(string[] args)
20
        {
×
21
            Main_(args, null);
×
22
        }
×
23

24
        public static void Main_(string[]             args,
25
                                 string?              userAgent,
26
                                 GameInstanceManager? manager = null,
27
                                 bool                 showConsole = false)
28
        {
×
29
            Logging.Initialize();
×
30

31
            AppDomain.CurrentDomain.UnhandledException += UnhandledExceptionEventHandler;
×
32
            Application.EnableVisualStyles();
×
33
            Application.SetCompatibleTextRenderingDefault(false);
×
34

35
            if (args.Contains(URLHandlers.UrlRegistrationArgument))
×
36
            {
×
37
                //Passing in null will cause a NullReferenceException if it tries to show the dialog
38
                //asking for elevation permission, but we want that to happen. Doing that keeps us
39
                //from getting in to a infinite loop of trying to register.
NEW
40
                URLHandlers.RegisterURLHandler(null, null, null);
×
41
            }
×
42
            else
43
            {
×
44
                var main = new Main(args, manager, userAgent);
×
45
                if (!showConsole)
×
46
                {
×
47
                    Util.HideConsoleWindow();
×
48
                }
×
49
                Application.Run(main);
×
50
            }
×
51
        }
×
52

53
        public static void UnhandledExceptionEventHandler(object sender, UnhandledExceptionEventArgs e)
54
        {
×
55
            if (e.ExceptionObject is Exception exception)
×
56
            {
×
57
                // Provide a stack backtrace, so our users and non-debugging devs can
58
                // see what's gone wrong.
59
                CKAN.GUI.Main.Instance?.ErrorDialog("Unhandled exception:\r\n{0} ",
×
60
                                                    exception.ToString());
61
            }
×
62
        }
×
63
    }
64
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc