<commit_before>using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Runtime.Serialization;
using System.Threading.Tasks;
using System.Web.Mvc.Routing.Constraints;
using System.Web.UI.DataVisualization.Charting;
using AjaxControlToolkit;
using Microsoft.EntityFrameworkCore.Query.ExpressionTranslators;
using MOE.Common.Business.TimingAndActuations;
using MOE.Common.Migrations;
using MOE.Common.Models;
using MOE.Common.Models.Repositories;

namespace MOE.Common.Business.WCFServiceLibrary
{
    [DataContract]
    public class TimingAndActuationsOptions : MetricOptions
    {
        [Display(Name = "Legend")]
        [Required]
        [DataMember]
        public bool ShowLegend { get; set; }

        [Display(Name = "Header For Each Phase")]
        [Required]
        [DataMember]
        public bool ShowHeaderForEachPhase { get; set; }

        [Display(Name = "Combine Lanes for Phase")]
        [Required]
        [DataMember]
        public bool CombineLanesForEachGroup { get; set; }

        [Display(Name = "Dot and Marker Size")]
        [Required]
        [DataMember]
        public int DotAndBarSize { get; set; }

        [Display(Name = "Phase Filter")]
        [DataMember]
        public string PhaseFilter { get; set; }

        [Display(Name = "Phase Event Codes")]
        [DataMember]
        public string PhaseEventCodes { get; set; }

        [Display(Name = "Global Event Codes")]
        [DataMember]
        public string GlobalCustomEventCodes { get; set; }

        [Display(Name = "Global Event Params")]
        [DataMember]
        public string GlobalCustomEventParams { get; set; }

        [Display(Name = "Extend Search (left) Minutes.decimal")]
        [Required]
        [DataMember]
        public double ExtendVsdSearch { get; set; }

        [Display(Name = "Vehicle Signal Display")]
        [Required]
        [DataMember]
        public bool ShowVehicleSignalDisplay { get; set; }

        [Display(Name = "Pedestrian Intervals")]
        [Required]
        [DataMember]
        public bool ShowPedestrianIntervals { get; set; }

        [Display(Name = "Pedestrian Actuations")]
        [Required]
        [DataMember]
        public bool ShowPedestrianActuation { get; set; }

        [Display(Name = "Extend Start/Stop Search Minutes.decimal")]
        [Required]
        [DataMember]
        public double ExtendStartStopSearch { get; set; }

        [Display(Name = "Stop Bar Presence")]
        [Required]
        [DataMember]
        public bool ShowStopBarPresence { get; set; }

        [Display(Name = "Lane-by-lane Count")]
        [ Required]
        [DataMember]
        public bool ShowLaneByLaneCount { get; set; }

        [Display(Name = "Advanced Presence")]
        [Required]
        [DataMember]
        public bool ShowAdvancedDilemmaZone { get; set; }

        [Display(Name = "Advanced Count")]
        [Required]
        [DataMember]
        public bool ShowAdvancedCount { get; set; }
        
        [Display(Name = "Advd Count Offset")]
        [DataMember]
        public double AdvancedOffset { get; set; }

        [Display(Name = "Advanced Event")]
        [Required]
        [DataMember]
        public bool ShowAdvancedEvent { get; set; }
        
        [Display(Name = "All Lanes For Each Phase")]
        [Required]
        [DataMember]
        public bool ShowAllLanesInfo { get; set; }
        
        [Display(Name = "On/Off Lines")]
        [Required]
        [DataMember]
        public bool ShowLinesStartEnd { get; set; }
        
        [Display(Name = "Event Start Stop Pairs")]
        [Required]
        [DataMember]
        public bool ShowEventPairs { get; set; }
        
        [Display(Name = "Raw Data Display")]
        [Required]
        [DataMember]
        public bool ShowRawEventData { get; set; }
        
        public List<int> GlobalEventCodesList { get; set; }
        public List<int> GlobalEventParamsList { get; set; }
        public List<int> PhaseEventCodesList { get; set; }
        public List<int> PhaseFilterList { get; set; }
        public int GlobalEventCounter { get; set; }
        public Models.Signal Signal { get; set; }
        public int HeadTitleCounter { get; set; }

        public TimingAndActuationsOptions(string signalID, DateTime startDate, DateTime endDate)
        {
            SignalID = signalID;
            StartDate = startDate;
            EndDate = endDate;
            MetricTypeID = 17;
            //ExtendSearch = 0;
        }

        public TimingAndActuationsOptions()
        {
            MetricTypeID = 17;
            //ExtendSearch = 0;
            SetDefaults();
        }

