static void RunDesktop(string[] args)
        {
            // Run Windows Form
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            var queueManagerForm = new SampleQueueMessageManagerForm();

            int parmCount = args.Length;

            if (parmCount > 0)
            {
                queueManagerForm.MessageType = args[0];
            }
            if (parmCount > 1)
            {
                int threadCount = 1;
                if (int.TryParse(args[1], out threadCount))
                {
                    queueManagerForm.ThreadCount = threadCount;
                }
            }

            Application.Run(queueManagerForm);
        }
        static void RunDesktop(string[] args)
        {
            // Run Windows Form
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            var queueManagerForm = new SampleQueueMessageManagerForm();

            int parmCount = args.Length;
            if (parmCount > 0)
                queueManagerForm.MessageType = args[0];
            if (parmCount > 1)
            {
                int threadCount = 1;
                if (int.TryParse(args[1], out threadCount))
                    queueManagerForm.ThreadCount = threadCount;
            }

            Application.Run(queueManagerForm);
        }