Example #1
0
        public List <MinusFolder> ReadFolderList()
        {
            MinusFolderListResponse mflr = GetUserFolderList();

            if (mflr.results != null && mflr.results.Length > 0)
            {
                Config.FolderList.Clear();
                foreach (MinusFolder minusFolder in mflr.results)
                {
                    Config.FolderList.Add(minusFolder);
                }
            }
            else
            {
                MinusFolder mf = CreateFolder(Application.ProductName, true);
                if (mf != null)
                {
                    Config.FolderList.Add(mf);
                }
            }

            Config.FolderID = 0;

            return(Config.FolderList);
        }
        public List <MinusFolder> ReadFolderList(MinusScope scope)
        {
            MinusFolderListResponse mflr = GetUserFolderList(scope);

            if (mflr.results != null && mflr.results.Length > 0)
            {
                Config.FolderList.Clear();
                for (int i = 0; i < mflr.results.Length; i++)
                {
                    Config.FolderList.Add(mflr.results[i]);
                }
            }
            else
            {
                Thread.Sleep(1000);
                MinusFolder mf = CreateFolder("ZScreen", true);
                if (mf != null)
                {
                    Config.FolderList.Add(mf);
                }
            }

            Config.FolderID = 0;

            return(Config.FolderList);
        }