Пример #1
0
        public static void StartUp()
        {
            if (plugMgr.Plugins.Count == 0)
            {
                throw new Exception("No Plugins loaded.");
            }

            var        appConfig     = ConfigurationManager.OpenExeConfiguration(Assembly.GetExecutingAssembly().Location);
            string     startupPlugin = appConfig.AppSettings.Settings["StartupPlugin"].Value;//ConfigurationManager.AppSettings["StartupPlugin"];
            PluginInfo pi            = plugMgr[startupPlugin];

            if (pi == null)
            {
                throw new Exception(string.Format("Not find startup Plugin:{0}", startupPlugin));
            }
            pi.Instance.Start();
            Raven.ExcepectingMessage(GolbalMessages.MainAppExit, OnMainAppExit);

            //WindowHide(Console.Title);

            Application.Run();
        }