Exemplo n.º 1
0
        public void GetUsers()
        {
            try
            {
                int           cnt = GetUserCount(), idx;
                StringBuilder userName = new StringBuilder(128);

                users = new string[cnt];

                for (idx = 0; idx < cnt; idx++)
                {
                    int size = userName.Capacity;

                    if (Palm.PltGetUser(idx, userName, ref size) > 0)
                    {
                        users[idx] = userName.ToString();
                    }

                    if (userName.Length > 0)
                    {
                        userName.Remove(0, userName.Length);
                    }
                }
            }
            catch
            {
                users = new string[0];
            }
        }
Exemplo n.º 2
0
        public fWizard()
        {
            InitializeComponent();

            config.Load();

            if ((config.dbPath != null) && (config.dbPath.Length > 0))
            {
                if (File.Exists(config.dbPath) == false)
                {
                    config.dbPath = null;
                }
            }
            else
            {
                config.dbPath = null;
            }

            if ((config.outputPath != null) && (config.outputPath.Length > 0))
            {
                if (Directory.Exists(config.outputPath) == false)
                {
                    config.outputPath = null;
                }
            }
            else
            {
                config.outputPath = null;
            }

            if (win32)
            {
                if (config.dbPath == null)
                {
                    config.dbPath = @"c:\Trams\mobile\traprg\ExpCat.dat";
                }

                if (config.outputPath == null)
                {
                    config.outputPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + @"\HP\Trams for Palm OS";
                }

                palm = new Palm();
                palm.GetUsers();
            }
            else
            {
                config.dbPath = "";
                palm          = null;
            }
        }
Exemplo n.º 3
0
 public int GetUserCount()
 {
     return(Palm.PltGetUserCount());
 }