public bool Equals(MeltJob pJob) { return (pJob != null && Percentage.Equals(pJob.Percentage) && Status.Equals(pJob.Status) && TimeTaken.Equals(pJob.TimeTaken)); }
public AttemptInfo(List <Test> tests, GestureDirection direction) { foreach (var t in DataGenerator.AllTechniques) { HitPercentage.Add(t, new double[18]); TimeTaken.Add(t, new double[18]); Accuracy.Add(t, new double[18]); } foreach (var technique in DataGenerator.AllTechniques) { foreach (var test in tests) { var attempts = test.Attempts[technique].Where(x => x.Direction == direction).ToList(); attempts.Sort((x, y) => x.AttemptNumber.CompareTo(y.AttemptNumber)); int count = 0; foreach (var attempt in attempts) { HitPercentage[technique][count] += attempt.Hit ? 1 : 0; TimeTaken[technique][count] += attempt.Time.TotalSeconds; Accuracy[technique][count] += MathHelper.GetDistance(attempt); count++; } } } foreach (var t in DataGenerator.AllTechniques) { for (int i = 0; i < 18; i++) { HitPercentage[t][i] /= tests.Count; TimeTaken[t][i] /= tests.Count; Accuracy[t][i] /= tests.Count; } } }
public string Remarks() { return("Completed face and eye detection using " + ProcessedWith + " in " + TimeTaken.ToString()); }
public string GetDisplayString() { return(TimeTaken.ToLocalTime().ToString("MMM dd, HH:mm:ss")); }
public string GetDisplayString() { var dt = TimeTaken.ToLocalTime(); return(dt.ToString("M") + ", " + dt.ToString("T")); }
//Tuple private void initBlock(isReachableEnum isReachableEnum) { Grid grid = new Grid(); grid.ColumnDefinitions.Add(new ColumnDefinition { Width = GridLength.Auto }); grid.ColumnDefinitions.Add(new ColumnDefinition()); grid.ColumnDefinitions.Add(new ColumnDefinition { Width = GridLength.Auto }); grid.ColumnDefinitions.Add(new ColumnDefinition { Width = GridLength.Auto }); grid.ColumnDefinitions.Add(new ColumnDefinition { Width = GridLength.Auto }); TextBlock textBlock = new TextBlock { Text = _url, FontSize = 14, Foreground = new SolidColorBrush("#1da1f2".GetColorFromHex()), Style = (Style)Application.Current.Resources["HeaderTextBlockStyle"], }; Grid.SetColumn(textBlock, 1); grid.Children.Add(textBlock); Image img = new Image { Source = new BitmapImage(new Uri(gifs[(int)isReachableEnum])), Width = 20, Margin = new Thickness(0) }; Grid.SetColumn(img, 2); grid.Children.Add(img); TextBlock timeBlock = new TextBlock { Text = TimeTaken.ToString("0.000"), FontSize = 14, Padding = new Thickness(10, 0, 0, 0), Foreground = new SolidColorBrush("#1da1f2".GetColorFromHex()), Style = (Style)Application.Current.Resources["HeaderTextBlockStyle"], }; _timeTextBlock = timeBlock; Grid.SetColumn(timeBlock, 3); grid.Children.Add(timeBlock); Button closeBtn = new Button { Content = new Image { Source = new BitmapImage(new Uri("ms-appx:///Assets/close.png")), Width = 20, Margin = new Thickness(0) }, Margin = new Thickness(0), Padding = new Thickness(0) }; Grid.SetColumn(closeBtn, 4); grid.Children.Add(closeBtn); this._closeButton = closeBtn; this._grid = grid; this._image = img; }
public string GetDisplayString() { DateTime dt = TimeTaken.ToLocalTime(); return dt.ToString("M") + ", " + dt.ToString("T"); }