コード例 #1
0
        static void Main(String[] args)
        {
            string errmsg = "";

            constants.init(args);



            if (constants.CheckMonoVersion(out errmsg))
            {
                int res = YAPI.FILE_NOT_FOUND;

                res = YAPI.InitAPI(0, ref errmsg);
                YAPI.RegisterLogFunction(LogManager.APIlog);

                if (res == YAPI.SUCCESS)
                {
                    YAPI.SetDeviceListValidity(3600);
                    Application.EnableVisualStyles();
                    Application.SetCompatibleTextRenderingDefault(false);
                    if (Debugger.IsAttached)
                    {
                        Application.Run(new StartForm(true));
                    }
                    else
                    {
                        try  { Application.Run(new StartForm(false)); }
                        catch (OutOfMemoryException)
                        {
                            string msg = ("Yocto-Visualization ran out of memory");
                            Console.Write(msg, "Oops", MessageBoxButtons.OK,
                                          MessageBoxIcon.Exclamation);
                            MessageBox.Show(msg);
                        }
                    }