Beispiel #1
0
        public static List <SearchDay> LoadAds(string adFolderPathRoot, string statusFolderPathRoot)
        {
            var directories = Directory.GetDirectories(adFolderPathRoot);
            var ads         = new List <SearchDay>(directories.Length);

            AdStatus.FolderPath = statusFolderPathRoot;
            foreach (var directory in directories)
            {
                var programmerResults = LoadAdsInDirectory(directory, "*output*programmer*");
                var tattarjobbResults = LoadAdsInDirectory(directory, "*output*tattarjobb*");

                var dateString         = Regex.Match(directory, @".*\\(.*)").Result("$1");
                var date               = GetDateFromString(dateString);
                var programmerStatuses = LoadDayStatuses(date, "_P", programmerResults.Length);
                var tattarjobbStatuses = LoadDayStatuses(date, "_T", tattarjobbResults.Length);

                var day = new SearchDay(date, programmerResults, tattarjobbResults);
                for (int n = 0; n < programmerStatuses.Length; n++)
                {
                    programmerResults[n].Applied = programmerStatuses[n];
                    programmerResults[n].Id      = n;
                }
                for (int n = 0; n < tattarjobbStatuses.Length; n++)
                {
                    tattarjobbResults[n].Applied = tattarjobbStatuses[n];
                    tattarjobbResults[n].Id      = n;
                }

                ads.Add(day);
            }
            return(ads);
        }
Beispiel #2
0
        public void SetDay(SearchDay day)
        {
            var text = day.Date.ToString("yyyy-MM-dd");

            _badgeText.text = text;
            gameObject.name = text;
            _day            = day;
        }