        public void SetDefaults()
        {
            ShowLegend = false;
            CombineLanesForEachGroup = false;
            ShowAdvancedCount = true;
            ShowAdvancedEvent= false;
            ShowAdvancedDilemmaZone = true;
            ShowAllLanesInfo = true;

            ShowEventPairs = false;
            ShowHeaderForEachPhase = false;
            ShowLaneByLaneCount = true;
            ShowLinesStartEnd = true;

            ShowPedestrianActuation = true;
            ShowPedestrianIntervals = true;
            ShowStopBarPresence = true;
            ShowRawEventData = false;
            ShowVehicleSignalDisplay = true;

            DotAndBarSize = 6;
            AdvancedOffset = 0.0;<commit_msg>Last part opf Show Advanced Event that was removed.<commit_after>using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Runtime.Serialization;
using System.Threading.Tasks;
using System.Web.Mvc.Routing.Constraints;
using System.Web.UI.DataVisualization.Charting;
using AjaxControlToolkit;
using Microsoft.EntityFrameworkCore.Query.ExpressionTranslators;
using MOE.Common.Business.TimingAndActuations;
using MOE.Common.Migrations;
using MOE.Common.Models;
using MOE.Common.Models.Repositories;

namespace MOE.Common.Business.WCFServiceLibrary
{
    [DataContract]
    public class TimingAndActuationsOptions : MetricOptions
    {
        [Display(Name = "Legend")]
        [Required]
        [DataMember]
        public bool ShowLegend { get; set; }

        [Display(Name = "Header For Each Phase")]
        [Required]
        [DataMember]
        public bool ShowHeaderForEachPhase { get; set; }

        [Display(Name = "Combine Lanes for Phase")]
        [Required]
        [DataMember]
        public bool CombineLanesForEachGroup { get; set; }

        [Display(Name = "Dot and Marker Size")]
        [Required]
        [DataMember]
        public int DotAndBarSize { get; set; }

        [Display(Name = "Phase Filter")]
        [DataMember]
        public string PhaseFilter { get; set; }

        [Display(Name = "Phase Event Codes")]
        [DataMember]
        public string PhaseEventCodes { get; set; }

        [Display(Name = "Global Event Codes")]
        [DataMember]
        public string GlobalCustomEventCodes { get; set; }

        [Display(Name = "Global Event Params")]
        [DataMember]
        public string GlobalCustomEventParams { get; set; }

        [Display(Name = "Extend Search (left) Minutes.decimal")]
        [Required]
        [DataMember]
        public double ExtendVsdSearch { get; set; }

        [Display(Name = "Vehicle Signal Display")]
        [Required]
        [DataMember]
        public bool ShowVehicleSignalDisplay { get; set; }

        [Display(Name = "Pedestrian Intervals")]
        [Required]
        [DataMember]
        public bool ShowPedestrianIntervals { get; set; }

        [Display(Name = "Pedestrian Actuations")]
        [Required]
        [DataMember]
        public bool ShowPedestrianActuation { get; set; }

        [Display(Name = "Extend Start/Stop Search Minutes.decimal")]
        [Required]
        [DataMember]
        public double ExtendStartStopSearch { get; set; }

        [Display(Name = "Stop Bar Presence")]
        [Required]
        [DataMember]
        public bool ShowStopBarPresence { get; set; }

        [Display(Name = "Lane-by-lane Count")]
        [ Required]
        [DataMember]
        public bool ShowLaneByLaneCount { get; set; }

        [Display(Name = "Advanced Presence")]
        [Required]
        [DataMember]
        public bool ShowAdvancedDilemmaZone { get; set; }

        [Display(Name = "Advanced Count")]
        [Required]
        [DataMember]
        public bool ShowAdvancedCount { get; set; }
        
        [Display(Name = "Advd Count Offset")]
        [DataMember]
        public double AdvancedOffset { get; set; }

        [Display(Name = "All Lanes For Each Phase")]
        [Required]
        [DataMember]
        public bool ShowAllLanesInfo { get; set; }
        
        [Display(Name = "On/Off Lines")]
        [Required]
        [DataMember]
        public bool ShowLinesStartEnd { get; set; }
        
        [Display(Name = "Event Start Stop Pairs")]
        [Required]
        [DataMember]
        public bool ShowEventPairs { get; set; }
        
        [Display(Name = "Raw Data Display")]
        [Required]
        [DataMember]
        public bool ShowRawEventData { get; set; }
        
        public List<int> GlobalEventCodesList { get; set; }
        public List<int> GlobalEventParamsList { get; set; }
        public List<int> PhaseEventCodesList { get; set; }
        public List<int> PhaseFilterList { get; set; }
        public int GlobalEventCounter { get; set; }
        public Models.Signal Signal { get; set; }
        public int HeadTitleCounter { get; set; }

        public TimingAndActuationsOptions(string signalID, DateTime startDate, DateTime endDate)
        {
            SignalID = signalID;
            StartDate = startDate;
            EndDate = endDate;
            MetricTypeID = 17;
            //ExtendSearch = 0;
        }

        public TimingAndActuationsOptions()
        {
            MetricTypeID = 17;
            //ExtendSearch = 0;
            SetDefaults();
        }

        public void SetDefaults()
        {
            ShowLegend = false;
            CombineLanesForEachGroup = false;
            ShowAdvancedCount = true;
            ShowAdvancedDilemmaZone = true;
            ShowAllLanesInfo = true;

            ShowEventPairs = false;
            ShowHeaderForEachPhase = false;
            ShowLaneByLaneCount = true;
            ShowLinesStartEnd = true;

            ShowPedestrianActuation = true;
            ShowPedestrianIntervals = true;
            ShowStopBarPresence = true;
            ShowRawEventData = false;
            ShowVehicleSignalDisplay = true;

            DotAndBarSize = 6;
            AdvancedOffset = 0.0;
{'fraction_non_alphanumeric': 0.09240436148586213, 'fraction_numerical': 0.0016632785067455184, 'mean_word_length': 2.1480511925538104, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5012439', 'n_tokens_mistral': 3032, 'n_tokens_neox': 2931, 'n_words': 757}