コード例 #1
0
        static void Main(string[] args)
        {
            Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
            Application.ThreadException += ApplicationOnThreadException;
            AppDomain.CurrentDomain.UnhandledException += CurrentDomainUnhandledException;
            if (!MWCapture.Init())
            {
                MessageBox.Show($"Error starting plugin: MagewellVideowall");
                return;
            }
            var inputId    = int.Parse(args[0]);
            var closeAfter = int.Parse(args[1]);

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);


            magewellForm = new MagewellForm(inputId);

            ThreadPool.QueueUserWorkItem(state =>
            {
                Thread.Sleep(TimeSpan.FromSeconds(closeAfter));
                magewellForm.Close();
            });

            Application.Run(magewellForm);
        }
コード例 #2
0
        static void Main(string[] args)
        {
            Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
            Application.ThreadException += ApplicationOnThreadException;
            AppDomain.CurrentDomain.UnhandledException += CurrentDomainUnhandledException;
            try
            {
                if (!MWCapture.Init())
                {
                    Console.WriteLine($"Error starting plugin: MagewellVideowall");
                    return;
                }
                // every 5 sec updates list of files in inputs folders
                inputsUpdater = new MagewellInputsUpdater("Magewell", "vmfu");
                inputsUpdater.Init();

                ThreadPool.QueueUserWorkItem(state => RunManager());
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
            }

            Console.ReadLine();
        }