상속: System.Windows.Forms.Form
예제 #1
0
 static void Main()
 {
     try
     {
         log.Info("Running....");
         Application.EnableVisualStyles();
         Application.SetCompatibleTextRenderingDefault(false);
         using (IApplicationContext ctx = ContextRegistry.GetContext())
         {
             StockForm stockForm = new StockForm();
             Application.ThreadException += ThreadException;
             Application.Run(stockForm);
         }
     }
     catch (Exception e)
     {
         log.Error("Spring.RabbitQuickStart.Client is broken.", e);
     }
 }
예제 #2
0
        static void Main()
        {
            try
            {
                log.Info("Running....");
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
                using (IApplicationContext ctx = ContextRegistry.GetContext())
                {
                    //Autostart should be used in messaging.xml instead
                    Spring.Messaging.Amqp.Rabbit.Listener.SimpleMessageListenerContainer container =
                         ContextRegistry.GetContext().GetObject("MessageListenerContainer") as Spring.Messaging.Amqp.Rabbit.Listener.SimpleMessageListenerContainer;
                    container.Start();

                    StockForm stockForm = new StockForm();
                    Application.ThreadException += ThreadException;
                    Application.Run(stockForm);
                }
            }
            catch (Exception e)
            {
                log.Error("Spring.RabbitQuickStart.Client is broken.", e);
            }
        }