Exemplo n.º 1
0
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        public static int Main(string[] args)
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            ErrorReportForm.SetupMonitoring(new Uri("https://0install.de/error-report/"));
            NetUtils.ApplyProxy();

            if (WindowsUtils.IsWindows)
            {
                if (WindowsUtils.AttachConsole())
                {
                    return((int)RunCliWindows(args));
                }
                else
                {
                    return((int)RunGui(args));
                }
            }
            else if (UnixUtils.HasGui)
            {
                return((int)RunGui(args));
            }
            else
            {
                return((int)RunCli(args));
            }
        }
Exemplo n.º 2
0
        public static int Main(string[] args)
        {
            ProgramUtils.Init();

            if (WindowsUtils.IsWindows)
            {
                if (WindowsUtils.AttachConsole())
                {
                    return((int)RunCliRedirect(args));
                }
                else
                {
                    return((int)RunGui(args));
                }
            }
            else
            {
                return((int)RunCli(args));
            }
        }