Exemplo n.º 1
0
        void deleteTables(string[] arrTables, string[] arrDesc)
        {
            for (int i = 0; i < arrTables.Length; ++i)
            {
                ToolMobile.log("Delete Data:" + arrDesc[i]);

                //
                log.set(MessageCollection.T_MSG_DATA_DELETING, new object[] { arrDesc[i] });
                //
                SqlExecute.executeNonQuery(environment, string.Format("DELETE FROM {0}", arrTables[i]));
            }
        }
Exemplo n.º 2
0
        //

        public void initForm()
        {
            inited = true;
            if (environment != null)
            {
                ToolMobile.log("start form init");

                if (settings == null)
                {
                    settings = getFormSettings();
                }
                _initBeforeSettings();
                initFromSettings();
                _initAfterSettings();
                translate();
            }
        }
Exemplo n.º 3
0
        public static void startEnv()
        {
            IEnvironment environment = null;

            try
            {
                environment = new MobEnvironment();
                ToolMobile.setEnvironment(environment);

                environment.setFileSystem(new ImplFileSystem());

                // environment.setLangSettings(new SettingsFromFileExt(Path.Combine(SettingsFileName.DIRECTORY_CONFIG, SettingsFileName.DIRECTORY_SYS), SettingsFileName.NAME_LANG, environment));
                environment.setAppSettings(new SettingsFromFileExt(Path.Combine(SettingsFileName.DIRECTORY_CONFIG, SettingsFileName.DIRECTORY_SYS), SettingsFileName.NAME_APP, environment));
                //  environment.setLoginSettings(new SettingsFromFileExt(Path.Combine(SettingsFileName.DIRECTORY_CONFIG, SettingsFileName.DIRECTORY_SYS), SettingsFileName.NAME_LOGIN, environment));
                // environment.setDsSettings(new SettingsFromFileExt(Path.Combine(SettingsFileName.DIRECTORY_CONFIG, SettingsFileName.DIRECTORY_SYS), SettingsFileName.NAME_DS, environment));

                environment.setSettingsStore(new SettingsStoreFromDirectory(Path.Combine(SettingsFileName.DIRECTORY_CONFIG, SettingsFileName.DIRECTORY_UI), environment));

                IUserImage list = new ImplUserImage();

                environment.setImages(list);



                ToolMobile.log("environment init starting");
                environment.init();
                //
                IPagedSource psSysSet = new PagedSourceFirmParams(environment);
                ToolMobile.log("set firm parameters");
                environment.setSysSettings(new SettingsFromTable(psSysSet.getAll(), TableFIRMPARAMS.CODE, TableFIRMPARAMS.VALUE));

                ToolMobile.log("environment started");
            }
            catch (Exception exc)
            {
                ToolMobile.log("environment start error: " + exc.Message);
                ToolMobile.setExceptionInner(exc);
                // environment.getExceptionHandler().setException(exc, delegate() { Close(); });
                ToolMobile.setEnvironment(null);
            }
        }