Esempio n. 1
0
        public static void Main(string[] args)
        {
            Application.Init ();

            cnfg = new ConfigurationManager ();

            Boolean isDatabaseOpened = DataBase.Open (cnfg.AppSettings ["server"],
                                              		  cnfg.AppSettings ["database"],
                                                      cnfg.AppSettings ["usr"],
                                                      cnfg.AppSettings ["pwd"]);
            if (!isDatabaseOpened) {
                dlg.show (null,DialogFlags.DestroyWithParent, MessageType.Error, ButtonsType.Ok, string.Format ("Ocurrió un error al intentar abrir la base de datos Servidor: {0}, Base de datos: {1}", cnfg.AppSettings ["server"], cnfg.AppSettings ["database"]));
            } else {
                MainWindow win = new MainWindow ();
                win.Show ();
                Application.Run ();

                DataBase.Close ();
            }
        }
Esempio n. 2
0
 internal override void LoadConfig(NLog.Internal.ConfigurationManager aConfig)
 {
     ZmqBindAddr    = aConfig.AppSettings["zmq_bind"];
     ZmqPubBindAddr = aConfig.AppSettings["zmq_pub_bind"];
 }