예제 #1
0
        static Main()
        {
            try
            {
                //iModSCCredenciamentoIcon = new BitmapImage(new Uri(@"iModSCCredenciamento.Resources.Cracha.png", UriKind.RelativeOrAbsolute));
                iModSCCredenciamentoIcon = new BitmapImage(new Uri(@"pack://application:,,,/iModSCCredenciamento;Component/Resources/Cracha.png", UriKind.RelativeOrAbsolute));
                Global.AbreConfig();
            }


            catch (Exception)
            {
            }
        }
예제 #2
0
        private void OnLoggedOn(object sender, LoggedOnEventArgs e)
        {
            try
            {
                Schedule            agenda = engine.GetEntity(new Guid("00000000-0000-0000-0000-000000000006")) as Schedule;
                SystemConfiguration systemConfiguration = engine.GetEntity(SdkGuids.SystemConfiguration) as SystemConfiguration;
                var service = systemConfiguration.CustomFieldService;
                Global._instancia  = service.GetValue <string>("Instância", agenda.Guid);
                Global._bancoDados = service.GetValue <string>("Banco de Dados", agenda.Guid);
                Global._usuario    = service.GetValue <string>("Usuário", agenda.Guid);
                Global._senha      = service.GetValue <string>("Senha", agenda.Guid);

                Global._connectionString = "Data Source=" + Global._instancia + "; Initial Catalog=" + Global._bancoDados + "; User ID=" + Global._usuario + "; Password="******"; Min Pool Size=5;Max Pool Size=15;Connection Reset=True;Connection Lifetime=600;Trusted_Connection=no;MultipleActiveResultSets=True";
            }
            catch (Exception ex)
            {
                Global.AbreConfig();
            }
            // CarregaLayoutCracha();
            RegisterTaskExtensions();
        }