public void AddToLists(ZTask task) { if (task.Assignment.AssigneeId != "user101010") { AssignedToOthers.Add(task); } DateTimeOffset?offset = task.TaskDetails.DueDate; DateTime? dateTime = offset.HasValue ? offset.Value.DateTime : (DateTime?)null; if (dateTime != null) { if (dateTime?.Date == DateTime.Today && task.TaskDetails.TaskStatus == 0) { Today.Add(task); } if (dateTime?.Date < DateTime.Today && task.TaskDetails.TaskStatus == 0) { Delayed.Add(task); } if (dateTime?.Date > DateTime.Today && task.TaskDetails.TaskStatus == 0) { Upcoming.Add(task); } } }
public List <Upcoming> GetUpcomingMatches(List <OddsAPIData> data) { List <Upcoming> upcomingMatches = new List <Upcoming>(); foreach (var obj in data) { var addToList = new Upcoming(); addToList.HomeTeam = obj.home_team; string[] teams = new string[2] { obj.teams[0], obj.teams[1] }; int homeTeamIndex = Array.IndexOf(teams, addToList.HomeTeam); int awayTeamIndex = (homeTeamIndex == 1) ? 0 : 1; addToList.AwayTeam = teams[awayTeamIndex]; addToList.MatchDate = Utilities.ConvertUnixTimeStamp(obj.commence_time); addToList.League = obj.sport_nice; upcomingMatches.Add(addToList); } return(upcomingMatches); }
public void Display(List <ZTask> ZtaskList) { switch (taskView) { case TaskView.Home: Home.Clear(); Home = ZtaskList; DisplayMyTasks(); break; case TaskView.Today: Today.Clear(); Today = ZtaskList; DisplayTasksForToday(); break; case TaskView.Upcoming: Upcoming.Clear(); Upcoming = ZtaskList; DisplayUpcomingTasks(); break; case TaskView.Delayed: Delayed.Clear(); Delayed = ZtaskList; DisplayDelayedTasks(); break; case TaskView.AssignedToOthers: AssignedToOthers.Clear(); AssignedToOthers = ZtaskList; DisplayTasksAssignedToOthers(); break; } }
void Start() { Current_Color = GetNextColor(); next_Color = GetNextColor(); Current.GetComponent <Current_Cannon_Switcher>().this_switch_color = Current_Color; Upcoming.GetComponent <Current_Cannon_Switcher>().this_switch_color = next_Color; }
IEnumerator WaitForSpline() { yield return(new WaitForSeconds(0.6f)); Current.GetComponent <SpriteRenderer>().enabled = false; Upcoming.GetComponent <SpriteRenderer>().enabled = false; }
/** * Returns a current color on demand of the new bubble which is to be shoot * Assigns next color to current color and requests a new next color from GetNextColor() **/ public ColorProperty GetCurrent() { ColorProperty temp = Current_Color; Current_Color = next_Color; if (GamePrefs.NO_OF_BUBBLES > 1) { upComing2.gameObject.GetComponent <UpComingColors>().BubbleCountOneLock = false; next_Color = GetNextColor(); Current.GetComponent <Current_Cannon_Switcher>().this_switch_color = Current_Color; Upcoming.GetComponent <Current_Cannon_Switcher>().this_switch_color = next_Color; //UpdateUpColor(); // Update coming color spriteRenderer SpriteRenderer sp = Up_Color.GetComponent <SpriteRenderer>(); switch (next_Color) { case ColorProperty.Green: //sp.sprite = gameManager.sp_bubble[0]; break; case ColorProperty.Blue: // sp.sprite = gameManager.sp_bubble[1]; break; case ColorProperty.Yellow: //sp.sprite = gameManager.sp_bubble[2]; break; case ColorProperty.Red: //sp.sprite = gameManager.sp_bubble[3]; break; case ColorProperty.Purple: //sp.sprite = gameManager.sp_bubble[4]; break; case ColorProperty.Black: //sp.sprite = gameManager.sp_bubble[5]; break; } } else { //Cannot Flip Code Here //.GetComponent<SpriteRenderer>().sprite = null; upComing2.gameObject.GetComponent <UpComingColors>().BubbleCountOneLock = true; upComing1.sprite = null; upComing2.sprite = null; } //print("Current "+Current_Color); //print("Next" + next_Color); return(Current_Color); }
public override void Cleanup() { _nextUpLoaded = _latestUnwatchedLoaded = _upcomingLoaded = _showsLoaded = _genresLoaded = false; _parentId = null; NextUpList.Clear(); LatestUnwatched.Clear(); Upcoming.Clear(); Shows.Clear(); Genres.Clear(); base.Cleanup(); }
public async Task <IActionResult> OnGet() { if (Id.HasValue) { branches = branchService.GetAll().Where(x => x.BusinessId == Id.Value).ToList(); var getBusinessName = businessService.Find(Id.Value); var employeeItems = employeeItemService.GetAll(); var branchItems = await branchItemService.GetAllAsync(); if (branchItems != null) { foreach (var item in branchItems.Where(x => x.Branch.BusinessId == Id.Value)) { if (item.ExpDate.HasValue && item.ExpDate.Value.AddDays(-30).Date <= DateTime.Today) { Upcoming upcoming = new Upcoming(); upcoming.date = item.ExpDate.Value; upcoming.Branch = item.Branch.Name; upcoming.Details = item.DocumentTitle; upcomings.Add(upcoming); } } } if (employeeItems != null) { foreach (var item in employeeItems.Where(x => x.Employee.Branch.BusinessId == Id.Value)) { if (item.ExpDate.HasValue && item.ExpDate.Value.AddDays(-30).Date <= DateTime.Today) { Upcoming upcoming = new Upcoming(); upcoming.date = item.ExpDate.Value; upcoming.Branch = item.Employee.Branch.Name; upcoming.Details = item.DocumentTitle + " " + item.Employee.FirstName + " " + item.Employee.LastName; upcomings.Add(upcoming); } } } if (getBusinessName != null && branches != null) { currentBusiness = getBusinessName.Name; return(null); } else { return(RedirectToPage("/Index")); } } return(RedirectToPage("/Index")); }
public UpcomingListViewModel() { upcomings = new ObservableCollection <Upcoming>(); using (var webClient = new WebClient()) { string jsonString = webClient.DownloadString("https://api.themoviedb.org/3/movie/upcoming?api_key=f4b8e415cb9ab402e5c1d72176cab35b"); Console.WriteLine(jsonString); var r = Upcoming.FromJson(jsonString); foreach (Upcoming up in r.Results) { upcomings.Add(up); } } }
/** * flip action is called when user switches between bubbles in game **/ public void flip() { Current.GetComponent <SpriteRenderer>().enabled = true; Upcoming.GetComponent <SpriteRenderer>().enabled = true; //print("Current Object color before flip" + Current.GetComponent<Current_Cannon_Switcher>().this_switch_color); //print("Next Object color before flip" + Upcoming.GetComponent<Current_Cannon_Switcher>().this_switch_color); //print("Current Color Before Flip " + Current_Color); //print("Next Color Before Flip " + next_Color); ColorProperty temp = Current_Color; Current_Color = next_Color; next_Color = temp; Current.GetComponent <Current_Cannon_Switcher>().this_switch_color = next_Color; Upcoming.GetComponent <Current_Cannon_Switcher>().this_switch_color = Current_Color; //print("Current Color After Flip " + Current_Color); //print("Next Color After Flip " + next_Color); ///---------------------------------------------------------------------- /// //Current.GetComponent<SplineInterpolator>().Reset(); //Upcoming.GetComponent<SplineInterpolator>().Reset(); //Current.GetComponent<SplineController>().enabled = true; //Upcoming.GetComponent<SplineController>().enabled = true; //Upcoming Current.GetComponent <SplineController>().FollowSpline(); Upcoming.GetComponent <SplineController>().FollowSpline(); GameObject temp3 = Current_SplineRoot; Current_SplineRoot = Upcoming_SplineRoot; Upcoming_SplineRoot = temp3; StartCoroutine("WaitForSpline"); UpdateUpColor(); //update upcoming color }
public void OnGetAsync() { businesses = _businessService.GetAll().ToList(); var employeeItems = _employeeItemService.GetAll(); var branchItems = _branchItemService.GetAll(); if (branchItems != null) { foreach (var item in branchItems) { if (item.ExpDate.HasValue && item.ExpDate.Value.AddDays(-30).Date <= DateTime.Today) { Upcoming upcoming = new Upcoming(); upcoming.date = item.ExpDate.Value; upcoming.Business = item.Branch.Business.Name; upcoming.Branch = item.Branch.Name; upcoming.Details = item.DocumentTitle; upcomings.Add(upcoming); } } } if (employeeItems != null) { foreach (var item in employeeItems) { if (item.ExpDate.HasValue && item.ExpDate.Value.AddDays(-30).Date <= DateTime.Today) { Upcoming upcoming = new Upcoming(); upcoming.date = item.ExpDate.Value; upcoming.Business = item.Employee.Branch.Business.Name; upcoming.Branch = item.Employee.Branch.Name; upcoming.Details = item.DocumentTitle + " " + item.Employee.FirstName + " " + item.Employee.LastName; upcomings.Add(upcoming); } } } }
public override void Init(object initData) { Upcoming.Execute(null); }
public ActionResult Assessments(int class_id) { int studentID = int.Parse(Session["StudentID"].ToString()); var search = from a in db.Assessments join ar in db.AssessmentResults on a.AssessmentID equals ar.AssessmentID where a.ClassID == class_id && ar.StudentID == studentID select new { a.assessment_name, a.assessment_date, ar.result }; var sub = from cls in db.Classes where cls.ClassID == class_id select cls; ViewBag.Subject = sub.FirstOrDefault <Class>(); //Past Due and marked List <Marked> marked = new List <Marked>(); List <string> notMarked = new List <string>(); List <Upcoming> upcoming = new List <Upcoming>(); foreach (var item in search) { if (DateTime.Parse(item.assessment_date) < DateTime.Now) { if (item.result != -1) //Marked { Marked m = new Marked(); m.name = item.assessment_name; m.mark = item.result; marked.Add(m); } else { notMarked.Add(item.assessment_name); } } else { Upcoming u = new Upcoming(); u.date = item.assessment_date; u.name = item.assessment_name; upcoming.Add(u); } } ViewBag.Upcoming = upcoming; ViewBag.Marked = marked; ViewBag.NotMarked = notMarked; //To be Written return(View("Assessments")); }