Exemplo n.º 1
0
        static void Main()
        {
            // Inicializa
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            // Carrega servicos do config
            ServicoHostColecao.Default.CarregarConfig("Default");

            // Pega o serviço de interface
            IServicoInterfaceDesktop servicoInterface = Ativador.Get <IServicoInterfaceDesktop>();

            // Inicia o launcher
            servicoInterface.IniciarLauncher();

            // Lança o sistema
            Application.Run((Form)servicoInterface.ReceberJanelaLauncher());
        }
Exemplo n.º 2
0
        private static void iniciarAplicacao()
        {
            // Carrega o formulario
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            //// Faz o login
            //FormLogin frmLogin = new FormLogin();
            //if (frmLogin.ShowDialog() == DialogResult.OK)
            //{
            // Pega o serviço de interface
            IServicoInterfaceDesktop servicoInterface = Ativador.Get <IServicoInterfaceDesktop>();

            // Inicia o launcher
            servicoInterface.IniciarLauncher();

            // Cria o contexto
            //InterfaceContextoOMS contexto = new InterfaceContextoOMS(frmLogin.SessaoInfo);
            //servicoInterface.Contexto.AdicionarItem(contexto);

            // Lança o sistema
            Application.Run((Form)servicoInterface.ReceberJanelaLauncher());
            //}
        }