public void InitializeProperties() { for (int i = 0; i < Sessions.Count(); i++) { Sessions[i] = new SessionUC(); Sessions[i].Visibility = Visibility.Hidden; } }
public int GetSessionCount(IUser user) { if (user == null) { throw new ArgumentNullException(nameof(user)); } lock (Sync) return(Sessions.Count(s => s.HasUser() && s.User.Equals(user))); }
public void UpdateColorIdentifier() { IList <OxyColor> colorList = Graph.DefaultColors; for (int iSession = 0; iSession < Sessions.Count(); iSession++) { sessions[iSession].color.Color = Color.FromRgb( colorList.ElementAt(iSession).R, colorList.ElementAt(iSession).G, colorList.ElementAt(iSession).B); } }
public void GetSessionCount(IUser user, Action <int> callback) { if (user == null) { throw new ArgumentNullException(nameof(user)); } if (callback == null) { throw new ArgumentNullException(nameof(callback)); } lock (Sync) callback(Sessions.Count(s => user.Equals(s.User))); }
public double Distance(IDistancable t) { User u = t as User; if (u == null) { return(-1); } double dis = Math.Abs(Sessions.Count() - u.Sessions.Count()); foreach (var s in Sessions) { foreach (var ss in u.Sessions) { dis += s.Distance(ss); } } return(dis); }
public void UnloadData() { if (SelectedIndex >= 0 && SelectedIndex < Sessions.Count()) { if (savedframedetailIndex != -1 && savedframedetailIndex > SelectedIndex) { displayedIndex--; savedframedetailIndex--; } else if (savedframedetailIndex == SelectedIndex) { displayedIndex = -1; savedframedetailIndex = -1; } CsvPaths.RemoveAt(SelectedIndex); Sessions.RemoveAt(SelectedIndex); FileNames.RemoveAt(SelectedIndex); frameRanges.RemoveAt(SelectedIndex); SelectedIndex = -1; UpdateGraphs(); UpdateColorIdentifier(); } }
public int GetNumberOfAllASession() { return(Sessions.Count()); }
private int NumberOfCompletedSessions() { return(Sessions.Count((s) => s.Complete())); }
public bool FactorExists(int index, Factor.Level factor) { ThrowIf.Argument.IsNull(Sessions, "Subject.Sessions"); return(Sessions.Count((s) => s.Levels[index].Name == factor.Name) > 0); }
public bool SessionExists(string sessionID) { return(Sessions.Count((s) => s.ID == sessionID) > 0); }
public nint RowsInSection(UITableView tableView, nint section) { var startDate = EventDates.ElementAt((int)section); return(Sessions.Count(s => s.Starts.GetValueOrDefault().Date == startDate)); }